diff --git a/.babelrc b/.babelrc new file mode 100644 index 00000000000..2c63c085104 --- /dev/null +++ b/.babelrc @@ -0,0 +1,2 @@ +{ +} diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 00000000000..48f9d0ed4dd --- /dev/null +++ b/.eslintrc @@ -0,0 +1,19 @@ +{ + "env": { + "browser": true + }, + "extends": ["airbnb/base","prettier"], + "parser": "babel-eslint", + "plugins": ["prettier"], + "rules": { + "prettier/prettier": ["error"] + }, + "ignorePatterns": ["Assets/library/js/dist","node_modules","*.min.js"], + "globals": { + "mQuery": true, + // "grapesjs": true, + "Mousetrap":true, + "Mautic":true, + "mauticAjaxCsrf":true + } +} diff --git a/.gitignore b/.gitignore index 8b3de47aaeb..25e2a35ffd1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,10 @@ .* +!.babelrc +!.eslintrc +!.prettierignore +!.prettierrc !.gitignore !.htaccess !.gitkeep +!Assets/library/js/dist vendor/* \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000000..2af5576a442 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +Assets/library/js/dist +*.min.js \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000000..5ac85e271d5 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "printWidth": 100, + "singleQuote": true +} diff --git a/Assets/library/js/builder.js b/Assets/library/js/builder.js index f20a528de64..9d8b3153f87 100644 --- a/Assets/library/js/builder.js +++ b/Assets/library/js/builder.js @@ -1,27 +1,5 @@ -/** - * Initialize theme selection - * - * @param themeField - */ -Mautic.initSelectTheme = (function (initSelectTheme) { - return function (themeField) { - let builderUrl = mQuery('#builder_url'); - - // Replace Mautic URL by plugin URL - if (builderUrl.length) { - if (builderUrl.val().indexOf('pages') !== -1) { - url = builderUrl.val().replace('s/pages/builder','s/grapesjsbuilder/page'); - } else { - url = builderUrl.val().replace('s/emails/builder','s/grapesjsbuilder/email'); - } - - builderUrl.val(url); - } - - // Launch original Mautic.initSelectTheme function - initSelectTheme(themeField); - } -})(Mautic.initSelectTheme); +import BuilderService from './builder.service'; +// import builder from './builder.service'; /** * Launch builder @@ -29,592 +7,106 @@ Mautic.initSelectTheme = (function (initSelectTheme) { * @param formName * @param actionName */ -Mautic.launchBuilder = function (formName, actionName) { - Mautic.showChangeThemeWarning = true; - - // Prepare HTML - mQuery('html').css('font-size', '100%'); - mQuery('body').css('overflow-y', 'hidden'); - mQuery('.builder-panel').css('padding', 0); - mQuery('.builder').addClass('builder-active').removeClass('hide'); - - // Initialize GrapesJS - Mautic.initGrapesJS(formName); -}; - -/** - * Initialize GrapesJsBuilder - * - * @param object - */ -var editor; -Mautic.initGrapesJS = function (object) { - let panelManager; - let textareaHtml = mQuery('textarea.builder-html'); - let textareaAssets = mQuery('textarea#grapesjsbuilder_assets'); - let assetManagerConf = { - assets: JSON.parse(textareaAssets.val()), - noAssets: Mautic.translate('grapesjsbuilder.assetManager.noAssets'), - upload: textareaAssets.data('upload'), - uploadName: 'files', - multiUpload: true, - embedAsBase64: false, - openAssetsOnDrop: 1, - autoAdd: true, - headers: {'X-CSRF-Token': mauticAjaxCsrf}, // global variable - }; - - let presetMauticConf = { - 'sourceEditBtnLabel': Mautic.translate('grapesjsbuilder.sourceEditBtnLabel'), - 'sourceCancelBtnLabel': Mautic.translate('grapesjsbuilder.sourceCancelBtnLabel'), - 'sourceEditModalTitle': Mautic.translate('grapesjsbuilder.sourceEditModalTitle'), - 'deleteAssetConfirmText': Mautic.translate('grapesjsbuilder.deleteAssetConfirmText'), - 'categorySectionLabel': Mautic.translate('grapesjsbuilder.categorySectionLabel'), - 'categoryBlockLabel': Mautic.translate('grapesjsbuilder.categoryBlockLabel'), - 'dynamicContentBlockLabel': Mautic.translate('grapesjsbuilder.dynamicContentBlockLabel'), - 'dynamicContentBtnLabel': Mautic.translate('grapesjsbuilder.dynamicContentBtnLabel'), - 'dynamicContentModalTitle': Mautic.translate('grapesjsbuilder.dynamicContentModalTitle'), - }; - - // disable mautic global shortcuts - Mousetrap.reset(); - - // Redefine Keyboard shortcuts due to unbind won't works with multiple keys. - let keymapsConf = { - defaults: { - 'core:undoios': { - keys: '⌘+z', - handler: 'core:undo' - }, - 'core:redoios': { - keys: '⌘+shift+z', - handler: 'core:redo' - }, - 'core:copyios': { - keys: '⌘+c', - handler: 'core:copy' - }, - 'core:pasteios': { - keys: '⌘+v', - handler: 'core:paste' - }, - 'core:undo': { - keys: 'ctrl+z', - handler: 'core:undo' - }, - 'core:redo': { - keys: 'ctrl+shift+z', - handler: 'core:redo' - }, - 'core:copy': { - keys: 'ctrl+c', - handler: 'core:copy' - }, - 'core:paste': { - keys: 'ctrl+v', - handler: 'core:paste' - }, - 'core:c-deletebackspace': { - keys: 'backspace', - handler: 'core:component-delete' - }, - 'core:c-deletesuppr': { - keys: 'delete', - handler: 'core:component-delete' - }, - } - }; - - if (object === 'page') { // PageBuilder - // Parse HTML template - let parser = new DOMParser(); - let fullHtml = parser.parseFromString(textareaHtml.val(), "text/html"); - - // Extract body - let body = fullHtml.body.innerHTML; - - // Launch GrapesJS with body part - editor = grapesjs.init({ - clearOnRender: true, - container: '.builder-panel', - components: body, - height: '100%', - storageManager: false, - assetManager: assetManagerConf, - styleManager: { - clearProperties: true, // Temp fix https://github.com/artf/grapesjs-preset-webpage/issues/27 - }, - - plugins: ['gjs-preset-webpage', 'grapesjs-parser-postcss', 'grapesjs-preset-mautic'], - pluginsOpts: { - 'gjs-preset-webpage': { - 'formsOpts': false, - }, - 'grapesjs-preset-mautic': presetMauticConf - }, - keymaps: keymapsConf - }); - - // Customize GrapesJS -> add close button with save for Mautic - panelManager = editor.Panels; - panelManager.addButton('views', [ - { - id: 'close', - className: 'fa fa-times-circle', - attributes: {title: 'Close'}, - command: function () { - Mautic.grapesConvertDynamicContentSlotsToTokens(editor); - - // Update textarea for save - fullHtml.body.innerHTML = editor.getHtml() + ''; - textareaHtml.val(fullHtml.documentElement.outerHTML); - - // Reset HTML - mQuery('.builder').removeClass('builder-active').addClass('hide'); - mQuery('html').css('font-size', ''); - mQuery('body').css('overflow-y', ''); - - // Destroy GrapesJS - editor.destroy(); - } - } - ]); - } else if (object === 'emailform') { - let textareaMjml = mQuery('textarea.builder-mjml'); - - if (textareaMjml.val().length) { // EmailBuilder -> MJML - editor = grapesjs.init({ - clearOnRender: true, - container: '.builder-panel', - components: textareaMjml.val(), - height: '100%', - storageManager: false, - assetManager: assetManagerConf, - - plugins: ['grapesjs-mjml', 'grapesjs-parser-postcss', 'grapesjs-preset-mautic'], - pluginsOpts: { - 'grapesjs-mjml': {}, - 'grapesjs-preset-mautic': presetMauticConf - }, - keymaps: keymapsConf - }); - - editor.BlockManager.get('mj-button').set({ - content: "Button", - }); - - // Customize GrapesJS -> add close button with save for Mautic - panelManager = editor.Panels; - panelManager.addButton('views', [ - { - id: 'close', - className: 'fa fa-times-circle', - attributes: {title: 'Close'}, - command: function () { - Mautic.grapesConvertDynamicContentSlotsToTokens(editor); - - let code = ''; - - // Try catch for mjml parser error - try { - code = editor.runCommand('mjml-get-code'); - } catch(error) { - console.log(error.message); - alert('Errors inside your template. Template will not be saved.'); - } - - // Update textarea for save - if (!code.length) { - textareaHtml.val(code.html); - textareaMjml.val(editor.getHtml()); - } - - // Reset HTML - mQuery('.builder').removeClass('builder-active').addClass('hide'); - mQuery('html').css('font-size', ''); - mQuery('body').css('overflow-y', ''); - - // Destroy GrapesJS - editor.destroy(); - } - } - ]); - } else { // EmailBuilder -> HTML - // Parse HTML template - let parser = new DOMParser(); - let fullHtml = parser.parseFromString(textareaHtml.val(), "text/html"); - - // Extract body - let body = fullHtml.body.innerHTML; - - // Launch GrapesJS with body part - editor = grapesjs.init({ - clearOnRender: true, - container: '.builder-panel', - components: body, - height: '100%', - storageManager: false, - assetManager: assetManagerConf, - - plugins: ['gjs-preset-newsletter', 'grapesjs-parser-postcss', 'grapesjs-preset-mautic'], - pluginsOpts: { - 'gjs-preset-newsletter': {}, - 'grapesjs-preset-mautic': presetMauticConf - }, - keymaps: keymapsConf - }); - - editor.BlockManager.get('button').set({ - content: "\n" + - "Button\n" + - "", - }) - - - // Customize GrapesJS -> add close button with save for Mautic - panelManager = editor.Panels; - panelManager.addButton('views', [ - { - id: 'close', - className: 'fa fa-times-circle', - attributes: {title: 'Close'}, - command: function () { - Mautic.grapesConvertDynamicContentSlotsToTokens(editor); - - // Update textarea for save - fullHtml.body.innerHTML = editor.runCommand('gjs-get-inlined-html'); - textareaHtml.val(fullHtml.documentElement.outerHTML); - - // Reset HTML - mQuery('.builder').removeClass('builder-active').addClass('hide'); - mQuery('html').css('font-size', ''); - mQuery('body').css('overflow-y', ''); - - // Destroy GrapesJS - editor.destroy(); - } - } - ]); - } - } - - editor.on('load', (response) => { - const um = editor.UndoManager; - - Mautic.grapesConvertDynamicContentTokenToSlot(editor); - - // Clear stack of undo/redo - um.clear(); - }); - - editor.on('component:add', (component) => { - let type = component.get('type'); - - // Create dynamic-content on Mautic side - if (type === 'dynamic-content') { - manageDynamicContentTokenToSlot(component); - } - }); - - editor.on('component:remove', (component) => { - let type = component.get('type'); - - // Delete dynamic-content on Mautic side - if (type === 'dynamic-content') { - deleteDynamicContentItem(component); - } - }); - - const keymaps = editor.Keymaps; - let allKeymaps; - - editor.on('modal:open', () => { - // Save all keyboard shortcuts - allKeymaps = Object.assign({}, keymaps.getAll()); - - // Remove keyboard shortcuts to prevent launch behind popup - keymaps.removeAll(); - }); - - editor.on('modal:close', () => { - const commands = editor.Commands; - const cmdCodeEdit = 'preset-mautic:code-edit'; - const cmdDynamicContent = 'preset-mautic:dynamic-content'; - - // Launch preset-mautic:code-edit command stop - if (commands.isActive(cmdCodeEdit)) { - commands.stop(cmdCodeEdit, {editor}); - } - - // Launch preset-mautic:dynamic-content command stop - if (commands.isActive(cmdDynamicContent)) { - commands.stop(cmdDynamicContent, {editor}); - } - - // ReMap keyboard shortcuts on modal close - Object.keys(allKeymaps).map(function(objectKey) { - let shortcut = allKeymaps[objectKey]; - - keymaps.add(shortcut.id, shortcut.keys, shortcut.handler); - }); - - let modalContent = editor.Modal.getContentEl().querySelector('#dynamic-content-popup'); - - // On modal close -> move editor within Mautic - if (modalContent !== null) { - let dynamicContentContainer = mQuery('#dynamicContentContainer'); - let content = mQuery(modalContent).contents().first(); - - dynamicContentContainer.append(content.detach()); - } - }); - - editor.on('asset:add', (response) => { - // Save assets list in textarea to keep new uploaded files without reload page - textareaAssets.val(JSON.stringify(getAssetsList(editor))); - }); - - editor.on('asset:remove', (response) => { - // Save assets list in textarea to keep new deleted files without reload page - textareaAssets.val(JSON.stringify(getAssetsList(editor))); - - // Delete file on server - mQuery.ajax({ - url: textareaAssets.data('delete'), - data: {'filename': response.getFilename()} - }); - }); -}; +function launchBuilderGrapesjs(formName) { + // Parse HTML template + const parser = new DOMParser(); + const textareaHtml = mQuery('textarea.builder-html'); + const textareaAssets = mQuery('textarea#grapesjsbuilder_assets'); + const fullHtml = parser.parseFromString(textareaHtml.val(), 'text/html'); + + const canvasContent = fullHtml.body.innerHTML + ? fullHtml.body.innerHTML + : mQuery('textarea.builder-mjml').val(); + + const assets = textareaAssets.val() ? JSON.parse(textareaAssets.val()) : []; + + const builder = new BuilderService( + canvasContent, + assets, + textareaAssets.data('upload'), + textareaAssets.data('delete') + ); + + Mautic.showChangeThemeWarning = true; + + // Prepare HTML + mQuery('html').css('font-size', '100%'); + mQuery('body').css('overflow-y', 'hidden'); + mQuery('.builder-panel').css('padding', 0); + mQuery('.builder-panel').css('display', 'block'); + mQuery('.builder').addClass('builder-active').removeClass('hide'); + + // Initialize GrapesJS + builder.initGrapesJS(formName); +} /** * Set theme's HTML * * @param theme */ -Mautic.setThemeHtml = function(theme) { - setupButtonLoadingIndicator(true); - - // Load template and fill field - mQuery.ajax({ - url: mQuery('#builder_url').val(), - data: 'template=' + theme, - dataType: 'json', - success: function (response) { - let textareaHtml = mQuery('textarea.builder-html'); - let textareaMjml = mQuery('textarea.builder-mjml'); - - textareaHtml.val(response.templateHtml); - - if (typeof textareaMjml !== 'undefined') { - textareaMjml.val(response.templateMjml); - - // If MJML template, generate HTML before save - if (!textareaHtml.val().length && textareaMjml.val().length) { - mjmlToHtml(textareaMjml, textareaHtml); - } - } - }, - error: function (request, textStatus, errorThrown) { - console.log("setThemeHtml - Request failed: " + textStatus); - }, - complete: function() { - setupButtonLoadingIndicator(false); - } - }); -}; - -/** - * Init GrapesJS to generate HTML - * - * @param source - Textarea where MJML is stored - * @param destination - Textarea where HTML will be stored - * @param container - Invisible container to init GrapesJS - */ -let mjmlToHtml = function (source, destination, container) { - if (typeof(container) === 'undefined' ) { - container = '.builder-panel'; - } - - let code = ''; - editor = grapesjs.init({ - clearOnRender: true, - container: container, - components: source.val(), - storageManager: false, - panels: {defaults: []}, - - plugins: ['grapesjs-mjml', 'grapesjs-parser-postcss'], - pluginsOpts: { - 'grapesjs-mjml': {} - } - }); - - // Try catch for MJML parser error - try { - code = editor.runCommand('mjml-get-code'); - } catch (error) { - console.log(error.message); - alert('Errors inside your template. Template will not be saved.'); - } - - // Set result to destination - if (!code.length) { - destination.val(code.html); - } - - // Destroy GrapesJS - editor.destroy(); -}; - -/** - * Manage button loading indicator - * - * @param activate - true or false - */ -let setupButtonLoadingIndicator = function (activate) { - let builderButton = mQuery('.btn-builder'); - let saveButton = mQuery('.btn-save'); - let applyButton = mQuery('.btn-apply'); - - if (activate) { - Mautic.activateButtonLoadingIndicator(builderButton); - Mautic.activateButtonLoadingIndicator(saveButton); - Mautic.activateButtonLoadingIndicator(applyButton); - } else { - Mautic.removeButtonLoadingIndicator(builderButton); - Mautic.removeButtonLoadingIndicator(saveButton); - Mautic.removeButtonLoadingIndicator(applyButton); - } -}; - -/** - * Generate assets list from GrapesJs - * - * @param editor - */ -let getAssetsList = function(editor) { - let assetManager = editor.AssetManager; - let assets = assetManager.getAll(); - let assetsList = []; - - assets.forEach(asset => { - if (asset.get('type') === 'image') { - assetsList.push({'src': asset.get('src'), 'width': asset.get('width'), 'height': asset.get('height')}); - } else { - assetsList.push(asset.get('src')); - } - }); - - return assetsList; -}; - -/** - * Convert dynamic content tokens to slot and load content - * - * @param editor - */ -Mautic.grapesConvertDynamicContentTokenToSlot = function(editor) { - const dc = editor.DomComponents; - - let dynamicContents = dc.getWrapper().find('[data-slot="dynamicContent"]'); - - if (dynamicContents.length) { - dynamicContents.forEach(dynamicContent => { - manageDynamicContentTokenToSlot(dynamicContent); - }); - } -}; - -/** - * Convert dynamic content slots to tokens - * - * @param editor - */ -Mautic.grapesConvertDynamicContentSlotsToTokens = function (editor) { - const dc = editor.DomComponents; - - let dynamicContents = dc.getWrapper().find('[data-slot="dynamicContent"]'); - - if (dynamicContents.length) { - dynamicContents.forEach(dynamicContent => { - let attributes = dynamicContent.getAttributes(); - let decId = attributes['data-param-dec-id']; - - // If it's not a token -> convert to token - if (decId !== '') { - let dynConId = '#emailform_dynamicContent_' + attributes['data-param-dec-id']; - - let dynConTarget = mQuery(dynConId); - let dynConName = dynConTarget.find(dynConId + '_tokenName').val(); - let dynConToken = '{dynamiccontent="'+dynConName+'"}'; - - // Clear id because it's reloaded by Mautic and this prevent slot to be destroyed by GrapesJs destroy event on close. - dynamicContent.addAttributes({'data-param-dec-id': ''}); - dynamicContent.set('content', dynConToken); - } - }); - } -}; +function setThemeHtml(theme) { + BuilderService.setupButtonLoadingIndicator(true); + // Load template and fill field + mQuery.ajax({ + url: mQuery('#builder_url').val(), + data: `template=${theme}`, + dataType: 'json', + success(response) { + const textareaHtml = mQuery('textarea.builder-html'); + const textareaMjml = mQuery('textarea.builder-mjml'); + + textareaHtml.val(response.templateHtml); + + if (typeof textareaMjml !== 'undefined') { + textareaMjml.val(response.templateMjml); + } + + // If MJML template, generate HTML before save + // if (!textareaHtml.val().length && textareaMjml.val().length) { + // builder.mjmlToHtml(textareaMjml, textareaHtml); + // } + // } + }, + error(request, textStatus) { + console.log(`setThemeHtml - Request failed: ${textStatus}`); + }, + complete() { + BuilderService.setupButtonLoadingIndicator(false); + }, + }); +} /** - * Delete DC on Mautic side - * - * @param component + * Initialize original Mautic theme selection with grapejs specific modifications */ -let deleteDynamicContentItem = function (component) { - let attributes = component.getAttributes(); - - // Only delete if we click on trash, not when GrapesJs is destroy - if (attributes['data-param-dec-id'] !== '') { - let dynConId = '#emailform_dynamicContent_' + attributes['data-param-dec-id']; - let dynConTarget = mQuery(dynConId); - - if (typeof dynConTarget !== 'undefined') { - dynConTarget.find('a.remove-item:first').click(); - // remove vertical tab in outside form - mQuery('.dynamicContentFilterContainer').find('a[href=' + dynConId + ']').parent().remove(); - } +function initSelectThemeGrapesjs(parentInitSelectTheme) { + function childInitSelectTheme(themeField) { + const builderUrl = mQuery('#builder_url'); + let url; + + // Replace Mautic URL by plugin URL + if (builderUrl.length) { + if (builderUrl.val().indexOf('pages') !== -1) { + url = builderUrl.val().replace('s/pages/builder', 's/grapesjsbuilder/page'); + } else { + url = builderUrl.val().replace('s/emails/builder', 's/grapesjsbuilder/email'); + } + + builderUrl.val(url); } -}; - -let manageDynamicContentTokenToSlot = function (component) { - const regex = RegExp(/\{dynamiccontent="(.*)"\}/,'g'); - - let content = component.get('content'); - let regexEx = regex.exec(content); - if (regexEx !== null) { - let dynConName = regexEx[1]; - let dynConTab = mQuery('#dynamicContentTabs a').filter(function() { - return mQuery(this).text().trim() === dynConName; - }); - - if (typeof dynConTab !== 'undefined' && dynConTab.length) { // If exist -> fill - let dynConTarget = dynConTab.attr('href'); - let dynConContent = ''; - - if (mQuery(dynConTarget).html()) { - let dynConContainer = mQuery(dynConTarget).find(dynConTarget + '_content'); - - if (dynConContainer.hasClass('editor')) { - dynConContent = dynConContainer.froalaEditor('html.get'); - } else { - dynConContent = dynConContainer.html(); - } - } - - if (dynConContent === '') { - dynConContent = dynConTab.text(); - } - - component.addAttributes({'data-param-dec-id': parseInt(dynConTarget.replace(/[^0-9]/g, ''))}); - component.set('content', dynConContent); - } else { // If doesn't exist -> create - let dynConTarget = Mautic.createNewDynamicContentItem(mQuery); - let dynConTab = mQuery('#dynamicContentTabs').find('a[href="'+dynConTarget+'"]'); - - component.addAttributes({'data-param-dec-id': parseInt(dynConTarget.replace(/[^0-9]/g, '')) }); - component.set('content', dynConTab.text()); - } - } -}; + // Launch original Mautic.initSelectTheme function + parentInitSelectTheme(themeField); + } + return childInitSelectTheme; +} + +Mautic.grapesConvertDynamicContentTokenToSlot = + BuilderService.grapesConvertDynamicContentTokenToSlot; +Mautic.grapesConvertDynamicContentSlotsToTokens = + BuilderService.grapesConvertDynamicContentSlotsToTokens; +Mautic.manageDynamicContentTokenToSlot = BuilderService.manageDynamicContentTokenToSlot; +Mautic.launchBuilder = launchBuilderGrapesjs; +Mautic.initSelectTheme = initSelectThemeGrapesjs(Mautic.initSelectTheme); +Mautic.setThemeHtml = setThemeHtml; diff --git a/Assets/library/js/builder.service.js b/Assets/library/js/builder.service.js new file mode 100644 index 00000000000..0b3e8c8ed58 --- /dev/null +++ b/Assets/library/js/builder.service.js @@ -0,0 +1,535 @@ +import grapesjs from 'grapesjs'; +import grapesjsmjml from 'grapesjs-mjml'; +import grapesjsnewsletter from 'grapesjs-preset-newsletter'; +import grapesjswebpage from 'grapesjs-preset-webpage'; +import grapesjspostcss from 'grapesjs-parser-postcss'; +import grapesjsmautic from 'grapesjs-preset-mautic/src'; + +export default class BuilderService { + presetMauticConf; + + editor; + + // components that are on the canvas + canvasContent; + + assets; + + uploadPath; + + deletePath; + + constructor(content, assets, uploadPath, deletePath) { + if (!content) { + throw Error('No HTML or MJML content found'); + } + if (!uploadPath) { + throw Error('No uploadPath found'); + } + if (!deletePath) { + throw Error('No deletePath found'); + } + if (!assets || !assets[0]) { + console.warn('no assets'); + } + this.canvasContent = content; + this.assets = assets; + this.uploadPath = uploadPath; + this.deletePath = deletePath; + } + + /** + * Initialize GrapesJsBuilder + * + * @param object + */ + setListeners() { + if (!this.editor) { + throw Error('No editor found'); + } + + this.editor.on('run:mautic-editor-email-mjml-close:before', () => { + mQuery('textarea.builder-html').val(this.canvasContent); + }); + + this.editor.on('load', () => { + const um = this.editor.UndoManager; + + this.constructor.grapesConvertDynamicContentTokenToSlot(this.editor); + + // Clear stack of undo/redo + um.clear(); + }); + + this.editor.on('component:add', (component) => { + const type = component.get('type'); + + // Create dynamic-content on Mautic side + if (type === 'dynamic-content') { + this.constructor.manageDynamicContentTokenToSlot(component); + } + }); + + this.editor.on('component:remove', (component) => { + const type = component.get('type'); + + // Delete dynamic-content on Mautic side + if (type === 'dynamic-content') { + this.deleteDynamicContentItem(component); + } + }); + + const keymaps = this.editor.Keymaps; + let allKeymaps; + + this.editor.on('modal:open', () => { + // Save all keyboard shortcuts + allKeymaps = { ...keymaps.getAll() }; + + // Remove keyboard shortcuts to prevent launch behind popup + keymaps.removeAll(); + }); + + this.editor.on('modal:close', () => { + const commands = this.editor.Commands; + const cmdCodeEdit = 'preset-mautic:code-edit'; + const cmdDynamicContent = 'preset-mautic:dynamic-content'; + + // Launch preset-mautic:code-edit command stop + if (commands.isActive(cmdCodeEdit)) { + commands.stop(cmdCodeEdit, { editor: this.editor }); + } + + // Launch preset-mautic:dynamic-content command stop + if (commands.isActive(cmdDynamicContent)) { + commands.stop(cmdDynamicContent, { editor: this.editor }); + } + + // ReMap keyboard shortcuts on modal close + Object.keys(allKeymaps).map((objectKey) => { + const shortcut = allKeymaps[objectKey]; + + keymaps.add(shortcut.id, shortcut.keys, shortcut.handler); + return keymaps; + }); + + const modalContent = mQuery('#dynamic-content-popup'); + + // On modal close -> move editor within Mautic + if (modalContent) { + const dynamicContentContainer = mQuery('#dynamicContentContainer'); + const content = mQuery(modalContent).contents().first(); + + dynamicContentContainer.append(content.detach()); + } + }); + + this.editor.on('asset:remove', (response) => { + // Delete file on server + mQuery.ajax({ + url: this.deletePath, + data: { filename: response.getFilename() }, + }); + }); + } + + initGrapesJS(object) { + // disable mautic global shortcuts + Mousetrap.reset(); + + if (object === 'page') { + this.editor = this.initPage(); + } else if (object === 'emailform') { + if (this.canvasContent && this.canvasContent.indexOf('') !== -1) { + this.editor = this.initEmailMjml(); + } else { + this.editor = this.initEmailHtml(); + } + } else { + throw Error(`not supported builder type: ${object}`); + } + + this.addMauticCommands(); + this.setListeners(); + } + + setPresetMauticConf() { + this.presetMauticConf = { + sourceEditBtnLabel: Mautic.translate('grapesjsbuilder.sourceEditBtnLabel'), + sourceCancelBtnLabel: Mautic.translate('grapesjsbuilder.sourceCancelBtnLabel'), + sourceEditModalTitle: Mautic.translate('grapesjsbuilder.sourceEditModalTitle'), + deleteAssetConfirmText: Mautic.translate('grapesjsbuilder.deleteAssetConfirmText'), + categorySectionLabel: Mautic.translate('grapesjsbuilder.categorySectionLabel'), + categoryBlockLabel: Mautic.translate('grapesjsbuilder.categoryBlockLabel'), + dynamicContentBlockLabel: Mautic.translate('grapesjsbuilder.dynamicContentBlockLabel'), + dynamicContentBtnLabel: Mautic.translate('grapesjsbuilder.dynamicContentBtnLabel'), + dynamicContentModalTitle: Mautic.translate('grapesjsbuilder.dynamicContentModalTitle'), + }; + } + + initPage() { + // Launch GrapesJS with body part + this.editor = grapesjs.init({ + clearOnRender: true, + container: '.builder-panel', + components: this.canvasContent, + height: '100%', + storageManager: false, // https://grapesjs.com/docs/modules/Storage.html#basic-configuration + assetManager: this.getAssetManagerConf(), + styleManager: { + clearProperties: true, // Temp fix https://github.com/artf/grapesjs-preset-webpage/issues/27 + }, + plugins: [grapesjswebpage, grapesjspostcss, grapesjsmautic], + pluginsOpts: { + [grapesjswebpage]: { + formsOpts: false, + }, + grapesjsmautic: this.presetMauticConf, + }, + }); + + // Customize GrapesJS -> add close button with save for Mautic + this.getCloseButton('mautic-editor-page-html-close'); + return this.editor; + } + + initEmailMjml() { + // EmailBuilder -> MJML + this.editor = grapesjs.init({ + clearOnRender: true, + container: '.builder-panel', + components: this.canvasContent, + height: '100%', + storageManager: false, + assetManager: this.getAssetManagerConf(), + + plugins: [grapesjsmjml, grapesjspostcss, grapesjsmautic], + pluginsOpts: { + grapesjsmjml: {}, + grapesjsmautic: this.presetMauticConf, + }, + }); + + this.editor.BlockManager.get('mj-button').set({ + content: 'Button', + }); + + this.getCloseButton('mautic-editor-email-mjml-close'); + return this.editor; + } + + initEmailHtml() { + // Launch GrapesJS with body part + this.editor = grapesjs.init({ + clearOnRender: true, + container: '.builder-panel', + components: this.canvasContent, + height: '100%', + storageManager: false, + assetManager: this.getAssetManagerConf(), + + plugins: [grapesjsnewsletter, grapesjspostcss, grapesjsmautic], + pluginsOpts: { + grapesjsnewsletter: {}, + grapesjsmautic: this.presetMauticConf, + }, + }); + + // add a Mautic custom block Button + this.editor.BlockManager.get('button').set({ + content: + '\n' + + 'Button\n' + + '', + }); + + // Customize GrapesJS -> add close button with save for Mautic + this.getCloseButton('mautic-editor-email-html-close'); + return this.editor; + } + + /** + * Convert dynamic content slots to tokens + * Used in grapesjs-preset-mautic + * + * @param editor + */ + static grapesConvertDynamicContentSlotsToTokens(editor) { + const dc = editor.DomComponents; + + const dynamicContents = dc.getWrapper().find('[data-slot="dynamicContent"]'); + + if (dynamicContents.length) { + dynamicContents.forEach((dynamicContent) => { + const attributes = dynamicContent.getAttributes(); + const decId = attributes['data-param-dec-id']; + + // If it's not a token -> convert to token + if (decId !== '') { + const dynConId = `#emailform_dynamicContent_${attributes['data-param-dec-id']}`; + + const dynConTarget = mQuery(dynConId); + const dynConName = dynConTarget.find(`${dynConId}_tokenName`).val(); + const dynConToken = `{dynamiccontent="${dynConName}"}`; + + // Clear id because it's reloaded by Mautic and this prevent slot to be destroyed by GrapesJs destroy event on close. + dynamicContent.addAttributes({ 'data-param-dec-id': '' }); + dynamicContent.set('content', dynConToken); + } + }); + } + } + + /** + * Add Mautic specific commands + */ + addMauticCommands() { + if (!this.editor) { + throw Error('No editor found'); + } + const parser = new DOMParser(); + const fullHtml = parser.parseFromString(this.canvasContent, 'text/html'); + const commands = this.editor.Commands; + + commands.add('mautic-editor-page-html-close', (editor) => { + if (!editor) { + throw new Error('no page-html editor'); + } + this.constructor.grapesConvertDynamicContentSlotsToTokens(editor); + + // Update textarea for save (part that is different from other modes) + fullHtml.body.innerHTML = `${editor.getHtml()}`; + mQuery('textarea.builder-html').val(fullHtml.documentElement.outerHTML); + + // Reset HTML + BuilderService.resetHtml(editor); + }); + + commands.add('mautic-editor-email-html-close', (editor) => { + if (!editor) { + throw new Error('no email-html editor'); + } + this.constructor.grapesConvertDynamicContentSlotsToTokens(editor); + + // Update textarea for save + fullHtml.body.innerHTML = editor.runCommand('gjs-get-inlined-html'); + mQuery('textarea.builder-html').val(fullHtml.documentElement.outerHTML); + + // Reset HTML + BuilderService.resetHtml(editor); + }); + + commands.add('mautic-editor-email-mjml-close', (editor) => { + if (!editor) { + throw new Error('no email-mjml editor'); + } + this.constructor.grapesConvertDynamicContentSlotsToTokens(editor); + + let code = ''; + + // Try catch for mjml parser error + try { + code = this.editor.runCommand('mjml-get-code'); + } catch (error) { + console.log(error.message); + alert('Errors inside your template. Template will not be saved.'); + } + + // Update textarea for save + if (!code.length) { + mQuery('textarea.builder-html').val(code.html); + mQuery('textarea.builder-mjml').val(editor.getHtml()); + } + + // Reset HTML + BuilderService.resetHtml(editor); + }); + } + + static manageDynamicContentTokenToSlot(component) { + const regex = RegExp(/\{dynamiccontent="(.*)"\}/, 'g'); + + const content = component.get('content'); + const regexEx = regex.exec(content); + + // abort if component does not contain a dynamic content element + if (regexEx === null) { + return null; + } + + const dynContenName = regexEx[1]; + const dynContentTabA = mQuery('#dynamicContentTabs a').filter( + () => mQuery(this).text().trim() === dynContenName + ); + + if (typeof dynContentTabA !== 'undefined' && dynContentTabA.length) { + // If dynamic content item exists -> fill + const dynContentTarget = dynContentTabA.attr('href'); + let dynConContent = ''; + + if (mQuery(dynContentTarget).html()) { + const dynConContainer = mQuery(dynContentTarget).find(`${dynContentTarget}_content`); + + if (dynConContainer.hasClass('editor')) { + dynConContent = dynConContainer.froalaEditor('html.get'); + } else { + dynConContent = dynConContainer.html(); + } + } + + if (dynConContent === '') { + dynConContent = dynContentTabA.text(); + } + + component.addAttributes({ + 'data-param-dec-id': parseInt(dynContentTarget.replace(/[^0-9]/g, ''), 10), + }); + component.set('content', dynConContent); + } else { + // If dynamic content item doesn't exist -> create + const dynConTarget = Mautic.createNewDynamicContentItem(mQuery); + const dynConTab = mQuery('#dynamicContentTabs').find(`a[href="${dynConTarget}"]`); + + component.addAttributes({ + 'data-param-dec-id': parseInt(dynConTarget.replace(/[^0-9]/g, ''), 10), + }); + component.set('content', dynConTab.text()); + } + return true; + } + + /** + * Convert dynamic content tokens to slot and load content + * Used in grapesjs-preset-mautic + */ + static grapesConvertDynamicContentTokenToSlot(editor) { + const dc = editor.DomComponents; + + const dynamicContents = dc.getWrapper().find('[data-slot="dynamicContent"]'); + + if (dynamicContents.length) { + dynamicContents.forEach((dynamicContent) => { + Mautic.manageDynamicContentTokenToSlot(dynamicContent); + }); + } + } + + static resetHtml(editor) { + mQuery('.builder').removeClass('builder-active').addClass('hide'); + mQuery('html').css('font-size', ''); + mQuery('body').css('overflow-y', ''); + + // Destroy GrapesJS + // workingn workaround: throws typeError: Cannot read property 'trigger' + // since editior is destroyed, command can not be stopped anymore + mQuery('.builder-panel').css('display', 'none'); + setTimeout(() => editor.destroy(), 1000); + // editor.destroy(); + } + + /** + * Add close button with save for Mautic + */ + getCloseButton(command) { + if (!command) { + throw new Error('no close button command'); + } + + this.editor.Panels.addButton('views', [ + { + id: 'close', + className: 'fa fa-times-circle', + attributes: { title: 'Close' }, + command, + }, + ]); + } + + /** + * Delete DC on Mautic side + * + * @param component + */ + static deleteDynamicContentItem(component) { + const attributes = component.getAttributes(); + + // Only delete if we click on trash, not when GrapesJs is destroy + if (attributes['data-param-dec-id'] !== '') { + const dynConId = `#emailform_dynamicContent_${attributes['data-param-dec-id']}`; + const dynConTarget = mQuery(dynConId); + + if (dynConTarget) { + dynConTarget.find('a.remove-item:first').click(); + // remove vertical tab in outside form + const dynCon = mQuery('.dynamicContentFilterContainer').find(`a[href=${dynConId}]`); + if (dynCon && dynCon.parent()) { + dynCon.parent().remove(); + } + } + } + } + + /** + * Manage button loading indicator + * + * @param activate - true or false + */ + static setupButtonLoadingIndicator(activate) { + const builderButton = mQuery('.btn-builder'); + const saveButton = mQuery('.btn-save'); + const applyButton = mQuery('.btn-apply'); + + if (activate) { + Mautic.activateButtonLoadingIndicator(builderButton); + Mautic.activateButtonLoadingIndicator(saveButton); + Mautic.activateButtonLoadingIndicator(applyButton); + } else { + Mautic.removeButtonLoadingIndicator(builderButton); + Mautic.removeButtonLoadingIndicator(saveButton); + Mautic.removeButtonLoadingIndicator(applyButton); + } + } + + /** + * Configure the Asset Manager for all modes + * @link https://grapesjs.com/docs/modules/Assets.html#configuration + */ + getAssetManagerConf() { + return { + assets: this.assets, + noAssets: Mautic.translate('grapesjsbuilder.assetManager.noAssets'), + upload: this.uploadPath, + uploadName: 'files', + multiUpload: 1, + embedAsBase64: false, + openAssetsOnDrop: 1, + autoAdd: 1, + headers: { 'X-CSRF-Token': mauticAjaxCsrf }, // global variable + }; + } + + /** + * Generate assets list from GrapesJs + */ + getAssetsList() { + const assetManager = this.editor.AssetManager; + const assets = assetManager.getAll(); + const assetsList = []; + + assets.forEach((asset) => { + if (asset.get('type') === 'image') { + assetsList.push({ + src: asset.get('src'), + width: asset.get('width'), + height: asset.get('height'), + }); + } else { + assetsList.push(asset.get('src')); + } + }); + + return assetsList; + } +} diff --git a/Assets/library/js/dist/builder.js b/Assets/library/js/dist/builder.js new file mode 100644 index 00000000000..2c68f15c00b --- /dev/null +++ b/Assets/library/js/dist/builder.js @@ -0,0 +1,35 @@ +parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c=0&&n<=i.b}}function N(t){return function(e){return null==e?void 0:e[t]}}var I=N("byteLength"),F=_(I),V=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/,R=i.r?function(t){return i.l?Object(i.l)(t)&&!j(t):F(t)&&V.test(i.t.call(t))}:L(!1),z=N("length");function H(t,e){e=function(t){for(var e={},n=t.length,r=0;r":">",'"':""","'":"'","`":"`"},Rt=Ft(Vt),zt=Ft(ct(Vt)),Ht=W.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},$t=/(.)^/,Ut={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Bt=/\\|'|\r|\n|\u2028|\u2029/g;function Wt(t){return"\\"+Ut[t]}function qt(t,e,n){!e&&n&&(e=n),e=pt({},e,W.templateSettings);var r,i=RegExp([(e.escape||$t).source,(e.interpolate||$t).source,(e.evaluate||$t).source].join("|")+"|$","g"),o=0,a="__p+='";t.replace(i,function(e,n,r,i,s){return a+=t.slice(o,s).replace(Bt,Wt),o=s+e.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),e}),a+="';\n",e.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(e.variable||"obj","_",a)}catch(t){throw t.source=a,t}var s=function(t){return r.call(this,t,W)},l=e.variable||"obj";return s.source="function("+l+"){\n"+a+"}",s}function Gt(t,e,n){var r=(e=wt(e)).length;if(!r)return x(n)?n.call(t):n;for(var i=0;i1)ne(s,e-1,n,r),i=r.length;else for(var l=0,c=s.length;le?(r&&(clearTimeout(r),r=null),s=c,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(l,u)),a};return c.cancel=function(){clearTimeout(r),s=0,r=i=o=null},c}function le(t,e,n){var r,i,a=function(e,n){r=null,n&&(i=t.apply(e,n))},s=o(function(o){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(a,e),s&&(i=t.apply(this,o))}else r=oe(a,e,this,o);return i});return s.cancel=function(){clearTimeout(r),r=null},s}function ce(t,e){return Qt(e,t)}function ue(t){return function(){return!t.apply(this,arguments)}}function de(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}function he(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function fe(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}var pe=Qt(fe,2);function ge(t,e,n){e=Mt(e,n);for(var r,i=$(t),o=0,a=i.length;o0?0:i-1;o>=0&&o0?s=a>=0?a:Math.max(a+l,s):l=a>=0?Math.min(a+1,l):a+l+1;else if(n&&a&&l)return r[a=n(r,o)]===o?a:-1;if(o!=o)return(a=e(i.q.call(r,s,l),A))>=0?a+s:-1;for(a=t>0?s:l-1;a>=0&&a0?0:a-1;for(i||(r=e[o?o[s]:s],s+=t);s>=0&&s=3;return e(t,Tt(n,i,4),r,o)}}var Pe=Te(1),Ee=Te(-1);function Me(t,e,n){var r=[];return e=Mt(e,n),ke(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r}function De(t,e,n){return Me(t,ue(Mt(e)),n)}function Ae(t,e,n){e=Mt(e,n);for(var r=!ee(t)&&$(t),i=(r||t).length,o=0;o=0}var Ne=o(function(t,e,n){var r,i;return x(e)?i=e:(e=wt(e),r=e.slice(0,-1),e=e[e.length-1]),je(t,function(t){var o=i;if(!o){if(r&&r.length&&(t=xt(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)})});function Ie(t,e){return je(t,jt(e))}function Fe(t,e){return Me(t,kt(e))}function Ve(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,l=(t=ee(t)?t:st(t)).length;so&&(o=r);else e=Mt(e,n),ke(t,function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)});return o}function Re(t,e,n){var r,i,o=1/0,a=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,l=(t=ee(t)?t:st(t)).length;sr||void 0===n)return 1;if(n1&&(r=Tt(r,e[1])),e=Y(t)):(r=Je,e=ne(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i1&&(n=e[1])):(e=je(ne(e,!1,!1),String),r=function(t,n){return!_e(e,n)}),Ze(t,r,n)});function tn(t,e,n){return i.q.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function en(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:tn(t,t.length-e)}function nn(t,e,n){return i.q.call(t,null==e||n?1:e)}function rn(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:nn(t,Math.max(0,t.length-e))}function on(t){return Me(t,Boolean)}function an(t,e){return ne(t,e,!1)}var sn=o(function(t,e){return e=ne(e,!0,!0),Me(t,function(t){return!_e(e,t)})}),ln=o(function(t,e){return sn(t,e)});function cn(t,e,n,r){c(e)||(r=n,n=e,e=!1),null!=n&&(n=Mt(n,r));for(var i=[],o=[],a=0,s=z(t);athis.length&&(i=this.length),i<0&&(i+=this.length+1);var o,a,s=[],l=[],c=[],u=[],d={},h=e.add,f=e.merge,p=e.remove,g=!1,v=this.comparator&&null==i&&!1!==e.sort,m=n.isString(this.comparator)?this.comparator:null;for(a=0;a7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(_,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash="#"+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),A.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!A.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;""!==t&&"?"!==t.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+t;if(t=this.decodeFragment(t.replace(N,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;e.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else t.hash="#"+e}}),e.history=new A,b.extend=y.extend=T.extend=C.extend=A.extend=function(t,e){var r,i=this;return r=t&&n.has(t,"constructor")?t.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,e),r.prototype=n.create(i.prototype,t),r.prototype.constructor=r,r.__super__=i.prototype,r};var I=function(){throw new Error('A "url" property or function must be specified')},F=function(t,e){var n=e.error;e.error=function(r){n&&n.call(e.context,t,r,e),t.trigger("error",t,r,e)}};return e}(a,n,t,e)}.apply(e,i))||(t.exports=o)}).call(this,n(26))},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){"use strict";n.d(e,"q",function(){return x}),n.d(e,"v",function(){return h}),n.d(e,"u",function(){return f}),n.d(e,"k",function(){return b}),n.d(e,"s",function(){return c}),n.d(e,"g",function(){return O}),n.d(e,"d",function(){return C}),n.d(e,"b",function(){return v}),n.d(e,"r",function(){return w}),n.d(e,"f",function(){return j}),n.d(e,"n",function(){return T}),n.d(e,"e",function(){return y}),n.d(e,"x",function(){return d}),n.d(e,"t",function(){return m}),n.d(e,"h",function(){return S}),n.d(e,"i",function(){return p}),n.d(e,"c",function(){return M}),n.d(e,"j",function(){return L}),n.d(e,"w",function(){return _}),n.d(e,"a",function(){return u}),n.d(e,"o",function(){return P}),n.d(e,"m",function(){return E}),n.d(e,"l",function(){return D}),n.d(e,"p",function(){return A});var r=n(8),i=n.n(r),o=n(7),a=n.n(o),s=n(0),l=window.Element.prototype,c=l.matches||l.webkitMatchesSelector||l.mozMatchesSelector||l.msMatchesSelector,u=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(s.isArray)(e)?a()(e):[e];if(r.length){var i=r.shift();if(i&&(!n.unique||!document.querySelector('link[href="'.concat(i,'"]')))){var o=document.head,l=document.createElement("link");l.href=i,l.rel="stylesheet",n.prepand?o.insertBefore(l,o.firstChild):o.appendChild(l)}t(r)}},d=function(t,e){var n={},r=Object(s.keys)(e);for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],a=e[i];r.indexOf(i)>=0?o!==a&&(n[i]=a):n[i]=null}for(var l in e)e.hasOwnProperty(l)&&Object(s.isUndefined)(t[l])&&(n[l]=e[l]);return n},h=function(t,e,n){e=e.split(/\s+/),t=t instanceof Array?t:[t];for(var r=function(r){t.forEach(function(t){return t.addEventListener(e[r],n)})},i=0;i1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0;if(isNaN(t))return n;if(t=parseFloat(t),Math.floor(t)!==t){var i=e.toString().split(".")[1];r=i?i.length:0}return r?parseFloat(t.toFixed(r)):t},b=function(t){return"draggable"in document.createElement("i")&&(t?t.get("Config").nativeDnD:1)},y=function(t){return Object(s.isElement)(t)||w(t)?t:t&&t.getEl?t.getEl():void 0},w=function(t){return t&&3===t.nodeType},x=function(t){return t&&!w(t)&&!function(t){return t&&8===t.nodeType}(t)},O=function(t,e){var n=t;return Object(s.isElement)(t)&&(n=e(t).data("model")),n},C=function(t){var e,n={top:0,left:0,width:0,height:0};if(!t)return n;if(w(t)){var r=document.createRange();r.selectNode(t),e=r.getBoundingClientRect(),r.detach()}return e||(t.getBoundingClientRect?t.getBoundingClientRect():n)},S=function(t){return t.touches&&t.touches[0]?t.touches[0]:t},k=function(t){return t.which||t.keyCode},j=function(t){return String.fromCharCode(k(t))},T=function(t){return 27===k(t)},P=function(t){return null!==t&&!Array.isArray(t)&&"object"===i()(t)},E=function(t){return Object.keys(t).length<=0},M=function(t){return t&&t.charAt(0).toUpperCase()+t.substring(1)},D=function(t){return t&&t.toHTML},A=function(t){return t&&t.toCSS},L=function(t){return t.__gjsv},_=function(t,e){t.__gjsv=e}},function(t,e,n){"use strict";(function(t){n.d(e,"e",function(){return r}),n.d(e,"p",function(){return i}),n.d(e,"a",function(){return o}),n.d(e,"c",function(){return a}),n.d(e,"d",function(){return s}),n.d(e,"o",function(){return l}),n.d(e,"q",function(){return c}),n.d(e,"t",function(){return u}),n.d(e,"i",function(){return d}),n.d(e,"r",function(){return h}),n.d(e,"s",function(){return f}),n.d(e,"k",function(){return p}),n.d(e,"m",function(){return g}),n.d(e,"j",function(){return v}),n.d(e,"l",function(){return m}),n.d(e,"g",function(){return b}),n.d(e,"f",function(){return y}),n.d(e,"h",function(){return w}),n.d(e,"n",function(){return x}),n.d(e,"b",function(){return O});var r="1.12.0",i="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||Function("return this")()||{},o=Array.prototype,a=Object.prototype,s="undefined"!=typeof Symbol?Symbol.prototype:null,l=o.push,c=o.slice,u=a.toString,d=a.hasOwnProperty,h="undefined"!=typeof ArrayBuffer,f="undefined"!=typeof DataView,p=Array.isArray,g=Object.keys,v=Object.create,m=h&&ArrayBuffer.isView,b=isNaN,y=isFinite,w=!{toString:null}.propertyIsEnumerable("toString"),x=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],O=Math.pow(2,53)-1}).call(this,n(26))},function(t,e,n){"use strict";n.d(e,"b",function(){return S});var r=n(8),i=n.n(r),o=n(7),a=n.n(o),s=n(2),l=n.n(s),c=n(0),u=n(3),d=n(23),h=n(1),f=n.n(h),p=n(21),g=n(10),v=n(12);function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function b(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n=this.target,r=this.get("name");if(!Object(c.isUndefined)(t)){var i=t;if("false"===t?i=!1:"true"===t&&(i=!0),this.get("changeProp"))n.set(r,i,e);else{var o=b({},n.get("attributes"));o[r]=i,n.set("attributes",o,e)}}},setValueFromInput:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={value:t};this.set(r,b(b({},n),{},{avoidStore:1})),e&&(this.set("value","",n),this.set(r,n))},getInitValue:function(){var t,e=this.target,n=this.get("name");if(e){var r=e.get("attributes");t=this.get("changeProp")?e.get(n):r[n]}return t||this.get("value")||this.get("default")}}),w=f.a.Collection.extend({model:y,initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.em=e.em||"",this.listenTo(this,"add",this.handleAdd),this.listenTo(this,"reset",this.handleReset)},handleReset:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).previousModels;(void 0===e?[]:e).forEach(function(t){return t.trigger("remove")})},handleAdd:function(t){var e=this.target;e&&(t.target=e)},setTarget:function(t){this.target=t},add:function(t,e){var n=this.em;if(Object(c.isString)(t)||Object(c.isArray)(t)){var r=n&&n.get&&n.get("TraitManager"),i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{build:function(e){var n=[];"string"==typeof e&&(e=[e]);for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(c.bindAll)(this,"__upSymbProps","__upSymbCls","__upSymbComps");var r=n.em,i=this.parent(),o=i&&i.attributes;if(o&&o.propagate){var a={},s=o.propagate;s.forEach(function(t){return a[t]=i.get(t)}),a.propagate=s,a=O(O({},a),e),this.set(a)}var l=this.get("propagate");l&&this.set("propagate",Object(c.isArray)(l)?l:[l]),n&&n.config&&n.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),n.em=r,this.opt=n,this.em=r,this.frame=n.frame,this.config=n.config||{},this.set("attributes",O(O({},this.defaults.attributes||{}),this.get("attributes")||{})),this.ccid=T.createId(this,n),this.initClasses(),this.initTraits(),this.initComponents(),this.initToolbar(),this.initScriptProps(),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:tagName",this.tagUpdated),this.listenTo(this,"change:attributes",this.attrUpdated),this.listenTo(this,"change:attributes:id",this._idUpdated),this.on("change:toolbar",this.__emitUpdateTlb),this.set("status",""),this.views=[],["classes","traits","components"].forEach(function(e){var n="add remove ".concat("components"!==e?"change":"");t.listenTo(t.get(e),n.trim(),function(){for(var n=arguments.length,r=new Array(n),i=0;i2&&void 0!==arguments[2]?arguments[2]:{},i=this.get("attributes"),o=i.class;o&&this.setClass(o),delete i.class;var a=i.style;a&&this.setStyle(a),delete i.style;var s=O({},this.previous("attributes")),l=Object(u.x)(s,this.get("attributes"));Object(c.keys)(l).forEach(function(t){return n.trigger("change:attributes:".concat(t),n,l[t],r)})},setAttributes:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.set("attributes",O({},t),e),this},addAttributes:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.setAttributes(O(O({},this.getAttributes({noClass:1})),t),e)},removeAttributes:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Array.isArray(t)?t:[t],r=this.getAttributes();return n.map(function(t){return delete r[t]}),this.setAttributes(r,e)},getStyle:function(){var t=this.em;if(t&&t.getConfig("avoidInlineStyle")){var e=t.get("state"),n=t.get("CssComposer").getIdRule(this.getId(),{state:e});if(this.rule=n,n)return n.getStyle()}return d.a.getStyle.call(this)},setStyle:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em,i=this.opt;if(r&&r.getConfig("avoidInlineStyle")&&!i.temporary){var o=this.get("style")||{};e=O(O({},e=Object(c.isString)(e)?this.parseStyle(e):e),o);var a=r.get("state"),s=r.get("CssComposer"),l=this.getStyle();this.rule=s.setIdRule(this.getId(),e,O(O({},n),{},{state:a}));var h=Object(u.x)(l,e);this.set("style","",{silent:1}),Object(c.keys)(h).forEach(function(e){return t.trigger("change:style:".concat(e))})}else e=d.a.setStyle.apply(this,arguments);return e},getAttributes:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.em,r=[],i=O({},this.get("attributes")),o=n&&n.get("SelectorManager"),a=this.getId();return e.noClass||(this.get("classes").forEach(function(t){return r.push(Object(c.isString)(t)?t:t.get("name"))}),r.length&&(i.class=r.join(" "))),Object(c.has)(i,"id")||(function(t){return t&&t.getConfig("avoidInlineStyle")}(n)?t=o&&o.get(a,o.Selector.TYPE_ID):Object(c.isEmpty)(this.getStyle())||(t=1),t&&(i.id=this.getId())),i},addClass:function(t){var e=this.em.get("SelectorManager").addClass(t);return this.get("classes").add(e)},setClass:function(t){return this.get("classes").reset(),this.addClass(t)},removeClass:function(t){var e=[];t=Object(c.isArray)(t)?t:[t];var n=this.get("classes"),r=g.a.TYPE_CLASS;return t.forEach(function(t){t.split(" ").forEach(function(t){var i=n.where({name:t,type:r})[0];i&&e.push(n.remove(i))})}),e},getClasses:function(){var t=this.getAttributes().class;return t?t.split(" "):[]},__logSymbol:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.__getSymbol(),i=this.__getSymbols();(r||i)&&this.em.log(t,{model:this,toUp:e,context:"symbols",opts:n})},__initSymb:function(){this.__symbReady||(this.on("change",this.__upSymbProps),this.__symbReady=1)},__isSymbol:function(){return Object(c.isArray)(this.get(k))},__isSymbolOrInst:function(){return!(!this.__isSymbol()&&!this.get(j))},__isSymbolTop:function(){var t=this.parent();return this.__isSymbolOrInst()&&(!t||t&&!t.__isSymbol()&&!t.__getSymbol())},__getAllById:function(){var t=this.em;return t?t.get("DomComponents").allById():{}},__getSymbol:function(){var t=this.get(j);if(t&&Object(c.isString)(t)){var e=this.__getAllById()[t];e?(t=e,this.set(j,e)):t=0}return t},__getSymbols:function(){var t=this,e=this.get(k);return e&&Object(c.isArray)(e)&&(e.forEach(function(n,r){n&&Object(c.isString)(n)&&(e[r]=t.__getAllById()[n])}),e=e.filter(function(t){return t&&!Object(c.isString)(t)})),e},__getSymbToUp:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.em,n=e&&e.get("symbols"),r=t.fromInstance,i=this.__getSymbols()||[],o=this.__getSymbol(),a=o&&!r?[o]:i.filter(function(t){return t.collection||t.prevColl});return r&&(a=a.filter(function(t){return t!==r})),n?a:[]},__getSymbTop:function(t){for(var e=this,n=this.parent(t);n&&(n.__isSymbol()||n.__getSymbol());)e=n,n=n.parent(t);return e},__upSymbProps:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.changedAttributes(),i=r.attributes||{};if(delete r.status,delete r.open,delete r[k],delete r[j],delete r.attributes,delete i.id,Object(u.m)(i)||(r.attributes=i),!Object(u.m)(r)){var o=this.__getSymbToUp(n);this.__logSymbol("props",o,{opts:n,changed:r}),o.forEach(function(t){return t.set(r,O({fromInstance:e},n))})}},__upSymbCls:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.__getSymbToUp();this.__logSymbol("classes",i,{opts:r}),i.forEach(function(t){t.set("classes",n.get("classes"),{fromInstance:n})})},__upSymbComps:function(t,e,n){var r=this,i={fromInstance:(n||e||{}).fromInstance},o=t.opt.temporary;if(n){if(n.add){var s=[],l=!!this.__getSymbols(),c=this.__getSymbToUp(i);if(c.length){var u=t.__getSymbol();s=(u?u.__getSymbols():t.__getSymbols())||[],(s=a()(s)).push(u||t)}!o&&this.__logSymbol("add",c,{opts:n,addedInstances:s.map(function(t){return t.cid}),added:t.cid}),c.forEach(function(e){var i=e.__getSymbTop(),o=s.filter(function(t){var e=t.__getSymbTop({prev:1});return i&&e&&e===i})[0]||t.clone({symbol:1,symbolInv:l});e.append(o,O({fromInstance:r},n))})}else if(!t.__isSymbolTop()){var d=t.__getSymbToUp(i);!o&&this.__logSymbol("remove",d,{opts:n,removed:t.cid}),d.forEach(function(e){var o=O({fromInstance:t},n);if(e.__isSymbolTop()&&e.__getSymbols()){var a=e.__getSymbToUp(O({fromInstance:t},i));r.__logSymbol("remove-inst",a,{opts:n,symbol:e}),a.forEach(function(t){t.remove(o)})}else e.remove(o)})}}else{var h=this.__getSymbToUp(i);this.__logSymbol("reset",h),h.forEach(function(n){var i=t.models.map(function(t){return t.clone({symbol:1})});n.components().reset(i,O({fromInstance:r},e))})}},initClasses:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.get("attributes").class||[],i=[this,"change:classes",this.initClasses],o=this.get("classes")||r,a=Object(c.isString)(o)?o.split(" "):o;this.stopListening.apply(this,i);var s=this.normalizeClasses(a),l=new v.a([]);return this.set("classes",l,n),l.add(s),l.on("add remove reset",this.__upSymbCls),this.listenTo.apply(this,i),this},initComponents:function(){var t=[this,"change:components",this.initComponents];this.stopListening.apply(this,t);var e=new p.a(null,this.opt);e.parent=this;var n=this.get("components"),r=!this.opt.avoidChildren;return this.set("components",e),r&&e.add(Object(c.isFunction)(n)?n(this):n,this.opt),e.on("add remove reset",this.__upSymbComps),this.listenTo.apply(this,t),this},initTraits:function(t){var e=this.em,n=[this,"change:traits",this.initTraits];this.stopListening.apply(this,n),this.loadTraits();var r=O({},this.get("attributes")),i=this.get("traits");return i.each(function(t){if(!t.get("changeProp")){var e=t.get("name"),n=t.getInitValue();e&&n&&(r[e]=n)}}),i.length&&this.set("attributes",r),this.listenTo.apply(this,n),t&&e&&e.trigger("component:toggled"),this},initScriptProps:function(){if(!this.opt.temporary){var t="script-props",e=["change:".concat(t),this.initScriptProps];this.off.apply(this,e);var n=this.previous(t)||[],r=this.get(t)||[],i=n.map(function(t){return"change:".concat(t)}).join(" "),o=r.map(function(t){return"change:".concat(t)}).join(" ");i&&this.off(i,this.__scriptPropsChange),o&&this.on(o,this.__scriptPropsChange),this.on.apply(this,e)}},__scriptPropsChange:function(t,e){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).avoidStore||this.trigger("rerender")},append:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(Object(c.isArray)(t)?t:[t]).map(function(t){return Object(c.isString)(t)||t.collection&&t.collection.remove(t,{temporary:1}),t}),r=this.components().add(n,e);return Object(c.isArray)(r)?r:[r]},components:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.get("components");return Object(c.isUndefined)(t)?n:(n.reset(null,e),t&&this.append(t,e))},empty:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.components().reset(null,t),this},parent:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.collection||t.prev&&this.prevColl;return e&&e.parent},scriptUpdated:function(){this.set("scriptUpdated",1)},initToolbar:function(){var t=this.em,e=t&&t.getConfig("stylePrefix")||"";if(!this.get("toolbar")){var n=[];this.collection&&n.push({attributes:{class:"fa fa-arrow-up"},command:function(t){return t.runCommand("core:component-exit",{force:1})}}),this.get("draggable")&&n.push({attributes:{class:"fa fa-arrows ".concat(e,"no-touch-actions"),draggable:!0},command:"tlb-move"}),this.get("copyable")&&n.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),this.get("removable")&&n.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),this.set("toolbar",n)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t=t||this.get("traits"),!((t=Object(c.isFunction)(t)?t(this):t)instanceof w)){var n=new w([],this.opt);n.setTarget(this),t.length&&(t.forEach(function(t){return t.attributes&&delete t.attributes.value}),n.add(t)),this.set("traits",n,e)}return this},getTrait:function(t){return this.get("traits").filter(function(e){return e.get("id")===t||e.get("name")===t})[0]},updateTrait:function(t,e){var n=this.em,r=this.getTrait(t);return r&&r.set(e),n&&n.trigger("component:toggled"),this},getTraitIndex:function(t){var e=this.getTrait(t);return e?this.get("traits").indexOf(e):-1},removeTrait:function(t){var e=this,n=this.em,r=(Object(c.isArray)(t)?t:[t]).map(function(t){return e.getTrait(t)}),i=this.get("traits").remove(r);return n&&n.trigger("component:toggled"),i},addTrait:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.em,r=this.get("traits").add(t,e);return n&&n.trigger("component:toggled"),r},normalizeClasses:function(t){var e=[],n=this.em,r=n&&n.get("SelectorManager");if(r)return t.models?a()(t.models):(t.forEach(function(t){return e.push(r.add(t))}),e)},clone:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.em,n=O({},this.attributes),r=O({},this.opt),i=this.getId(),o=e&&e.get("CssComposer");n.attributes=O({},n.attributes),delete n.attributes.id,n.components=[],n.classes=[],n.traits=[],this.__isSymbolTop()&&(t.symbol=1),this.get("components").each(function(e,r){n.components[r]=e.clone(O(O({},t),{},{_inner:1}))}),this.get("traits").each(function(t,e){n.traits[e]=t.clone()}),this.get("classes").each(function(t,e){n.classes[e]=t.get("name")}),n.status="",r.collection=null;var a=new this.constructor(n,r),s="#".concat(a.getId());(o?o.getRules("#".concat(i)):[]).forEach(function(t){var e=t.clone();e.set("selectors",[s]),o.getAll().add(e)}),a.unset(k);var l=this.__getSymbol(),c=this.__getSymbols();t.symbol||!l&&!c?l?(l.get(k).push(a),a.__initSymb()):t.symbol&&(this.__isSymbol()?(this.get(k).push(a),a.set(j,this),a.__initSymb()):t.symbolInv?(this.set(k,[a]),a.set(j,this),[this,a].map(function(t){return t.__initSymb()})):(a.set(k,[this]),[this,a].map(function(t){return t.__initSymb()}),this.set(j,a))):(a.unset(j),a.unset(k));var u="component:clone";return e&&e.trigger(u,a),this.trigger(u,a),a},getName:function(){var t=this.em,e=this.attributes,n=e.type,r=e.tagName,i=this.get("name"),o="div"==r,a=n||(o?"box":r),s=!n&&r&&!o&&r,l="domComponents.names.",c=i&&t&&t.t("".concat(l).concat(i)),d=s&&t&&t.t("".concat(l).concat(s)),h=t&&(t.t("".concat(l).concat(n))||t.t("".concat(l).concat(r)));return this.get("custom-name")||c||i||d||Object(u.c)(s)||h||Object(u.c)(a)},getIcon:function(){var t=this.get("icon");return t?t+" ":""},toHTML:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this,n=[],r=t.tag||e.get("tagName"),i=e.get("void"),o=t.attributes,a=this.getAttrToHTML();for(var s in delete t.tag,o&&(Object(c.isFunction)(o)?a=o(e,a)||{}:Object(c.isObject)(o)&&(a=o)),a){var l=a[s],u=Object(c.isString)(l)?l.replace(/"/g,"""):l;Object(c.isUndefined)(u)||(Object(c.isBoolean)(u)?u&&n.push(s):n.push("".concat(s,'="').concat(u,'"')))}var d=e.get("components"),h=d.length?"":e.get("content"),f=n.length?" ".concat(n.join(" ")):"",p="<".concat(r).concat(f).concat(i?"/":"",">").concat(h);return d.forEach(function(e){return p+=e.toHTML(t)}),!i&&(p+="")),p},getAttrToHTML:function(){var t=this.getAttributes();return delete t.style,t},toJSON:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=f.a.Model.prototype.toJSON.call(this,t);return e.attributes=this.getAttributes(),delete e.attributes.class,delete e.toolbar,delete e.traits,delete e.status,delete e.open,t.keepSymbols||(e[k]&&(e[k]=this.__getSymbToUp().map(function(t){return t.getId()})),e[j]&&(e[j]=e[j].getId())),this.em.getConfig("avoidDefaults")&&this.getChangedProps(e),e},getChangedProps:function(t){var e=t||f.a.Model.prototype.toJSON.apply(this),n=Object(c.result)(this,"defaults");return Object(c.forEach)(n,function(t,n){-1===["type"].indexOf(n)&&e[n]===t&&delete e[n]}),Object(c.isEmpty)(e.type)&&delete e.type,Object(c.forEach)(["attributes","style"],function(t){Object(c.isEmpty)(n[t])&&Object(c.isEmpty)(e[t])&&delete e[t]}),Object(c.forEach)(["classes","components"],function(t){(!e[t]||Object(c.isEmpty)(n[t])&&!e[t].length)&&delete e[t]}),e},getId:function(){return(this.get("attributes")||{}).id||this.ccid||this.cid},setId:function(t,e){var n=O({},this.get("attributes"));return n.id=t,this.set("attributes",n,e),this},getEl:function(t){var e=this.getView(t);return e&&e.el},getView:function(t){var e=this.view,n=this.views;return t&&(e=n.filter(function(e){return e._getFrame()===t.view})[0]),e},getCurrentView:function(){var t=(this.em.get("currentFrame")||{}).model;return this.getView(t)},__getScriptProps:function(){var t=this.props();return(this.get("script-props")||[]).reduce(function(e,n){return e[n]=t[n],e},{})},getScriptString:function(t){var e=this,n=t||this.get("script");if(!n)return n;if(this.get("script-props"))n=n.toString().trim();else{if("function"==typeof n){var r=n.toString().trim();n=(r=r.replace(/^function[\s\w]*\(\)\s?\{/,"").replace(/\}$/,"")).trim()}var o=this.em.getConfig(),a=C(o.tagVarStart||"{[ "),s=C(o.tagVarEnd||" ]}"),l=new RegExp("".concat(a,"([\\w\\d-]*)").concat(s),"g");n=n.replace(l,function(t,n){e.scriptUpdated();var r=e.attributes[n]||"";return Object(c.isArray)(r)||"object"==i()(r)?JSON.stringify(r):r})}return n},emitUpdate:function(t){for(var e=this.em,n="component:update"+(t?":".concat(t):""),r=arguments.length,i=new Array(r>1?r-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{},n=this.em,r=this.collection,i=function(){return r&&r.remove(t,e)},o=O({},e);return[this,n].map(function(e){return e.trigger("component:remove:before",t,i,o)}),!o.abort&&i(),this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.remove({temporary:1}),t&&t.append(this,e),this},resetId:function(){var t=this.em,e=this.getId();if(e){var n=T.createId(this);this.setId(n);var r=t&&t.get("CssComposer").getIdRule(e),i=r&&r.get("selectors").at(0);return i&&i.set("name",n),this}},_getStyleRule:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).id,e=this.em,n=t||this.getId();return e&&e.get("CssComposer").getIdRule(n)},_getStyleSelector:function(t){var e=this._getStyleRule(t);return e&&e.get("selectors").at(0)},_idUpdated:function(t,e){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).idUpdate){var n=this.ccid,r=(this.get("attributes")||{}).id,i=(this.previous("attributes")||{}).id||n,o=T.getList(this);if(o[r]||!r&&i)return this.setId(i,{idUpdate:1});delete o[i],o[r]=this,this.ccid=r;var a=this._getStyleSelector({id:i});a&&a.set({name:r,label:r})}}},{isComponent:function(t){return{tagName:t.tagName?t.tagName.toLowerCase():""}},ensureInList:function(t){var e=T.getList(t),n=t.getId(),r=e[n];if(r){if(r!==t){var i=T.getIncrementId(n,e);t.setId(i),e[i]=t}}else e[n]=t;t.components().forEach(function(t){return T.ensureInList(t)})},createId:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=T.getList(t),i=t.get("attributes").id;return i?(e=T.getIncrementId(i,r,n),t.setId(e)):e=T.getNewId(r),r[e]=t,e},getNewId:function(t){for(var e=Object.keys(t).length.toString().length+2,n=(Math.random()+1.1).toString(36).slice(-e),r="i".concat(n);t[r];)r=T.getNewId(t);return r},getIncrementId:function(t,e){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).keepIds,r=1,i=t;if((void 0===n?[]:n).indexOf(t)<0)for(;e[i];)r++,i="".concat(t,"-").concat(r);return i},getList:function(t){var e=t.opt&&t.opt.domc;return e?e.componentsById:{}},checkId:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=Object(c.isArray)(t)?t:[t],o=r.keepIds,a=void 0===o?[]:o;i.forEach(function(t){var i=t.attributes,o=void 0===i?{}:i,s=t.components,l=o.id;if(l&&n[l]&&a.indexOf(l)<0){var u=T.getIncrementId(l,n);o.id=u,Object(c.isArray)(e)&&e.forEach(function(t){var e=t.selectors;e.forEach(function(t,n){t==="#".concat(l)&&(e[n]="#".concat(u))})})}s&&T.checkId(s,e,n,r)})}});e.a=T},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(1),a=n.n(o),s=n(0),l=n(21),c=n(35),u=n(12),d=n(9),h=n(3);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function p(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=t.config||{},r=n.em,i=e.opt||{},o=this.$el,a=this.el;n.draggableComponents,this.opts=t,this.modelOpt=i,this.config=n,this.em=r||"",this.pfx=n.stylePrefix||"",this.ppfx=n.pStylePrefix||"",this.attr=e.get("attributes"),this.classe=this.attr.class||[],this.listenTo(e,"change:style",this.updateStyle),this.listenTo(e,"change:attributes change:_innertext",this.renderAttributes),this.listenTo(e,"change:highlightable",this.updateHighlight),this.listenTo(e,"change:status",this.updateStatus),this.listenTo(e,"change:script rerender",this.reset),this.listenTo(e,"change:content",this.updateContent),this.listenTo(e,"change",this.handleChange),this.listenTo(e,"active",this.onActive),this.listenTo(e,"disable",this.onDisable),o.data("model",e),Object(h.w)(a,this),e.view=this,this._getFrame()&&e.views.push(this),this.initClasses(),this.initComponents({avoidRender:1}),this.events=p(p({},this.events),this.__isDraggable()&&{dragstart:"handleDragStart"}),this.delegateEvents(),!i.temporary&&this.init(this._clbObj())},__isDraggable:function(){var t=this.model,e=this.config,n=t.attributes,r=n._innertext,i=n.draggable;return e.draggableComponents&&i&&!r},_clbObj:function(){var t=this.em,e=this.model,n=this.el;return{editor:t&&t.getEditor(),model:e,el:n}},init:function(){},removed:function(){},onActive:function(){},onDisable:function(){},remove:function(){var t=this;a.a.View.prototype.remove.apply(t,arguments);var e=t.model,n=(t._getFrame()||{}).model;e.components().forEach(function(t){var e=t.getView(n);e&&e.remove()});var r=e.views;return r.splice(r.indexOf(t),1),t.removed(t._clbObj()),t.$el.data({model:"",collection:"",view:""}),delete t.model,delete t.$el,delete t.el.__gjsv,delete t.childrenView,delete t.scriptContainer,delete t.opts,t},handleDragStart:function(t){t.preventDefault(),t.stopPropagation(),this.em.get("Commands").run("tlb-move",{target:this.model,event:t})},initClasses:function(){var t=this.model,e="change:classes",n=t.get("classes");n instanceof u.a&&(this.stopListening(t,e,this.initClasses),this.listenTo(t,e,this.initClasses),this.listenTo(n,"add remove change",this.updateClasses),n.length&&this.importClasses())},initComponents:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=this.$el,r=this.childrenView,i=e.get("components"),o=[e,"change:components",this.initComponents];i instanceof l.a&&(n.data("collection",i),r&&r.remove(),this.stopListening.apply(this,o),!t.avoidRender&&this.renderChildren(),this.listenTo.apply(this,o))},handleChange:function(){var t=this.model,e=Object(s.keys)(t.changed);if(1!==e.length||"status"!==e[0])for(var n in t.emitUpdate(),t.changed)t.emitUpdate(n)},importClasses:function(){var t=this.config.em.get("SelectorManager");t&&this.model.get("classes").each(function(e){t.add(e.get("name"))})},updateStatus:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(this.em,this.el),n=this.model.get("status"),r=(this.pfx,this.ppfx),i="".concat(r,"selected"),o="".concat(i,"-parent"),a="".concat(r,"freezed"),s="".concat(r,"hovered"),l=[i,o,a,s];this.$el.removeClass(l.join(" "));var c=e.getAttribute("class")||"",u="";switch(n){case"selected":u="".concat(c," ").concat(i);break;case"selected-parent":u="".concat(c," ").concat(o);break;case"freezed":u="".concat(c," ").concat(a);break;case"freezed-selected":u="".concat(c," ").concat(a," ").concat(i);break;case"hovered":u=t.avoidHover?"":"".concat(c," ").concat(s)}(u=u.trim())&&e.setAttribute("class",u)},updateHighlight:function(){var t=this.model.get("highlightable");this.setAttribute("data-highlightable",t?1:"")},updateStyle:function(){var t=this.model,e=this.em,n=this.el;if(e&&e.getConfig("avoidInlineStyle")){var r=t.getStyle(),i=Object(s.isEmpty)(r);!i&&t.setStyle(r),t.get("_innertext")&&i?n.removeAttribute("id"):n.id=t.getId()}else this.setAttribute("style",t.styleToString())},updateClasses:function(){var t=this.model.get("classes").pluck("name").join(" ");this.setAttribute("class",t),this.updateStatus()},setAttribute:function(t,e){var n=this.$el;e?n.attr(t,e):n.removeAttr(t)},getClasses:function(){return this.model.getClasses().join(" ")},updateAttributes:function(){var t=[],e=this.model,n=this.$el,r=this.el,i=(this.config,e.attributes),o=i.highlightable,a=i.textable,l=p(p(p({"data-gjs-type":i.type||"default"},this.__isDraggable()?{draggable:!0}:{}),o?{"data-highlightable":1}:{}),a?{contenteditable:"false","data-gjs-textable":"true"}:{});Object(s.each)(r.attributes,function(e){return t.push(e.nodeName)}),t.forEach(function(t){return n.removeAttr(t)});var c=p(p({},l),e.getAttributes());Object(s.keys)(c).forEach(function(t){return!1===c[t]&&delete c[t]}),n.attr(c),this.updateStyle()},updateContent:function(){var t=this.model.get("content"),e=this.model.components().length;this.getChildrenContainer().innerHTML=e?"":t},prevDef:function(t){t.preventDefault()},updateScript:function(){var t=this.model,e=this.em;t.get("script")&&e&&e.get("Canvas").getCanvasView().updateScript(this)},getChildrenContainer:function(){var t=this.el;return"function"==typeof this.getChildrenSelector?t=this.el.querySelector(this.getChildrenSelector()):this.getTemplate,t},getOffsetRect:function(){var t={},e=this.el,n=0,r=0;return function i(o){var a=o.offsetParent;a?(n+=a.offsetTop,r+=a.offsetLeft,i(a)):(t.top=e.offsetTop+n,t.left=e.offsetLeft+r,t.bottom=t.top+e.offsetHeight,t.right=t.left+e.offsetWidth)}(e),t},isInViewport:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).rect,e=this.el.ownerDocument,n=e.body,r=e.defaultView.frameElement,i=t||this.getOffsetRect(),o=i.top,a=i.left,s=this._getFrame().getOffsetRect();return o>=s.scrollTop&&a>=s.scrollLeft&&o<=s.scrollBottom&&a<=r.offsetWidth+n.scrollLeft},scrollIntoView:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.getOffsetRect();if(!this.isInViewport({rect:e})||t.force){var n=this.el;"smooth"!==t.behavior?n.ownerDocument.defaultView.scrollTo(0,e.top):n.scrollIntoView(p({behavior:"smooth",block:"nearest"},t))}},reset:function(){var t=this.el;this.el="",this._ensureElement(),this._setData(),Object(d.j)(t,this.el),this.render()},_setData:function(){var t=this.model,e=t.components();this.$el.data({model:t,collection:e,view:this})},_getFrame:function(){return this.config.frameView},renderChildren:function(){this.updateContent();var t=this.getChildrenContainer(),e=this.childrenView||new c.a({collection:this.model.get("components"),config:this.config,componentTypes:this.opts.componentTypes});e.render(t),this.childrenView=e;for(var n=Array.prototype.slice.call(e.el.childNodes),r=0,i=n.length;r=o?t.appendChild(e):t.insertBefore(e,i[a])},u=function(t,e){return c(t,e)},d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=document.createElement(t);return e&&Object(r.each)(e,function(t,e){return i.setAttribute(e,t)}),n&&(Object(r.isString)(n)?i.innerHTML=n:i.appendChild(n)),i},h=function(t,e){var n;try{n=new window[e](t.type,t)}catch(t){(n=document.createEvent(e)).initEvent(t.type,!0,!0)}return n.keyCodeVal=t.keyCode,n._parentEvent=t,["keyCode","which"].forEach(function(t){Object.defineProperty(n,t,{get:function(){return this.keyCodeVal}})}),n},f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(Array.isArray(e)?e:[e]).forEach(function(e){var n=e.tag||"div",i=e.attributes||{},o=document.createElement(n);Object(r.each)(i,function(t,e){o.setAttribute(e,t)}),t.appendChild(o)})}},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=n(0),a=i.a.Model,s=a.extend({idAttribute:"name",defaults:{name:"",label:"",type:1,active:!0,private:!1,protected:!1},initialize:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).config,n=void 0===e?{}:e,r=this.get("name"),i=this.get("label");r?i||this.set("label",r):this.set("name",i);var o=this.get("name"),a=n.escapeName,l=a?a(o):s.escapeName(o);this.set("name",l),this.em=n.em},isId:function(){return 2===this.get("type")},isClass:function(){return 1===this.get("type")},getFullName:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).escape,e=this.get("name"),n="";switch(this.get("type")){case 1:n=".";break;case 2:n="#"}return n+(t?t(e):e)},toJSON:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.em,n=a.prototype.toJSON.call(this,[t]),r=Object(o.result)(this,"defaults");if(e&&e.getConfig("avoidDefaults")){Object(o.forEach)(r,function(t,e){n[e]===t&&delete n[e]}),n.label===n.name&&delete n.label;var i=Object(o.keys)(n).length;1===i&&n.name&&(n=n.name),2===i&&n.name&&n.type&&(n=this.getFullName())}return n}},{TYPE_CLASS:1,TYPE_ID:2,escapeName:function(t){return"".concat(t).trim().replace(/([^a-z0-9\w-\:]+)/gi,"-")}});e.a=s},function(t,e,n){"use strict";n.r(e);var r=document,i=window,o=Array.prototype,a=o.filter,s=o.indexOf,l=o.map,c=o.push,u=o.reverse,d=o.slice,h=o.splice,f=/^#[\w-]*$/,p=/^\.[\w-]*$/,g=/<.+>/,v=/^\w+$/;function m(t,e){return void 0===e&&(e=r),p.test(t)?e.getElementsByClassName(t.slice(1)):v.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function b(t,e){if(void 0===e&&(e=r),t){if(t.__cash)return t;var n=t;if(P(t)){if(e.__cash&&(e=e[0]),!(n=f.test(t)?e.getElementById(t.slice(1)):g.test(t)?ht(t):m(t,e)))return}else if(T(t))return this.ready(t);(n.nodeType||n===i)&&(n=[n]),this.length=n.length;for(var o=0,a=this.length;o=0}):n.value=i})},w.clone=function(){return this.map(function(t,e){return e.cloneNode(!0)})},w.detach=function(){return this.each(function(t,e){e.parentNode&&e.parentNode.removeChild(e)})};var ct,ut=/^\s*<(\w+)[^>]*>/,dt=/^\s*<(\w+)\s*\/?>(?:<\/\1>)?\s*$/;function ht(t){if(function(){if(!ct){var t=r.createElement("table"),e=r.createElement("tr");ct={"*":r.createElement("div"),tr:r.createElement("tbody"),td:e,th:e,thead:t,tbody:t,tfoot:t}}}(),!P(t))return[];if(dt.test(t))return[r.createElement(RegExp.$1)];var e=ut.test(t)&&RegExp.$1,n=ct[e]||ct["*"];return n.innerHTML=t,y(n.childNodes).detach().get()}function ft(t,e,n){if(void 0!==e){var r=P(e);!r&&e.length?S(e,function(e){return ft(t,e,n)}):S(t,r?function(t){t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,r){return function(t,e,n){n?t.insertBefore(e,t.childNodes[0]):t.appendChild(e)}(t,r?e.cloneNode(!0):e,n)})}}y.parseHTML=ht,w.empty=function(){var t=this[0];if(t)for(;t.firstChild;)t.removeChild(t.firstChild);return this},w.append=function(){var t=this;return S(arguments,function(e){ft(t,e)}),this},w.appendTo=function(t){return ft(y(t),this),this},w.html=function(t){if(void 0===t)return this[0]&&this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each(function(t,n){n.innerHTML=e})},w.insertAfter=function(t){var e=this;return y(t).each(function(t,n){var r=n.parentNode;e.each(function(e,i){r.insertBefore(t?i.cloneNode(!0):i,n.nextSibling)})}),this},w.after=function(){var t=this;return S(u.apply(arguments),function(e){u.apply(y(e).slice()).insertAfter(t)}),this},w.insertBefore=function(t){var e=this;return y(t).each(function(t,n){var r=n.parentNode;e.each(function(e,i){r.insertBefore(t?i.cloneNode(!0):i,n)})}),this},w.before=function(){var t=this;return S(arguments,function(e){y(e).insertBefore(t)}),this},w.prepend=function(){var t=this;return S(arguments,function(e){ft(t,e,!0)}),this},w.prependTo=function(t){return ft(y(t),u.apply(this.slice()),!0),this},w.remove=function(){return this.detach().off()},w.replaceWith=function(t){var e=this;return this.each(function(n,r){var i=r.parentNode;if(i){var o=n?y(t).clone():y(t);if(!o[0])return e.remove(),!1;i.replaceChild(o[0],r),y(o[0]).after(o.slice(1))}})},w.replaceAll=function(t){return y(t).replaceWith(this),this},w.text=function(t){return void 0===t?this[0]?this[0].textContent:"":this.each(function(e,n){n.textContent=t})};var pt=r.documentElement;w.offset=function(){var t=this[0];if(t){var e=t.getBoundingClientRect();return{top:e.top+i.pageYOffset-pt.clientTop,left:e.left+i.pageXOffset-pt.clientLeft}}},w.offsetParent=function(){return y(this[0]&&this[0].offsetParent)},w.position=function(){var t=this[0];if(t)return{left:t.offsetLeft,top:t.offsetTop}},w.children=function(t){var e=[];return this.each(function(t,n){c.apply(e,n.children)}),e=y(_(e)),t?e.filter(function(e,n){return j(n,t)}):e},w.contents=function(){var t=[];return this.each(function(e,n){c.apply(t,"IFRAME"===n.tagName?[n.contentDocument]:n.childNodes)}),y(t.length&&_(t))},w.find=function(t){for(var e=[],n=0,r=this.length;n0&&void 0!==arguments[0]?arguments[0]:{}).noDisabled;return Object(r.filter)(this.models,function(t){return!t.get("private")}).filter(function(e){return t?e.get("active"):1})},getFullString:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return(t||this).forEach(function(t){return n.push(t.getFullName(e))}),n.join("").trim()}})},function(t,e,n){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),d=/Opera\//.test(t),h=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),p=/PhantomJS/.test(t),g=h&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),v=/Android/.test(t),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),b=g||/Mac/.test(e),y=/\bCrOS\b/.test(t),w=/win/i.test(e),x=d&&t.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,l=!0);var O=b&&(c||d&&(null==x||x<12.11)),C=n||a&&s>=9;function S(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var k,j=function(t,e){var n=t.className,r=S(e).exec(n);if(r){var i=n.slice(r.index+r[0].length);t.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function P(t,e){return T(t).appendChild(e)}function E(t,e,n,r){var i=document.createElement(t);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return a+(e-o);a+=s-o,a+=n-a%n,o=s+1}}g?N=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:a&&(N=function(t){try{t.select()}catch(t){}});var R=function(){this.id=null,this.f=null,this.time=0,this.handler=I(this.onTimeout,this)};function z(t,e){for(var n=0;n=e)return r+Math.min(a,e-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=e)return r}}var G=[""];function K(t){for(;G.length<=t;)G.push(Y(G)+" ");return G[t]}function Y(t){return t[t.length-1]}function X(t,e){for(var n=[],r=0;r"€"&&(t.toUpperCase()!=t.toLowerCase()||Q.test(t))}function et(t,e){return e?!!(e.source.indexOf("\\w")>-1&&tt(t))||e.test(t):tt(t)}function nt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var rt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function it(t){return t.charCodeAt(0)>=768&&rt.test(t)}function ot(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var i=(e+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+r}}var st=null;function lt(t,e,n){var r;st=null;for(var i=0;ie)return i;o.to==e&&(o.from!=o.to&&"before"==n?r=i:st=i),o.from==e&&(o.from!=o.to&&"before"!=n?r=i:st=i)}return null!=r?r:st}var ct=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(t,e,n){this.level=t,this.from=e,this.to=n}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!t.test(a))return!1;for(var c,u=a.length,d=[],h=0;h-1&&(r[e]=i.slice(0,o).concat(i.slice(o+1)))}}}function gt(t,e){var n=ft(t,e);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function yt(t){t.prototype.on=function(t,e){ht(this,t,e)},t.prototype.off=function(t,e){pt(this,t,e)}}function wt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function xt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ot(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ct(t){wt(t),xt(t)}function St(t){return t.target||t.srcElement}function kt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),b&&t.ctrlKey&&1==e&&(e=3),e}var jt,Tt,Pt=function(){if(a&&s<9)return!1;var t=E("div");return"draggable"in t||"dragDrop"in t}();function Et(t){if(null==jt){var e=E("span","​");P(t,E("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(jt=e.offsetWidth<=1&&e.offsetHeight>2&&!(a&&s<8))}var n=jt?E("span","​"):E("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Mt(t){if(null!=Tt)return Tt;var e=P(t,document.createTextNode("AخA")),n=k(e,0,1).getBoundingClientRect(),r=k(e,1,2).getBoundingClientRect();return T(t),!(!n||n.left==n.right)&&(Tt=r.right-n.right<3)}var Dt,At=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],r=t.length;e<=r;){var i=t.indexOf("\n",e);-1==i&&(i=t.length);var o=t.slice(e,"\r"==t.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),e+=a+1):(n.push(o),e=i+1)}return n}:function(t){return t.split(/\r\n?|\n/)},Lt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},_t="oncopy"in(Dt=E("div"))||(Dt.setAttribute("oncopy","return;"),"function"==typeof Dt.oncopy),Nt=null,It={},Ft={};function Vt(t){if("string"==typeof t&&Ft.hasOwnProperty(t))t=Ft[t];else if(t&&"string"==typeof t.name&&Ft.hasOwnProperty(t.name)){var e=Ft[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Vt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Vt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Rt(t,e){e=Vt(e);var n=It[e.name];if(!n)return Rt(t,"text/plain");var r=n(t,e);if(zt.hasOwnProperty(e.name)){var i=zt[e.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)r[a]=e.modeProps[a];return r}var zt={};function Ht(t,e){F(e,zt.hasOwnProperty(t)?zt[t]:zt[t]={})}function $t(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var i=e[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ut(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Bt(t,e,n){return!t.startState||t.startState(e,n)}var Wt=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function qt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(e=t.first&&en?te(n,qt(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?te(t.line,e):n<0?te(t.line,0):t}(e,qt(t,e.line).text.length)}function le(t,e){for(var n=[],r=0;r=this.string.length},Wt.prototype.sol=function(){return this.pos==this.lineStart},Wt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Wt.prototype.next=function(){if(this.pose},Wt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Wt.prototype.skipToEnd=function(){this.pos=this.string.length},Wt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Wt.prototype.backUp=function(t){this.pos-=t},Wt.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var i=function(t){return n?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},Wt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Wt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Wt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Wt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ce=function(t,e){this.state=t,this.lookAhead=e},ue=function(t,e,n,r){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function de(t,e,n,r){var i=[t.state.modeGen],o={};we(t,e.text,t.doc.mode,n,function(t,e){return i.push(t,e)},o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=t.state.overlays[r],l=1,c=0;n.state=!0,we(t,e.text,s.mode,n,function(t,e){for(var n=l;ct&&i.splice(l,1,t,i[l+1],r),l+=2,c=Math.min(t,r)}if(e)if(s.opaque)i.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&$t(t.doc.mode,r.state),o=de(t,e,r);i&&(r.state=i),e.stateAfter=r.save(!i),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function fe(t,e,n){var r=t.doc,i=t.display;if(!r.mode.startState)return new ue(r,!0,e);var o=function(t,e,n){for(var r,i,o=t.doc,a=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>a;--s){if(s<=o.first)return o.first;var l=qt(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ce?c.lookAhead:0)<=o.modeFrontier))return s;var u=V(l.text,null,t.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(t,e,n),a=o>r.first&&qt(r,o-1).stateAfter,s=a?ue.fromSaved(r,a,o):new ue(r,Bt(r.mode),o);return r.iter(o,e,function(n){pe(t,n.text,s);var r=s.line;n.stateAfter=r==e-1||r%5==0||r>=i.viewFrom&&re.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}ue.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ue.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ue.fromSaved=function(t,e,n){return e instanceof ce?new ue(t,$t(t.mode,e.state),n,e.lookAhead):new ue(t,$t(t.mode,e),n)},ue.prototype.save=function(t){var e=!1!==t?$t(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ce(e,this.maxLookAhead):e};var me=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function be(t,e,n,r){var i,o,a=t.doc,s=a.mode,l=qt(a,(e=se(a,e)).line),c=fe(t,e.line,n),u=new Wt(l.text,t.options.tabSize,c);for(r&&(o=[]);(r||u.post.options.maxHighlightLength?(s=!1,a&&pe(t,e,r,d.pos),d.pos=e.length,l=null):l=ye(ve(n,d,r.state,h),o),h){var f=h[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c=e:o.to>e);(r||(r=[])).push(new Ce(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(t,e,n){var r;if(t)for(var i=0;i=e:o.to>e)||o.from==e&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from0&&s)for(var y=0;ye)&&(!n||Ae(n,o.marker)<0)&&(n=o.marker)}return n}function Fe(t,e,n,r,i){var o=qt(t,e),a=Oe&&o.markedSpans;if(a)for(var s=0;s=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ee(c.to,n)>=0:ee(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ee(c.from,r)<=0:ee(c.from,r)<0)))return!0}}}function Ve(t){for(var e;e=_e(t);)t=e.find(-1,!0).line;return t}function Re(t,e){var n=qt(t,e),r=Ve(n);return n==r?e:Xt(r)}function ze(t,e){if(e>t.lastLine())return e;var n,r=qt(t,e);if(!He(t,r))return e;for(;n=Ne(r);)r=n.find(1,!0).line;return Xt(r)+1}function He(t,e){var n=Oe&&e.markedSpans;if(n)for(var r=void 0,i=0;ie.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}var qe=function(t,e,n){this.text=t,Ee(this,e),this.height=n?n(this):1};function Ge(t){t.parent=null,Pe(t)}qe.prototype.lineNo=function(){return Xt(this)},yt(qe);var Ke={},Ye={};function Xe(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?Ye:Ke;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Je(t,e){var n=M("span",null,null,l?"padding-right: .1px":null),r={pre:M("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var o=i?e.rest[i-1]:e.line,a=void 0;r.pos=0,r.addToken=Qe,Mt(t.display.measure)&&(a=ut(o,t.doc.direction))&&(r.addToken=tn(r.addToken,a)),r.map=[],nn(o,r,he(t,o,e!=t.display.externalMeasured&&Xt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=_(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=_(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Et(t.display.measure))),0==i?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return gt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=_(r.pre.className,r.textClass||"")),r}function Ze(t){var e=E("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Qe(t,e,n,r,i,o,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,r="",i=0;ic&&d.from<=c);h++);if(d.to>=u)return t(n,r,i,o,a,s,l);t(n,r.slice(0,d.to-c),i,o,null,s,l),o=null,r=r.slice(d.to-c),c=d.to}}}function en(t,e,n,r){var i=!r&&n.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!r&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function nn(t,e,n){var r=t.markedSpans,i=t.text,o=0;if(r)for(var a,s,l,c,u,d,h,f=i.length,p=0,g=1,v="",m=0;;){if(m==p){l=c=u=s="",h=null,d=null,m=1/0;for(var b=[],y=void 0,w=0;wp||O.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,c=""),O.className&&(l+=" "+O.className),O.css&&(s=(s?s+";":"")+O.css),O.startStyle&&x.from==p&&(u+=" "+O.startStyle),O.endStyle&&x.to==m&&(y||(y=[])).push(O.endStyle,x.to),O.title&&((h||(h={})).title=O.title),O.attributes)for(var C in O.attributes)(h||(h={}))[C]=O.attributes[C];O.collapsed&&(!d||Ae(d.marker,O)<0)&&(d=x)}else x.from>p&&m>x.from&&(m=x.from)}if(y)for(var S=0;S=f)break;for(var j=Math.min(f,m);;){if(v){var T=p+v.length;if(!d){var P=T>j?v.slice(0,j-p):v;e.addToken(e,P,a?a+l:l,u,p+P.length==m?c:"",s,h)}if(T>=j){v=v.slice(j-p),p=j;break}p=T,u=""}v=i.slice(o,o=n[g++]),a=Xe(n[g++],e.cm.options)}}else for(var E=1;En)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function Mn(t,e,n,r){return Ln(t,An(t,e),n,r)}function Dn(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&e2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,r){var i,o=In(e.map,n,r),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){for(;c&&it(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,i))}else{var f;c>0&&(d=r="right"),i=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+nr(t.display),top:p.top,bottom:p.bottom}:Nn}for(var g=i.top-e.rect.top,v=i.bottom-e.rect.top,m=(g+v)/2,b=e.view.measure.heights,y=0;ye)&&(i=(o=l-s)-1,e>=l&&(a="right")),null!=i){if(r=t[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c=0&&(n=t[i]).left==n.right;i--);return n}function Vn(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(t,e,n){return a(n?t-1:t,1==s[e].level!=n)}var d=lt(s,l,c),h=st,f=u(l,d,"before"==c);return null!=h&&(f.other=u(l,h,"before"!=c)),f}function Kn(t,e){var n=0;e=se(t.doc,e),t.options.lineWrapping||(n=nr(t.display)*e.ch);var r=qt(t.doc,e.line),i=Ue(r)+Cn(t.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Yn(t,e,n,r,i){var o=te(t,e,n);return o.xRel=i,r&&(o.outside=r),o}function Xn(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return Yn(r.first,0,null,-1,-1);var i=Jt(r,n),o=r.first+r.size-1;if(i>o)return Yn(r.first+r.size-1,qt(r,o).text.length,null,1,1);e<0&&(e=0);for(var a=qt(r,i);;){var s=tr(t,a,i,e,n),l=Ie(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=qt(r,i=c.line)}}function Jn(t,e,n,r){r-=Un(e);var i=e.text.length,o=at(function(e){return Ln(t,n,e-1).bottom<=r},i,0);return{begin:o,end:i=at(function(e){return Ln(t,n,e).top>r},o,i)}}function Zn(t,e,n,r){return n||(n=An(t,e)),Jn(t,e,n,Bn(t,e,Ln(t,n,r),"line").top)}function Qn(t,e,n,r){return!(t.bottom<=n)&&(t.top>n||(r?t.left:t.right)>e)}function tr(t,e,n,r,i){i-=Ue(e);var o=An(t,e),a=Un(e),s=0,l=e.text.length,c=!0,u=ut(e,t.doc.direction);if(u){var d=(t.options.lineWrapping?function(t,e,n,r,i,o,a){var s=Jn(t,e,r,a),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h=c||f.to<=l)){var p=Ln(t,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=pg)&&(u=f,d=g)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}:function(t,e,n,r,i,o,a){var s=at(function(s){var l=i[s],c=1!=l.level;return Qn(Gn(t,te(n,c?l.to:l.from,c?"before":"after"),"line",e,r),o,a,!0)},0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Gn(t,te(n,c?l.from:l.to,c?"after":"before"),"line",e,r);Qn(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l})(t,e,n,o,u,r,i);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var h,f,p=null,g=null,v=at(function(e){var n=Ln(t,o,e);return n.top+=a,n.bottom+=a,!!Qn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=e,g=n),!0)},s,l),m=!1;if(g){var b=r-g.left=w.bottom?1:0}return Yn(n,v=ot(e.text,v,1),f,m,r-h)}function er(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==_n){_n=E("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)_n.appendChild(document.createTextNode("x")),_n.appendChild(E("br"));_n.appendChild(document.createTextNode("x"))}P(t.measure,_n);var n=_n.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),T(t.measure),n||1}function nr(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=E("span","xxxxxxxxxx"),n=E("pre",[e],"CodeMirror-line-like");P(t.measure,n);var r=e.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(t.cachedCharWidth=i),i||10}function rr(t){for(var e=t.display,n={},r={},i=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=t.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:ir(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function ir(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function or(t){var e=er(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/nr(t.display)-3);return function(i){if(He(t.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(l=qt(t.doc,c.line).text).length==c.ch){var u=V(l,l.length,t.options.tabSize)-l.length;c=te(c.line,Math.max(0,Math.round((o-kn(t.display).left)/nr(t.display))-u))}return c}function lr(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;re)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)Oe&&Re(t.doc,e)i.viewFrom?dr(t):(i.viewFrom+=r,i.viewTo+=r);else if(e<=i.viewFrom&&n>=i.viewTo)dr(t);else if(e<=i.viewFrom){var o=hr(t,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):dr(t)}else if(n>=i.viewTo){var a=hr(t,e,e,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):dr(t)}else{var s=hr(t,e,e,-1),l=hr(t,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(on(t,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):dr(t)}var c=i.externalMeasured;c&&(n=i.lineN&&e=r.viewTo)){var o=r.view[lr(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==z(a,n)&&a.push(n)}}}function dr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function hr(t,e,n,r){var i,o=lr(t,e),a=t.display.view;if(!Oe||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var s=t.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-e,o++}else i=s-e;e+=i,n+=i}for(;Re(t.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function fr(t){for(var e=t.display.view,n=0,r=0;r=t.display.viewTo||s.to().linee||e==n&&a.to==e)&&(r(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(e,n,"ltr")}(g,n||0,null==r?h:r,function(t,e,i,d){var v="ltr"==i,m=f(t,v?"left":"right"),b=f(e-1,v?"right":"left"),y=null==n&&0==t,w=null==r&&e==h,x=0==d,O=!g||d==g.length-1;if(b.top-m.top<=3){var C=(c?w:y)&&O,S=(c?y:w)&&x?s:(v?m:b).left,k=C?l:(v?b:m).right;u(S,m.top,k-S,m.bottom)}else{var j,T,P,E;v?(j=c&&y&&x?s:m.left,T=c?l:p(t,i,"before"),P=c?s:p(e,i,"after"),E=c&&w&&O?l:b.right):(j=c?p(t,i,"before"):s,T=!c&&y&&x?l:m.right,P=!c&&w&&O?s:b.left,E=c?p(e,i,"after"):l),u(j,m.top,T-j,m.bottom),m.bottom0?e.blinker=setInterval(function(){t.hasFocus()||Cr(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function wr(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||Or(t))}function xr(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&Cr(t))},100)}function Or(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(gt(t,"focus",t,e),t.state.focused=!0,L(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),yr(t))}function Cr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(gt(t,"blur",t,e),t.state.focused=!1,j(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function Sr(t){for(var e=t.display,n=e.lineDiv.offsetTop,r=0;r.005||h<-.005)&&(Yt(i.line,l),kr(i.line),i.rest))for(var f=0;ft.display.sizerWidth){var p=Math.ceil(c/nr(t.display));p>t.display.maxLineLength&&(t.display.maxLineLength=p,t.display.maxLine=i.line,t.display.maxLineChanged=!0)}}}}function kr(t){if(t.widgets)for(var e=0;e=a&&(o=Jt(e,Ue(qt(e,l))-t.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Tr(t,e){var n=t.display,r=er(t.display);e.top<0&&(e.top=0);var i=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Pn(t),a={};e.bottom-e.top>o&&(e.bottom=e.top+o);var s=t.doc.height+Sn(n),l=e.tops-r;if(e.topi+o){var u=Math.min(e.top,(c?s:e.bottom)-o);u!=i&&(a.scrollTop=u)}var d=t.options.fixedGutter?0:n.gutters.offsetWidth,h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-d,f=Tn(t)-n.gutters.offsetWidth,p=e.right-e.left>f;return p&&(e.right=e.left+f),e.left<10?a.scrollLeft=0:e.leftf+h-3&&(a.scrollLeft=e.right+(p?0:10)-f),a}function Pr(t,e){null!=e&&(Dr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Er(t){Dr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Mr(t,e,n){null==e&&null==n||Dr(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Dr(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Ar(t,Kn(t,e.from),Kn(t,e.to),e.margin))}function Ar(t,e,n,r){var i=Tr(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-r,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+r});Mr(t,i.scrollLeft,i.scrollTop)}function Lr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||ai(t,{top:e}),_r(t,e,!0),n&&ai(t),ei(t,100))}function _r(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Nr(t,e,n,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,ci(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Ir(t){var e=t.display,n=e.gutters.offsetWidth,r=Math.round(t.doc.height+Sn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+jn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var Fr=function(t,e,n){this.cm=n;var r=this.vert=E("div",[E("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=E("div",[E("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,t(r),t(i),ht(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),ht(i,"scroll",function(){i.clientWidth&&e(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var i=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:e?r:0}},Fr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var t=b&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},Fr.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,function r(){var i=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,r)})},Fr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Vr=function(){};function Rr(t,e){e||(e=Ir(t));var n=t.display.barWidth,r=t.display.barHeight;zr(t,e);for(var i=0;i<4&&n!=t.display.barWidth||r!=t.display.barHeight;i++)n!=t.display.barWidth&&t.options.lineWrapping&&Sr(t),zr(t,Ir(t)),n=t.display.barWidth,r=t.display.barHeight}function zr(t,e){var n=t.display,r=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Vr.prototype.update=function(){return{bottom:0,right:0}},Vr.prototype.setScrollLeft=function(){},Vr.prototype.setScrollTop=function(){},Vr.prototype.clear=function(){};var Hr={native:Fr,null:Vr};function $r(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&j(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Hr[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ht(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?Nr(t,e):Lr(t,e)},t),t.display.scrollbars.addClass&&L(t.display.wrapper,t.display.scrollbars.addClass)}var Ur=0;function Br(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ur},e=t.curOp,an?an.ops.push(e):e.ownsGroup=an={ops:[e],delayedCallbacks:[]}}function Wr(t){var e=t.curOp;e&&function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ri(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Gr(t){t.updatedDisplay=t.mustUpdate&&ii(t.cm,t.update)}function Kr(t){var e=t.cm,n=e.display;t.updatedDisplay&&Sr(e),t.barMeasure=Ir(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Mn(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+jn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Tn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Yr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=E("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Cn(t.display))+"px;\n height: "+(e.bottom-e.top+jn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(i),t.display.lineSpace.removeChild(o)}}}(e,function(t,e,n,r){var i;null==r&&(r=0),t.options.lineWrapping||e!=n||(n="before"==(e=e.ch?te(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?te(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var a=!1,s=Gn(t,e),l=n&&n!=e?Gn(t,n):s,c=Tr(t,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=t.doc.scrollTop,d=t.doc.scrollLeft;if(null!=c.scrollTop&&(Lr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Nr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}(e,se(r,t.scrollToPos.from),se(r,t.scrollToPos.to),t.scrollToPos.margin));var i=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(i)for(var a=0;a=t.display.viewTo)){var n=+new Date+t.options.workTime,r=fe(t,e.highlightFrontier),i=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),function(o){if(r.line>=t.display.viewFrom){var a=o.styles,s=o.text.length>t.options.maxHighlightLength?$t(e.mode,r.state):null,l=de(t,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&hn)return ei(t,t.options.workDelay),!0}),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),i.length&&Jr(t,function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==fr(t))return!1;ui(t)&&(dr(t),e.dims=rr(t));var i=r.first+r.size,o=Math.max(e.visible.from-t.options.viewportMargin,r.first),a=Math.min(i,e.visible.to+t.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Oe&&(o=Re(t.doc,o),a=ze(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var r=t.display;0==r.view.length||e>=r.viewTo||n<=r.viewFrom?(r.view=on(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=on(t,e,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,lr(t,n)))),r.viewTo=n}(t,o,a),n.viewOffset=Ue(qt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=fr(t);if(!s&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=A();if(!e||!D(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(t.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(t);return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var r=t.display,i=t.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(e){var n=e.nextSibling;return l&&b&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=r.view,u=r.viewFrom,d=0;d-1&&(f=!1),un(t,h,u,n)),f&&(T(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(Qt(t.options,u)))),a=h.node.nextSibling}else{var p=mn(t,h,u,n);o.insertBefore(p,a)}u+=h.size}for(;a;)a=s(a)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=A()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&D(document.body,t.anchorNode)&&D(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,ei(t,400)),n.updateLineNumbers=null,!0}function oi(t,e){for(var n=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=Tn(t))r&&(e.visible=jr(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Sn(t.display)-Pn(t),n.top)}),e.visible=jr(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!ii(t,e))break;Sr(t);var i=Ir(t);pr(t),Rr(t,i),li(t,i),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function ai(t,e){var n=new ri(t,e);if(ii(t,n)){Sr(t),oi(t,n);var r=Ir(t);pr(t),Rr(t,r),li(t,r),n.finish()}}function si(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function li(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+jn(t)+"px"}function ci(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=ir(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&b&&l)t:for(var h=e.target,f=a.view;h!=s;h=h.parentNode)for(var p=0;p=0&&ee(t,r.to())<=0)return n}return-1};var xi=function(t,e){this.anchor=t,this.head=e};function Oi(t,e,n){var r=t&&t.options.selectionsMayTouch,i=e[n];e.sort(function(t,e){return ee(t.from(),e.from())}),n=z(e,i);for(var o=1;o0:l>=0){var c=oe(s.from(),a.from()),u=ie(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,e.splice(--o,2,new xi(d?u:c,d?c:u))}}return new wi(e,n)}function Ci(t,e){return new wi([new xi(t,e||t)],0)}function Si(t){return t.text?te(t.from.line+t.text.length-1,Y(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function ki(t,e){if(ee(t,e.from)<0)return t;if(ee(t,e.to)<=0)return Si(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=Si(e).ch-e.to.ch),te(n,r)}function ji(t,e){for(var n=[],r=0;r1&&t.remove(s.line+1,p-1),t.insert(s.line+1,m)}ln(t,"change",t,e)}function Ai(t,e,n){!function t(r,i,o){if(r.linked)for(var a=0;as-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return i.lastOp==r?(Fi(t.done),Y(t.done)):t.done.length&&!Y(t.done).ranges?Y(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),Y(t.done)):void 0}(i)))a=Y(o.changes),0==ee(e.from,e.to)&&0==ee(e.from,a.to)?a.to=Si(e):o.changes.push(Ii(t,e));else{var l=Y(i.done);for(l&&l.ranges||Ri(t.sel,i.done),o={changes:[Ii(t,e)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,a||gt(t,"historyAdded")}function Ri(t,e){var n=Y(e);n&&n.ranges&&n.equals(t)||e.push(t)}function zi(t,e,n,r){var i=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),function(n){n.markedSpans&&((i||(i=e["spans_"+t.id]={}))[o]=n.markedSpans),++o})}function Hi(t){if(!t)return null;for(var e,n=0;n-1&&(Y(s)[d]=c[d],delete c[d])}}}return r}function Bi(t,e,n,r){if(r){var i=t.anchor;if(n){var o=ee(e,i)<0;o!=ee(n,i)<0?(i=e,e=n):o!=ee(e,n)<0&&(e=n)}return new xi(i,e)}return new xi(n||e,e)}function Wi(t,e,n,r,i){null==i&&(i=t.cm&&(t.cm.display.shift||t.extend)),Xi(t,new wi([Bi(t.sel.primary(),e,n,i)],0),r)}function qi(t,e,n){for(var r=[],i=t.cm&&(t.cm.display.shift||t.extend),o=0;o=e.ch:s.to>e.ch))){if(i&&(gt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),h=void 0;if((r<0?u:c)&&(d=ro(t,d,-r,d&&d.line==e.line?o:null)),d&&d.line==e.line&&(h=ee(d,n))&&(r<0?h<0:h>0))return eo(t,d,e,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=ro(t,f,r,f.line==e.line?o:null)),f?eo(t,f,e,r,i):null}}return e}function no(t,e,n,r,i){var o=r||1;return eo(t,e,n,o,i)||!i&&eo(t,e,n,o,!0)||eo(t,e,n,-o,i)||!i&&eo(t,e,n,-o,!0)||(t.cantEdit=!0,te(t.first,0))}function ro(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?se(t,te(e.line-1)):null:n>0&&e.ch==(r||qt(t,e.line)).text.length?e.line0)){var u=[l,1],d=ee(c.from,s.from),h=ee(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(t,e.from,e.to);if(r)for(var i=r.length-1;i>=0;--i)so(t,{from:r[i].from,to:r[i].to,text:i?[""]:e.text,origin:e.origin});else so(t,e)}}function so(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ee(e.from,e.to)){var n=ji(t,e);Vi(t,e,n,t.cm?t.cm.curOp.id:NaN),uo(t,e,n,je(t,e));var r=[];Ai(t,function(t,n){n||-1!=z(r,t.history)||(go(t.history,e),r.push(t.history)),uo(t,e,null,je(t,e))})}}function lo(t,e,n){var r=t.cm&&t.cm.state.suppressEdits;if(!r||n){for(var i,o=t.history,a=t.sel,s="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c=0;--f){var p=h(f);if(p)return p.v}}}}function co(t,e){if(0!=e&&(t.first+=e,t.sel=new wi(X(t.sel.ranges,function(t){return new xi(te(t.anchor.line+e,t.anchor.ch),te(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){cr(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,r=n.viewFrom;rt.lastLine())){if(e.from.lineo&&(e={from:e.from,to:te(o,qt(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Gt(t,e.from,e.to),n||(n=ji(t,e)),t.cm?function(t,e,n){var r=t.doc,i=t.display,o=e.from,a=e.to,s=!1,l=o.line;t.options.lineWrapping||(l=Xt(Ve(qt(r,o.line))),r.iter(l,a.line+1,function(t){if(t==i.maxLine)return s=!0,!0})),r.sel.contains(e.from,e.to)>-1&&mt(t),Di(r,e,n,or(t)),t.options.lineWrapping||(r.iter(l,o.line+e.text.length,function(t){var e=Be(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,s=!1)}),s&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;r--){var i=qt(t,r).stateAfter;if(i&&(!(i instanceof ce)||r+i.lookAhead1||!(this.children[0]instanceof mo))){var s=[];this.collapse(s),this.children=[new mo(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var a=i.lines.length%25+25,s=a;s10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=M("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Fe(t,e.line,e,n,o)||e.line!=n.line&&Fe(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Oe=!0}o.addToHistory&&Vi(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,n.line+1,function(t){c&&o.collapsed&&!c.options.lineWrapping&&Ve(t)==c.display.maxLine&&(s=!0),o.collapsed&&l!=e.line&&Yt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new Ce(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&t.iter(e.line,n.line+1,function(e){He(t,e)&&Yt(e,0)}),o.clearOnEnter&&ht(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(xe=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++xo,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)cr(c,e.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=e.line;u<=n.line;u++)ur(c,u,"text");o.atomic&&Qi(c.doc),ln(c,"markerAdded",c,o)}return o}Oo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Br(t),bt(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;ot.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&cr(t,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Qi(t.doc)),t&&ln(t,"markerCleared",t,this,r,i),e&&Wr(t),this.parent&&this.parent.clear()}},Oo.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i=0;l--)ao(this,r[l]);s?Yi(this,s):this.cm&&Er(this.cm)}),undo:ti(function(){lo(this,"undo")}),redo:ti(function(){lo(this,"redo")}),undoSelection:ti(function(){lo(this,"undo",!0)}),redoSelection:ti(function(){lo(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,r=0;r=t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(t,e,n){t=se(this,t),e=se(this,e);var r=[],i=t.line;return this.iter(t.line,e.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=t.line||null!=l.from&&i==e.line&&l.from>=e.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var t=[];return this.iter(function(e){var n=e.markedSpans;if(n)for(var r=0;rt)return e=t,!0;t-=o,++n}),se(this,te(n,e))},indexFromPos:function(t){var e=(t=se(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var d=t.dataTransfer.getData("Text");if(d){var h;if(e.state.draggingText&&!e.state.draggingText.copy&&(h=e.listSelections()),Ji(e.doc,Ci(n,n)),h)for(var f=0;f=0;e--)ho(t.doc,"",r[e].from,r[e].to,"+delete");Er(t)})}function Ko(t,e,n){var r=ot(t.text,e+n,n);return r<0||r>t.text.length?null:r}function Yo(t,e,n){var r=Ko(t,e.ch,n);return null==r?null:new te(e.line,r,n<0?"after":"before")}function Xo(t,e,n,r,i){if(t){"rtl"==e.doc.direction&&(i=-i);var o=ut(n,e.doc.direction);if(o){var a,s=i<0?Y(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var c=An(e,n);a=i<0?n.text.length-1:0;var u=Ln(e,c,a).top;a=at(function(t){return Ln(e,c,t).top==u},i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Ko(n,a,1))}else a=i<0?s.to:s.from;return new te(r,a,l)}}return new te(r,i<0?n.text.length:0,i<0?"before":"after")}Ro.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ro.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ro.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ro.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ro.default=b?Ro.macDefault:Ro.pcDefault;var Jo={selectAll:io,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),U)},killLine:function(t){return Go(t,function(e){if(e.empty()){var n=qt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)i=new te(i.line,i.ch+1),t.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),te(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var a=qt(t.doc,i.line-1).text;a&&(i=new te(i.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),te(i.line-1,a.length-1),i,"+transpose"))}n.push(new xi(i,i))}t.setSelections(n)})},newlineAndIndent:function(t){return Jr(t,function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var r=0;r-1&&(ee((i=c.ranges[i]).from(),e)<0||e.xRel>0)&&(ee(i.to(),e)>0||e.xRel<0)?function(t,e,n,r){var i=t.display,o=!1,c=Zr(t,function(e){l&&(i.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:xr(t)),pt(i.wrapper.ownerDocument,"mouseup",c),pt(i.wrapper.ownerDocument,"mousemove",u),pt(i.scroller,"dragstart",d),pt(i.scroller,"drop",c),o||(wt(e),r.addNew||Wi(t.doc,n,null,null,r.extend),l&&!h||a&&9==s?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),t.state.draggingText=c,c.copy=!r.moveOnDrag,ht(i.wrapper.ownerDocument,"mouseup",c),ht(i.wrapper.ownerDocument,"mousemove",u),ht(i.scroller,"dragstart",d),ht(i.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}(t,r,e,o):function(t,e,n,r){a&&xr(t);var i=t.display,o=t.doc;wt(e);var s,l,c=o.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?u[l]:new xi(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new xi(n,n)),n=sr(t,e,!0,!0),l=-1;else{var d=fa(t,n,r.unit);s=r.extend?Bi(s,d.anchor,d.head,r.extend):d}r.addNew?-1==l?(l=u.length,Xi(o,Oi(t,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?(Xi(o,Oi(t,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):Gi(o,l,s,B):(l=0,Xi(o,new wi([s],0),B),c=o.sel);var h=n;function f(e){if(0!=ee(h,e))if(h=e,"rectangle"==r.unit){for(var i=[],a=t.options.tabSize,u=V(qt(o,n.line).text,n.ch,a),d=V(qt(o,e.line).text,e.ch,a),f=Math.min(u,d),p=Math.max(u,d),g=Math.min(n.line,e.line),v=Math.min(t.lastLine(),Math.max(n.line,e.line));g<=v;g++){var m=qt(o,g).text,b=q(m,f,a);f==p?i.push(new xi(te(g,b),te(g,b))):m.length>b&&i.push(new xi(te(g,b),te(g,q(m,p,a))))}i.length||i.push(new xi(n,n)),Xi(o,Oi(t,c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var y,w=s,x=fa(t,e,r.unit),O=w.anchor;ee(x.anchor,O)>0?(y=x.head,O=oe(w.from(),x.anchor)):(y=x.anchor,O=ie(w.to(),x.head));var C=c.ranges.slice(0);C[l]=function(t,e){var n=e.anchor,r=e.head,i=qt(t.doc,n.line);if(0==ee(n,r)&&n.sticky==r.sticky)return e;var o=ut(i);if(!o)return e;var a=lt(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return e;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return e;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=lt(o,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var h=o[c+(l?-1:0)],f=l==(1==h.level),p=f?h.from:h.to,g=f?"after":"before";return n.ch==p&&n.sticky==g?e:new xi(new te(n.line,p,g),r)}(t,new xi(se(o,O),y)),Xi(o,Oi(t,C,l),B)}}var p=i.wrapper.getBoundingClientRect(),g=0;function v(e){t.state.selectingText=!1,g=1/0,e&&(wt(e),i.input.focus()),pt(i.wrapper.ownerDocument,"mousemove",m),pt(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var m=Zr(t,function(e){0!==e.buttons&&kt(e)?function e(n){var a=++g,s=sr(t,n,!0,"rectangle"==r.unit);if(s)if(0!=ee(s,h)){t.curOp.focus=A(),f(s);var l=jr(i,o);(s.line>=l.to||s.linep.bottom?20:0;c&&setTimeout(Zr(t,function(){g==a&&(i.scroller.scrollTop+=c,e(n))}),50)}}(e):v(e)}),b=Zr(t,v);t.state.selectingText=b,ht(i.wrapper.ownerDocument,"mousemove",m),ht(i.wrapper.ownerDocument,"mouseup",b)}(t,r,e,o)}(e,r,o,t):St(t)==n.scroller&&wt(t):2==i?(r&&Wi(e.doc,r),setTimeout(function(){return n.input.focus()},20)):3==i&&(C?e.display.input.onContextMenu(t):xr(e)))}}function fa(t,e,n){if("char"==n)return new xi(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new xi(te(e.line,0),se(t.doc,te(e.line+1,0)));var r=n(t,e);return new xi(r.from,r.to)}function pa(t,e,n,r){var i,o;if(e.touches)i=e.touches[0].clientX,o=e.touches[0].clientY;else try{i=e.clientX,o=e.clientY}catch(t){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&wt(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!bt(t,n))return Ot(e);o-=s.top-a.viewOffset;for(var l=0;l=i)return gt(t,n,t,Jt(t.doc,o),t.display.gutterSpecs[l].className,e),Ot(e)}}function ga(t,e){return pa(t,e,"gutterClick",!0)}function va(t,e){On(t.display,e)||function(t,e){return!!bt(t,"gutterContextMenu")&&pa(t,e,"gutterContextMenu",!1)}(t,e)||vt(t,e,"contextmenu")||C||t.display.input.onContextMenu(e)}function ma(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),zn(t)}da.prototype.compare=function(t,e,n){return this.time+400>t&&0==ee(e,this.pos)&&n==this.button};var ba={toString:function(){return"CodeMirror.Init"}},ya={},wa={};function xa(t,e,n){if(!e!=!(n&&n!=ba)){var r=t.display.dragFunctions,i=e?ht:pt;i(t.display.scroller,"dragstart",r.start),i(t.display.scroller,"dragenter",r.enter),i(t.display.scroller,"dragover",r.over),i(t.display.scroller,"dragleave",r.leave),i(t.display.scroller,"drop",r.drop)}}function Oa(t){t.options.lineWrapping?(L(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(j(t.display.wrapper,"CodeMirror-wrap"),We(t)),ar(t),cr(t),zn(t),setTimeout(function(){return Rr(t)},100)}function Ca(t,e){var n=this;if(!(this instanceof Ca))return new Ca(t,e);this.options=e=e?F(e):{},F(ya,e,!1);var r=e.value;"string"==typeof r?r=new Po(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var i=new Ca.inputStyles[e.inputStyle](this),o=this.display=new pi(t,r,i,e);for(var c in o.wrapper.CodeMirror=this,ma(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),$r(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new R,keySeq:null,specialChars:null},e.autofocus&&!m&&o.input.focus(),a&&s<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(t){var e=t.display;ht(e.scroller,"mousedown",Zr(t,ha)),ht(e.scroller,"dblclick",a&&s<11?Zr(t,function(e){if(!vt(t,e)){var n=sr(t,e);if(n&&!ga(t,e)&&!On(t.display,e)){wt(e);var r=t.findWordAt(n);Wi(t.doc,r.anchor,r.head)}}}):function(e){return vt(t,e)||wt(e)}),ht(e.scroller,"contextmenu",function(e){return va(t,e)}),ht(e.input.getField(),"contextmenu",function(n){e.scroller.contains(n.target)||va(t,n)});var n,r={end:0};function i(){e.activeTouch&&(n=setTimeout(function(){return e.activeTouch=null},1e3),(r=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,r=e.top-t.top;return n*n+r*r>400}ht(e.scroller,"touchstart",function(i){if(!vt(t,i)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(i)&&!ga(t,i)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(e.activeTouch.left=i.touches[0].pageX,e.activeTouch.top=i.touches[0].pageY)}}),ht(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),ht(e.scroller,"touchend",function(n){var r=e.activeTouch;if(r&&!On(e,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=t.coordsChar(e.activeTouch,"page");a=!r.prev||o(r,r.prev)?new xi(s,s):!r.prev.prev||o(r,r.prev.prev)?t.findWordAt(s):new xi(te(s.line,0),se(t.doc,te(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),wt(n)}i()}),ht(e.scroller,"touchcancel",i),ht(e.scroller,"scroll",function(){e.scroller.clientHeight&&(Lr(t,e.scroller.scrollTop),Nr(t,e.scroller.scrollLeft,!0),gt(t,"scroll",t))}),ht(e.scroller,"mousewheel",function(e){return yi(t,e)}),ht(e.scroller,"DOMMouseScroll",function(e){return yi(t,e)}),ht(e.wrapper,"scroll",function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={enter:function(e){vt(t,e)||Ct(e)},over:function(e){vt(t,e)||(function(t,e){var n=sr(t,e);if(n){var r=document.createDocumentFragment();vr(t,n,r),t.display.dragCursor||(t.display.dragCursor=E("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),P(t.display.dragCursor,r)}}(t,e),Ct(e))},start:function(e){return function(t,e){if(a&&(!t.state.draggingText||+new Date-Eo<100))Ct(e);else if(!vt(t,e)&&!On(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!h)){var n=E("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(t,e)},drop:Zr(t,Mo),leave:function(e){vt(t,e)||Do(t)}};var l=e.input.getField();ht(l,"keyup",function(e){return sa.call(t,e)}),ht(l,"keydown",Zr(t,aa)),ht(l,"keypress",Zr(t,la)),ht(l,"focus",function(e){return Or(t,e)}),ht(l,"blur",function(e){return Cr(t,e)})}(this),function(){var t;Lo||(ht(window,"resize",function(){null==t&&(t=setTimeout(function(){t=null,Ao(_o)},100))}),ht(window,"blur",function(){return Ao(Cr)}),Lo=!0)}(),Br(this),this.curOp.forceUpdate=!0,Li(this,r),e.autofocus&&!m||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Or(n)},20):Cr(this),wa)wa.hasOwnProperty(c)&&wa[c](this,e[c],ba);ui(this),e.finishInit&&e.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?V(qt(o,e-1).text,null,a):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",h=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)h+=a,d+="\t";if(ha,l=At(e),c=null;if(s&&r.ranges.length>1)if(ja&&ja.text.join("\n")==e){if(r.ranges.length%ja.text.length==0){c=[];for(var u=0;u=0;h--){var f=r.ranges[h],p=f.from(),g=f.to();f.empty()&&(n&&n>0?p=te(p.line,p.ch-n):t.state.overwrite&&!s?g=te(g.line,Math.min(qt(o,g.line).text.length,g.ch+Y(l).length)):s&&ja&&ja.lineWise&&ja.text.join("\n")==l.join("\n")&&(p=g=te(p.line,0)));var v={from:p,to:g,text:c?c[h%c.length]:l,origin:i||(s?"paste":t.state.cutIncoming>a?"cut":"+input")};ao(t.doc,v),ln(t,"inputRead",t,v)}e&&!s&&Ma(t,e),Er(t),t.curOp.updateInput<2&&(t.curOp.updateInput=d),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Ea(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Jr(e,function(){return Pa(e,n,0,null,"paste")}),!0}function Ma(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=t.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=ka(t,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(qt(t.doc,i.head.line).text.slice(0,i.head.ch))&&(a=ka(t,i.head.line,"smart"));a&&ln(t,"electricInput",t,i.head.line)}}}function Da(t){for(var e=[],n=[],r=0;r0?0:-1));if(isNaN(u))a=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new te(e.line,Math.max(0,Math.min(s.text.length,e.ch+n*(d?2:1))),-n)}}else a=i?function(t,e,n,r){var i=ut(e,t.doc.direction);if(!i)return Yo(e,n,r);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=lt(i,n.ch,n.sticky),a=i[o];if("ltr"==t.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&h>=u.begin)){var f=d?"before":"after";return new te(n.line,h,f)}}var p=function(t,e,r){for(var o=function(t,e){return e?new te(n.line,l(t,1),"before"):new te(n.line,t,"after")};t>=0&&t0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==v||r>0&&v==e.text.length||!(g=p(r>0?0:i.length-1,r,c(v)))?null:g}(t.cm,s,e,n):Yo(s,e,n);if(null==a){if(o||(c=e.line+l)=t.first+t.size||(e=new te(c,e.ch,e.sticky),!(s=qt(t,c))))return!1;e=Xo(i,t.cm,s,e.line,l)}else e=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,d="group"==r,h=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||c(!f);f=!1){var p=s.text.charAt(e.ch)||"\n",g=et(p,h)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||f||g||(g="s"),u&&u!=g){n<0&&(n=1,c(),e.sticky="after");break}if(g&&(u=g),n>0&&!c(!f))break}var v=no(t,e,o,a,!0);return ne(o,v)&&(v.hitSide=!0),v}function Na(t,e,n,r){var i,o,a=t.doc,s=e.left;if("page"==r){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*er(t.display),3);i=(n>0?e.bottom:e.top)+n*c}else"line"==r&&(i=n>0?e.bottom+3:e.top-3);for(;(o=Xn(t,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ia=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Fa(t,e){var n=Dn(t,e.line);if(!n||n.hidden)return null;var r=qt(t.doc,e.line),i=En(n,r,e.line),o=ut(r,t.doc.direction),a="left";o&&(a=lt(o,e.ch)%2?"right":"left");var s=In(i.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Va(t,e){return e&&(t.bad=!0),t}function Ra(t,e,n){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[n]))return Va(t.clipPos(te(t.display.viewTo-1)),!0);e=null,n=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var i=0;i=e.display.viewTo||o.line=e.display.viewFrom&&Fa(e,i)||{node:l[0].measure.map[2],offset:0},u=o.liner.firstLine()&&(a=te(a.line-1,qt(r.doc,a.line-1).length)),s.ch==qt(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(t=lr(r,a.line))?(e=Xt(i.view[0].line),n=i.view[0].node):(e=Xt(i.view[t].line),n=i.view[t-1].node.nextSibling);var l,c,u=lr(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=Xt(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(t,e,n,r,i){var o="",a=!1,s=t.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(t){t&&(c(),o+=t)}function d(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var o,h=e.getAttribute("cm-marker");if(h){var f=t.findMarks(te(r,0),te(i+1,0),(v=+h,function(t){return t.id==v}));return void(f.length&&(o=f[0].find(0))&&u(Gt(t.doc,o.from,o.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;p&&c();for(var g=0;g1&&h.length>1;)if(Y(d)==Y(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),e++}for(var f=0,p=0,g=d[0],v=h[0],m=Math.min(g.length,v.length);fa.ch&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)f--,p++;d[d.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var x=te(e,f),O=te(l,h.length?Y(h).length-p:0);return d.length>1||d[0]||ee(x,O)?(ho(r.doc,d,x,O,"+input"),!0):void 0},Ia.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ia.prototype.reset=function(){this.forceCompositionEnd()},Ia.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ia.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},Ia.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Jr(this.cm,function(){return cr(t.cm)})},Ia.prototype.setUneditable=function(t){t.contentEditable="false"},Ia.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Zr(this.cm,Pa)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ia.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ia.prototype.onContextMenu=function(){},Ia.prototype.resetPosition=function(){},Ia.prototype.needsContentAttribute=!0;var Ha=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null};Ha.prototype.init=function(t){var e=this,n=this,r=this.cm;this.createField(t);var i=this.textarea;function o(t){if(!vt(r,t)){if(r.somethingSelected())Ta({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Da(r);Ta({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,U):(n.prevInput="",i.value=e.text.join("\n"),N(i))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(i.style.width="0px"),ht(i,"input",function(){a&&s>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()}),ht(i,"paste",function(t){vt(r,t)||Ea(t,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())}),ht(i,"cut",o),ht(i,"copy",o),ht(t.scroller,"paste",function(e){if(!On(t,e)&&!vt(r,e)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=e.clipboardData,i.dispatchEvent(o)}}),ht(t.lineSpace,"selectstart",function(e){On(t,e)||wt(e)}),ht(i,"compositionstart",function(){var t=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),ht(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Ha.prototype.createField=function(t){this.wrapper=La(),this.textarea=this.wrapper.firstChild},Ha.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Ha.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,r=gr(t);if(t.options.moveInputWithCursor){var i=Gn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Ha.prototype.showSelection=function(t){var e=this.cm.display;P(e.cursorDiv,t.cursors),P(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ha.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&N(this.textarea),a&&s>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Ha.prototype.getField=function(){return this.textarea},Ha.prototype.supportsTouch=function(){return!1},Ha.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||A()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ha.prototype.blur=function(){this.textarea.blur()},Ha.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ha.prototype.receivedFocus=function(){this.slowPoll()},Ha.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ha.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))})},Ha.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||Lt(n)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=n.value;if(i==r&&!e.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=i,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ha.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ha.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ha.prototype.onContextMenu=function(t){var e=this,n=e.cm,r=n.display,i=e.textarea;e.contextMenuPending&&e.contextMenuPending();var o=sr(n,t),c=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Zr(n,Xi)(n.doc,Ci(o),U);var u,h=i.style.cssText,f=e.wrapper.style.cssText,p=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-p.top-5)+"px; left: "+(t.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=e.prevInput=" "),e.contextMenuPending=m,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&v(),C){Ct(t);var g=function(){pt(window,"mouseup",g),setTimeout(m,20)};ht(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var t=n.somethingSelected(),o="​"+(t?i.value:"");i.value="⇚",i.value=o,e.prevInput=t?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function m(){if(e.contextMenuPending==m&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,i.style.cssText=h,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&v();var t=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==e.prevInput?Zr(n,io)(n):t++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Ha.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Ha.prototype.setUneditable=function(){},Ha.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,r,i,o){t.defaults[n]=r,i&&(e[n]=o?function(t,e,n){n!=ba&&i(t,e,n)}:i)}t.defineOption=n,t.Init=ba,n("value","",function(t,e){return t.setValue(e)},!0),n("mode",null,function(t,e){t.doc.modeOption=e,Pi(t)},!0),n("indentUnit",2,Pi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(t){Ei(t),zn(t),cr(t)},!0),n("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var n=[],r=t.doc.first;t.doc.iter(function(t){for(var i=0;;){var o=t.text.indexOf(e,i);if(-1==o)break;i=o+e.length,n.push(te(r,o))}r++});for(var i=n.length-1;i>=0;i--)ho(t.doc,e,n[i],te(n[i].line,n[i].ch+e.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=ba&&t.refresh()}),n("specialCharPlaceholder",Ze,function(t){return t.refresh()},!0),n("electricChars",!0),n("inputStyle",m?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),n("autocorrect",!1,function(t,e){return t.getInputField().autocorrect=e},!0),n("autocapitalize",!1,function(t,e){return t.getInputField().autocapitalize=e},!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",function(t){ma(t),fi(t)},!0),n("keyMap","default",function(t,e,n){var r=qo(e),i=n!=ba&&qo(n);i&&i.detach&&i.detach(t,r),r.attach&&r.attach(t,i||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Oa,!0),n("gutters",[],function(t,e){t.display.gutterSpecs=di(e,t.options.lineNumbers),fi(t)},!0),n("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?ir(t.display)+"px":"0",t.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(t){return Rr(t)},!0),n("scrollbarStyle","native",function(t){$r(t),Rr(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),n("lineNumbers",!1,function(t,e){t.display.gutterSpecs=di(t.options.gutters,e),fi(t)},!0),n("firstLineNumber",1,fi,!0),n("lineNumberFormatter",function(t){return t},fi,!0),n("showCursorWhenSelecting",!1,pr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(t,e){"nocursor"==e&&(Cr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),n("screenReaderLabel",null,function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)}),n("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),n("dragDrop",!0,xa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,pr,!0),n("singleCursorHeightPerLine",!0,pr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ei,!0),n("addModeClass",!1,Ei,!0),n("pollInterval",100),n("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),n("historyEventDelay",1250),n("viewportMargin",10,function(t){return t.refresh()},!0),n("maxHighlightLength",1e4,Ei,!0),n("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),n("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),n("autofocus",null),n("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0),n("phrases",null)}(Ca),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var r=this.options,i=r[t];r[t]==n&&"mode"!=t||(r[t]=n,e.hasOwnProperty(t)&&Zr(this,e[t])(this,n,i),gt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](qo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;nn&&(ka(this,i.head.line,t,!0),n=i.head.line,r==this.doc.sel.primIndex&&Er(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&Gi(this.doc,r,new xi(o,c[r].to()),U)}}}),getTokenAt:function(t,e){return be(this,t,e)},getLineTokens:function(t,e){return be(this,te(t),e,!0)},getTokenTypeAt:function(t){t=se(this.doc,t);var e,n=he(this,qt(this.doc,t.line)),r=0,i=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(t=o,i=!0),r=qt(this.doc,t)}else r=t;return Bn(this,r,{top:0,left:0},e||"page",n||i).top+(i?this.doc.height-Ue(r):0)},defaultTextHeight:function(){return er(this.display)},defaultCharWidth:function(){return nr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,r,i){var o,a,s=this.display,l=(t=Gn(this,se(this.doc,t))).bottom,c=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),s.sizer.appendChild(e),"over"==r)l=t.top;else if("above"==r||"near"==r){var u=Math.max(s.wrapper.clientHeight,this.doc.height),d=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>u)&&t.top>e.offsetHeight?l=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=u&&(l=t.bottom),c+e.offsetWidth>d&&(c=d-e.offsetWidth)}e.style.top=l+"px",e.style.left=e.style.right="","right"==i?(c=s.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(s.sizer.clientWidth-e.offsetWidth)/2),e.style.left=c+"px"),n&&(null!=(a=Tr(o=this,{left:c,top:l,right:c+e.offsetWidth,bottom:l+e.offsetHeight})).scrollTop&&Lr(o,a.scrollTop),null!=a.scrollLeft&&Nr(o,a.scrollLeft))},triggerOnKeyDown:Qr(aa),triggerOnKeyPress:Qr(la),triggerOnKeyUp:sa,triggerOnMouseDown:Qr(ha),execCommand:function(t){if(Jo.hasOwnProperty(t))return Jo[t].call(null,this)},triggerElectric:Qr(function(t){Ma(this,t)}),findPosH:function(t,e,n,r){var i=1;e<0&&(i=-1,e=-e);for(var o=se(this.doc,t),a=0;a0&&a(e.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&ar(this),gt(this,"refresh",this)}),swapDoc:Qr(function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Li(this,t),zn(this),this.display.input.reset(),Mr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,e),e}),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yt(t),t.registerHelper=function(e,r,i){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][r]=i},t.registerGlobalHelper=function(e,r,i,o){t.registerHelper(e,r,o),n[e]._global.push({pred:i,val:o})}}(Ca);var $a="iter insert remove copy getEditor constructor".split(" ");for(var Ua in Po.prototype)Po.prototype.hasOwnProperty(Ua)&&z($a,Ua)<0&&(Ca.prototype[Ua]=function(t){return function(){return t.apply(this.doc,arguments)}}(Po.prototype[Ua]));return yt(Po),Ca.inputStyles={textarea:Ha,contenteditable:Ia},Ca.defineMode=function(t){Ca.defaults.mode||"null"==t||(Ca.defaults.mode=t),function(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),It[t]=e}.apply(this,arguments)},Ca.defineMIME=function(t,e){Ft[t]=e},Ca.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ca.defineMIME("text/plain","null"),Ca.defineExtension=function(t,e){Ca.prototype[t]=e},Ca.defineDocExtension=function(t,e){Po.prototype[t]=e},Ca.fromTextArea=function(t,e){if((e=e?F(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=A();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function r(){t.value=s.getValue()}var i;if(t.form&&(ht(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(t){}}e.finishInit=function(n){n.save=r,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,r(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(pt(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=i))}},t.style.display="none";var s=Ca(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return s},function(t){t.off=pt,t.on=ht,t.wheelEventPixels=bi,t.Doc=Po,t.splitLines=At,t.countColumn=V,t.findColumn=q,t.isWordChar=tt,t.Pass=$,t.signal=gt,t.Line=qe,t.changeEnd=Si,t.scrollbarModel=Hr,t.Pos=te,t.cmpPos=ee,t.modes=It,t.mimeModes=Ft,t.resolveMode=Vt,t.getMode=Rt,t.modeExtensions=zt,t.extendMode=Ht,t.copyState=$t,t.startState=Bt,t.innerMode=Ut,t.commands=Jo,t.keyMap=Ro,t.keyName=Wo,t.isModifierKey=Uo,t.lookupKey=$o,t.normalizeKeyMap=Ho,t.StringStream=Wt,t.SharedTextMarker=So,t.TextMarker=Oo,t.LineWidget=yo,t.e_preventDefault=wt,t.e_stopPropagation=xt,t.e_stop=Ct,t.addClass=L,t.contains=D,t.rmClass=j,t.keyNames=No}(Ca),Ca.version="5.59.1",Ca}()},function(t,e,n){"use strict";n.r(e);var r=n(8),i=n.n(r),o=n(2),a=n.n(o),s=n(1),l=n.n(s),c=n(0),u=n(3),d=n(9),h=n(20);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function p(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{}).config,e=void 0===t?{}:t;this.em=e.em,this.editor=e.editor},handleClick:function(t){t.preventDefault(),t.stopPropagation();var e=this.editor,n=this.em,r=e.Canvas.getFrameEl().getBoundingClientRect(),i=r.left,o=r.top,a=p(p({},t),{},{clientX:t.clientX-i,clientY:t.clientY-o});n.trigger("toolbar:run:before"),this.execCommand(a)},execCommand:function(t){var e={event:t},n=this.model.get("command"),r=this.editor;"function"==typeof n&&n(r,null,e),"string"==typeof n&&r.runCommand(n,e)},render:function(){var t=this.editor,e=this.$el,n=this.model,r=n.get("id"),i=n.get("label"),o=t.getConfig("stylePrefix");return e.addClass("".concat(o,"toolbar-item")),r&&e.addClass("".concat(o,"toolbar-item__").concat(r)),i&&e.append(i),this}}),v=h.a.extend({itemView:g,initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config={editor:t.editor||"",em:t.em},this.listenTo(this.collection,"reset",this.render)}}),m=l.a.Model.extend({defaults:{command:"",attributes:{}}}),b=l.a.Collection.extend({model:m});function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function w(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{}).el||this.canvas.getToolsEl(e);return n&&(n.style.display=t?"":"none"),n||{}},showElementOffset:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};x&&this.editor.runCommand("show-offset",{el:t,elPos:e,view:n.view,force:1,top:0,left:0})},hideElementOffset:function(t){this.editor.stopCommand("show-offset",{view:t})},showFixedElementOffset:function(t,e){this.editor.runCommand("show-offset",{el:t,elPos:e,state:"Fixed"})},hideFixedElementOffset:function(t,e){this.editor&&this.editor.stopCommand("show-offset",{state:"Fixed"})},hideHighlighter:function(t){this.canvas.getHighlighter(t).style.opacity=0},onClick:function(t){t.stopPropagation(),t.preventDefault();var e=this.em;if(e.get("_cmpDrag"))return e.set("_cmpDrag");var n=O(t.target),r=n.data("model");if(!r)for(var i=n.parent();!r&&i.length&&!Object(d.g)(i[0]);)r=i.data("model"),i=i.parent();if(r)if(r.get("selectable"))this.select(r,t);else{for(var o=r.parent();o&&!o.get("selectable");)o=o.parent();this.select(o,t)}},select:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&(this.editor.select(t,{scroll:{},event:e}),this.initResize(t))},updateBadge:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=O(t).data("model");if(r&&r.get("badgable")){var i=this.getBadge(n);if(!n.posOnly){var o=this.canvas.getConfig(),a=r.getIcon(),s=o.pStylePrefix||"",l="".concat(s,"badge"),c=o.customBadgeLabel,u="".concat(a?'
').concat(a,"
"):"",'\n
').concat(r.getName(),"
");i.innerHTML=c?c(r):u}var d=i.style;d.display="block";var h=i?i.offsetHeight:0,f=0-h,p=n.topOff-h<0?-n.topOff:f,g=n.leftOff<0?-n.leftOff:0;d.top=p+"px",d.left=g+"px"}},showHighlighter:function(t){this.canvas.getHighlighter(t).style.opacity=""},initResize:function(t){var e,n=this.em,r=this.canvas,o=n?n.get("Editor"):"",a=(n?n.get("Config"):"").stylePrefix||"",s="".concat(a,"resizing"),l=!Object(c.isElement)(t)&&Object(u.q)(t)?t:n.getSelected(),d=l&&l.get("resizable"),h={},f=function(t,e,n){var r=n.docs;r&&r.forEach(function(e){var n=e.body,r=n.className||"";n.className=("add"==t?"".concat(r," ").concat(s):r.replace(s,"")).trim()})};if(o&&d){var p=Object(c.isElement)(t)?t:l.getEl();h={onStart:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.el,a=i.config,s=i.resizer,c=a.keyHeight,d=a.keyWidth,h=a.currentUnit,p=a.keepAutoHeight,g=a.keepAutoWidth;f("add",0,i),e=n.get("StyleManager").getModelToStyle(l),r.toggleFramesEvents();var v=getComputedStyle(o),m=e.getStyle(),b=m[d];a.autoWidth=g&&"auto"===b,isNaN(parseFloat(b))&&(b=v[d]);var y=m[c];a.autoHeight=p&&"auto"===y,isNaN(parseFloat(y))&&(y=v[c]),s.startDim.w=parseFloat(b),s.startDim.h=parseFloat(y),x=0,h&&(a.unitHeight=Object(u.i)(y),a.unitWidth=Object(u.i)(b))},onMove:function(){o.trigger("component:resize")},onEnd:function(t,e){f("remove",0,e),o.trigger("component:resize"),r.toggleFramesEvents(1),x=1},updateTarget:function(t,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var a=o.store,s=o.selectedHandler,l=o.config,c=l.keyHeight,u=l.keyWidth,d=l.autoHeight,h=l.autoWidth,f=l.unitWidth,p=l.unitHeight,g=["tc","bc"].indexOf(s)>=0,v=["cl","cr"].indexOf(s)>=0,m={},b=a?"":1;if(!g){var y=r.getBody().offsetWidth,x=i.w0&&void 0!==arguments[0]?arguments[0]:{};return this.canvas.getBadgeEl(t.view)},onFrameScroll:function(){this.updateTools()},updateTools:function(){this.updateToolsLocal(),this.updateGlobalPos()},isCompSelected:function(t){return t&&"selected"===t.get("status")},updateToolsLocal:function(t){var e=t||this.getElHovered(),n=e.el,r=e.pos,i=e.view,o=e.component;if(n){var a=o.get("hoverable"),s=this.lastHovered!==n,l=s?{}:{posOnly:1};s&&a&&(this.lastHovered=n,this.showHighlighter(i),this.showElementOffset(n,r,{view:i})),this.isCompSelected(o)&&(this.hideHighlighter(i),this.hideElementOffset(i));var c="px",u=this.toggleToolsEl(1,i).style,d=this.canvas.canvasRectOffset(n,r),h=d.top,f=d.left;this.updateBadge(n,r,w(w({},l),{},{view:i,topOff:h,leftOff:f})),u.top=h+c,u.left=f+c,u.width=r.width+c,u.height=r.height+c}else this.lastHovered=0},_upToolbar:Object(c.debounce)(function(){this.updateToolsGlobal({force:1})}),updateToolsGlobal:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.getElSelected(),n=e.el,r=e.pos,i=e.component;if(!n)return this.toggleToolsEl(),void(this.lastSelected=0);var o=this.canvas;(this.lastSelected!==n||t.force)&&(this.lastSelected=n,this.updateToolbar(i));var a="px",s=this.toggleToolsEl(1).style,l=o.getTargetToElementFixed(n,o.getToolbarEl(),{pos:r}),c=l.canvasOffsetTop,u=l.canvasOffsetLeft;s.top=c+a,s.left=u+a,s.width=r.width+a,s.height=r.height+a,this.updateToolbarPos({top:l.top,left:l.left})},updateAttached:Object(c.debounce)(function(){this.updateGlobalPos()}),onContainerChange:Object(c.debounce)(function(){this.em.refreshCanvas()},150),getElementPos:function(t){return this.canvas.getCanvasView().getElementPos(t)},hideBadge:function(){this.getBadge().style.display="none"},cleanPrevious:function(t){t&&t.set({status:"",state:""})},getContentWindow:function(){return this.canvas.getWindow()},run:function(t){this.editor=t&&t.get("Editor"),this.enable()},stop:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.em,i=this.editor;this.onHovered(),this.stopSelectComponent(),!n.preserveSelected&&r.setSelected(null),this.toggleToolsEl(),i&&i.stopCommand("resize")}}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return a()(this,t),this.opts={container:null,onStart:null,onDrag:null,onEnd:null,setPosition:null,getPosition:null,guidesStatic:null,guidesTarget:null,snapOffset:5,doc:0,scale:1},Object(c.bindAll)(this,"drag","stop","keyHandle","handleScroll"),this.setOptions(e),this.delta={x:0,y:0},this}return l()(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opts=h(h({},this.opts),t)}},{key:"toggleDrag",value:function(t){var e=this.getDocumentEl(),n=this.getContainerEl(),r=this.getWindowEl(),i=t?"on":"off",o={on:u.v,off:u.u};o[i](n,"mousemove dragover",this.drag),o[i](e,"mouseup dragend touchend",this.stop),o[i](e,"keydown",this.keyHandle),o[i](r,"scroll",this.handleScroll)}},{key:"handleScroll",value:function(){var t=this.lastScroll,e=this.delta,n=this.getScrollInfo(),r={x:n.x-t.x,y:n.y-t.y};this.move(e.x+r.x,e.y+r.y),this.lastScrollDiff=r}},{key:"start",value:function(t){var e=this.opts,n=e.onStart;this.toggleDrag(1),this.startPointer=this.getPointerPos(t),this.guidesStatic=Object(c.result)(e,"guidesStatic")||[],this.guidesTarget=Object(c.result)(e,"guidesTarget")||[],Object(c.isFunction)(n)&&n(t,this),this.startPosition=this.getStartPosition(),this.lastScrollDiff={x:0,y:0},this.globScrollDiff={x:0,y:0},this.drag(t)}},{key:"drag",value:function(t){var e=this,n=this.opts,r=this.lastScrollDiff,i=this.globScrollDiff,o=n.onDrag,a=this.startPointer,s=this.getPointerPos(t),l={x:i.x+r.x,y:i.y+r.y};this.globScrollDiff=l;var u={x:s.x-a.x+l.x,y:s.y-a.y+l.y};this.lastScrollDiff={x:0,y:0};var d=this.lockedAxis;"x"===(d=t.shiftKey?!d&&this.detectAxisLock(u.x,u.y):null)?u.x=a.x:"y"===d&&(u.y=a.y);var f=function(r){["x","y"].forEach(function(t){return r[t]=r[t]*Object(c.result)(n,"scale")}),e.delta=r,e.move(r.x,r.y),Object(c.isFunction)(o)&&o(t,e)},p=h({},u);if(this.currentPointer=s,this.lockedAxis=d,this.lastScroll=this.getScrollInfo(),f(u),this.guidesTarget.length){var g=this.snapGuides(p),v=g.newDelta,m=g.trgX,b=g.trgY;(m||b)&&f(v)}0===t.which&&this.stop(t)}},{key:"snapGuides",value:function(t){var e=this,n=t,r=this.trgX,i=this.trgY;return this.guidesTarget.forEach(function(n){n.x&&e.trgX||n.y&&e.trgY||(n.active=0,e.guidesStatic.forEach(function(o){if(!(n.y&&o.x||n.x&&o.y)){var a=n.y&&o.y,s=a?"y":"x",l=n[s],u=o[s],d=t[s],h=a?i:r;if(e.isPointIn(l,u)&&Object(c.isUndefined)(h)){var f=d-(l-u);e.setGuideLock(n,f)}}}))}),r=this.trgX,i=this.trgY,["x","y"].forEach(function(r){var i=r.toUpperCase(),o=e["trg".concat(i)];o&&!e.isPointIn(t[r],o.lock)&&(e.setGuideLock(o,null),o=null),o&&!Object(c.isUndefined)(o.lock)&&(n[r]=o.lock)}),{newDelta:n,trgX:this.trgX,trgY:this.trgY}}},{key:"isPointIn",value:function(t,e){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).offset||this.opts.snapOffset;return t>=e&&t<=e+n||t<=e&&t>=e-n}},{key:"setGuideLock",value:function(t,e){var n=Object(c.isUndefined)(t.x)?"Y":"X",r="trg".concat(n);return null!==e?(t.active=1,t.lock=e,this[r]=t):(delete t.active,delete t.lock,delete this[r]),t}},{key:"stop",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.delta,r=e.cancel,i=r?0:n.x,o=r?0:n.y;this.toggleDrag(),this.lockedAxis=null,this.move(i,o,1);var a=this.opts.onEnd;Object(c.isFunction)(a)&&a(t,this,{cancelled:r})}},{key:"keyHandle",value:function(t){Object(u.n)(t)&&this.stop(t,{cancel:1})}},{key:"move",value:function(t,e,n){var r=this.el,i=this.opts,o=this.startPosition;if(o){var a=i.setPosition,s=o.x+t,l=o.y+e;this.position={x:s,y:l,end:n},Object(c.isFunction)(a)&&a(this.position),r&&(r.style.left="".concat(s,"px"),r.style.top="".concat(l,"px"))}}},{key:"getContainerEl",value:function(){var t=this.opts.container;return t?[t]:this.getDocumentEl()}},{key:"getWindowEl",value:function(){return this.getContainerEl().map(function(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow})}},{key:"getDocumentEl",value:function(t){var e=this.opts.doc;if(t=t||this.el,!this.docs){var n=[document];t&&n.push(t.ownerDocument),e&&n.push(e),this.docs=n}return this.docs}},{key:"getPointerPos",value:function(t){var e=this.opts.getPointerPosition,n=Object(u.h)(t);return e?e(t):{x:n.clientX,y:n.clientY}}},{key:"getStartPosition",value:function(){var t=this.el,e=this.opts.getPosition,n={x:0,y:0};return Object(c.isFunction)(e)?n=e():t&&(n={x:parseFloat(t.style.left),y:parseFloat(t.style.top)}),n}},{key:"getScrollInfo",value:function(){var t=this.opts.doc,e=t&&t.body;return{y:e?e.scrollTop:0,x:e?e.scrollLeft:0}}},{key:"detectAxisLock",value:function(t,e){var n=t,r=e,i=Math.abs(n),o=Math.abs(r);return r>=i||r<=-i?"x":n>o||n<-o?"y":void 0}}]),t}()},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=i.a.$;e.a=i.a.View.extend({events:{change:"handleChange"},template:function(){return'')},inputClass:function(){return"".concat(this.ppfx,"field")},holderClass:function(){return"".concat(this.ppfx,"input-holder")},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.opts=t,this.ppfx=e,this.em=t.target||{},this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},setValue:function(t){var e=this.model,n=t||e.get("defaults"),r=this.getInputEl();r&&(r.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},handleChange:function(t){t.stopPropagation();var e=this.getInputEl().value;this.model.set({value:e},{fromInput:1}),this.elementUpdated()},getInputEl:function(){if(!this.inputEl){var t=this.model,e=this.opts.type||"text",n=t.get("placeholder")||t.get("defaults")||t.get("default")||"";this.inputEl=o(''))}return this.inputEl.get(0)},render:function(){this.inputEl=null;var t=this.$el;return t.addClass(this.inputClass()),t.html(this.template()),t.find(".".concat(this.holderClass())).append(this.getInputEl()),this}})},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r),o=n(9);e.default=i.a.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{},this.properties=[];var e=this.collection;this.listenTo(e,"add",this.addTo),this.listenTo(e,"reset",this.render)},addTo:function(t,e,n){this.add(t,null,n)},add:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e||this.el,i=new t.typeView({model:t,name:t.get("name"),id:this.pfx+t.get("property"),target:this.target,propTarget:this.propTarget,onChange:this.onChange,onInputRender:this.onInputRender,config:this.config});"composite"!=t.get("type")&&(i.customValue=this.customValue),i.render();var a=i.el;this.properties.push(i),i.updateVisibility(),Object(o.b)(r,a,n.at)},render:function(){var t=this,e=this.$el;this.clearItems();var n=document.createDocumentFragment();return this.collection.each(function(e){return t.add(e,n)}),e.empty(),e.append(n),e.attr("class","".concat(this.pfx,"properties")),this},remove:function(){i.a.View.prototype.remove.apply(this,arguments),this.clearItems()},clearItems:function(){this.properties.forEach(function(t){return t.remove()}),this.properties=[]}})},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n.n(i);e.a=o.a.View.extend({itemView:"",itemsView:"",itemType:"type",autoAdd:0,initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;this.config=e||t.config||{},this.autoAdd&&this.listenTo(this.collection,"add",this.addTo),this.items=[],this.init()},init:function(){},addTo:function(t){this.add(t)},itemViewNotFound:function(t){var e=this.config,n=this.ns,r=e.em,i="".concat(n?"[".concat(n,"]: "):"","'").concat(t,"' type not found");r&&r.logWarning(i)},add:function(t,e){var n,i=this.config,o=this.reuseView,a=this.items,s=this.itemsView,l=void 0===s?{}:s,c=e||null,u=this.itemView,d=t.get(this.itemType);l[d]?u=l[d]:!d||l[d]||Object(r.includes)(["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"],d)||this.itemViewNotFound(d),n=t.view&&o?t.view:new u({model:t,config:i},i),a&&a.push(n);var h=n.render().el;c?c.appendChild(h):this.$el.append(h)},render:function(){var t=document.createDocumentFragment();return this.clearItems(),this.$el.empty(),this.collection.length&&this.collection.each(function(e){this.add(e,t)},this),this.$el.append(t),this.onRender(),this},onRender:function(){},remove:function(){this.clearItems(),o.a.View.prototype.remove.apply(this,arguments)},clearItems:function(){this.items}})},function(t,e,n){"use strict";var r=n(8),i=n.n(r),o=n(2),a=n.n(o),s=n(1),l=n.n(s),c=n(0),u=n(5);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function h(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:[];return(e||[]).forEach(function(e){n.push(e.getId()),t(e.components(),n)}),n};e.a=l.a.Collection.extend({initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.opt=e,this.listenTo(this,"add",this.onAdd),this.listenTo(this,"remove",this.removeChildren),this.listenTo(this,"reset",this.resetChildren),this.config=e.config,this.em=e.em,this.domc=e.domc},resetChildren:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this,i=n.previousModels||[],o=i.filter(function(e){return!t.get(e.cid)}),a=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.map(function(e){n.push(e.getId()),t(e.components(),n)}),n}(t);n.keepIds=f(i).filter(function(t){return a.indexOf(t)>=0}),o.forEach(function(t){return e.removeChildren(t,r,n)}),t.each(function(t){return e.onAdd(t)})},removeChildren:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t){var i=this.domc,o=this.em,a=i?i.allById():{},s=r.temporary;if(t.prevColl=this,!s){var l=t.getId(),c=o.get("SelectorManager").getAll(),u=o.get("CssComposer").getAll(),d=(r.keepIds||[]).indexOf(l)<0;delete a[l];var h=d?u.remove(u.filter(function(t){return t.getSelectors().getFullString()==="#".concat(l)}),r):[];if(c.remove(h.map(function(t){return t.getSelectors().at(0)})),!t.opt.temporary){var f=o.get("Commands"),p=t.get("style-signature"),g={target:t};p&&f.run("core:component-style-clear",g),t.removed(),t.trigger("removed"),o.trigger("component:remove",t)}t.components().forEach(function(t){return n.removeChildren(t,e,r)})}var v=t.components(),m=o.get("UndoManager");o.stopListening(v),o.stopListening(t),o.stopListening(t.get("classes")),m.remove(t),m.remove(v)}},model:function(t,e){var n,r=e.collection.opt,i=r.em,o=i.get("DomComponents").componentTypes;e.em=i,e.config=r.config,e.componentTypes=o,e.domc=r.domc;for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:{},n=this.em,r=this.opt.domc,i=n.get("CssComposer"),o=n.get("Parser").parseHtml(t);return u.a.checkId(o.html,o.css,r.componentsById,e),o.css&&i&&!e.temporary&&i.addCollection(o.css,h(h({},e),{},{extend:1})),o.html},add:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.parent,n.keepIds=f(n.previousModels),Object(c.isString)(t)?t=this.parseString(t,n):Object(c.isArray)(t)&&t.forEach(function(r,i){if(Object(c.isString)(r)){var o=e.parseString(r,n);t[i]=Object(c.isArray)(o)&&!o.length?null:o}});var r=Object(c.isArray)(t);t=(r?t:[t]).filter(function(t){return t}).map(function(t){return e.processDef(t)}),t=r?Object(c.flatten)(t,1):t[0];var i=l.a.Collection.prototype.add.apply(this,[t,n]);return this.__firstAdd=i,i},processDef:function(t){if(t.cid&&t.ccid)return t;var e=this.em,n=this.config,r=(void 0===n?{}:n).processor,o=t;if(r){var a=r(o=h({},o));a&&(Object(c.each)(o,function(t,e){return delete o[e]}),Object(c.extend)(o,a))}if(o.$$typeof&&"object"==i()(o.props)){(o=h({},o)).props=h({},o.props);var s=e.get("DomComponents"),l=e.get("Parser").parserHtml;Object(c.each)(o,function(t,e){Object(c.includes)(["props","type"],e)||delete o[e]});var u=o.props,d=u.children;delete u.children,delete o.props;var f=l.splitPropsFromAttr(u);o.attributes=f.attrs,d&&(o.components=d),o.type?s.getType(o.type)||(o.tagName=o.type,delete o.type):o.type="textnode",Object(c.extend)(o,f.props)}return o},onAdd:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.domc,i=this.em,o=t.getStyle(),a=i&&i.getConfig("avoidInlineStyle");if(r&&r.Component.ensureInList(t),!Object(c.isEmpty)(o)&&!a&&i&&i.get&&i.getConfig("forceClass")&&!n.temporary){var s=t.cid;i.get("CssComposer").setClassRule(s,o),t.setStyle({}),t.addClass(s)}this.__onAddEnd()},__onAddEnd:Object(c.debounce)(function(){})})},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r);i.a.$,e.default=i.a.View.extend({initialize:function(t){this.config=t||{},this.editorModel=this.em=this.config.em||{},this.pfx=this.config.stylePrefix,this.ppfx=this.config.pStylePrefix,this.hoverClass=this.pfx+"hover",this.badgeClass=this.pfx+"badge",this.plhClass=this.pfx+"placeholder",this.freezClass=this.ppfx+"freezed",this.canvas=this.em.get&&this.em.get("Canvas"),this.em.get&&this.setElement(this.getCanvas()),this.canvas&&(this.$canvas=this.$el,this.canvasTool=this.getCanvasTools()),this.init(this.config)},onFrameScroll:function(t){},getCanvas:function(){return this.canvas.getElement()},getCanvasBody:function(){return this.canvas.getBody()},getCanvasWrapper:function(){return this.canvas.getWrapperEl()},getCanvasTools:function(){return this.canvas.getToolsEl()},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+t.ownerDocument.body.scrollTop,left:e.left+t.ownerDocument.body.scrollLeft}},init:function(t){},callRun:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id;if(t.trigger("run:".concat(n,":before"),e),!e||!e.abort){var r=e.sender||t,i=this.run(t,r,e);return t.trigger("run:".concat(n),i,e),t.trigger("run",n,i,e),i}t.trigger("abort:".concat(n),e)},callStop:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id,r=e.sender||t;t.trigger("stop:".concat(n,":before"),e);var i=this.stop(t,r,e);return t.trigger("stop:".concat(n),i,e),t.trigger("stop",n,i,e),i},stopCommand:function(){this.em.get("Commands").stop(this.id)},run:function(t,e){},stop:function(t,e){}})},function(t,e,n){"use strict";var r=n(2),i=n.n(r),o=n(0),a=n(3),s=n(29);function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function c(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(o.isString)(e)&&(e=u(e));var r=this.getStyle(),i=c({},e);this.set("style",i,n);var s=Object(a.x)(r,i);return Object(o.keys)(s).forEach(function(e){var n=t.em;t.trigger("change:style:".concat(e)),n&&(n.trigger("styleable:change",t,e),n.trigger("styleable:change:".concat(e),t,e))}),i},addStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"string"==typeof t?t={prop:e}:n=e||{},t=this.extendStyle(t),this.setStyle(t,n)},removeStyle:function(t){var e=this.getStyle();delete e[t],this.setStyle(e)},styleToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.getStyle();for(var r in n){var i=t.important,a=Object(o.isArray)(i)?i.indexOf(r)>=0:i,s="".concat(n[r]).concat(a?" !important":""),l="__"==r.substr(0,2);s&&!l&&e.push("".concat(r,":").concat(s,";"))}return e.join("")},getSelectors:function(){return this.get("selectors")||this.get("classes")},getSelectorsString:function(){return this.selectorsToString?this.selectorsToString():this.getSelectors().getFullString()}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(1),a=n.n(o),s=n(30),l=n(0),c=n(3);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function d(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.get("id")||"",r=this.get("name")||"";!this.get("property")&&this.set("property",(r||n).replace(/ /g,"-"));var i=this.get("property");!this.get("id")&&this.set("id",i),!r&&this.set("name",Object(c.c)(i).replace(/-/g," ")),h.callInit(this,t,e)},init:function(){},clearValue:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0,status:""},t),this},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parseValue(t),i=!e;!i&&this.set({value:void 0},{avoidStore:i,silent:!0}),this.set(r,d({avoidStore:i},n))},setValueFromInput:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.setValue(t,e,d(d({},n),{},{fromInput:1}))},parseValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={value:t},r="!important";if(Object(l.isString)(t)&&-1!==t.indexOf(r)&&(n.value=t.replace(r,"").trim(),n.important=1),!this.get("functionName")&&!e.complete)return n;var i=[],o="".concat(n.value),a=o.indexOf("(")+1,s=o.lastIndexOf(")"),c=o.substring(0,a-1);if(c&&(n.functionName=c),i.push(a),s>=0&&i.push(s),n.value=String.prototype.substring.apply(o,i),e.numeric){var u=parseFloat(n.value);n.unit=n.value.replace(u,""),n.value=u}return n},splitValues:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",",n=[],r="",i=0;return(t||"").split("").forEach(function(t){"("==t?(i++,r+="("):")"==t&&i>0?(i--,r+=")"):t===e&&0==i?(n.push(r),r=""):r+=t}),""!==r&&n.push(r),n.map(function(t){return t.trim()})},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=this.getDefaultValue(),r=Object(l.isUndefined)(t)?this.get("value"):t,i=!Object(l.isUndefined)(r)&&""!==r;if(r&&n&&r===n)return n;if(e&&i){var o="url"===e?"'".concat(r.replace(/'/g,""),"'"):r;r="".concat(e,"(").concat(o,")")}return i&&this.get("important")&&(r="".concat(r," !important")),r||""}},{callParentInit:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};t.prototype.initialize.apply(e,[n,d(d({},r),{},{skipInit:1})])},callInit:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!n.skipInit&&t.init(e,n)}}),f=h;function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function g(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f.callParentInit(f,this,t,e);var r=this.get("properties")||[],i=n(24).default;this.set("properties",new i(r)),this.listenTo(this,"change:value",this.updateValues),f.callInit(this,t,e)},clearValue:function(){return this.get("properties").each(function(t){return t.clearValue()}),f.prototype.clearValue.apply(this,arguments)},updateValues:function(){var t=this.getFullValue().split(this.getSplitSeparator());this.get("properties").each(function(e,n){var r=t.length;t[n]||t[n%r+(1!=r&&r%2?1:0)]})},getSplitSeparator:function(){return new RegExp("".concat(this.get("separator"),"(?![^\\(]*\\))"))},getDefaultValue:function(t){var e=this.get("defaults");return e&&!t?e:(e="",this.get("properties").each(function(t,n){return e+="".concat(t.getDefaultValue()," ")}),e.trim())},getFullValue:function(){return this.get("detached")?"":this.get("properties").getFullValue()},getPropertyAt:function(t){return this.get("properties").at(t)}}),m=a.a.Model.extend({defaults:{index:"",value:"",values:{},active:!1,preview:!1,properties:[]},initialize:function(){var t=this.get("properties"),e=this.get("value");this.set("properties",t instanceof bt?t:new bt(t));var n=this.get("properties");if(n.forEach(this.onPropAdd,this),this.listenTo(n,"add",this.onPropAdd),!e){var r="",i=this.get("values");for(var o in i)r+=" "+i[o];this.set("value",r.trim())}},onPropAdd:function(t){var e=this.collection;t.parent=e&&e.property},getPropertyAt:function(t){return this.get("properties").at(t)},getPropertyValue:function(t){var e="";return this.get("properties").each(function(n){n.get("property")==t&&(e=n.getFullValue())}),e},getFullValue:function(){var t=[];return this.get("properties").each(function(e){return t.push(e.getFullValue())}),t.join(" ").trim()}});function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function y(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v.callParentInit(v,this,t,e);var n=this.get("layers"),r=new w(n);r.property=this,r.properties=this.get("properties"),this.set("layers",r),v.callInit(this,t,e)},getLayers:function(){return this.get("layers")},getCurrentLayer:function(){return this.getLayers().filter(function(t){return t.get("active")})[0]},getFullValue:function(){return this.get("detached")?"":this.get("layers").getFullValue()},getValueFromStyle:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.getLayers().getLayersFromStyle(t);return new w(e).getFullValue()},clearValue:function(){return this.getLayers().reset(),v.prototype.clearValue.apply(this,arguments)},getValueFromTarget:function(t){var e=this.attributes,n=e.detached,r=e.property,i=e.properties,o=t.getStyle(),a={};return i.forEach(function(t){var e=t.get("property"),n=o[e];n&&(a[e]=n)}),n?Object(l.keys)(a).length?a:"":o[r]},getLayersFromTarget:function(t){}}),S=n(25),k=n.n(S);function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function T(t){for(var e=1;e\n
\n ')},templateLabel:function(t){var e=this.pfx,n=this.em,r=t.parent,i=t.attributes,o=i.icon,a=void 0===o?"":o,s=i.info,l=void 0===s?"":s,c=i.id,u=i.name,d=n&&n.t("styleManager.properties.".concat(c))||u;return'\n \n ').concat(d,"\n \n ").concat(r?"":'"),"\n ")},templateInput:function(t){return'\n
\n \n
\n ')},events:i()({change:"inputValueChanged"},"click [".concat(P,"]"),"clear"),initialize:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(l.bindAll)(this,"targetUpdated","__change","__updateStyle"),this.config=e.config||{};var n=this.config.em;this.em=n,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=e.target||{},this.propTarget=e.propTarget||{},this.onChange=e.onChange,this.onInputRender=e.onInputRender||{},this.customValue=e.customValue||{};var r=this.model;this.property=r.get("property"),this.input=null;var i=this.pfx;if(this.inputHolderId="#"+i+"input-holder",this.sector=r.collection&&r.collection.sector,this.__destroyFn=this.destroy?this.destroy.bind(this):function(){},r.view=this,r.get("value")||r.set("value",r.getDefaultValue()),n){this.listenTo(n,"update:component:style:".concat(this.property),this.targetUpdated);var o=r.get("requires")||{};Object.keys(o).forEach(function(e){t.listenTo(n,"component:styleUpdate:".concat(e),t.targetUpdated)})}this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(r,"destroy remove",this.remove),this.listenTo(r,"change:value",this.modelValueChanged),this.listenTo(r,"targetUpdated",this.targetUpdated),this.listenTo(r,"change:visible",this.updateVisibility),this.listenTo(r,"change:status",this.updateStatus),this.listenTo(r,"change:name change:className change:full",this.render);var a=this.init&&this.init.bind(this);a&&a()},remove:function(){var t=this;a.a.View.prototype.remove.apply(this,arguments),["em","target","input","$input","propTarget","sector"].forEach(function(e){return t[e]={}}),this.__destroyFn(this._getClbOpts())},updateStatus:function(){var t=this.model,e=t.get("status"),n=t.parent,r=this.pfx,i=this.ppfx,o=this.config,a="".concat(i,"four-color"),s="".concat(i,"color-warn"),l=this.$el.children(".".concat(r,"label")),c=this.getClearEl(),u=c?c.style:{};switch(l.removeClass("".concat(a," ").concat(s)),u.display="none",e){case"updated":!n&&l.addClass(a),o.clearProperties&&(u.display="inline");break;case"computed":l.addClass(s)}},clear:function(t){var e=this;t&&t.stopPropagation(),this.model.clearValue(),setTimeout(function(){return e.targetUpdated()})},getClearEl:function(){return this.clearEl||(this.clearEl=this.el.querySelector("[".concat(P,"]"))),this.clearEl},getTarget:function(){return this.getTargetModel()},getTargets:function(){return this.propTarget.targets||[this.getTarget()]},getFirstTarget:function(){return this.getTargets()[0]},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(t){t&&t.stopPropagation(),this.emit||(this.model.setValueFromInput(this.getInputValue()),this.elementUpdated())},elementUpdated:function(){this.setStatus("updated")},setStatus:function(t){this.model.set("status",t);var e=this.model.parent;e&&"updated"==t&&e.set("status",t)},emitUpdateTarget:Object(l.debounce)(function(){var t=this.config.em;t&&t.trigger("styleManager:update:target",this.getFirstTarget())}),_getTargetData:function(){var t=this.model,e=this.config,n=this.getTargetValue({ignoreDefault:1}),r=t.getDefaultValue(),i=this.getComputedValue(),o="",a="";return n?(o=n,e.highlightChanged&&(a="updated")):i&&e.showComputed&&i!=r?(o=i,e.highlightComputed&&(a="computed")):(o=r,a=""),{value:o,status:a,targetValue:n,defaultValue:r,computedValue:i}},targetUpdated:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.config.fromLayer&&(this.emitUpdateTarget(),this.checkVisibility())){var r=this.config.em,i=this.model,o=i.get("property"),a=this._getTargetData(),s=a.status,l=a.value,c=T({status:s,value:l},k()(a,["status","value"]));return this.setStatus(s),i.setValue(l,0,T({fromTarget:1},n)),r&&(r.trigger("styleManager:change",this,o,l,c),r.trigger("styleManager:change:".concat(o),this,l,c),this._emitUpdate(c)),c}},_emitUpdate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.em,n=this.model;if(e){var r=n.get("property"),i=T(T({},this._getEventData()),t),o=i.id;e.trigger("style:update",i),e.trigger("style:update:".concat(r),i),r!==o&&e.trigger("style:update:".concat(o),i)}},_getEventData:function(){var t=this.model;return{propertyView:this,targets:this.getTargets(),value:t.getFullValue(),property:t,id:t.get("id"),name:t.get("property")}},checkVisibility:function(){var t=1;return this.config.hideNotStylable&&(this.isTargetStylable()&&this.isComponentStylable()?this.show():(this.hide(),t=0),this.sector&&this.sector.trigger("updateVisibility")),t},getTargetValue:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.model,r=this.getFirstTarget(),i=this.customValue;if(!r)return t;if((t=r.getStyle()[n.get("property")])||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof i&&!e.ignoreCustomValue){var o=i(this,n.collection.indexOf(n),t);o&&(t=o)}return t},getComputedValue:function(){var t=this.propTarget,e=t.computed||{},n=t.computedDefault||{},r=this.config.avoidComputed||[],i=this.model.get("property"),o=r.indexOf(i)<0,a=e[i],s=n[Object(c.b)(i)];return e&&o&&s!==a&&a||""},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.model,a=o.getFullValue();if(r.fromInput||this.setValue(a),!r.fromTarget){this.getTargets().forEach(function(t){return n.__updateTarget(t,r)});var s=this.config.em;if(!s)return;var l=o.get("property"),c=i()({},l,a);s.getSelectedAll().forEach(function(t){!r.noEmit&&s.trigger("component:update",t,c,r),s.trigger("component:styleUpdate",t,l,r),s.trigger("component:styleUpdate:".concat(l),t,a,r),t.trigger("change:style",t,c,r),t.trigger("change:style:".concat(l),t,a,r)})}},__updateTarget:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model.getFullValue(),r=this.onChange;t&&this.isComponentStylable()&&(e.fromTarget||(r&&!e.fromParent?r(t,this,e):this.updateTargetStyle(n,null,T(T({},e),{},{target:t}))),this._emitUpdate())},updateTargetStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e||this.model.get("property"),i=n.target||this.getFirstTarget(),o=i.getStyle();t?o[r]=t:delete o[r],n.avoidStore?o.__=1:delete o.__,i.setStyle(o,n);var a=this.getHelperModel();a&&a.setStyle(o,n)},isTargetStylable:function(t){var e=t||this.getFirstTarget(),n=this.model,r=n.get("id"),i=n.get("property"),o=n.get("toRequire"),a=e.get("unstylable"),s=e.get("stylable-require"),c=n.get("requires"),u=n.get("requiresParent"),d=this.sector?this.sector.collection:null,h=this.em?this.em.getSelected():null,f=e.get("stylable");if(Object(l.isArray)(f)&&(f=f.indexOf(i)>=0),Object(l.isArray)(a)&&(f=a.indexOf(i)<0),o&&(f=!t||s&&(s.indexOf(r)>=0||s.indexOf(i)>=0)),d&&c){var p=Object.keys(c);d.each(function(t){t.get("properties").each(function(t){if(Object(l.includes)(p,t.id)){var e=c[t.id];f=f&&Object(l.includes)(e,t.get("value"))}})})}if(u){var g=h&&h.parent(),v=g&&g.getEl();if(v){var m=window.getComputedStyle(v);Object(l.each)(u,function(t,e){f=f&&m[e]&&Object(l.includes)(t,m[e])})}else f=!1}return f},isComponentStylable:function(){var t=this.em,e=t&&t.getSelected();return!e||this.isTargetStylable(e)},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=this.model,n=Object(l.isUndefined)(t)?e.getDefaultValue():t;if(this.update)return this.__update(n);var r=this.getInputEl();r&&(r.value=n)},getInputEl:function(){return this.input||(this.input=this.el.querySelector("input")),this.input},updateVisibility:function(){this.el.style.display=this.model.get("visible")?"":"none"},show:function(){this.model.set("visible",1)},hide:function(){this.model.set("visible",0)},cleanValue:function(){this.setValue("")},clearCached:function(){this.clearEl=null,this.input=null,this.$input=null},__update:function(t){var e=this.update&&this.update.bind(this);e&&e(T(T({},this._getClbOpts()),{},{value:t}))},__change:function(){for(var t=this.emit&&this.emit.bind(this),e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=e.complete,r=k()(e,["complete"]),i=!1!==n;Object(c.o)(t)?this.getTargets().forEach(function(e){return e.addStyle(t,{avoidStore:!i})}):this.model.setValueFromInput(t,n,r),i&&this.elementUpdated()},_getClbOpts:function(){var t=this.model;return{el:this.el,props:t.attributes,setProps:function(){return t.set.apply(t,arguments)},change:this.__change,updateStyle:this.__updateStyle,targets:this.getTargets()}},render:function(){this.clearCached();var t=this.pfx,e=this.model,n=this.el,r=this.$el,i=e.get("property"),o=e.get("full"),a=e.get("className")||"",s="".concat(t,"property");this.createdEl&&this.__destroyFn(this._getClbOpts()),r.empty().append(this.template(e)),r.find("[data-sm-label]").append(this.templateLabel(e));var l=this.create&&this.create.bind(this);this.createdEl=l&&l(this._getClbOpts()),r.find("[data-sm-fields]").append(this.createdEl||this.templateInput(e)),n.className="".concat(s," ").concat(t).concat(e.get("type")," ").concat(s,"__").concat(i," ").concat(a).trim(),n.className+=o?" ".concat(s,"--full"):"",this.updateStatus();var c=this.onRender&&this.onRender.bind(this);c&&c(),this.setValue(e.get("value"),{fromTarget:1})}});function M(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function D(t){for(var e=1;e\n \n \n ')},inputValueChanged:function(){if(!this.model.get("detached")){for(var t=arguments.length,e=new Array(t),n=0;n'),this.input=this.$input.get(0)),this.props||(this.props=t.get("properties")),!this.$props)){this.props.each(function(e,n){e&&"composite"==e.get("type")&&(this.props.remove(e),console.warn("Nested composite types not yet allowed.")),e.parent=t},this);var r=new(0,n(19).default)(this.getPropsConfig());this.$props=r.render().$el,this.properties=r.properties,this.$el.find("#".concat(this.pfx,"input-holder")).append(this.$props)}},getPropsConfig:function(t){var e=this,n=this.model,r={config:D(D({},this.config),{},{highlightComputed:0}),collection:this.props,target:this.target,propTarget:this.propTarget,onChange:function(t,e,r){n.set("value",n.getFullValue(),r)},customValue:function(t,n){return e.valueOnIndex(n,t)}};return n.get("detached")&&delete r.onChange,r},valueOnIndex:function(t,e){var n=this.getTargetValue({ignoreDefault:1});return n?n.split(this.model.getSplitSeparator())[t]:e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1})},clearCached:function(){E.prototype.clearCached.apply(this,arguments),this.$input=null,this.props=null,this.$props=null}}),_=n(19);function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function I(t){for(var e=1;e\n \n \n
').concat(i,'
\n
\n \t
\n
\n
\n ⨯\n
\n
\n
\n ')},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model;this.stackModel=t.stackModel,this.config=t.config||{},this.em=this.config.em,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.sorter=t.sorter||null,this.propsConfig=t.propsConfig||{},this.customPreview=t.onPreview,this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:active",this.updateVisibility),this.listenTo(e.get("properties"),"change",this.updatePreview),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data("model",e)},initSorter:function(t){this.sorter&&this.sorter.startSort(this.el)},removeItem:function(t){t&&t.stopPropagation(),this.remove()},remove:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=this.props,r=e.collection,i=this.stackModel;a.a.View.prototype.remove.apply(this,arguments),r&&r.contains(e)&&r.remove(e),i&&i.set&&(i.set({stackIndex:null},{silent:!0}),!t.fromTarget&&i.trigger("updateValue")),n&&n.remove()},onPreview:function(t){var e=this.stackModel,n=e&&e.get("detached"),r=t.split(" "),i=[],o={};return this.model.get("properties").each(function(t,e){var a=t.get("property"),s=n?t.getFullValue():r[e]||"";if(s&&"integer"==t.get("type")){var l=parseInt(s,10),c=s.replace(l,"");s=(l=(l=(l=isNaN(l)?0:l)>3?3:l)<-3?-3:l)+c}i.push(s),o[a]=s}),n?o:i.join(" ")},updatePreview:function(){var t=this.stackModel,e=this.customPreview,n=this.getPreviewEl(),r=this.model.getFullValue(),i=e?e(r):this.onPreview(r);if(i&&t&&n){var o=n.style;if(Object(l.isString)(i))o[t.get("property")]=i;else{var a=[];Object(l.each)(i,function(t,e){return a.push("".concat(e,":").concat(t))}),n.setAttribute("style",a.join(";"))}}},getPropertiesWrapper:function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector("[data-properties]")),this.propsWrapEl},getPreviewEl:function(){return this.previewEl||(this.previewEl=this.el.querySelector("[data-preview]")),this.previewEl},active:function(){var t=this.model,e=t.collection;e.active(e.indexOf(t))},updateVisibility:function(){var t=this.pfx,e=this.getPropertiesWrapper(),n=this.model.get("active");e.style.display=n?"":"none",this.$el[n?"addClass":"removeClass"]("".concat(t,"active"))},render:function(){var t=this.propsConfig,e=this.model,n=this.el,r=this.pfx,i=e.get("preview"),o=new _.default({collection:e.get("properties"),config:I(I({},this.config),{},{fromLayer:1}),target:t.target,customValue:t.customValue,propTarget:t.propTarget,onChange:t.onChange}),a=o.render().el;return n.innerHTML=this.template(e),n.className="".concat(r,"layer").concat(i?"":" ".concat(r,"no-preview")),this.props=o,this.getPropertiesWrapper().appendChild(a),this.updateVisibility(),this.updatePreview(),this}}),V=a.a.View.extend({initialize:function(t){this.config=t.config||{},this.stackModel=t.stackModel,this.preview=t.preview,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.propsConfig=t.propsConfig;var e=this.pfx,n=this.ppfx,r=this.collection;this.className="".concat(e,"layers ").concat(n,"field"),this.listenTo(r,"add",this.addTo),this.listenTo(r,"deselectAll",this.deselectAll),this.listenTo(r,"reset",this.reset),this.items=[];var i=this.config.em||"",o=i?i.get("Utils"):"";this.sorter=o?new o.Sorter({container:this.el,ignoreViewChildren:1,containerSel:".".concat(e,"layers"),itemSel:".".concat(e,"layer"),pfx:this.config.pStylePrefix}):"",r.view=this,this.$el.data("model",r),this.$el.data("collection",r)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var r=e||null,i=this.stackModel,o=this.config,a=this.sorter,s=this.propsConfig;void 0!==this.preview&&t.set("preview",this.preview);var l=new F({model:t,config:o,sorter:a,stackModel:i,propsConfig:s}),c=l.render().el;if(this.items.push(l),r)r.appendChild(c);else if(void 0!==n){var u="before";this.$el.children().length==n&&(n--,u="after"),n<0?this.$el.append(c):this.$el.children().eq(n)[u](c)}else this.$el.append(c);return c},deselectAll:function(){this.$el.find("."+this.pfx+"layer").removeClass(this.pfx+"active")},reset:function(t,e){this.clearItems(e),this.render()},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.addToCollection(e,t)},this),this.$el.append(t),this.$el.attr("class",this.className),this.sorter&&(this.sorter.plh=null),this},remove:function(){this.clearItems(),a.a.View.prototype.remove.apply(this,arguments)},clearItems:function(t){this.items.forEach(function(e){return e.remove(t)}),this.items=[]}});function R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var z=new(n(31).a),H=L.extend({templateInput:function(){var t=this.pfx;return this.ppfx,'\n
\n \n
\n
\n ')},init:function(){var t=this.model;this.pfx,t.set("stackIndex",null),this.events["click [data-add-layer]"]="addLayer",this.listenTo(t,"change:stackIndex",this.indexChanged),this.listenTo(t,"updateValue",this.inputValueChanged),this.delegateEvents();var e=this.getPropsConfig();this.layers=new V({collection:this.getLayers(),stackModel:t,preview:t.get("preview"),config:this.config,propsConfig:e});var r=n(19).default;this.propsView=new r({target:this.target,collection:t.get("properties"),stackModel:t,config:this.config,onChange:e.onChange,propTarget:e.propTarget})},targetUpdated:function(){var t,e=this;if(this.model.get("detached"))t=this._getTargetData(),this.setStatus(t.status),this.checkVisibility();else{for(var n=arguments.length,r=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},e=this.model;t.up&&this.elementUpdated(),e.get("detached")?e.get("properties").each(function(t){return t.trigger("change:value")}):e.set("value",this.getLayerValues())},setValue:function(){},getLayerValues:function(){return this.getLayers().getFullValue()},_getClassRule:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.em,n=t.skipAdd,r=void 0===n?1:n,i=e.getSelected(),o=e.get("StyleManager").getModelToStyle(i,{skipAdd:r,useClasses:1});return o!==i&&o},_getParentTarget:function(t){for(var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em,i=this.model.get("property"),o=n.isValid||function(t){return t.getStyle()[i]},a=r.get("CssComposer").getAll().filter(function(e){return e.selectorsToString()===t.getSelectorsString()}).reduce(function(t,e){return t[e.getAtRule()]=e,t},{}),s=z.sortMediaObject(a).map(function(t){return t.value}),l=s.indexOf(t),c=s.splice(0,l),u=c.length-1;u>-1;u--){var d=c[u];if(o(d)){e=d;break}}return e},refreshLayers:function(){var t,e,n,r,i,o,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=[],c=this.model,u=this.em,d=this.getLayers(),h=c.get("detached"),f=c.get("property"),p=this.getFirstTarget(),g=this.getComputedValue(),v=u.getSelected(),m={fromTarget:1};if(h){e=a.targetValue||{};var b=function(t){var e=c.get("properties").at(0).get("property");return t&&!Object(l.isUndefined)(t.getStyle()[e])};if(!Object(l.keys)(e).length&&g&&v){var y={isValid:function(t){return b(t)}};(r=this._getParentTarget(p,y))?e=r.getStyle():(n=this._getClassRule(),r=!(i=b(n)&&n.getStyle())&&this._getParentTarget(this._getClassRule({skipAdd:0}),y),o=b(r)&&r.getStyle(),e=i||o||{})}t=e,s=d.getLayersFromStyle(e)}else{var w=this.getTargetValue({ignoreDefault:1});!w&&g&&((r=this._getParentTarget(p))?w=r.getStyle()[f]:(o=(r=!(i=(n=this._getClassRule())&&n.getStyle()[f])&&this._getParentTarget(this._getClassRule({skipAdd:0})))&&r.getStyle()[f],w=i||o||g)),t=w=w==c.getDefaultValue()?"":w,s=d.getLayersFromValue(w)}var x=c.getLayersFromTarget(p,{resultValue:t,layersObj:s})||s;d.reset(null,m),d.add(x,m),c.set({stackIndex:null},{silent:!0})},getTargetValue:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=e.attributes.detached,r=this.getFirstTarget(),i=L.prototype.getTargetValue.call(this,t);return Object(l.isUndefined)(i)&&!n?i=e.getValueFromStyle(r.getStyle()):n&&(i=e.getValueFromTarget(r)),i},getPropsConfig:function(){var t=this,e=t.model;return{target:t.target,propTarget:t.propTarget,onChange:function(n,r,o){var a=r.model,s=e.get("status");if(e.get("detached")){var l=a.get("property"),c=a.getDefaultValue(),u=t.getLayers(),d=u.getPropertyValues(l,c);r.updateTargetStyle(d,null,o),"background-image"!=l||o.avoidStore||"computed"!=s||e.get("properties").filter(function(t){return"__"==t.get("property").substr(0,2)}).forEach(function(e){var n=e.get("property"),r=u.getPropertyValues(n,e.getDefaultValue());t.getTargets().forEach(function(t){return t.addStyle(i()({},n,r),o)})})}else if("updated"==s){var h=e.getFullValue();e.set("value",h,o),!h&&r.updateTargetStyle(h,null,o)}}}},onRender:function(){var t=this.el,e=this.layers,n=this.propsView,r=t.querySelector("[data-layers-wrapper]");n.render(),r.appendChild(e.render().el)}}),$=a.a.$,U=E.extend({templateInput:function(){var t=this.pfx,e=this.em;return'\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n ')},init:function(){var t=this.em;this.modal=t.get("Modal"),this.am=t.get("AssetManager"),this.events["click #"+this.pfx+"close"]="removeFile",this.events["click #"+this.pfx+"images"]="openAssetManager",this.delegateEvents()},onRender:function(){if(!this.$input){var t=this.model.getDefaultValue();this.$input=$(''))}this.$preview||(this.$preview=this.$el.find("#"+this.pfx+"preview-file")),this.$previewBox||(this.$previewBox=this.$el.find("#"+this.pfx+"preview-box")),this.setValue(this.componentValue,0)},clearCached:function(){E.prototype.clearCached.apply(this,arguments),this.$preview=null,this.$previewBox=null},setValue:function(t,e){E.prototype.setValue.apply(this,arguments),this.setPreviewView(t&&t!=this.model.getDefaultValue()),this.setPreview(t)},setPreviewView:function(t){var e=this.$previewBox;e&&e[t?"addClass":"removeClass"]("".concat(this.pfx,"show")),e&&e.css({display:t?"block":"none"})},spreadUrl:function(t){this.model.set("value",t),this.setPreviewView(1)},setPreview:function(t){var e=this.$preview;t=t&&t.indexOf("url(")<0?"url(".concat(t,")"):t,e&&e.css("background-image",t)},cleanValue:function(){this.setPreviewView(0),this.model.set({value:""},{silent:!0})},removeFile:function(){this.model.set("value",this.model.getDefaultValue());for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};e=K(K({},e),{},{silent:1}),this.inputInst.setValue(t,e)},remove:function(){var t=this;W.prototype.remove.apply(this,arguments);var e=this.inputInst;e&&e.remove&&e.remove(),["inputInst","$color"].forEach(function(e){return t[e]={}})},onRender:function(){if(!this.input){var t=this.ppfx,e=new q.a({target:this.target,model:this.model,ppfx:t}).render();this.el.querySelector(".".concat(t,"fields")).appendChild(e.el),this.$input=e.inputEl,this.$color=e.colorEl,this.input=this.$input.get(0),this.inputInst=e}}}),X=n(7),J=n.n(X);function Z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Q(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:[];return this.set("options",t),this},addOption:function(t){if(t){var e=this.getOptions();this.setOptions([].concat(J()(e),[t]))}return this}});function et(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function nt(t){for(var e=1;e\n \n
\n
\n
\n \n ')},initialize:function(){for(var t=arguments.length,e=new Array(t),n=0;n").concat(e,"")});var r=this.el.querySelector("#".concat(t,"input-holder"));r.innerHTML=""),this.input=r.firstChild}}})),ot=E.extend({templateInput:function(){this.pfx;var t=this.ppfx;return'\n
\n
\n ')},onRender:function(){var t=this.pfx,e=this.ppfx,n="".concat(e,"radio-item-label"),r=this.model,i=r.get("property"),o=r.get("list")||r.get("options")||[],a=r.cid,s="".concat(t,"radio ").concat(t,"radio-").concat(i);if(!this.input&&o&&o.length){var l="";o.forEach(function(r){var o=r.className?"".concat(r.className," ").concat(t,"icon ").concat(n):"",c="".concat(i,"-").concat(r.value,"-").concat(a),u=r.name||r.value,d=r.title?'title="'.concat(r.title,'"'):"";l+='\n
\n \n \n
\n ")});var c=this.el.querySelector(".".concat(e,"field"));c.innerHTML='
').concat(l,"
"),this.input=c.firstChild}},getInputValue:function(){var t=this.getCheckedEl();return t?t.value:""},getCheckedEl:function(){var t=this.getInputEl();return t?t.querySelector("input:checked"):""},setValue:function(t){var e=this.model,n=t||e.get("value")||e.getDefaultValue(),r=this.getInputEl(),i=r?r.querySelector('[value="'.concat(n,'"]')):"";if(i)i.checked=!0;else{var o=this.getCheckedEl();o&&(o.checked=!1)}}}),at=n(32);function st(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function lt(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f.callParentInit(f,this,t,e);var n=this.get("unit"),r=this.get("units");this.input=new at.a({model:this}),r.length&&!n&&this.set("unit",r[0]),f.callInit(this,t,e)},clearValue:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0,unit:void 0},t),this},parseValue:function(t){var e=f.prototype.parseValue.apply(this,arguments),n=this.input.validateInputValue(e.value,{deepCheck:1}),r=n.value,i=n.unit;return e.value=r,e.unit=i,e},getFullValue:function(){var t=this.get("value"),e=this.get("unit");return t=Object(l.isUndefined)(t)?"":t,e=!Object(l.isUndefined)(e)&&t?e:"",t="".concat(t).concat(e),f.prototype.getFullValue.apply(this,[t])}});function ut(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function dt(t){for(var e=1;e\n \n \n ')},getSliderEl:function(){return this.slider||(this.slider=this.el.querySelector("input[type=range]")),this.slider},inputValueChanged:function(){var t=this.model,e=t.get("step");this.getInputEl().value=this.getSliderEl().value;var n=this.getInputValue()-e;t.set("value",n,{avoidStore:1}).set("value",n+e),this.elementUpdated()},inputValueChangedSoft:function(){this.getInputEl().value=this.getSliderEl().value,this.model.set("value",this.getInputValue(),{avoidStore:1}),this.elementUpdated()},setValue:function(t){var e=this.model.parseValue(t);this.getSliderEl().value=parseFloat(e.value),W.prototype.setValue.apply(this,arguments)},onRender:function(){W.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")},clearCached:function(){W.prototype.clearCached.apply(this,arguments),this.slider=null}});function vt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function mt(t){for(var e=1;e=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r).a.$;e.default={startSelectPosition:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.isPointed=!1;var i=this.editorModel.get("Utils"),o=t.ownerDocument.body;i&&!this.sorter&&(this.sorter=new i.Sorter({container:o,placer:this.canvas.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,direction:"a",document:e,wmargin:1,nested:1,em:this.editorModel,canvasRelative:1,scale:function(){return n.em.getZoomDecimal()}})),r.onStart&&(this.sorter.onStart=r.onStart),t&&this.sorter.startSort(t,{container:o})},getOffsetDim:function(){var t=this.offset(this.canvas.getFrameEl()),e=this.offset(this.canvas.getElement());return{top:t.top-e.top,left:t.left-e.left}},stopSelectPosition:function(){this.posTargetCollection=null,this.posIndex="after"==this.posMethod&&0!==this.cDim.length?this.posIndex+1:this.posIndex,this.sorter&&(this.sorter.moved=0,this.sorter.endMove()),this.cDim&&(this.posIsLastEl=0!==this.cDim.length&&"after"==this.posMethod&&this.posIndex==this.cDim.length,this.posTargetEl=0===this.cDim.length?i(this.outsideElem):!this.posIsLastEl&&this.cDim[this.posIndex]?i(this.cDim[this.posIndex][5]).parent():i(this.outsideElem),this.posTargetModel=this.posTargetEl.data("model"),this.posTargetCollection=this.posTargetEl.data("model-comp"))},enable:function(){this.startSelectPosition()},nearFloat:function(t,e,n){var r=t||0,i=e||"before",o=n.length,a=0!==o&&"after"==i&&r==o;return 0!==o&&(!a&&!n[r][4]||n[r-1]&&!n[r-1][4]||a&&!n[r-1][4])?1:0},run:function(){this.enable()},stop:function(){this.stopSelectPosition(),this.$wrapper.css("cursor",""),this.$wrapper.unbind()}}},function(t,e,n){"use strict";var r=n(40);window.Promise=window.Promise||r.a,e.a="function"==typeof fetch?fetch.bind():function(t,e){return new r.a(function(n,i){var o=new XMLHttpRequest;for(var a in o.open(e.method||"get",t),o.withCredentials="include"==e.credentials,e.headers||{})o.setRequestHeader(a,e.headers[a]);o.onload=function(t){return n({status:o.status,statusText:o.statusText,text:function(){return r.a.resolve(o.responseText)}})},o.onerror=i,o.upload&&e.onProgress&&(o.upload.onprogress=e.onProgress),e.body?o.send(e.body):o.send()})}},function(t,e,n){"use strict";var r=n(8),i=n.n(r),o=n(0);e.a=function(t){var e=t,n="data-gjs-";return{compTypes:"",modelAttrStart:n,splitPropsFromAttr:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r={},i={};return Object(o.each)(e,function(e,a){if(0===a.indexOf(t.modelAttrStart)){var s=a.replace(n,""),l=e.length,c=e&&Object(o.isString)(e),u=c&&e.substr(0,1),d=c&&e.substr(l-1);e="false"!==(e="true"===e||e)&&e;try{e="{"==u&&"}"==d||"["==u&&"]"==d?JSON.parse(e):e}catch(t){}r[s]=e}else i[a]=e}),{props:r,attrs:i}},parseStyle:function(t){for(var e={},n=t.split(";"),r=0,i=n.length;r0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i&&i.type){var a=n.getBaseType();t=(r=n.getType(i.type))?r.model:a.model,e=r?r.view:a.view}else{var s=n.recognizeType(i);t=(r=s.type).model,e=r.view,i=s.attributes}var l=new t(i,o);return l.typeView=e,l};var r=this.init&&this.init.bind(this);r&&r()},recognizeType:function(t){for(var e=this.getTypes(),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r="",i=this.em,o=i&&i.getConfig("avoidInlineStyle"),a=t.styleToString(),s=t.get("classes"),l=n.wrapperIsBody,c=t.get("wrapper");if(this.ids.push("#".concat(t.getId())),s.each(function(t){return e.compCls.push(t.getFullName())}),!o&&a){var u="#".concat(t.getId());r="".concat(u=l&&c?"body":u,"{").concat(a,"}")}return t.components().each(function(t){return r+=e.buildFromModel(t,n)}),r},build:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.cssc,i=n.em||"";this.em=i,this.compCls=[],this.ids=[];var a=this.buildFromModel(t,n),s=Object(o.isUndefined)(n.clearStyles)&&i?i.getConfig("clearStyles"):n.clearStyles;if(r){var l=r.getAll(),c={},u=[];l.each(function(t){var r=t.getAtRule();if(r){var i=c[r];i?i.push(t):c[r]=[t]}else a+=e.buildFromRule(t,u,n)}),this.sortMediaObject(c).forEach(function(t){var r="",i=t.key;t.value.forEach(function(t){var o=e.buildFromRule(t,u,n);t.get("singleAtRule")?a+="".concat(i,"{").concat(o,"}"):r+=o}),r&&(a+="".concat(i,"{").concat(r,"}"))}),i&&s&&l.remove(u)}return a},buildFromRule:function(t,e){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="",a=t.selectorsToString({skipAdd:1}),s=t.get("selectorsAdd"),l=t.get("singleAtRule");if(t.get("selectors").each(function(t){var e=t.getFullName();(r.compCls.indexOf(e)>=0||r.ids.indexOf(e)>=0||i.keepUnusedStyles)&&(n=1)}),a&&n||s||l){var c=t.getDeclaration();c&&(o+=c)}else e.push(t);return o},getQueryLength:function(t){var e=/(-?\d*\.?\d+)\w{0,}/.exec(t);return e?parseFloat(e[1]):a},sortMediaObject:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[];return Object(o.each)(e,function(t,e){return n.push({key:e,value:t})}),n.sort(function(e,n){var r=[e.key,n.key].every(function(t){return-1!==t.indexOf("min-width")}),i=r?e.key:n.key,o=r?n.key:e.key;return t.getQueryLength(i)-t.getQueryLength(o)})}})},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=n(0),a=n(3),s=n(18);i.a.$,e.a=s.a.extend({events:{"change input":"handleChange","change select":"handleUnitChange","click [data-arrow-up]":"upArrowClick","click [data-arrow-down]":"downArrowClick","mousedown [data-arrows]":"downIncrement",keydown:"handleKeyDown"},template:function(){var t=this.ppfx;return'\n \n \n
\n
\n
\n
\n ')},inputClass:function(){var t=this.ppfx;return this.opts.contClass||"".concat(t,"field ").concat(t,"field-integer")},initialize:function(){s.a.prototype.initialize.apply(this,arguments),Object(o.bindAll)(this,"moveIncrement","upIncrement"),this.doc=document,this.listenTo(this.model,"change:unit",this.handleModelChange)},setValue:function(t,e){var n=e||{},r=this.validateInputValue(t,{deepCheck:1}),i={value:r.value};(r.unit||r.force)&&(i.unit=r.unit),this.model.set(i,n),n.silent&&this.handleModelChange()},handleChange:function(t){t.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()},handleUnitChange:function(t){t.stopPropagation();var e=this.getUnitEl().value;this.model.set("unit",e),this.elementUpdated()},handleKeyDown:function(t){"ArrowUp"===t.key&&(t.preventDefault(),this.upArrowClick()),"ArrowDown"===t.key&&(t.preventDefault(),this.downArrowClick())},elementUpdated:function(){this.model.trigger("el:change")},handleModelChange:function(){var t=this.model;this.getInputEl().value=t.get("value");var e=this.getUnitEl();e&&(e.value=t.get("unit")||"")},getUnitEl:function(){if(!this.unitEl){var t=this.model,e=t.get("units")||[];if(e.length){var n=[];e.forEach(function(e){var r=e==t.get("unit")?"selected":"";n.push(""))});var r=document.createElement("div");r.innerHTML='"),this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=parseFloat(t.get("value"));n=this.normalizeValue(n+e);var r=this.validateInputValue(n);t.set("value",r.value),this.elementUpdated()},downArrowClick:function(){var t=this.model,e=t.get("step"),n=parseFloat(t.get("value")),r=this.normalizeValue(n-e),i=this.validateInputValue(r);t.set("value",i.value),this.elementUpdated()},downIncrement:function(t){t.preventDefault(),this.moved=0;var e=this.model.get("value");e=this.normalizeValue(e),this.current={y:t.pageY,val:e},Object(a.v)(this.doc,"mousemove",this.moveIncrement),Object(a.v)(this.doc,"mouseup",this.upIncrement)},moveIncrement:function(t){this.moved=1;var e=this.model,n=e.get("step"),r=this.current,i=this.normalizeValue(r.val+(r.y-t.pageY)*n);return this.prValue=this.validateInputValue(i).value,e.set("value",this.prValue,{avoidStore:1}),!1},upIncrement:function(){var t=this.model,e=t.get("step");if(Object(a.u)(this.doc,"mouseup",this.upIncrement),Object(a.u)(this.doc,"mousemove",this.moveIncrement),this.prValue&&this.moved){var n=this.prValue-e;t.set("value",n,{avoidStore:1}).set("value",n+e),this.elementUpdated()}},normalizeValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.model.get("step"),r=0;if(isNaN(t))return e;if(t=parseFloat(t),Math.floor(t)!==t){var i=n.toString().split(".")[1];r=i?i.length:0}return r?parseFloat(t.toFixed(r)):t},validateInputValue:function(t,e){var n=0,r=e||{},i=this.model,a=Object(o.isUndefined)(t)?"":t,s=i.get("units")||[],l=i.get("unit")||s.length&&s[0]||"",c=i.get("max"),u=i.get("min"),d=!!i.get("limitlessMax"),h=!!i.get("limitlessMin");if(r.deepCheck){var f=i.get("fixedValues")||[];if(a){var p=new RegExp("^"+f.join("|"),"g");if(f.length&&p.test(a))a=a.match(p)[0],l="",n=1;else{var g=a+"";a+="",a=parseFloat(a.replace(",",".")),a=isNaN(a)?"":a;var v=g.replace(a,"");Object(o.indexOf)(s,v)>=0&&(l=v)}}}return d||Object(o.isUndefined)(c)||""===c||(a=a>c?c:a),h||Object(o.isUndefined)(u)||""===u||(a=a1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=this.editor.get("Parser").parseCss(t)),e.em=this.editor,a.prototype.add.apply(this,[t,e])}})},function(t,e,n){"use strict";var r=n(7),i=n.n(r),o=n(2),a=n.n(o),s=n(0),l=n(1),c=n.n(l),u=n(23),d=n(12);function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function f(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};this.config=t||{},this.opt=e,this.em=e.em,this.ensureSelectors()},clone:function(){var t=f({},this.opt),e=f({},this.attributes);return e.selectors=this.get("selectors").map(function(t){return t.clone()}),new this.constructor(e,t)},ensureSelectors:function(){var t=this.em,e=t&&t.get("SelectorManager"),n=[this,"change:selectors",this.ensureSelectors],r=this.getSelectors();if(this.stopListening.apply(this,n),r.models&&(r=i()(r.models)),Array.isArray(r)){var o=r.filter(function(t){return t}).map(function(t){return e?e.add(t):t});r=new d.a(o)}this.set("selectors",r),this.listenTo.apply(this,n)},getAtRule:function(){var t=this.get("atRuleType"),e=this.get("mediaText"),n=t?"@".concat(t):e?"@media":"";return n+(e&&n?" ".concat(e):"")},selectorsToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.em,r=this.get("state"),i=this.get("wrapper"),o=this.get("selectorsAdd"),a={escape:function(t){return p&&p.escape?p.escape(t):t}},s=i&&n&&n.getConfig("wrapperIsBody")?"body":this.get("selectors").getFullString(0,a),l=r&&!t.skipState?":".concat(r):"";return s&&e.push("".concat(s).concat(l)),o&&!t.skipAdd&&e.push(o),e.join(", ")},getDeclaration:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="",n=this.selectorsToString(),r=this.styleToString(t),i=this.get("singleAtRule");return(n||i)&&r&&(e=i?r:"".concat(n,"{").concat(r,"}")),e},toCSS:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="",n=this.getAtRule(),r=this.getDeclaration(t);return r&&(e=r),n&&e&&(e="".concat(n,"{").concat(e,"}")),e},toJSON:function(){for(var t=arguments.length,e=new Array(t),n=0;n3&&void 0!==arguments[3]?arguments[3]:{},i=e||"",o=n||"",a=r.selectorsAdd||"",l=r.atRuleType||"";t instanceof Array||t.models||(t=[t]);var c=Object(s.map)(t.models||t,function(t){return t.get("name")}),u=Object(s.map)(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var d=0;d2&&void 0!==arguments[2]?arguments[2]:{};t.views.forEach(function(t){if(t){var e=t.childrenView,n=t.scriptContainer;e&&e.stopListening(),n&&n.remove(),t.remove.apply(t)}}),t.components().forEach(function(t){return n.removeChildren(t,e,r)})},addTo:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.config.em,r=this.collection.indexOf(t);if(this.addToCollection(t,null,r),n&&!e.temporary){!function t(e){n.trigger("component:add",e),e.components().forEach(function(e){return t(e)})}(t)}},addToCollection:function(t,e,r){this.compView||(this.compView=n(6).default);for(var i=this.config,a=this.opts,s=this.em,l=e||null,c=i.frameView,u=void 0===c?{}:c,d=u.model&&t.getView(u.model),h=a.componentTypes||s&&s.get("DomComponents").getTypes(),f=t.get("type"),p=this.compView,g=0;g1&&void 0!==arguments[1]?arguments[1]:{}).previousModels,r=void 0===n?[]:n;this.parentEl.innerHTML="",r.forEach(function(t){return e.removeChildren(t,e.collection)}),t.each(function(t){return e.addToCollection(t)})},render:function(t){var e=this,n=this.el,r=document.createDocumentFragment();return this.parentEl=t||this.el,this.collection.each(function(t){return e.addToCollection(t,r)}),n.innerHTML="",n.appendChild(r),this}})},function(t,e,n){"use strict";var r,i=n(0),o=n(3),a=n(1),s=n.n(a),l=n(6),c=n(5),u="contentEditable",d=s.a.$;e.a=s.a.View.extend({events:{"mousedown [data-toggle-move]":"startSort","touchstart [data-toggle-move]":"startSort","click [data-toggle-visible]":"toggleVisibility","click [data-toggle-open]":"toggleOpening","click [data-toggle-select]":"handleSelect","mouseover [data-toggle-select]":"handleHover","mouseout [data-toggle-select]":"handleHoverOut","dblclick [data-name]":"handleEdit","focusout [data-name]":"handleEditEnd"},template:function(t){var e=this.pfx,n=this.ppfx,r=this.config,i=this.clsNoEdit,o=r.hidable,a=this.countChildren(t),s=a?"":this.clsNoChild,l="".concat(this.clsTitle," ").concat(s),c="".concat(this.clsTitleC," ").concat(n,"one-bg"),u="".concat(this.clsCaret," fa fa-chevron-right"),d="".concat(this.inputNameCls," ").concat(i," ").concat(n,"no-app"),h=this.level+1,f="".concat(30+10*h,"px"),p=t.getName(),g=t.getIcon(),v="".concat(e,"layer");return"\n ".concat(o?''):"",'\n
\n
\n
\n \n ').concat(g?'').concat(g,""):"",'\n ').concat(p,'\n
\n
\n
\n
').concat(a||"",'
\n
\n \n
\n
')},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(i.bindAll)(this,"__render"),this.opt=t,this.level=t.level;var e=t.config||{},n=e.onInit;this.config=e,this.em=t.config.em,this.ppfx=this.em.get("Config").stylePrefix,this.sorter=t.sorter||"",this.pfx=this.config.stylePrefix,this.parentView=t.parentView;var r=this.pfx,o=this.ppfx,a=this.model,s=a.get("components"),l=a.get("type")||"default";a.set("open",!1),this.listenTo(s,"remove add reset",this.checkChildren),this.listenTo(a,"change:status",this.updateStatus),this.listenTo(a,"change:open",this.updateOpening),this.listenTo(a,"change:layerable",this.updateLayerable),this.listenTo(a,"change:style:display",this.updateVisibility),this.className="".concat(r,"layer ").concat(r,"layer__t-").concat(l," no-select ").concat(o,"two-color"),this.inputNameCls="".concat(o,"layer-name"),this.clsTitleC="".concat(r,"layer-title-c"),this.clsTitle="".concat(r,"layer-title"),this.clsCaret="".concat(r,"layer-caret"),this.clsCount="".concat(r,"layer-count"),this.clsMove="".concat(r,"layer-move"),this.clsChildren="".concat(r,"layer-children"),this.clsNoChild="".concat(r,"layer-no-chld"),this.clsEdit="".concat(this.inputNameCls,"--edit"),this.clsNoEdit="".concat(this.inputNameCls,"--no-edit"),this.$el.data("model",a),this.$el.data("collection",s),a.viewLayer=this,n.bind(this)({component:a,render:this.__render,listenTo:this.listenTo})},getVisibilityEl:function(){return this.eyeEl||(this.eyeEl=this.$el.children(".".concat(this.pfx,"layer-vis"))),this.eyeEl},updateVisibility:function(){var t=this.pfx,e=this.model,n="".concat(t,"layer-hidden"),r="none"===e.getStyle().display?"addClass":"removeClass";this.$el[r](n),this.getVisibilityEl()[r]("fa-eye-slash")},toggleVisibility:function(t){t&&t.stopPropagation();var e=this.model,n=this.em,r="__prev-display",i=e.get(r),o=e.getStyle(),a=o.display;"none"==a?(delete o.display,i&&(o.display=i,e.unset(r))):(a&&e.set(r,a),o.display="none"),e.setStyle(o),n&&n.trigger("component:toggled")},handleEdit:function(t){t&&t.stopPropagation();var e=this.em,n=this.$el,r=this.clsNoEdit,i=this.clsEdit,o=this.getInputName();o[u]=!0,o.focus(),e&&e.setEditing(1),n.find(".".concat(this.inputNameCls)).removeClass(r).addClass(i)},handleEditEnd:function(t){t&&t.stopPropagation();var e=this.em,n=this.$el,r=this.clsNoEdit,i=this.clsEdit,o=this.getInputName(),a=o.textContent;o.scrollLeft=0,o[u]=!1,this.model.set({"custom-name":a}),e&&e.setEditing(0),n.find(".".concat(this.inputNameCls)).addClass(r).removeClass(i)},getInputName:function(){return this.inputName||(this.inputName=this.el.querySelector(".".concat(this.inputNameCls))),this.inputName},updateOpening:function(){var t=this.opt.opened||{},e=this.model,n="fa-chevron-down";e.get("open")?(this.$el.addClass("open"),this.getCaret().addClass(n),t[e.cid]=e):(this.$el.removeClass("open"),this.getCaret().removeClass(n),delete t[e.cid])},toggleOpening:function(t){var e=this.model;t.stopImmediatePropagation(),e.get("components").length&&e.set("open",!e.get("open"))},handleSelect:function(t){t.stopPropagation();var e=this.em,n=this.config,r=this.model;if(e){e.setSelected(r,{fromLayers:1,event:t});var i=n.scrollCanvas;i&&r.views.forEach(function(t){return t.scrollIntoView(i)})}},handleHover:function(t){t.stopPropagation();var e=this.em,n=this.config,r=this.model;e&&n.showHover&&e.setHovered(r,{fromLayers:1})},handleHoverOut:function(t){t.stopPropagation();var e=this.em,n=this.config;e&&n.showHover&&e.setHovered(0,{fromLayers:1})},startSort:function(t){t.stopPropagation();var e=this.em,n=this.sorter;t.button&&0!==t.button||n&&(n.onStart=function(t){return e.trigger("".concat(c.b,":start"),t)},n.onMoveClb=function(t){return e.trigger(c.b,t)},n.startSort(t.target))},freeze:function(){this.$el.addClass(this.pfx+"opac50"),this.model.set("open",0)},unfreeze:function(){this.$el.removeClass(this.pfx+"opac50")},updateStatus:function(t){l.default.prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover}])},isVisible:function(){var t=this.model.getStyle().display;return!(t&&"none"===t)},checkChildren:function(){var t=this.model,e=this.clsNoChild,n=this.countChildren(t),r=this.$el.children(".".concat(this.clsTitleC)).children(".".concat(this.clsTitle)),i=this.cnt;i||(i=this.$el.children("[data-count]").get(0),this.cnt=i),r[n?"removeClass":"addClass"](e),i&&(i.innerHTML=n||""),!n&&t.set("open",0)},countChildren:function(t){var e=0;return t.get("components").each(function(t){var n=this.opt.isCountable,r=this.config.hideTextnode;n&&!n(t,r)||e++},this),e},getCaret:function(){return this.caret&&this.caret.length||(this.pfx,this.caret=this.$el.children(".".concat(this.clsTitleC)).find(".".concat(this.clsCaret))),this.caret},setRoot:function(t){t=Object(i.isString)(t)?this.em.getWrapper().find(t)[0]:t;var e=Object(o.g)(t,d);e&&(this.stopListening(),this.model=e,this.initialize(this.opt),this.render())},updateLayerable:function(){(this.parentView||this).render()},render:function(){var t=this.model,e=this.config,o=this.pfx,a=this.ppfx,s=this.opt.isCountable,l=s&&!s(t,e.hideTextnode),c=this.isVisible(),u=this.$el.empty(),d=this.level+1;Object(i.isUndefined)(r)&&(r=n(90).default);var h=new r({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parentView:this,parent:t,level:d}).render().$el;return this.config.showWrapper||1!==d?(u.html(this.template(t)),u.find(".".concat(this.clsChildren)).append(h)):u.append(h),t.get("draggable")&&this.config.sortable||u.children(".".concat(this.clsMove)).remove(),!c&&(this.className+=" ".concat(o,"hide")),l&&(this.className+=" ".concat(a,"hidden")),u.attr("class",this.className),this.updateOpening(),this.updateStatus(),this.updateVisibility(),this.__render(),this},__render:function(){var t=this.model,e=this.config,n=this.el;e.onRender.bind(this)({component:t,el:n})}})},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=i.a.View.extend({tagName:"style",initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{};var e=this.model;this.listenTo(e,"change:style change:state change:mediaText",this.render),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e.get("selectors"),"change",this.render)},render:function(){var t=this.model.get("important");return this.el.innerHTML=this.model.toCSS({important:t}),this}}),a=o.extend({_createElement:function(t){return document.createTextNode("")},render:function(){var t=this.model,e=t.get("important");return this.el.textContent=t.getDeclaration({important:e}),this}}),s=i.a.$,l=function(t,e){return"".concat(t).concat(e?"-".concat(parseFloat(e)):"")};e.a=i.a.View.extend({initialize:function(t){var e=t.config||{};this.atRules={},this.config=e,this.em=e.em,this.pfx=e.stylePrefix||"",this.className=this.pfx+"rules";var n=this.collection;this.listenTo(n,"add",this.addTo),this.listenTo(n,"reset",this.render)},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){if(this.renderStarted){var n,r,i=e||null,s={model:t,config:this.config};if("keyframes"===t.get("atRuleType")){var c=t.getAtRule(),u=this.atRules[c];if(!u){var d=document.createElement("style");u=document.createTextNode(""),d.appendChild(document.createTextNode("".concat(c,"{"))),d.appendChild(u),d.appendChild(document.createTextNode("}")),this.atRules[c]=u,n=d}r=new a(s),u.appendData(r.render().el.textContent)}else n=(r=new o(s)).render().el;var h=this.className,f=t.get("mediaText"),p=l(h),g=p;if(f&&(g=l(h,this.getMediaWidth(f))),n){var v,m=i||this.el;try{v=m.querySelector("#".concat(g))}catch(t){}v||(v=m.querySelector("#".concat(p))),v.appendChild(n)}return n}},getMediaWidth:function(t){return t&&t.replace("(".concat(this.em.getConfig("mediaCondition"),": "),"").replace(")","")},render:function(){var t=this;this.renderStarted=1,this.atRules={};var e=this.em,n=this.$el,r=this.className,i=this.collection,o=document.createDocumentFragment();n.empty();var a=e.get("DeviceManager").getAll().pluck("priority");return a.every(function(t){return t})&&a.unshift(0),a.forEach(function(t){return s('
')).appendTo(o)}),i.each(function(e){return t.addToCollection(e,o)}),n.append(o),n.attr("class",r),this}})},function(t,e,n){"use strict";var r=n(2),i=n.n(r),o=n(1),a=n.n(o),s=n(0),l=n(8),c=n.n(l),u=n(18);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function h(t){for(var e=1;e","
","
",""].join(""),s=function(){var t="";if(i)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();function l(e,n,r,i){for(var a=[],s=0;s')}else a.push(t("
").append(t('').attr("title",i.noColorSelectedText)).html())}return"
"+a.join("")+"
"}function u(c,u){var d,v,m=function(e,r){var i=t.extend({},n,e);return i.callbacks={move:f(i.move,r),change:f(i.change,r),show:f(i.show,r),hide:f(i.hide,r),beforeShow:f(i.beforeShow,r)},i}(u,c),b=m.flat,y=m.showSelectionPalette,w=m.localStorageKey,x=m.theme,O=m.callbacks,C=(d=$t,10,function(){var t=this,e=arguments;v||(v=setTimeout(function(){v=null,d.apply(t,e)},10))}),S=!1,j=!1,T=0,P=0,E=0,M=0,D=0,A=0,L=0,_=0,N=0,I=0,F=1,V=[],R=[],z={},H=m.selectionPalette.slice(0),$=m.maxSelectionSize,U="sp-dragging",B=null,W=c.ownerDocument,q=(W.body,t(c)),G=!1,K=t(s,W).addClass(x),Y=K.find(".sp-picker-container"),X=K.find(".sp-color"),J=K.find(".sp-dragger"),Z=K.find(".sp-hue"),Q=K.find(".sp-slider"),tt=K.find(".sp-alpha-inner"),et=K.find(".sp-alpha"),nt=K.find(".sp-alpha-handle"),rt=K.find(".sp-input"),it=K.find(".sp-palette"),ot=K.find(".sp-initial"),at=K.find(".sp-cancel"),st=K.find(".sp-clear"),lt=K.find(".sp-choose"),ct=K.find(".sp-palette-toggle"),ut=q.is("input"),dt=ut&&"color"===q.attr("type")&&g(),ht=ut&&!b,ft=ht?t(a).addClass(x).addClass(m.className).addClass(m.replacerClassName):t([]),pt=ht?ft:q,gt=ft.find(".sp-preview-inner"),vt=m.color||ut&&q.val(),mt=!1,bt=m.preferredFormat,yt=!m.showButtons||m.clickoutFiresChange,wt=!vt,xt=m.allowEmpty&&!dt;function Ot(){if(m.showPaletteOnly&&(m.showPalette=!0),ct.text(m.showPaletteOnly?m.togglePaletteMoreText:m.togglePaletteLessText),m.palette){V=m.palette.slice(0),R=t.isArray(V[0])?V:[V],z={};for(var e=0;e1&&(delete window.localStorage[w],t.each(e,function(t,e){St(e)}))}catch(t){}try{H=window.localStorage[w].split(";")}catch(t){}}}function St(e){if(y){var n=k(e).toRgbString();if(!z[n]&&-1===t.inArray(n,H))for(H.push(n);H.length>$;)H.shift();if(w&&window.localStorage)try{window.localStorage[w]=H.join(";")}catch(t){}}}function kt(){var e=Ft(),n=t.map(R,function(t,n){return l(t,e,"sp-palette-row sp-palette-row-"+n,m)});Ct(),H&&n.push(l(function(){var t=[];if(m.showPalette)for(var e=0;eu&&u>r?Math.abs(h.left+r-u):0),h.top-=Math.min(h.top,h.top+i>d&&d>i?Math.abs(i+o-0):0),h))),zt(),m.showPalette&&kt(),q.trigger("reflow.spectrum"))}function Ut(){_t(),G=!0,q.attr("disabled",!0),pt.addClass("sp-disabled")}!function(){if(i&&K.find("*:not(input)").attr("unselectable","on"),Ot(),ht&&q.after(ft).hide(),xt||st.hide(),b)q.after(K).hide();else{var e="parent"===m.appendTo?q.parent():t(m.appendTo);1!==e.length&&(e=t("body")),e.append(K)}function n(e){return e.data&&e.data.ignore?(It(t(e.target).closest(".sp-thumb-el").data("color")),Vt()):(It(t(e.target).closest(".sp-thumb-el").data("color")),Vt(),Ht(!0),m.hideAfterPaletteSelect&&_t()),!1}Ct(),pt.bind("click.spectrum touchstart.spectrum",function(e){G||Mt(),e.stopPropagation(),t(e.target).is("input")||e.preventDefault()}),(q.is(":disabled")||!0===m.disabled)&&Ut(),K.click(h),rt.change(Et),rt.bind("paste",function(){setTimeout(Et,1)}),rt.keydown(function(t){13==t.keyCode&&Et()}),at.text(m.cancelText),at.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),Nt(),_t()}),st.attr("title",m.clearText),st.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),wt=!0,Vt(),b&&Ht(!0)}),lt.text(m.chooseText),lt.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),i&&rt.is(":focus")&&rt.trigger("change"),rt.hasClass("sp-validation-error")||(Ht(!0),_t())}),ct.text(m.showPaletteOnly?m.togglePaletteMoreText:m.togglePaletteLessText),ct.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),m.showPaletteOnly=!m.showPaletteOnly,m.showPaletteOnly||b||K.css("left","-="+(Y.outerWidth(!0)+5)),Ot()}),p(et,function(t,e,n){F=t/D,wt=!1,n.shiftKey&&(F=Math.round(10*F)/10),Vt()},Tt,Pt),p(Z,function(t,e){_=parseFloat(e/M),wt=!1,m.showAlpha||(F=1),Vt()},Tt,Pt),p(X,function(t,e,n){if(n.shiftKey){if(!B){var r=N*T,i=P-I*P,o=Math.abs(t-r)>Math.abs(e-i);B=o?"x":"y"}}else B=null;var a=!B||"y"===B;(!B||"x"===B)&&(N=parseFloat(t/T)),a&&(I=parseFloat((P-e)/P)),wt=!1,m.showAlpha||(F=1),Vt()},Tt,Pt),vt?(It(vt),Rt(),bt=m.preferredFormat||k(vt).format,St(vt)):Rt(),b&&Dt();var r=i?"mousedown.spectrum":"click.spectrum touchstart.spectrum";it.delegate(".sp-thumb-el",r,n),ot.delegate(".sp-thumb-el:nth-child(1)",r,{ignore:!0},n)}();var Bt={show:Dt,hide:_t,toggle:Mt,reflow:$t,option:function(n,r){return n===e?t.extend({},m):r===e?m[n]:(m[n]=r,"preferredFormat"===n&&(bt=m.preferredFormat),void Ot())},enable:function(){G=!1,q.attr("disabled",!1),pt.removeClass("sp-disabled")},disable:Ut,offset:function(t){m.offset=t,$t()},set:function(t){It(t),Ht()},get:Ft,destroy:function(){q.show(),pt.unbind("click.spectrum touchstart.spectrum"),K.remove(),ft.remove(),r[Bt.id]=null},container:K};return Bt.id=r.push(Bt)-1,Bt}function d(){}function h(t){t.stopPropagation()}function f(t,e){var n=Array.prototype.slice,r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}function p(e,n,r,o){n=n||function(){},r=r||function(){},o=o||function(){};var a=document,s=!1,l={},c=0,u=0,d="ontouchstart"in window,h={};function f(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function p(t){if(s){if(i&&a.documentMode<9&&!t.button)return g();var r=t&&t.touches&&t.touches[0],o=r&&r.pageX||t.pageX,h=r&&r.pageY||t.pageY,p=Math.max(0,Math.min(o-l.left,u)),v=Math.max(0,Math.min(h-l.top,c));d&&f(t),n.apply(e,[p,v,t])}}function g(){s&&(t(a).unbind(h),t(a.body).removeClass("sp-dragging"),setTimeout(function(){o.apply(e,arguments)},0)),s=!1}h.selectstart=f,h.dragstart=f,h["touchmove mousemove"]=p,h["touchend mouseup"]=g,t(e).bind("touchstart mousedown",function(n){(n.which?3==n.which:2==n.button)||s||!1!==r.apply(e,arguments)&&(s=!0,c=t(e).height(),u=t(e).width(),l=t(e).offset(),t(a).bind(h),t(a.body).addClass("sp-dragging"),p(n),f(n))})}function g(){return t.fn.spectrum.inputTypeColorSupport()}var v="spectrum.id";t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,o=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=r[t(this).data(v)];if(n){var a=n[e];if(!a)throw new Error("Spectrum: no such method: '"+e+"'");"get"==e?i=n.get():"container"==e?i=n.container:"option"==e?i=n.option.apply(n,o):"destroy"==e?(n.destroy(),t(this).removeData(v)):a.apply(n,o)}}),i}return this.spectrum("destroy").each(function(){var n=u(this,t.extend({},e,t(this).data()));t(this).data(v,n.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=p,t.fn.spectrum.defaults=n,t.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var n=t("")[0];e._cachedResult="color"===n.type&&""!==n.value}return e._cachedResult},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t("input[type=color]");e.length&&!g()&&e.spectrum({preferredFormat:"hex6"})};var m=/^[\s,#]+/,b=/\s+$/,y=0,w=Math,x=w.round,O=w.min,C=w.max,S=w.random,k=function t(e,n){if(n=n||{},(e=e||"")instanceof t)return e;if(!(this instanceof t))return new t(e,n);var r=function(t){var e,n,r,i={r:0,g:0,b:0},o=1,a=!1,s=!1;return"string"==typeof t&&(t=function(t){t=t.replace(m,"").replace(b,"").toLowerCase();var e,n,r=!1;if(U[t])t=U[t],r=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(e=tt.rgb.exec(t))?{r:e[1],g:e[2],b:e[3]}:(e=tt.rgba.exec(t))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=tt.hsl.exec(t))?{h:e[1],s:e[2],l:e[3]}:(e=tt.hsla.exec(t))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=tt.hsv.exec(t))?{h:e[1],s:e[2],v:e[3]}:(e=tt.hsva.exec(t))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=tt.hex8.exec(t))?{a:(n=e[1],K(n)/255),r:K(e[2]),g:K(e[3]),b:K(e[4]),format:r?"name":"hex8"}:(e=tt.hex6.exec(t))?{r:K(e[1]),g:K(e[2]),b:K(e[3]),format:r?"name":"hex"}:!!(e=tt.hex3.exec(t))&&{r:K(e[1]+""+e[1]),g:K(e[2]+""+e[2]),b:K(e[3]+""+e[3]),format:r?"name":"hex"}}(t)),"object"==c()(t)&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(e=t.r,n=t.g,r=t.b,i={r:255*q(e,255),g:255*q(n,255),b:255*q(r,255)},a=!0,s="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=X(t.s),t.v=X(t.v),i=function(t,e,n){t=6*q(t,360),e=q(e,100),n=q(n,100);var r=w.floor(t),i=t-r,o=n*(1-e),a=n*(1-i*e),s=n*(1-(1-i)*e),l=r%6;return{r:255*[n,a,o,o,s,n][l],g:255*[s,n,n,a,o,o][l],b:255*[o,o,s,n,n,a][l]}}(t.h,t.s,t.v),a=!0,s="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=X(t.s),t.l=X(t.l),i=function(t,e,n){var r,i,o;function a(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=q(t,360),e=q(e,100),n=q(n,100),0===e)r=i=o=n;else{var s=n<.5?n*(1+e):n+e-n*e,l=2*n-s;r=a(l,s,t+1/3),i=a(l,s,t),o=a(l,s,t-1/3)}return{r:255*r,g:255*i,b:255*o}}(t.h,t.s,t.l),a=!0,s="hsl"),t.hasOwnProperty("a")&&(o=t.a)),o=W(o),{ok:a,format:t.format||s,r:O(255,C(i.r,0)),g:O(255,C(i.g,0)),b:O(255,C(i.b,0)),a:o}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=x(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=x(this._r)),this._g<1&&(this._g=x(this._g)),this._b<1&&(this._b=x(this._b)),this._ok=r.ok,this._tc_id=y++};function j(t,e,n){t=q(t,255),e=q(e,255),n=q(n,255);var r,i,o=C(t,e,n),a=O(t,e,n),s=(o+a)/2;if(o==a)r=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case t:r=(e-n)/l+(e>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(k(r));return o}function $(t,e){e=e||6;for(var n=k(t).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/e;e--;)a.push(k({h:r,s:i,v:o})),o=(o+s)%1;return a}k.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this._a=W(t),this._roundA=x(100*this._a)/100,this},toHsv:function(){var t=T(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=T(this._r,this._g,this._b),e=x(360*t.h),n=x(100*t.s),r=x(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+r+"%)":"hsva("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=j(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=j(this._r,this._g,this._b),e=x(360*t.h),n=x(100*t.s),r=x(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+r+"%)":"hsla("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return P(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return E(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:x(this._r),g:x(this._g),b:x(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+x(this._r)+", "+x(this._g)+", "+x(this._b)+")":"rgba("+x(this._r)+", "+x(this._g)+", "+x(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:x(100*q(this._r,255))+"%",g:x(100*q(this._g,255))+"%",b:x(100*q(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+x(100*q(this._r,255))+"%, "+x(100*q(this._g,255))+"%, "+x(100*q(this._b,255))+"%)":"rgba("+x(100*q(this._r,255))+"%, "+x(100*q(this._g,255))+"%, "+x(100*q(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(B[P(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+E(this._r,this._g,this._b,this._a),n=e,r=this._gradientType?"GradientType = 1, ":"";return t&&(n=k(t).toHex8String()),"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(N,arguments)},desaturate:function(){return this._applyModification(M,arguments)},saturate:function(){return this._applyModification(D,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(I,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(H,arguments)},complement:function(){return this._applyCombination(F,arguments)},monochromatic:function(){return this._applyCombination($,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(V,arguments)},tetrad:function(){return this._applyCombination(R,arguments)}},k.fromRatio=function(t,e){if("object"==c()(t)){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]="a"===r?t[r]:X(t[r]));t=n}return k(t,e)},k.equals=function(t,e){return!(!t||!e)&&k(t).toRgbString()==k(e).toRgbString()},k.random=function(){return k.fromRatio({r:S(),g:S(),b:S()})},k.mix=function(t,e,n){n=0===n?0:n||50;var r,i=k(t).toRgb(),o=k(e).toRgb(),a=n/100,s=2*a-1,l=o.a-i.a,c=1-(r=((r=s*l==-1?s:(s+l)/(1+s*l))+1)/2),u={r:o.r*r+i.r*c,g:o.g*r+i.g*c,b:o.b*r+i.b*c,a:o.a*a+i.a*(1-a)};return k(u)},k.readability=function(t,e){var n=k(t),r=k(e),i=n.toRgb(),o=r.toRgb(),a=n.getBrightness(),s=r.getBrightness(),l=Math.max(i.r,o.r)-Math.min(i.r,o.r)+Math.max(i.g,o.g)-Math.min(i.g,o.g)+Math.max(i.b,o.b)-Math.min(i.b,o.b);return{brightness:Math.abs(a-s),color:l}},k.isReadable=function(t,e){var n=k.readability(t,e);return n.brightness>125&&n.color>500},k.mostReadable=function(t,e){for(var n=null,r=0,i=!1,o=0;o125&&a.color>500,l=a.brightness/125*3+a.color/500;(s&&!i||s&&i&&l>r||!s&&!i&&l>r)&&(i=s,r=l,n=k(e[o]))}return n};var U=k.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},B=k.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(U);function W(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function q(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=O(e,C(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),w.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function G(t){return O(1,C(0,t))}function K(t){return parseInt(t,16)}function Y(t){return 1==t.length?"0"+t:""+t}function X(t){return t<=1&&(t=100*t+"%"),t}var J,Z,Q,tt=(Z="[\\s|\\(]+("+(J="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+J+")[,|\\s]+("+J+")\\s*\\)?",Q="[\\s|\\(]+("+J+")[,|\\s]+("+J+")[,|\\s]+("+J+")[,|\\s]+("+J+")\\s*\\)?",{rgb:new RegExp("rgb"+Z),rgba:new RegExp("rgba"+Q),hsl:new RegExp("hsl"+Z),hsla:new RegExp("hsla"+Q),hsv:new RegExp("hsv"+Z),hsva:new RegExp("hsva"+Q),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});window.tinycolor=k,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}(f),e.a=u.a.extend({template:function(){var t=this.ppfx;return'\n
\n
\n
\n
\n
\n
\n ')},inputClass:function(){var t=this.ppfx;return"".concat(t,"field ").concat(t,"field-color")},holderClass:function(){return"".concat(this.ppfx,"input-holder")},remove:function(){u.a.prototype.remove.apply(this,arguments),this.colorEl.spectrum("destroy")},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model.get("defaults"),r=Object(s.isUndefined)(t)?Object(s.isUndefined)(n)?"":n:t,i=this.getInputEl(),o=this.getColorEl(),a="none"!=r?r:"";i.value=r,o.get(0).style.backgroundColor=a,(e.fromTarget||e.fromInput&&!e.avoidStore)&&(o.spectrum("set",a),this.noneColor="none"==r)},getColorEl:function(){if(!this.colorEl){var t,e=this.em,n=this,r=this.ppfx,i=this.model,o=f('
')),a=o.get(0).style,s=e&&e.config?e.config.el:"",l=e&&e.getConfig&&e.getConfig("colorPicker")||{},c=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},u=0;this.$el.find("[data-colorp-c]").append(o),o.spectrum(h(h(h({containerClassName:"".concat(r,"one-bg ").concat(r,"two-color"),appendTo:s||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[]},l),i.get("colorPicker")||{}),{},{move:function(t){var e=c(t);a.backgroundColor=e,i.setValueFromInput(e,0)},change:function(t){u=1;var e=c(t);a.backgroundColor=e,i.setValueFromInput(0,0),i.setValueFromInput(e),n.noneColor=0},show:function(e){u=0,t=c(e)},hide:function(e){!u&&t&&(n.noneColor&&(t=""),a.backgroundColor=t,o.spectrum("set",t),i.setValueFromInput(t,0))}})),e&&e.on&&e.on("component:selected",function(){u=1,o.spectrum("hide")}),this.colorEl=o}return this.colorEl},render:function(){return u.a.prototype.render.call(this),this.getColorEl(),this}})},function(t,e,n){!function(e){var n,r={},i={16:!1,18:!1,17:!1,91:!1},o="all",a={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,command:91},s={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220},l=function(t){return s[t]||t.toUpperCase().charCodeAt(0)},c=[];for(n=1;n<20;n++)s["f"+n]=111+n;function u(t,e){for(var n=t.length;n--;)if(t[n]===e)return n;return-1}function d(t,e){if(t.length!=e.length)return!1;for(var n=0;n1&&(o=m(t),t=[t[t.length-1]]),t=t[0],(t=l(t))in r||(r[t]=[]),r[t].push({shortcut:i[a],scope:e,method:n,key:i[a],mods:o})}for(n in a)p[n]=!1;function g(){return o||"all"}function v(t){var e;return""==(e=(t=t.replace(/\s/g,"")).split(","))[e.length-1]&&(e[e.length-2]+=","),e}function m(t){for(var e=t.slice(0,t.length-1),n=0;n0,i)(!i[o]&&u(n.mods,+o)>-1||i[o]&&-1==u(n.mods,+o))&&(l=!1);(0!=n.mods.length||i[16]||i[18]||i[17]||i[91])&&!l||!1===n.method(t,n)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}(t)}),b(document,"keyup",function(t){var e,n=t.keyCode,r=u(c,n);if(r>=0&&c.splice(r,1),93!=n&&224!=n||(n=91),n in i)for(e in i[n]=!1,a)a[e]==n&&(p[e]=!1)}),b(window,"focus",function(){for(n in i)i[n]=!1;for(n in a)p[n]=!1});var y=e.key;e.key=p,e.key.setScope=function(t){o=t||"all"},e.key.getScope=g,e.key.deleteScope=function(t){var e,n,i;for(e in r)for(n=r[e],i=0;i1&&(c=m(i),t=i[i.length-1]),t=l(t),void 0===e&&(e=g()),!r[t])return;for(o=0;ot.length)&&(e=t.length);for(var n=0,r=new Array(e);n0;i--)n.context=n.context.prev;return P(t,e,n)}function M(t){var e=t.current().toLowerCase();o=m.hasOwnProperty(e)?"atom":v.hasOwnProperty(e)?"keyword":"variable"}var D={top:function(t,e,n){if("{"==t)return j(n,e,"block");if("}"==t&&n.context.prev)return T(n);if(w&&/@component/i.test(t))return j(n,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return j(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return j(n,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return j(n,e,"at");if("hash"==t)o="builtin";else if("word"==t)o="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return j(n,e,"interpolation");if(":"==t)return"pseudo";if(b&&"("==t)return j(n,e,"parens")}return n.context.type},block:function(t,e,n){if("word"==t){var r=e.current().toLowerCase();return h.hasOwnProperty(r)?(o="property","maybeprop"):f.hasOwnProperty(r)?(o=x?"string-2":"property","maybeprop"):b?(o=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==t?"block":b||"hash"!=t&&"qualifier"!=t?D.top(t,e,n):(o="error","block")},maybeprop:function(t,e,n){return":"==t?j(n,e,"prop"):P(t,e,n)},prop:function(t,e,n){if(";"==t)return T(n);if("{"==t&&b)return j(n,e,"propBlock");if("}"==t||"{"==t)return E(t,e,n);if("("==t)return j(n,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)M(e);else if("interpolation"==t)return j(n,e,"interpolation")}else o+=" error";return"prop"},propBlock:function(t,e,n){return"}"==t?T(n):"word"==t?(o="property","maybeprop"):n.context.type},parens:function(t,e,n){return"{"==t||"}"==t?E(t,e,n):")"==t?T(n):"("==t?j(n,e,"parens"):"interpolation"==t?j(n,e,"interpolation"):("word"==t&&M(e),"parens")},pseudo:function(t,e,n){return"meta"==t?"pseudo":"word"==t?(o="variable-3",n.context.type):P(t,e,n)},documentTypes:function(t,e,n){return"word"==t&&l.hasOwnProperty(e.current())?(o="tag",n.context.type):D.atBlock(t,e,n)},atBlock:function(t,e,n){if("("==t)return j(n,e,"atBlock_parens");if("}"==t||";"==t)return E(t,e,n);if("{"==t)return T(n)&&j(n,e,b?"block":"top");if("interpolation"==t)return j(n,e,"interpolation");if("word"==t){var r=e.current().toLowerCase();o="only"==r||"not"==r||"and"==r||"or"==r?"keyword":c.hasOwnProperty(r)?"attribute":u.hasOwnProperty(r)?"property":d.hasOwnProperty(r)?"keyword":h.hasOwnProperty(r)?"property":f.hasOwnProperty(r)?x?"string-2":"property":m.hasOwnProperty(r)?"atom":v.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(t,e,n){return"}"==t?E(t,e,n):"{"==t?T(n)&&j(n,e,b?"block":"top",!1):("word"==t&&(o="error"),n.context.type)},atBlock_parens:function(t,e,n){return")"==t?T(n):"{"==t||"}"==t?E(t,e,n,2):D.atBlock(t,e,n)},restricted_atBlock_before:function(t,e,n){return"{"==t?j(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(o="variable","restricted_atBlock_before"):P(t,e,n)},restricted_atBlock:function(t,e,n){return"}"==t?(n.stateArg=null,T(n)):"word"==t?(o="@font-face"==n.stateArg&&!p.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!g.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(t,e,n){return"word"==t?(o="variable","keyframes"):"{"==t?j(n,e,"top"):P(t,e,n)},at:function(t,e,n){return";"==t?T(n):"{"==t||"}"==t?E(t,e,n):("word"==t?o="tag":"hash"==t&&(o="builtin"),"at")},interpolation:function(t,e,n){return"}"==t?T(n):"{"==t||";"==t?E(t,e,n):("word"==t?o="variable":"variable"!=t&&"("!=t&&")"!=t&&(o="error"),"interpolation")}};return{startState:function(t){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new k(r?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||function(t,e){var n=t.next();if(s[n]){var r=s[n](t,e);if(!1!==r)return r}return"@"==n?(t.eatWhile(/[\w\\\-]/),O("def",t.current())):"="==n||("~"==n||"|"==n)&&t.eat("=")?O(null,"compare"):'"'==n||"'"==n?(e.tokenize=C(n),e.tokenize(t,e)):"#"==n?(t.eatWhile(/[\w\\\-]/),O("atom","hash")):"!"==n?(t.match(/^\s*\w*/),O("keyword","important")):/\d/.test(n)||"."==n&&t.eat(/\d/)?(t.eatWhile(/[\w.%]/),O("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?O(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?O("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?O(null,n):t.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(t.current().toLowerCase())&&(e.tokenize=S),O("variable callee","variable")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),O("property","word")):O(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),O("number","unit")):t.match(/^-[\w\\\-]*/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?O("variable-2","variable-definition"):O("variable-2","variable")):t.match(/^\w+-/)?O("meta","meta"):void 0})(t,e);return n&&"object"==typeof n&&(i=n[1],n=n[0]),o=n,"comment"!=i&&(e.state=D[e.state](i,t,e)),o},indent:function(t,e){var n=t.context,r=e&&e.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-a)):i=(n=n.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:y,fold:"brace"}});var n=["domain","regexp","url","url-prefix"],r=e(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=e(i),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme"],s=e(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],c=e(l),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=e(u),h=["border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],f=e(h),p=e(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],m=e(v),b=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],y=e(b),w=n.concat(i).concat(a).concat(l).concat(u).concat(h).concat(v).concat(b);function x(t,e){for(var n,r=!1;null!=(n=t.next());){if(r&&"/"==n){e.tokenize=null;break}r="*"==n}return["comment","comment"]}t.registerHelper("hintWords","css",w),t.defineMIME("text/css",{documentTypes:r,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:y,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=x,x(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:m,valueKeywords:y,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=x,x(t,e)):["operator","operator"]},":":function(t){return!!t.match(/\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:m,valueKeywords:y,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=x,x(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:o,mediaFeatures:s,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=x,x(t,e))}},name:"css",helperType:"gss"})}(n(13))},function(t,e,n){"use strict";n.r(e),e.default={run:function(t){t.DomComponents.clear(),t.CssComposer.clear()}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(3),o=n(17);e.default={run:function(t){Object(r.bindAll)(this,"onKeyUp","enableDragger","disableDragger"),this.editor=t,this.canvasModel=this.canvas.getCanvasView().model,this.toggleMove(1)},stop:function(t){this.toggleMove(),this.disableDragger()},onKeyUp:function(t){" "===Object(i.f)(t)&&this.editor.stopCommand(this.id)},enableDragger:function(t){this.toggleDragger(1,t)},disableDragger:function(t){this.toggleDragger(0,t)},toggleDragger:function(t,e){var n=this.canvasModel,r=this.em,i=this.dragger,a=t?"add":"remove";this.getCanvas().classList[a]("".concat(this.ppfx,"is__grabbing")),i||(i=new o.a({getPosition:function(){return{x:n.get("x"),y:n.get("y")}},setPosition:function(t){var e=t.x,r=t.y;n.set({x:e,y:r})},onStart:function(t,e){r.trigger("canvas:move:start",e)},onDrag:function(t,e){r.trigger("canvas:move",e)},onEnd:function(t,e){r.trigger("canvas:move:end",e)}}),this.dragger=i),t?i.start(e):i.stop()},toggleMove:function(t){var e=this.ppfx,n=t?"add":"remove",r=t?"on":"off",o={on:i.v,off:i.u},a=this.getCanvas(),s=["".concat(e,"is__grab")];!t&&s.push("".concat(e,"is__grabbing")),s.forEach(function(t){return a.classList[n](t)}),o[r](document,"keyup",this.onKeyUp),o[r](a,"mousedown",this.enableDragger),o[r](document,"mouseup",this.disableDragger)}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r),o=n(0);e.default={run:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[],s=r.component||t.getSelectedAll();return s=Object(o.isArray)(s)?i()(s):[s],t.select(null),s.forEach(function(t){if(!t||!t.get("removable"))return n.em.logWarning("The element is not removable",{component:t});t.remove(),t.collection&&a.push(t)}),a.length&&t.select(a),s}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(0),a=n(17);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function l(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{};Object(o.bindAll)(this,"setPosition","onStart","onDrag","onEnd","getPosition","getGuidesStatic","renderGuide","getGuidesTarget");var i=r.target,s=r.event,u=r.mode,d=r.dragger,h=void 0===d?{}:d,f=l({doc:i.getEl().ownerDocument,onStart:this.onStart,onEnd:this.onEnd,onDrag:this.onDrag,getPosition:this.getPosition,setPosition:this.setPosition,guidesStatic:function(){return n.guidesStatic},guidesTarget:function(){return n.guidesTarget}},h);this.setupGuides(),this.opts=r,this.editor=t,this.em=t.getModel(),this.target=i,this.isTran="translate"==u,this.guidesContainer=this.getGuidesContainer(),this.guidesTarget=this.getGuidesTarget(),this.guidesStatic=this.getGuidesStatic();var p=this.dragger;return p?p.setOptions(f):(p=new a.a(f),this.dragger=p),s&&p.start(s),this.toggleDrag(1),this.em.trigger("".concat(c,":start"),this.getEventOpts()),p},getEventOpts:function(){return{mode:this.opts.mode,target:this.target,guidesTarget:this.guidesTarget,guidesStatic:this.guidesStatic}},stop:function(){this.toggleDrag()},setupGuides:function(){(this.guides||[]).forEach(function(t){var e=t.guide;e&&e.parentNode.removeChild(e)}),this.guides=[]},getGuidesContainer:function(){var t=this,e=this.guidesEl;if(!e){var n=this.editor,r=this.em,i=this.opts,a=n.getConfig("stylePrefix"),s=document.createElement("div"),l=document.createElement("div"),c='
\n
\n
');(e=document.createElement("div")).className="".concat(a,"guides"),s.className="".concat(a,"guide-info ").concat(a,"guide-info__x"),l.className="".concat(a,"guide-info ").concat(a,"guide-info__y"),s.innerHTML=c,l.innerHTML=c,e.appendChild(s),e.appendChild(l),n.Canvas.getGlobalToolsEl().appendChild(e),this.guidesEl=e,this.elGuideInfoX=s,this.elGuideInfoY=l,this.elGuideInfoContentX=s.querySelector(".".concat(a,"guide-info__content")),this.elGuideInfoContentY=l.querySelector(".".concat(a,"guide-info__content")),r.on("canvas:update frame:scroll",Object(o.debounce)(function(){t.updateGuides(),i.debug&&t.guides.forEach(function(e){return t.renderGuide(e)})},200))}return e},getGuidesStatic:function(){var t=this,e=[],n=this.target.getEl(),r=n.parentNode,i=void 0===r?{}:r;return Object(o.each)(i.children,function(r){return e=e.concat(n!==r?t.getElementGuides(r):[])}),e.concat(this.getElementGuides(i))},getGuidesTarget:function(){return this.getElementGuides(this.target.getEl())},updateGuides:function(t){var e,n,r=this;(t||this.guides).forEach(function(t){var i=t.origin,a=e===i?n:r.getElementPos(i);e=i,n=a,Object(o.each)(r.getGuidePosUpdate(t,a),function(e,n){return t[n]=e}),t.originRect=a})},getGuidePosUpdate:function(t,e){var n={},r=e.top,i=e.height,o=e.left,a=e.width;switch(t.type){case"t":n.y=r;break;case"b":n.y=r+i;break;case"l":n.x=o;break;case"r":n.x=o+a;break;case"x":n.x=o+a/2;break;case"y":n.y=r+i/2}return n},renderGuide:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.guide||document.createElement("div"),n="px",r=t.active?2:1,i=e.children[0];return e.style="position: absolute; background-color: ".concat(t.active?"green":"red",";"),e.children.length||((i=document.createElement("div")).style="position: absolute; color: red; padding: 5px; top: 0; left: 0;",e.appendChild(i)),t.y?(e.style.width="100%",e.style.height="".concat(r).concat(n),e.style.top="".concat(t.y).concat(n),e.style.left=0):(e.style.width="".concat(r).concat(n),e.style.height="100%",e.style.left="".concat(t.x).concat(n),e.style.top="0".concat(n)),!t.guide&&this.guidesContainer.appendChild(e),e},getElementPos:function(t){return this.editor.Canvas.getElementPos(t,{noScroll:1})},getElementGuides:function(t){var e=this,n=this.opts,r=this.getElementPos(t),i=r.top,o=r.height,a=r.left,s=r.width,c=[{type:"t",y:i},{type:"b",y:i+o},{type:"l",x:a},{type:"r",x:a+s},{type:"x",x:a+s/2},{type:"y",y:i+o/2}].map(function(i){return l(l({},i),{},{origin:t,originRect:r,guide:n.debug&&e.renderGuide(i)})});return c.forEach(function(t){return e.guides.push(t)}),c},getTranslate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",n=0;return(t||"").split(" ").forEach(function(t){var r=t.trim(),i="translate".concat(e.toUpperCase(),"(");0===r.indexOf(i)&&(n=parseFloat(r.replace(i,"")))}),n},setTranslate:function(t,e,n){var r="translate".concat(e.toUpperCase(),"("),i="".concat(r).concat(n,")"),o=(t||"").split(" ").map(function(t){return 0===t.trim().indexOf(r)&&(t=i),t}).join(" ");return o.indexOf(r)<0&&(o+=" ".concat(i)),o},getPosition:function(){var t=this.target,e=this.isTran,n=t.getStyle(),r=n.left,i=n.top,o=n.transform,a=0,s=0;return e?(a=this.getTranslate(o),s=this.getTranslate(o,"y")):(a=parseFloat(r),s=parseFloat(i)),{x:a,y:s}},setPosition:function(t){var e=t.x,n=t.y,r=t.end,i=t.position,a=t.width,s=t.height,l=this.target,c=this.isTran,u=r?"":1,d="".concat(e).concat("px"),h="".concat(n).concat("px");if(c){var f=l.getStyle().transform||"";return f=this.setTranslate(f,"x",d),f=this.setTranslate(f,"y",h),l.addStyle({transform:f,en:u},{avoidStore:!r})}var p={position:i,width:a,height:s},g={left:d,top:h,en:u};Object(o.keys)(p).forEach(function(t){var e=p[t];e&&(g[t]=e)}),l.addStyle(g,{avoidStore:!r})},_getDragData:function(){var t=this.target;return{target:t,parent:t.parent(),index:t.index()}},onStart:function(t){var e=this.target,n=this.editor,r=this.isTran,i=this.opts,o=i.center,a=i.onStart,s=n.Canvas,l=e.getStyle(),c="absolute";if(a&&a(this._getDragData()),!r&&l.position!==c){var u=s.offset(e.getEl()),d=u.left,h=u.top,f=u.width,p=u.height;if(o){var g=s.getMouseRelativeCanvas(t);d=g.x,h=g.y}this.setPosition({x:d,y:h,width:"".concat(f,"px"),height:"".concat(p,"px"),position:c})}},onDrag:function(){var t=this,e=this.guidesTarget,n=this.opts,r=n.onDrag;this.updateGuides(e),n.debug&&e.forEach(function(e){return t.renderGuide(e)}),n.guidesInfo&&this.renderGuideInfo(e.filter(function(t){return t.active})),r&&r(this._getDragData())},onEnd:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.editor,i=this.opts,o=this.id,a=i.onEnd;a&&a(t,n,l(l({event:t},n),this._getDragData())),r.stopCommand(o),this.hideGuidesInfo(),this.em.trigger("".concat(c,":end"),this.getEventOpts())},hideGuidesInfo:function(){var t=this;["X","Y"].forEach(function(e){var n=t["elGuideInfo".concat(e)];n&&(n.style.display="none")})},renderGuideInfo:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=this.guidesStatic;this.hideGuidesInfo(),e.forEach(function(e){var r=e.origin,i=e.x,a=t.getElementPos(r),s=Object(o.isUndefined)(i)?"y":"x",u="y"===s,d=a[u?"left":"top"],h=a.rect[u?"left":"top"],f=u?d+a.width:d+a.height,p=u?h+a.rect.width:h+a.rect.height,g=t["elGuideInfo".concat(s.toUpperCase())],v=t["elGuideInfoContent".concat(s.toUpperCase())],m=g.style,b=n.filter(function(t){return t.type===e.type}).map(function(t){var e=t.originRect,n=e.left,r=e.width,i=e.top,o=e.height,a=u?n+r:i+o;return{gap:a0}).sort(function(t,e){return t.gap-e.gap}).map(function(t){return t.guide})[0];if(b){var y=b.originRect,w=y.left,x=y.width,O=y.top,C=y.height,S=y.rect,k=u?w2&&void 0!==arguments[2]?arguments[2]:{};if(t.Canvas.hasFocus()||n.force){var r=[];t.getSelectedAll().forEach(function(t){for(var e=t.parent();e&&!e.get("selectable");)e=e.parent();e&&r.push(e)}),r.length&&t.select(r)}}}},function(t,e,n){"use strict";n.r(e),e.default={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.collection,r=n.indexOf(t),i=n.at(r+1);e.push(i||t)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";n.r(e),e.default={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.collection,r=n.indexOf(t),i=n.at(r-1);e.push(i&&r-1>=0?i:t)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";n.r(e);var r=n(0);e.default={run:function(t,e){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).target,i=t.DomComponents,o=n.get("type"),a=i.getWrapper().findType(o).length,s=[];if(!a){var l=t.CssComposer.getAll(),c=n.get("style-signature");c=Object(r.isArray)(c)?c:[c],l.forEach(function(t){var e=t.selectorsToString();c.forEach(function(n){n&&e.indexOf(n)>=0&&s.push(t)})}),l.remove(s)}return s}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r);e.default={run:function(t){var e=t.getModel(),n=i()(t.getSelectedAll());n.length&&e.set("clipboard",n)}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(1),o=n.n(i),a=n(14),s=o.a.$;e.default=Object(r.extend)({},a.default,{init:function(t){Object(r.bindAll)(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=s(t.target);e.data("model").get("removable")&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),s(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=s(t.target);e.data("model").get("removable")&&(e.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html("Remove "+t.getName())}})},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r).a.$;e.default={run:function(t,e){var n=this;e&&e.set&&e.set("active",0);var r=t.getConfig(),o=t.Modal,a=r.stylePrefix;if(this.cm=t.CodeManager||null,!this.$editors){var s=this.buildEditor("htmlmixed","hopscotch","HTML"),l=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=s.el,this.cssEditor=l.el;var c=i('
'));c.append(s.$el).append(l.$el),this.$editors=c}o.open({title:r.textViewCode,content:this.$editors}).getModel().once("change:open",function(){return t.stopCommand(n.id)}),this.htmlEditor.setContent(t.getHtml()),this.cssEditor.setContent(t.getCss())},stop:function(t){var e=t.Modal;e&&e.close()},buildEditor:function(t,e,n){var r=document.createElement("textarea");!this.codeMirror&&(this.codeMirror=this.cm.getViewer("CodeMirror"));var i=this.codeMirror.clone().set({label:n,codeName:t,theme:e,input:r}),o=new this.cm.EditorView({model:i,config:this.cm.getConfig()}).render().$el;return i.init(r),{el:i,$el:o}}}},function(t,e,n){"use strict";n.r(e);var r=n(0);e.default={isEnabled:function(){var t=document;return t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement?1:0},enable:function(t){var e="";return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?(e="webkit",t.webkitRequestFullscreen()):t.mozRequestFullScreen?(e="moz",t.mozRequestFullScreen()):t.msRequestFullscreen?t.msRequestFullscreen():console.warn("Fullscreen not supported"),e},disable:function(){var t=document;this.isEnabled()&&(t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen())},fsChanged:function(t,e){var n=(t||"")+"fullscreenchange";this.isEnabled()||(this.stop(null,this.sender),document.removeEventListener(n,this.fsChanged))},run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.sender=e;var i=n.target,o=Object(r.isElement)(i)?i:document.querySelector(i),a=this.enable(o||t.getContainer());this.fsChanged=this.fsChanged.bind(this,a),document.addEventListener(a+"fullscreenchange",this.fsChanged),t.trigger("change:canvasOffset")},stop:function(t,e){e&&e.set&&e.set("active",!1),this.disable(),t&&t.trigger("change:canvasOffset")}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(1),o=n.n(i),a=n(3),s=n(14),l=n(27),c=o.a.$;e.default=Object(r.extend)({},l.default,s.default,{init:function(t){s.default.init.apply(this,arguments),Object(r.bindAll)(this,"initSorter","rollback","onEndMove"),this.opt=t,this.hoverClass=this.ppfx+"highlighter-warning",this.badgeClass=this.ppfx+"badge-warning",this.noSelClass=this.ppfx+"no-select"},enable:function(){for(var t=arguments.length,e=new Array(t),n=0;n2&&void 0!==arguments[2]?arguments[2]:{},i=t.Modal,o=t.AssetManager,a=o.getConfig(),s=o.getContainer(),l=r.modalTitle||t.t("assetManager.modalTitle")||"",c=r.types,u=r.accept;if(o.setTarget(r.target),o.onClick(r.onClick),o.onDblClick(r.onDblClick),o.onSelect(r.onSelect),!this.rendered||c){var d=o.getAll().filter(function(t){return 1});c&&c.length&&(d=d.filter(function(t){return-1!==c.indexOf(t.get("type"))})),o.render(d),this.rendered=1}if(u){var h=s.querySelector("input#".concat(a.stylePrefix,"uploadFile"));h&&h.setAttribute("accept",u)}return i.open({title:l,content:s}).getModel().once("change:open",function(){return t.stopCommand(n.id)}),this},stop:function(t){return t.Modal.close(),this}}},function(t,e,n){"use strict";n.r(e),e.default={run:function(t,e){var n=t.BlockManager,r=t.Panels;if(!this.blocks){n.render();var i="views-container",o=document.createElement("div"),a=r.getPanel(i)||r.addPanel({id:i});o.appendChild(n.getContainer()),a.set("appendContent",o).trigger("change:appendContent"),this.blocks=o}this.blocks.style.display="block"},stop:function(){var t=this.blocks;t&&(t.style.display="none")}}},function(t,e,n){"use strict";n.r(e);var r=n(1);n.n(r).a.$,e.default={run:function(t){var e=t.LayerManager,n=t.Panels;if(!this.layers){var r="views-container",i=document.createElement("div"),o=n.getPanel(r)||n.addPanel({id:r});i.appendChild(e.render()),o.set("appendContent",i).trigger("change:appendContent"),this.layers=i}this.layers.style.display="block"},stop:function(){var t=this.layers;t&&(t.style.display="none")}}},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r).a.$;e.default={run:function(t,e){if(this.sender=e,!this.$cn){var n=t.getConfig(),r=t.Panels;this.$cn=i("
"),this.$cn2=i("
"),this.$cn.append(this.$cn2);var o=t.DeviceManager;o&&n.showDevices&&r.addPanel({id:"devices-c"}).set("appendContent",o.render()).trigger("change:appendContent");var a=t.SelectorManager;a&&this.$cn2.append(a.render([])),this.$cn2.append(t.StyleManager.render());var s=t.StyleManager.getConfig().stylePrefix;this.$header=i('
').concat(t.t("styleManager.empty"),"
")),this.$cn.append(this.$header),r.getPanel("views-container")?this.panel=r.getPanel("views-container"):this.panel=r.addPanel({id:"views-container"}),this.panel.set("appendContent",this.$cn).trigger("change:appendContent"),this.target=t.editor,this.listenTo(this.target,"component:toggled",this.toggleSm)}this.toggleSm()},toggleSm:function(){var t=this.target,e=this.sender;if(!e||!e.get||e.get("active")){var n=t.get("SelectorManager").getConfig().componentFirst,r=t.getSelectedAll().length;1===r||r>1&&n?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show())}},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r).a.$;e.default={run:function(t,e){this.sender=e;var n=t.getModel(),r=t.Config.stylePrefix,o=t.TraitManager;if(!this.$cn){var a=o.getTraitsViewer(),s=o.getConfig();this.$cn=i("
"),this.$cn2=i("
"),this.$cn.append(this.$cn2),this.$header=i("
").append('
').concat(n.t("traitManager.empty"),"
")),this.$cn.append(this.$header),this.$cn2.append('
').concat(n.t("traitManager.label"),"
")),this.$cn2.append(a.render().el);var l=t.Panels;(l.getPanel("views-container")?l.getPanel("views-container"):l.addPanel({id:"views-container"})).set("appendContent",this.$cn.get(0)).trigger("change:appendContent"),this.target=t.getModel(),this.listenTo(this.target,"component:toggled",this.toggleTm)}this.toggleTm()},toggleTm:function(){var t=this.sender;t&&t.get&&!t.get("active")||(1===this.target.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";n.r(e);var r=n(0);e.default={run:function(t){var e=t.getModel().get("clipboard"),n=t.getSelected();e&&n&&(t.getSelectedAll().forEach(function(n){if(n){var i,o=n.collection,a=o.indexOf(n)+1,s=e.filter(function(t){return t.get("copyable")});i=Object(r.contains)(e,n)&&n.get("copyable")?o.add(n.clone(),{at:a}):o.add(s.map(function(t){return t.clone()}),{at:a}),(i=Object(r.isArray)(i)?i:[i]).forEach(function(e){return t.trigger("component:paste",e)})}}),n.emitUpdate())}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r),o=n(0),a="sw-visibility";e.default={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanels()),this.panels},preventDrag:function(t){t.abort=1},tglEffects:function(t){var e=this.em,n=t?"on":"off";if(e){var r=e.get("Canvas"),i=r.getBody(),a=r.getToolbarEl();a&&(a.style.display=t?"none":"");var s=i.querySelectorAll(".".concat(this.ppfx,"no-pointer"));Object(o.each)(s,function(e){return e.style.pointerEvents=t?"all":""}),e[n]("run:tlb-move:before",this.preventDrag)}},run:function(t,e){var n=this;this.sender=e,this.selected=i()(t.getSelectedAll()),t.select(),this.shouldRunSwVisibility||(this.shouldRunSwVisibility=t.Commands.isActive(a)),this.shouldRunSwVisibility&&t.stopCommand(a),t.getModel().stopDefault();var r=this.getPanels(t),o=t.Canvas.getElement(),s=t.getEl(),l=t.Config.stylePrefix;if(!this.helper){var c=document.createElement("span");c.className="".concat(l,"off-prv fa fa-eye-slash"),s.appendChild(c),c.onclick=function(){return n.stopCommand()},this.helper=c}this.helper.style.display="inline-block",r.forEach(function(t){return t.set("visible",!1)});var u=o.style;u.width="100%",u.height="100%",u.top="0",u.left="0",u.padding="0",u.margin="0",t.refresh(),this.tglEffects(1)},stop:function(t){var e=this.sender,n=void 0===e?{}:e,r=this.selected;n.set&&n.set("active",0);var i=this.getPanels(t);this.shouldRunSwVisibility&&(t.runCommand(a),this.shouldRunSwVisibility=!1),t.getModel().runDefault(),i.forEach(function(t){return t.set("visible",!0)}),t.Canvas.getElement().setAttribute("style",""),r&&t.select(r),delete this.selected,this.helper&&(this.helper.style.display="none"),t.refresh(),this.tglEffects()}}},function(t,e,n){"use strict";n.r(e),e.default={run:function(t,e,n){var r=n||{},i=r.el||"",o=t.Canvas,a=this.canvasResizer,s=r.options||{},l=o.getCanvasView();return s.appendTo=o.getResizerEl(),s.prefix=t.getConfig().stylePrefix,s.posFetcher=l.getElementPos.bind(l),s.mousePosFetcher=o.getMouseRelativePos,a&&!r.forceNew||(this.canvasResizer=t.Utils.Resizer.init(s),a=this.canvasResizer),a.setOptions(s),a.blur(),a.focus(i),a},stop:function(){var t=this.canvasResizer;t&&t.blur()}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(1),a=n.n(o),s=n(0),l=n(3);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var u=a.a.$;e.default={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,n){var r=n||{},o=r.state||"",a=t.getConfig(),d=this.em.getZoomDecimal(),h=r.el||"";if(!a.showOffsets||Object(l.r)(h)||!a.showOffsetsSelected&&"Fixed"==o)t.stopCommand(this.id,n);else{var f=t.Canvas,p=function(t){for(var e=1;e')).get(0),D=u('
')).get(0),A=v+E+"-el",L="".concat(v+P+"-el"," ").concat(v+P),_="".concat(A," ").concat(v+E);y=u('
')).get(0),w=u('
')).get(0),x=u('
')).get(0),O=u('
')).get(0),C=u('
')).get(0),S=u('
')).get(0),k=u('
')).get(0),j=u('
')).get(0),this["marginT"+o]=y,this["marginB"+o]=w,this["marginL"+o]=x,this["marginR"+o]=O,this["padT"+o]=C,this["padB"+o]=S,this["padL"+o]=k,this["padR"+o]=j,M.appendChild(y),M.appendChild(w),M.appendChild(x),M.appendChild(O),D.appendChild(C),D.appendChild(S),D.appendChild(k),D.appendChild(j),b.appendChild(M),b.appendChild(D),this[m]="1"}var N="px",I=parseFloat(g.marginLeft.replace(N,""))*d,F=parseFloat(g.marginRight.replace(N,""))*d,V=parseFloat(g.marginTop.replace(N,""))*d,R=parseFloat(g.marginBottom.replace(N,""))*d,z=y.style,H=w.style,$=x.style,U=O.style,B=C.style,W=S.style,q=k.style,G=j.style,K=parseFloat(p.left),Y=parseFloat(g.width)*d+N;z.height=V+N,z.width=Y,z.top=p.top-V+N,z.left=K+N,H.height=R+N,H.width=Y,H.top=p.top+p.height+N,H.left=K+N;var X=p.height+V+R+N,J=p.top-V+N;$.height=X,$.width=I+N,$.top=J,$.left=K-I+N,U.height=X,U.width=F+N,U.top=J,U.left=K+p.width+N;var Z=parseFloat(g.paddingTop)*d;B.height=Z+N;var Q=parseFloat(g.paddingBottom)*d;W.height=Q+N;var tt=p.height-Q-Z+N,et=p.top+Z+N;q.height=tt,q.width=parseFloat(g.paddingLeft)*d+N,q.top=et;var nt=parseFloat(g.paddingRight)*d;G.height=tt,G.width=nt+N,G.top=et}},stop:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(n||{}).state||"",i=this.getOffsetMethod(r);t.Canvas[i](n.view).style.opacity=0}}},function(t,e,n){"use strict";n.r(e),e.default={run:function(t){this.toggleVis(t)},stop:function(t){this.toggleVis(t,0)},toggleVis:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!t.Commands.isActive("preview")){var r=n?"add":"remove";t.Canvas.getFrames().forEach(function(t){t.view.getBody().classList[r]("".concat(e.ppfx,"dashed"))})}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o={stylePrefix:"",appendTo:"",sortable:1,hidable:1,hideTextnode:1,root:"",showWrapper:1,showHover:1,scrollCanvas:{behavior:"smooth",block:"nearest"},scrollLayers:{behavior:"auto",block:"nearest"},highlightHover:1,onInit:function(){},onRender:function(){}},a=n(36),s=n(0);function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function c(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return(n=c(c({},o),e)).stylePrefix=e.pStylePrefix,t=n.em,this},getConfig:function(){return n},onLoad:function(){e=new a.a({level:0,config:n,opened:n.opened||{},model:t.get("DomComponents").getWrapper()}),t&&t.on("component:selected",this.componentChanged),this.componentChanged()},postRender:function(){var t=n.appendTo,e=n.root;e&&this.setRoot(e),t&&(Object(s.isElement)(t)?t:document.querySelector(t)).appendChild(this.render())},setRoot:function(t){return e.setRoot(t),this},getRoot:function(){return e.model},getAll:function(){return e},componentChanged:function(e){if(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).fromLayers){var r=t.get("opened"),i=t.getSelected(),o=n.scrollLayers,a=i&&i.collection?i.collection.parent:null;for(var s in r)r[s].set("open",0);for(;a;)a.set("open",1),r[a.cid]=a,a=a.collection?a.collection.parent:null;if(i&&o){var l=i.viewLayer&&i.viewLayer.el;l&&l.scrollIntoView(o)}}},render:function(){return e.render().el},destroy:function(){e&&e.remove(),[t,e,n].forEach(function(t){return{}})}}}},function(t,e,n){var r,i,o;i=[n(0),n(1)],void 0===(o="function"==typeof(r=function(t,e){var n=Array.prototype.slice;function r(t,e,n){return n.length<=4?t.call(e,n[0],n[1],n[2],n[3]):t.apply(e,n)}function i(t,e){return n.call(t,e)}function o(e,n){return null!=e&&(t.isArray(n)||(n=i(arguments,1)),t.all(n,function(t){return t in e}))}var a,s,l=(a=!1,s=-1,function(){return a||(s++,a=!0,t.defer(function(){a=!1})),s});function c(){this.registeredObjects=[],this.cidIndexes=[]}function u(e,n,r,i){for(var o,a=0,s=n.length;aa.length?t.each(i,function(t){t in o||s.before.push(t)},this):t.each(a,function(t){t in r||s.after.push(t)})),{object:e,before:o,after:r,options:t.clone(n)}}},reset:{undo:function(t,e,n){t.reset(e)},redo:function(t,e,n){t.reset(n)},on:function(e,n){return{object:e,before:n.previousModels,after:t.clone(e.models)}}}};function p(){}function g(e,n,r,i){if("object"==typeof n)return t.each(n,function(t,n){2===e?g(e,t,r,i):g(e,n,t,r)});switch(e){case 0:o(r,"undo","redo","on")&&t.all(t.pick(r,"undo","redo","on"),t.isFunction)&&(i[n]=r);break;case 1:i[n]&&t.isObject(r)&&(i[n]=t.extend({},i[n],r));break;case 2:delete i[n]}return this}p.prototype=f;var v=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){d("undo",this.attributes)},redo:function(t){d("redo",this.attributes)}}),m=e.Collection.extend({model:v,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(t){this.maximumStackLength=t}}),b=e.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(e){this.stack=new m,this.objectRegistry=new c,this.undoTypes=new p,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",function(t,e){this.stack.setMaxLength(e)},this),e&&e.track&&this.startTracking(),e&&e.register&&(t.isArray(e.register)||t.isArguments(e.register)?r(this.register,this,e.register):this.register(e.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")},_addToStack:function(t){!function(t,e,n,i){if(t.track&&!t.isCurrentlyUndoRedoing&&e in i&&function(t,e){var n=t.condition,i=typeof n;return"function"===i?!!r(n,t,e):"boolean"!==i||n}(i[e],n)){var a=r(i[e].on,i[e],n);if(o(a,"object","before","after")){if(a.type=e,a.magicFusionIndex=l(),a.undoTypes=i,t.pointert.maximumStackLength&&(t.shift(),t.pointer--)}}}(this.stack,t,i(arguments,1),this.undoTypes)},register:function(){u("on",arguments,this._addToStack,this)},unregister:function(){u("off",arguments,this._addToStack,this)},unregisterAll:function(){r(this.unregister,this,this.objectRegistry.get())},undo:function(t){h("undo",this,this.stack,t)},undoAll:function(){h("undo",this,this.stack,!1,!0)},redo:function(t){h("redo",this,this.stack,t)},redoAll:function(){h("redo",this,this.stack,!1,!0)},isAvailable:function(t){var e=this.stack,n=e.length;switch(t){case"undo":return n>0&&e.pointer>-1;case"redo":return n>0&&e.pointer0&&void 0!==arguments[0]?arguments[0]:{};return e=d(d({},r),n),t=e.em,this.em=t,this},onLoad:function(){var t=e.defaults;for(var n in t){var r=t[n];this.add(n,r.keys,r.handler,r.opts||{})}},add:function(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=this.em,l=a.get("Commands"),u=a.getEditor(),d=a.get("Canvas"),h={id:t,keys:e,handler:r};return n[t]&&this.remove(t),n[t]=h,c()(e,function(e,n){var c={event:e,h:n};if(r=Object(s.isString)(r)?l.get(r):r,!a.isEditing()&&!u.Canvas.isInputFocused()||o.force){o.prevent&&d.getCanvasView().preventDefault(e),"object"==i()(r)?l.runCommand(r,c):r(u,0,c);var h=[t,n.shortcut,e];a.trigger.apply(a,["keymap:emit"].concat(h)),a.trigger.apply(a,["keymap:emit:".concat(t)].concat(h))}}),a.trigger("keymap:add",h),h},get:function(t){return n[t]},getAll:function(){return n},remove:function(t){var e=this.em,r=this.get(t);if(r)return delete n[t],r.keys.split(", ").forEach(function(t){return c.a.unbind(t.trim())}),e&&e.trigger("keymap:remove",r),r},removeAll:function(){var t=this;return Object.keys(n).forEach(function(e){return t.remove(e)}),this},destroy:function(){this.removeAll(),[t,e,n].forEach(function(t){return{}}),this.em={}}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(70),a=n.n(o);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function l(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};n=l(l({},s),i),t=n.em,this.em=t,(e=new a.a(l({track:!0,register:[]},n))).changeUndoType("change",{condition:!1}),e.changeUndoType("add",{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!o(n))return{object:e,before:void 0,after:t,options:l({},n)}}}),e.changeUndoType("remove",{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!o(n))return{object:e,before:t,after:void 0,options:l({},n)}}});var c={on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!r&&(r=t.previousAttributes()),!o(n)){var i={object:t,before:r,after:t.toJSON({keepSymbols:1})};return r=null,i}},undo:function(t,e,n,r){t.set(e)},redo:function(t,e,n,r){t.set(n)}};return["style","attributes","content","src"].forEach(function(t){return e.addUndoType("change:".concat(t),c)}),e.on("undo redo",function(){return t.trigger("component:toggled change:canvasOffset")}),["undo","redo"].forEach(function(n){return e.on(n,function(){return t.trigger(n)})}),this},getConfig:function(){return n},add:function(t){return e.register(t),this},remove:function(t){return e.unregister(t),this},removeAll:function(){return e.unregisterAll(),this},start:function(){return e.startTracking(),this},stop:function(){return e.stopTracking(),this},undo:function(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!t.isEditing()&&e.undo(n),this},undoAll:function(){return e.undoAll(),this},redo:function(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!t.isEditing()&&e.redo(n),this},redoAll:function(){return e.redoAll(),this},hasUndo:function(){return e.isAvailable("undo")},hasRedo:function(){return e.isAvailable("redo")},getStack:function(){return e.stack},getStackGroup:function(){var t=[],e=[];return this.getStack().forEach(function(n){var r=n.get("magicFusionIndex");e.indexOf(r)<0&&(e.push(r),t.push(n))}),t},getPointer:function(){return this.getStack().pointer},clear:function(){return e.clear(),this},getInstance:function(){return e},destroy:function(){this.clear().removeAll(),[t,e,n,r].forEach(function(t){return{}}),this.em={}}}}},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(80),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(26))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,l=1,c={},u=!1,d=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick(function(){p(t)})}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}):t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},r=function(t){o.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(t){var e=d.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(p,0,t)},h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n=0||(i[n]=t[n]);return i}},function(t,e,n){!function(t){"use strict";var e={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},n={};function r(t,e){var r=t.match(function(t){return n[t]||(n[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(e));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function i(t,e){return new RegExp((e?"^":"")+"","i")}function o(t,e){for(var n in t)for(var r=e[n]||(e[n]=[]),i=t[n],o=i.length-1;o>=0;o--)r.unshift(i[o])}t.defineMode("htmlmixed",function(n,a){var s=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:a.multilineTagIndentFactor,multilineTagIndentPastTag:a.multilineTagIndentPastTag,allowMissingTagName:a.allowMissingTagName}),l={},c=a&&a.tags,u=a&&a.scriptTypes;if(o(e,l),c&&o(c,l),u)for(var d=u.length-1;d>=0;d--)l.script.unshift(["type",u[d].matches,u[d].mode]);function h(e,o){var a,c=s.token(e,o.htmlState),u=/\btag\b/.test(c);if(u&&!/[<>\s\/]/.test(e.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&u&&/>$/.test(e.current())){var d=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var f=">"==e.current()&&function(t,e){for(var n=0;n-1?t.backUp(r.length-i):r.match(/<\/?$/)&&(t.backUp(r.length),t.match(e,!1)||t.match(r)),n}(t,v,e.localMode.token(t,e.localState))},o.localMode=p,o.localState=t.startState(p,s.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=e.current(),e.eol()&&(o.inTag+=" "));return c}return{startState:function(){return{token:h,inTag:null,localMode:null,localState:null,htmlState:t.startState(s)}},copyState:function(e){var n;return e.localState&&(n=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:n,htmlState:t.copyState(s,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,r){return!e.localMode||/^\s*<\//.test(n)?s.indent(e.htmlState,n,r):e.localMode.indent?e.localMode.indent(e.localState,n,r):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||s}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")}(n(13),n(84),n(85),n(44))},function(t,e,n){!function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",function(r,i){var o,a,s=r.indentUnit,l={},c=i.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function d(t,e){function n(n){return e.tokenize=n,n(t,e)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(f("atom","]]>")):null:t.match("--")?n(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(function t(e){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=t(e+1),r.tokenize(n,r);if(">"==i){if(1==e){r.tokenize=d;break}return r.tokenize=t(e-1),r.tokenize(n,r)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(o=t.eat("/")?"closeTag":"openTag",e.tokenize=h,"tag bracket"):"&"==r?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function h(t,e){var n,r,i=t.next();if(">"==i||"/"==i&&t.eat(">"))return e.tokenize=d,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){e.tokenize=d,e.state=m,e.tagName=e.tagStart=null;var a=e.tokenize(t,e);return a?a+" tag error":"tag error"}return/[\'\"]/.test(i)?(e.tokenize=(n=i,(r=function(t,e){for(;!t.eol();)if(t.next()==n){e.tokenize=h;break}return"string"}).isInAttribute=!0,r),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t,e){return function(n,r){for(;!n.eol();){if(n.match(e)){r.tokenize=d;break}n.next()}return t}}function p(t,e,n){this.prev=t.context,this.tagName=e||"",this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function g(t){t.context&&(t.context=t.context.prev)}function v(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(e))return;g(t)}}function m(t,e,n){return"openTag"==t?(n.tagStart=e.column(),b):"closeTag"==t?y:m}function b(t,e,n){return"word"==t?(n.tagName=e.current(),a="tag",O):l.allowMissingTagName&&"endTag"==t?(a="tag bracket",O(t,0,n)):(a="error",b)}function y(t,e,n){if("word"==t){var r=e.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&g(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",w):(a="tag error",x)}return l.allowMissingTagName&&"endTag"==t?(a="tag bracket",w(t,0,n)):(a="error",x)}function w(t,e,n){return"endTag"!=t?(a="error",w):(g(n),m)}function x(t,e,n){return a="error",w(t,0,n)}function O(t,e,n){if("word"==t)return a="attribute",C;if("endTag"==t||"selfcloseTag"==t){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(r)?v(n,r):(v(n,r),n.context=new p(n,r,i==n.indented)),m}return a="error",O}function C(t,e,n){return"equals"==t?S:(l.allowMissing||(a="error"),O(t,0,n))}function S(t,e,n){return"string"==t?k:"word"==t&&l.allowUnquoted?(a="string",O):(a="error",O(t,0,n))}function k(t,e,n){return"string"==t?k:O(t,0,n)}return d.isInText=!0,{startState:function(t){var e={tokenize:d,state:m,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;o=null;var n=e.tokenize(t,e);return(n||o)&&"comment"!=n&&(a=null,e.state=e.state(o||n,t,e),a&&(n="error"==a?n+" error":a)),n},indent:function(e,n,r){var i=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(i&&i.noIndent)return t.Pass;if(e.tokenize!=h&&e.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==S&&(t.state=O)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)e.push(n.tagName);return e.reverse()}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(13))},function(t,e,n){!function(t){"use strict";t.defineMode("javascript",function(e,n){var r,i,o=e.indentUnit,a=n.statementIndent,s=n.jsonld,l=n.json||s,c=n.typescript,u=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),r=t("keyword c"),i=t("keyword d"),o=t("operator"),a={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:r,void:r,throw:r,debugger:t("debugger"),var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:t("this"),class:t("class"),super:t("atom"),yield:r,export:t("export"),import:t("import"),extends:r,await:r}}(),h=/[+\-*&%=<>!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(t,e,n){return r=t,i=n,e}function g(t,e){var n,r=t.next();if('"'==r||"'"==r)return e.tokenize=(n=r,function(t,e){var r,i=!1;if(s&&"@"==t.peek()&&t.match(f))return e.tokenize=g,p("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(e.tokenize=g),p("string","string")}),e.tokenize(t,e);if("."==r&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return p("number","number");if("."==r&&t.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return p(r);if("="==r&&t.eat(">"))return p("=>","operator");if("0"==r&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return p("number","number");if(/\d/.test(r))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),p("number","number");if("/"==r)return t.eat("*")?(e.tokenize=v,v(t,e)):t.eat("/")?(t.skipToEnd(),p("comment","comment")):Yt(t,e,1)?(function(t){for(var e,n=!1,r=!1;null!=(e=t.next());){if(!n){if("/"==e&&!r)return;"["==e?r=!0:r&&"]"==e&&(r=!1)}n=!n&&"\\"==e}}(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),p("regexp","string-2")):(t.eat("="),p("operator","operator",t.current()));if("`"==r)return e.tokenize=m,m(t,e);if("#"==r&&"!"==t.peek())return t.skipToEnd(),p("meta","meta");if("#"==r&&t.eatWhile(u))return p("variable","property");if("<"==r&&t.match("!--")||"-"==r&&t.match("->")&&!/\S/.test(t.string.slice(0,t.start)))return t.skipToEnd(),p("comment","comment");if(h.test(r))return">"==r&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=r&&"="!=r||t.eat("="):/[<>*+\-|&?]/.test(r)&&(t.eat(r),">"==r&&t.eat(r))),"?"==r&&t.eat(".")?p("."):p("operator","operator",t.current());if(u.test(r)){t.eatWhile(u);var i=t.current();if("."!=e.lastType){if(d.propertyIsEnumerable(i)){var o=d[i];return p(o.type,o.style,i)}if("async"==i&&t.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return p("async","keyword",i)}return p("variable","variable",i)}}function v(t,e){for(var n,r=!1;n=t.next();){if("/"==n&&r){e.tokenize=g;break}r="*"==n}return p("comment","comment")}function m(t,e){for(var n,r=!1;null!=(n=t.next());){if(!r&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=g;break}r=!r&&"\\"==n}return p("quasi","string-2",t.current())}var b="([{}])";function y(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=t.string.charAt(a),l=b.indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(u.test(s))o=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(t.string.charAt(a-1)==s&&"\\"!=t.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(e.fatArrowAt=a)}}var w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function x(t,e,n,r,i,o){this.indented=t,this.column=e,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function O(t,e){for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var r=t.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==e)return!0}var C={state:null,column:null,marked:null,cc:null};function S(){for(var t=arguments.length-1;t>=0;t--)C.cc.push(arguments[t])}function k(){return S.apply(null,arguments),!0}function j(t,e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}function T(t){var e=C.state;if(C.marked="def",e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var r=function t(e,n){if(n){if(n.block){var r=t(e,n.prev);return r?r==n.prev?n:new E(r,n.vars,!0):null}return j(e,n.vars)?n:new E(n.prev,new M(e,n.vars),!1)}return null}(t,e.context);if(null!=r)return void(e.context=r)}else if(!j(t,e.localVars))return void(e.localVars=new M(t,e.localVars));n.globalVars&&!j(t,e.globalVars)&&(e.globalVars=new M(t,e.globalVars))}function P(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function E(t,e,n){this.prev=t,this.vars=e,this.block=n}function M(t,e){this.name=t,this.next=e}var D=new M("this",new M("arguments",null));function A(){C.state.context=new E(C.state.context,C.state.localVars,!1),C.state.localVars=D}function L(){C.state.context=new E(C.state.context,C.state.localVars,!0),C.state.localVars=null}function _(){C.state.localVars=C.state.context.vars,C.state.context=C.state.context.prev}function N(t,e){var n=function(){var n=C.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new x(r,C.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function I(){var t=C.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function F(t){return function e(n){return n==t?k():";"==t||"}"==n||")"==n||"]"==n?S():k(e)}}function V(t,e){return"var"==t?k(N("vardef",e),wt,F(";"),I):"keyword a"==t?k(N("form"),$,V,I):"keyword b"==t?k(N("form"),V,I):"keyword d"==t?C.stream.match(/^\s*$/,!1)?k():k(N("stat"),B,F(";"),I):"debugger"==t?k(F(";")):"{"==t?k(N("}"),L,at,I,_):";"==t?k():"if"==t?("else"==C.state.lexical.info&&C.state.cc[C.state.cc.length-1]==I&&C.state.cc.pop()(),k(N("form"),$,V,I,jt)):"function"==t?k(Mt):"for"==t?k(N("form"),Tt,V,I):"class"==t||c&&"interface"==e?(C.marked="keyword",k(N("form","class"==t?t:e),Nt,I)):"variable"==t?c&&"declare"==e?(C.marked="keyword",k(V)):c&&("module"==e||"enum"==e||"type"==e)&&C.stream.match(/^\s*\w/,!1)?(C.marked="keyword","enum"==e?k(Gt):"type"==e?k(At,F("operator"),dt,F(";")):k(N("form"),xt,F("{"),N("}"),at,I,I)):c&&"namespace"==e?(C.marked="keyword",k(N("form"),z,V,I)):c&&"abstract"==e?(C.marked="keyword",k(V)):k(N("stat"),Q):"switch"==t?k(N("form"),$,F("{"),N("}","switch"),L,at,I,I,_):"case"==t?k(z,F(":")):"default"==t?k(F(":")):"catch"==t?k(N("form"),A,R,V,I,_):"export"==t?k(N("stat"),Rt,I):"import"==t?k(N("stat"),Ht,I):"async"==t?k(V):"@"==e?k(z,V):S(N("stat"),z,F(";"),I)}function R(t){if("("==t)return k(Lt,F(")"))}function z(t,e){return U(t,e,!1)}function H(t,e){return U(t,e,!0)}function $(t){return"("!=t?S():k(N(")"),B,F(")"),I)}function U(t,e,n){if(C.state.fatArrowAt==C.stream.start){var r=n?X:Y;if("("==t)return k(A,N(")"),it(Lt,")"),I,F("=>"),r,_);if("variable"==t)return S(A,xt,F("=>"),r,_)}var i=n?q:W;return w.hasOwnProperty(t)?k(i):"function"==t?k(Mt,i):"class"==t||c&&"interface"==e?(C.marked="keyword",k(N("form"),_t,I)):"keyword c"==t||"async"==t?k(n?H:z):"("==t?k(N(")"),B,F(")"),I,i):"operator"==t||"spread"==t?k(n?H:z):"["==t?k(N("]"),qt,I,i):"{"==t?ot(et,"}",null,i):"quasi"==t?S(G,i):"new"==t?k(function(t){return function(e){return"."==e?k(t?Z:J):"variable"==e&&c?k(mt,t?q:W):S(t?H:z)}}(n)):"import"==t?k(z):k()}function B(t){return t.match(/[;\}\)\],]/)?S():S(z)}function W(t,e){return","==t?k(B):q(t,e,!1)}function q(t,e,n){var r=0==n?W:q,i=0==n?z:H;return"=>"==t?k(A,n?X:Y,_):"operator"==t?/\+\+|--/.test(e)||c&&"!"==e?k(r):c&&"<"==e&&C.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?k(N(">"),it(dt,">"),I,r):"?"==e?k(z,F(":"),i):k(i):"quasi"==t?S(G,r):";"!=t?"("==t?ot(H,")","call",r):"."==t?k(tt,r):"["==t?k(N("]"),B,F("]"),I,r):c&&"as"==e?(C.marked="keyword",k(dt,r)):"regexp"==t?(C.state.lastType=C.marked="operator",C.stream.backUp(C.stream.pos-C.stream.start-1),k(i)):void 0:void 0}function G(t,e){return"quasi"!=t?S():"${"!=e.slice(e.length-2)?k(G):k(z,K)}function K(t){if("}"==t)return C.marked="string-2",C.state.tokenize=m,k(G)}function Y(t){return y(C.stream,C.state),S("{"==t?V:z)}function X(t){return y(C.stream,C.state),S("{"==t?V:H)}function J(t,e){if("target"==e)return C.marked="keyword",k(W)}function Z(t,e){if("target"==e)return C.marked="keyword",k(q)}function Q(t){return":"==t?k(I,V):S(W,F(";"),I)}function tt(t){if("variable"==t)return C.marked="property",k()}function et(t,e){return"async"==t?(C.marked="property",k(et)):"variable"==t||"keyword"==C.style?(C.marked="property","get"==e||"set"==e?k(nt):(c&&C.state.fatArrowAt==C.stream.start&&(n=C.stream.match(/^\s*:\s*/,!1))&&(C.state.fatArrowAt=C.stream.pos+n[0].length),k(rt))):"number"==t||"string"==t?(C.marked=s?"property":C.style+" property",k(rt)):"jsonld-keyword"==t?k(rt):c&&P(e)?(C.marked="keyword",k(et)):"["==t?k(z,st,F("]"),rt):"spread"==t?k(H,rt):"*"==e?(C.marked="keyword",k(et)):":"==t?S(rt):void 0;var n}function nt(t){return"variable"!=t?S(rt):(C.marked="property",k(Mt))}function rt(t){return":"==t?k(H):"("==t?S(Mt):void 0}function it(t,e,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var a=C.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),k(function(n,r){return n==e||r==e?S():S(t)},r)}return i==e||o==e?k():n&&n.indexOf(";")>-1?S(t):k(F(e))}return function(n,i){return n==e||i==e?k():S(t,r)}}function ot(t,e,n){for(var r=3;r"),dt):void 0}function ht(t){if("=>"==t)return k(dt)}function ft(t){return"}"==t?k():","==t||";"==t?k(ft):S(pt,ft)}function pt(t,e){return"variable"==t||"keyword"==C.style?(C.marked="property",k(pt)):"?"==e||"number"==t||"string"==t?k(pt):":"==t?k(dt):"["==t?k(F("variable"),lt,F("]"),pt):"("==t?S(Dt,pt):t.match(/[;\}\)\],]/)?void 0:k()}function gt(t,e){return"variable"==t&&C.stream.match(/^\s*[?:]/,!1)||"?"==e?k(gt):":"==t?k(dt):"spread"==t?k(gt):S(dt)}function vt(t,e){return"<"==e?k(N(">"),it(dt,">"),I,vt):"|"==e||"."==t||"&"==e?k(dt):"["==t?k(dt,F("]"),vt):"extends"==e||"implements"==e?(C.marked="keyword",k(dt)):"?"==e?k(dt,F(":"),dt):void 0}function mt(t,e){if("<"==e)return k(N(">"),it(dt,">"),I,vt)}function bt(){return S(dt,yt)}function yt(t,e){if("="==e)return k(dt)}function wt(t,e){return"enum"==e?(C.marked="keyword",k(Gt)):S(xt,st,St,kt)}function xt(t,e){return c&&P(e)?(C.marked="keyword",k(xt)):"variable"==t?(T(e),k()):"spread"==t?k(xt):"["==t?ot(Ct,"]"):"{"==t?ot(Ot,"}"):void 0}function Ot(t,e){return"variable"!=t||C.stream.match(/^\s*:/,!1)?("variable"==t&&(C.marked="property"),"spread"==t?k(xt):"}"==t?S():"["==t?k(z,F("]"),F(":"),Ot):k(F(":"),xt,St)):(T(e),k(St))}function Ct(){return S(xt,St)}function St(t,e){if("="==e)return k(H)}function kt(t){if(","==t)return k(wt)}function jt(t,e){if("keyword b"==t&&"else"==e)return k(N("form","else"),V,I)}function Tt(t,e){return"await"==e?k(Tt):"("==t?k(N(")"),Pt,I):void 0}function Pt(t){return"var"==t?k(wt,Et):"variable"==t?k(Et):S(Et)}function Et(t,e){return")"==t?k():";"==t?k(Et):"in"==e||"of"==e?(C.marked="keyword",k(z,Et)):S(z,Et)}function Mt(t,e){return"*"==e?(C.marked="keyword",k(Mt)):"variable"==t?(T(e),k(Mt)):"("==t?k(A,N(")"),it(Lt,")"),I,ct,V,_):c&&"<"==e?k(N(">"),it(bt,">"),I,Mt):void 0}function Dt(t,e){return"*"==e?(C.marked="keyword",k(Dt)):"variable"==t?(T(e),k(Dt)):"("==t?k(A,N(")"),it(Lt,")"),I,ct,_):c&&"<"==e?k(N(">"),it(bt,">"),I,Dt):void 0}function At(t,e){return"keyword"==t||"variable"==t?(C.marked="type",k(At)):"<"==e?k(N(">"),it(bt,">"),I):void 0}function Lt(t,e){return"@"==e&&k(z,Lt),"spread"==t?k(Lt):c&&P(e)?(C.marked="keyword",k(Lt)):c&&"this"==t?k(st,St):S(xt,st,St)}function _t(t,e){return"variable"==t?Nt(t,e):It(t,e)}function Nt(t,e){if("variable"==t)return T(e),k(It)}function It(t,e){return"<"==e?k(N(">"),it(bt,">"),I,It):"extends"==e||"implements"==e||c&&","==t?("implements"==e&&(C.marked="keyword"),k(c?dt:z,It)):"{"==t?k(N("}"),Ft,I):void 0}function Ft(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||c&&P(e))&&C.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(C.marked="keyword",k(Ft)):"variable"==t||"keyword"==C.style?(C.marked="property",k(Vt,Ft)):"number"==t||"string"==t?k(Vt,Ft):"["==t?k(z,st,F("]"),Vt,Ft):"*"==e?(C.marked="keyword",k(Ft)):c&&"("==t?S(Dt,Ft):";"==t||","==t?k(Ft):"}"==t?k():"@"==e?k(z,Ft):void 0}function Vt(t,e){if("?"==e)return k(Vt);if(":"==t)return k(dt,St);if("="==e)return k(H);var n=C.state.lexical.prev;return S(n&&"interface"==n.info?Dt:Mt)}function Rt(t,e){return"*"==e?(C.marked="keyword",k(Wt,F(";"))):"default"==e?(C.marked="keyword",k(z,F(";"))):"{"==t?k(it(zt,"}"),Wt,F(";")):S(V)}function zt(t,e){return"as"==e?(C.marked="keyword",k(F("variable"))):"variable"==t?S(H,zt):void 0}function Ht(t){return"string"==t?k():"("==t?S(z):S($t,Ut,Wt)}function $t(t,e){return"{"==t?ot($t,"}"):("variable"==t&&T(e),"*"==e&&(C.marked="keyword"),k(Bt))}function Ut(t){if(","==t)return k($t,Ut)}function Bt(t,e){if("as"==e)return C.marked="keyword",k($t)}function Wt(t,e){if("from"==e)return C.marked="keyword",k(z)}function qt(t){return"]"==t?k():S(it(H,"]"))}function Gt(){return S(N("form"),xt,F("{"),N("}"),it(Kt,"}"),I,I)}function Kt(){return S(xt,St)}function Yt(t,e,n){return e.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}return _.lex=!0,I.lex=!0,{startState:function(t){var e={tokenize:g,lastType:"sof",cc:[],lexical:new x((t||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new E(null,null,!1),indented:t||0};return n.globalVars&&"object"==typeof n.globalVars&&(e.globalVars=n.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),y(t,e)),e.tokenize!=v&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==r?n:(e.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",function(t,e,n,r,i){var o=t.cc;for(C.state=t,C.stream=i,C.marked=null,C.cc=o,C.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;)if((o.length?o.pop():l?z:V)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return C.marked?C.marked:"variable"==n&&O(t,r)?"variable-2":e}}(e,n,r,i,t))},indent:function(e,r){if(e.tokenize==v||e.tokenize==m)return t.Pass;if(e.tokenize!=g)return 0;var i,s=r&&r.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(r))for(var c=e.cc.length-1;c>=0;--c){var u=e.cc[c];if(u==I)l=l.prev;else if(u!=jt)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=e.cc[e.cc.length-1])&&(i==W||i==q)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var d=l.type,f=s==d;return"vardef"==d?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==d&&"{"==s?l.indented:"form"==d?l.indented+o:"stat"==d?l.indented+(function(t,e){return"operator"==t.lastType||","==t.lastType||h.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}(e,r)?a||o:0):"switch"!=l.info||f||0==n.doubleIndentSwitch?l.align?l.column+(f?0:1):l.indented+(f?0:o):l.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:Yt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=z&&e!=H||t.cc.pop()}}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/manifest+json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(13))},function(t,e,n){!function(t){t.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e){return/^[;{}]$/.test(e)}}),t.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e,n,r){return this.jsonMode?/^[\[,{]$/.test(e)||/^}/.test(n):(";"!=e||!r.lexical||")"!=r.lexical.type)&&/^[;{}]$/.test(e)&&!/^;/.test(n)}});var e=/^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;t.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",newlineAfterToken:function(t,n,r,i){var o=!1;return"html"==this.configuration&&(o=!!i.context&&e.test(i.context.tagName)),!o&&("tag"==t&&/>$/.test(n)&&i.context||/^-1&&s>-1&&s>a&&(t=t.substr(0,a)+t.substring(a+o.commentStart.length,s)+t.substr(s+o.commentEnd.length)),i.replaceRange(t,n,r)}})}),t.defineExtension("autoIndentRange",function(t,e){var n=this;this.operation(function(){for(var r=t.line;r<=e.line;r++)n.indentLine(r,"smart")})}),t.defineExtension("autoFormatRange",function(e,n){var r=this,i=r.getMode(),o=r.getRange(e,n).split("\n"),a=t.copyState(i,r.getTokenAt(e).state),s=r.getOption("tabSize"),l="",c=0,u=0===e.ch;function d(){l+="\n",u=!0,++c}for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent,this.parentView=t.parentView;var n=this.pfx,r=this.ppfx,i=this.parent,o=this.collection;this.listenTo(o,"add",this.addTo),this.listenTo(o,"reset resetNavigator",this.render),this.listenTo(o,"remove",this.removeChildren),this.className="".concat(n,"layers");var s=e.em;if(e.sortable&&!this.opt.sorter){var l=s.get("Utils");this.opt.sorter=new l.Sorter({container:e.sortContainer||this.el,containerSel:".".concat(this.className),itemSel:".".concat(n,"layer"),ignoreViewChildren:1,onEndMove:function(t,e,n){var r=e.getSourceModel();s.setSelected(r,{forceChange:1}),s.trigger("".concat(a.b,":end"),n)},avoidSelectOnEnd:1,nested:1,ppfx:r,pfx:n})}this.sorter=this.opt.sorter||"",this.$el.data("collection",o),i&&this.$el.data("model",i)},removeChildren:function(t){var e=t.viewLayer;e&&(e.remove(),t.viewLayer=0)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var r=this.level,i=this.parentView,a=e||null,s=new(0,o.a)({level:r,model:t,parentView:i,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}).render().el;if(a)a.appendChild(s);else if(void 0!==n){var l="before";this.$el.children().length==n&&(n--,l="after"),n<0?this.$el.append(s):this.$el.children().eq(n)[l](s)}else this.$el.append(s);return s},isCountable:function(t,e){var n=t.get("type"),r=t.get("tagName");return!(("textnode"==n||"br"==r)&&e||!t.get("layerable"))},render:function(){var t=this,e=document.createDocumentFragment(),n=this.el;return n.innerHTML="",this.collection.each(function(n){return t.addToCollection(n,e)}),n.appendChild(e),n.className=this.className,this}})},function(t,e,n){var r={"./CanvasClear":45,"./CanvasClear.js":45,"./CanvasMove":46,"./CanvasMove.js":46,"./CommandAbstract":22,"./CommandAbstract.js":22,"./ComponentDelete":47,"./ComponentDelete.js":47,"./ComponentDrag":48,"./ComponentDrag.js":48,"./ComponentEnter":49,"./ComponentEnter.js":49,"./ComponentExit":50,"./ComponentExit.js":50,"./ComponentNext":51,"./ComponentNext.js":51,"./ComponentPrev":52,"./ComponentPrev.js":52,"./ComponentStyleClear":53,"./ComponentStyleClear.js":53,"./CopyComponent":54,"./CopyComponent.js":54,"./DeleteComponent":55,"./DeleteComponent.js":55,"./ExportTemplate":56,"./ExportTemplate.js":56,"./Fullscreen":57,"./Fullscreen.js":57,"./MoveComponent":58,"./MoveComponent.js":58,"./OpenAssets":59,"./OpenAssets.js":59,"./OpenBlocks":60,"./OpenBlocks.js":60,"./OpenLayers":61,"./OpenLayers.js":61,"./OpenStyleManager":62,"./OpenStyleManager.js":62,"./OpenTraitManager":63,"./OpenTraitManager.js":63,"./PasteComponent":64,"./PasteComponent.js":64,"./Preview":65,"./Preview.js":65,"./Resize":66,"./Resize.js":66,"./SelectComponent":14,"./SelectComponent.js":14,"./SelectPosition":27,"./SelectPosition.js":27,"./ShowOffset":67,"./ShowOffset.js":67,"./SwitchVisibility":68,"./SwitchVisibility.js":68};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=91},function(t,e,n){"use strict";n.r(e);var r=n(8),i=n.n(r),o=n(2),a=n.n(o),s=n(1),l=n.n(s),c=n(0),u={stylePrefix:"comp-",wrapperId:"wrapper",wrapperName:"Body",wrapper:{removable:!1,copyable:!1,draggable:!1,components:[],traits:[],stylable:["background","background-color","background-image","background-repeat","background-attachment","background-position","background-size"]},components:[],draggableComponents:1,storeWrapper:0,processor:0,voidElements:["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]},d=n(5),h=n(21),f=n(6),p=n(35);function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function v(t){for(var e=1;e\n \n '),fallback:"\n \n '),file:""}),initialize:function(t,e){d.a.prototype.initialize.apply(this,arguments);var n=this.get("attributes").src;n&&this.set("src",n,{silent:1})},initToolbar:function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},e=this.get(t.fallback?"fallback":"src")||"",n=e;return e&&"2&&void 0!==arguments[2]?arguments[2]:{}).fromDisable&&this.disableEditing()},onActive:function(t){var e=this.rte,n=this.em;if(!(this.rteEnabled||!this.model.get("editable")||n&&n.isEditing())){if(t&&t.stopPropagation&&t.stopPropagation(),e)try{this.activeRte=e.enable(this,this.activeRte)}catch(t){n.logError(t)}this.toggleEvents(1)}},onDisable:function(){this.disableEditing()},disableEditing:function(){var t=this.model,e=this.rte,n=this.activeRte,r=this.em,i=t.get("editable");if(e&&i){try{e.disable(this,n)}catch(t){r.logError(t)}this.syncContent()}this.toggleEvents()},getContent:function(){var t=this.activeRte;return t&&"function"==typeof t.getContent?t.getContent():this.getChildrenContainer().innerHTML},syncContent:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=this.rte;if(this.rteEnabled||t.force){var r=this.getContent(),i=e.components(),o=nt({fromDisable:1},t);if(e.set("content","",o),n.customRte)i.length&&i.reset(null,t),e.set("content",r,o);else{var a=function e(n){var r=!!n.get("textable"),i=!["text","default",""].some(function(t){return n.is(t)})||r;n.set(nt({_innertext:!i,editable:i&&n.get("editable"),selectable:i,hoverable:i,removable:r,draggable:r,highlightable:0,copyable:r},!r&&{toolbar:""}),t),n.get("components").each(function(t){return e(t)})};i.reset(r,t),i.each(function(t){return a(t)}),i.trigger("resetNavigator")}}},onInput:function(){var t=this.em,e="component",n=["".concat(e,":update"),"".concat(e,":input")].join(" ");t&&t.trigger(n,this.model)},disablePropagation:function(t){t.stopPropagation()},toggleEvents:function(t){var e=this.em,n=this.model,r={on:tt.v,off:tt.u},i=t?"on":"off";e.setEditing(t),this.rteEnabled=!!t;var o=[this.el.ownerDocument,document];if(r.off(o,"mousedown",this.disableEditing),r[i](o,"mousedown",this.disableEditing),e[i]("toolbar:run:before",this.disableEditing),n[i]("removed",this.disableEditing),this.$el.off("mousedown",this.disablePropagation),this.$el[i]("mousedown",this.disablePropagation),this.config.draggableComponents)for(var a=this.el;a;)a.draggable=!t,(a=a.parentNode)&&"BODY"==a.tagName&&(a=0)}}),ot=it.extend({render:function(){for(var t=arguments.length,e=new Array(t),n=0;n/g,">").replace(/"/g,""").replace(/'/g,"'")}},{isComponent:function(t){var e="";return 3===t.nodeType&&(e={type:"textnode",content:t.textContent}),e}});function Dt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var At=Mt.extend({defaults:function(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{},o=e.components(),a=t.get("UndoManager"),s=t.handleUpdates.bind(t),l=this.handleChanges.bind(this),c=this.handleChangesColl.bind(this),u=this.handleRemoves.bind(this);a&&a.add(e),a&&o&&a.add(o);[[e,"change:style change:content change:attributes change:src",s],[e,"change:components",c],[o,"add",l],[o,"remove reset",u],[e.get("classes"),"add remove",s]].forEach(function(e){t.stopListening(e[0],e[1],e[2]),t.listenTo(e[0],e[1],e[2])}),!i.avoidStore&&s("","",i),o.each(function(t){return r.handleChanges(t,n,i)})},handleChangesColl:function(e,n){var r=t.get("UndoManager");if(r&&n instanceof l.a.Collection){var i=this.handleChanges.bind(this),o=this.handleRemoves.bind(this);r.add(n),[[n,"add",i],[n,"remove reset",o]].forEach(function(e){t.stopListening(e[0],e[1],e[2]),t.listenTo(e[0],e[1],e[2])})}},handleRemoves:function(e,n,r){var i=r||n;t.handleUpdates(e,n,i)},load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=this.em,n="";!t&&r.stm&&(t=r.em.getCacheLoad());var i=t,o=i.components,a=i.html;if(o)if(Object(c.isObject)(o)||Object(c.isArray)(o))n=o;else try{n=JSON.parse(o)}catch(t){e&&e.logError(t)}else a&&(n=a);var s=n&&n.constructor===Object;return(n&&n.length||s)&&(this.clear(),s?this.getWrapper().set(n):this.getComponents().add(n)),n},store:function(t){if(r.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=r.em.getHtml()),n.indexOf("components")>=0){this.em;var i=r.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(i)}return t||r.stm.store(e),e}},getComponent:function(){return e},getWrapper:function(){return this.getComponent()},getComponents:function(){return this.getWrapper().get("components")},addComponent:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getComponents().add(t,e)},render:function(){return n.render().el},clear:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.getComponents().map(function(t){return t}).forEach(function(e){return e.remove(t)}),this},setComponents:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.clear(e).addComponent(t,e)},addType:function(t,e){var n=this.em,r=e.model,o=void 0===r?{}:r,s=e.view,l=void 0===s?{}:s,u=e.isComponent,d=e.extend,h=e.extendView,f=e.extendFn,p=void 0===f?[]:f,g=e.extendFnView,v=void 0===g?[]:g,m=this.getType(t),b=this.getType(d),y=this.getType(h),w=b||m||this.getType("default"),x=w.model,O=y?y.view:w.view,C=function(t,e,n){return t.reduce(function(t,r){var i=e[r],o=n.prototype[r];return i&&o&&(t[r]=function(){o.bind(this).apply(void 0,arguments),i.bind(this).apply(void 0,arguments)}),t},{})};"object"===i()(o)&&(e.model=x.extend(Ft(Ft(Ft({},o),C(p,o,x)),{},{defaults:Ft(Ft({},x.prototype.defaults),Object(c.result)(o,"defaults")||{})}),{isComponent:!m||b||u?u||function(){return 0}:x.isComponent})),"object"===i()(l)&&(e.view=O.extend(Ft(Ft({},l),C(v,l,O)))),m?(m.model=e.model,m.view=e.view):(e.id=t,a.unshift(e));var S="component:type:".concat(m?"update":"add");return n&&n.trigger(S,m||e),this},getType:function(t){for(var e=a,n=0;n1&&void 0!==arguments[1]?arguments[1]:{};t&&(t.set({status:"selected"}),["component:selected","component:toggled"].forEach(function(r){return e.em.trigger(r,t,n)}))},selectRemove:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&(this.em,t.set({status:"",state:""}),["component:deselected","component:toggled"].forEach(function(r){return e.em.trigger(r,t,n)}))},componentHovered:function(){var t=r.em,e=t.get("componentHovered"),n=t.previous("componentHovered"),i="hovered";n&&n.get("status")==i&&n.set({status:"",state:""}),e&&Object(c.isEmpty)(e.get("status"))&&e.set("status",i)},allById:function(){return o},destroy:function(){this.clear(),n.remove(),[r,t,o,e,n].forEach(function(t){return{}}),this.em={}}}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r),o=n(2),a=n.n(o),s=n(3),l=n(15),c=n.n(l),u=n(16),d=n.n(u),h=n(0),f=function(){function t(e,n){var r=this;c()(this,t),this.em=e;var i=n||e.get("Canvas").getFrames().map(function(t){return t.get("root").getEl()}),o=Array.isArray(i)?i:[i];return this.el=i,this.counter=0,Object(h.bindAll)(this,"handleDragEnter","handleDragOver","handleDrop","handleDragLeave"),o.forEach(function(t){return r.toggleEffects(t,1)}),this}return d()(t,[{key:"toggleEffects",value:function(t,e){var n={on:s.v,off:s.u},r=e?"on":"off";n[r](t,"dragenter",this.handleDragEnter),n[r](t,"dragover",this.handleDragOver),n[r](t,"drop",this.handleDrop),n[r](t,"dragleave",this.handleDragLeave)}},{key:"endDrop",value:function(t,e){var n=this.em,r=this.dragStop;this.counter=0,r&&r(t),n.trigger("canvas:dragend",e)}},{key:"handleDragLeave",value:function(t){this.updateCounter(-1,t)}},{key:"updateCounter",value:function(t,e){this.counter+=t,0===this.counter&&this.endDrop(1,e)}},{key:"handleDragEnter",value:function(t){var e=this,n=this.em,r=t.dataTransfer;if(this.updateCounter(1,t),!this.over){this.over=1;var i,o,a=n.get("Utils"),s=n.get("Canvas"),l=s.getBody(),c=n.get("dragContent")||"
";if(n.stopDefault(),n.inAbsoluteMode()){var u=n.get("DomComponents").getWrapper(),d=u.append({})[0],h=n.get("Commands").run("core:component-drag",{event:t,guidesInfo:1,center:1,target:d,onEnd:function(t,n,i){var o;if(!i.cancelled){o=u.append(c)[0];var a=d.getStyle(),s=a.left,l=a.top,h=a.position;o.addStyle({left:s,top:l,position:h})}e.handleDragEnd(o,r),d.remove()}});i=function(e){return h.stop(t,{cancel:e})},o=function(t){return c=t}}else{var f=new a.Sorter({em:n,wmargin:1,nested:1,canvasRelative:1,direction:"a",container:l,placer:s.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:"gjs-",onEndMove:function(t){return e.handleDragEnd(t,r)},document:s.getFrameEl().contentDocument});f.setDropContent(c),f.startSort(),this.sorter=f,i=function(t){t&&(f.moved=0),f.endMove()},o=function(t){return f.setDropContent(t)}}this.dragStop=i,this.dragContent=o,n.trigger("canvas:dragenter",r,c)}}},{key:"handleDragEnd",value:function(t,e){var n=this.em;this.over=0,t&&(n.set("dragResult",t),n.trigger("canvas:drop",e,t)),n.runDefault({preserveSelected:1})}},{key:"handleDragOver",value:function(t){t.preventDefault(),this.em.trigger("canvas:dragover",t)}},{key:"handleDrop",value:function(t){t.preventDefault();var e=this.dragContent,n=t.dataTransfer,r=this.getContentByData(n).content;t.target.style.border="",r&&e&&e(r),this.endDrop(!r,t)}},{key:"getContentByData",value:function(t){var e=this.em,n=t.types,r=t.files||[],i=e.get("dragContent"),o=t.getData("text");if(r.length){o=[];for(var a=0;a=0)o=t.getData("text/html").replace(/<\/?meta[^>]*>/g,"");else if(Object(h.indexOf)(n,"text/uri-list")>=0)o={type:"link",attributes:{href:o},content:o};else if(Object(h.indexOf)(n,"text/json")>=0){var c=t.getData("text/json");c&&(o=JSON.parse(c))}else 1===n.length&&"text/plain"===n[0]&&(o="
".concat(o,"
"));var u={content:o};return e.trigger("canvas:dragdata",t,u),u}}]),t}(),p={stylePrefix:"cv-",scripts:[],styles:[],customBadgeLabel:"",autoscrollLimit:50,notTextable:["button","a","input[type=checkbox]","input[type=radio]"]},g=n(1),v=n.n(g),m=n(5),b=n(33);function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var w=v.a.Model.extend({defaults:{wrapper:"",width:null,height:null,head:"",x:0,y:0,root:0,components:0,styles:0,attributes:{}},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.attributes,r=n.root,i=n.styles,o=n.components;this.set("head",[]),this.em=e.em;var a={em:e.em,config:e.em.get("DomComponents").getConfig(),frame:this};!r&&this.set("root",new m.a({type:"wrapper",components:o||[]},a)),(!i||Object(h.isString)(i))&&this.set("styles",new b.a(i,a))},remove:function(){this.view=0;var t=this.collection;return t&&t.remove(this)},getHead:function(){return i()(this.get("head"))},setHead:function(t){return this.set("head",i()(t))},addHeadItem:function(t){var e=this.getHead();e.push(t),this.setHead(e)},getHeadByAttr:function(t,e,n){return this.getHead().filter(function(r){return r.attributes&&r.attributes[t]==e&&(!n||n===r.tag)})[0]},removeHeadByAttr:function(t,e,n){var r=this.getHead(),i=this.getHeadByAttr(t,e,n),o=r.indexOf(i);o>=0&&(r.splice(o,1),this.setHead(r))},addLink:function(t){var e="link";!this.getHeadByAttr("href",t,e)&&this.addHeadItem({tag:e,attributes:{href:t,rel:"stylesheet"}})},removeLink:function(t){this.removeHeadByAttr("href",t,"link")},addScript:function(t){var e="script";!this.getHeadByAttr("src",t,e)&&this.addHeadItem({tag:e,attributes:{src:t}})},removeScript:function(t){this.removeHeadByAttr("src",t,"script")},_emitUpdated:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.em.trigger("frame:updated",function(t){for(var e=1;e=this.itemsToLoad&&(this.trigger("loaded:all"),this.listenToLoadItems(0))},listenToLoad:function(){this.loadedItems=0,this.itemsToLoad=this.length,this.listenToLoadItems(1)},listenToLoadItems:function(t){var e=this;this.forEach(function(n){return n[t?"on":"off"]("loaded",e.itemLoaded)})}}),O=v.a.Model.extend({defaults:{frame:"",frames:"",wrapper:"",rulers:!1,zoom:100,x:0,y:0},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.em,n=t.styles,r=void 0===n?[]:n,i=t.scripts,o=void 0===i?[]:i,a=e&&e.getWrapper(),s=e&&e.getStyle(),l=new w({root:a,styles:s},t);r.forEach(function(t){return l.addLink(t)}),o.forEach(function(t){return l.addScript(t)}),this.em=e,this.set("frame",l),this.set("frames",new x([l],t)),this.listenTo(this,"change:zoom",this.onZoomChange),this.listenTo(e,"change:device",this.updateDevice)},updateDevice:function(){var t=this.em,e=t.getDeviceModel(),n=t.getCurrentFrameModel();if(n&&e){var r=e.attributes,i=r.width,o=r.height;n.set({width:i,height:o})}},onZoomChange:function(){this.get("zoom")<1&&this.set("zoom",1)}}),C=n(20),S=n(37),k=n(6),j=n(9);function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function P(t){for(var e=1;ea&&(s+=i-a),!Object(h.isUndefined)(t)&&s!==r&&s>0&&s0){var i=r.shift(),o=Object(j.e)("script",P({type:"text/javascript"},Object(h.isString)(i)?{src:i}:i));o.onerror=o.onload=n.bind(null,r),e.contentDocument.head.appendChild(o)}else t.renderBody()}(i()(n.scripts))}},renderBody:function(){var t=this,e=this.config,n=this.model,r=this.ppfx,i=n.get("root"),o=n.get("styles"),a=e.em,l=this.getDoc(),c=this.getHead(),u=this.getBody(),d=this.getWindow(),f=a.get("Config"),p=[];d._isEditor=!0,e.styles.forEach(function(t){return p.push(Object(h.isString)(t)?{tag:"link",attributes:{href:t,rel:"stylesheet"}}:{tag:"link",attributes:P({rel:"stylesheet"},t)})}),p.length&&Object(j.c)(c,p),Object(j.a)(u,"")),this.root=new k.default({model:i,config:P(P({},i.config),{},{frameView:this})}).render(),Object(j.a)(u,this.root.el),Object(j.a)(u,new S.a({collection:o,config:P(P({},a.get("CssComposer").getConfig()),{},{frameView:this})}).render().el),Object(j.a)(u,this.getJsContainer()),Object(s.v)(u,"click",function(t){return t&&"A"==t.target.tagName&&t.preventDefault()}),Object(s.v)(u,"submit",function(t){return t&&t.preventDefault()}),[{event:"keydown keyup keypress",class:"KeyboardEvent"},{event:"mousedown mousemove mouseup",class:"MouseEvent"},{event:"wheel",class:"WheelEvent"}].forEach(function(e){return e.event.split(" ").forEach(function(n){l.addEventListener(n,function(n){return t.el.dispatchEvent(Object(j.d)(n,e.class))})})}),this._toggleEffects(1),n.trigger("loaded")},_toggleEffects:function(t){(t?s.v:s.u)(this.getWindow(),"".concat(j.i," resize"),this._emitUpdate)},_emitUpdate:function(){this.model._emitUpdated()}}),M=n(17);function D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function A(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(h.bindAll)(this,"onScroll","frameLoaded","updateOffset","remove","startDrag");var n=this.model,r=A(A({},t.config||e),{},{frameWrapView:this}),i=r.canvasView,o=r.em;this.cv=i,this.config=r,this.em=o,this.canvas=o&&o.get("Canvas"),this.ppfx=r.pStylePrefix||"",this.frame=new E({model:n,config:r}),this.classAnim="".concat(this.ppfx,"frame-wrapper--anim"),this.listenTo(n,"loaded",this.frameLoaded),this.listenTo(n,"change:x change:y",this.updatePos),this.listenTo(n,"change:width change:height",this.updateSize),this.listenTo(n,"destroy remove",this.remove),this.updatePos(),this.setupDragger()},setupDragger:function(){var t,e,n,r=this,i=this.canvas,o=this.model,a=function(t){i.toggleFramesEvents(t)};this.dragger=new M.a({onStart:function(){var i=o.attributes,s=i.x,l=i.y;n=r.em.getZoomMultiplier(),t=s,e=l,a()},onEnd:function(){return a(1)},setPosition:function(r){o.set({x:t+r.x*n,y:e+r.y*n})}})},startDrag:function(t){t&&this.dragger.start(t)},remove:function(){return this.frame.remove(),this.frame={},v.a.View.prototype.remove.apply(this,arguments),this},updateOffset:Object(h.debounce)(function(){var t=this.em,e=this.$el,n=this.frame;t.runDefault({preserveSelected:1}),e.removeClass(this.classAnim),n.model._emitUpdated()}),updatePos:function(t){var e=this.model,n=this.el,r=e.attributes,i=r.x,o=r.y,a=n.style;this.frame.rect=0,a.left=isNaN(i)?i:"".concat(i,"px"),a.top=isNaN(o)?o:"".concat(o,"px"),t&&this.updateOffset()},updateSize:Object(h.debounce)(function(){this.updateDim()}),updateDim:function(){var t=this.em,e=this.el,n=this.$el,r=this.model,i=this.classAnim,o=r.attributes,a=o.width,s=o.height,l=e.style,c=l.width||"",u=l.height||"",d=a||"",f=s||"",p=c==d&&u==f;if(this.frame.rect=0,n.addClass(i),l.width=Object(h.isNumber)(d)?"".concat(d).concat("px"):d,l.height=Object(h.isNumber)(f)?"".concat(f).concat("px"):f,Object(h.isNull)(a)||Object(h.isNull)(s)){var g=A(A({},a?{}:{width:e.offsetWidth}),s?{}:{height:e.offsetHeight});r.set(g,{silent:1})}t.stopDefault({preserveSelected:1}),p?this.updateOffset():n.one(j.i,this.updateOffset)},onScroll:function(){var t=this.frame;this.em.trigger("frame:scroll",{frame:t,body:t.getBody(),target:t.getWindow()})},frameLoaded:function(){this.frame.getWindow().onscroll=this.onScroll,this.updateDim()},render:function(){var t=this.frame,e=this.$el,n=this.ppfx,r=this.cv,i=this.model,o=this.el,a=i.attributes.onRender;t.render(),e.empty().attr({class:"".concat(n,"frame-wrapper")}).append('\n
\n
\n ').concat(i.get("name")||"",'\n
\n
\n \n
\n
\n
\n
\n
\n ')).append(t.el);var s=Object(j.e)("div",{class:"".concat(n,"tools"),style:"pointer-events:none; display: none"},'\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n '));return this.elTools=s,r.toolsWrapper.appendChild(s),a&&a({el:o,elTop:o.querySelector("[data-frame-top]"),elRight:o.querySelector("[data-frame-right]"),elBottom:o.querySelector("[data-frame-bottom]"),elLeft:o.querySelector("[data-frame-left]"),frame:i,frameWrapperView:this,remove:this.remove,startDrag:this.startDrag}),this}}),_=C.a.extend({itemView:L,autoAdd:1,init:function(){this.listenTo(this.collection,"reset",this.render)},onRender:function(){var t=this.config,e=this.$el,n=t.em;n&&e.attr({class:"".concat(n.getConfig("stylePrefix"),"frames")})}});function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function I(t){for(var e=1;e
\n
\n ')},initialize:function(t){Object(h.bindAll)(this,"clearOff","onKeyPress","onCanvasMove"),Object(s.v)(window,"scroll resize",this.clearOff);var e=this.model,n=e.get("frames");this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"canvas";var r=this.em,i=this.config;this.frames=new _({collection:n,config:I(I({},i),{},{canvasView:this,renderContent:1})}),this.listenTo(r,"change:canvasOffset",this.clearOff),this.listenTo(r,"component:selected",this.checkSelected),this.listenTo(e,"change:zoom change:x change:y",this.updateFrames),this.listenTo(n,"loaded:all",function(){return r.trigger("loaded")}),this.toggleListeners(1)},checkSelected:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).scroll,n=this.em.get("currentFrame");e&&t.views.forEach(function(t){t._getFrame()!==n&&t.scrollIntoView(e)})},remove:function(){var t=this.model.get("frames");t.remove(t.models),this.frames.remove(),this.frames={},v.a.View.prototype.remove.apply(this,arguments),this.toggleListeners()},preventDefault:function(t){t&&(t.preventDefault(),t._parentEvent&&t._parentEvent.preventDefault())},onCanvasMove:function(t){},toggleListeners:function(t){this.el,(t?s.v:s.u)(document,"keypress",this.onKeyPress)},onKeyPress:function(t){var e=this.em;" "!==Object(s.f)(t)||1===e.getZoomDecimal()||e.get("Canvas").isInputFocused()||(this.preventDefault(t),e.get("Editor").runCommand("core:canvas-move"))},onWheel:function(t){if((t.ctrlKey||t.metaKey)&&this.em.getConfig("multiFrames")){this.preventDefault(t);var e=this.model,n=Math.max(-1,Math.min(1,t.wheelDelta||-t.detail)),r=e.get("zoom");e.set("zoom",r+2*n)}},updateFrames:function(t){var e=this.em,n=this.model.attributes,r=n.x,i=n.y,o=this.getZoom(),a={preserveSelected:1},s=o?1/o:1;this.framesArea.style.transform="scale(".concat(o,") translate(").concat(r*s,"px, ").concat(i*s,"px)"),this.clearOff(),e.stopDefault(a),e.trigger("canvas:update",t),F&&clearTimeout(F),F=setTimeout(function(){return e.runDefault(a)},300)},getZoom:function(){return this.em.getZoomDecimal()},isElInViewport:function(t){var e=Object(s.e)(t),n=Object(s.d)(e),r=this.getFrameOffset(e),i=n.top,o=n.left;return i>=0&&o>=0&&i<=r.height&&o<=r.width},offset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(s.d)(t),r=t.ownerDocument.body,i=e.noScroll;return{top:n.top+(i?0:r.scrollTop),left:n.left+(i?0:r.scrollLeft),width:n.width,height:n.height}},clearOff:function(){this.frmOff=null,this.cvsOff=null},getFrameOffset:function(t){if(!this.frmOff||t){var e=this.frame.el,n=t?t.ownerDocument.defaultView.frameElement:e;this.frmOff=this.offset(n||e)}return this.frmOff},getCanvasOffset:function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},getElementPos:function(t,e){var n=this.getZoom(),r=e||{},i=this.getFrameOffset(t),o=this.getCanvasOffset(),a=this.offset(t,e),s=r.avoidFrameOffset?0:i.top,l=r.avoidFrameOffset?0:i.left;return{top:a.top*n+s-o.top,left:a.left*n+l-o.left,height:a.height*n,width:a.width*n,zoom:n,rect:a}},getElementOffsets:function(t){var e=this;if(!t||Object(s.r)(t))return{};var n={},r=window.getComputedStyle(t);return["marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft"].forEach(function(t){n[t]=parseFloat(r[t])*e.getZoom()}),n},getPosition:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.frame.el.contentDocument;if(e){var n=e.body,r=this.getZoom(),i=this.getFrameOffset(),o=this.getCanvasOffset(),a=t.noScroll;return{top:i.top+(a?0:n.scrollTop)*r-o.top,left:i.left+(a?0:n.scrollLeft)*r-o.left,width:o.width,height:o.height}}},updateScript:function(t){var e=t.model,n=e.getId();t.scriptContainer||(t.scriptContainer=V('
')),this.getJsContainer().appendChild(t.scriptContainer.get(0))),t.el.id=n,t.scriptContainer.html("");var r=document.createElement("script"),i=e.getScriptString(),o=e.get("script-props")?i:"function(){\n".concat(i,"\n;}"),a=JSON.stringify(e.__getScriptProps());r.innerHTML="\n setTimeout(function() {\n var item = document.getElementById('".concat(n,"');\n if (!item) return;\n (").concat(o,".bind(item))(").concat(a,")\n }, 1);"),setTimeout(function(){var e=t.scriptContainer;e&&e.get(0).appendChild(r)},0)},getJsContainer:function(t){var e=this.getFrameView(t);return e&&e.getJsContainer()},getFrameView:function(t){return t&&t._getFrame()||this.em.get("currentFrame")},render:function(){var t=this.el,e=this.$el,n=this.ppfx,r=this.model,i=this.em,o=this.frames,a=i.get("CssComposer"),s=r.get("wrapper");e.html(this.template());var l=e.find("[data-frames]");this.framesArea=l.get(0),this.wrapper=s,s&&"function"==typeof s.render&&r.get("frame").set({wrapper:s,root:s.getWrapper(),styles:a.getAll()});var c=e.find("[data-tools]");this.toolsWrapper=c.get(0),c.append('\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n '));var u=t.querySelector("#".concat(n,"tools"));this.hlEl=t.querySelector(".".concat(n,"highlighter")),this.badgeEl=t.querySelector(".".concat(n,"badge")),this.placerEl=t.querySelector(".".concat(n,"placeholder")),this.ghostEl=t.querySelector(".".concat(n,"ghost")),this.toolbarEl=t.querySelector(".".concat(n,"toolbar")),this.resizerEl=t.querySelector(".".concat(n,"resizer")),this.offsetEl=t.querySelector(".".concat(n,"offset-v")),this.fixedOffsetEl=t.querySelector(".".concat(n,"offset-fixed-v")),this.toolsGlobEl=t.querySelector(".".concat(n,"tools-gl")),this.toolsEl=u,this.el.className=this.className;var d=r.get("frames");return d.listenToLoad(),o.render(),i.setCurrentFrame(d.at(0).view),l.append(o.el),this.frame=d.at(0).view,this}});function z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function H(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};n=H(H(H({},p),r),{},{module:this}),this.em=n.em;var i=n.pStylePrefix;i&&(n.stylePrefix=i+n.stylePrefix),t=new O(r),e=new R({model:t,config:n});var o=n.em.get("DomComponents");return o&&this.setWrapper(o),this.model=t,this.startAutoscroll=this.startAutoscroll.bind(this),this.stopAutoscroll=this.stopAutoscroll.bind(this),this},getConfig:function(){return n},setWrapper:function(e){t.set("wrapper",e)},getElement:function(){return e.el},getFrame:function(e){return e?this.getFrames()[e]:t.get("frame")},getFrameEl:function(){var t=e.frame;return t&&t.el},getFramesEl:function(){return e.framesArea},getWindow:function(){return this.getFrameEl().contentWindow},getDocument:function(){var t=this.getFrameEl();return t&&t.contentDocument},getBody:function(){var t=this.getDocument();return t&&t.body},getWrapperEl:function(){var t=this.getBody();return t&&t.querySelector("#wrapper")},_getCompFrame:function(t){return t&&t._getFrame()},_getLocalEl:function(t,e,n){var r=t,i=this._getCompFrame(e);return i?i[n]():r},getGlobalToolsEl:function(){return e.toolsGlobEl},getToolsEl:function(t){return this._getLocalEl(e.toolsEl,t,"getToolsEl")},getHighlighter:function(t){return this._getLocalEl(e.hlEl,t,"getHighlighter")},getBadgeEl:function(t){return this._getLocalEl(e.badgeEl,t,"getBadgeEl")},getPlacerEl:function(){return e.placerEl},getGhostEl:function(){return e.ghostEl},getToolbarEl:function(){return e.toolbarEl},getResizerEl:function(){return e.resizerEl},getOffsetViewerEl:function(t){return this._getLocalEl(e.offsetEl,t,"getOffsetViewerEl")},getFixedOffsetViewerEl:function(){return e.fixedOffsetEl},render:function(){return e.render().el},getOffset:function(){var t=this.offset(this.getFrameEl()),e=this.offset(this.getElement());return{top:t.top-e.top,left:t.left-e.left}},offset:function(t){return e.offset(t)},setCustomBadgeLabel:function(t){n.customBadgeLabel=t},getElementPos:function(t,n){return e.getElementPos(t,n)},getElementOffsets:function(t){return e.getElementOffsets(t)},getRect:function(){var t=e.getPosition(),n=t.top,r=t.left;return H(H({},e.getCanvasOffset()),{},{topScroll:n,leftScroll:r})},getTargetToElementDim:function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i||{},a=e.getPosition();if(a){var s=o.elPos||e.getElementPos(r),l=i.toRight||0,c=o.targetHeight||t.offsetHeight,u=o.targetWidth||t.offsetWidth,d=o.event||null,h=s.top-c,f=s.left;f+=l?s.width:0;var p=(f=l?f-u:f)s.top+s.height?s.top+s.height:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:a.top,canvasLeft:a.left,canvasWidth:a.width,canvasHeight:a.height};return d&&n.em&&n.em.trigger(d,v),v}},canvasRectOffset:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2?arguments[2]:void 0,o=n.em.getZoomDecimal(),a=e?"top":"left",s=t.ownerDocument,l=r.offset?function(t){var e=t.defaultView;return e&&e.frameElement}(s):{},c=l.offsetTop,u=void 0===c?0:c,d=l.offsetLeft,h=void 0===d?0:d,f=s.body||{},p=f.scrollTop,g=void 0===p?0:p,v=f.scrollLeft,m=e?g:void 0===v?0:v,b=e?u:h;return i[a]-(m-b)*o};return{top:i(t,1,e),left:i(t,0,e)}},getTargetToElementFixed:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.pos||this.getElementPos(t),i=n.canvasOff||this.canvasRectOffset(t,r),o=e.offsetHeight||0,a=e.offsetWidth||0,s=r.left+r.width,l=this.getCanvasView(),c=l.getPosition(),u=l.getFrameOffset(t),d=n.event,h=-o,f=r.width-a;f=r.left<-f?-r.left:f,f=s>c.width?f-(s-c.width):f;var p=r.height+o,g=p1&&void 0!==arguments[1]?arguments[1]:{},n=Object(s.e)(t),r=n&&Object(s.j)(n);r&&r.scrollIntoView(e)},startAutoscroll:function(t){var e=t&&t.view||this.em.getCurrentFrame();e&&e.startAutoscroll()},stopAutoscroll:function(t){var e=t&&t.view||this.em.getCurrentFrame();e&&e.stopAutoscroll()},postRender:function(){Object(s.k)(n.em)&&(this.droppable=new f(n.em))},setZoom:function(e){return t.set("zoom",parseFloat(e)),this},getZoom:function(){return parseFloat(t.get("zoom"))},getZoomDecimal:function(){return this.getZoom()/100},getZoomMultiplier:function(){var t=this.getZoomDecimal();return t?1/t:1},toggleFramesEvents:function(t){this.getFramesEl().style.pointerEvents=t?"":"none"},getFrameWrapperEl:function(){return e.frame.getWrapper()},getFrames:function(){return t.get("frames").map(function(t){return t})},addFrame:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.get("frames").add(H({},e),H(H({},n),{},{em:this.em}))},destroy:function(){var r=this;t.stopListening(),e.remove(),[n,t,e].forEach(function(t){return{}}),["em","model","droppable"].forEach(function(t){return r[t]={}})}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(11),a={stylePrefix:"gjs-",components:"",style:"",fromElement:0,noticeOnUnload:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",log:["warning","error"],baseCss:"\n * {\n box-sizing: border-box;\n }\n html, body, [data-gjs-type=wrapper] {\n min-height: 100%;\n }\n body {\n margin: 0;\n height: 100%;\n background-color: #fff\n }\n [data-gjs-type=wrapper] {\n overflow: auto;\n overflow-x: hidden;\n }\n\n * ::-webkit-scrollbar-track {\n background: rgba(0, 0, 0, 0.1)\n }\n\n * ::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2)\n }\n\n * ::-webkit-scrollbar {\n width: 10px\n }\n ",protectedCss:"* { box-sizing: border-box; } body {margin: 0;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",keepEmptyTextNodes:0,jsInHtml:!0,nativeDnD:1,multipleSelection:1,exportWrapper:0,wrapperIsBody:1,optsHtml:{},optsCss:{},avoidInlineStyle:1,avoidDefaults:1,clearStyles:0,dragMode:0,listenToEl:[],cssIcons:"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css",el:"",i18n:{},undoManager:{},assetManager:{},canvas:{},layers:{},storageManager:{},richTextEditor:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{devices:[{id:"desktop",name:"Desktop",width:""},{id:"tablet",name:"Tablet",width:"768px",widthMedia:"992px"},{id:"mobileLandscape",name:"Mobile landscape",width:"568px",widthMedia:"768px"},{id:"mobilePortrait",name:"Mobile portrait",width:"320px",widthMedia:"480px"}]},styleManager:{sectors:[{name:"General",open:!1,buildProps:["float","display","position","top","right","left","bottom"]},{name:"Flex",open:!1,buildProps:["flex-direction","flex-wrap","justify-content","align-items","align-content","order","flex-basis","flex-grow","flex-shrink","align-self"]},{name:"Dimension",open:!1,buildProps:["width","height","max-width","min-height","margin","padding"]},{name:"Typography",open:!1,buildProps:["font-family","font-size","font-weight","letter-spacing","color","line-height","text-align","text-shadow"],properties:[{property:"text-align",list:[{value:"left",className:"fa fa-align-left"},{value:"center",className:"fa fa-align-center"},{value:"right",className:"fa fa-align-right"},{value:"justify",className:"fa fa-align-justify"}]}]},{name:"Decorations",open:!1,buildProps:["border-radius-c","background-color","border-radius","border","box-shadow","background"]},{name:"Extra",open:!1,buildProps:["transition","perspective","transform"]}]},blockManager:{},traitManager:{},textViewCode:"Code",keepUnusedStyles:0,multiFrames:0},s=n(0),l=n(1),c=n.n(l),u=n(3);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function h(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};this.config=e,this.set("Config",e),this.set("modules",[]),this.set("toLoad",[]),this.set("storables",[]),this.set("selected",new v),this.set("dmode",e.dragMode);var n=e.el,r=e.log,i=!0===r?Object(s.keys)(m):Object(s.isArray)(r)?r:[];Object(s.bindAll)(this,"initBaseColorPicker"),n&&e.fromElement&&(this.config.components=n.innerHTML),this.attrsOrig=n?Object(s.toArray)(n.attributes).reduce(function(t,e){return t[e.nodeName]=e.nodeValue,t},{}):"",g.forEach(function(e){return t.loadModule(e)}),this.on("change:componentHovered",this.componentHovered,this),this.on("change:changesCount",this.updateChanges,this),i.forEach(function(e){return t.listenLog(e)}),[{from:"change:selectedComponent",to:"component:toggled"}].forEach(function(e){var n=e.from,r=e.to;t.listenTo(t,n,function(){for(var e=arguments.length,i=new Array(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var r=function(){t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.canAutoload()?this.load(r):r()},updateChanges:function(){var t=this,e=this.get("StorageManager"),n=this.get("changesCount");p&&clearTimeout(p),p=setTimeout(function(){return t.trigger("update")}),this.config.noticeOnUnload&&(window.onbeforeunload=n?function(t){return 1}:null),e.isAutosave()&&n>=e.getStepsBeforeSave()&&this.store()},loadModule:function(t){var e=this.config,n=new(t.default||t),r=n.name.charAt(0).toLowerCase()+n.name.slice(1),i=Object(s.isUndefined)(e[r])?e[n.name]:e[r],o=i||{},a=this.get("StorageManager");if(o.pStylePrefix=e.pStylePrefix||"",Object(s.isUndefined)(i)||i||(o._disable=1),n.storageKey&&n.store&&n.load&&a){o.stm=a;var l="domComponents"==r?"unshift":"push";this.get("storables")[l](n)}return o.em=this,n.init(h({},o)),!n.private&&this.set(n.name,n),n.onLoad&&this.get("toLoad").push(n),this.get("modules").push(n),this},init:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.destroyed&&(this.initialize(e),this.destroyed=0),this.set("Editor",t)},getEditor:function(){return this.get("Editor")},handleUpdates:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.temporary||r.noCount||r.avoidStore||(f&&clearTimeout(f),f=setTimeout(function(){n.set("changesCount",n.get("changesCount")+1,r)},0))},componentHovered:function(t,e,n){var r=this.previous("componentHovered");r&&this.trigger("component:unhovered",r,n),e&&this.trigger("component:hovered",e,n)},getSelected:function(){return this.get("selected").last()},getSelectedAll:function(){var t=this.get("selected");return t&&t.models||[]},setSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.event,i=r&&(r.ctrlKey||r.metaKey),a=(r||{}).shiftKey,l=Object(s.isArray)(t),c=l?t:[t],d=this.get("selected"),h=this.getConfig("multipleSelection");l&&this.removeSelected(d.filter(function(t){return!Object(s.contains)(c,t)})),c.forEach(function(t){var r=Object(u.g)(t,o.default);if(!r||r.get("selectable")){if(i&&h)return e.toggleSelected(r);if(a&&h){e.clearSelection(e.get("Canvas").getWindow());var c,f,p=r.collection,g=r.index();if(e.getSelectedAll().forEach(function(t){var e=t.collection,n=t.index();e===p&&(ng&&(f=Object(s.isUndefined)(f)?n:Math.min(f,n)))}),!Object(s.isUndefined)(c))for(;c!==g;)e.addSelected(p.at(c)),c++;if(!Object(s.isUndefined)(f))for(;f!==g;)e.addSelected(p.at(f)),f--;return e.addSelected(r)}!l&&e.removeSelected(d.filter(function(t){return t!==r})),e.addSelected(r,n)}})},addSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(u.g)(t,o.default);(Object(s.isArray)(r)?r:[r]).forEach(function(t){if(!t||t.get("selectable")){var r=e.get("selected");n.forceChange&&r.remove(t,n),r.push(t,n)}})},removeSelected:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.get("selected").remove(Object(u.g)(t,o.default),e)},toggleSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(u.g)(t,o.default);(Object(s.isArray)(r)?r:[r]).forEach(function(t){e.get("selected").contains(t)?e.removeSelected(t,n):e.addSelected(t,n)})},setHovered:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(u.g)(t,o.default);n&&!n.get("hoverable")||(e.forceChange&&this.set("componentHovered",""),this.set("componentHovered",n,e))},getHovered:function(){return this.get("componentHovered")},setComponents:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.get("DomComponents").setComponents(t,e)},getComponents:function(){var t=this.get("DomComponents"),e=this.get("CodeManager");if(t&&e){var n=t.getComponents();return e.getCode(n,"json")}},setStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.get("CssComposer");return n.clear(e),n.getAll().add(t,e),this},getStyle:function(){return this.get("CssComposer").getAll()},setState:function(t){return this.set("state",t),this},getState:function(){return this.get("state")||""},getHtml:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.config,n=e.optsHtml,r=e.exportWrapper,i=e.wrapperIsBody,o=e.jsInHtml?this.getJs():"",a=this.get("DomComponents").getComponent();return this.get("CodeManager").getCode(a,"html",h(h({exportWrapper:r,wrapperIsBody:i},n),t))+(o?"` : '';\n return html;\n },\n\n /**\n * Returns CSS built inside canvas\n * @param {Object} [opts={}] Options\n * @returns {string} CSS string\n * @private\n */\n getCss(opts = {}) {\n const config = this.config;\n const { optsCss } = config;\n const wrapperIsBody = config.wrapperIsBody;\n const avoidProt = opts.avoidProtected;\n const keepUnusedStyles = !isUndefined(opts.keepUnusedStyles)\n ? opts.keepUnusedStyles\n : config.keepUnusedStyles;\n const cssc = this.get('CssComposer');\n const wrp = this.get('DomComponents').getComponent();\n const protCss = !avoidProt ? config.protectedCss : '';\n\n return (\n protCss +\n this.get('CodeManager').getCode(wrp, 'css', {\n cssc,\n wrapperIsBody,\n keepUnusedStyles,\n ...optsCss\n })\n );\n },\n\n /**\n * Returns JS of all components\n * @return {string} JS string\n * @private\n */\n getJs() {\n var wrp = this.get('DomComponents').getWrapper();\n return this.get('CodeManager')\n .getCode(wrp, 'js')\n .trim();\n },\n\n /**\n * Store data to the current storage\n * @param {Function} clb Callback function\n * @return {Object} Stored data\n * @private\n */\n store(clb) {\n var sm = this.get('StorageManager');\n var store = {};\n if (!sm) return;\n\n // Fetch what to store\n this.get('storables').forEach(m => {\n var obj = m.store(1);\n for (var el in obj) store[el] = obj[el];\n });\n\n sm.store(store, res => {\n clb && clb(res);\n this.set('changesCount', 0);\n this.trigger('storage:store', store);\n });\n\n return store;\n },\n\n /**\n * Load data from the current storage\n * @param {Function} clb Callback function\n * @private\n */\n load(clb = null) {\n this.getCacheLoad(1, res => {\n this.get('storables').forEach(module => {\n module.load(res);\n module.postLoad && module.postLoad(this);\n });\n clb && clb(res);\n });\n },\n\n /**\n * Returns cached load\n * @param {Boolean} force Force to reload\n * @param {Function} clb Callback function\n * @return {Object}\n * @private\n */\n getCacheLoad(force, clb) {\n if (this.cacheLoad && !force) return this.cacheLoad;\n const sm = this.get('StorageManager');\n const load = [];\n\n if (!sm) return {};\n\n this.get('storables').forEach(m => {\n let key = m.storageKey;\n key = isFunction(key) ? key() : key;\n const keys = isArray(key) ? key : [key];\n keys.forEach(k => load.push(k));\n });\n\n sm.load(load, res => {\n this.cacheLoad = res;\n clb && clb(res);\n setTimeout(() => this.trigger('storage:load', res));\n });\n },\n\n /**\n * Returns device model by name\n * @return {Device|null}\n * @private\n */\n getDeviceModel() {\n var name = this.get('device');\n return this.get('DeviceManager').get(name);\n },\n\n /**\n * Run default command if setted\n * @param {Object} [opts={}] Options\n * @private\n */\n runDefault(opts = {}) {\n var command = this.get('Commands').get(this.config.defaultCommand);\n if (!command || this.defaultRunning) return;\n command.stop(this, this, opts);\n command.run(this, this, opts);\n this.defaultRunning = 1;\n },\n\n /**\n * Stop default command\n * @param {Object} [opts={}] Options\n * @private\n */\n stopDefault(opts = {}) {\n const commands = this.get('Commands');\n const command = commands.get(this.config.defaultCommand);\n if (!command) return;\n command.stop(this, this, opts);\n this.defaultRunning = 0;\n },\n\n /**\n * Update canvas dimensions and refresh data useful for tools positioning\n * @private\n */\n refreshCanvas(opts = {}) {\n this.set('canvasOffset', null);\n this.set('canvasOffset', this.get('Canvas').getOffset());\n opts.tools && this.trigger('canvas:updateTools');\n },\n\n /**\n * Clear all selected stuf inside the window, sometimes is useful to call before\n * doing some dragging opearation\n * @param {Window} win If not passed the current one will be used\n * @private\n */\n clearSelection(win) {\n var w = win || window;\n w.getSelection().removeAllRanges();\n },\n\n /**\n * Get the current media text\n * @return {string}\n */\n getCurrentMedia() {\n const config = this.config;\n const device = this.getDeviceModel();\n const condition = config.mediaCondition;\n const preview = config.devicePreviewMode;\n const width = device && device.get('widthMedia');\n return device && width && !preview ? `(${condition}: ${width})` : '';\n },\n\n /**\n * Return the component wrapper\n * @return {Component}\n */\n getWrapper() {\n return this.get('DomComponents').getWrapper();\n },\n\n setCurrentFrame(frameView) {\n return this.set('currentFrame', frameView);\n },\n\n getCurrentFrame() {\n return this.get('currentFrame');\n },\n\n getCurrentFrameModel() {\n return (this.getCurrentFrame() || {}).model;\n },\n\n /**\n * Return the count of changes made to the content and not yet stored.\n * This count resets at any `store()`\n * @return {number}\n */\n getDirtyCount() {\n return this.get('changesCount');\n },\n\n getZoomDecimal() {\n return this.get('Canvas').getZoomDecimal();\n },\n\n getZoomMultiplier() {\n return this.get('Canvas').getZoomMultiplier();\n },\n\n setDragMode(value) {\n return this.set('dmode', value);\n },\n\n t(...args) {\n return this.get('I18n').t(...args);\n },\n\n /**\n * Returns true if the editor is in absolute mode\n * @returns {Boolean}\n */\n inAbsoluteMode() {\n return this.get('dmode') === 'absolute';\n },\n\n /**\n * Destroy editor\n */\n destroyAll() {\n const { config } = this;\n const editor = this.getEditor();\n const { editors = [] } = config.grapesjs || {};\n this.stopDefault();\n this.get('modules')\n .slice()\n .reverse()\n .forEach(mod => mod.destroy());\n this.view.remove();\n this.stopListening();\n this.clear({ silent: true });\n this.destroyed = 1;\n ['config', 'view', '_previousAttributes', '_events', '_listeners'].forEach(\n i => (this[i] = {})\n );\n editors.splice(editors.indexOf(editor), 1);\n $(config.el)\n .empty()\n .attr(this.attrsOrig);\n },\n\n setEditing(value) {\n this.set('editing', value);\n return this;\n },\n\n isEditing() {\n return !!this.get('editing');\n },\n\n log(msg, opts = {}) {\n const { ns, level = 'debug' } = opts;\n this.trigger('log', msg, opts);\n level && this.trigger(`log:${level}`, msg, opts);\n\n if (ns) {\n const logNs = `log-${ns}`;\n this.trigger(logNs, msg, opts);\n level && this.trigger(`${logNs}:${level}`, msg, opts);\n }\n },\n\n logInfo(msg, opts) {\n this.log(msg, { ...opts, level: 'info' });\n },\n\n logWarning(msg, opts) {\n this.log(msg, { ...opts, level: 'warning' });\n },\n\n logError(msg, opts) {\n this.log(msg, { ...opts, level: 'error' });\n },\n\n initBaseColorPicker(el, opts = {}) {\n const config = this.getConfig();\n const { colorPicker = {} } = config;\n const elToAppend = config.el;\n const ppfx = config.stylePrefix;\n\n return $(el).spectrum({\n containerClassName: `${ppfx}one-bg ${ppfx}two-color`,\n appendTo: elToAppend || 'body',\n maxSelectionSize: 8,\n showPalette: true,\n palette: [],\n showAlpha: true,\n chooseText: 'Ok',\n cancelText: '⨯',\n ...opts,\n ...colorPicker\n });\n },\n\n /**\n * Set/get data from the HTMLElement\n * @param {HTMLElement} el\n * @param {string} name Data name\n * @param {any} value Date value\n * @return {any}\n * @private\n */\n data(el, name, value) {\n const varName = '_gjs-data';\n\n if (!el[varName]) {\n el[varName] = {};\n }\n\n if (isUndefined(value)) {\n return el[varName][name];\n } else {\n el[varName][name] = value;\n }\n }\n});\n","import { isObject, isString, each, isUndefined } from 'underscore';\n\nexport default ({ $ }) => {\n if ($ && $.prototype.constructor.name !== 'jQuery') {\n const fn = $.fn;\n\n // Additional helpers\n\n fn.hide = function() {\n return this.css('display', 'none');\n };\n\n fn.show = function() {\n return this.css('display', 'block');\n };\n\n fn.focus = function() {\n const el = this.get(0);\n el && el.focus();\n return this;\n };\n\n // For SVGs in IE\n // (fn.removeClass = function(c) {\n // if (!arguments.length) {\n // return this.attr('class', '');\n // }\n // const classes = isString(c) && c.match(/\\S+/g);\n // return classes\n // ? this.each(function(el) {\n // each(classes, function(c) {\n // if (el.classList) {\n // el.classList.remove(c);\n // } else {\n // const val = el.className;\n // const bval = el.className.baseVal;\n\n // if (!isUndefined(bval)) {\n // val.baseVal = bval.replace(c, '');\n // } else {\n // el.className = val.replace(c, '');\n // }\n // }\n // });\n // })\n // : this;\n // }),\n // (fn.remove = function() {\n // return this.each(node => {\n // return node.parentNode && node.parentNode.removeChild(node);\n // });\n // }),\n\n // For spectrum compatibility\n\n fn.bind = function(ev, h) {\n return this.on(ev, h);\n };\n\n fn.unbind = function(ev, h) {\n if (isObject(ev)) {\n for (let name in ev) {\n ev.hasOwnProperty(name) && this.off(name, ev[name]);\n }\n\n return this;\n } else {\n return this.off(ev, h);\n }\n };\n\n fn.click = function(h) {\n return h ? this.on('click', h) : this.trigger('click');\n };\n\n fn.change = function(h) {\n return h ? this.on('change', h) : this.trigger('change');\n };\n\n fn.keydown = function(h) {\n return h ? this.on('keydown', h) : this.trigger('keydown');\n };\n\n fn.delegate = function(selector, events, data, handler) {\n if (!handler) {\n handler = data;\n }\n\n return this.on(events, selector, function(e) {\n e.data = data;\n handler(e);\n });\n };\n\n fn.scrollLeft = function() {\n let el = this.get(0);\n el = el.nodeType == 9 ? el.defaultView : el;\n let win = el instanceof Window ? el : null;\n return win ? win.pageXOffset : el.scrollLeft || 0;\n };\n\n fn.scrollTop = function() {\n let el = this.get(0);\n el = el.nodeType == 9 ? el.defaultView : el;\n let win = el instanceof Window ? el : null;\n return win ? win.pageYOffset : el.scrollTop || 0;\n };\n\n const offset = $.prototype.offset;\n fn.offset = function(coords) {\n let top, left;\n\n if (coords) {\n top = coords.top;\n left = coords.left;\n }\n\n if (typeof top != 'undefined') {\n this.css('top', `${top}px`);\n }\n if (typeof left != 'undefined') {\n this.css('left', `${left}px`);\n }\n\n return offset.call(this);\n };\n\n $.map = function(items, clb) {\n const ar = [];\n\n for (var i = 0; i < items.length; i++) {\n ar.push(clb(items[i], i));\n }\n\n return ar;\n };\n\n const indexOf = Array.prototype.indexOf;\n\n $.inArray = function(val, arr, i) {\n return arr == null ? -1 : indexOf.call(arr, val, i);\n };\n\n $.Event = function(src, props) {\n if (!(this instanceof $.Event)) {\n return new $.Event(src, props);\n }\n\n this.type = src;\n this.isDefaultPrevented = () => false;\n };\n }\n};\n","import Backbone from 'backbone';\nimport { appendStyles } from 'utils/mixins';\n\nconst $ = Backbone.$;\n\nexport default Backbone.View.extend({\n initialize() {\n const { model } = this;\n model.view = this;\n this.conf = model.config;\n this.pn = model.get('Panels');\n this.cv = model.get('Canvas');\n model.on('loaded', () => {\n this.pn.active();\n this.pn.disableButtons();\n setTimeout(() => {\n model.runDefault();\n model.trigger('load', model.get('Editor'));\n });\n });\n },\n\n render() {\n const { model, $el, conf } = this;\n const pfx = conf.stylePrefix;\n const contEl = $(conf.el || `body ${conf.container}`);\n appendStyles(conf.cssIcons, { unique: 1, prepand: 1 });\n $el.empty();\n\n if (conf.width) contEl.css('width', conf.width);\n if (conf.height) contEl.css('height', conf.height);\n\n $el.append(this.cv.render());\n $el.append(this.pn.render());\n $el.attr('class', `${pfx}editor ${pfx}one-bg ${pfx}two-color`);\n contEl\n .addClass(`${pfx}editor-cont`)\n .empty()\n .append($el);\n\n return this;\n }\n});\n","/**\n * Editor contains the top level API which you'll probably use to customize the editor or extend it with plugins.\n * You get the Editor instance on init method and you can pass options via its [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/editor/config/config.js)\n *\n * ```js\n * const editor = grapesjs.init({\n * // options\n * });\n * ```\n *\n * ## Available Events\n *\n * You can make use of available events in this way\n * ```js\n * editor.on('EVENT-NAME', (some, argument) => {\n * // do something\n * })\n * ```\n *\n * ### Components\n * * `component:create` - Component is created (only the model, is not yet mounted in the canvas), called after the init() method\n * * `component:mount` - Component is mounted to an element and rendered in canvas\n * * `component:add` - Triggered when a new component is added to the editor, the model is passed as an argument to the callback\n * * `component:remove` - Triggered when a component is removed, the model is passed as an argument to the callback\n * * `component:remove:before` - Triggered before the remove of the component, the model, remove function (if aborted via options, with this function you can complete the remove) and options (use options.abort = true to prevent remove), are passed as arguments to the callback\n * * `component:clone` - Triggered when a component is cloned, the new model is passed as an argument to the callback\n * * `component:update` - Triggered when a component is updated (moved, styled, etc.), the model is passed as an argument to the callback\n * * `component:update:{propertyName}` - Listen any property change, the model is passed as an argument to the callback\n * * `component:styleUpdate` - Triggered when the style of the component is updated, the model is passed as an argument to the callback\n * * `component:styleUpdate:{propertyName}` - Listen for a specific style property change, the model is passed as an argument to the callback\n * * `component:selected` - New component selected, the selected model is passed as an argument to the callback\n * * `component:deselected` - Component deselected, the deselected model is passed as an argument to the callback\n * * `component:toggled` - Component selection changed, toggled model is passed as an argument to the callback\n * * `component:type:add` - New component type added, the new type is passed as an argument to the callback\n * * `component:type:update` - Component type updated, the updated type is passed as an argument to the callback\n * * `component:drag:start` - Component drag started. Passed an object, to the callback, containing the `target` (component to drag), `parent` (parent of the component) and `index` (component index in the parent)\n * * `component:drag` - During component drag. Passed the same object as in `component:drag:start` event, but in this case, `parent` and `index` are updated by the current pointer\n * * `component:drag:end` - Component drag ended. Passed the same object as in `component:drag:start` event, but in this case, `parent` and `index` are updated by the final pointer\n * ### Blocks\n * * `block:add` - New block added\n * * `block:remove` - Block removed\n * * `block:drag:start` - Started dragging block, model of the block is passed as an argument\n * * `block:drag` - Dragging block, the block's model and the drag event are passed as arguments\n * * `block:drag:stop` - Dragging of the block is stopped. As agruments for the callback you get, the dropped component model (if dropped successfully) and the model of the block\n * ### Assets\n * * `asset:add` - New asset added\n * * `asset:remove` - Asset removed\n * * `asset:upload:start` - Before the upload is started\n * * `asset:upload:end` - After the upload is ended\n * * `asset:upload:error` - On any error in upload, passes the error as an argument\n * * `asset:upload:response` - On upload response, passes the result as an argument\n * ### Keymaps\n * * `keymap:add` - New keymap added. The new keyamp object is passed as an argument\n * * `keymap:remove` - Keymap removed. The removed keyamp object is passed as an argument\n * * `keymap:emit` - Some keymap emitted, in arguments you get keymapId, shortcutUsed, Event\n * * `keymap:emit:{keymapId}` - `keymapId` emitted, in arguments you get keymapId, shortcutUsed, Event\n * ### Style Manager\n * * `styleManager:update:target` - The target (Component or CSSRule) is changed\n * * `styleManager:change` - Triggered on style property change from new selected component, the view of the property is passed as an argument to the callback\n * * `styleManager:change:{propertyName}` - As above but for a specific style property\n * ### Storages\n * * `storage:start` - Before the storage request is started\n * * `storage:start:store` - Before the store request. The object to store is passed as an argumnet (which you can edit)\n * * `storage:start:load` - Before the load request. Items to load are passed as an argumnet (which you can edit)\n * * `storage:load` - Triggered when something was loaded from the storage, loaded object passed as an argumnet\n * * `storage:store` - Triggered when something is stored to the storage, stored object passed as an argumnet\n * * `storage:end` - After the storage request is ended\n * * `storage:end:store` - After the store request\n * * `storage:end:load` - After the load request\n * * `storage:error` - On any error on storage request, passes the error as an argument\n * * `storage:error:store` - Error on store request, passes the error as an argument\n * * `storage:error:load` - Error on load request, passes the error as an argument\n * ### Canvas\n * * `canvas:dragenter` - When something is dragged inside the canvas, `DataTransfer` instance passed as an argument\n * * `canvas:dragover` - When something is dragging on canvas, `DataTransfer` instance passed as an argument\n * * `canvas:drop` - Something is dropped in canvas, `DataTransfer` instance and the dropped model are passed as arguments\n * * `canvas:dragend` - When a drag operation is ended, `DataTransfer` instance passed as an argument\n * * `canvas:dragdata` - On any dataTransfer parse, `DataTransfer` instance and the `result` are passed as arguments.\n * By changing `result.content` you're able to customize what is dropped\n * ### Selectors\n * * `selector:add` - New selector is add. Passes the new selector as an argument\n * * `selector:remove` - Selector removed. Passes the removed selector as an argument\n * * `selector:update` - Selector updated. Passes the updated selector as an argument\n * * `selector:state` - State changed. Passes the new state value as an argument\n * ### RTE\n * * `rte:enable` - RTE enabled. The view, on which RTE is enabled, is passed as an argument\n * * `rte:disable` - RTE disabled. The view, on which RTE is disabled, is passed as an argument\n * ### Modal\n * * `modal:open` - Modal is opened\n * * `modal:close` - Modal is closed\n * ### Parser\n * * `parse:html` - On HTML parse, an object containing the input and the output of the parser is passed as an argument\n * * `parse:css` - On CSS parse, an object containing the input and the output of the parser is passed as an argument\n * ### Commands\n * * `run:{commandName}` - Triggered when some command is called to run (eg. editor.runCommand('preview'))\n * * `stop:{commandName}` - Triggered when some command is called to stop (eg. editor.stopCommand('preview'))\n * * `run:{commandName}:before` - Triggered before the command is called\n * * `stop:{commandName}:before` - Triggered before the command is called to stop\n * * `abort:{commandName}` - Triggered when the command execution is aborted (`editor.on(`run:preview:before`, opts => opts.abort = 1);`)\n * * `run` - Triggered on run of any command. The id and the result are passed as arguments to the callback\n * * `stop` - Triggered on stop of any command. The id and the result are passed as arguments to the callback\n * ### General\n * * `canvasScroll` - Canvas is scrolled\n * * `update` - The structure of the template is updated (its HTML/CSS)\n * * `undo` - Undo executed\n * * `redo` - Redo executed\n * * `load` - Editor is loaded\n *\n * @module Editor\n */\nimport $ from 'cash-dom';\nimport defaults from './config/config';\nimport EditorModel from './model/Editor';\nimport EditorView from './view/EditorView';\n\nexport default (config = {}) => {\n const c = {\n ...defaults,\n ...config\n };\n\n c.pStylePrefix = c.stylePrefix;\n var em = new EditorModel(c);\n var editorView = new EditorView({\n model: em,\n config: c\n });\n\n return {\n $,\n\n /**\n * @property {EditorModel}\n * @private\n */\n editor: em,\n\n /**\n * Initialize editor model\n * @return {this}\n * @private\n */\n init(opts = {}) {\n em.init(this, { ...c, ...opts });\n\n [\n 'I18n',\n 'Utils',\n 'Config',\n 'Commands',\n 'Keymaps',\n 'Modal',\n 'Panels',\n 'Canvas',\n 'Parser',\n 'CodeManager',\n 'UndoManager',\n 'RichTextEditor',\n 'DomComponents',\n ['Components', 'DomComponents'],\n 'LayerManager',\n ['Layers', 'LayerManager'],\n 'CssComposer',\n ['Css', 'CssComposer'],\n 'StorageManager',\n ['Storage', 'StorageManager'],\n 'AssetManager',\n ['Assets', 'AssetManager'],\n 'BlockManager',\n ['Blocks', 'BlockManager'],\n 'TraitManager',\n ['Traits', 'TraitManager'],\n 'SelectorManager',\n ['Selectors', 'SelectorManager'],\n 'StyleManager',\n ['Styles', 'StyleManager'],\n 'DeviceManager',\n ['Devices', 'DeviceManager']\n ].forEach(prop => {\n if (Array.isArray(prop)) {\n this[prop[0]] = em.get(prop[1]);\n } else {\n this[prop] = em.get(prop);\n }\n });\n\n // Do post render stuff after the iframe is loaded otherwise it'll\n // be empty during tests\n em.on('loaded', () => {\n this.UndoManager.clear();\n em.get('modules').forEach(module => {\n module.postRender && module.postRender(editorView);\n });\n });\n\n return this;\n },\n\n /**\n * Returns configuration object\n * @param {string} [prop] Property name\n * @returns {any} Returns the configuration object or\n * the value of the specified property\n */\n getConfig(prop) {\n return em.getConfig(prop);\n },\n\n /**\n * Returns HTML built inside canvas\n * @param {Object} [opts={}] Options\n * @param {Boolean} [opts.cleanId=false] Remove unnecessary IDs (eg. those created automatically)\n * @returns {string} HTML string\n */\n getHtml(opts) {\n return em.getHtml(opts);\n },\n\n /**\n * Returns CSS built inside canvas\n * @param {Object} [opts={}] Options\n * @param {Boolean} [opts.avoidProtected=false] Don't include protected CSS\n * @returns {string} CSS string\n */\n getCss(opts) {\n return em.getCss(opts);\n },\n\n /**\n * Returns JS of all components\n * @returns {string} JS string\n */\n getJs() {\n return em.getJs();\n },\n\n /**\n * Return the complete tree of components. Use `getWrapper` to include also the wrapper\n * @return {Components}\n */\n getComponents() {\n return em.get('DomComponents').getComponents();\n },\n\n /**\n * Return the wrapper and its all components\n * @return {Component}\n */\n getWrapper() {\n return em.get('DomComponents').getWrapper();\n },\n\n /**\n * Set components inside editor's canvas. This method overrides actual components\n * @param {Array|Object|string} components HTML string or components model\n * @param {Object} opt the options object to be used by the [setComponents]{@link em#setComponents} method\n * @return {this}\n * @example\n * editor.setComponents('
New component
');\n * // or\n * editor.setComponents({\n * type: 'text',\n * classes:['cls'],\n * content: 'New component'\n * });\n */\n setComponents(components, opt = {}) {\n em.setComponents(components, opt);\n return this;\n },\n\n /**\n * Add components\n * @param {Array|Object|string} components HTML string or components model\n * @param {Object} opts Options\n * @param {Boolean} [opts.avoidUpdateStyle=false] If the HTML string contains styles,\n * by default, they will be created and, if already exist, updated. When this option\n * is true, styles already created will not be updated.\n * @return {Array}\n * @example\n * editor.addComponents('
New component
');\n * // or\n * editor.addComponents({\n * type: 'text',\n * classes:['cls'],\n * content: 'New component'\n * });\n */\n addComponents(components, opts) {\n return this.getWrapper().append(components, opts);\n },\n\n /**\n * Returns style in JSON format object\n * @return {Object}\n */\n getStyle() {\n return em.get('CssComposer').getAll();\n },\n\n /**\n * Set style inside editor's canvas. This method overrides actual style\n * @param {Array|Object|string} style CSS string or style model\n * @param {Object} opt the options object to be used by the [setStyle]{@link em#setStyle} method\n * @return {this}\n * @example\n * editor.setStyle('.cls{color: red}');\n * //or\n * editor.setStyle({\n * selectors: ['cls']\n * style: { color: 'red' }\n * });\n */\n setStyle(style, opt = {}) {\n em.setStyle(style, opt);\n return this;\n },\n\n /**\n * Returns the last selected component, if there is one\n * @return {Model}\n */\n getSelected() {\n return em.getSelected();\n },\n\n /**\n * Returns an array of all selected components\n * @return {Array}\n */\n getSelectedAll() {\n return em.getSelectedAll();\n },\n\n /**\n * Get a stylable entity from the selected component.\n * If you select a component without classes the entity is the Component\n * itself and all changes will go inside its 'style' attribute. Otherwise,\n * if the selected component has one or more classes, the function will\n * return the corresponding CSS Rule\n * @return {Model}\n */\n getSelectedToStyle() {\n let selected = em.getSelected();\n\n if (selected) {\n return this.StyleManager.getModelToStyle(selected);\n }\n },\n\n /**\n * Select a component\n * @param {Component|HTMLElement} el Component to select\n * @param {Object} [opts] Options\n * @param {Boolean} [opts.scroll] Scroll canvas to the selected element\n * @return {this}\n * @example\n * // Select dropped block\n * editor.on('block:drag:stop', function(model) {\n * editor.select(model);\n * });\n */\n select(el, opts) {\n em.setSelected(el, opts);\n return this;\n },\n\n /**\n * Add component to selection\n * @param {Component|HTMLElement|Array} el Component to select\n * @return {this}\n * @example\n * editor.selectAdd(model);\n */\n selectAdd(el) {\n em.addSelected(el);\n return this;\n },\n\n /**\n * Remove component from selection\n * @param {Component|HTMLElement|Array} el Component to select\n * @return {this}\n * @example\n * editor.selectRemove(model);\n */\n selectRemove(el) {\n em.removeSelected(el);\n return this;\n },\n\n /**\n * Toggle component selection\n * @param {Component|HTMLElement|Array} el Component to select\n * @return {this}\n * @example\n * editor.selectToggle(model);\n */\n selectToggle(el) {\n em.toggleSelected(el);\n return this;\n },\n\n /**\n * Set device to the editor. If the device exists it will\n * change the canvas to the proper width\n * @param {string} name Name of the device\n * @return {this}\n * @example\n * editor.setDevice('Tablet');\n */\n setDevice(name) {\n em.set('device', name);\n return this;\n },\n\n /**\n * Return the actual active device\n * @return {string} Device name\n * @example\n * var device = editor.getDevice();\n * console.log(device);\n * // 'Tablet'\n */\n getDevice() {\n return em.get('device');\n },\n\n /**\n * Execute command\n * @param {string} id Command ID\n * @param {Object} options Custom options\n * @return {*} The return is defined by the command\n * @example\n * editor.runCommand('myCommand', {someValue: 1});\n */\n runCommand(id, options = {}) {\n return em.get('Commands').run(id, options);\n },\n\n /**\n * Stop the command if stop method was provided\n * @param {string} id Command ID\n * @param {Object} options Custom options\n * @return {*} The return is defined by the command\n * @example\n * editor.stopCommand('myCommand', {someValue: 1});\n */\n stopCommand(id, options = {}) {\n return em.get('Commands').stop(id, options);\n },\n\n /**\n * Store data to the current storage\n * @param {Function} clb Callback function\n * @return {Object} Stored data\n */\n store(clb) {\n return em.store(clb);\n },\n\n /**\n * Load data from the current storage\n * @param {Function} clb Callback function\n * @return {Object} Stored data\n */\n load(clb) {\n return em.load(clb);\n },\n\n /**\n * Returns container element. The one which was indicated as 'container'\n * on init method\n * @return {HTMLElement}\n */\n getContainer() {\n return c.el;\n },\n\n /**\n * Return the count of changes made to the content and not yet stored.\n * This count resets at any `store()`\n * @return {number}\n */\n getDirtyCount() {\n return em.getDirtyCount();\n },\n\n /**\n * Update editor dimension offsets\n *\n * This method could be useful when you update, for example, some position\n * of the editor element (eg. canvas, panels, etc.) with CSS, where without\n * refresh you'll get misleading position of tools\n * @param {Object} [options] Options\n * @param {Boolean} [options.tools=false] Update the position of tools (eg. rich text editor, component highlighter, etc.)\n */\n refresh(opts) {\n em.refreshCanvas(opts);\n },\n\n /**\n * Replace the built-in Rich Text Editor with a custom one.\n * @param {Object} obj Custom RTE Interface\n * @example\n * editor.setCustomRte({\n * // Function for enabling custom RTE\n * // el is the HTMLElement of the double clicked Text Component\n * // rte is the same instance you have returned the first time you call\n * // enable(). This is useful if need to check if the RTE is already enabled so\n * // ion this case you'll need to return the RTE and the end of the function\n * enable: function(el, rte) {\n * rte = new MyCustomRte(el, {}); // this depends on the Custom RTE API\n * ...\n * return rte; // return the RTE instance\n * },\n *\n * // Disable the editor, called for example when you unfocus the Text Component\n * disable: function(el, rte) {\n * rte.blur(); // this depends on the Custom RTE API\n * }\n *\n * // Called when the Text Component is focused again. If you returned the RTE instance\n * // from the enable function, the enable won't be called again instead will call focus,\n * // in this case to avoid double binding of the editor\n * focus: function (el, rte) {\n * rte.focus(); // this depends on the Custom RTE API\n * }\n * });\n */\n setCustomRte(obj) {\n this.RichTextEditor.customRte = obj;\n },\n\n /**\n * Replace the default CSS parser with a custom one.\n * The parser function receives a CSS string as a parameter and expects\n * an array of CSSRule objects as a result. If you need to remove the\n * custom parser, pass `null` as the argument\n * @param {Function|null} parser Parser function\n * @return {this}\n * @example\n * editor.setCustomParserCss(css => {\n * const result = [];\n * // ... parse the CSS string\n * result.push({\n * selectors: '.someclass, div .otherclass',\n * style: { color: 'red' }\n * })\n * // ...\n * return result;\n * });\n */\n setCustomParserCss(parser) {\n this.Parser.getConfig().parserCss = parser;\n return this;\n },\n\n /**\n * Change the global drag mode of components.\n * To get more about this feature read: https://github.com/artf/grapesjs/issues/1936\n * @param {String} value Drag mode, options: 'absolute' | 'translate'\n * @returns {this}\n */\n setDragMode(value) {\n em.setDragMode(value);\n return this;\n },\n\n /**\n * Trigger event log message\n * @param {*} msg Message to log\n * @param {Object} [opts={}] Custom options\n * @param {String} [opts.ns=''] Namespace of the log (eg. to use in plugins)\n * @param {String} [opts.level='debug'] Level of the log, `debug`, `info`, `warning`, `error`\n * @return {this}\n * @example\n * editor.log('Something done!', { ns: 'from-plugin-x', level: 'info' });\n * // This will trigger following events\n * // `log`, `log:info`, `log-from-plugin-x`, `log-from-plugin-x:info`\n * // Callbacks of those events will always receive the message and\n * // options, as arguments, eg:\n * // editor.on('log:info', (msg, opts) => console.info(msg, opts))\n */\n log(msg, opts = {}) {\n em.log(msg, opts);\n return this;\n },\n\n /**\n * Translate label\n * @param {String} key Label to translate\n * @param {Object} [opts] Options for the translation\n * @param {Object} [opts.params] Params for the translation\n * @param {Boolean} [opts.noWarn] Avoid warnings in case of missing resources\n * @returns {String}\n * @example\n * editor.t('msg');\n * // use params\n * editor.t('msg2', { params: { test: 'hello' } });\n * // custom local\n * editor.t('msg2', { params: { test: 'hello' }, l: 'it' });\n */\n t(...args) {\n return em.t(...args);\n },\n\n /**\n * Attach event\n * @param {string} event Event name\n * @param {Function} callback Callback function\n * @return {this}\n */\n on(event, callback) {\n em.on(event, callback);\n return this;\n },\n\n /**\n * Attach event and detach it after the first run\n * @param {string} event Event name\n * @param {Function} callback Callback function\n * @return {this}\n */\n once(event, callback) {\n em.once(event, callback);\n return this;\n },\n\n /**\n * Detach event\n * @param {string} event Event name\n * @param {Function} callback Callback function\n * @return {this}\n */\n off(event, callback) {\n em.off(event, callback);\n return this;\n },\n\n /**\n * Trigger event\n * @param {string} event Event to trigger\n * @return {this}\n */\n trigger(event) {\n em.trigger.apply(em, arguments);\n return this;\n },\n\n /**\n * Destroy the editor\n */\n destroy() {\n return em.destroyAll();\n },\n\n /**\n * Returns editor element\n * @return {HTMLElement}\n * @private\n */\n getEl() {\n return editorView.el;\n },\n\n /**\n * Returns editor model\n * @return {Model}\n * @private\n */\n getModel() {\n return em;\n },\n\n /**\n * Render editor\n * @return {HTMLElement}\n */\n render() {\n editorView.render();\n return editorView.el;\n }\n };\n};\n","export default {\n plugins: []\n};\n","/**\n * File made for IE/Edge support\n * https://github.com/artf/grapesjs/issues/214\n */\n\nexport default () => {\n /**\n * Check if IE/Edge\n * @return {Boolean}\n */\n const isIE = () => {\n let match;\n const agent = window.navigator.userAgent;\n const rules = [\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/]\n ];\n\n for (let i = 0; i < rules.length; i++) {\n const rule = rules[i];\n match = rule[1].exec(agent);\n if (match) break;\n }\n\n return !!match;\n };\n\n if (isIE()) {\n const originalCreateHTMLDocument =\n DOMImplementation.prototype.createHTMLDocument;\n DOMImplementation.prototype.createHTMLDocument = title => {\n if (!title) title = '';\n return originalCreateHTMLDocument.apply(document.implementation, [title]);\n };\n }\n};\n","import $ from 'cash-dom';\nimport Editor from './editor';\nimport { isElement, isFunction } from 'underscore';\nimport polyfills from 'utils/polyfills';\nimport PluginManager from './plugin_manager';\n\npolyfills();\n\nconst plugins = new PluginManager();\nconst editors = [];\nconst defaultConfig = {\n // If true renders editor on init\n autorender: 1,\n\n // Array of plugins to init\n plugins: [],\n\n // Custom options for plugins\n pluginsOpts: {}\n};\n\nexport default {\n $,\n\n editors,\n\n plugins,\n\n // Will be replaced on build\n version: '<# VERSION #>',\n\n /**\n * Initialize the editor with passed options\n * @param {Object} config Configuration object\n * @param {string|HTMLElement} config.container Selector which indicates where render the editor\n * @param {Boolean} [config.autorender=true] If true, auto-render the content\n * @param {Array} [config.plugins=[]] Array of plugins to execute on start\n * @param {Object} [config.pluginsOpts={}] Custom options for plugins\n * @return {Editor} Editor instance\n * @example\n * var editor = grapesjs.init({\n * container: '#myeditor',\n * components: '
Hello world
',\n * style: '.hello{color: red}',\n * })\n */\n init(config = {}) {\n const els = config.container;\n if (!els) throw new Error(\"'container' is required\");\n config = { ...defaultConfig, ...config, grapesjs: this };\n config.el = isElement(els) ? els : document.querySelector(els);\n const editor = new Editor(config).init();\n const em = editor.getModel();\n\n // Load plugins\n config.plugins.forEach(pluginId => {\n let plugin = plugins.get(pluginId);\n const plgOptions = config.pluginsOpts[pluginId] || {};\n\n // Try to search in global context\n if (!plugin) {\n const wplg = window[pluginId];\n plugin = wplg && wplg.default ? wplg.default : wplg;\n }\n\n if (plugin) {\n plugin(editor, plgOptions);\n } else if (isFunction(pluginId)) {\n pluginId(editor, plgOptions);\n } else {\n em.logWarning(`Plugin ${pluginId} not found`, {\n context: 'plugins',\n plugin: pluginId\n });\n }\n });\n\n // Execute `onLoad` on modules once all plugins are initialized.\n // A plugin might have extended/added some custom type so this\n // is a good point to load stuff like components, css rules, etc.\n em.loadOnStart();\n config.autorender && editor.render();\n editors.push(editor);\n\n return editor;\n }\n};\n","import defaults from './config/config';\n\nexport default config => {\n var c = config || {};\n\n // Set default options\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var plugins = {};\n\n return {\n /**\n * Add new plugin. Plugins could not be overwritten\n * @param {string} id Plugin ID\n * @param {Function} plugin Function which contains all plugin logic\n * @return {Function} The plugin function\n * @example\n * PluginManager.add('some-plugin', function(editor){\n * editor.Commands.add('new-command', {\n * run: function(editor, senderBtn){\n * console.log('Executed new-command');\n * }\n * })\n * });\n */\n add(id, plugin) {\n if (plugins[id]) {\n return plugins[id];\n }\n\n plugins[id] = plugin;\n return plugin;\n },\n\n /**\n * Returns plugin by ID\n * @param {string} id Plugin ID\n * @return {Function|undefined} Plugin\n * @example\n * var plugin = PluginManager.get('some-plugin');\n * plugin(editor);\n */\n get(id) {\n return plugins[id];\n },\n\n /**\n * Returns object with all plugins\n * @return {Object}\n */\n getAll() {\n return plugins;\n }\n };\n};\n","export default {\n // Default assets\n // eg. [\n // 'https://...image1.png',\n // 'https://...image2.png',\n // {type: 'image', src: 'https://...image3.png', someOtherCustomProp: 1},\n // ..\n // ]\n assets: [],\n\n // Content to add where there is no assets to show\n // eg. 'No assets here, drag to upload'\n noAssets: '',\n\n // Style prefix\n stylePrefix: 'am-',\n\n // Upload endpoint, set `false` to disable upload\n // upload: 'https://endpoint/upload/assets',\n // upload: false,\n upload: 0,\n\n // The name used in POST to pass uploaded files\n uploadName: 'files',\n\n // Custom headers to pass with the upload request\n headers: {},\n\n // Custom parameters to pass with the upload request, eg. csrf token\n params: {},\n\n // The credentials setting for the upload request, eg. 'include', 'omit'\n credentials: 'include',\n\n // Allow uploading multiple files per request.\n // If disabled filename will not have '[]' appended\n multiUpload: true,\n\n // If true, tries to add automatically uploaded assets.\n // To make it work the server should respond with a JSON containing assets\n // in a data key, eg:\n // {\n // data: [\n // 'https://.../image.png',\n // ...\n // {src: 'https://.../image2.png'},\n // ...\n // ]\n // }\n autoAdd: 1,\n\n // To upload your assets, the module uses Fetch API, with this option you\n // overwrite it with something else.\n // It should return a Promise\n // @example\n // customFetch: (url, options) => axios(url, { data: options.body }),\n customFetch: '',\n\n // Custom uploadFile function.\n // Differently from the `customFetch` option, this gives a total control\n // over the uploading process, but you also have to emit all `asset:upload:*` events\n // by yourself (if you need to use them somewhere)\n // @example\n // uploadFile: (e) => {\n // var files = e.dataTransfer ? e.dataTransfer.files : e.target.files;\n // // ...send somewhere\n // }\n uploadFile: '',\n\n // In the absence of 'uploadFile' or 'upload' assets will be embedded as Base64\n embedAsBase64: 1,\n\n // Handle the image url submit from the built-in 'Add image' form\n // @example\n // handleAdd: (textFromInput) => {\n // // some check...\n // editor.AssetManager.add(textFromInput);\n // }\n handleAdd: '',\n\n // Enable an upload dropzone on the entire editor (not document) when dragging\n // files over it\n // If active the dropzone disable/hide the upload dropzone in asset modal,\n // otherwise you will get double drops (#507)\n dropzone: 0,\n\n // Open the asset manager once files are been dropped via the dropzone\n openAssetsOnDrop: 1,\n\n // Any dropzone content to append inside dropzone element\n dropzoneContent: '',\n\n //method called before upload, on return false upload is canceled.\n // @example\n // beforeUpload: (files) => {\n // // logic...\n // var stopUpload = true;\n // if(stopUpload) return false;\n // }\n beforeUpload: null,\n\n // Toggles visiblity of assets url input\n showUrlInput: true\n};\n","import Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n idAttribute: 'src',\n\n defaults: {\n type: '',\n src: ''\n },\n\n /**\n * Get filename of the asset\n * @return {string}\n * @private\n * */\n getFilename() {\n return this.get('src')\n .split('/')\n .pop();\n },\n\n /**\n * Get extension of the asset\n * @return {string}\n * @private\n * */\n getExtension() {\n return this.getFilename()\n .split('.')\n .pop();\n }\n});\n","import Asset from './Asset';\n\nexport default Asset.extend({\n defaults: {\n ...Asset.prototype.defaults,\n type: 'image',\n unitDim: 'px',\n height: 0,\n width: 0\n }\n});\n","import { isFunction } from 'underscore';\nimport AssetView from './AssetView';\n\nexport default AssetView.extend({\n events: {\n 'click [data-toggle=asset-remove]': 'onRemove',\n click: 'onClick',\n dblclick: 'onDblClick'\n },\n\n getPreview() {\n const pfx = this.pfx;\n const src = this.model.get('src');\n return `\n
\n
\n `;\n },\n\n getInfo() {\n const pfx = this.pfx;\n const model = this.model;\n let name = model.get('name');\n let width = model.get('width');\n let height = model.get('height');\n let unit = model.get('unitDim');\n let dim = width && height ? `${width}x${height}${unit}` : '';\n name = name || model.getFilename();\n return `\n
${name}
\n
${dim}
\n `;\n },\n\n init(o) {\n const pfx = this.pfx;\n this.className += ` ${pfx}asset-image`;\n },\n\n /**\n * Triggered when the asset is clicked\n * @private\n * */\n onClick() {\n var onClick = this.config.onClick;\n var model = this.model;\n this.collection.trigger('deselectAll');\n this.$el.addClass(this.pfx + 'highlight');\n\n if (isFunction(onClick)) {\n onClick(model);\n } else {\n this.updateTarget(this.collection.target);\n }\n },\n\n /**\n * Triggered when the asset is double clicked\n * @private\n * */\n onDblClick() {\n const { em, model } = this;\n const onDblClick = this.config.onDblClick;\n\n if (isFunction(onDblClick)) {\n onDblClick(model);\n } else {\n this.updateTarget(this.collection.target);\n em && em.get('Modal').close();\n }\n\n var onSelect = this.collection.onSelect;\n isFunction(onSelect) && onSelect(model);\n },\n\n /**\n * Remove asset from collection\n * @private\n * */\n onRemove(e) {\n e.stopImmediatePropagation();\n this.model.collection.remove(this.model);\n }\n});\n","import Backbone from 'backbone';\nimport { clone } from 'underscore';\n\nexport default Backbone.View.extend({\n initialize(o = {}) {\n this.options = o;\n this.collection = o.collection;\n const config = o.config || {};\n this.config = config;\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.em = config.em;\n this.className = this.pfx + 'asset';\n this.listenTo(this.model, 'destroy remove', this.remove);\n this.model.view = this;\n const init = this.init && this.init.bind(this);\n init && init(o);\n },\n\n template() {\n const pfx = this.pfx;\n return `\n
\n ${this.getPreview()}\n
\n
\n ${this.getInfo()}\n
\n
\n ⨯\n
\n `;\n },\n\n /**\n * Update target if exists\n * @param {Model} target\n * @private\n * */\n updateTarget(target) {\n if (target && target.set) {\n target.set('attributes', clone(target.get('attributes')));\n target.set('src', this.model.get('src'));\n }\n },\n\n getPreview() {\n return '';\n },\n\n getInfo() {\n return '';\n },\n\n render() {\n const el = this.el;\n el.innerHTML = this.template(this, this.model);\n el.className = this.className;\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport AssetImage from './AssetImage';\nimport AssetImageView from './../view/AssetImageView';\nimport TypeableCollection from 'domain_abstract/model/TypeableCollection';\n\nexport default Backbone.Collection.extend(TypeableCollection).extend({\n types: [\n {\n id: 'image',\n model: AssetImage,\n view: AssetImageView,\n isType(value) {\n if (typeof value == 'string') {\n return {\n type: 'image',\n src: value\n };\n }\n return value;\n }\n }\n ]\n});\n","import Backbone from 'backbone';\n\nexport default Backbone.View.extend({\n events: {\n submit: 'handleSubmit'\n },\n\n template({ pfx, ppfx, em, ...view }) {\n let form = '';\n if (this.config.showUrlInput) {\n form = `\n
\n
\n \n
\n \n
\n
\n `;\n }\n\n return `\n
\n
\n ${form}\n
\n
\n
\n
\n `;\n },\n\n initialize(o) {\n this.options = o;\n this.config = o.config;\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n this.em = this.config.em;\n const coll = this.collection;\n this.listenTo(coll, 'reset', this.renderAssets);\n this.listenTo(coll, 'add', this.addToAsset);\n this.listenTo(coll, 'remove', this.removedAsset);\n this.listenTo(coll, 'deselectAll', this.deselectAll);\n },\n\n /**\n * Add new asset to the collection via string\n * @param {Event} e Event object\n * @return {this}\n * @private\n */\n handleSubmit(e) {\n e.preventDefault();\n const input = this.getAddInput();\n const url = input && input.value.trim();\n const handleAdd = this.config.handleAdd;\n\n if (!url) {\n return;\n }\n\n input.value = '';\n this.getAssetsEl().scrollTop = 0;\n\n if (handleAdd) {\n handleAdd.bind(this)(url);\n } else {\n this.options.globalCollection.add(url, { at: 0 });\n }\n },\n\n /**\n * Returns assets element\n * @return {HTMLElement}\n * @private\n */\n getAssetsEl() {\n //if(!this.assets) // Not able to cache as after the rerender it losses the ref\n return this.el.querySelector(`.${this.pfx}assets`);\n },\n\n /**\n * Returns input url element\n * @return {HTMLElement}\n * @private\n */\n getAddInput() {\n if (!this.inputUrl || !this.inputUrl.value)\n this.inputUrl = this.el.querySelector(`.${this.pfx}add-asset input`);\n return this.inputUrl;\n },\n\n /**\n * Triggered when an asset is removed\n * @param {Asset} model Removed asset\n * @private\n */\n removedAsset(model) {\n if (!this.collection.length) {\n this.toggleNoAssets();\n }\n },\n\n /**\n * Add asset to collection\n * @private\n * */\n addToAsset(model) {\n if (this.collection.length == 1) {\n this.toggleNoAssets(1);\n }\n this.addAsset(model);\n },\n\n /**\n * Add new asset to collection\n * @param Object Model\n * @param Object Fragment collection\n * @return Object Object created\n * @private\n * */\n addAsset(model, fragmentEl = null) {\n const fragment = fragmentEl;\n const collection = this.collection;\n const config = this.config;\n const rendered = new model.typeView({\n model,\n collection,\n config\n }).render().el;\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n const assetsEl = this.getAssetsEl();\n if (assetsEl) {\n assetsEl.insertBefore(rendered, assetsEl.firstChild);\n }\n }\n\n return rendered;\n },\n\n /**\n * Checks if to show noAssets\n * @param {Boolean} hide\n * @private\n */\n toggleNoAssets(hide) {\n const assetsEl = this.$el.find(`.${this.pfx}assets`);\n\n if (hide) {\n assetsEl.empty();\n } else {\n const noAssets = this.config.noAssets;\n noAssets && assetsEl.append(noAssets);\n }\n },\n\n /**\n * Deselect all assets\n * @private\n * */\n deselectAll() {\n const pfx = this.pfx;\n this.$el.find(`.${pfx}highlight`).removeClass(`${pfx}highlight`);\n },\n\n renderAssets() {\n const fragment = document.createDocumentFragment();\n const assets = this.$el.find(`.${this.pfx}assets`);\n assets.empty();\n this.toggleNoAssets(this.collection.length);\n this.collection.each(model => this.addAsset(model, fragment));\n assets.append(fragment);\n },\n\n render() {\n const fuRendered = this.options.fu.render().el;\n this.$el.empty();\n this.$el.append(fuRendered).append(this.template(this));\n this.el.className = `${this.ppfx}asset-manager`;\n this.renderAssets();\n this.rendered = 1;\n return this;\n }\n});\n","import { template } from 'underscore';\nimport Backbone from 'backbone';\nimport fetch from 'utils/fetch';\n\nexport default Backbone.View.extend(\n {\n template: template(`\n
\n
title\"><%= title %>
\n \" name=\"file\" accept=\"*/*\" <%= disabled ? 'disabled' : '' %> <%= multiUpload ? 'multiple' : '' %>/>\n
\n
\n `),\n\n events: {},\n\n initialize(opts = {}) {\n this.options = opts;\n const c = opts.config || {};\n this.config = c;\n this.em = this.config.em;\n this.pfx = c.stylePrefix || '';\n this.ppfx = c.pStylePrefix || '';\n this.target = this.options.globalCollection || {};\n this.uploadId = this.pfx + 'uploadFile';\n this.disabled =\n c.disableUpload !== undefined\n ? c.disableUpload\n : !c.upload && !c.embedAsBase64;\n this.multiUpload = c.multiUpload !== undefined ? c.multiUpload : true;\n this.events['change #' + this.uploadId] = 'uploadFile';\n let uploadFile = c.uploadFile;\n\n if (uploadFile) {\n this.uploadFile = uploadFile.bind(this);\n } else if (!c.upload && c.embedAsBase64) {\n this.uploadFile = this.constructor.embedAsBase64;\n }\n\n this.delegateEvents();\n },\n\n /**\n * Triggered before the upload is started\n * @private\n */\n onUploadStart() {\n const em = this.config.em;\n em && em.trigger('asset:upload:start');\n },\n\n /**\n * Triggered after the upload is ended\n * @param {Object|string} res End result\n * @private\n */\n onUploadEnd(res) {\n const { $el, config } = this;\n const em = config.em;\n em && em.trigger('asset:upload:end', res);\n const input = $el.find('input');\n input && input.val('');\n },\n\n /**\n * Triggered on upload error\n * @param {Object} err Error\n * @private\n */\n onUploadError(err) {\n const em = this.config.em;\n console.error(err);\n this.onUploadEnd(err);\n em && em.trigger('asset:upload:error', err);\n },\n\n /**\n * Triggered on upload response\n * @param {string} text Response text\n * @private\n */\n onUploadResponse(text, clb) {\n const em = this.config.em;\n const config = this.config;\n const target = this.target;\n let json;\n try {\n json = typeof text === 'string' ? JSON.parse(text) : text;\n } catch (e) {\n json = text;\n }\n\n em && em.trigger('asset:upload:response', json);\n\n if (config.autoAdd && target) {\n target.add(json.data, { at: 0 });\n }\n\n this.onUploadEnd(text);\n clb && clb(json);\n },\n\n /**\n * Upload files\n * @param {Object} e Event\n * @return {Promise}\n * @private\n * */\n uploadFile(e, clb) {\n const files = e.dataTransfer ? e.dataTransfer.files : e.target.files;\n const { config } = this;\n const { beforeUpload } = config;\n\n const beforeUploadResponse = beforeUpload && beforeUpload(files);\n if (beforeUploadResponse === false) return;\n\n const body = new FormData();\n const { params, customFetch } = config;\n\n for (let param in params) {\n body.append(param, params[param]);\n }\n\n if (this.multiUpload) {\n for (let i = 0; i < files.length; i++) {\n body.append(`${config.uploadName}[]`, files[i]);\n }\n } else if (files.length) {\n body.append(config.uploadName, files[0]);\n }\n\n var target = this.target;\n const url = config.upload;\n const headers = config.headers;\n const reqHead = 'X-Requested-With';\n\n if (typeof headers[reqHead] == 'undefined') {\n headers[reqHead] = 'XMLHttpRequest';\n }\n\n if (url) {\n this.onUploadStart();\n const fetchOpts = {\n method: 'post',\n credentials: config.credentials || 'include',\n headers,\n body\n };\n const fetchResult = customFetch\n ? customFetch(url, fetchOpts)\n : fetch(url, fetchOpts).then(res =>\n ((res.status / 200) | 0) == 1\n ? res.text()\n : res.text().then(text => Promise.reject(text))\n );\n return fetchResult\n .then(text => this.onUploadResponse(text, clb))\n .catch(err => this.onUploadError(err));\n }\n },\n\n /**\n * Make input file droppable\n * @private\n * */\n initDrop() {\n var that = this;\n if (!this.uploadForm) {\n this.uploadForm = this.$el.find('form').get(0);\n if ('draggable' in this.uploadForm) {\n var uploadFile = this.uploadFile;\n this.uploadForm.ondragover = function() {\n this.className = that.pfx + 'hover';\n return false;\n };\n this.uploadForm.ondragleave = function() {\n this.className = '';\n return false;\n };\n this.uploadForm.ondrop = function(e) {\n this.className = '';\n e.preventDefault();\n that.uploadFile(e);\n return;\n };\n }\n }\n },\n\n initDropzone(ev) {\n let addedCls = 0;\n const c = this.config;\n const em = ev.model;\n const edEl = ev.el;\n const editor = em.get('Editor');\n const container = em.get('Config').el;\n const frameEl = em.get('Canvas').getBody();\n const ppfx = this.ppfx;\n const updatedCls = `${ppfx}dropzone-active`;\n const dropzoneCls = `${ppfx}dropzone`;\n const cleanEditorElCls = () => {\n edEl.className = edEl.className.replace(updatedCls, '').trim();\n addedCls = 0;\n };\n const onDragOver = () => {\n if (!addedCls) {\n edEl.className += ` ${updatedCls}`;\n addedCls = 1;\n }\n return false;\n };\n const onDragLeave = () => {\n cleanEditorElCls();\n return false;\n };\n const onDrop = e => {\n cleanEditorElCls();\n e.preventDefault();\n e.stopPropagation();\n this.uploadFile(e);\n\n if (c.openAssetsOnDrop && editor) {\n const target = editor.getSelected();\n editor.runCommand('open-assets', {\n target,\n onSelect() {\n editor.Modal.close();\n editor.AssetManager.setTarget(null);\n }\n });\n }\n\n return false;\n };\n\n ev.$el.append(`
${c.dropzoneContent}
`);\n cleanEditorElCls();\n\n if ('draggable' in edEl) {\n [edEl, frameEl].forEach(item => {\n item.ondragover = onDragOver;\n item.ondragleave = onDragLeave;\n item.ondrop = onDrop;\n });\n }\n },\n\n render() {\n const { $el, pfx, em } = this;\n $el.html(\n this.template({\n title: em && em.t('assetManager.uploadTitle'),\n uploadId: this.uploadId,\n disabled: this.disabled,\n multiUpload: this.multiUpload,\n pfx\n })\n );\n this.initDrop();\n $el.attr('class', pfx + 'file-uploader');\n return this;\n }\n },\n {\n embedAsBase64: function(e, clb) {\n // List files dropped\n const files = e.dataTransfer ? e.dataTransfer.files : e.target.files;\n const response = { data: [] };\n\n // Unlikely, widely supported now\n if (!FileReader) {\n this.onUploadError(\n new Error('Unsupported platform, FileReader is not defined')\n );\n return;\n }\n\n const promises = [];\n const mimeTypeMatcher = /^(.+)\\/(.+)$/;\n\n for (const file of files) {\n // For each file a reader (to read the base64 URL)\n // and a promise (to track and merge results and errors)\n const promise = new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.addEventListener('load', event => {\n let type;\n const name = file.name;\n\n // Try to find the MIME type of the file.\n const match = mimeTypeMatcher.exec(file.type);\n if (match) {\n type = match[1]; // The first part in the MIME, \"image\" in image/png\n } else {\n type = file.type;\n }\n\n /*\n // Show local video files, http://jsfiddle.net/dsbonev/cCCZ2/embedded/result,js,html,css/\n var URL = window.URL || window.webkitURL\n var file = this.files[0]\n var type = file.type\n var videoNode = document.createElement('video');\n var canPlay = videoNode.canPlayType(type) // can use also for 'audio' types\n if (canPlay === '') canPlay = 'no'\n var message = 'Can play type \"' + type + '\": ' + canPlay\n var isError = canPlay === 'no'\n displayMessage(message, isError)\n\n if (isError) {\n return\n }\n\n var fileURL = URL.createObjectURL(file)\n videoNode.src = fileURL\n */\n\n // If it's an image, try to find its size\n if (type === 'image') {\n const data = {\n src: reader.result,\n name,\n type,\n height: 0,\n width: 0\n };\n\n const image = new Image();\n image.addEventListener('error', error => {\n reject(error);\n });\n image.addEventListener('load', () => {\n data.height = image.height;\n data.width = image.width;\n resolve(data);\n });\n image.src = data.src;\n } else if (type) {\n // Not an image, but has a type\n resolve({\n src: reader.result,\n name,\n type\n });\n } else {\n // No type found, resolve with the URL only\n resolve(reader.result);\n }\n });\n reader.addEventListener('error', error => {\n reject(error);\n });\n reader.addEventListener('abort', error => {\n reject('Aborted');\n });\n\n reader.readAsDataURL(file);\n });\n\n promises.push(promise);\n }\n\n Promise.all(promises).then(\n data => {\n response.data = data;\n this.onUploadResponse(response, clb);\n },\n error => {\n this.onUploadError(error);\n }\n );\n }\n }\n);\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/asset_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * assetManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const assetManager = editor.AssetManager;\n * ```\n *\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [getAllVisible](#getallvisible)\n * * [remove](#remove)\n * * [store](#store)\n * * [load](#load)\n * * [getContainer](#getcontainer)\n * * [getAssetsEl](#getassetsel)\n * * [addType](#addtype)\n * * [getType](#gettype)\n * * [getTypes](#gettypes)\n *\n * @module AssetManager\n */\n\nimport defaults from './config/config';\nimport Assets from './model/Assets';\nimport AssetsView from './view/AssetsView';\nimport FileUpload from './view/FileUploader';\n\nexport default () => {\n let c = {};\n let assets, am, fu;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'AssetManager',\n\n /**\n * Mandatory for the storage manager\n * @type {String}\n * @private\n */\n storageKey: 'assets',\n\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n\n for (let name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n const ppfx = c.pStylePrefix;\n const em = c.em;\n\n if (ppfx) {\n c.stylePrefix = ppfx + c.stylePrefix;\n }\n\n // Global assets collection\n assets = new Assets([]);\n const obj = {\n // Collection visible in asset manager\n collection: new Assets([]),\n globalCollection: assets,\n config: c\n };\n fu = new FileUpload(obj);\n obj.fu = fu;\n am = new AssetsView(obj);\n\n // Setup the sync between the global and public collections\n assets.listenTo(assets, 'add', model => {\n this.getAllVisible().add(model);\n em && em.trigger('asset:add', model);\n });\n\n assets.listenTo(assets, 'remove', model => {\n this.getAllVisible().remove(model);\n em && em.trigger('asset:remove', model);\n });\n\n return this;\n },\n\n /**\n * Add new asset/s to the collection. URLs are supposed to be unique\n * @param {string|Object|Array|Array} asset URL strings or an objects representing the resource.\n * @param {Object} [opts] Options\n * @return {Model}\n * @example\n * // In case of strings, would be interpreted as images\n * assetManager.add('http://img.jpg');\n * assetManager.add(['http://img.jpg', './path/to/img.png']);\n *\n * // Using objects you could indicate the type and other meta informations\n * assetManager.add({\n * \tsrc: 'http://img.jpg',\n * \t//type: 'image',\t//image is default\n * \theight: 300,\n *\twidth: 200,\n * });\n * assetManager.add([{\n * \tsrc: 'http://img.jpg',\n * },{\n * \tsrc: './path/to/img.png',\n * }]);\n */\n add(asset, opts = {}) {\n // Put the model at the beginning\n if (typeof opts.at == 'undefined') {\n opts.at = 0;\n }\n\n return assets.add(asset, opts);\n },\n\n /**\n * Returns the asset by URL\n * @param {string} src URL of the asset\n * @return {Object} Object representing the asset\n * @example\n * var asset = assetManager.get('http://img.jpg');\n */\n get(src) {\n return assets.where({ src })[0];\n },\n\n /**\n * Return the global collection, containing all the assets\n * @return {Collection}\n */\n getAll() {\n return assets;\n },\n\n /**\n * Return the visible collection, which containes assets actually rendered\n * @return {Collection}\n */\n getAllVisible() {\n return am.collection;\n },\n\n /**\n * Remove the asset by its URL\n * @param {string} src URL of the asset\n * @return {this}\n * @example\n * assetManager.remove('http://img.jpg');\n */\n remove(src) {\n var asset = this.get(src);\n this.getAll().remove(asset);\n return this;\n },\n\n /**\n * Store assets data to the selected storage\n * @param {Boolean} noStore If true, won't store\n * @return {Object} Data to store\n * @example\n * var assets = assetManager.store();\n */\n store(noStore) {\n var obj = {};\n var assets = JSON.stringify(this.getAll().toJSON());\n obj[this.storageKey] = assets;\n if (!noStore && c.stm) c.stm.store(obj);\n return obj;\n },\n\n /**\n * Load data from the passed object.\n * The fetched data will be added to the collection.\n * @param {Object} data Object of data to load\n * @return {Object} Loaded assets\n * @example\n * var assets = assetManager.load({\n * \tassets: [...]\n * })\n *\n */\n load(data = {}) {\n const name = this.storageKey;\n let assets = data[name] || [];\n\n if (typeof assets == 'string') {\n try {\n assets = JSON.parse(data[name]);\n } catch (err) {}\n }\n\n if (assets && assets.length) {\n this.getAll().reset(assets);\n }\n\n return assets;\n },\n\n /**\n * Return the Asset Manager Container\n * @return {HTMLElement}\n */\n getContainer() {\n return am.el;\n },\n\n /**\n * Get assets element container\n * @return {HTMLElement}\n */\n getAssetsEl() {\n return am.el.querySelector('[data-el=assets]');\n },\n\n /**\n * Render assets\n * @param {array} assets Assets to render, without the argument will render\n * all global assets\n * @return {HTMLElement}\n * @example\n * // Render all assets\n * assetManager.render();\n *\n * // Render some of the assets\n * const assets = assetManager.getAll();\n * assetManager.render(assets.filter(\n * asset => asset.get('category') == 'cats'\n * ));\n */\n render(assets) {\n const toRender = assets || this.getAll().models;\n\n if (!am.rendered) {\n am.render();\n }\n\n am.collection.reset(toRender);\n return this.getContainer();\n },\n\n /**\n * Add new type. If you want to get more about type definition we suggest to read the [module's page](/modules/Assets.html)\n * @param {string} id Type ID\n * @param {Object} definition Definition of the type. Each definition contains\n * `model` (business logic), `view` (presentation logic)\n * and `isType` function which recognize the type of the\n * passed entity\n * @example\n * assetManager.addType('my-type', {\n * model: {},\n * view: {},\n * isType: (value) => {},\n * })\n */\n addType(id, definition) {\n this.getAll().addType(id, definition);\n },\n\n /**\n * Get type\n * @param {string} id Type ID\n * @return {Object} Type definition\n */\n getType(id) {\n return this.getAll().getType(id);\n },\n\n /**\n * Get types\n * @return {Array}\n */\n getTypes() {\n return this.getAll().getTypes();\n },\n\n //-------\n\n AssetsView() {\n return am;\n },\n\n FileUploader() {\n return fu;\n },\n\n onLoad() {\n this.getAll().reset(c.assets);\n },\n\n postRender(editorView) {\n c.dropzone && fu.initDropzone(editorView);\n },\n\n /**\n * Set new target\n * @param\t{Object}\tm Model\n * @private\n * */\n setTarget(m) {\n am.collection.target = m;\n },\n\n /**\n * Set callback after asset was selected\n * @param\t{Object}\tf Callback function\n * @private\n * */\n onSelect(f) {\n am.collection.onSelect = f;\n },\n\n /**\n * Set callback to fire when the asset is clicked\n * @param {function} func\n * @private\n */\n onClick(func) {\n c.onClick = func;\n },\n\n /**\n * Set callback to fire when the asset is double clicked\n * @param {function} func\n * @private\n */\n onDblClick(func) {\n c.onDblClick = func;\n },\n\n destroy() {\n assets.reset();\n fu.collection.reset();\n fu.remove();\n am.remove();\n [assets, am, fu].forEach(i => (i = null));\n c = {};\n }\n };\n};\n","export default {\n stylePrefix: 'trt-',\n\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n // Default options for the target input\n optionsTarget: [{ value: false }, { value: '_blank' }]\n};\n","import Backbone from 'backbone';\nimport { isUndefined, isString, isFunction } from 'underscore';\nimport { capitalize } from 'utils/mixins';\n\nconst $ = Backbone.$;\n\nexport default Backbone.View.extend({\n events: {},\n eventCapture: ['change'],\n\n appendInput: 1,\n\n attributes() {\n return this.model.get('attributes');\n },\n\n templateLabel() {\n const { ppfx } = this;\n const label = this.getLabel();\n return `
${label}
`;\n },\n\n templateInput() {\n const { clsField } = this;\n return `
`;\n },\n\n initialize(o = {}) {\n const { config = {} } = o;\n const { model, eventCapture } = this;\n const { target } = model;\n const { type } = model.attributes;\n this.config = config;\n this.em = config.em;\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.target = target;\n const { ppfx } = this;\n this.clsField = `${ppfx}field ${ppfx}field-${type}`;\n [\n ['change:value', this.onValueChange],\n ['remove', this.removeView]\n ].forEach(([event, clb]) => {\n model.off(event, clb);\n this.listenTo(model, event, clb);\n });\n model.view = this;\n this.listenTo(model, 'change:label', this.render);\n this.listenTo(model, 'change:placeholder', this.rerender);\n eventCapture.forEach(event => (this.events[event] = 'onChange'));\n this.delegateEvents();\n this.init();\n },\n\n getClbOpts() {\n return {\n component: this.target,\n trait: this.model,\n elInput: this.getInputElem()\n };\n },\n\n removeView() {\n this.remove();\n this.removed();\n },\n\n init() {},\n removed() {},\n onRender() {},\n onUpdate() {},\n onEvent() {},\n\n /**\n * Fires when the input is changed\n * @private\n */\n onChange(event) {\n const el = this.getInputElem();\n if (el && !isUndefined(el.value)) {\n this.model.set('value', el.value);\n }\n this.onEvent({\n ...this.getClbOpts(),\n event\n });\n },\n\n getValueForTarget() {\n return this.model.get('value');\n },\n\n setInputValue(value) {\n const el = this.getInputElem();\n el && (el.value = value);\n },\n\n /**\n * On change callback\n * @private\n */\n onValueChange(model, value, opts = {}) {\n if (opts.fromTarget) {\n this.setInputValue(model.get('value'));\n this.postUpdate();\n } else {\n const val = this.getValueForTarget();\n model.setTargetValue(val, opts);\n }\n },\n\n /**\n * Render label\n * @private\n */\n renderLabel() {\n const { $el, target } = this;\n const label = this.getLabel();\n let tpl = this.templateLabel(target);\n\n if (this.createLabel) {\n tpl =\n this.createLabel({\n label,\n component: target,\n trait: this\n }) || '';\n }\n\n $el.find('[data-label]').append(tpl);\n },\n\n /**\n * Returns label for the input\n * @return {string}\n * @private\n */\n getLabel() {\n const { em } = this;\n const { label, name } = this.model.attributes;\n return (\n em.t(`traitManager.traits.labels.${name}`) ||\n capitalize(label || name).replace(/-/g, ' ')\n );\n },\n\n /**\n * Returns current target component\n */\n getComponent() {\n return this.target;\n },\n\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n if (!this.$input) {\n const { em, model } = this;\n const md = model;\n const { name } = model.attributes;\n const plh = md.get('placeholder') || md.get('default') || '';\n const type = md.get('type') || 'text';\n const min = md.get('min');\n const max = md.get('max');\n const value = this.getModelValue();\n const input = $(``);\n const i18nAttr = em.t(`traitManager.traits.attributes.${name}`) || {};\n input.attr(i18nAttr);\n\n if (!isUndefined(value)) {\n md.set({ value }, { silent: true });\n input.prop('value', value);\n }\n\n if (min) {\n input.prop('min', min);\n }\n\n if (max) {\n input.prop('max', max);\n }\n\n this.$input = input;\n }\n return this.$input.get(0);\n },\n\n getInputElem() {\n const { input, $input } = this;\n return (\n input || ($input && $input.get && $input.get(0)) || this.getElInput()\n );\n },\n\n getModelValue() {\n let value;\n const model = this.model;\n const target = this.target;\n const name = model.get('name');\n\n if (model.get('changeProp')) {\n value = target.get(name);\n } else {\n const attrs = target.get('attributes');\n value = model.get('value') || attrs[name];\n }\n\n return !isUndefined(value) ? value : '';\n },\n\n getElInput() {\n return this.elInput;\n },\n\n /**\n * Renders input\n * @private\n * */\n renderField() {\n const { $el, appendInput, model } = this;\n const inputs = $el.find('[data-input]');\n const el = inputs[inputs.length - 1];\n let tpl = model.el;\n\n if (!tpl) {\n tpl = this.createInput\n ? this.createInput(this.getClbOpts())\n : this.getInputEl();\n }\n\n if (isString(tpl)) {\n el.innerHTML = tpl;\n this.elInput = el.firstChild;\n } else {\n appendInput ? el.appendChild(tpl) : el.insertBefore(tpl, el.firstChild);\n this.elInput = tpl;\n }\n\n model.el = this.elInput;\n },\n\n hasLabel() {\n const { label } = this.model.attributes;\n return !this.noLabel && label !== false;\n },\n\n rerender() {\n this.model.el = null;\n this.render();\n },\n\n postUpdate() {\n this.onUpdate(this.getClbOpts());\n },\n\n render() {\n const { $el, pfx, ppfx, model } = this;\n const { type, id } = model.attributes;\n const hasLabel = this.hasLabel && this.hasLabel();\n const cls = `${pfx}trait`;\n this.$input = null;\n let tmpl = `
\n ${hasLabel ? `
` : ''}\n
\n ${\n this.templateInput\n ? isFunction(this.templateInput)\n ? this.templateInput(this.getClbOpts())\n : this.templateInput\n : ''\n }\n
\n
`;\n $el.empty().append(tmpl);\n hasLabel && this.renderLabel();\n this.renderField();\n this.el.className = `${cls}__wrp ${cls}__wrp-${id}`;\n this.postUpdate();\n this.onRender(this.getClbOpts());\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport { isString, isUndefined } from 'underscore';\nimport TraitView from './TraitView';\n\nconst $ = Backbone.$;\n\nexport default TraitView.extend({\n init() {\n this.listenTo(this.model, 'change:options', this.rerender);\n },\n\n templateInput() {\n const { ppfx, clsField } = this;\n return `
\n
\n
\n
\n
\n
`;\n },\n\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n if (!this.$input) {\n const { model, em } = this;\n const propName = model.get('name');\n const opts = model.get('options') || [];\n const values = [];\n let input = '';\n this.$input = $(input);\n const val = model.getTargetValue();\n const valResult = values.indexOf(val) >= 0 ? val : model.get('default');\n !isUndefined(valResult) && this.$input.val(valResult);\n }\n\n return this.$input.get(0);\n }\n});\n","import { isUndefined } from 'underscore';\nimport TraitView from './TraitView';\n\nexport default TraitView.extend({\n appendInput: 0,\n\n templateInput() {\n const { ppfx, clsField } = this;\n return ``;\n },\n\n /**\n * Fires when the input is changed\n * @private\n */\n onChange() {\n const value = this.getInputElem().checked;\n this.model.set('value', this.getCheckedValue(value));\n },\n\n getCheckedValue(checked) {\n let result = checked;\n const { valueTrue, valueFalse } = this.model.attributes;\n\n if (result && !isUndefined(valueTrue)) {\n result = valueTrue;\n }\n\n if (!result && !isUndefined(valueFalse)) {\n result = valueFalse;\n }\n\n return result;\n },\n\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl(...args) {\n const toInit = !this.$input;\n const el = TraitView.prototype.getInputEl.apply(this, args);\n\n if (toInit) {\n let checked, targetValue;\n const { model, target } = this;\n const { valueTrue, valueFalse } = model.attributes;\n const name = model.get('name');\n\n if (model.get('changeProp')) {\n checked = target.get(name);\n targetValue = checked;\n } else {\n targetValue = target.get('attributes')[name];\n checked = targetValue || targetValue === '' ? !0 : !1;\n }\n\n if (!isUndefined(valueFalse) && targetValue === valueFalse) {\n checked = !1;\n }\n\n el.checked = checked;\n }\n\n return el;\n }\n});\n","import TraitView from './TraitView';\nimport { isUndefined } from 'underscore';\nimport InputNumber from 'domain_abstract/ui/InputNumber';\n\nexport default TraitView.extend({\n getValueForTarget() {\n const { model } = this;\n const { value, unit } = model.attributes;\n return !isUndefined(value) && value !== ''\n ? value + unit\n : model.get('default');\n },\n\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n if (!this.input) {\n const { ppfx, model } = this;\n const value = this.getModelValue();\n const inputNumber = new InputNumber({\n contClass: `${ppfx}field-int`,\n type: 'number',\n model: model,\n ppfx\n });\n this.input = inputNumber.render();\n this.$input = this.input.inputEl;\n this.$unit = this.input.unitEl;\n model.set('value', value, { fromTarget: 1 });\n this.$input.val(value);\n this.input = inputNumber.el;\n }\n return this.input;\n }\n});\n","import TraitView from './TraitView';\nimport InputColor from 'domain_abstract/ui/InputColor';\n\nexport default TraitView.extend({\n templateInput: '',\n\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n if (!this.input) {\n const model = this.model;\n const value = this.getModelValue();\n const inputColor = new InputColor({\n model,\n target: this.config.em,\n contClass: this.ppfx + 'field-color',\n ppfx: this.ppfx\n });\n const input = inputColor.render();\n input.setValue(value, { fromTarget: 1 });\n this.input = input.el;\n }\n\n return this.input;\n }\n});\n","import { isString } from 'underscore';\nimport TraitView from './TraitView';\n\nexport default TraitView.extend({\n events: {\n 'click button': 'handleClick'\n },\n\n templateInput: '',\n\n handleClick() {\n const { model, em } = this;\n const command = model.get('command');\n\n if (command) {\n if (isString(command)) {\n em.get('Commands').run(command);\n } else {\n command(em.get('Editor'), model);\n }\n }\n },\n\n renderLabel() {\n if (this.model.get('label')) {\n TraitView.prototype.renderLabel.apply(this, arguments);\n }\n },\n\n getInputEl() {\n const { model, ppfx } = this;\n const { labelButton, text, full } = model.props();\n const label = labelButton || text;\n const className = `${ppfx}btn`;\n const input = ``;\n return input;\n }\n});\n","import DomainViews from 'domain_abstract/view/DomainViews';\nimport TraitView from './TraitView';\nimport TraitSelectView from './TraitSelectView';\nimport TraitCheckboxView from './TraitCheckboxView';\nimport TraitNumberView from './TraitNumberView';\nimport TraitColorView from './TraitColorView';\nimport TraitButtonView from './TraitButtonView';\n\nexport default DomainViews.extend({\n ns: 'Traits',\n itemView: TraitView,\n reuseView: 1,\n\n itemsView: {\n text: TraitView,\n number: TraitNumberView,\n select: TraitSelectView,\n checkbox: TraitCheckboxView,\n color: TraitColorView,\n button: TraitButtonView\n },\n\n initialize(o = {}) {\n const config = o.config || {};\n this.config = config;\n this.em = o.editor;\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.className = this.pfx + 'traits';\n const toListen = 'component:toggled';\n this.listenTo(this.em, toListen, this.updatedCollection);\n this.updatedCollection();\n },\n\n /**\n * Update view collection\n * @private\n */\n updatedCollection() {\n const ppfx = this.ppfx;\n const comp = this.em.getSelected();\n this.el.className = `${this.className} ${ppfx}one-bg ${ppfx}two-color`;\n this.collection = comp ? comp.get('traits') : [];\n this.render();\n }\n});\n","import { defaults, isElement } from 'underscore';\nimport defaultOpts from './config/config';\nimport TraitsView from './view/TraitsView';\n\nexport default () => {\n let c = {};\n let TraitsViewer;\n\n return {\n TraitsView,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'TraitManager',\n\n /**\n * Get configuration object\n * @return {Object}\n * @private\n */\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n */\n init(config = {}) {\n c = config;\n defaults(c, defaultOpts);\n const ppfx = c.pStylePrefix;\n ppfx && (c.stylePrefix = `${ppfx}${c.stylePrefix}`);\n TraitsViewer = new TraitsView({\n collection: [],\n editor: c.em,\n config: c\n });\n return this;\n },\n\n postRender() {\n const elTo = this.getConfig().appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render());\n }\n },\n\n /**\n *\n * Get Traits viewer\n * @private\n */\n getTraitsViewer() {\n return TraitsViewer;\n },\n\n /**\n * Add new trait type\n * @param {string} name Type name\n * @param {Object} methods Object representing the trait\n */\n addType(name, trait) {\n var itemView = TraitsViewer.itemView;\n TraitsViewer.itemsView[name] = itemView.extend(trait);\n },\n\n /**\n * Get trait type\n * @param {string} name Type name\n * @return {Object}\n */\n getType(name) {\n return TraitsViewer.itemsView[name];\n },\n\n render() {\n return TraitsViewer.render().el;\n },\n\n destroy() {\n TraitsViewer.remove();\n [c, TraitsViewer].forEach(i => (i = {}));\n }\n };\n};\n","export default {\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n // Append blocks to canvas on click\n appendOnClick: 0,\n\n blocks: []\n};\n","import Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n defaults: {\n // If true, triggers an 'active' event on dropped component\n activate: 0,\n // If true, the dropped component will be selected\n select: 0,\n // If true, all IDs of dropped component and its style will be changed\n resetId: 0,\n // Block label\n label: '',\n // Disable the drag of the block\n disable: 0,\n // HTML string for the media of the block, eg. SVG icon, image, etc.\n media: '',\n content: '',\n category: '',\n attributes: {}\n }\n});\n","import Backbone from 'backbone';\nimport Block from './Block';\n\nexport default Backbone.Collection.extend({\n model: Block\n});\n","import Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n defaults: {\n id: '',\n label: '',\n open: true,\n attributes: {}\n }\n});\n","import Backbone from 'backbone';\nimport Category from './Category';\n\nexport default Backbone.Collection.extend({\n model: Category\n});\n","import Backbone from 'backbone';\nimport { isObject } from 'underscore';\nimport { on, off, hasDnd } from 'utils/mixins';\n\nexport default Backbone.View.extend({\n events: {\n click: 'handleClick',\n mousedown: 'startDrag',\n dragstart: 'handleDragStart',\n drag: 'handleDrag',\n dragend: 'handleDragEnd'\n },\n\n initialize(o, config = {}) {\n const { model } = this;\n this.em = config.em;\n this.config = config;\n this.endDrag = this.endDrag.bind(this);\n this.ppfx = config.pStylePrefix || '';\n this.listenTo(model, 'destroy remove', this.remove);\n this.listenTo(model, 'change', this.render);\n },\n\n handleClick() {\n const { config, model, em } = this;\n if (!config.appendOnClick) return;\n const sorter = config.getSorter();\n const content = model.get('content');\n const selected = em.getSelected();\n sorter.setDropContent(content);\n let target, valid;\n\n // If there is a selected component, try first to append\n // the block inside, otherwise, try to place it as a next sibling\n if (selected) {\n valid = sorter.validTarget(selected.getEl(), content);\n\n if (valid.valid) {\n target = selected;\n } else {\n const parent = selected.parent();\n valid = sorter.validTarget(parent.getEl(), content);\n if (valid.valid) target = parent;\n }\n }\n\n // If no target found yet, try to append the block to the wrapper\n if (!target) {\n const wrapper = em.getWrapper();\n valid = sorter.validTarget(wrapper.getEl(), content);\n if (valid.valid) target = wrapper;\n }\n\n const result = target && target.append(content)[0];\n result && em.setSelected(result, { scroll: 1 });\n },\n\n /**\n * Start block dragging\n * @private\n */\n startDrag(e) {\n const { config, em, model } = this;\n const disable = model.get('disable');\n //Right or middel click\n if (e.button !== 0 || !config.getSorter || this.el.draggable || disable)\n return;\n em.refreshCanvas();\n const sorter = config.getSorter();\n sorter.setDragHelper(this.el, e);\n sorter.setDropContent(this.model.get('content'));\n sorter.startSort(this.el);\n on(document, 'mouseup', this.endDrag);\n },\n\n handleDragStart(ev) {\n const { em, model } = this;\n const content = model.get('content');\n const isObj = isObject(content);\n const data = isObj ? JSON.stringify(content) : content;\n em.set('dragResult');\n\n // Note: data are not available on dragenter for security reason,\n // we have to use dragContent as we need it for the Sorter context\n // IE11 supports only 'text' data type\n ev.dataTransfer.setData('text', data);\n em.set('dragContent', content);\n em.trigger('block:drag:start', model, ev);\n },\n\n handleDrag(ev) {\n this.em.trigger('block:drag', this.model, ev);\n },\n\n handleDragEnd() {\n const { em, model } = this;\n const result = em.get('dragResult');\n\n if (result) {\n const oldKey = 'activeOnRender';\n const oldActive = result.get && result.get(oldKey);\n\n if (model.get('activate') || oldActive) {\n result.trigger('active');\n result.unset(oldKey);\n }\n\n if (model.get('select')) {\n em.setSelected(result);\n }\n\n if (model.get('resetId')) {\n result.onAll(model => model.resetId());\n }\n }\n\n em.set({\n dragResult: null,\n dragContent: null\n });\n\n em.trigger('block:drag:stop', result, model);\n },\n\n /**\n * Drop block\n * @private\n */\n endDrag(e) {\n off(document, 'mouseup', this.endDrag);\n const sorter = this.config.getSorter();\n\n // After dropping the block in the canvas the mouseup event is not yet\n // triggerd on 'this.doc' and so clicking outside, the sorter, tries to move\n // things (throws false positives). As this method just need to drop away\n // the block helper I use the trick of 'moved = 0' to void those errors.\n sorter.moved = 0;\n sorter.endMove();\n },\n\n render() {\n const { em, el, $el, ppfx, model } = this;\n const disable = model.get('disable');\n const attr = model.get('attributes') || {};\n const cls = attr.class || '';\n const className = `${ppfx}block`;\n const label =\n (em && em.t(`blockManager.labels.${model.id}`)) || model.get('label');\n const render = model.get('render');\n const media = model.get('media');\n const clsAdd = disable ? `${className}--disable` : `${ppfx}four-color-h`;\n $el.attr(attr);\n el.className = `${cls} ${className} ${ppfx}one-bg ${clsAdd}`.trim();\n el.innerHTML = `\n ${media ? `
${media}
` : ''}\n
${label}
\n `;\n el.title = el.textContent.trim();\n el.setAttribute('draggable', hasDnd(em) && !disable ? true : false);\n const result = render && render({ el, model, className, prefix: ppfx });\n if (result) el.innerHTML = result;\n return this;\n }\n});\n","import { template } from 'underscore';\nimport Backbone from 'backbone';\n\nexport default Backbone.View.extend({\n template: template(`\n
title\">\n caret-icon\">\n <%= label %>\n
\n
blocks-c\">
\n `),\n\n events: {},\n\n initialize(o = {}, config = {}) {\n this.config = config;\n const pfx = config.pStylePrefix || '';\n this.em = config.em;\n this.pfx = pfx;\n this.caretR = 'fa fa-caret-right';\n this.caretD = 'fa fa-caret-down';\n this.iconClass = `${pfx}caret-icon`;\n this.activeClass = `${pfx}open`;\n this.className = `${pfx}block-category`;\n this.events[`click .${pfx}title`] = 'toggle';\n this.listenTo(this.model, 'change:open', this.updateVisibility);\n this.delegateEvents();\n },\n\n updateVisibility() {\n if (this.model.get('open')) this.open();\n else this.close();\n },\n\n open() {\n this.el.className = `${this.className} ${this.activeClass}`;\n this.getIconEl().className = `${this.iconClass} ${this.caretD}`;\n this.getBlocksEl().style.display = '';\n },\n\n close() {\n this.el.className = this.className;\n this.getIconEl().className = `${this.iconClass} ${this.caretR}`;\n this.getBlocksEl().style.display = 'none';\n },\n\n toggle() {\n var model = this.model;\n model.set('open', !model.get('open'));\n },\n\n getIconEl() {\n if (!this.iconEl) {\n this.iconEl = this.el.querySelector('.' + this.iconClass);\n }\n\n return this.iconEl;\n },\n\n getBlocksEl() {\n if (!this.blocksEl) {\n this.blocksEl = this.el.querySelector('.' + this.pfx + 'blocks-c');\n }\n\n return this.blocksEl;\n },\n\n append(el) {\n this.getBlocksEl().appendChild(el);\n },\n\n render() {\n const { em, el, $el, model } = this;\n const label =\n em.t(`blockManager.categories.${model.id}`) || model.get('label');\n el.innerHTML = this.template({\n pfx: this.pfx,\n label\n });\n el.className = this.className;\n $el.css({ order: model.get('order') });\n this.updateVisibility();\n\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport { isString, isObject, bindAll } from 'underscore';\nimport BlockView from './BlockView';\nimport CategoryView from './CategoryView';\n\nexport default Backbone.View.extend({\n initialize(opts, config) {\n bindAll(this, 'getSorter', 'onDrag', 'onDrop');\n this.config = config || {};\n this.categories = opts.categories || '';\n this.renderedCategories = [];\n var ppfx = this.config.pStylePrefix || '';\n this.ppfx = ppfx;\n this.noCatClass = `${ppfx}blocks-no-cat`;\n this.blockContClass = `${ppfx}blocks-c`;\n this.catsClass = `${ppfx}block-categories`;\n const coll = this.collection;\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.render);\n this.em = this.config.em;\n this.tac = 'test-tac';\n this.grabbingCls = this.ppfx + 'grabbing';\n\n if (this.em) {\n this.config.getSorter = this.getSorter;\n this.canvas = this.em.get('Canvas');\n }\n },\n\n updateConfig(opts = {}) {\n this.config = {\n ...this.config,\n ...opts\n };\n },\n\n /**\n * Get sorter\n * @private\n */\n getSorter() {\n if (!this.em) return;\n if (!this.sorter) {\n var utils = this.em.get('Utils');\n var canvas = this.canvas;\n this.sorter = new utils.Sorter({\n container: canvas.getBody(),\n placer: canvas.getPlacerEl(),\n containerSel: '*',\n itemSel: '*',\n pfx: this.ppfx,\n onStart: this.onDrag,\n onEndMove: this.onDrop,\n onMove: this.onMove,\n document: canvas.getFrameEl().contentDocument,\n direction: 'a',\n wmargin: 1,\n nested: 1,\n em: this.em,\n canvasRelative: 1\n });\n }\n return this.sorter;\n },\n\n /**\n * Callback when block is on drag\n * @private\n */\n onDrag(e) {\n this.em.stopDefault();\n this.em.trigger('block:drag:start', e);\n },\n\n onMove(e) {\n this.em.trigger('block:drag:move', e);\n },\n\n /**\n * Callback when block is dropped\n * @private\n */\n onDrop(model) {\n const { em } = this;\n em.runDefault();\n\n if (model && model.get) {\n const oldActive = 'activeOnRender';\n\n if (model.get(oldActive)) {\n model.trigger('active');\n model.unset(oldActive);\n }\n\n em.trigger('block:drag:stop', model);\n }\n },\n\n /**\n * Add new model to the collection\n * @param {Model} model\n * @private\n * */\n addTo(model) {\n this.add(model);\n },\n\n /**\n * Render new model inside the view\n * @param {Model} model\n * @param {Object} fragment Fragment collection\n * @private\n * */\n add(model, fragment) {\n const { config } = this;\n var frag = fragment || null;\n var view = new BlockView(\n {\n model,\n attributes: model.get('attributes')\n },\n config\n );\n var rendered = view.render().el;\n var category = model.get('category');\n\n // Check for categories\n if (category && this.categories && !config.ignoreCategories) {\n if (isString(category)) {\n category = {\n id: category,\n label: category\n };\n } else if (isObject(category) && !category.id) {\n category.id = category.label;\n }\n\n var catModel = this.categories.add(category);\n var catId = catModel.get('id');\n var catView = this.renderedCategories[catId];\n var categories = this.getCategoriesEl();\n model.set('category', catModel, { silent: true });\n\n if (!catView && categories) {\n catView = new CategoryView(\n {\n model: catModel\n },\n this.config\n ).render();\n this.renderedCategories[catId] = catView;\n categories.appendChild(catView.el);\n }\n\n catView && catView.append(rendered);\n return;\n }\n\n if (frag) frag.appendChild(rendered);\n else this.append(rendered);\n },\n\n getCategoriesEl() {\n if (!this.catsEl) {\n this.catsEl = this.el.querySelector(`.${this.catsClass}`);\n }\n\n return this.catsEl;\n },\n\n getBlocksEl() {\n if (!this.blocksEl) {\n this.blocksEl = this.el.querySelector(\n `.${this.noCatClass} .${this.blockContClass}`\n );\n }\n\n return this.blocksEl;\n },\n\n append(el) {\n let blocks = this.getBlocksEl();\n blocks && blocks.appendChild(el);\n },\n\n render() {\n const ppfx = this.ppfx;\n const frag = document.createDocumentFragment();\n this.catsEl = null;\n this.blocksEl = null;\n this.renderedCategories = [];\n this.el.innerHTML = `\n
\n
\n
\n
\n `;\n\n this.collection.each(model => this.add(model, frag));\n this.append(frag);\n const cls = `${this.blockContClass}s ${ppfx}one-bg ${ppfx}two-color`;\n this.$el.addClass(cls);\n this.rendered = true;\n return this;\n }\n});\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/block_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * blockManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const blockManager = editor.BlockManager;\n * ```\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [getAllVisible](#getallvisible)\n * * [remove](#remove)\n * * [getConfig](#getconfig)\n * * [getCategories](#getcategories)\n * * [getContainer](#getcontainer)\n * * [render](#render)\n *\n * @module BlockManager\n */\nimport { isElement } from 'underscore';\nimport defaults from './config/config';\nimport Blocks from './model/Blocks';\nimport BlockCategories from './model/Categories';\nimport BlocksView from './view/BlocksView';\n\nexport default () => {\n var c = {};\n var blocks, blocksVisible, blocksView;\n var categories = [];\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'BlockManager',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @return {this}\n * @private\n */\n init(config) {\n c = config || {};\n const em = c.em;\n\n for (let name in defaults) {\n if (!(name in c)) {\n c[name] = defaults[name];\n }\n }\n\n // Global blocks collection\n blocks = new Blocks([]);\n blocksVisible = new Blocks([]);\n categories = new BlockCategories();\n\n // Setup the sync between the global and public collections\n blocks.listenTo(blocks, 'add', model => {\n blocksVisible.add(model);\n em && em.trigger('block:add', model);\n });\n\n blocks.listenTo(blocks, 'remove', model => {\n blocksVisible.remove(model);\n em && em.trigger('block:remove', model);\n });\n\n blocks.listenTo(blocks, 'reset', coll => {\n blocksVisible.reset(coll.models);\n });\n\n return this;\n },\n\n /**\n * Get configuration object\n * @return {Object}\n */\n getConfig() {\n return c;\n },\n\n /**\n * Load default blocks if the collection is empty\n */\n onLoad() {\n const blocks = this.getAll();\n !blocks.length && blocks.reset(c.blocks);\n },\n\n /**\n * Executed once the main editor instance is rendered\n * @private\n */\n postRender() {\n const collection = blocksVisible;\n blocksView = new BlocksView({ collection, categories }, c);\n const elTo = this.getConfig().appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render(blocksVisible.models));\n }\n },\n\n /**\n * Add new block to the collection.\n * @param {string} id Block id\n * @param {Object} opts Options\n * @param {string} opts.label Name of the block\n * @param {string} opts.content HTML content\n * @param {string|Object} opts.category Group the block inside a catgegory.\n * You should pass objects with id property, eg:\n * {id: 'some-uid', label: 'My category'}\n * The string will be converted in:\n * 'someid' => {id: 'someid', label: 'someid'}\n * @param {Object} [opts.attributes={}] Block attributes\n * @return {Block} Added block\n * @example\n * blockManager.add('h1-block', {\n * label: 'Heading',\n * content: '

Put your title here

',\n * category: 'Basic',\n * attributes: {\n * title: 'Insert h1 block'\n * }\n * });\n */\n add(id, opts) {\n var obj = opts || {};\n obj.id = id;\n return blocks.add(obj);\n },\n\n /**\n * Return the block by id\n * @param {string} id Block id\n * @example\n * const block = blockManager.get('h1-block');\n * console.log(JSON.stringify(block));\n * // {label: 'Heading', content: '

Put your ...', ...}\n */\n get(id) {\n return blocks.get(id);\n },\n\n /**\n * Return all blocks\n * @return {Collection}\n * @example\n * const blocks = blockManager.getAll();\n * console.log(JSON.stringify(blocks));\n * // [{label: 'Heading', content: '

Put your ...'}, ...]\n */\n getAll() {\n return blocks;\n },\n\n /**\n * Return the visible collection, which containes blocks actually rendered\n * @return {Collection}\n */\n getAllVisible() {\n return blocksVisible;\n },\n\n /**\n * Remove a block by id\n * @param {string} id Block id\n * @return {Block} Removed block\n * @example\n * // Id of the block which need to be removed\n * const id = 'button';\n * blockManager.remove(id);\n */\n remove(id) {\n return blocks.remove(id);\n },\n\n /**\n * Get all available categories.\n * It's possible to add categories only within blocks via 'add()' method\n * @return {Array|Collection}\n */\n getCategories() {\n return categories;\n },\n\n /**\n * Return the Blocks container element\n * @return {HTMLElement}\n */\n getContainer() {\n return blocksView.el;\n },\n\n /**\n * Render blocks\n * @param {Array} blocks Blocks to render, without the argument will render all global blocks\n * @param {Object} [opts={}] Options\n * @param {Boolean} [opts.external] Render blocks in a new container (HTMLElement will be returned)\n * @param {Boolean} [opts.ignoreCategories] Render blocks without categories\n * @return {HTMLElement} Rendered element\n * @example\n * // Render all blocks (inside the global collection)\n * blockManager.render();\n *\n * // Render new set of blocks\n * const blocks = blockManager.getAll();\n * const filtered = blocks.filter(block => block.get('category') == 'sections')\n *\n * blockManager.render(filtered);\n * // Or a new set from an array\n * blockManager.render([\n * {label: 'Label text', content: '
Content
'}\n * ]);\n *\n * // Back to blocks from the global collection\n * blockManager.render();\n *\n * // You can also render your blocks outside of the main block container\n * const newBlocksEl = blockManager.render(filtered, { external: true });\n * document.getElementById('some-id').appendChild(newBlocksEl);\n */\n render(blocks, opts = {}) {\n const toRender = blocks || this.getAll().models;\n\n if (opts.external) {\n const collection = new Blocks(toRender);\n return new BlocksView(\n { collection, categories },\n { ...c, ...opts }\n ).render().el;\n }\n\n if (blocksView) {\n blocksView.updateConfig(opts);\n blocksView.collection.reset(toRender);\n\n if (!blocksView.rendered) {\n blocksView.render();\n blocksView.rendered = 1;\n }\n }\n\n return this.getContainer();\n },\n\n destroy() {\n blocks.reset();\n blocks.stopListening();\n blocksVisible.reset();\n categories.reset();\n blocksView && blocksView.remove();\n [blocks, blocksVisible, categories, blocksView].forEach(i => (i = null));\n c = {};\n }\n };\n};\n","const swv = 'sw-visibility';\nconst expt = 'export-template';\nconst osm = 'open-sm';\nconst otm = 'open-tm';\nconst ola = 'open-layers';\nconst obl = 'open-blocks';\nconst ful = 'fullscreen';\nconst prv = 'preview';\n\nexport default {\n stylePrefix: 'pn-',\n\n // Default panels fa-sliders for features\n defaults: [\n {\n id: 'commands',\n buttons: [{}]\n },\n {\n id: 'options',\n buttons: [\n {\n active: true,\n id: swv,\n className: 'fa fa-square-o',\n command: swv,\n context: swv,\n attributes: { title: 'View components' }\n },\n {\n id: prv,\n className: 'fa fa-eye',\n command: prv,\n context: prv,\n attributes: { title: 'Preview' }\n },\n {\n id: ful,\n className: 'fa fa-arrows-alt',\n command: ful,\n context: ful,\n attributes: { title: 'Fullscreen' }\n },\n {\n id: expt,\n className: 'fa fa-code',\n command: expt,\n attributes: { title: 'View code' }\n }\n ]\n },\n {\n id: 'views',\n buttons: [\n {\n id: osm,\n className: 'fa fa-paint-brush',\n command: osm,\n active: true,\n togglable: 0,\n attributes: { title: 'Open Style Manager' }\n },\n {\n id: otm,\n className: 'fa fa-cog',\n command: otm,\n togglable: 0,\n attributes: { title: 'Settings' }\n },\n {\n id: ola,\n className: 'fa fa-bars',\n command: ola,\n togglable: 0,\n attributes: { title: 'Open Layer Manager' }\n },\n {\n id: obl,\n className: 'fa fa-th-large',\n command: obl,\n togglable: 0,\n attributes: { title: 'Open Blocks' }\n }\n ]\n }\n ],\n\n // Editor model\n em: null,\n\n // Delay before show children buttons (in milliseconds)\n delayBtnsShow: 300\n};\n","import Backbone from 'backbone';\nimport Buttons from './Buttons';\n\nexport default Backbone.Model.extend({\n defaults: {\n id: '',\n content: '',\n visible: true,\n buttons: [],\n attributes: {}\n },\n\n initialize(options) {\n this.btn = this.get('buttons') || [];\n this.buttons = new Buttons(this.btn);\n this.set('buttons', this.buttons);\n }\n});\n","import Backbone from 'backbone';\nimport Panel from './Panel';\n\nexport default Backbone.Collection.extend({\n model: Panel\n});\n","import Backbone from 'backbone';\nimport { isString, isObject, isFunction } from 'underscore';\n\nconst $ = Backbone.$;\n\nexport default Backbone.View.extend({\n tagName() {\n return this.model.get('tagName');\n },\n\n events: {\n click: 'clicked'\n },\n\n initialize(o) {\n var cls = this.model.get('className');\n this.config = o.config || {};\n this.em = this.config.em || {};\n const pfx = this.config.stylePrefix || '';\n const ppfx = this.config.pStylePrefix || '';\n this.pfx = pfx;\n this.ppfx = this.config.pStylePrefix || '';\n this.id = pfx + this.model.get('id');\n this.activeCls = `${pfx}active ${ppfx}four-color`;\n this.disableCls = `${ppfx}disabled`;\n this.btnsVisCls = `${pfx}visible`;\n this.className = pfx + 'btn' + (cls ? ' ' + cls : '');\n this.listenTo(this.model, 'change', this.render);\n this.listenTo(this.model, 'change:active updateActive', this.updateActive);\n this.listenTo(this.model, 'checkActive', this.checkActive);\n this.listenTo(this.model, 'change:bntsVis', this.updateBtnsVis);\n this.listenTo(this.model, 'change:attributes', this.updateAttributes);\n this.listenTo(this.model, 'change:className', this.updateClassName);\n this.listenTo(this.model, 'change:disable', this.updateDisable);\n\n if (this.em && this.em.get) this.commands = this.em.get('Commands');\n },\n\n /**\n * Updates class name of the button\n *\n * @return void\n * */\n updateClassName() {\n const { model, pfx } = this;\n const cls = model.get('className');\n const attrCls = model.get('attributes').class;\n const classStr = `${attrCls ? attrCls : ''} ${pfx}btn ${cls ? cls : ''}`;\n this.$el.attr('class', classStr.trim());\n },\n\n /**\n * Updates attributes of the button\n *\n * @return void\n * */\n updateAttributes() {\n const { em, model, $el } = this;\n const attr = model.get('attributes') || {};\n const title = em && em.t && em.t(`panels.buttons.titles.${model.id}`);\n $el.attr(attr);\n title && $el.attr({ title });\n\n this.updateClassName();\n },\n\n /**\n * Updates visibility of children buttons\n *\n * @return void\n * */\n updateBtnsVis() {\n if (!this.$buttons) return;\n\n if (this.model.get('bntsVis')) this.$buttons.addClass(this.btnsVisCls);\n else this.$buttons.removeClass(this.btnsVisCls);\n },\n\n /**\n * Update active status of the button\n *\n * @return void\n * */\n updateActive(opts = {}) {\n const { model, commands, $el, activeCls } = this;\n const { fromCollection } = opts;\n const context = model.get('context');\n const options = model.get('options');\n const commandName = model.get('command');\n let command = {};\n\n if (!commandName) return;\n\n if (commands && isString(commandName)) {\n command = commands.get(commandName) || {};\n } else if (isFunction(commandName)) {\n command = commands.create({ run: commandName });\n } else if (commandName !== null && isObject(commandName)) {\n command = commands.create(commandName);\n }\n\n if (model.get('active')) {\n !fromCollection && model.collection.deactivateAll(context, model);\n model.set('active', true, { silent: true }).trigger('checkActive');\n commands.runCommand(command, { ...options, sender: model });\n\n // Disable button if the command has no stop method\n command.noStop && model.set('active', false);\n } else {\n $el.removeClass(activeCls);\n commands.stopCommand(command, { ...options, sender: model, force: 1 });\n }\n },\n\n updateDisable() {\n const { disableCls, model } = this;\n const disable = model.get('disable');\n this.$el[disable ? 'addClass' : 'removeClass'](disableCls);\n },\n\n /**\n * Update active style status\n *\n * @return void\n * */\n checkActive() {\n const { model, $el, activeCls } = this;\n model.get('active') ? $el.addClass(activeCls) : $el.removeClass(activeCls);\n },\n\n /**\n * Triggered when button is clicked\n * @param {Object} e Event\n *\n * @return void\n * */\n clicked(e) {\n const { model } = this;\n\n if (model.get('bntsVis') || model.get('disable') || !model.get('command'))\n return;\n\n this.toggleActive();\n },\n\n toggleActive() {\n const { model, em } = this;\n const { active, togglable } = model.attributes;\n\n if (active && !togglable) return;\n\n model.set('active', !active);\n\n // If the stop is requested\n if (active) {\n if (model.get('runDefaultCommand')) em.runDefault();\n } else {\n if (model.get('stopDefaultCommand')) em.stopDefault();\n }\n },\n\n render() {\n const { model } = this;\n const label = model.get('label');\n const { $el } = this;\n !model.get('el') && $el.empty();\n this.updateAttributes();\n label && $el.append(label);\n this.checkActive();\n this.updateDisable();\n\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport ButtonView from './ButtonView';\nimport { result } from 'underscore';\n\nexport default Backbone.View.extend({\n initialize(o) {\n this.opt = o || {};\n this.config = this.opt.config || {};\n this.pfx = this.config.stylePrefix || '';\n this.parentM = this.opt.parentM || null;\n this.listenTo(this.collection, 'add', this.addTo);\n this.listenTo(this.collection, 'reset remove', this.render);\n this.className = this.pfx + 'buttons';\n },\n\n /**\n * Add to collection\n * @param Object Model\n *\n * @return Object\n * */\n addTo(model) {\n this.addToCollection(model);\n },\n\n /**\n * Add new object to collection\n * @param Object Model\n * @param Object Fragment collection\n *\n * @return Object Object created\n * */\n addToCollection(model, fragmentEl) {\n const fragment = fragmentEl || null;\n const viewObject = ButtonView;\n const el = model.get('el');\n const view = new viewObject({\n el,\n model,\n config: this.config,\n parentM: this.parentM\n });\n const rendered = view.render().el;\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n this.$el.append(rendered);\n }\n\n return rendered;\n },\n\n render() {\n var fragment = document.createDocumentFragment();\n this.$el.empty();\n\n this.collection.each(function(model) {\n this.addToCollection(model, fragment);\n }, this);\n\n this.$el.append(fragment);\n this.$el.attr('class', result(this, 'className'));\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport ButtonsView from './ButtonsView';\n\nexport default Backbone.View.extend({\n initialize(o) {\n const config = o.config || {};\n const model = this.model;\n this.config = config;\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.buttons = model.get('buttons');\n this.className = this.pfx + 'panel';\n this.id = this.pfx + model.get('id');\n this.listenTo(model, 'change:appendContent', this.appendContent);\n this.listenTo(model, 'change:content', this.updateContent);\n this.listenTo(model, 'change:visible', this.toggleVisible);\n model.view = this;\n },\n\n /**\n * Append content of the panel\n * */\n appendContent() {\n this.$el.append(this.model.get('appendContent'));\n },\n\n /**\n * Update content\n * */\n updateContent() {\n this.$el.html(this.model.get('content'));\n },\n\n toggleVisible() {\n if (!this.model.get('visible')) {\n this.$el.addClass(`${this.ppfx}hidden`);\n return;\n }\n this.$el.removeClass(`${this.ppfx}hidden`);\n },\n\n attributes() {\n return this.model.get('attributes');\n },\n\n initResize() {\n const em = this.config.em;\n const editor = em ? em.get('Editor') : '';\n const resizable = this.model.get('resizable');\n\n if (editor && resizable) {\n var resz = resizable === true ? [1, 1, 1, 1] : resizable;\n var resLen = resz.length;\n var tc,\n cr,\n bc,\n cl = 0;\n\n // Choose which sides of the panel are resizable\n if (resLen == 2) {\n tc = resz[0];\n bc = resz[0];\n cr = resz[1];\n cl = resz[1];\n } else if (resLen == 4) {\n tc = resz[0];\n cr = resz[1];\n bc = resz[2];\n cl = resz[3];\n }\n\n var resizer = editor.Utils.Resizer.init({\n tc,\n cr,\n bc,\n cl,\n tl: 0,\n tr: 0,\n bl: 0,\n br: 0,\n appendTo: this.el,\n silentFrames: 1,\n avoidContainerUpdate: 1,\n prefix: editor.getConfig().stylePrefix,\n onEnd() {\n em && em.trigger('change:canvasOffset');\n },\n posFetcher: (el, { target }) => {\n const style = el.style;\n const config = resizer.getConfig();\n const keyWidth = config.keyWidth;\n const keyHeight = config.keyHeight;\n const rect = el.getBoundingClientRect();\n const forContainer = target == 'container';\n const styleWidth = style[keyWidth];\n const styleHeight = style[keyHeight];\n const width =\n styleWidth && !forContainer ? parseFloat(styleWidth) : rect.width;\n const height =\n styleHeight && !forContainer\n ? parseFloat(styleHeight)\n : rect.height;\n return {\n left: 0,\n top: 0,\n width,\n height\n };\n },\n ...resizable\n });\n resizer.blur = () => {};\n resizer.focus(this.el);\n }\n },\n\n render() {\n const $el = this.$el;\n const ppfx = this.ppfx;\n const cls = `${this.className} ${this.id} ${ppfx}one-bg ${ppfx}two-color`;\n $el.addClass(cls);\n\n if (this.buttons.length) {\n var buttons = new ButtonsView({\n collection: this.buttons,\n config: this.config\n });\n $el.append(buttons.render().el);\n }\n\n $el.append(this.model.get('content'));\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport PanelView from './PanelView';\n\nexport default Backbone.View.extend({\n initialize(o) {\n this.opt = o || {};\n this.config = this.opt.config || {};\n this.pfx = this.config.stylePrefix || '';\n const items = this.collection;\n this.listenTo(items, 'add', this.addTo);\n this.listenTo(items, 'reset', this.render);\n this.listenTo(items, 'remove', this.onRemove);\n this.className = this.pfx + 'panels';\n },\n\n onRemove(model) {\n const view = model.view;\n view && view.remove();\n },\n\n /**\n * Add to collection\n * @param Object Model\n *\n * @return Object\n * @private\n * */\n addTo(model) {\n this.addToCollection(model);\n },\n\n /**\n * Add new object to collection\n * @param Object Model\n * @param Object Fragment collection\n * @param integer Index of append\n *\n * @return Object Object created\n * @private\n * */\n addToCollection(model, fragmentEl) {\n const fragment = fragmentEl || null;\n const config = this.config;\n const el = model.get('el');\n const view = new PanelView({\n el,\n model,\n config\n });\n const rendered = view.render().el;\n const appendTo = model.get('appendTo');\n\n // Do nothing if the panel was requested to be another element\n if (el) {\n } else if (appendTo) {\n var appendEl = document.querySelector(appendTo);\n appendEl.appendChild(rendered);\n } else {\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n this.$el.append(rendered);\n }\n }\n\n view.initResize();\n return rendered;\n },\n\n render() {\n const $el = this.$el;\n const frag = document.createDocumentFragment();\n $el.empty();\n this.collection.each(model => this.addToCollection(model, frag));\n $el.append(frag);\n $el.attr('class', this.className);\n return this;\n }\n});\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/panels/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * panels: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const panelManager = editor.Panels;\n * ```\n *\n * * [addPanel](#addpanel)\n * * [addButton](#addbutton)\n * * [getButton](#getbutton)\n * * [getPanel](#getpanel)\n * * [getPanels](#getpanels)\n * * [getPanelsEl](#getpanelsel)\n * * [removePanel](#removepanel)\n * * [removeButton](#removebutton)\n *\n * @module Panels\n */\nimport defaults from './config/config';\nimport Panel from './model/Panel';\nimport Panels from './model/Panels';\nimport PanelsView from './view/PanelsView';\n\nexport default () => {\n var c = {};\n var panels, PanelsViewObj;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Panels',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n panels = new Panels(c.defaults);\n PanelsViewObj = new PanelsView({\n collection: panels,\n config: c\n });\n return this;\n },\n\n /**\n * Returns the collection of panels\n * @return {Collection} Collection of panel\n */\n getPanels() {\n return panels;\n },\n\n /**\n * Returns panels element\n * @return {HTMLElement}\n */\n getPanelsEl() {\n return PanelsViewObj.el;\n },\n\n /**\n * Add new panel to the collection\n * @param {Object|Panel} panel Object with right properties or an instance of Panel\n * @return {Panel} Added panel. Useful in case passed argument was an Object\n * @example\n * var newPanel = panelManager.addPanel({\n * id: 'myNewPanel',\n * visible : true,\n * buttons : [...],\n * });\n */\n addPanel(panel) {\n return panels.add(panel);\n },\n\n /**\n * Remove a panel from the collection\n * @param {Object|Panel|String} panel Object with right properties or an instance of Panel or Painel id\n * @return {Panel} Removed panel. Useful in case passed argument was an Object\n * @example\n * const newPanel = panelManager.removePanel({\n * id: 'myNewPanel',\n * visible : true,\n * buttons : [...],\n * });\n *\n * const newPanel = panelManager.removePanel('myNewPanel');\n *\n */\n removePanel(panel) {\n return panels.remove(panel);\n },\n\n /**\n * Get panel by ID\n * @param {string} id Id string\n * @return {Panel|null}\n * @example\n * var myPanel = panelManager.getPanel('myNewPanel');\n */\n getPanel(id) {\n var res = panels.where({ id });\n return res.length ? res[0] : null;\n },\n\n /**\n * Add button to the panel\n * @param {string} panelId Panel's ID\n * @param {Object|Button} button Button object or instance of Button\n * @return {Button|null} Added button. Useful in case passed button was an Object\n * @example\n * var newButton = panelManager.addButton('myNewPanel',{\n * id: 'myNewButton',\n * className: 'someClass',\n * command: 'someCommand',\n * attributes: { title: 'Some title'},\n * active: false,\n * });\n * // It's also possible to pass the command as an object\n * // with .run and .stop methods\n * ...\n * command: {\n * run: function(editor) {\n * ...\n * },\n * stop: function(editor) {\n * ...\n * }\n * },\n * // Or simply like a function which will be evaluated as a single .run command\n * ...\n * command: function(editor) {\n * ...\n * }\n */\n addButton(panelId, button) {\n var pn = this.getPanel(panelId);\n return pn ? pn.get('buttons').add(button) : null;\n },\n\n /**\n * Remove button from the panel\n * @param {String} panelId Panel's ID\n * @param {String} buttonId Button's ID\n * @return {Button|null} Removed button.\n * @example\n * const removedButton = panelManager.addButton('myNewPanel',{\n * id: 'myNewButton',\n * className: 'someClass',\n * command: 'someCommand',\n * attributes: { title: 'Some title'},\n * active: false,\n * });\n *\n * const removedButton = panelManager.removeButton('myNewPanel', 'myNewButton');\n *\n */\n removeButton(panelId, button) {\n var pn = this.getPanel(panelId);\n return pn && pn.get('buttons').remove(button);\n },\n\n /**\n * Get button from the panel\n * @param {string} panelId Panel's ID\n * @param {string} id Button's ID\n * @return {Button|null}\n * @example\n * var button = panelManager.getButton('myPanel','myButton');\n */\n getButton(panelId, id) {\n var pn = this.getPanel(panelId);\n if (pn) {\n var res = pn.get('buttons').where({ id });\n return res.length ? res[0] : null;\n }\n return null;\n },\n\n /**\n * Render panels and buttons\n * @return {HTMLElement}\n * @private\n */\n render() {\n return PanelsViewObj.render().el;\n },\n\n /**\n * Active activable buttons\n * @private\n */\n active() {\n this.getPanels().each(p => {\n p.get('buttons').each(btn => {\n btn.get('active') && btn.trigger('updateActive');\n });\n });\n },\n\n /**\n * Disable buttons flagged as disabled\n * @private\n */\n disableButtons() {\n this.getPanels().each(p => {\n p.get('buttons').each(btn => {\n if (btn.get('disable')) btn.trigger('change:disable');\n });\n });\n },\n\n destroy() {\n panels.reset();\n panels.stopListening();\n PanelsViewObj.remove();\n [c, panels, PanelsViewObj].forEach(i => (i = {}));\n },\n\n Panel\n };\n};\n","export default {\n stylePrefix: 'sm-',\n\n sectors: [],\n\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n // Hide the property in case it's not stylable for the\n // selected component (each component has 'stylable' property)\n hideNotStylable: true,\n\n // Highlight changed properties of the selected component\n highlightChanged: true,\n\n // Highlight computed properties of the selected component\n highlightComputed: true,\n\n // Show computed properties of the selected component, if this value\n // is set to false, highlightComputed will not take effect\n showComputed: true,\n\n // Adds the possibility to clear property value from the target style\n clearProperties: 0,\n\n // Properties not to take in account for computed styles\n avoidComputed: ['width', 'height']\n};\n","export default () => ({\n /**\n * Build props object by their name\n * @param {Array|string} props Array of properties name\n * @return {Array}\n */\n build(props) {\n var objs = [];\n var dftFixedValues = ['initial', 'inherit'];\n\n if (typeof props === 'string') props = [props];\n\n for (var i = 0, len = props.length; i < len; i++) {\n var obj = {};\n var prop = props[i];\n obj.property = prop;\n\n // Property\n switch (prop) {\n case 'border-radius-c':\n obj.property = 'border-radius';\n break;\n }\n\n // Fixed values\n switch (prop) {\n case 'top':\n case 'right':\n case 'bottom':\n case 'left':\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'width':\n case 'max-width':\n case 'min-width':\n case 'height':\n case 'max-height':\n case 'min-height':\n case 'flex-basis':\n obj.fixedValues = ['initial', 'inherit', 'auto'];\n break;\n case 'font-size':\n obj.fixedValues = [\n 'medium',\n 'xx-small',\n 'x-small',\n 'small',\n 'large',\n 'x-large',\n 'xx-large',\n 'smaller',\n 'larger',\n 'length',\n 'initial',\n 'inherit'\n ];\n break;\n case 'letter-spacing':\n case 'line-height':\n obj.fixedValues = ['normal', 'initial', 'inherit'];\n break;\n }\n\n // Type\n switch (prop) {\n case 'float':\n case 'position':\n case 'text-align':\n obj.type = 'radio';\n break;\n case 'display':\n case 'flex-direction':\n case 'flex-wrap':\n case 'justify-content':\n case 'align-items':\n case 'align-content':\n case 'align-self':\n case 'font-family':\n case 'font-weight':\n case 'border-style':\n case 'box-shadow-type':\n case 'background-repeat':\n case 'background-position':\n case 'background-attachment':\n case 'background-size':\n case 'transition-property':\n case 'transition-timing-function':\n case 'cursor':\n case 'overflow':\n case 'overflow-x':\n case 'overflow-y':\n obj.type = 'select';\n break;\n case 'top':\n case 'right':\n case 'bottom':\n case 'left':\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'min-height':\n case 'min-width':\n case 'max-height':\n case 'max-width':\n case 'width':\n case 'height':\n case 'font-size':\n case 'letter-spacing':\n case 'line-height':\n case 'text-shadow-h':\n case 'text-shadow-v':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n case 'border-width':\n case 'box-shadow-h':\n case 'box-shadow-v':\n case 'box-shadow-blur':\n case 'box-shadow-spread':\n case 'transition-duration':\n case 'perspective':\n case 'transform-rotate-x':\n case 'transform-rotate-y':\n case 'transform-rotate-z':\n case 'transform-scale-x':\n case 'transform-scale-y':\n case 'transform-scale-z':\n case 'order':\n case 'flex-grow':\n case 'flex-shrink':\n case 'flex-basis':\n obj.type = 'integer';\n break;\n case 'margin':\n case 'padding':\n case 'border-radius':\n case 'border':\n case 'transform':\n obj.type = 'composite';\n break;\n case 'color':\n case 'text-shadow-color':\n case 'background-color':\n case 'border-color':\n case 'box-shadow-color':\n obj.type = 'color';\n break;\n case 'text-shadow':\n case 'box-shadow':\n case 'background':\n case 'transition':\n obj.type = 'stack';\n break;\n case 'background-image':\n obj.type = 'file';\n break;\n }\n\n // Defaults\n switch (prop) {\n case 'float':\n case 'background-color':\n case 'text-shadow':\n obj.defaults = 'none';\n break;\n case 'display':\n obj.defaults = 'block';\n break;\n case 'flex-direction':\n obj.defaults = 'row';\n break;\n case 'flex-wrap':\n obj.defaults = 'nowrap';\n break;\n case 'justify-content':\n obj.defaults = 'flex-start';\n break;\n case 'align-items':\n obj.defaults = 'stretch';\n break;\n case 'align-content':\n obj.defaults = 'stretch';\n break;\n case 'align-self':\n obj.defaults = 'auto';\n break;\n case 'position':\n obj.defaults = 'static';\n break;\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'text-shadow-h':\n case 'text-shadow-v':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'box-shadow-h':\n case 'box-shadow-v':\n case 'box-shadow-spread':\n case 'perspective':\n case 'transform-rotate-x':\n case 'transform-rotate-y':\n case 'transform-rotate-z':\n case 'order':\n case 'flex-grow':\n obj.defaults = 0;\n break;\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n obj.defaults = '0px';\n break;\n case 'transform-scale-x':\n case 'transform-scale-y':\n case 'transform-scale-z':\n case 'flex-shrink':\n obj.defaults = 1;\n break;\n case 'box-shadow-blur':\n obj.defaults = '5px';\n break;\n case 'top':\n case 'right':\n case 'bottom':\n case 'left':\n case 'min-height':\n case 'min-width':\n case 'max-height':\n case 'max-width':\n case 'width':\n case 'height':\n case 'background-size':\n case 'cursor':\n case 'flex-basis':\n obj.defaults = 'auto';\n break;\n case 'font-family':\n obj.defaults = 'Arial, Helvetica, sans-serif';\n break;\n case 'font-size':\n case 'border-width':\n obj.defaults = 'medium';\n break;\n case 'font-weight':\n obj.defaults = '400';\n break;\n case 'letter-spacing':\n case 'line-height':\n obj.defaults = 'normal';\n break;\n case 'color':\n case 'text-shadow-color':\n case 'border-color':\n case 'box-shadow-color':\n obj.defaults = 'black';\n break;\n case 'text-align':\n obj.defaults = 'left';\n break;\n case 'border-style':\n obj.defaults = 'solid';\n break;\n case 'box-shadow-type':\n obj.defaults = '';\n break;\n case 'background-repeat':\n obj.defaults = 'repeat';\n break;\n case 'background-position':\n obj.defaults = 'left top';\n break;\n case 'background-attachment':\n obj.defaults = 'scroll';\n break;\n case 'transition-property':\n obj.defaults = 'width';\n break;\n case 'transition-duration':\n obj.defaults = '2';\n break;\n case 'transition-timing-function':\n obj.defaults = 'ease';\n break;\n case 'overflow':\n case 'overflow-x':\n case 'overflow-y':\n obj.defaults = 'visible';\n break;\n }\n\n /*\n * Add styleable dependency on other properties. Allows properties to be\n * dynamically hidden or shown based on values of other properties.\n *\n * Property will be styleable if all of the properties (keys) in the\n * requires object have any of the values specified in the array.\n */\n switch (prop) {\n case 'flex-direction':\n case 'flex-wrap':\n case 'justify-content':\n case 'align-items':\n case 'align-content':\n obj.requires = { display: ['flex'] };\n break;\n case 'order':\n case 'flex-basis':\n case 'flex-grow':\n case 'flex-shrink':\n case 'align-self':\n obj.requiresParent = { display: ['flex'] };\n break;\n }\n\n // Units\n switch (prop) {\n case 'top':\n case 'bottom':\n case 'margin-top':\n case 'margin-bottom':\n case 'padding-top':\n case 'padding-bottom':\n case 'min-height':\n case 'max-height':\n case 'height':\n obj.units = ['px', '%', 'vh'];\n break;\n case 'right':\n case 'left':\n case 'margin-right':\n case 'margin-left':\n case 'padding-right':\n case 'padding-left':\n case 'min-width':\n case 'max-width':\n case 'width':\n obj.units = ['px', '%', 'vw'];\n break;\n case 'flex-basis':\n obj.units = ['px', '%', 'vw', 'vh'];\n break;\n case 'text-shadow-v':\n case 'text-shadow-h':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n case 'box-shadow-h':\n case 'box-shadow-v':\n obj.units = ['px', '%'];\n break;\n case 'font-size':\n case 'letter-spacing':\n case 'line-height':\n obj.units = ['px', 'em', 'rem', '%'];\n break;\n case 'border-width':\n obj.units = ['px', 'em'];\n break;\n case 'box-shadow-blur':\n case 'box-shadow-spread':\n case 'perspective':\n obj.units = ['px'];\n break;\n case 'transition-duration':\n obj.units = ['s'];\n break;\n case 'transform-rotate-x':\n case 'transform-rotate-y':\n case 'transform-rotate-z':\n obj.units = ['deg'];\n break;\n }\n\n // Min/Max\n switch (prop) {\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'min-height':\n case 'min-width':\n case 'max-height':\n case 'max-width':\n case 'width':\n case 'height':\n case 'font-size':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n case 'border-width':\n case 'box-shadow-blur':\n case 'transition-duration':\n case 'perspective':\n case 'flex-basis':\n obj.min = 0;\n break;\n }\n\n // Preview\n switch (prop) {\n case 'text-shadow':\n case 'box-shadow':\n case 'background':\n obj.preview = true;\n break;\n }\n\n // Detached\n switch (prop) {\n case 'background':\n obj.detached = true;\n break;\n }\n\n // Functions\n switch (prop) {\n case 'transform-rotate-x':\n obj.functionName = 'rotateX';\n break;\n case 'transform-rotate-y':\n obj.functionName = 'rotateY';\n break;\n case 'transform-rotate-z':\n obj.functionName = 'rotateZ';\n break;\n case 'transform-scale-x':\n obj.functionName = 'scaleX';\n break;\n case 'transform-scale-y':\n obj.functionName = 'scaleY';\n break;\n case 'transform-scale-z':\n obj.functionName = 'scaleZ';\n break;\n case 'background-image':\n obj.functionName = 'url';\n break;\n }\n\n // Options\n switch (prop) {\n case 'float':\n obj.list = [{ value: 'none' }, { value: 'left' }, { value: 'right' }];\n break;\n case 'display':\n obj.list = [\n { value: 'block' },\n { value: 'inline' },\n { value: 'inline-block' },\n { value: 'flex' },\n { value: 'none' }\n ];\n break;\n case 'flex-direction':\n obj.list = [\n { value: 'row' },\n { value: 'row-reverse' },\n { value: 'column' },\n { value: 'column-reverse' }\n ];\n break;\n case 'flex-wrap':\n obj.list = [\n { value: 'nowrap' },\n { value: 'wrap' },\n { value: 'wrap-reverse' }\n ];\n break;\n case 'justify-content':\n obj.list = [\n { value: 'flex-start' },\n { value: 'flex-end' },\n { value: 'center' },\n { value: 'space-between' },\n { value: 'space-around' },\n { value: 'space-evenly' }\n ];\n break;\n case 'align-items':\n obj.list = [\n { value: 'flex-start' },\n { value: 'flex-end' },\n { value: 'center' },\n { value: 'baseline' },\n { value: 'stretch' }\n ];\n break;\n case 'align-content':\n obj.list = [\n { value: 'flex-start' },\n { value: 'flex-end' },\n { value: 'center' },\n { value: 'space-between' },\n { value: 'space-around' },\n { value: 'stretch' }\n ];\n break;\n case 'align-self':\n obj.list = [\n { value: 'auto' },\n { value: 'flex-start' },\n { value: 'flex-end' },\n { value: 'center' },\n { value: 'baseline' },\n { value: 'stretch' }\n ];\n break;\n case 'position':\n obj.list = [\n { value: 'static' },\n { value: 'relative' },\n { value: 'absolute' },\n { value: 'fixed' }\n ];\n break;\n case 'font-family':\n var ss = ', sans-serif';\n var fonts = [\n 'Arial, Helvetica' + ss,\n 'Arial Black, Gadget' + ss,\n 'Brush Script MT' + ss,\n 'Comic Sans MS, cursive' + ss,\n 'Courier New, Courier, monospace',\n 'Georgia, serif',\n 'Helvetica' + ss,\n 'Impact, Charcoal' + ss,\n 'Lucida Sans Unicode, Lucida Grande' + ss,\n 'Tahoma, Geneva' + ss,\n 'Times New Roman, Times, serif',\n 'Trebuchet MS, Helvetica' + ss,\n 'Verdana, Geneva' + ss\n ];\n obj.list = [];\n for (var j = 0, l = fonts.length; j < l; j++) {\n var font = {};\n font.value = fonts[j];\n font.name = fonts[j].split(',')[0];\n obj.list.push(font);\n }\n break;\n case 'font-weight':\n obj.list = [\n { value: '100', name: 'Thin' },\n { value: '200', name: 'Extra-Light' },\n { value: '300', name: 'Light' },\n { value: '400', name: 'Normal' },\n { value: '500', name: 'Medium' },\n { value: '600', name: 'Semi-Bold' },\n { value: '700', name: 'Bold' },\n { value: '800', name: 'Extra-Bold' },\n { value: '900', name: 'Ultra-Bold' }\n ];\n break;\n case 'text-align':\n obj.list = [\n { value: 'left' },\n { value: 'center' },\n { value: 'right' },\n { value: 'justify' }\n ];\n break;\n case 'border-style':\n obj.list = [\n { value: 'none' },\n { value: 'solid' },\n { value: 'dotted' },\n { value: 'dashed' },\n { value: 'double' },\n { value: 'groove' },\n { value: 'ridge' },\n { value: 'inset' },\n { value: 'outset' }\n ];\n break;\n case 'box-shadow-type':\n obj.list = [\n { value: '', name: 'Outside' },\n { value: 'inset', name: 'Inside' }\n ];\n break;\n case 'background-repeat':\n obj.list = [\n { value: 'repeat' },\n { value: 'repeat-x' },\n { value: 'repeat-y' },\n { value: 'no-repeat' }\n ];\n break;\n case 'background-position':\n obj.list = [\n { value: 'left top' },\n { value: 'left center' },\n { value: 'left bottom' },\n { value: 'right top' },\n { value: 'right center' },\n { value: 'right bottom' },\n { value: 'center top' },\n { value: 'center center' },\n { value: 'center bottom' }\n ];\n break;\n case 'background-attachment':\n obj.list = [\n { value: 'scroll' },\n { value: 'fixed' },\n { value: 'local' }\n ];\n break;\n case 'background-size':\n obj.list = [\n { value: 'auto' },\n { value: 'cover' },\n { value: 'contain' }\n ];\n break;\n case 'transition-property':\n obj.list = [\n { value: 'all' },\n { value: 'width' },\n { value: 'height' },\n { value: 'background-color' },\n { value: 'transform' },\n { value: 'box-shadow' },\n { value: 'opacity' }\n ];\n break;\n case 'transition-timing-function':\n obj.list = [\n { value: 'linear' },\n { value: 'ease' },\n { value: 'ease-in' },\n { value: 'ease-out' },\n { value: 'ease-in-out' }\n ];\n break;\n case 'cursor':\n obj.list = [\n { value: 'auto' },\n { value: 'pointer' },\n { value: 'copy' },\n { value: 'crosshair' },\n { value: 'grab' },\n { value: 'grabbing' },\n { value: 'help' },\n { value: 'move' },\n { value: 'text' }\n ];\n break;\n case 'overflow':\n case 'overflow-x':\n case 'overflow-y':\n obj.list = [\n { value: 'visible' },\n { value: 'hidden' },\n { value: 'scroll' },\n { value: 'auto' }\n ];\n break;\n }\n\n // Properties\n switch (prop) {\n case 'margin':\n obj.properties = this.build([\n 'margin-top',\n 'margin-right',\n 'margin-bottom',\n 'margin-left'\n ]);\n break;\n case 'padding':\n obj.properties = this.build([\n 'padding-top',\n 'padding-right',\n 'padding-bottom',\n 'padding-left'\n ]);\n break;\n case 'text-shadow':\n obj.properties = this.build([\n 'text-shadow-h',\n 'text-shadow-v',\n 'text-shadow-blur',\n 'text-shadow-color'\n ]);\n break;\n case 'border':\n obj.properties = this.build([\n 'border-width',\n 'border-style',\n 'border-color'\n ]);\n break;\n case 'border-radius':\n obj.properties = this.build([\n 'border-top-left-radius',\n 'border-top-right-radius',\n 'border-bottom-right-radius',\n 'border-bottom-left-radius'\n ]);\n break;\n case 'box-shadow':\n obj.properties = this.build([\n 'box-shadow-h',\n 'box-shadow-v',\n 'box-shadow-blur',\n 'box-shadow-spread',\n 'box-shadow-color',\n 'box-shadow-type'\n ]);\n break;\n case 'background':\n obj.properties = this.build([\n 'background-image',\n 'background-repeat',\n 'background-position',\n 'background-attachment',\n 'background-size'\n ]);\n break;\n case 'transition':\n obj.properties = this.build([\n 'transition-property',\n 'transition-duration',\n 'transition-timing-function'\n ]);\n break;\n case 'transform':\n obj.properties = this.build([\n 'transform-rotate-x',\n 'transform-rotate-y',\n 'transform-rotate-z',\n 'transform-scale-x',\n 'transform-scale-y',\n 'transform-scale-z'\n ]);\n break;\n }\n\n objs.push(obj);\n }\n\n return objs;\n }\n});\n","import Backbone from 'backbone';\nimport { extend } from 'underscore';\nimport Properties from './Properties';\nimport PropertyFactory from './PropertyFactory';\n\nexport default Backbone.Model.extend({\n defaults: {\n id: '',\n name: '',\n open: true,\n buildProps: '',\n extendBuilded: 1,\n properties: []\n },\n\n initialize(opts) {\n const o = opts || {};\n const builded = this.buildProperties(o.buildProps);\n const name = this.get('name') || '';\n let props = [];\n !this.get('id') && this.set('id', name.replace(/ /g, '_').toLowerCase());\n\n if (!builded) props = this.get('properties');\n else props = this.extendProperties(builded);\n\n const propsModel = new Properties(props);\n propsModel.sector = this;\n this.set('properties', propsModel);\n },\n\n /**\n * Extend properties\n * @param {Array} props Start properties\n * @param {Array} moProps Model props\n * @param {Boolean} ex Returns the same amount of passed model props\n * @return {Array} Final props\n * @private\n */\n extendProperties(props, moProps, ex) {\n var pLen = props.length;\n var mProps = moProps || this.get('properties');\n var ext = this.get('extendBuilded');\n var isolated = [];\n\n for (var i = 0, len = mProps.length; i < len; i++) {\n var mProp = mProps[i];\n var found = 0;\n\n for (var j = 0; j < pLen; j++) {\n var prop = props[j];\n if (mProp.property == prop.property || mProp.id == prop.property) {\n // Check for nested properties\n var mPProps = mProp.properties;\n if (mPProps && mPProps.length) {\n mProp.properties = this.extendProperties(\n prop.properties || [],\n mPProps,\n 1\n );\n }\n props[j] = ext ? extend(prop, mProp) : mProp;\n isolated[j] = props[j];\n found = 1;\n continue;\n }\n }\n\n if (!found) {\n props.push(mProp);\n isolated.push(mProp);\n }\n }\n\n return ex ? isolated.filter(i => i) : props;\n },\n\n /**\n * Build properties\n * @param {Array} propr Array of props as sting\n * @return {Array}\n * @private\n */\n buildProperties(props) {\n var r;\n var buildP = props || [];\n\n if (!buildP.length) return;\n\n if (!this.propFactory) this.propFactory = new PropertyFactory();\n\n r = this.propFactory.build(buildP);\n\n return r;\n }\n});\n","import Backbone from 'backbone';\nimport Sector from './Sector';\n\nexport default Backbone.Collection.extend({\n model: Sector,\n\n initialize() {\n this.listenTo(this, 'reset', this.onReset);\n },\n\n onReset(models, opts = {}) {\n const prev = opts.previousModels || [];\n prev.forEach(sect => sect.get('properties').reset());\n }\n});\n","import Backbone from 'backbone';\nimport { template } from 'underscore';\nimport PropertiesView from './PropertiesView';\n\nexport default Backbone.View.extend({\n template: template(`\n
title\" data-sector-title>\n caret\" class=\"fa\">\n <%= label %>\n
`),\n\n events: {\n 'click [data-sector-title]': 'toggle'\n },\n\n initialize(o) {\n this.config = o.config || {};\n this.em = this.config.em;\n this.pfx = this.config.stylePrefix || '';\n this.target = o.target || {};\n this.propTarget = o.propTarget || {};\n this.caretR = 'fa-caret-right';\n this.caretD = 'fa-caret-down';\n const model = this.model;\n this.listenTo(model, 'change:open', this.updateOpen);\n this.listenTo(model, 'updateVisibility', this.updateVisibility);\n this.listenTo(model, 'destroy remove', this.remove);\n },\n\n /**\n * If all properties are hidden this will hide the sector\n */\n updateVisibility() {\n var show;\n this.model.get('properties').each(prop => {\n if (prop.get('visible')) {\n show = 1;\n }\n });\n this.el.style.display = show ? '' : 'none';\n },\n\n /**\n * Update visibility\n */\n updateOpen() {\n if (this.model.get('open')) this.show();\n else this.hide();\n },\n\n /**\n * Show the content of the sector\n * */\n show() {\n this.$el.addClass(this.pfx + 'open');\n this.getPropertiesEl().style.display = '';\n this.$caret.removeClass(this.caretR).addClass(this.caretD);\n },\n\n /**\n * Hide the content of the sector\n * */\n hide() {\n this.$el.removeClass(this.pfx + 'open');\n this.getPropertiesEl().style.display = 'none';\n this.$caret.removeClass(this.caretD).addClass(this.caretR);\n },\n\n getPropertiesEl() {\n return this.$el.find(`.${this.pfx}properties`).get(0);\n },\n\n /**\n * Toggle visibility\n * */\n toggle(e) {\n var v = this.model.get('open') ? 0 : 1;\n this.model.set('open', v);\n },\n\n render() {\n const { pfx, model, em, $el } = this;\n const { id, name } = model.attributes;\n const label = (em && em.t(`styleManager.sectors.${id}`)) || name;\n $el.html(this.template({ pfx, label }));\n this.$caret = $el.find(`#${pfx}caret`);\n this.renderProperties();\n $el.attr('class', `${pfx}sector ${pfx}sector__${id} no-select`);\n this.updateOpen();\n return this;\n },\n\n renderProperties() {\n var objs = this.model.get('properties');\n\n if (objs) {\n var view = new PropertiesView({\n collection: objs,\n target: this.target,\n propTarget: this.propTarget,\n config: this.config\n });\n this.$el.append(view.render().el);\n }\n }\n});\n","import Backbone from 'backbone';\nimport { extend, isString, isArray } from 'underscore';\nimport { isTaggableNode } from 'utils/mixins';\nimport { appendAtIndex } from 'utils/dom';\nimport SectorView from './SectorView';\n\nconst helperCls = 'hc-state';\n\nexport default Backbone.View.extend({\n initialize(o = {}) {\n const config = o.config || {};\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.target = o.target || {};\n this.config = config;\n\n // The target that will emit events for properties\n const target = {};\n extend(target, Backbone.Events);\n const body = document.body;\n const dummy = document.createElement(`el-${new Date().getTime()}`);\n body.appendChild(dummy);\n target.computedDefault = { ...window.getComputedStyle(dummy) };\n body.removeChild(dummy);\n this.propTarget = target;\n const coll = this.collection;\n const events =\n 'component:toggled component:update:classes change:state change:device frame:resized';\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.render);\n this.listenTo(this.target, events, this.targetUpdated);\n },\n\n remove() {\n Backbone.View.prototype.remove.apply(this, arguments);\n ['target', 'config', 'propTarget'].forEach(i => (this[i] = {}));\n },\n\n /**\n * Add to collection\n * @param {Object} model Model\n * @return {Object}\n * @private\n * */\n addTo(model, coll, opts = {}) {\n this.addToCollection(model, null, opts);\n },\n\n toggleStateCls(targets = [], enable) {\n targets.forEach(trg => {\n const el = trg.getEl();\n el && el.classList && el.classList[enable ? 'add' : 'remove'](helperCls);\n });\n },\n\n /**\n * Fired when target is updated\n * @private\n */\n targetUpdated(trg) {\n const em = this.target;\n const pt = this.propTarget;\n const targets = em.getSelectedAll();\n let model = em.getSelected();\n const mdToClear = trg && !!trg.toHTML ? trg : model;\n\n // Clean components\n mdToClear && this.toggleStateCls([mdToClear]);\n if (!model) return;\n\n const config = em.get('Config');\n const state = !config.devicePreviewMode ? em.get('state') : '';\n const { componentFirst } = em.get('SelectorManager').getConfig();\n const el = model.getEl();\n pt.helper = null;\n pt.targets = null;\n\n // Create computed style container\n if (el && isTaggableNode(el)) {\n const stateStr = state ? `:${state}` : null;\n pt.computed = window.getComputedStyle(el, stateStr);\n }\n\n // Create a new rule for the state as a helper\n const appendStateRule = (style = {}) => {\n const cc = em.get('CssComposer');\n const rules = cc.getAll();\n let helperRule = cc.getClassRule(helperCls);\n\n if (!helperRule) {\n helperRule = cc.setClassRule(helperCls);\n } else {\n // I will make it last again, otherwise it could be overridden\n rules.remove(helperRule);\n rules.add(helperRule);\n }\n\n helperRule.set('important', 1);\n helperRule.setStyle(style);\n pt.helper = helperRule;\n };\n\n const sm = em.get('StyleManager');\n model = sm.getModelToStyle(model);\n\n if (state) {\n appendStateRule(model.getStyle());\n this.toggleStateCls(targets, 1);\n }\n\n pt.model = model;\n if (componentFirst) {\n pt.targets = targets.map(t => sm.getModelToStyle(t)).filter(Boolean);\n }\n pt.trigger('update');\n },\n\n /**\n * Select different target for the Style Manager.\n * It could be a Component, CSSRule, or a string of any CSS selector\n * @param {Component|CSSRule|String|Array} target\n * @return {Array} Array of Components/CSSRules\n */\n setTarget(target, opts = {}) {\n const em = this.target;\n const trgs = isArray(target) ? target : [target];\n const { targetIsClass, stylable } = opts;\n const models = [];\n\n trgs.forEach(target => {\n let model = target;\n\n if (isString(target)) {\n let rule;\n const rules = em.get('CssComposer').getAll();\n\n if (targetIsClass) {\n rule = rules.filter(\n rule => rule.get('selectors').getFullString() === target\n )[0];\n }\n\n if (!rule) {\n rule = rules.filter(rule => rule.get('selectorsAdd') === target)[0];\n }\n\n if (!rule) {\n rule = rules.add({ selectors: [], selectorsAdd: target });\n }\n\n stylable && rule.set({ stylable });\n model = rule;\n }\n\n models.push(model);\n });\n\n const pt = this.propTarget;\n pt.targets = models;\n pt.trigger('update', { targets: models });\n return models;\n },\n\n /**\n * Add new object to collection\n * @param {Object} model Model\n * @param {Object} fragmentEl collection\n * @return {Object} Object created\n * @private\n * */\n addToCollection(model, fragmentEl, opts = {}) {\n const { pfx, target, propTarget, config, el } = this;\n const appendTo = fragmentEl || el;\n const rendered = new SectorView({\n model,\n id: `${pfx}${model.get('id')}`,\n name: model.get('name'),\n properties: model.get('properties'),\n target,\n propTarget,\n config\n }).render().el;\n appendAtIndex(appendTo, rendered, opts.at);\n\n return rendered;\n },\n\n render() {\n const frag = document.createDocumentFragment();\n const $el = this.$el;\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n $el.empty();\n this.collection.each(model => this.addToCollection(model, frag));\n $el.append(frag);\n $el.addClass(`${pfx}sectors ${ppfx}one-bg ${ppfx}two-color`);\n return this;\n }\n});\n","/**\n * With Style Manager you build categories (called sectors) of CSS properties which could be used to customize the style of components.\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/style_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * styleManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const styleManager = editor.StyleManager;\n * ```\n *\n * * [getConfig](#getconfig)\n * * [addSector](#addsector)\n * * [getSector](#getsector)\n * * [removeSector](#removesector)\n * * [getSectors](#getsectors)\n * * [addProperty](#addproperty)\n * * [getProperty](#getproperty)\n * * [removeProperty](#removeproperty)\n * * [getProperties](#getproperties)\n * * [getModelToStyle](#getmodeltostyle)\n * * [addType](#addtype)\n * * [getType](#gettype)\n * * [getTypes](#gettypes)\n * * [createType](#createtype)\n *\n * @module StyleManager\n */\n\nimport { isElement } from 'underscore';\nimport defaults from './config/config';\nimport Sectors from './model/Sectors';\nimport Properties from './model/Properties';\nimport PropertyFactory from './model/PropertyFactory';\nimport SectorsView from './view/SectorsView';\n\nexport default () => {\n var c = {};\n let properties;\n var sectors, SectView;\n\n return {\n PropertyFactory: PropertyFactory(),\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'StyleManager',\n\n /**\n * Get configuration object\n * @return {Object}\n */\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = { ...defaults, ...config };\n const ppfx = c.pStylePrefix;\n this.em = c.em;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n properties = new Properties();\n sectors = new Sectors([], c);\n SectView = new SectorsView({\n collection: sectors,\n target: c.em,\n config: c\n });\n\n return this;\n },\n\n onLoad() {\n // Use silent as sectors' view will be created and rendered on StyleManager.render\n sectors.add(c.sectors, { silent: true });\n },\n\n postRender() {\n const elTo = this.getConfig().appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render());\n }\n },\n\n /**\n * Add new sector to the collection. If the sector with the same id already exists,\n * that one will be returned\n * @param {string} id Sector id\n * @param {Object} sector Object representing sector\n * @param {string} [sector.name=''] Sector's label\n * @param {Boolean} [sector.open=true] Indicates if the sector should be opened\n * @param {Array} [sector.properties=[]] Array of properties\n * @param {Object} [options={}] Options\n * @return {Sector} Added Sector\n * @example\n * var sector = styleManager.addSector('mySector',{\n * name: 'My sector',\n * open: true,\n * properties: [{ name: 'My property'}]\n * }, { at: 0 });\n * // With `at: 0` we place the new sector at the beginning of the collection\n * */\n addSector(id, sector, opts = {}) {\n let result = this.getSector(id);\n\n if (!result) {\n sector.id = id;\n result = sectors.add(sector, opts);\n }\n\n return result;\n },\n\n /**\n * Get sector by id\n * @param {string} id Sector id\n * @return {Sector|null}\n * @example\n * var sector = styleManager.getSector('mySector');\n * */\n getSector(id, opts = {}) {\n const res = sectors.where({ id })[0];\n !res && opts.warn && this._logNoSector(id);\n return res;\n },\n\n /**\n * Remove a sector by id\n * @param {string} id Sector id\n * @return {Sector} Removed sector\n * @example\n * const removed = styleManager.removeSector('mySector');\n */\n removeSector(id) {\n return this.getSectors().remove(this.getSector(id, { warn: 1 }));\n },\n\n /**\n * Get all sectors\n * @return {Sectors} Collection of sectors\n * */\n getSectors() {\n return sectors;\n },\n\n /**\n * Add property to the sector identified by id\n * @param {string} sectorId Sector id\n * @param {Object} property Property object\n * @param {string} [property.name=''] Name of the property\n * @param {string} [property.property=''] CSS property, eg. `min-height`\n * @param {string} [property.type=''] Type of the property: integer | radio | select | color | file | composite | stack\n * @param {Array} [property.units=[]] Unit of measure available, eg. ['px','%','em']. Only for integer type\n * @param {string} [property.unit=''] Default selected unit from `units`. Only for integer type\n * @param {number} [property.min=null] Min possible value. Only for integer type\n * @param {number} [property.max=null] Max possible value. Only for integer type\n * @param {string} [property.defaults=''] Default value\n * @param {string} [property.info=''] Some description\n * @param {string} [property.icon=''] Class name. If exists no text will be displayed\n * @param {Boolean} [property.preview=false] Show layers preview. Only for stack type\n * @param {string} [property.functionName=''] Indicates if value need to be wrapped in some function, for istance `transform: rotate(90deg)`\n * @param {Array} [property.properties=[]] Nested properties for composite and stack type\n * @param {Array} [property.layers=[]] Layers for stack properties\n * @param {Array} [property.list=[]] List of possible options for radio and select types\n * @param {Object} [options={}] Options\n * @return {Property|null} Added Property or `null` in case sector doesn't exist\n * @example\n * var property = styleManager.addProperty('mySector',{\n * name: 'Minimum height',\n * property: 'min-height',\n * type: 'select',\n * defaults: '100px',\n * list: [{\n * value: '100px',\n * name: '100',\n * },{\n * value: '200px',\n * name: '200',\n * }],\n * }, { at: 0 });\n * // With `at: 0` we place the new property at the beginning of the collection\n */\n addProperty(sectorId, property, opts = {}) {\n const sector = this.getSector(sectorId, { warn: 1 });\n let prop = null;\n if (sector) prop = sector.get('properties').add(property, opts);\n\n return prop;\n },\n\n /**\n * Get property by its CSS name and sector id\n * @param {string} sectorId Sector id\n * @param {string} name CSS property name (or id), eg. 'min-height'\n * @return {Property|null}\n * @example\n * var property = styleManager.getProperty('mySector','min-height');\n */\n getProperty(sectorId, name) {\n const sector = this.getSector(sectorId, { warn: 1 });\n let prop;\n\n if (sector) {\n prop = sector\n .get('properties')\n .filter(\n prop => prop.get('property') === name || prop.get('id') === name\n )[0];\n }\n\n return prop || null;\n },\n\n /**\n * Remove a property from the sector\n * @param {string} sectorId Sector id\n * @param {string} name CSS property name, eg. 'min-height'\n * @return {Property} Removed property\n * @example\n * const property = styleManager.removeProperty('mySector', 'min-height');\n */\n removeProperty(sectorId, name) {\n const props = this.getProperties(sectorId);\n return props && props.remove(this.getProperty(sectorId, name));\n },\n\n /**\n * Get properties of the sector\n * @param {string} sectorId Sector id\n * @return {Properties} Collection of properties\n * @example\n * var properties = styleManager.getProperties('mySector');\n */\n getProperties(sectorId) {\n let props = null;\n const sector = this.getSector(sectorId, { warn: 1 });\n if (sector) props = sector.get('properties');\n\n return props;\n },\n\n /**\n * Get what to style inside Style Manager. If you select the component\n * without classes the entity is the Component itself and all changes will\n * go inside its 'style' property. Otherwise, if the selected component has\n * one or more classes, the function will return the corresponding CSS Rule\n * @param {Model} model\n * @return {Model}\n */\n getModelToStyle(model, options = {}) {\n const em = c.em;\n const { skipAdd } = options;\n const classes = model.get('classes');\n const id = model.getId();\n\n if (em) {\n const config = em.getConfig();\n const um = em.get('UndoManager');\n const cssC = em.get('CssComposer');\n const sm = em.get('SelectorManager');\n const smConf = sm ? sm.getConfig() : {};\n const state = !config.devicePreviewMode ? em.get('state') : '';\n const valid = classes.getStyleable();\n const hasClasses = valid.length;\n const useClasses = !smConf.componentFirst || options.useClasses;\n const addOpts = { noCount: 1 };\n const opts = { state, addOpts };\n let rule;\n\n // I stop undo manager here as after adding the CSSRule (generally after\n // selecting the component) and calling undo() it will remove the rule from\n // the collection, therefore updating it in style manager will not affect it\n // #268\n um.stop();\n\n if (hasClasses && useClasses) {\n const deviceW = em.getCurrentMedia();\n rule = cssC.get(valid, state, deviceW);\n\n if (!rule && !skipAdd) {\n rule = cssC.add(valid, state, deviceW, {}, addOpts);\n }\n } else if (config.avoidInlineStyle) {\n rule = cssC.getIdRule(id, opts);\n !rule && !skipAdd && (rule = cssC.setIdRule(id, {}, opts));\n if (model.is('wrapper')) rule.set('wrapper', 1);\n }\n\n rule && (model = rule);\n um.start();\n }\n\n return model;\n },\n\n /**\n * Add new property type\n * @param {string} id Type ID\n * @param {Object} definition Definition of the type. Each definition contains\n * `model` (business logic), `view` (presentation logic)\n * and `isType` function which recognize the type of the\n * passed entity\n *@example\n * styleManager.addType('my-custom-prop', {\n * create({ props, change }) {\n * const el = document.createElement('div');\n * el.innerHTML = '';\n * const inputEl = el.querySelector('.my-input');\n * inputEl.addEventListener('change', event => change({ event })); // change will trigger the emit\n * inputEl.addEventListener('input', event => change({ event, complete: false }));\n * return el;\n * },\n * emit({ props, updateStyle }, { event, complete }) {\n * const { value } = event.target;\n * const valueRes = value + 'px';\n * // Pass a string value for the exact CSS property or an object containing multiple properties\n * // eg. updateStyle({ [props.property]: valueRes, color: 'red' });\n * updateStyle(valueRes, { complete });\n * },\n * update({ value, el }) {\n * el.querySelector('.my-input').value = parseInt(value, 10);\n * },\n * destroy() {\n * // In order to prevent memory leaks, use this method to clean, eventually, created instances, global event listeners, etc.\n * }\n *})\n */\n addType(id, definition) {\n properties.addType(id, definition);\n },\n\n /**\n * Get type\n * @param {string} id Type ID\n * @return {Object} Type definition\n */\n getType(id) {\n return properties.getType(id);\n },\n\n /**\n * Get all types\n * @return {Array}\n */\n getTypes() {\n return properties.getTypes();\n },\n\n /**\n * Create new property from type\n * @param {string} id Type ID\n * @param {Object} [options={}] Options\n * @param {Object} [options.model={}] Custom model object\n * @param {Object} [options.view={}] Custom view object\n * @return {PropertyView}\n * @example\n * const propView = styleManager.createType('integer', {\n * model: {units: ['px', 'rem']}\n * });\n * propView.render();\n * propView.model.on('change:value', ...);\n * someContainer.appendChild(propView.el);\n */\n createType(id, { model = {}, view = {} } = {}) {\n const type = this.getType(id);\n\n if (type) {\n return new type.view({\n model: new type.model(model),\n config: c,\n ...view\n });\n }\n },\n\n /**\n * Select different target for the Style Manager.\n * It could be a Component, CSSRule, or a string of any CSS selector\n * @param {Component|CSSRule|String} target\n * @return {Styleable} A Component or CSSRule\n */\n setTarget(target, opts) {\n return SectView.setTarget(target, opts);\n },\n\n getEmitter() {\n return SectView.propTarget;\n },\n\n /**\n * Render sectors and properties\n * @return {HTMLElement}\n * @private\n * */\n render() {\n return SectView.render().el;\n },\n\n _logNoSector(sectorId) {\n const { em } = this;\n em && em.logWarning(`'${sectorId}' sector not found`);\n },\n\n destroy() {\n [properties, sectors].forEach(coll => {\n coll.reset();\n coll.stopListening();\n });\n SectView.remove();\n [c, properties, sectors, SectView].forEach(i => (i = {}));\n this.em = {};\n }\n };\n};\n","export default {\n // Style prefix\n stylePrefix: 'cm-',\n\n inlineCss: false\n};\n","import Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n build(model, opts = {}) {\n const models = model.components();\n const htmlOpts = {};\n const { em } = opts;\n\n // Remove unnecessary IDs\n if (opts.cleanId && em) {\n const rules = em.get('CssComposer').getAll();\n const idRules = rules\n .toJSON()\n .map(rule => {\n const sels = rule.selectors;\n const sel = sels && sels.length === 1 && sels.models[0];\n return sel && sel.isId() && sel.get('name');\n })\n .filter(i => i);\n\n htmlOpts.attributes = (mod, attrs) => {\n const { id } = attrs;\n if (\n id &&\n id[0] === 'i' && // all autogenerated IDs start with 'i'\n !mod.get('script') && // if the component has script, we have to leave the ID\n !mod.get('attributes').id && // id is not intentionally in attributes\n idRules.indexOf(id) < 0 // we shouldn't have any rule with this ID\n ) {\n delete attrs.id;\n }\n return attrs;\n };\n }\n\n if (opts.exportWrapper) {\n return model.toHTML({\n ...htmlOpts,\n ...(opts.wrapperIsBody && { tag: 'body' })\n });\n }\n\n return this.buildModels(models, htmlOpts);\n },\n\n buildModels(models, opts = {}) {\n let code = '';\n models.forEach(mod => (code += mod.toHTML(opts)));\n return code;\n }\n});\n","import { each } from 'underscore';\nimport Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n /** @inheritdoc */\n build(model) {\n var json = model.toJSON();\n this.beforeEach(json);\n\n each(\n json,\n function(v, attr) {\n var obj = json[attr];\n if (obj instanceof Backbone.Model) {\n json[attr] = this.build(obj);\n } else if (obj instanceof Backbone.Collection) {\n var coll = obj;\n json[attr] = [];\n if (coll.length) {\n coll.each(function(el, index) {\n json[attr][index] = this.build(el);\n }, this);\n }\n }\n },\n this\n );\n\n return json;\n },\n\n /**\n * Execute on each object\n * @param {Object} obj\n */\n beforeEach(obj) {\n delete obj.status;\n }\n});\n","import { extend } from 'underscore';\nimport Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n mapModel(model) {\n var code = '';\n var script = model.get('script-export') || model.get('script');\n var type = model.get('type');\n var comps = model.get('components');\n var id = model.getId();\n\n if (script) {\n // If the component has scripts we need to expose his ID\n var attr = model.get('attributes');\n attr = extend({}, attr, { id });\n model.set('attributes', attr, { silent: 1 });\n var scrStr = model.getScriptString(script);\n const scrProps = model.get('script-props');\n\n // If the script was updated, I'll put its code in a separate container\n if (model.get('scriptUpdated') && !scrProps) {\n this.mapJs[type + '-' + id] = { ids: [id], code: scrStr };\n } else {\n let props;\n const mapType = this.mapJs[type];\n\n if (scrProps) {\n props = model.__getScriptProps();\n }\n\n if (mapType) {\n mapType.ids.push(id);\n if (props) mapType.props[id] = props;\n } else {\n const res = { ids: [id], code: scrStr };\n if (props) res.props = { [id]: props };\n this.mapJs[type] = res;\n }\n }\n }\n\n comps.each(function(model) {\n code += this.mapModel(model);\n }, this);\n\n return code;\n },\n\n build(model) {\n this.mapJs = {};\n this.mapModel(model);\n let code = '';\n\n for (let type in this.mapJs) {\n const mapType = this.mapJs[type];\n\n if (mapType.props) {\n code += `\n var props = ${JSON.stringify(mapType.props)};\n var ids = Object.keys(props).map(function(id) { return '#'+id }).join(',');\n var els = document.querySelectorAll(ids);\n for (var i = 0, len = els.length; i < len; i++) {\n var el = els[i];\n (${mapType.code}.bind(el))(props[el.id]);\n }`;\n } else {\n // Deprecated\n const ids = '#' + mapType.ids.join(', #');\n code += `\n var items = document.querySelectorAll('${ids}');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){\\n${mapType.code}\\n}.bind(items[i]))();\n }`;\n }\n }\n\n return code;\n }\n});\n","import { bindAll } from 'underscore';\nimport Backbone from 'backbone';\nimport CodeMirror from 'codemirror/lib/codemirror';\nimport 'codemirror/mode/htmlmixed/htmlmixed';\nimport 'codemirror/mode/css/css';\nimport 'codemirror-formatting';\n\nexport default Backbone.Model.extend({\n CodeMirror,\n\n defaults: {\n input: '',\n label: '',\n codeName: '',\n theme: 'hopscotch',\n readOnly: true,\n lineNumbers: true\n },\n\n /** @inheritdoc */\n init(el) {\n bindAll(this, 'onChange');\n this.editor = CodeMirror.fromTextArea(el, {\n dragDrop: false,\n lineWrapping: true,\n mode: this.get('codeName'),\n ...this.attributes\n });\n this.element = el;\n this.editor.on('change', this.onChange);\n\n return this;\n },\n\n onChange() {\n this.trigger('update', this);\n },\n\n getEditor() {\n return this.editor;\n },\n\n /**\n * The element where the viewer is attached\n * @return {HTMLElement}\n */\n getElement() {\n return this.element;\n },\n\n /**\n * Set the element which contains the viewer attached.\n * Generally, it should be just a textarea, but some editor might require\n * a container for it some in that case this method can be used\n * @param {HTMLElement} el\n * @return {self}\n */\n setElement(el) {\n this.element = el;\n return this;\n },\n\n /**\n * Refresh the viewer\n * @return {self}\n */\n refresh() {\n this.getEditor().refresh();\n return this;\n },\n\n /**\n * Focus the viewer\n * @return {self}\n */\n focus() {\n this.getEditor().focus();\n return this;\n },\n\n getContent() {\n const ed = this.getEditor();\n return ed && ed.getValue();\n },\n\n /** @inheritdoc */\n setContent(v, opts = {}) {\n const { editor } = this;\n if (!editor) return;\n editor.setValue(v);\n\n if (editor.autoFormatRange) {\n CodeMirror.commands.selectAll(editor);\n editor.autoFormatRange(editor.getCursor(true), editor.getCursor(false));\n CodeMirror.commands.goDocStart(editor);\n }\n\n !opts.noRefresh && setTimeout(() => this.refresh());\n }\n});\n","import { template } from 'underscore';\nimport Backbone from 'backbone';\n\nexport default Backbone.View.extend({\n template: template(`\n
editor\" id=\"<%= pfx %><%= codeName %>\">\n \t
title\"><%= label %>
\n \t
code\">
\n
`),\n\n initialize(o) {\n this.config = o.config || {};\n this.pfx = this.config.stylePrefix;\n },\n\n render() {\n var obj = this.model.toJSON();\n obj.pfx = this.pfx;\n this.$el.html(this.template(obj));\n this.$el.attr('class', this.pfx + 'editor-c');\n this.$el.find('#' + this.pfx + 'code').append(this.model.get('input'));\n return this;\n }\n});\n","/**\n * - [addGenerator](#addgenerator)\n * - [getGenerator](#getgenerator)\n * - [getGenerators](#getgenerators)\n * - [addViewer](#addviewer)\n * - [getViewer](#getviewer)\n * - [getViewers](#getviewers)\n * - [updateViewer](#updateviewer)\n * - [getCode](#getcode)\n *\n *\n * Before using methods you should get first the module from the editor instance, in this way:\n *\n * ```js\n * var codeManager = editor.CodeManager;\n * ```\n *\n * @module CodeManager\n */\nimport { isUndefined } from 'underscore';\nimport defaults from './config/config';\nimport gHtml from './model/HtmlGenerator';\nimport gCss from './model/CssGenerator';\nimport gJson from './model/JsonGenerator';\nimport gJs from './model/JsGenerator';\nimport eCM from './model/CodeMirrorEditor';\nimport editorView from './view/EditorView';\n\nexport default () => {\n var c = {};\n var generators = {},\n defGenerators = {},\n viewers = {},\n defViewers = {};\n\n const defaultViewer = 'CodeMirror';\n\n return {\n getConfig() {\n return c;\n },\n\n config: c,\n\n EditorView: editorView,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'CodeManager',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n defGenerators.html = new gHtml();\n defGenerators.css = new gCss();\n defGenerators.json = new gJson();\n defGenerators.js = new gJs();\n defViewers.CodeMirror = new eCM();\n this.loadDefaultGenerators().loadDefaultViewers();\n\n return this;\n },\n\n /**\n * Add new code generator to the collection\n * @param {string} id Code generator ID\n * @param {Object} generator Code generator wrapper\n * @param {Function} generator.build Function that builds the code\n * @return {this}\n * @example\n * codeManager.addGenerator('html7',{\n * build: function(model){\n * return 'myCode';\n * }\n * });\n * */\n addGenerator(id, generator) {\n generators[id] = generator;\n return this;\n },\n\n /**\n * Get code generator by id\n * @param {string} id Code generator ID\n * @return {Object|null}\n * @example\n * var generator = codeManager.getGenerator('html7');\n * generator.build = function(model){\n * //extend\n * };\n * */\n getGenerator(id) {\n return generators[id] || null;\n },\n\n /**\n * Returns all code generators\n * @return {Array}\n * */\n getGenerators() {\n return generators;\n },\n\n /**\n * Add new code viewer\n * @param {string} id Code viewer ID\n * @param {Object} viewer Code viewer wrapper\n * @param {Function} viewer.init Set element on which viewer will be displayed\n * @param {Function} viewer.setContent Set content to the viewer\n * @return {this}\n * @example\n * codeManager.addViewer('ace',{\n * init: function(el){\n * var ace = require('ace-editor');\n * this.editor = ace.edit(el.id);\n * },\n * setContent: function(code){\n * this.editor.setValue(code);\n * }\n * });\n * */\n addViewer(id, viewer) {\n viewers[id] = viewer;\n return this;\n },\n\n /**\n * Get code viewer by id\n * @param {string} id Code viewer ID\n * @return {Object|null}\n * @example\n * var viewer = codeManager.getViewer('ace');\n * */\n getViewer(id) {\n return viewers[id] || null;\n },\n\n /**\n * Returns all code viewers\n * @return {Array}\n * */\n getViewers() {\n return viewers;\n },\n\n createViewer(opts = {}) {\n const type = !isUndefined(opts.type) ? opts.type : defaultViewer;\n const viewer = this.getViewer(type) && this.getViewer(type).clone();\n const cont = document.createElement('div');\n const txtarea = document.createElement('textarea');\n cont.appendChild(txtarea);\n viewer.set(opts);\n viewer.init(txtarea);\n viewer.setElement(cont);\n\n return viewer;\n },\n\n /**\n * Update code viewer content\n * @param {Object} viewer Viewer instance\n * @param {string} code Code string\n * @example\n * var AceViewer = codeManager.getViewer('ace');\n * // ...\n * var viewer = AceViewer.init(el);\n * // ...\n * codeManager.updateViewer(AceViewer, 'code');\n * */\n updateViewer(viewer, code) {\n viewer.setContent(code);\n },\n\n /**\n * Get code from model\n * @param {Object} model Any kind of model that will be passed to the build method of generator\n * @param {string} genId Code generator id\n * @param {Object} [opt] Options\n * @return {string}\n * @example\n * var codeStr = codeManager.getCode(model, 'html');\n * */\n getCode(model, genId, opt = {}) {\n opt.em = c.em;\n var generator = this.getGenerator(genId);\n return generator ? generator.build(model, opt) : '';\n },\n\n /**\n * Load default code generators\n * @return {this}\n * @private\n * */\n loadDefaultGenerators() {\n for (var id in defGenerators) this.addGenerator(id, defGenerators[id]);\n\n return this;\n },\n\n /**\n * Load default code viewers\n * @return {this}\n * @private\n * */\n loadDefaultViewers() {\n for (var id in defViewers) this.addViewer(id, defViewers[id]);\n\n return this;\n },\n\n destroy() {\n [c, generators, defGenerators, viewers, defViewers].forEach(\n i => (i = {})\n );\n }\n };\n};\n","export default {\n devices: []\n};\n","import Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n idAttribute: 'name',\n\n defaults: {\n name: '',\n\n // Width to set for the editor iframe\n width: null,\n\n // Height to set for the editor iframe\n height: '',\n\n // The width which will be used in media queries,\n // If empty the width will be used\n widthMedia: null,\n\n // Setup the order of media queries\n priority: null\n },\n\n initialize() {\n this.get('widthMedia') === null &&\n this.set('widthMedia', this.get('width'));\n this.get('width') === null && this.set('width', this.get('widthMedia'));\n !this.get('priority') &&\n this.set('priority', parseFloat(this.get('widthMedia')) || 0);\n const toCheck = ['width', 'height', 'widthMedia'];\n toCheck.forEach(prop => this.checkUnit(prop));\n },\n\n checkUnit(prop) {\n const pr = this.get(prop) || '';\n const noUnit = (parseFloat(pr) || 0).toString() === pr.toString();\n noUnit && this.set(prop, `${pr}px`);\n }\n});\n","import Backbone from 'backbone';\nimport Device from './Device';\n\nexport default Backbone.Collection.extend({\n model: Device,\n\n comparator: (left, right) => {\n const max = Number.MAX_VALUE;\n return (right.get('priority') || max) - (left.get('priority') || max);\n },\n\n getSorted() {\n return this.sort();\n }\n});\n","import { template } from 'underscore';\nimport Backbone from 'backbone';\n\nexport default Backbone.View.extend({\n template: template(`\n
device-label\"><%= deviceLabel %>
\n
field <%= ppfx %>select\">\n input-holder\">\n \n \n
sel-arrow\">\n
d-s-arrow\">
\n
\n
\n `),\n\n events: {\n change: 'updateDevice'\n },\n\n initialize(o) {\n this.config = o.config || {};\n this.em = this.config.em;\n this.ppfx = this.config.pStylePrefix || '';\n this.events['click .' + this.ppfx + 'add-trasp'] = this.startAdd;\n this.listenTo(this.em, 'change:device', this.updateSelect);\n this.delegateEvents();\n },\n\n /**\n * Start adding new device\n * @return {[type]} [description]\n * @private\n */\n startAdd() {},\n\n /**\n * Update device of the editor\n * @private\n */\n updateDevice() {\n var em = this.em;\n if (em) {\n var devEl = this.devicesEl;\n var val = devEl ? devEl.val() : '';\n em.set('device', val);\n }\n },\n\n /**\n * Update select value on device update\n * @private\n */\n updateSelect() {\n var em = this.em;\n var devEl = this.devicesEl;\n if (em && em.getDeviceModel && devEl) {\n var device = em.getDeviceModel();\n var name = device ? device.get('name') : '';\n devEl.val(name);\n }\n },\n\n /**\n * Return devices options\n * @return {string} String of options\n * @private\n */\n getOptions() {\n const { collection, em } = this;\n let result = '';\n\n collection.each(device => {\n const { name, id } = device.attributes;\n const label = (em && em.t && em.t(`deviceManager.devices.${id}`)) || name;\n result += ``;\n });\n\n return result;\n },\n\n render() {\n const { em, ppfx, $el, el } = this;\n $el.html(\n this.template({\n ppfx,\n deviceLabel: em && em.t && em.t('deviceManager.device')\n })\n );\n this.devicesEl = $el.find(`.${ppfx}devices`);\n this.devicesEl.append(this.getOptions());\n el.className = `${ppfx}devices-c`;\n return this;\n }\n});\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/device_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * deviceManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const deviceManager = editor.DeviceManager;\n * ```\n *\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getAll)\n *\n * @module DeviceManager\n */\nimport defaults from './config/config';\nimport Devices from './model/Devices';\nimport DevicesView from './view/DevicesView';\n\nexport default () => {\n var c = {};\n var devices, view;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'DeviceManager',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @param {Array} [config.devices=[]] Default devices\n * @example\n * ...\n * {\n * devices: [\n * {name: 'Desktop', width: ''}\n * {name: 'Tablet', width: '991px'}\n * ],\n * }\n * ...\n * @return {this}\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n devices = new Devices();\n (c.devices || []).forEach(dv => this.add(dv.id || dv.name, dv.width, dv));\n view = new DevicesView({\n collection: devices,\n config: c\n });\n return this;\n },\n\n /**\n * Add new device to the collection. URLs are supposed to be unique\n * @param {String} id Device id\n * @param {String} width Width of the device\n * @param {Object} [opts] Custom options\n * @returns {Device} Added device\n * @example\n * deviceManager.add('tablet', '900px');\n * deviceManager.add('tablet2', '900px', {\n * height: '300px',\n * // At first, GrapesJS tries to localize the name by device id.\n * // In case is not found, the `name` property is used (or `id` if name is missing)\n * name: 'Tablet 2',\n * widthMedia: '810px', // the width that will be used for the CSS media\n * });\n */\n add(id, width, opts = {}) {\n const obj = {\n ...opts,\n id,\n name: opts.name || id,\n width: width\n };\n return devices.add(obj);\n },\n\n /**\n * Return device by name\n * @param {string} name Name of the device\n * @example\n * var device = deviceManager.get('Tablet');\n * console.log(JSON.stringify(device));\n * // {name: 'Tablet', width: '900px'}\n */\n get(name) {\n return devices.get(name);\n },\n\n /**\n * Return all devices\n * @return {Collection}\n * @example\n * var devices = deviceManager.getAll();\n * console.log(JSON.stringify(devices));\n * // [{name: 'Desktop', width: ''}, ...]\n */\n getAll() {\n return devices;\n },\n\n /**\n * Render devices\n * @return {string} HTML string\n * @private\n */\n render() {\n return view.render().el;\n },\n\n destroy() {\n devices.reset();\n devices.stopListening();\n view.remove();\n [devices, view].forEach(i => (i = null));\n c = {};\n }\n };\n};\n","export default {\n // Prefix identifier that will be used inside storing and loading\n id: 'gjs-',\n\n // Enable/Disable autosaving\n autosave: 1,\n\n // Indicates if load data inside editor after init\n autoload: 1,\n\n // Indicates which storage to use. Available: local | remote\n type: 'local',\n\n // If autosave enabled, indicates how many steps (general changes to structure)\n // need to be done before save. Useful with remoteStorage to reduce remote calls\n stepsBeforeSave: 1,\n\n //Enable/Disable components model (JSON format)\n storeComponents: 1,\n\n //Enable/Disable styles model (JSON format)\n storeStyles: 1,\n\n //Enable/Disable saving HTML template\n storeHtml: 1,\n\n //Enable/Disable saving CSS template\n storeCss: 1,\n\n // ONLY FOR LOCAL STORAGE\n // If enabled, checks if browser supports Local Storage\n checkLocal: 1,\n\n // ONLY FOR REMOTE STORAGE\n // Custom parameters to pass with the remote storage request, eg. csrf token\n params: {},\n\n // Custom headers for the remote storage request\n headers: {},\n\n // Endpoint where to save all stuff\n urlStore: '',\n\n // Endpoint where to fetch data\n urlLoad: '',\n\n //Callback before request\n beforeSend(jqXHR, settings) {},\n\n //Callback after request\n onComplete(jqXHR, status) {},\n\n // set contentType paramater of $.ajax\n // true: application/json; charset=utf-8'\n // false: 'x-www-form-urlencoded'\n contentTypeJson: true,\n\n credentials: 'include',\n\n // Pass custom options to fetch API (remote storage)\n // You can pass a simple object: { someOption: 'someValue' }\n // or a function wich returns and object to add:\n // currentOpts => {\n // return currentOpts.method === 'post' ? { method: 'patch' } : {};\n // }\n fetchOptions: ''\n};\n","import Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n defaults: {\n checkLocal: true\n },\n\n /**\n * @private\n */\n store(data, clb) {\n this.checkStorageEnvironment();\n\n for (var key in data) localStorage.setItem(key, data[key]);\n\n if (typeof clb == 'function') {\n clb();\n }\n },\n\n /**\n * @private\n */\n load(keys, clb) {\n this.checkStorageEnvironment();\n var result = {};\n\n for (var i = 0, len = keys.length; i < len; i++) {\n var value = localStorage.getItem(keys[i]);\n if (value) result[keys[i]] = value;\n }\n\n if (typeof clb == 'function') {\n clb(result);\n }\n\n return result;\n },\n\n /**\n * @private\n */\n remove(keys) {\n this.checkStorageEnvironment();\n\n for (var i = 0, len = keys.length; i < len; i++)\n localStorage.removeItem(keys[i]);\n },\n\n /**\n * Check storage environment\n * @private\n * */\n checkStorageEnvironment() {\n if (this.get('checkLocal') && !localStorage)\n console.warn(\"Your browser doesn't support localStorage\");\n }\n});\n","import Backbone from 'backbone';\nimport fetch from 'utils/fetch';\nimport { isUndefined, isFunction } from 'underscore';\n\nexport default Backbone.Model.extend({\n fetch,\n\n defaults: {\n urlStore: '',\n urlLoad: '',\n params: {},\n beforeSend() {},\n onComplete() {},\n contentTypeJson: false,\n credentials: 'include',\n fetchOptions: ''\n },\n\n /**\n * Triggered before the request is started\n * @private\n */\n onStart() {\n const em = this.get('em');\n const before = this.get('beforeSend');\n before && before();\n },\n\n /**\n * Triggered on request error\n * @param {Object} err Error\n * @param {Function} [clbErr] Error callback\n * @private\n */\n onError(err, clbErr) {\n if (clbErr) {\n clbErr(err);\n } else {\n const em = this.get('em');\n console.error(err);\n em && em.trigger('storage:error', err);\n }\n },\n\n /**\n * Triggered on request response\n * @param {string} text Response text\n * @private\n */\n onResponse(text, clb) {\n const em = this.get('em');\n const complete = this.get('onComplete');\n const typeJson = this.get('contentTypeJson');\n const parsable = text && typeof text === 'string';\n const res = typeJson && parsable ? JSON.parse(text) : text;\n complete && complete(res);\n clb && clb(res);\n em && em.trigger('storage:response', res);\n },\n\n store(data, clb, clbErr) {\n const body = {};\n\n for (let key in data) {\n body[key] = data[key];\n }\n\n this.request(this.get('urlStore'), { body }, clb, clbErr);\n },\n\n load(keys, clb, clbErr) {\n this.request(this.get('urlLoad'), { method: 'get' }, clb, clbErr);\n },\n\n /**\n * Execute remote request\n * @param {string} url Url\n * @param {Object} [opts={}] Options\n * @param {Function} [clb=null] Callback\n * @param {Function} [clbErr=null] Error callback\n * @private\n */\n request(url, opts = {}, clb = null, clbErr = null) {\n const typeJson = this.get('contentTypeJson');\n const headers = this.get('headers') || {};\n const params = this.get('params');\n const reqHead = 'X-Requested-With';\n const typeHead = 'Content-Type';\n const bodyObj = opts.body || {};\n let fetchOptions;\n let body;\n\n for (let param in params) {\n bodyObj[param] = params[param];\n }\n\n if (isUndefined(headers[reqHead])) {\n headers[reqHead] = 'XMLHttpRequest';\n }\n\n // With `fetch`, have to send FormData without any 'Content-Type'\n // https://stackoverflow.com/questions/39280438/fetch-missing-boundary-in-multipart-form-data-post\n\n if (isUndefined(headers[typeHead]) && typeJson) {\n headers[typeHead] = 'application/json; charset=utf-8';\n }\n\n if (typeJson) {\n body = JSON.stringify(bodyObj);\n } else {\n body = new FormData();\n\n for (let bodyKey in bodyObj) {\n body.append(bodyKey, bodyObj[bodyKey]);\n }\n }\n fetchOptions = {\n method: opts.method || 'post',\n credentials: this.get('credentials'),\n headers\n };\n\n // Body should only be included on POST method\n if (fetchOptions.method === 'post') {\n fetchOptions.body = body;\n }\n\n const fetchOpts = this.get('fetchOptions') || {};\n const addOpts = isFunction(fetchOpts)\n ? fetchOpts(fetchOptions)\n : fetchOptions;\n\n this.onStart();\n this.fetch(url, {\n ...fetchOptions,\n ...(addOpts || {})\n })\n .then(res =>\n ((res.status / 200) | 0) == 1\n ? res.text()\n : res.text().then(text => Promise.reject(text))\n )\n .then(text => this.onResponse(text, clb))\n .catch(err => this.onError(err, clbErr));\n }\n});\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/storage_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * storageManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const storageManager = editor.StorageManager;\n * ```\n *\n * * [getConfig](#getconfig)\n * * [isAutosave](#isautosave)\n * * [setAutosave](#setautosave)\n * * [getStepsBeforeSave](#getstepsbeforesave)\n * * [setStepsBeforeSave](#setstepsbeforesave)\n * * [setStepsBeforeSave](#setstepsbeforesave)\n * * [getStorages](#getstorages)\n * * [getCurrent](#getcurrent)\n * * [getCurrentStorage](#getcurrentstorage)\n * * [setCurrent](#setcurrent)\n * * [add](#add)\n * * [get](#get)\n * * [store](#store)\n * * [load](#load)\n *\n * @module StorageManager\n */\n\nimport defaults from './config/config';\nimport LocalStorage from './model/LocalStorage';\nimport RemoteStorage from './model/RemoteStorage';\n\nconst eventStart = 'storage:start';\nconst eventEnd = 'storage:end';\nconst eventError = 'storage:error';\n\nexport default () => {\n var c = {};\n let em;\n var storages = {};\n var defaultStorages = {};\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'StorageManager',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @param {string} [config.id='gjs-'] The prefix for the fields, useful to differentiate storing/loading\n * with multiple editors on the same page. For example, in local storage, the item of HTML will be saved like 'gjs-html'\n * @param {Boolean} [config.autosave=true] Indicates if autosave mode is enabled, works in conjunction with stepsBeforeSave\n * @param {number} [config.stepsBeforeSave=1] If autosave enabled, indicates how many steps/changes are necessary\n * before autosave is triggered\n * @param {string} [config.type='local'] Default storage type. Available: 'local' | 'remote' | ''(do not store)\n * @private\n * @example\n * ...\n * {\n * autosave: false,\n * type: 'remote',\n * }\n * ...\n */\n init(config = {}) {\n c = { ...defaults, ...config };\n em = c.em;\n if (c._disable) c.type = 0;\n defaultStorages.remote = new RemoteStorage(c);\n defaultStorages.local = new LocalStorage(c);\n c.currentStorage = c.type;\n this.loadDefaultProviders().setCurrent(c.type);\n return this;\n },\n\n /**\n * Get configuration object\n * @return {Object}\n * */\n getConfig() {\n return c;\n },\n\n /**\n * Checks if autosave is enabled\n * @return {Boolean}\n * */\n isAutosave() {\n return !!c.autosave;\n },\n\n /**\n * Set autosave value\n * @param {Boolean} v\n * @return {this}\n * */\n setAutosave(v) {\n c.autosave = !!v;\n return this;\n },\n\n /**\n * Returns number of steps required before trigger autosave\n * @return {number}\n * */\n getStepsBeforeSave() {\n return c.stepsBeforeSave;\n },\n\n /**\n * Set steps required before trigger autosave\n * @param {number} v\n * @return {this}\n * */\n setStepsBeforeSave(v) {\n c.stepsBeforeSave = v;\n return this;\n },\n\n /**\n * Add new storage\n * @param {string} id Storage ID\n * @param {Object} storage Storage wrapper\n * @param {Function} storage.load Load method\n * @param {Function} storage.store Store method\n * @return {this}\n * @example\n * storageManager.add('local2', {\n * load: function(keys, clb, clbErr) {\n * var res = {};\n * for (var i = 0, len = keys.length; i < len; i++){\n * var v = localStorage.getItem(keys[i]);\n * if(v) res[keys[i]] = v;\n * }\n * clb(res); // might be called inside some async method\n * // In case of errors...\n * // clbErr('Went something wrong');\n * },\n * store: function(data, clb, clbErr) {\n * for(var key in data)\n * localStorage.setItem(key, data[key]);\n * clb(); // might be called inside some async method\n * }\n * });\n * */\n add(id, storage) {\n storages[id] = storage;\n return this;\n },\n\n /**\n * Returns storage by id\n * @param {string} id Storage ID\n * @return {Object|null}\n * */\n get(id) {\n return storages[id] || null;\n },\n\n /**\n * Returns all storages\n * @return {Array}\n * */\n getStorages() {\n return storages;\n },\n\n /**\n * Returns current storage type\n * @return {string}\n * */\n getCurrent() {\n return c.currentStorage;\n },\n\n /**\n * Set current storage type\n * @param {string} id Storage ID\n * @return {this}\n * */\n setCurrent(id) {\n c.currentStorage = id;\n return this;\n },\n\n /**\n * Store key-value resources in the current storage\n * @param {Object} data Data in key-value format, eg. {item1: value1, item2: value2}\n * @param {Function} clb Callback function\n * @return {Object|null}\n * @example\n * storageManager.store({item1: value1, item2: value2});\n * */\n store(data, clb) {\n const st = this.get(this.getCurrent());\n const toStore = {};\n this.onStart('store', data);\n\n for (let key in data) {\n toStore[c.id + key] = data[key];\n }\n\n return st\n ? st.store(\n toStore,\n res => {\n clb && clb(res);\n this.onEnd('store', res);\n },\n err => {\n this.onError('store', err);\n }\n )\n : null;\n },\n\n /**\n * Load resource from the current storage by keys\n * @param {string|Array} keys Keys to load\n * @param {Function} clb Callback function\n * @example\n * storageManager.load(['item1', 'item2'], res => {\n * // res -> {item1: value1, item2: value2}\n * });\n * storageManager.load('item1', res => {\n * // res -> {item1: value1}\n * });\n * */\n load(keys, clb) {\n var st = this.get(this.getCurrent());\n var keysF = [];\n var result = {};\n\n if (typeof keys === 'string') keys = [keys];\n this.onStart('load', keys);\n\n for (var i = 0, len = keys.length; i < len; i++) {\n keysF.push(c.id + keys[i]);\n }\n\n if (st) {\n st.load(\n keysF,\n res => {\n // Restore keys name\n var reg = new RegExp('^' + c.id + '');\n for (var itemKey in res) {\n var itemKeyR = itemKey.replace(reg, '');\n result[itemKeyR] = res[itemKey];\n }\n\n clb && clb(result);\n this.onEnd('load', result);\n },\n err => {\n clb && clb(result);\n this.onError('load', err);\n }\n );\n } else {\n clb && clb(result);\n }\n },\n\n /**\n * Load default storages\n * @return {this}\n * @private\n * */\n loadDefaultProviders() {\n for (var id in defaultStorages) this.add(id, defaultStorages[id]);\n return this;\n },\n\n /**\n * Get current storage\n * @return {Storage}\n * */\n getCurrentStorage() {\n return this.get(this.getCurrent());\n },\n\n /**\n * On start callback\n * @private\n */\n onStart(ctx, data) {\n if (em) {\n em.trigger(eventStart);\n ctx && em.trigger(`${eventStart}:${ctx}`, data);\n }\n },\n\n /**\n * On end callback\n * @private\n */\n onEnd(ctx, data) {\n if (em) {\n em.trigger(eventEnd);\n ctx && em.trigger(`${eventEnd}:${ctx}`, data);\n }\n },\n\n /**\n * On error callback\n * @private\n */\n onError(ctx, data) {\n if (em) {\n em.trigger(eventError, data);\n ctx && em.trigger(`${eventError}:${ctx}`, data);\n this.onEnd(ctx, data);\n }\n },\n\n /**\n * Check if autoload is possible\n * @return {Boolean}\n * @private\n * */\n canAutoload() {\n const storage = this.getCurrentStorage();\n return storage && this.getConfig().autoload;\n },\n\n destroy() {\n [c, em, storages, defaultStorages].forEach(i => (i = {}));\n }\n };\n};\n","export default {\n textTags: ['br', 'b', 'i', 'u', 'a', 'ul', 'ol'],\n\n // Custom CSS parser\n parserCss: null,\n\n // Custom HTML parser\n parserHtml: null\n};\n","import { keys } from 'underscore';\n\n// At-rules\n// https://developer.mozilla.org/it/docs/Web/API/CSSRule#Type_constants\nconst atRules = {\n 4: 'media',\n 5: 'font-face',\n 6: 'page',\n 7: 'keyframes',\n 11: 'counter-style',\n 12: 'supports',\n 13: 'document',\n 14: 'font-feature-values',\n 15: 'viewport'\n};\nconst atRuleKeys = keys(atRules);\nconst singleAtRules = ['5', '6', '11', '15'];\nconst singleAtRulesNames = ['font-face', 'page', 'counter-style', 'viewport'];\n\n/**\n * Parse selector string to array.\n * Only classe based are valid as CSS rules inside editor, not valid\n * selectors will be dropped as additional\n * It's ok with the last part of the string as state (:hover, :active)\n * @param {string} str Selectors string\n * @return {Object}\n * @example\n * var res = parseSelector('.test1, .test1.test2, .test2 .test3');\n * console.log(res);\n * // {\n * //result: [['test1'], ['test1', 'test2']],\n * //add: ['.test2 .test3']\n * //}\n */\nexport const parseSelector = (str = '') => {\n const add = [];\n const result = [];\n const sels = str.split(',');\n\n for (var i = 0, len = sels.length; i < len; i++) {\n var sel = sels[i].trim();\n\n // Will accept only concatenated classes and last\n // class might be with state (eg. :hover), nothing else.\n // Can also accept SINGLE ID selectors, eg. `#myid`, `#myid:hover`\n // Composed are not valid: `#myid.some-class`, `#myid.some-class:hover`\n if (\n /^(\\.{1}[\\w\\-]+)+(:{1,2}[\\w\\-()]+)?$/gi.test(sel) ||\n /^(#{1}[\\w\\-]+){1}(:{1,2}[\\w\\-()]+)?$/gi.test(sel)\n ) {\n var cls = sel.split('.').filter(Boolean);\n result.push(cls);\n } else {\n add.push(sel);\n }\n }\n\n return {\n result,\n add\n };\n};\n\n/**\n * Parse style declarations of the node\n * @param {CSSRule} node\n * @return {Object}\n */\nexport const parseStyle = node => {\n const stl = node.style;\n const style = {};\n\n for (var i = 0, len = stl.length; i < len; i++) {\n const propName = stl[i];\n const propValue = stl.getPropertyValue(propName);\n const important = stl.getPropertyPriority(propName);\n style[propName] = `${propValue}${important ? ` !${important}` : ''}`;\n }\n\n return style;\n};\n\n/**\n * Get the condition when possible\n * @param {CSSRule} node\n * @return {string}\n */\nexport const parseCondition = node => {\n const condition =\n node.conditionText ||\n (node.media && node.media.mediaText) ||\n node.name ||\n node.selectorText ||\n '';\n return condition.trim();\n};\n\n/**\n * Create node for the editor\n * @param {Array} selectors Array containing strings of classes\n * @param {Object} style Key-value object of style declarations\n * @return {Object}\n */\nexport const createNode = (selectors, style = {}, opts = {}) => {\n const node = {};\n const selLen = selectors.length;\n const lastClass = selectors[selLen - 1];\n const stateArr = lastClass ? lastClass.split(/:(.+)/) : [];\n const state = stateArr[1];\n const { atRule, selectorsAdd, mediaText } = opts;\n const singleAtRule = singleAtRulesNames.indexOf(atRule) >= 0;\n singleAtRule && (node.singleAtRule = 1);\n atRule && (node.atRuleType = atRule);\n selectorsAdd && (node.selectorsAdd = selectorsAdd);\n mediaText && (node.mediaText = mediaText);\n\n // Isolate the state from selectors\n if (state) {\n selectors[selLen - 1] = stateArr[0];\n node.state = state;\n stateArr.splice(stateArr.length - 1, 1);\n }\n\n node.selectors = selectors;\n node.style = style;\n\n return node;\n};\n\n/**\n * Fetch data from node\n * @param {StyleSheet|CSSRule} el\n * @return {Array}\n */\nexport const parseNode = el => {\n var result = [];\n var nodes = el.cssRules || [];\n\n for (var i = 0, len = nodes.length; i < len; i++) {\n const node = nodes[i];\n const type = node.type.toString();\n let singleAtRule = 0;\n let atRuleType = '';\n let condition = '';\n // keyText is for CSSKeyframeRule\n let sels = node.selectorText || node.keyText;\n const isSingleAtRule = singleAtRules.indexOf(type) >= 0;\n\n // Check if the node is an at-rule\n if (isSingleAtRule) {\n singleAtRule = 1;\n atRuleType = atRules[type];\n condition = parseCondition(node);\n } else if (atRuleKeys.indexOf(type) >= 0) {\n var subRules = parseNode(node);\n condition = parseCondition(node);\n\n for (var s = 0, lens = subRules.length; s < lens; s++) {\n var subRule = subRules[s];\n condition && (subRule.mediaText = condition);\n subRule.atRuleType = atRules[type];\n }\n result = result.concat(subRules);\n }\n\n if (!sels && !isSingleAtRule) continue;\n const style = parseStyle(node);\n const selsParsed = parseSelector(sels);\n const selsAdd = selsParsed.add;\n sels = selsParsed.result;\n\n let lastRule;\n // For each group of selectors\n for (var k = 0, len3 = sels.length; k < len3; k++) {\n const model = createNode(sels[k], style, {\n atRule: atRules[type]\n });\n result.push(model);\n lastRule = model;\n }\n\n // Need to push somewhere not class-based selectors, if some rule was\n // created will push them there, otherwise will create a new rule\n if (selsAdd.length) {\n var selsAddStr = selsAdd.join(', ');\n if (lastRule) {\n lastRule.selectorsAdd = selsAddStr;\n } else {\n const model = {\n selectors: [],\n selectorsAdd: selsAddStr,\n style\n };\n singleAtRule && (model.singleAtRule = singleAtRule);\n atRuleType && (model.atRuleType = atRuleType);\n condition && (model.mediaText = condition);\n result.push(model);\n }\n }\n // console.log('LAST PUSH', result[result.length - 1]);\n }\n\n return result;\n};\n\n/**\n * Parse CSS string and return the array of objects\n * @param {String} str CSS string\n * @return {Array} Array of objects for the definition of CSSRules\n */\nexport default str => {\n const el = document.createElement('style');\n el.innerHTML = str;\n\n // There is no .sheet before adding it to the \n document.head.appendChild(el);\n const sheet = el.sheet;\n document.head.removeChild(el);\n\n return parseNode(sheet);\n};\n","import { isString } from 'underscore';\nimport BrowserCssParser, {\n parseSelector,\n createNode\n} from './BrowserParserCss';\n\nexport default (config = {}) => ({\n /**\n * Parse CSS string to a desired model object\n * @param {String} str CSS string\n * @return {Array}\n */\n parse(str) {\n let result = [];\n const { parserCss, em } = config;\n const editor = em && em.get && em.get('Editor');\n const nodes = parserCss ? parserCss(str, editor) : BrowserCssParser(str);\n nodes.forEach(node => (result = result.concat(this.checkNode(node))));\n em && em.trigger('parse:css', { input: str, output: result });\n\n return result;\n },\n\n /**\n * Check the returned node from a custom parser and transforms it to\n * a valid object for the CSS composer\n * @return {[type]}\n */\n checkNode(node) {\n const { selectors, style } = node;\n\n if (isString(selectors)) {\n const nodes = [];\n const selsParsed = parseSelector(selectors);\n const classSets = selsParsed.result;\n const selectorsAdd = selsParsed.add.join(', ');\n const opts = {\n atRule: node.atRule,\n mediaText: node.params\n };\n\n if (classSets.length) {\n classSets.forEach(classSet => {\n nodes.push(createNode(classSet, style, opts));\n });\n } else {\n nodes.push(createNode([], style, opts));\n }\n\n if (selectorsAdd) {\n const lastNode = nodes[nodes.length - 1];\n lastNode.selectorsAdd = selectorsAdd;\n }\n\n node = nodes;\n }\n\n return node;\n }\n});\n","import defaults from './config/config';\nimport parserCss from './model/ParserCss';\nimport parserHtml from './model/ParserHtml';\n\nexport default () => {\n let conf = {};\n let pHtml, pCss;\n\n return {\n compTypes: '',\n\n parserCss: null,\n\n parserHtml: null,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Parser',\n\n /**\n * Get config object\n * @return {Object}\n */\n getConfig() {\n return conf;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @param {Array} [config.blocks=[]] Default blocks\n * @return {this}\n * @example\n * ...\n * {\n * blocks: [\n * {id:'h1-block' label: 'Heading', content:'

...

'},\n * ...\n * ],\n * }\n * ...\n */\n init(config = {}) {\n conf = { ...defaults, ...config };\n conf.Parser = this;\n pHtml = new parserHtml(conf);\n pCss = new parserCss(conf);\n this.em = conf.em;\n this.parserCss = pCss;\n this.parserHtml = pHtml;\n return this;\n },\n\n /**\n * Parse HTML string and return valid model\n * @param {string} str HTML string\n * @return {Object}\n */\n parseHtml(str) {\n const { em, compTypes } = this;\n pHtml.compTypes = em ? em.get('DomComponents').getTypes() : compTypes;\n return pHtml.parse(str, pCss);\n },\n\n /**\n * Parse CSS string and return valid model\n * @param {string} str CSS string\n * @return {Array}\n */\n parseCss(str) {\n return pCss.parse(str);\n },\n\n destroy() {\n [conf, pHtml, pCss].forEach(i => (i = {}));\n ['em', 'parserCss', 'parserHtml'].forEach(i => (this[i] = {}));\n }\n };\n};\n","export default {\n // Style prefix\n stylePrefix: 'clm-',\n\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n // Default selectors\n selectors: [],\n\n // States\n states: [{ name: 'hover' }, { name: 'active' }, { name: 'nth-of-type(2n)' }],\n\n // Custom selector name escaping strategy, eg.\n // name => name.replace(' ', '_')\n escapeName: 0,\n\n // Custom selected name strategy (the string you see after 'Selected')\n // ({ result, state, target }) => {\n // return `${result} - ID: ${target.getId()}`\n // }\n selectedName: 0,\n\n // Icon used to add new selector\n iconAdd:\n '',\n\n // Icon used to sync styles\n iconSync:\n '',\n\n // Icon to show when the selector is enabled\n iconTagOn:\n '',\n\n // Icon to show when the selector is disabled\n iconTagOff:\n '',\n\n // Icon used to remove the selector\n iconTagRemove:\n '',\n\n /**\n * Custom render function for the Select Manager\n * @example\n * render: ({ el, labelHead, labelStates, labelInfo, }) => {\n * // You can use the default `el` to extend/edit the current\n * // DOM element of the Selector Manager\n * const someEl = document.createElement('div');\n * // ...\n * el.appendChild(someEl);\n * // no need to return anything from the function\n *\n * // Create and return a new DOM element\n * const newEl = document.createElement('div');\n * // ...\n * return newEl;\n *\n * // Return an HTML string for a completely different layout.\n * // Use `data-*` attributes to make the module recognize some elements:\n * // `data-states` - Where to append state ``\n )\n );\n\n return result.join('');\n },\n\n /**\n * Add new model\n * @param {Object} model\n * @private\n */\n addNew(model) {\n this.addToClasses(model);\n },\n\n /**\n * Start tag creation\n * @param {Object} e\n * @private\n */\n startNewTag() {\n this.$addBtn.css({ display: 'none' });\n this.$input.show().focus();\n },\n\n /**\n * End tag creation\n * @param {Object} e\n * @private\n */\n endNewTag() {\n this.$addBtn.css({ display: '' });\n this.$input.hide().val('');\n },\n\n /**\n * Checks what to do on keyup event\n * @param {Object} e\n * @private\n */\n onInputKeyUp(e) {\n if (e.keyCode === 13) this.addNewTag(this.$input.val());\n else if (e.keyCode === 27) this.endNewTag();\n },\n\n checkStates() {\n const state = this.em.getState();\n const statesEl = this.getStates();\n statesEl && statesEl.val(state);\n },\n\n /**\n * Triggered when component is changed\n * @param {Object} e\n * @private\n */\n componentChanged: debounce(function({ targets } = {}) {\n this.updateSelection(targets);\n }),\n\n updateSelection(targets) {\n let trgs = targets || this.getTargets();\n trgs = isArray(trgs) ? trgs : [trgs];\n let selectors = [];\n\n if (trgs && trgs.length) {\n selectors = this.getCommonSelectors({ targets: trgs });\n this.checkSync({ validSelectors: selectors });\n }\n\n this.collection.reset(selectors);\n this.updateStateVis(trgs);\n\n return selectors;\n },\n\n getCommonSelectors({ targets, opts = {} } = {}) {\n const trgs = targets || this.getTargets();\n const selectors = trgs\n .map(tr => tr.getSelectors && tr.getSelectors().getValid(opts))\n .filter(i => i);\n return this._commonSelectors(...selectors);\n },\n\n _commonSelectors(...args) {\n if (!args.length) return [];\n if (args.length === 1) return args[0];\n if (args.length === 2)\n return args[0].filter(item => args[1].indexOf(item) >= 0);\n\n return args\n .slice(1)\n .reduce((acc, item) => this._commonSelectors(acc, item), args[0]);\n },\n\n checkSync: debounce(function() {\n const { $btnSyncEl, config, collection } = this;\n const target = this.getTarget();\n let hasStyle;\n\n if (target && config.componentFirst && collection.length) {\n const style = target.getStyle();\n hasStyle = !isEmpty(style);\n }\n\n $btnSyncEl && $btnSyncEl[hasStyle ? 'show' : 'hide']();\n }),\n\n getTarget() {\n return this.target.getSelected();\n },\n\n getTargets() {\n return this.target.getSelectedAll();\n },\n\n /**\n * Update states visibility. Hides states in case there is no tags\n * inside collection\n * @private\n */\n updateStateVis(target) {\n const em = this.em;\n const avoidInline = em && em.getConfig('avoidInlineStyle');\n const display = this.collection.length || avoidInline ? '' : 'none';\n this.getStatesC().css('display', display);\n this.updateSelector(target);\n },\n\n __handleStateChange() {\n this.updateSelector(this.getTargets());\n },\n\n /**\n * Update selector helper\n * @return {this}\n * @private\n */\n updateSelector(targets) {\n const elSel = this.el.querySelector('[data-selected]');\n const result = [];\n let trgs = targets || this.getTargets();\n trgs = isArray(trgs) ? trgs : [trgs];\n\n trgs.forEach(target => result.push(this.__getName(target)));\n elSel && (elSel.innerHTML = result.join(', '));\n this.checkStates();\n },\n\n __getName(target) {\n const { pfx, config, em } = this;\n const { selectedName, componentFirst } = config;\n let result;\n\n if (isString(target)) {\n result = `${target}`;\n } else {\n const sel = target && target.get && target.getSelectors();\n if (!sel) return;\n const selectors = sel.getStyleable();\n const state = em.get('state');\n const idRes = target.getId\n ? `${target.getName()}#${target.getId()}`\n : '';\n result = this.collection.getFullString(selectors);\n result = result\n ? `${result}`\n : target.get('selectorsAdd') || idRes;\n result = componentFirst && idRes ? idRes : result;\n result += state ? `:${state}` : '';\n result = selectedName ? selectedName({ result, state, target }) : result;\n }\n\n return result && `${result}`;\n },\n\n /**\n * Triggered when the select with states is changed\n * @param {Object} e\n * @private\n */\n stateChanged(ev) {\n const { em } = this;\n const { value } = ev.target;\n em.set('state', value);\n },\n\n /**\n * Add new tag to collection, if possible, and to the component\n * @param {Object} e\n * @private\n */\n addNewTag(label) {\n const { em } = this;\n\n if (!label.trim()) return;\n\n if (em) {\n const sm = em.get('SelectorManager');\n const model = sm.add({ label });\n\n this.getTargets().forEach(target => {\n target.getSelectors().add(model);\n this.collection.add(model);\n this.updateStateVis();\n });\n }\n\n this.endNewTag();\n },\n\n /**\n * Add new object to collection\n * @param {Object} model Model\n * @param {Object} fragmentEl Fragment collection\n * @return {Object} Object created\n * @private\n * */\n addToClasses(model, fragmentEl = null) {\n const fragment = fragmentEl;\n const classes = this.getClasses();\n const rendered = new ClassTagView({\n model,\n config: this.config,\n coll: this.collection\n }).render().el;\n\n fragment ? fragment.appendChild(rendered) : classes.append(rendered);\n\n return rendered;\n },\n\n /**\n * Render the collection of classes\n * @private\n */\n renderClasses() {\n const frag = document.createDocumentFragment();\n const classes = this.getClasses();\n classes.empty();\n this.collection.each(model => this.addToClasses(model, frag));\n classes.append(frag);\n },\n\n /**\n * Return classes element\n * @return {HTMLElement}\n * @private\n */\n getClasses() {\n return this.$el.find('[data-selectors]');\n },\n\n /**\n * Return states element\n * @return {HTMLElement}\n * @private\n */\n getStates() {\n if (!this.$states) {\n const el = this.$el.find('[data-states]');\n this.$states = el[0] && el;\n }\n return this.$states;\n },\n\n /**\n * Return states container element\n * @return {HTMLElement}\n * @private\n */\n getStatesC() {\n if (!this.$statesC) this.$statesC = this.$el.find('#' + this.stateInputC);\n return this.$statesC;\n },\n\n render() {\n const { em, pfx, ppfx, config, $el, el } = this;\n const { render, iconSync, iconAdd } = config;\n const tmpOpts = {\n iconSync,\n iconAdd,\n labelHead: em.t('selectorManager.label'),\n labelStates: em.t('selectorManager.emptyState'),\n labelInfo: em.t('selectorManager.selected'),\n ppfx,\n pfx,\n el\n };\n $el.html(this.template(tmpOpts));\n const renderRes = render && render(tmpOpts);\n renderRes && renderRes !== el && $el.empty().append(renderRes);\n this.$input = $el.find('[data-input]');\n this.$addBtn = $el.find('[data-add]');\n this.$classes = $el.find('#' + pfx + 'tags-c');\n this.$btnSyncEl = $el.find('[data-sync-style]');\n this.$input.hide();\n const statesEl = this.getStates();\n statesEl && statesEl.append(this.getStateOptions());\n this.renderClasses();\n $el.attr('class', `${this.className} ${ppfx}one-bg ${ppfx}two-color`);\n return this;\n }\n});\n","/**\n * Selectors in GrapesJS are used in CSS Composer inside Rules and in Components as classes. To illustrate this concept let's take\n * a look at this code:\n *\n * ```css\n * span > #send-btn.btn{\n * ...\n * }\n * ```\n * ```html\n * \n * \n * \n * ```\n *\n * In this scenario we get:\n * * span -> selector of type `tag`\n * * send-btn -> selector of type `id`\n * * btn -> selector of type `class`\n *\n * So, for example, being `btn` the same class entity it'll be easier to refactor and track things.\n *\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/selector_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * selectorManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const selectorManager = editor.SelectorManager;\n * ```\n *\n * * [getConfig](#getconfig)\n * * [add](#add)\n * * [addClass](#addclass)\n * * [get](#get)\n * * [getAll](#getall)\n * * [setState](#setstate)\n * * [getState](#getstate)\n *\n * @module SelectorManager\n */\n\nimport { isString, isElement, isObject, isArray } from 'underscore';\nimport { isComponent, isRule } from 'utils/mixins';\nimport defaults from './config/config';\nimport Selector from './model/Selector';\nimport Selectors from './model/Selectors';\nimport ClassTagsView from './view/ClassTagsView';\n\nconst isId = str => isString(str) && str[0] == '#';\nconst isClass = str => isString(str) && str[0] == '.';\n\nexport default config => {\n var c = config || {};\n var selectors;\n\n return {\n Selector,\n\n Selectors,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'SelectorManager',\n\n /**\n * Get configuration object\n * @return {Object}\n */\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @return {this}\n * @private\n */\n init(conf = {}) {\n c = {\n ...defaults,\n ...conf\n };\n const em = c.em;\n const ppfx = c.pStylePrefix;\n this.em = em;\n\n if (ppfx) {\n c.stylePrefix = ppfx + c.stylePrefix;\n }\n\n this.selectorTags = new ClassTagsView({\n collection: new Selectors([], { em, config: c }),\n config: c\n });\n\n // Global selectors container\n selectors = new Selectors(c.selectors);\n selectors.on('add', model => em.trigger('selector:add', model));\n selectors.on('remove', model => em.trigger('selector:remove', model));\n selectors.on('change', model =>\n em.trigger(\n 'selector:update',\n model,\n model.previousAttributes(),\n model.changedAttributes()\n )\n );\n em.on('change:state', (m, value) => em.trigger('selector:state', value));\n\n return this;\n },\n\n postRender() {\n const elTo = this.getConfig().appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render([]));\n }\n },\n\n select(value, opts = {}) {\n const targets = Array.isArray(value) ? value : [value];\n const toSelect = this.em.get('StyleManager').setTarget(targets, opts);\n const res = toSelect\n .filter(i => i)\n .map(sel =>\n isComponent(sel)\n ? sel\n : isRule(sel) && !sel.get('selectorsAdd')\n ? sel\n : sel.getSelectorsString()\n );\n this.selectorTags.componentChanged({ targets: res });\n return this;\n },\n\n /**\n * Change the selector state\n * @param {String} value State value\n * @returns {this}\n * @example\n * selectorManager.setState('hover');\n */\n setState(value) {\n this.em.setState(value);\n return this;\n },\n\n /**\n * Get the current selector state\n * @returns {String}\n */\n getState() {\n return this.em.getState();\n },\n\n addSelector(name, opt = {}) {\n let opts = { ...opt };\n\n if (isObject(name)) {\n opts = name;\n } else {\n opts.name = name;\n }\n\n if (isId(opts.name)) {\n opts.name = opts.name.substr(1);\n opts.type = Selector.TYPE_ID;\n } else if (isClass(opts.name)) {\n opts.name = opts.name.substr(1);\n }\n\n if (opts.label && !opts.name) {\n opts.name = this.escapeName(opts.label);\n }\n\n const cname = opts.name;\n const selector = cname\n ? this.get(cname, opts.type)\n : selectors.where(opts)[0];\n\n if (!selector) {\n return selectors.add(opts, { config: c });\n }\n\n return selector;\n },\n\n getSelector(name, type = Selector.TYPE_CLASS) {\n if (isId(name)) {\n name = name.substr(1);\n type = Selector.TYPE_ID;\n } else if (isClass(name)) {\n name = name.substr(1);\n }\n\n return selectors.where({ name, type })[0];\n },\n\n /**\n * Add a new selector to collection if it's not already exists. Class type is a default one\n * @param {String|Array} name Selector/s name\n * @param {Object} opts Selector options\n * @param {String} [opts.label=''] Label for the selector, if it's not provided the label will be the same as the name\n * @param {String} [opts.type=1] Type of the selector. At the moment, only 'class' (1) is available\n * @return {Model|Array}\n * @example\n * const selector = selectorManager.add('selectorName');\n * // Same as\n * const selector = selectorManager.add('selectorName', {\n * type: 1,\n * label: 'selectorName'\n * });\n * // Multiple selectors\n * const selectors = selectorManager.add(['.class1', '.class2', '#id1']);\n * */\n add(name, opts = {}) {\n if (isArray(name)) {\n return name.map(item => this.addSelector(item, opts));\n } else {\n return this.addSelector(name, opts);\n }\n },\n\n /**\n * Add class selectors\n * @param {Array|string} classes Array or string of classes\n * @return {Array} Array of added selectors\n * @example\n * sm.addClass('class1');\n * sm.addClass('class1 class2');\n * sm.addClass(['class1', 'class2']);\n * // -> [SelectorObject, ...]\n */\n addClass(classes) {\n const added = [];\n\n if (isString(classes)) {\n classes = classes.trim().split(' ');\n }\n\n classes.forEach(name => added.push(this.addSelector(name)));\n return added;\n },\n\n /**\n * Get the selector by its name\n * @param {String|Array} name Selector name\n * @param {String} type Selector type\n * @return {Model|Array}\n * @example\n * const selector = selectorManager.get('selectorName');\n * // or get an array\n * const selectors = selectorManager.get(['class1', 'class2']);\n * */\n get(name, type) {\n if (isArray(name)) {\n const result = [];\n const selectors = name\n .map(item => this.getSelector(item))\n .filter(item => item);\n selectors.forEach(\n item => result.indexOf(item) < 0 && result.push(item)\n );\n return result;\n } else {\n return this.getSelector(name, type);\n }\n },\n\n /**\n * Get all selectors\n * @return {Collection}\n * */\n getAll() {\n return selectors;\n },\n\n /**\n * Return escaped selector name\n * @param {String} name Selector name to escape\n * @returns {String} Escaped name\n */\n escapeName(name) {\n const { escapeName } = c;\n return escapeName ? escapeName(name) : Selector.escapeName(name);\n },\n\n /**\n * Render class selectors. If an array of selectors is provided a new instance of the collection will be rendered\n * @param {Array} selectors\n * @return {HTMLElement}\n * @private\n */\n render(selectors) {\n if (selectors) {\n this.selectorTags = new ClassTagsView({\n collection: new Selectors(selectors),\n config: c\n });\n return this.selectorTags.render().el;\n } else return this.selectorTags.render().el;\n },\n\n destroy() {\n selectors.reset();\n selectors.stopListening();\n this.selectorTags.remove();\n [c, selectors].forEach(i => (i = {}));\n this.em = {};\n this.selectorTags = {};\n }\n };\n};\n","export default {\n stylePrefix: 'mdl-',\n\n title: '',\n\n content: '',\n\n backdrop: true\n};\n","import Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n defaults: {\n title: '',\n content: '',\n open: false\n }\n});\n","import Backbone from 'backbone';\n\nexport default Backbone.View.extend({\n template({ pfx, ppfx, content, title }) {\n return `
\n
\n
${title}
\n
\n
\n
\n
${content}
\n
\n
\n
\n
`;\n },\n\n events: {\n click: 'onClick',\n 'click [data-close-modal]': 'hide'\n },\n\n initialize(o) {\n const model = this.model;\n const config = o.config || {};\n const pfx = config.stylePrefix || '';\n this.config = config;\n this.pfx = pfx;\n this.ppfx = config.pStylePrefix || '';\n this.listenTo(model, 'change:open', this.updateOpen);\n this.listenTo(model, 'change:title', this.updateTitle);\n this.listenTo(model, 'change:content', this.updateContent);\n },\n\n onClick(e) {\n const bkd = this.config.backdrop;\n bkd && e.target === this.el && this.hide();\n },\n\n /**\n * Returns collector element\n * @return {HTMLElement}\n * @private\n */\n getCollector() {\n if (!this.$collector)\n this.$collector = this.$el.find('.' + this.pfx + 'collector');\n return this.$collector;\n },\n\n /**\n * Returns content element\n * @return {HTMLElement}\n * @private\n */\n getContent() {\n const pfx = this.pfx;\n\n if (!this.$content) {\n this.$content = this.$el.find(`.${pfx}content #${pfx}c`);\n }\n\n return this.$content;\n },\n\n /**\n * Returns title element\n * @return {HTMLElement}\n * @private\n */\n getTitle() {\n if (!this.$title) this.$title = this.$el.find('.' + this.pfx + 'title');\n return this.$title.get(0);\n },\n\n /**\n * Update content\n * @private\n * */\n updateContent() {\n var content = this.getContent();\n const children = content.children();\n const coll = this.getCollector();\n const body = this.model.get('content');\n children.length && coll.append(children);\n content.empty().append(body);\n },\n\n /**\n * Update title\n * @private\n * */\n updateTitle() {\n var title = this.getTitle();\n if (title) title.innerHTML = this.model.get('title');\n },\n\n /**\n * Update open\n * @private\n * */\n updateOpen() {\n this.el.style.display = this.model.get('open') ? '' : 'none';\n },\n\n /**\n * Hide modal\n * @private\n * */\n hide() {\n this.model.set('open', 0);\n },\n\n /**\n * Show modal\n * @private\n * */\n show(opts = {}) {\n this.model.set('open', 1);\n this.updateAttr(opts.attributes);\n },\n\n updateAttr(attr) {\n const { pfx, $el, el } = this;\n const currAttr = [].slice.call(el.attributes).map(i => i.name);\n $el.removeAttr(currAttr.join(' '));\n $el.attr({\n ...(attr || {}),\n class: `${pfx}container ${(attr && attr.class) || ''}`.trim()\n });\n },\n\n render() {\n const el = this.$el;\n const obj = this.model.toJSON();\n obj.pfx = this.pfx;\n obj.ppfx = this.ppfx;\n el.html(this.template(obj));\n this.updateAttr();\n this.updateOpen();\n return this;\n }\n});\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/modal_dialog/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * modal: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const modal = editor.Modal;\n * ```\n *\n * * [open](#open)\n * * [close](#close)\n * * [isOpen](#isopen)\n * * [setTitle](#settitle)\n * * [getTitle](#gettitle)\n * * [setContent](#setcontent)\n * * [getContent](#getcontent)\n * * [onceClose](#onceclose)\n * * [onceOpen](#onceopen)\n *\n * @module Modal\n */\n\nimport defaults from './config/config';\nimport ModalM from './model/Modal';\nimport ModalView from './view/ModalView';\n\nexport default () => {\n var c = {};\n var model, modal;\n\n const triggerEvent = (enable, em) => {\n em && em.trigger(`modal:${enable ? 'open' : 'close'}`);\n };\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Modal',\n\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config = {}) {\n c = {\n ...defaults,\n ...config\n };\n\n const em = c.em;\n this.em = em;\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n model = new ModalM(c);\n model.on('change:open', (m, enb) => triggerEvent(enb, em));\n modal = new ModalView({\n model,\n config: c\n });\n\n return this;\n },\n\n postRender(view) {\n const el = view.model.getConfig().el || view.el;\n this.render().appendTo(el);\n },\n\n /**\n * Open the modal window\n * @param {Object} [opts={}] Options\n * @param {String|HTMLElement} [opts.title] Title to set for the modal\n * @param {String|HTMLElement} [opts.content] Content to set for the modal\n * @param {Object} [opts.attributes] Updates the modal wrapper with custom attributes\n * @return {this}\n */\n open(opts = {}) {\n opts.title && this.setTitle(opts.title);\n opts.content && this.setContent(opts.content);\n modal.show(opts);\n return this;\n },\n\n /**\n * Close the modal window\n * @return {this}\n */\n close() {\n modal.hide();\n return this;\n },\n\n /**\n * Execute callback when the modal will be closed.\n * The callback will be called one only time\n * @param {Function} clb\n * @returns {this}\n */\n onceClose(clb) {\n this.em.once('modal:close', clb);\n return this;\n },\n\n /**\n * Execute callback when the modal will be opened.\n * The callback will be called one only time\n * @param {Function} clb\n * @returns {this}\n */\n onceOpen(clb) {\n this.em.once('modal:open', clb);\n return this;\n },\n\n /**\n * Checks if the modal window is open\n * @return {Boolean}\n */\n isOpen() {\n return !!model.get('open');\n },\n\n /**\n * Set the title to the modal window\n * @param {string} title Title\n * @return {this}\n * @example\n * modal.setTitle('New title');\n */\n setTitle(title) {\n model.set('title', title);\n return this;\n },\n\n /**\n * Returns the title of the modal window\n * @return {string}\n */\n getTitle() {\n return model.get('title');\n },\n\n /**\n * Set the content of the modal window\n * @param {string|HTMLElement} content Content\n * @return {this}\n * @example\n * modal.setContent('
Some HTML content
');\n */\n setContent(content) {\n model.set('content', ' ');\n model.set('content', content);\n return this;\n },\n\n /**\n * Get the content of the modal window\n * @return {string}\n */\n getContent() {\n return model.get('content');\n },\n\n /**\n * Returns content element\n * @return {HTMLElement}\n * @private\n */\n getContentEl() {\n return modal.getContent().get(0);\n },\n\n /**\n * Returns modal model\n * @return {Model}\n * @private\n */\n getModel() {\n return model;\n },\n\n /**\n * Render the modal window\n * @return {HTMLElement}\n * @private\n */\n render() {\n return modal.render().$el;\n },\n\n destroy() {\n modal.remove();\n [c, model, modal].forEach(i => (i = {}));\n this.em = {};\n }\n };\n};\n","import Backbone from 'backbone';\nimport {\n isString,\n isFunction,\n isArray,\n result,\n each,\n bindAll\n} from 'underscore';\nimport {\n on,\n off,\n matches,\n getElement,\n getPointerEvent,\n isTextNode,\n getModel\n} from 'utils/mixins';\nconst $ = Backbone.$;\n\nexport default Backbone.View.extend({\n initialize(opt) {\n this.opt = opt || {};\n bindAll(\n this,\n 'startSort',\n 'onMove',\n 'endMove',\n 'rollback',\n 'updateOffset',\n 'moveDragHelper'\n );\n var o = opt || {};\n this.elT = 0;\n this.elL = 0;\n this.borderOffset = o.borderOffset || 10;\n\n var el = o.container;\n this.el = typeof el === 'string' ? document.querySelector(el) : el;\n this.$el = $(this.el);\n\n this.containerSel = o.containerSel || 'div';\n this.itemSel = o.itemSel || 'div';\n this.draggable = o.draggable || true;\n this.nested = o.nested || 0;\n this.pfx = o.pfx || '';\n this.ppfx = o.ppfx || '';\n this.freezeClass = o.freezeClass || this.pfx + 'freezed';\n this.onStart = o.onStart || '';\n this.onEndMove = o.onEndMove || '';\n this.direction = o.direction || 'v'; // v (vertical), h (horizontal), a (auto)\n this.onMoveClb = o.onMove || '';\n this.relative = o.relative || 0;\n this.ignoreViewChildren = o.ignoreViewChildren || 0;\n this.ignoreModels = o.ignoreModels || 0;\n this.plh = o.placer || '';\n // Frame offset\n this.wmargin = o.wmargin || 0;\n this.offTop = o.offsetTop || 0;\n this.offLeft = o.offsetLeft || 0;\n this.document = o.document || document;\n this.$document = $(this.document);\n this.dropContent = null;\n this.em = o.em || '';\n this.dragHelper = null;\n this.canvasRelative = o.canvasRelative || 0;\n this.selectOnEnd = !o.avoidSelectOnEnd;\n this.scale = o.scale;\n this.activeTextModel = null;\n\n if (this.em && this.em.on) {\n this.em.on('change:canvasOffset', this.updateOffset);\n this.updateOffset();\n }\n },\n\n getScale() {\n return result(this, scale) || 1;\n },\n\n getContainerEl(elem) {\n if (elem) this.el = elem;\n\n if (!this.el) {\n var el = this.opt.container;\n this.el = typeof el === 'string' ? document.querySelector(el) : el;\n this.$el = $(this.el);\n }\n return this.el;\n },\n\n getDocuments(el) {\n const em = this.em;\n const elDoc = el\n ? el.ownerDocument\n : em && em.get('Canvas').getBody().ownerDocument;\n const docs = [document];\n elDoc && docs.push(elDoc);\n return docs;\n },\n\n /**\n * Triggered when the offset of the editro is changed\n */\n updateOffset() {\n const offset = this.em.get('canvasOffset') || {};\n this.offTop = offset.top;\n this.offLeft = offset.left;\n },\n\n /**\n * Set content to drop\n * @param {String|Object} content\n */\n setDropContent(content) {\n this.dropModel = null;\n this.dropContent = content;\n },\n\n updateTextViewCursorPosition(e) {\n const Canvas = this.em.get('Canvas');\n const targetDoc = Canvas.getDocument();\n let range = null;\n\n if (targetDoc.caretRangeFromPoint) {\n // Chrome\n const poiner = getPointerEvent(e);\n range = targetDoc.caretRangeFromPoint(poiner.clientX, poiner.clientY);\n } else if (e.rangeParent) {\n // Firefox\n range = targetDoc.createRange();\n range.setStart(e.rangeParent, e.rangeOffset);\n }\n\n const sel = Canvas.getWindow().getSelection();\n Canvas.getFrameEl().focus();\n sel.removeAllRanges();\n range && sel.addRange(range);\n },\n\n setContentEditable(model, mode) {\n if (model) {\n const el = model.getEl();\n if (el.contentEditable != mode) el.contentEditable = mode;\n }\n },\n\n /**\n * Toggle cursor while sorting\n * @param {Boolean} active\n */\n toggleSortCursor(active) {\n const { em } = this;\n const cv = em && em.get('Canvas');\n\n // Avoid updating body className as it causes a huge repaint\n // Noticeable with \"fast\" drag of blocks\n cv && (active ? cv.startAutoscroll() : cv.stopAutoscroll());\n },\n\n /**\n * Set drag helper\n * @param {HTMLElement} el\n * @param {Event} event\n */\n setDragHelper(el, event) {\n const ev = event || '';\n const clonedEl = el.cloneNode(1);\n const rect = el.getBoundingClientRect();\n const computed = getComputedStyle(el);\n let style = '';\n\n for (var i = 0; i < computed.length; i++) {\n const prop = computed[i];\n style += `${prop}:${computed.getPropertyValue(prop)};`;\n }\n\n document.body.appendChild(clonedEl);\n clonedEl.className += ` ${this.pfx}bdrag`;\n clonedEl.setAttribute('style', style);\n this.dragHelper = clonedEl;\n clonedEl.style.width = `${rect.width}px`;\n clonedEl.style.height = `${rect.height}px`;\n ev && this.moveDragHelper(ev);\n\n // Listen mouse move events\n if (this.em) {\n $(this.em.get('Canvas').getBody().ownerDocument)\n .off('mousemove', this.moveDragHelper)\n .on('mousemove', this.moveDragHelper);\n }\n $(document)\n .off('mousemove', this.moveDragHelper)\n .on('mousemove', this.moveDragHelper);\n },\n\n /**\n * Update the position of the helper\n * @param {Event} e\n */\n moveDragHelper(e) {\n const doc = e.target.ownerDocument;\n\n if (!this.dragHelper || !doc) {\n return;\n }\n\n let posY = e.pageY;\n let posX = e.pageX;\n let addTop = 0;\n let addLeft = 0;\n const window = doc.defaultView || doc.parentWindow;\n const frame = window.frameElement;\n const dragHelperStyle = this.dragHelper.style;\n\n // If frame is present that means mouse has moved over the editor's canvas,\n // which is rendered inside the iframe and the mouse move event comes from\n // the iframe, not the parent window. Mouse position relative to the frame's\n // parent window needs to account for the frame's position relative to the\n // parent window.\n if (frame) {\n const frameRect = frame.getBoundingClientRect();\n addTop = frameRect.top + document.documentElement.scrollTop;\n addLeft = frameRect.left + document.documentElement.scrollLeft;\n posY = e.clientY;\n posX = e.clientX;\n }\n\n dragHelperStyle.top = posY + addTop + 'px';\n dragHelperStyle.left = posX + addLeft + 'px';\n },\n\n /**\n * Returns true if the element matches with selector\n * @param {Element} el\n * @param {String} selector\n * @return {Boolean}\n */\n matches(el, selector, useBody) {\n return matches.call(el, selector);\n },\n\n /**\n * Closest parent\n * @param {Element} el\n * @param {String} selector\n * @return {Element|null}\n */\n closest(el, selector) {\n if (!el) return;\n var elem = el.parentNode;\n while (elem && elem.nodeType === 1) {\n if (this.matches(elem, selector)) return elem;\n elem = elem.parentNode;\n }\n return null;\n },\n\n /**\n * Get the offset of the element\n * @param {HTMLElement} el\n * @return {Object}\n */\n offset(el) {\n var rect = el.getBoundingClientRect();\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n };\n },\n\n /**\n * Create placeholder\n * @return {HTMLElement}\n */\n createPlaceholder() {\n var pfx = this.pfx;\n var el = document.createElement('div');\n var ins = document.createElement('div');\n el.className = pfx + 'placeholder';\n el.style.display = 'none';\n el.style['pointer-events'] = 'none';\n ins.className = pfx + 'placeholder-int';\n el.appendChild(ins);\n return el;\n },\n\n /**\n * Picking component to move\n * @param {HTMLElement} src\n * */\n startSort(src, opts = {}) {\n const em = this.em;\n const itemSel = this.itemSel;\n const contSel = this.containerSel;\n const container = this.getContainerEl(opts.container);\n const docs = this.getDocuments(src);\n const onStart = this.onStart;\n let srcModel;\n let plh = this.plh;\n this.dropModel = null;\n this.target = null;\n this.prevTarget = null;\n this.moved = 0;\n\n // Check if the start element is a valid one, if not get the\n // closest valid one\n if (src && !this.matches(src, `${itemSel}, ${contSel}`)) {\n src = this.closest(src, itemSel);\n }\n\n this.eV = src;\n\n // Create placeholder if not yet exists\n if (!plh) {\n plh = this.createPlaceholder();\n container.appendChild(plh);\n this.plh = plh;\n }\n\n if (src) {\n srcModel = this.getSourceModel(src);\n srcModel && srcModel.set && srcModel.set('status', 'freezed');\n this.srcModel = srcModel;\n }\n\n on(container, 'mousemove dragover', this.onMove);\n on(docs, 'mouseup dragend touchend', this.endMove);\n on(docs, 'keydown', this.rollback);\n onStart &&\n onStart({\n target: srcModel,\n parent: srcModel && srcModel.parent(),\n index: srcModel && srcModel.index()\n });\n\n // Avoid strange effects on dragging\n em && em.clearSelection();\n this.toggleSortCursor(1);\n\n em && em.trigger('sorter:drag:start', src, srcModel);\n },\n\n /**\n * Get the model from HTMLElement target\n * @return {Model|null}\n */\n getTargetModel(el) {\n let elem = el || this.target;\n return $(elem).data('model');\n },\n\n /**\n * Get the model of the current source element (element to drag)\n * @return {Model}\n */\n getSourceModel(source, { target, avoidChildren = 1 } = {}) {\n const { em, eV } = this;\n const src = source || eV;\n let { dropModel, dropContent } = this;\n const isTextable = src =>\n src &&\n target &&\n src.opt &&\n src.opt.avoidChildren &&\n this.isTextableActive(src, target);\n\n if (dropContent && em) {\n if (isTextable(dropModel)) {\n dropModel = null;\n }\n\n if (!dropModel) {\n const comps = em.get('DomComponents').getComponents();\n const opts = {\n avoidChildren,\n avoidStore: 1,\n avoidUpdateStyle: 1\n };\n const tempModel = comps.add(dropContent, { ...opts, temporary: 1 });\n dropModel = comps.remove(tempModel, opts);\n dropModel = dropModel instanceof Array ? dropModel[0] : dropModel;\n this.dropModel = dropModel;\n\n if (isTextable(dropModel)) {\n return this.getSourceModel(src, { target, avoidChildren: 0 });\n }\n }\n\n return dropModel;\n }\n\n return src && $(src).data('model');\n },\n\n /**\n * Highlight target\n * @param {Model|null} model\n */\n selectTargetModel(model, source) {\n if (model instanceof Backbone.Collection) {\n return;\n }\n\n // Prevents loops in Firefox\n // https://github.com/artf/grapesjs/issues/2911\n if (source && source === model) return;\n\n const { targetModel } = this;\n\n // Reset the previous model but not if it's the same as the source\n // https://github.com/artf/grapesjs/issues/2478#issuecomment-570314736\n if (targetModel && targetModel !== this.srcModel) {\n targetModel.set('status', '');\n }\n\n if (model && model.set) {\n model.set('status', 'selected-parent');\n this.targetModel = model;\n }\n },\n\n /**\n * During move\n * @param {Event} e\n * */\n onMove(e) {\n const ev = e;\n const { em, onMoveClb, plh } = this;\n this.moved = 1;\n\n // Turn placeholder visibile\n var dsp = plh.style.display;\n if (!dsp || dsp === 'none') plh.style.display = 'block';\n\n // Cache all necessary positions\n var eO = this.offset(this.el);\n this.elT = this.wmargin ? Math.abs(eO.top) : eO.top;\n this.elL = this.wmargin ? Math.abs(eO.left) : eO.left;\n var rY = e.pageY - this.elT + this.el.scrollTop;\n var rX = e.pageX - this.elL + this.el.scrollLeft;\n\n if (this.canvasRelative && em) {\n const mousePos = em\n .get('Canvas')\n .getMouseRelativeCanvas(e, { noScroll: 1 });\n rX = mousePos.x;\n rY = mousePos.y;\n }\n\n this.rX = rX;\n this.rY = rY;\n this.eventMove = e;\n\n //var targetNew = this.getTargetFromEl(e.target);\n const sourceModel = this.getSourceModel();\n const dims = this.dimsFromTarget(e.target, rX, rY);\n const target = this.target;\n const targetModel = target && this.getTargetModel(target);\n this.selectTargetModel(targetModel, sourceModel);\n if (!targetModel) plh.style.display = 'none';\n if (!target) return;\n\n this.lastDims = dims;\n const pos = this.findPosition(dims, rX, rY);\n\n if (this.isTextableActive(sourceModel, targetModel)) {\n this.activeTextModel = targetModel;\n this.setContentEditable(targetModel, true);\n\n plh.style.display = 'none';\n this.lastPos = pos;\n this.updateTextViewCursorPosition(ev);\n } else {\n this.disableTextable();\n this.activeTextModel = null;\n\n // If there is a significant changes with the pointer\n if (\n !this.lastPos ||\n this.lastPos.index != pos.index ||\n this.lastPos.method != pos.method\n ) {\n this.movePlaceholder(this.plh, dims, pos, this.prevTargetDim);\n if (!this.$plh) this.$plh = $(this.plh);\n\n // With canvasRelative the offset is calculated automatically for\n // each element\n if (!this.canvasRelative) {\n if (this.offTop) this.$plh.css('top', '+=' + this.offTop + 'px');\n if (this.offLeft) this.$plh.css('left', '+=' + this.offLeft + 'px');\n }\n\n this.lastPos = pos;\n }\n }\n\n isFunction(onMoveClb) &&\n onMoveClb({\n event: e,\n target: sourceModel,\n parent: targetModel,\n index: pos.index + (pos.method == 'after' ? 1 : 0)\n });\n\n em &&\n em.trigger('sorter:drag', {\n target,\n targetModel,\n sourceModel,\n dims,\n pos,\n x: rX,\n y: rY\n });\n },\n\n isTextableActive(src, trg) {\n return src && src.get && src.get('textable') && trg && trg.is('text');\n },\n\n disableTextable() {\n const { activeTextModel } = this;\n activeTextModel && activeTextModel.getView().disableEditing();\n },\n\n /**\n * Returns true if the elements is in flow, so is not in flow where\n * for example the component is with float:left\n * @param {HTMLElement} el\n * @param {HTMLElement} parent\n * @return {Boolean}\n * @private\n * */\n isInFlow(el, parent) {\n if (!el) return false;\n\n parent = parent || document.body;\n var ch = -1,\n h;\n var elem = el;\n h = elem.offsetHeight;\n if (/*h < ch || */ !this.styleInFlow(elem, parent)) return false;\n else return true;\n },\n\n /**\n * Check if el has style to be in flow\n * @param {HTMLElement} el\n * @param {HTMLElement} parent\n * @return {Boolean}\n * @private\n */\n styleInFlow(el, parent) {\n if (isTextNode(el)) return;\n const style = el.style || {};\n const $el = $(el);\n const $parent = parent && $(parent);\n\n if (style.overflow && style.overflow !== 'visible') return;\n if ($el.css('float') !== 'none') return;\n if (\n $parent &&\n $parent.css('display') == 'flex' &&\n $parent.css('flex-direction') !== 'column'\n )\n return;\n switch (style.position) {\n case 'static':\n case 'relative':\n case '':\n break;\n default:\n return;\n }\n switch (el.tagName) {\n case 'TR':\n case 'TBODY':\n case 'THEAD':\n case 'TFOOT':\n return true;\n }\n switch ($el.css('display')) {\n case 'block':\n case 'list-item':\n case 'table':\n case 'flex':\n return true;\n }\n return;\n },\n\n /**\n * Check if the target is valid with the actual source\n * @param {HTMLElement} trg\n * @return {Boolean}\n */\n validTarget(trg, src) {\n const trgModel = this.getTargetModel(trg);\n const srcModel = this.getSourceModel(src, { target: trgModel });\n src = srcModel && srcModel.view && srcModel.view.el;\n trg = trgModel && trgModel.view && trgModel.view.el;\n let result = {\n valid: true,\n src,\n srcModel,\n trg,\n trgModel\n };\n\n if (!src || !trg) {\n result.valid = false;\n return result;\n }\n\n // check if the source is draggable in target\n let draggable = srcModel.get('draggable');\n draggable = draggable instanceof Array ? draggable.join(', ') : draggable;\n result.dragInfo = draggable;\n draggable = isString(draggable) ? this.matches(trg, draggable) : draggable;\n result.draggable = draggable;\n\n // Check if the target could accept the source\n let droppable = trgModel.get('droppable');\n droppable = droppable instanceof Backbone.Collection ? 1 : droppable;\n droppable = droppable instanceof Array ? droppable.join(', ') : droppable;\n result.dropInfo = droppable;\n droppable = isString(droppable) ? this.matches(src, droppable) : droppable;\n droppable =\n draggable && this.isTextableActive(srcModel, trgModel) ? 1 : droppable;\n result.droppable = droppable;\n\n if (!droppable || !draggable) {\n result.valid = false;\n }\n\n return result;\n },\n\n /**\n * Get dimensions of nodes relative to the coordinates\n * @param {HTMLElement} target\n * @param {number} rX Relative X position\n * @param {number} rY Relative Y position\n * @return {Array}\n */\n dimsFromTarget(target, rX, rY) {\n const em = this.em;\n var dims = [];\n\n if (!target) {\n return dims;\n }\n\n // Select the first valuable target\n if (!this.matches(target, `${this.itemSel}, ${this.containerSel}`)) {\n target = this.closest(target, this.itemSel);\n }\n\n // If draggable is an array the target will be one of those\n if (this.draggable instanceof Array) {\n target = this.closest(target, this.draggable.join(','));\n }\n\n if (!target) {\n return dims;\n }\n\n // Check if the target is different from the previous one\n if (this.prevTarget && this.prevTarget != target) {\n this.prevTarget = null;\n }\n\n // New target found\n if (!this.prevTarget) {\n this.targetP = this.closest(target, this.containerSel);\n\n // Check if the source is valid with the target\n let validResult = this.validTarget(target);\n em && em.trigger('sorter:drag:validation', validResult);\n\n if (!validResult.valid && this.targetP) {\n return this.dimsFromTarget(this.targetP, rX, rY);\n }\n\n this.prevTarget = target;\n this.prevTargetDim = this.getDim(target);\n this.cacheDimsP = this.getChildrenDim(this.targetP);\n this.cacheDims = this.getChildrenDim(target);\n }\n\n // If the target is the previous one will return the cached dims\n if (this.prevTarget == target) dims = this.cacheDims;\n\n // Target when I will drop element to sort\n this.target = this.prevTarget;\n\n // Generally, on any new target the poiner enters inside its area and\n // triggers nearBorders(), so have to take care of this\n if (\n this.nearBorders(this.prevTargetDim, rX, rY) ||\n (!this.nested && !this.cacheDims.length)\n ) {\n const targetParent = this.targetP;\n\n if (targetParent && this.validTarget(targetParent).valid) {\n dims = this.cacheDimsP;\n this.target = targetParent;\n }\n }\n\n this.lastPos = null;\n return dims;\n },\n\n /**\n * Get valid target from element\n * This method should replace dimsFromTarget()\n * @param {HTMLElement} el\n * @return {HTMLElement}\n */\n getTargetFromEl(el) {\n let target = el;\n let targetParent;\n let targetPrev = this.targetPrev;\n const em = this.em;\n const containerSel = this.containerSel;\n const itemSel = this.itemSel;\n\n // Select the first valuable target\n if (!this.matches(target, `${itemSel}, ${containerSel}`)) {\n target = this.closest(target, itemSel);\n }\n\n // If draggable is an array the target will be one of those\n // TODO check if this options is used somewhere\n if (this.draggable instanceof Array) {\n target = this.closest(target, this.draggable.join(','));\n }\n\n // Check if the target is different from the previous one\n if (targetPrev && targetPrev != target) {\n this.targetPrev = '';\n }\n\n // New target found\n if (!this.targetPrev) {\n targetParent = this.closest(target, containerSel);\n\n // If the current target is not valid (src/trg reasons) try with\n // the parent one (if exists)\n const validResult = this.validTarget(target);\n em && em.trigger('sorter:drag:validation', validResult);\n\n if (!validResult.valid && targetParent) {\n return this.getTargetFromEl(targetParent);\n }\n\n this.targetPrev = target;\n }\n\n // Generally, on any new target the poiner enters inside its area and\n // triggers nearBorders(), so have to take care of this\n if (this.nearElBorders(target)) {\n targetParent = this.closest(target, containerSel);\n\n if (targetParent && this.validTarget(targetParent).valid) {\n target = targetParent;\n }\n }\n\n return target;\n },\n\n /**\n * Check if the current pointer is neare to element borders\n * @return {Boolen}\n */\n nearElBorders(el) {\n const off = 10;\n const rect = el.getBoundingClientRect();\n const body = el.ownerDocument.body;\n const { x, y } = this.getCurrentPos();\n const top = rect.top + body.scrollTop;\n const left = rect.left + body.scrollLeft;\n const width = rect.width;\n const height = rect.height;\n\n if (\n y < top + off || // near top edge\n y > top + height - off || // near bottom edge\n x < left + off || // near left edge\n x > left + width - off // near right edge\n ) {\n return 1;\n }\n },\n\n getCurrentPos() {\n const ev = this.eventMove;\n const x = ev.pageX || 0;\n const y = ev.pageY || 0;\n return { x, y };\n },\n\n /**\n * Returns dimensions and positions about the element\n * @param {HTMLElement} el\n * @return {Array}\n */\n getDim(el) {\n const { em, canvasRelative } = this;\n var top, left, height, width;\n\n if (canvasRelative && em) {\n const canvas = em.get('Canvas');\n const pos = canvas.getElementPos(el, { noScroll: 1 });\n const elOffsets = canvas.getElementOffsets(el);\n top = pos.top - elOffsets.marginTop;\n left = pos.left - elOffsets.marginLeft;\n height = pos.height + elOffsets.marginTop + elOffsets.marginBottom;\n width = pos.width + elOffsets.marginLeft + elOffsets.marginRight;\n } else {\n var o = this.offset(el);\n top = this.relative\n ? el.offsetTop\n : o.top - (this.wmargin ? -1 : 1) * this.elT;\n left = this.relative\n ? el.offsetLeft\n : o.left - (this.wmargin ? -1 : 1) * this.elL;\n height = el.offsetHeight;\n width = el.offsetWidth;\n }\n\n return [top, left, height, width];\n },\n\n /**\n * Get children dimensions\n * @param {HTMLELement} el Element root\n * @retun {Array}\n * */\n getChildrenDim(trg) {\n const dims = [];\n if (!trg) return dims;\n\n // Get children based on getChildrenContainer\n const trgModel = this.getTargetModel(trg);\n if (trgModel && trgModel.view && !this.ignoreViewChildren) {\n const view = trgModel.getCurrentView\n ? trgModel.getCurrentView()\n : trgModel.view;\n trg = view.getChildrenContainer();\n }\n\n each(trg.children, (el, i) => {\n const model = getModel(el, $);\n const elIndex = model && model.index ? model.index() : i;\n\n if (!isTextNode(el) && !this.matches(el, this.itemSel)) {\n return;\n }\n\n const dim = this.getDim(el);\n let dir = this.direction;\n\n if (dir == 'v') dir = true;\n else if (dir == 'h') dir = false;\n else dir = this.isInFlow(el, trg);\n\n dim.push(dir, el, elIndex);\n dims.push(dim);\n });\n\n return dims;\n },\n\n /**\n * Check if the coordinates are near to the borders\n * @param {Array} dim\n * @param {number} rX Relative X position\n * @param {number} rY Relative Y position\n * @return {Boolean}\n * */\n nearBorders(dim, rX, rY) {\n var result = 0;\n var off = this.borderOffset;\n var x = rX || 0;\n var y = rY || 0;\n var t = dim[0];\n var l = dim[1];\n var h = dim[2];\n var w = dim[3];\n if (t + off > y || y > t + h - off || l + off > x || x > l + w - off)\n result = 1;\n\n return !!result;\n },\n\n /**\n * Find the position based on passed dimensions and coordinates\n * @param {Array} dims Dimensions of nodes to parse\n * @param {number} posX X coordindate\n * @param {number} posY Y coordindate\n * @retun {Object}\n * */\n findPosition(dims, posX, posY) {\n var result = { index: 0, indexEl: 0, method: 'before' };\n var leftLimit = 0,\n xLimit = 0,\n dimRight = 0,\n yLimit = 0,\n xCenter = 0,\n yCenter = 0,\n dimDown = 0,\n dim = 0;\n // Each dim is: Top, Left, Height, Width\n for (var i = 0, len = dims.length; i < len; i++) {\n dim = dims[i];\n // Right position of the element. Left + Width\n dimRight = dim[1] + dim[3];\n // Bottom position of the element. Top + Height\n dimDown = dim[0] + dim[2];\n // X center position of the element. Left + (Width / 2)\n xCenter = dim[1] + dim[3] / 2;\n // Y center position of the element. Top + (Height / 2)\n yCenter = dim[0] + dim[2] / 2;\n // Skip if over the limits\n if (\n (xLimit && dim[1] > xLimit) ||\n (yLimit && yCenter >= yLimit) || // >= avoid issue with clearfixes\n (leftLimit && dimRight < leftLimit)\n )\n continue;\n result.index = i;\n result.indexEl = dim[6];\n // If it's not in flow (like 'float' element)\n if (!dim[4]) {\n if (posY < dimDown) yLimit = dimDown;\n //If x lefter than center\n if (posX < xCenter) {\n xLimit = xCenter;\n result.method = 'before';\n } else {\n leftLimit = xCenter;\n result.method = 'after';\n }\n } else {\n // If y upper than center\n if (posY < yCenter) {\n result.method = 'before';\n break;\n } else result.method = 'after'; // After last element\n }\n }\n return result;\n },\n\n /**\n * Updates the position of the placeholder\n * @param {HTMLElement} phl\n * @param {Array} dims\n * @param {Object} pos Position object\n * @param {Array} trgDim target dimensions\n * */\n movePlaceholder(plh, dims, pos, trgDim) {\n var marg = 0,\n t = 0,\n l = 0,\n w = 0,\n h = 0,\n un = 'px',\n margI = 5,\n method = pos.method;\n var elDim = dims[pos.index];\n\n // Placeholder orientation\n plh.classList.remove('vertical');\n plh.classList.add('horizontal');\n\n if (elDim) {\n // If it's not in flow (like 'float' element)\n if (!elDim[4]) {\n w = 'auto';\n h = elDim[2] - marg * 2 + un;\n t = elDim[0] + marg;\n l = method == 'before' ? elDim[1] - marg : elDim[1] + elDim[3] - marg;\n\n plh.classList.remove('horizontal');\n plh.classList.add('vertical');\n } else {\n w = elDim[3] + un;\n h = 'auto';\n t = method == 'before' ? elDim[0] - marg : elDim[0] + elDim[2] - marg;\n l = elDim[1];\n }\n } else {\n if (!this.nested) {\n plh.style.display = 'none';\n return;\n }\n if (trgDim) {\n t = trgDim[0] + margI;\n l = trgDim[1] + margI;\n w = parseInt(trgDim[3]) - margI * 2 + un;\n h = 'auto';\n }\n }\n plh.style.top = t + un;\n plh.style.left = l + un;\n if (w) plh.style.width = w;\n if (h) plh.style.height = h;\n },\n\n /**\n * Leave item\n * @param event\n *\n * @return void\n * */\n endMove(e) {\n const src = this.eV;\n const moved = [];\n const docs = this.getDocuments();\n const container = this.getContainerEl();\n const onEndMove = this.onEndMove;\n const { target, lastPos } = this;\n let srcModel;\n off(container, 'mousemove dragover', this.onMove);\n off(docs, 'mouseup dragend touchend', this.endMove);\n off(docs, 'keydown', this.rollback);\n this.plh.style.display = 'none';\n\n if (src) {\n srcModel = this.getSourceModel();\n if (this.selectOnEnd && srcModel && srcModel.set) {\n srcModel.set('status', '');\n srcModel.set('status', 'selected');\n }\n }\n\n if (this.moved) {\n const toMove = this.toMove;\n const toMoveArr = isArray(toMove) ? toMove : toMove ? [toMove] : [src];\n toMoveArr.forEach(model => {\n moved.push(this.move(target, model, lastPos));\n });\n }\n\n if (this.plh) this.plh.style.display = 'none';\n var dragHelper = this.dragHelper;\n\n if (dragHelper) {\n dragHelper.parentNode.removeChild(dragHelper);\n this.dragHelper = null;\n }\n\n this.disableTextable();\n this.selectTargetModel();\n this.toggleSortCursor();\n\n this.toMove = null;\n this.eventMove = 0;\n this.dropModel = null;\n\n if (isFunction(onEndMove)) {\n const data = {\n target: srcModel,\n parent: srcModel && srcModel.parent(),\n index: srcModel && srcModel.index()\n };\n moved.length\n ? moved.forEach(m => onEndMove(m, this, data))\n : onEndMove(null, this, { ...data, cancelled: 1 });\n }\n },\n\n /**\n * Move component to new position\n * @param {HTMLElement} dst Destination target\n * @param {HTMLElement} src Element to move\n * @param {Object} pos Object with position coordinates\n * */\n move(dst, src, pos) {\n const { em, activeTextModel, dropContent } = this;\n const srcEl = getElement(src);\n em && em.trigger('component:dragEnd:before', dst, srcEl, pos); // @depricated\n let index = pos.indexEl;\n let modelToDrop, modelTemp, created;\n const warns = [];\n const validResult = this.validTarget(dst, srcEl);\n const targetCollection = $(dst).data('collection');\n const model = validResult.srcModel;\n let { droppable } = validResult;\n const { trgModel, draggable } = validResult;\n const dropInfo =\n validResult.dropInfo || (trgModel && trgModel.get('droppable'));\n const dragInfo = validResult.dragInfo || (model && model.get('draggable'));\n droppable = trgModel instanceof Backbone.Collection ? 1 : droppable;\n const isTextableActive = this.isTextableActive(model, trgModel);\n\n if (targetCollection && droppable && draggable) {\n index = pos.method === 'after' ? index + 1 : index;\n var opts = { at: index, noIncrement: 1 };\n\n if (!dropContent) {\n // Putting `avoidStore` here will make the UndoManager behave wrong\n opts.temporary = 1;\n modelTemp = targetCollection.add({}, { ...opts });\n\n if (model.collection) {\n modelToDrop = model.collection.remove(model, { temporary: 1 });\n }\n } else {\n modelToDrop = dropContent;\n opts.silent = false;\n opts.avoidUpdateStyle = 1;\n }\n\n if (isTextableActive) {\n const viewActive = activeTextModel.getView();\n activeTextModel.trigger('active');\n const { activeRte } = viewActive;\n const modelEl = model.getEl();\n delete model.opt.temporary;\n model.getView().render();\n modelEl.setAttribute('data-gjs-textable', 'true');\n const { outerHTML } = modelEl;\n activeRte.insertHTML && activeRte.insertHTML(outerHTML);\n } else {\n created = targetCollection.add(modelToDrop, opts);\n }\n\n if (!dropContent) {\n targetCollection.remove(modelTemp);\n } else {\n this.dropContent = null;\n }\n\n // This will cause to recalculate children dimensions\n this.prevTarget = null;\n } else if (em) {\n !targetCollection && warns.push('Target collection not found');\n !droppable &&\n dropInfo &&\n warns.push(`Target is not droppable, accepts [${dropInfo}]`);\n !draggable &&\n dragInfo &&\n warns.push(`Component not draggable, acceptable by [${dragInfo}]`);\n em.logWarning('Invalid target position', {\n errors: warns,\n model,\n context: 'sorter',\n target: trgModel\n });\n }\n\n if (em) {\n em.trigger('component:dragEnd', targetCollection, modelToDrop, warns); // @depricated\n em.trigger('sorter:drag:end', {\n targetCollection,\n modelToDrop,\n warns,\n validResult,\n dst,\n srcEl\n });\n }\n\n return created;\n },\n\n /**\n * Rollback to previous situation\n * @param {Event}\n * @param {Bool} Indicates if rollback in anycase\n * */\n rollback(e) {\n off(this.getDocuments(), 'keydown', this.rollback);\n const key = e.which || e.keyCode;\n\n if (key == 27) {\n this.moved = 0;\n this.endMove();\n }\n }\n});\n","import { bindAll, defaults, isFunction, each } from 'underscore';\nimport { on, off, normalizeFloat } from 'utils/mixins';\n\nvar defaultOpts = {\n // Function which returns custom X and Y coordinates of the mouse\n mousePosFetcher: null,\n // Indicates custom target updating strategy\n updateTarget: null,\n // Function which gets HTMLElement as an arg and returns it relative position\n ratioDefault: 0,\n posFetcher: null,\n onStart: null,\n onMove: null,\n onEnd: null,\n onUpdateContainer: () => {},\n\n // Resize unit step\n step: 1,\n\n // Minimum dimension\n minDim: 10,\n\n // Maximum dimension\n maxDim: '',\n\n // Unit used for height resizing\n unitHeight: 'px',\n\n // Unit used for width resizing\n unitWidth: 'px',\n\n // The key used for height resizing\n keyHeight: 'height',\n\n // The key used for width resizing\n keyWidth: 'width',\n\n // If true, will override unitHeight and unitWidth, on start, with units\n // from the current focused element (currently used only in SelectComponent)\n currentUnit: 1,\n\n // With this option active the mousemove event won't be altered when\n // the pointer comes over iframes\n silentFrames: 0,\n\n // If true the container of handlers won't be updated\n avoidContainerUpdate: 0,\n\n // If height is 'auto', this setting will preserve it and only update width\n keepAutoHeight: false,\n\n // If width is 'auto', this setting will preserve it and only update height\n keepAutoWidth: false,\n\n // When keepAutoHeight is true and the height has the value 'auto', this is set to true and height isn't updated\n autoHeight: false,\n\n // When keepAutoWidth is true and the width has the value 'auto', this is set to true and width isn't updated\n autoWidth: false,\n\n // Handlers\n tl: 1, // Top left\n tc: 1, // Top center\n tr: 1, // Top right\n cl: 1, // Center left\n cr: 1, // Center right\n bl: 1, // Bottom left\n bc: 1, // Bottom center\n br: 1 // Bottom right\n};\n\nvar createHandler = (name, opts) => {\n var pfx = opts.prefix || '';\n var el = document.createElement('i');\n el.className = pfx + 'resizer-h ' + pfx + 'resizer-h-' + name;\n el.setAttribute('data-' + pfx + 'handler', name);\n return el;\n};\n\nvar getBoundingRect = (el, win) => {\n var w = win || window;\n var rect = el.getBoundingClientRect();\n return {\n left: rect.left + w.pageXOffset,\n top: rect.top + w.pageYOffset,\n width: rect.width,\n height: rect.height\n };\n};\n\nclass Resizer {\n /**\n * Init the Resizer with options\n * @param {Object} options\n */\n constructor(opts = {}) {\n this.setOptions(opts);\n bindAll(this, 'handleKeyDown', 'handleMouseDown', 'move', 'stop');\n return this;\n }\n\n /**\n * Get current connfiguration options\n * @return {Object}\n */\n getConfig() {\n return this.opts;\n }\n\n /**\n * Setup options\n * @param {Object} options\n */\n setOptions(options = {}) {\n this.opts = defaults(options, defaultOpts);\n this.setup();\n }\n\n /**\n * Setup resizer\n */\n setup() {\n const opts = this.opts;\n const pfx = opts.prefix || '';\n const appendTo = opts.appendTo || document.body;\n let container = this.container;\n\n // Create container if not yet exist\n if (!container) {\n container = document.createElement('div');\n container.className = `${pfx}resizer-c`;\n appendTo.appendChild(container);\n this.container = container;\n }\n\n while (container.firstChild) {\n container.removeChild(container.firstChild);\n }\n\n // Create handlers\n const handlers = {};\n ['tl', 'tc', 'tr', 'cl', 'cr', 'bl', 'bc', 'br'].forEach(\n hdl => (handlers[hdl] = opts[hdl] ? createHandler(hdl, opts) : '')\n );\n\n for (let n in handlers) {\n const handler = handlers[n];\n handler && container.appendChild(handler);\n }\n\n this.handlers = handlers;\n this.mousePosFetcher = opts.mousePosFetcher;\n this.updateTarget = opts.updateTarget;\n this.posFetcher = opts.posFetcher;\n this.onStart = opts.onStart;\n this.onMove = opts.onMove;\n this.onEnd = opts.onEnd;\n this.onUpdateContainer = opts.onUpdateContainer;\n }\n\n /**\n * Toggle iframes pointer event\n * @param {Boolean} silent If true, iframes will be silented\n */\n toggleFrames(silent) {\n if (this.opts.silentFrames) {\n const frames = document.querySelectorAll('iframe');\n each(frames, frame => (frame.style.pointerEvents = silent ? 'none' : ''));\n }\n }\n\n /**\n * Detects if the passed element is a resize handler\n * @param {HTMLElement} el\n * @return {Boolean}\n */\n isHandler(el) {\n var handlers = this.handlers;\n\n for (var n in handlers) {\n if (handlers[n] === el) return true;\n }\n\n return false;\n }\n\n /**\n * Returns the focused element\n * @return {HTMLElement}\n */\n getFocusedEl() {\n return this.el;\n }\n\n /**\n * Returns the parent of the focused element\n * @return {HTMLElement}\n */\n getParentEl() {\n return this.el.parentElement;\n }\n\n /**\n * Returns documents\n */\n getDocumentEl() {\n return [this.el.ownerDocument, document];\n }\n\n /**\n * Return element position\n * @param {HTMLElement} el\n * @param {Object} opts Custom options\n * @return {Object}\n */\n getElementPos(el, opts = {}) {\n var posFetcher = this.posFetcher || '';\n return posFetcher ? posFetcher(el, opts) : getBoundingRect(el);\n }\n\n /**\n * Focus resizer on the element, attaches handlers to it\n * @param {HTMLElement} el\n */\n focus(el) {\n // Avoid focusing on already focused element\n if (el && el === this.el) {\n return;\n }\n\n this.el = el;\n this.updateContainer({ forceShow: 1 });\n on(this.getDocumentEl(), 'mousedown', this.handleMouseDown);\n }\n\n /**\n * Blur from element\n */\n blur() {\n this.container.style.display = 'none';\n\n if (this.el) {\n off(this.getDocumentEl(), 'mousedown', this.handleMouseDown);\n this.el = null;\n }\n }\n\n /**\n * Start resizing\n * @param {Event} e\n */\n start(e) {\n //Right or middel click\n if (e.button !== 0) return;\n e.preventDefault();\n e.stopPropagation();\n const el = this.el;\n const parentEl = this.getParentEl();\n const resizer = this;\n const config = this.opts || {};\n var attrName = 'data-' + config.prefix + 'handler';\n var rect = this.getElementPos(el, { target: 'el' });\n var parentRect = this.getElementPos(parentEl);\n this.handlerAttr = e.target.getAttribute(attrName);\n this.clickedHandler = e.target;\n this.startDim = {\n t: rect.top,\n l: rect.left,\n w: rect.width,\n h: rect.height\n };\n this.rectDim = {\n t: rect.top,\n l: rect.left,\n w: rect.width,\n h: rect.height\n };\n this.startPos = {\n x: e.clientX,\n y: e.clientY\n };\n this.parentDim = {\n t: parentRect.top,\n l: parentRect.left,\n w: parentRect.width,\n h: parentRect.height\n };\n\n // Listen events\n var doc = this.getDocumentEl();\n on(doc, 'mousemove', this.move);\n on(doc, 'keydown', this.handleKeyDown);\n on(doc, 'mouseup', this.stop);\n isFunction(this.onStart) &&\n this.onStart(e, { docs: doc, config, el, resizer });\n this.toggleFrames(1);\n this.move(e);\n }\n\n /**\n * While resizing\n * @param {Event} e\n */\n move(e) {\n const onMove = this.onMove;\n var mouseFetch = this.mousePosFetcher;\n var currentPos = mouseFetch\n ? mouseFetch(e)\n : {\n x: e.clientX,\n y: e.clientY\n };\n\n this.currentPos = currentPos;\n this.delta = {\n x: currentPos.x - this.startPos.x,\n y: currentPos.y - this.startPos.y\n };\n this.keys = {\n shift: e.shiftKey,\n ctrl: e.ctrlKey,\n alt: e.altKey\n };\n\n this.rectDim = this.calc(this);\n this.updateRect(0);\n\n // Move callback\n onMove && onMove(e);\n\n // In case the mouse button was released outside of the window\n if (e.which === 0) {\n this.stop(e);\n }\n }\n\n /**\n * Stop resizing\n * @param {Event} e\n */\n stop(e) {\n const config = this.opts;\n var doc = this.getDocumentEl();\n off(doc, 'mousemove', this.move);\n off(doc, 'keydown', this.handleKeyDown);\n off(doc, 'mouseup', this.stop);\n this.updateRect(1);\n this.toggleFrames();\n isFunction(this.onEnd) && this.onEnd(e, { docs: doc, config });\n }\n\n /**\n * Update rect\n */\n updateRect(store) {\n const el = this.el;\n const resizer = this;\n const config = this.opts;\n const rect = this.rectDim;\n const updateTarget = this.updateTarget;\n const selectedHandler = this.getSelectedHandler();\n const { unitHeight, unitWidth, keyWidth, keyHeight } = config;\n\n // Use custom updating strategy if requested\n if (isFunction(updateTarget)) {\n updateTarget(el, rect, {\n store,\n selectedHandler,\n resizer,\n config\n });\n } else {\n const elStyle = el.style;\n elStyle[keyWidth] = rect.w + unitWidth;\n elStyle[keyHeight] = rect.h + unitHeight;\n }\n\n this.updateContainer();\n }\n\n updateContainer(opt = {}) {\n const { opts, container, el } = this;\n const { style } = container;\n\n if (!opts.avoidContainerUpdate && el) {\n // On component resize container fits the tool,\n // to check if this update is required somewhere else point\n // const toUpdate = ['left', 'top', 'width', 'height'];\n // const rectEl = this.getElementPos(el, { target: 'container' });\n // toUpdate.forEach(pos => (style[pos] = `${rectEl[pos]}px`));\n if (opt.forceShow) style.display = 'block';\n }\n\n this.onUpdateContainer({\n el: container,\n resizer: this,\n opts: {\n ...opts,\n ...opt\n }\n });\n }\n\n /**\n * Get selected handler name\n * @return {string}\n */\n getSelectedHandler() {\n var handlers = this.handlers;\n\n if (!this.selectedHandler) {\n return;\n }\n\n for (let n in handlers) {\n if (handlers[n] === this.selectedHandler) return n;\n }\n }\n\n /**\n * Handle ESC key\n * @param {Event} e\n */\n handleKeyDown(e) {\n if (e.keyCode === 27) {\n // Rollback to initial dimensions\n this.rectDim = this.startDim;\n this.stop(e);\n }\n }\n\n /**\n * Handle mousedown to check if it's possible to start resizing\n * @param {Event} e\n */\n handleMouseDown(e) {\n var el = e.target;\n if (this.isHandler(el)) {\n this.selectedHandler = el;\n this.start(e);\n } else if (el !== this.el) {\n this.selectedHandler = '';\n this.blur();\n }\n }\n\n /**\n * All positioning logic\n * @return {Object}\n */\n calc(data) {\n let value;\n const opts = this.opts || {};\n const step = opts.step;\n const startDim = this.startDim;\n const minDim = opts.minDim;\n const maxDim = opts.maxDim;\n const deltaX = data.delta.x;\n const deltaY = data.delta.y;\n const parentW = this.parentDim.w;\n const parentH = this.parentDim.h;\n const unitWidth = this.opts.unitWidth;\n const unitHeight = this.opts.unitHeight;\n const startW =\n unitWidth === '%' ? (startDim.w / 100) * parentW : startDim.w;\n const startH =\n unitHeight === '%' ? (startDim.h / 100) * parentH : startDim.h;\n var box = {\n t: 0,\n l: 0,\n w: startW,\n h: startH\n };\n\n if (!data) return;\n\n var attr = data.handlerAttr;\n if (~attr.indexOf('r')) {\n value =\n unitWidth === '%'\n ? normalizeFloat(((startW + deltaX * step) / parentW) * 100, 0.01)\n : normalizeFloat(startW + deltaX * step, step);\n value = Math.max(minDim, value);\n maxDim && (value = Math.min(maxDim, value));\n box.w = value;\n }\n if (~attr.indexOf('b')) {\n value =\n unitHeight === '%'\n ? normalizeFloat(((startH + deltaY * step) / parentH) * 100, 0.01)\n : normalizeFloat(startH + deltaY * step, step);\n value = Math.max(minDim, value);\n maxDim && (value = Math.min(maxDim, value));\n box.h = value;\n }\n if (~attr.indexOf('l')) {\n value =\n unitWidth === '%'\n ? normalizeFloat(((startW - deltaX * step) / parentW) * 100, 0.01)\n : normalizeFloat(startW - deltaX * step, step);\n value = Math.max(minDim, value);\n maxDim && (value = Math.min(maxDim, value));\n box.w = value;\n }\n if (~attr.indexOf('t')) {\n value =\n unitHeight === '%'\n ? normalizeFloat(((startH - deltaY * step) / parentH) * 100, 0.01)\n : normalizeFloat(startH - deltaY * step, step);\n value = Math.max(minDim, value);\n maxDim && (value = Math.min(maxDim, value));\n box.h = value;\n }\n\n // Enforce aspect ratio (unless shift key is being held)\n var ratioActive = opts.ratioDefault ? !data.keys.shift : data.keys.shift;\n if (attr.indexOf('c') < 0 && ratioActive) {\n var ratio = startDim.w / startDim.h;\n if (box.w / box.h > ratio) {\n box.h = Math.round(box.w / ratio);\n } else {\n box.w = Math.round(box.h * ratio);\n }\n }\n\n if (~attr.indexOf('l')) {\n box.l = startDim.w - box.w;\n }\n if (~attr.indexOf('t')) {\n box.t = startDim.h - box.h;\n }\n\n return box;\n }\n}\n\nexport default {\n init(opts) {\n return new Resizer(opts);\n }\n};\n","import Dragger from './Dragger';\nimport Sorter from './Sorter';\nimport Resizer from './Resizer';\n\nexport default () => {\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Utils',\n\n /**\n * Initialize module\n */\n init() {\n return this;\n },\n\n destroy() {},\n\n Sorter,\n Resizer,\n Dragger\n };\n};\n","const traitInputAttr = { placeholder: 'eg. Text here' };\n\nexport default {\n assetManager: {\n addButton: 'Add image',\n inputPlh: 'http://path/to/the/image.jpg',\n modalTitle: 'Select Image',\n uploadTitle: 'Drop files here or click to upload'\n },\n // Here just as a reference, GrapesJS core doesn't contain any block,\n // so this should be omitted from other local files\n blockManager: {\n labels: {\n // 'block-id': 'Block Label',\n },\n categories: {\n // 'category-id': 'Category Label',\n }\n },\n domComponents: {\n names: {\n '': 'Box',\n wrapper: 'Body',\n text: 'Text',\n comment: 'Comment',\n image: 'Image',\n video: 'Video',\n label: 'Label',\n link: 'Link',\n map: 'Map',\n tfoot: 'Table foot',\n tbody: 'Table body',\n thead: 'Table head',\n table: 'Table',\n row: 'Table row',\n cell: 'Table cell'\n }\n },\n deviceManager: {\n device: 'Device',\n devices: {\n desktop: 'Desktop',\n tablet: 'Tablet',\n mobileLandscape: 'Mobile Landscape',\n mobilePortrait: 'Mobile Portrait'\n }\n },\n panels: {\n buttons: {\n titles: {\n preview: 'Preview',\n fullscreen: 'Fullscreen',\n 'sw-visibility': 'View components',\n 'export-template': 'View code',\n 'open-sm': 'Open Style Manager',\n 'open-tm': 'Settings',\n 'open-layers': 'Open Layer Manager',\n 'open-blocks': 'Open Blocks'\n }\n }\n },\n selectorManager: {\n label: 'Classes',\n selected: 'Selected',\n emptyState: '- State -',\n states: {\n hover: 'Hover',\n active: 'Click',\n 'nth-of-type(2n)': 'Even/Odd'\n }\n },\n styleManager: {\n empty: 'Select an element before using Style Manager',\n layer: 'Layer',\n fileButton: 'Images',\n sectors: {\n general: 'General',\n layout: 'Layout',\n typography: 'Typography',\n decorations: 'Decorations',\n extra: 'Extra',\n flex: 'Flex',\n dimension: 'Dimension'\n },\n // The core library generates the name by their `property` name\n properties: {\n // float: 'Float',\n }\n },\n traitManager: {\n empty: 'Select an element before using Trait Manager',\n label: 'Component settings',\n traits: {\n // The core library generates the name by their `name` property\n labels: {\n // id: 'Id',\n // alt: 'Alt',\n // title: 'Title',\n // href: 'Href',\n },\n // In a simple trait, like text input, these are used on input attributes\n attributes: {\n id: traitInputAttr,\n alt: traitInputAttr,\n title: traitInputAttr,\n href: { placeholder: 'eg. https://google.com' }\n },\n // In a trait like select, these are used to translate option names\n options: {\n target: {\n false: 'This window',\n _blank: 'New window'\n }\n }\n }\n }\n};\n","import en from './locale/en';\n\nexport default {\n // Locale value\n locale: 'en',\n\n // Fallback locale\n localeFallback: 'en',\n\n // Detect locale by checking browser language\n detectLocale: 1,\n\n // Show warnings when some of the i18n resources are missing\n debug: 0,\n\n // Messages to translate\n messages: {\n en\n }\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/i18n/config.js)\n * ```js\n * const editor = grapesjs.init({\n * i18n: {\n * locale: 'en',\n * localeFallback: 'en',\n * messages: {\n * it: { hello: 'Ciao', ... },\n * ...\n * }\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const i18n = editor.I18n;\n * ```\n *\n * ### Events\n * * `i18n:add` - New set of messages is added\n * * `i18n:update` - The set of messages is updated\n * * `i18n:locale` - Locale changed\n *\n * @module I18n\n */\nimport { isUndefined, isString } from 'underscore';\nimport config from './config';\n\nconst isObj = el => !Array.isArray(el) && el !== null && typeof el === 'object';\n\nconst deepAssign = (...args) => {\n const target = { ...args[0] };\n\n for (let i = 1; i < args.length; i++) {\n const source = { ...args[i] };\n\n for (let key in source) {\n const targValue = target[key];\n const srcValue = source[key];\n\n if (isObj(targValue) && isObj(srcValue)) {\n target[key] = deepAssign(targValue, srcValue);\n } else {\n target[key] = srcValue;\n }\n }\n }\n\n return target;\n};\n\nexport default () => {\n return {\n name: 'I18n',\n\n config,\n\n /**\n * Initialize module\n * @param {Object} config Configurations\n * @private\n */\n init(opts = {}) {\n this.config = {\n ...config,\n ...opts,\n messages: {\n ...config.messages,\n ...(opts.messages || {})\n }\n };\n\n if (this.config.detectLocale) {\n this.config.locale = this._localLang();\n }\n\n this.em = opts.em;\n return this;\n },\n\n /**\n * Get module configurations\n * @returns {Object} Configuration object\n */\n getConfig() {\n return this.config;\n },\n\n /**\n * Update current locale\n * @param {String} locale Locale value\n * @returns {this}\n * @example\n * i18n.setLocale('it');\n */\n setLocale(locale) {\n const { em, config } = this;\n const evObj = { value: locale, valuePrev: config.locale };\n em && em.trigger('i18n:locale', evObj);\n config.locale = locale;\n return this;\n },\n\n /**\n * Get current locale\n * @returns {String} Current locale value\n */\n getLocale() {\n return this.config.locale;\n },\n\n /**\n * Get all messages\n * @param {String} [lang] Specify the language of messages to return\n * @param {Object} [opts] Options\n * @param {Boolean} [opts.debug] Show warnings in case of missing language\n * @returns {Object}\n * @example\n * i18n.getMessages();\n * // -> { en: { hello: '...' }, ... }\n * i18n.getMessages('en');\n * // -> { hello: '...' }\n */\n getMessages(lang, opts = {}) {\n const { messages } = this.config;\n lang &&\n !messages[lang] &&\n this._debug(`'${lang}' i18n lang not found`, opts);\n return lang ? messages[lang] : messages;\n },\n\n /**\n * Set new set of messages\n * @param {Object} msg Set of messages\n * @returns {this}\n * @example\n * i18n.getMessages();\n * // -> { en: { msg1: 'Msg 1', msg2: 'Msg 2', } }\n * i18n.setMessages({ en: { msg2: 'Msg 2 up', msg3: 'Msg 3', } });\n * // Set replaced\n * i18n.getMessages();\n * // -> { en: { msg2: 'Msg 2 up', msg3: 'Msg 3', } }\n */\n setMessages(msg) {\n const { em, config } = this;\n config.messages = msg;\n em && em.trigger('i18n:update', msg);\n return this;\n },\n\n /**\n * Update messages\n * @param {Object} msg Set of messages to add\n * @returns {this}\n * @example\n * i18n.getMessages();\n * // -> { en: { msg1: 'Msg 1', msg2: 'Msg 2', } }\n * i18n.addMessages({ en: { msg2: 'Msg 2 up', msg3: 'Msg 3', } });\n * // Set updated\n * i18n.getMessages();\n * // -> { en: { msg1: 'Msg 1', msg2: 'Msg 2 up', msg3: 'Msg 3', } }\n */\n addMessages(msg) {\n const { em } = this;\n const { messages } = this.config;\n em && em.trigger('i18n:add', msg);\n this.setMessages(deepAssign(messages, msg));\n\n return this;\n },\n\n /**\n * Translate the locale message\n * @param {String} key Label to translate\n * @param {Object} [opts] Options for the translation\n * @param {Object} [opts.params] Params for the translation\n * @param {Boolean} [opts.debug] Show warnings in case of missing resources\n * @returns {String}\n * @example\n * obj.setMessages({\n * en: { msg: 'Msg', msg2: 'Msg {test}'},\n * it: { msg2: 'Msg {test} it'},\n * });\n * obj.t('msg');\n * // -> outputs `Msg`\n * obj.t('msg2', { params: { test: 'hello' } }); // use params\n * // -> outputs `Msg hello`\n * obj.t('msg2', { l: 'it', params: { test: 'hello' } }); // custom local\n * // -> outputs `Msg hello it`\n */\n t(key, opts = {}) {\n const { config } = this;\n const param = opts.params || {};\n const locale = opts.l || this.getLocale();\n const localeFlb = opts.lFlb || config.localeFallback;\n let result = this._getMsg(key, locale, opts);\n\n // Try with fallback\n if (!result) result = this._getMsg(key, localeFlb, opts);\n\n !result &&\n this._debug(`'${key}' i18n key not found in '${locale}' lang`, opts);\n result =\n result && isString(result) ? this._addParams(result, param) : result;\n\n return result;\n },\n\n _localLang() {\n const nav = window.navigator || {};\n const lang = nav.language || nav.userLanguage;\n return lang ? lang.split('-')[0] : 'en';\n },\n\n _addParams(str, params) {\n const reg = new RegExp(`\\{([\\\\w\\\\d-]*)\\}`, 'g');\n return str.replace(reg, (m, val) => params[val] || '').trim();\n },\n\n _getMsg(key, locale, opts = {}) {\n const msgSet = this.getMessages(locale, opts);\n\n // Lang set is missing\n if (!msgSet) return;\n\n let result = msgSet[key];\n\n // Check for nested getter\n if (!result && key.indexOf('.') > 0) {\n result = key.split('.').reduce((lang, key) => {\n if (isUndefined(lang)) return;\n return lang[key];\n }, msgSet);\n }\n\n return result;\n },\n\n _debug(str, opts = {}) {\n const { em, config } = this;\n (opts.debug || config.debug) && em && em.logWarning(str);\n },\n\n destroy() {\n this.config = config;\n this.em = {};\n }\n };\n};\n","// The initial version of this RTE was borrowed from https://github.com/jaredreich/pell\n// and adapted to the GrapesJS's need\n\nimport { on, off } from 'utils/mixins';\n\nconst RTE_KEY = '_rte';\n\nconst btnState = {\n ACTIVE: 1,\n INACTIVE: 0,\n DISABLED: -1\n};\nconst isValidAnchor = rte => {\n const anchor = rte.selection().anchorNode;\n const parentNode = anchor && anchor.parentNode;\n const nextSibling = anchor && anchor.nextSibling;\n return (\n (parentNode && parentNode.nodeName == 'A') ||\n (nextSibling && nextSibling.nodeName == 'A')\n );\n};\nconst defActions = {\n bold: {\n name: 'bold',\n icon: 'B',\n attributes: { title: 'Bold' },\n result: rte => rte.exec('bold')\n },\n italic: {\n name: 'italic',\n icon: 'I',\n attributes: { title: 'Italic' },\n result: rte => rte.exec('italic')\n },\n underline: {\n name: 'underline',\n icon: 'U',\n attributes: { title: 'Underline' },\n result: rte => rte.exec('underline')\n },\n strikethrough: {\n name: 'strikethrough',\n icon: 'S',\n attributes: { title: 'Strike-through' },\n result: rte => rte.exec('strikeThrough')\n },\n link: {\n icon: ``,\n name: 'link',\n attributes: {\n style: 'font-size:1.4rem;padding:0 4px 2px;',\n title: 'Link'\n },\n state: (rte, doc) => {\n if (rte && rte.selection()) {\n return isValidAnchor(rte) ? btnState.ACTIVE : btnState.INACTIVE;\n } else {\n return btnState.INACTIVE;\n }\n },\n result: rte => {\n if (isValidAnchor(rte)) {\n rte.exec('unlink');\n } else {\n rte.insertHTML(`${rte.selection()}`);\n }\n }\n }\n};\n\nexport default class RichTextEditor {\n constructor(settings = {}) {\n const el = settings.el;\n\n if (el[RTE_KEY]) {\n return el[RTE_KEY];\n }\n\n el[RTE_KEY] = this;\n this.setEl(el);\n this.updateActiveActions = this.updateActiveActions.bind(this);\n\n const settAct = settings.actions || [];\n settAct.forEach((action, i) => {\n if (typeof action === 'string') {\n action = defActions[action];\n } else if (defActions[action.name]) {\n action = { ...defActions[action.name], ...action };\n }\n settAct[i] = action;\n });\n const actions = settAct.length\n ? settAct\n : Object.keys(defActions).map(action => defActions[action]);\n\n settings.classes = {\n ...{\n actionbar: 'actionbar',\n button: 'action',\n active: 'active',\n disabled: 'disabled',\n inactive: 'inactive'\n },\n ...settings.classes\n };\n\n const classes = settings.classes;\n let actionbar = settings.actionbar;\n this.actionbar = actionbar;\n this.settings = settings;\n this.classes = classes;\n this.actions = actions;\n\n if (!actionbar) {\n const actionbarCont = settings.actionbarContainer;\n actionbar = document.createElement('div');\n actionbar.className = classes.actionbar;\n actionbarCont.appendChild(actionbar);\n this.actionbar = actionbar;\n actions.forEach(action => this.addAction(action));\n }\n\n settings.styleWithCSS && this.exec('styleWithCSS');\n this.syncActions();\n\n return this;\n }\n\n destroy() {\n this.el = 0;\n this.doc = 0;\n this.actionbar = 0;\n this.settings = {};\n this.classes = {};\n this.actions = [];\n }\n\n setEl(el) {\n this.el = el;\n this.doc = el.ownerDocument;\n }\n\n updateActiveActions() {\n this.getActions().forEach(action => {\n const btn = action.btn;\n const update = action.update;\n const { active, inactive, disabled } = { ...this.classes };\n const state = action.state;\n const name = action.name;\n const doc = this.doc;\n btn.className = btn.className.replace(active, '').trim();\n btn.className = btn.className.replace(inactive, '').trim();\n btn.className = btn.className.replace(disabled, '').trim();\n\n // if there is a state function, which depicts the state,\n // i.e. `active`, `disabled`, then call it\n if (state) {\n switch (state(this, doc)) {\n case btnState.ACTIVE:\n btn.className += ` ${active}`;\n break;\n case btnState.INACTIVE:\n btn.className += ` ${inactive}`;\n break;\n case btnState.DISABLED:\n btn.className += ` ${disabled}`;\n break;\n }\n } else {\n // otherwise default to checking if the name command is supported & enabled\n if (doc.queryCommandSupported(name) && doc.queryCommandState(name)) {\n btn.className += ` ${active}`;\n }\n }\n update && update(this, action);\n });\n }\n\n enable() {\n if (this.enabled) {\n return this;\n }\n\n this.actionbarEl().style.display = '';\n this.el.contentEditable = true;\n on(this.el, 'mouseup keyup', this.updateActiveActions);\n this.syncActions();\n this.updateActiveActions();\n this.el.focus();\n this.enabled = 1;\n return this;\n }\n\n disable() {\n this.actionbarEl().style.display = 'none';\n this.el.contentEditable = false;\n off(this.el, 'mouseup keyup', this.updateActiveActions);\n this.enabled = 0;\n return this;\n }\n\n /**\n * Sync actions with the current RTE\n */\n syncActions() {\n this.getActions().forEach(action => {\n if (this.settings.actionbar) {\n if (\n !action.state ||\n (action.state && action.state(this, this.doc) >= 0)\n ) {\n const event = action.event || 'click';\n action.btn[`on${event}`] = e => {\n action.result(this, action);\n this.updateActiveActions();\n };\n }\n }\n });\n }\n\n /**\n * Add new action to the actionbar\n * @param {Object} action\n * @param {Object} [opts={}]\n */\n addAction(action, opts = {}) {\n const sync = opts.sync;\n const btn = document.createElement('span');\n const icon = action.icon;\n const attr = action.attributes || {};\n btn.className = this.classes.button;\n action.btn = btn;\n\n for (let key in attr) {\n btn.setAttribute(key, attr[key]);\n }\n\n if (typeof icon == 'string') {\n btn.innerHTML = icon;\n } else {\n btn.appendChild(icon);\n }\n\n this.actionbarEl().appendChild(btn);\n\n if (sync) {\n this.actions.push(action);\n this.syncActions();\n }\n }\n\n /**\n * Get the array of current actions\n * @return {Array}\n */\n getActions() {\n return this.actions;\n }\n\n /**\n * Returns the Selection instance\n * @return {Selection}\n */\n selection() {\n return this.doc.getSelection();\n }\n\n /**\n * Execute the command\n * @param {string} command Command name\n * @param {any} [value=null Command's arguments\n */\n exec(command, value = null) {\n this.doc.execCommand(command, false, value);\n }\n\n /**\n * Get the actionbar element\n * @return {HTMLElement}\n */\n actionbarEl() {\n return this.actionbar;\n }\n\n /**\n * Set custom HTML to the selection, useful as the default 'insertHTML' command\n * doesn't work in the same way on all browsers\n * @param {string} value HTML string\n */\n insertHTML(value) {\n let lastNode;\n const doc = this.doc;\n const sel = doc.getSelection();\n\n if (sel && sel.rangeCount) {\n const node = doc.createElement('div');\n const range = sel.getRangeAt(0);\n range.deleteContents();\n node.innerHTML = value;\n Array.prototype.slice.call(node.childNodes).forEach(nd => {\n range.insertNode(nd);\n lastNode = nd;\n });\n\n sel.removeAllRanges();\n sel.addRange(range);\n this.el.focus();\n }\n }\n}\n","export default {\n stylePrefix: 'rte-',\n\n // If true, moves the toolbar below the element when the top canvas\n // edge is reached\n adjustToolbar: 1,\n\n // Default RTE actions\n actions: ['bold', 'italic', 'underline', 'strikethrough', 'link']\n};\n","/**\n * This module allows to customize the built-in toolbar of the Rich Text Editor and use commands from the [HTML Editing APIs](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand).\n * It's highly recommended to keep this toolbar as small as possible, especially from styling commands (eg. 'fontSize') and leave this task to the Style Manager\n *\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/rich_text_editor/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * richTextEditor: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const rte = editor.RichTextEditor;\n * ```\n *\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [remove](#remove)\n * * [getToolbarEl](#gettoolbarel)\n *\n * @module RichTextEditor\n */\n\nimport RichTextEditor from './model/RichTextEditor';\nimport { on, off } from 'utils/mixins';\nimport defaults from './config/config';\n\nexport default () => {\n let config = {};\n let toolbar, actions, lastEl, lastElPos, globalRte;\n\n const hideToolbar = () => {\n const style = toolbar.style;\n const size = '-1000px';\n style.top = size;\n style.left = size;\n style.display = 'none';\n };\n\n return {\n customRte: null,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'RichTextEditor',\n\n getConfig() {\n return config;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} opts Options\n * @private\n */\n init(opts = {}) {\n config = {\n ...defaults,\n ...opts\n };\n const ppfx = config.pStylePrefix;\n\n if (ppfx) {\n config.stylePrefix = ppfx + config.stylePrefix;\n }\n\n this.pfx = config.stylePrefix;\n actions = config.actions || [];\n toolbar = document.createElement('div');\n toolbar.className = `${ppfx}rte-toolbar ${ppfx}one-bg`;\n globalRte = this.initRte(document.createElement('div'));\n\n //Avoid closing on toolbar clicking\n on(toolbar, 'mousedown', e => e.stopPropagation());\n return this;\n },\n\n destroy() {\n const { customRte } = this;\n globalRte && globalRte.destroy();\n customRte && customRte.destroy && customRte.destroy();\n this.actionbar = 0;\n this.actions = 0;\n [config, toolbar, actions, lastEl, lastElPos, globalRte].forEach(\n i => (i = {})\n );\n },\n\n /**\n * Post render callback\n * @param {View} ev\n * @private\n */\n postRender(ev) {\n const canvas = ev.model.get('Canvas');\n toolbar.style.pointerEvents = 'all';\n hideToolbar();\n canvas.getToolsEl().appendChild(toolbar);\n },\n\n /**\n * Init the built-in RTE\n * @param {HTMLElement} el\n * @return {RichTextEditor}\n * @private\n */\n initRte(el) {\n const pfx = this.pfx;\n const actionbarContainer = toolbar;\n const actionbar = this.actionbar;\n const actions = this.actions || [...config.actions];\n const classes = {\n actionbar: `${pfx}actionbar`,\n button: `${pfx}action`,\n active: `${pfx}active`,\n inactive: `${pfx}inactive`,\n disabled: `${pfx}disabled`\n };\n const rte = new RichTextEditor({\n el,\n classes,\n actions,\n actionbar,\n actionbarContainer\n });\n globalRte && globalRte.setEl(el);\n\n if (rte.actionbar) {\n this.actionbar = rte.actionbar;\n }\n\n if (rte.actions) {\n this.actions = rte.actions;\n }\n\n return rte;\n },\n\n /**\n * Add a new action to the built-in RTE toolbar\n * @param {string} name Action name\n * @param {Object} action Action options\n * @example\n * rte.add('bold', {\n * icon: 'B',\n * attributes: {title: 'Bold'},\n * result: rte => rte.exec('bold')\n * });\n * rte.add('link', {\n * icon: document.getElementById('t'),\n * attributes: {title: 'Link',}\n * // Example on it's easy to wrap a selected content\n * result: rte => rte.insertHTML(`${rte.selection()}`)\n * });\n * // An example with fontSize\n * rte.add('fontSize', {\n * icon: ``,\n * // Bind the 'result' on 'change' listener\n * event: 'change',\n * result: (rte, action) => rte.exec('fontSize', action.btn.firstChild.value),\n * // Callback on any input change (mousedown, keydown, etc..)\n * update: (rte, action) => {\n * const value = rte.doc.queryCommandValue(action.name);\n * if (value != 'false') { // value is a string\n * action.btn.firstChild.value = value;\n * }\n * }\n * })\n * // An example with state\n * const isValidAnchor = (rte) => {\n * // a utility function to help determine if the selected is a valid anchor node\n * const anchor = rte.selection().anchorNode;\n * const parentNode = anchor && anchor.parentNode;\n * const nextSibling = anchor && anchor.nextSibling;\n * return (parentNode && parentNode.nodeName == 'A') || (nextSibling && nextSibling.nodeName == 'A')\n * }\n * rte.add('toggleAnchor', {\n * icon: ``,\n * state: (rte, doc) => {\n * if (rte && rte.selection()) {\n * // `btnState` is a integer, -1 for disabled, 0 for inactive, 1 for active\n * return isValidAnchor(rte) ? btnState.ACTIVE : btnState.INACTIVE;\n * } else {\n * return btnState.INACTIVE;\n * }\n * },\n * result: (rte, action) => {\n * if (isValidAnchor(rte)) {\n * rte.exec('unlink');\n * } else {\n * rte.insertHTML(`${rte.selection()}`);\n * }\n * }\n * })\n */\n add(name, action = {}) {\n action.name = name;\n globalRte.addAction(action, { sync: 1 });\n },\n\n /**\n * Get the action by its name\n * @param {string} name Action name\n * @return {Object}\n * @example\n * const action = rte.get('bold');\n * // {name: 'bold', ...}\n */\n get(name) {\n let result;\n globalRte.getActions().forEach(action => {\n if (action.name == name) {\n result = action;\n }\n });\n return result;\n },\n\n /**\n * Get all actions\n * @return {Array}\n */\n getAll() {\n return globalRte.getActions();\n },\n\n /**\n * Remove the action from the toolbar\n * @param {string} name\n * @return {Object} Removed action\n * @example\n * const action = rte.remove('bold');\n * // {name: 'bold', ...}\n */\n remove(name) {\n const actions = this.getAll();\n const action = this.get(name);\n\n if (action) {\n const btn = action.btn;\n const index = actions.indexOf(action);\n btn.parentNode.removeChild(btn);\n actions.splice(index, 1);\n }\n\n return action;\n },\n\n /**\n * Get the toolbar element\n * @return {HTMLElement}\n */\n getToolbarEl() {\n return toolbar;\n },\n\n /**\n * Triggered when the offset of the editor is changed\n * @private\n */\n updatePosition() {\n const un = 'px';\n const canvas = config.em.get('Canvas');\n const { style } = toolbar;\n const pos = canvas.getTargetToElementFixed(lastEl, toolbar, {\n event: 'rteToolbarPosUpdate'\n });\n\n style.top = pos.top + un;\n style.left = 0 + un;\n },\n\n /**\n * Enable rich text editor on the element\n * @param {View} view Component view\n * @param {Object} rte The instance of already defined RTE\n * @private\n * */\n enable(view, rte) {\n lastEl = view.el;\n const canvas = config.em.get('Canvas');\n const em = config.em;\n const el = view.getChildrenContainer();\n const customRte = this.customRte;\n lastElPos = canvas.getElementPos(lastEl);\n\n toolbar.style.display = '';\n rte = customRte ? customRte.enable(el, rte) : this.initRte(el).enable();\n\n if (em) {\n setTimeout(this.updatePosition.bind(this), 0);\n const event =\n 'change:canvasOffset canvasScroll frame:scroll component:update';\n em.off(event, this.updatePosition, this);\n em.on(event, this.updatePosition, this);\n em.trigger('rte:enable', view, rte);\n }\n\n return rte;\n },\n\n /**\n * Unbind rich text editor from the element\n * @param {View} view\n * @param {Object} rte The instance of already defined RTE\n * @private\n * */\n disable(view, rte) {\n const em = config.em;\n const customRte = this.customRte;\n var el = view.getChildrenContainer();\n\n if (customRte) {\n customRte.disable(el, rte);\n } else {\n rte && rte.disable();\n }\n\n hideToolbar();\n em && em.trigger('rte:disable', view, rte);\n }\n };\n};\n","export default {\n // Style prefix\n stylePrefix: 'css-',\n\n // Custom CSS string to render on top\n staticRules: '',\n\n // Default CSS style\n rules: []\n};\n","/**\n * This module contains and manage CSS rules for the template inside the canvas.\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/css_composer/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * cssComposer: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const cssComposer = editor.CssComposer;\n * ```\n *\n * * [load](#load)\n * * [store](#store)\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [clear](#clear)\n * * [setRule](#setrule)\n * * [getRule](#getrule)\n *\n * @module CssComposer\n */\n\nimport { isArray } from 'underscore';\nimport defaults from './config/config';\nimport CssRule from './model/CssRule';\nimport CssRules from './model/CssRules';\nimport CssRulesView from './view/CssRulesView';\nimport Selectors from 'selector_manager/model/Selectors';\nimport Selector from 'selector_manager/model/Selector';\n\nexport default () => {\n let em;\n var c = {};\n var rules, rulesView;\n\n return {\n Selectors,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'CssComposer',\n\n getConfig() {\n return c;\n },\n\n /**\n * Mandatory for the storage manager\n * @type {String}\n * @private\n */\n storageKey() {\n var keys = [];\n var smc = (c.stm && c.stm.getConfig()) || {};\n if (smc.storeCss) keys.push('css');\n if (smc.storeStyles) keys.push('styles');\n return keys;\n },\n\n /**\n * Initializes module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n var elStyle = (c.em && c.em.config.style) || '';\n c.rules = elStyle || c.rules;\n\n em = c.em;\n rules = new CssRules([], c);\n rulesView = new CssRulesView({\n collection: rules,\n config: c\n });\n return this;\n },\n\n /**\n * On load callback\n * @private\n */\n onLoad() {\n rules.add(c.rules);\n },\n\n /**\n * Do stuff after load\n * @param {Editor} em\n * @private\n */\n postLoad(em) {\n const ev = 'add remove';\n const rules = this.getAll();\n const um = em.get('UndoManager');\n um && um.add(rules);\n em.stopListening(rules, ev, this.handleChange);\n em.listenTo(rules, ev, this.handleChange);\n rules.each(rule => this.handleChange(rule, null, { avoidStore: 1 }));\n },\n\n /**\n * Handle rule changes\n * @private\n */\n handleChange(model, val, opts = {}) {\n const ev = 'change:style';\n const um = em.get('UndoManager');\n um && um.add(model);\n const handleUpdates = em.handleUpdates.bind(em);\n em.stopListening(model, ev, handleUpdates);\n em.listenTo(model, ev, handleUpdates);\n !opts.avoidStore && handleUpdates('', '', opts);\n },\n\n /**\n * Load data from the passed object, if the object is empty will try to fetch them\n * autonomously from the storage manager.\n * The fetched data will be added to the collection\n * @param {Object} data Object of data to load\n * @return {Object} Loaded rules\n */\n load(data) {\n var d = data || '';\n\n if (!d && c.stm) {\n d = c.em.getCacheLoad();\n }\n\n var obj = d.styles || '';\n\n if (d.styles) {\n try {\n obj = JSON.parse(d.styles);\n } catch (err) {}\n } else if (d.css) {\n obj = c.em.get('Parser').parseCss(d.css);\n }\n\n if (isArray(obj)) {\n obj.length && rules.reset(obj);\n } else if (obj) {\n rules.reset(obj);\n }\n\n return obj;\n },\n\n /**\n * Store data to the selected storage\n * @param {Boolean} noStore If true, won't store\n * @return {Object} Data to store\n */\n store(noStore) {\n if (!c.stm) return;\n var obj = {};\n var keys = this.storageKey();\n if (keys.indexOf('css') >= 0) obj.css = c.em.getCss();\n if (keys.indexOf('styles') >= 0) obj.styles = JSON.stringify(rules);\n if (!noStore) c.stm.store(obj);\n return obj;\n },\n\n /**\n * Add new rule to the collection, if not yet exists with the same selectors\n * @param {Array} selectors Array of selectors\n * @param {String} state Css rule state\n * @param {String} width For which device this style is oriented\n * @param {Object} props Other props for the rule\n * @param {Object} opts Options for the add of new rule\n * @return {Model}\n * @example\n * var sm = editor.SelectorManager;\n * var sel1 = sm.add('myClass1');\n * var sel2 = sm.add('myClass2');\n * var rule = cssComposer.add([sel1, sel2], 'hover');\n * rule.set('style', {\n * width: '100px',\n * color: '#fff',\n * });\n * */\n add(selectors, state, width, opts = {}, addOpts = {}) {\n var s = state || '';\n var w = width || '';\n var opt = { ...opts };\n var rule = this.get(selectors, s, w, opt);\n\n // do not create rules that were found before\n // unless this is a single at-rule, for which multiple declarations\n // make sense (e.g. multiple `@font-type`s)\n if (rule && rule.config && !rule.config.singleAtRule) {\n return rule;\n } else {\n opt.state = s;\n opt.mediaText = w;\n opt.selectors = [];\n rule = new CssRule(opt, c);\n rule.get('selectors').add(selectors, addOpts);\n rules.add(rule, addOpts);\n return rule;\n }\n },\n\n /**\n * Get the rule\n * @param {Array} selectors Array of selectors\n * @param {String} state Css rule state\n * @param {String} width For which device this style is oriented\n * @param {Object} ruleProps Other rule props\n * @return {Model|null}\n * @example\n * var sm = editor.SelectorManager;\n * var sel1 = sm.add('myClass1');\n * var sel2 = sm.add('myClass2');\n * var rule = cssComposer.get([sel1, sel2], 'hover');\n * // Update the style\n * rule.set('style', {\n * width: '300px',\n * color: '#000',\n * });\n * */\n get(selectors, state, width, ruleProps) {\n var rule = null;\n rules.each(m => {\n if (rule) return;\n if (m.compare(selectors, state, width, ruleProps)) rule = m;\n });\n return rule;\n },\n\n /**\n * Get the collection of rules\n * @return {Collection}\n * */\n getAll() {\n return rules;\n },\n\n /**\n * Remove all rules\n * @return {this}\n */\n clear(opts = {}) {\n this.getAll().reset(null, opts);\n return this;\n },\n\n /**\n * Add a raw collection of rule objects\n * This method overrides styles, in case, of already defined rule\n * @param {Array} data Array of rule objects, eg . [{selectors: ['class1'], style: {....}}, ..]\n * @param {Object} opts Options\n * @return {Array}\n * @private\n */\n addCollection(data, opts = {}) {\n var result = [];\n var d = data instanceof Array ? data : [data];\n\n for (var i = 0, l = d.length; i < l; i++) {\n var rule = d[i] || {};\n if (!rule.selectors) continue;\n var sm = c.em && c.em.get('SelectorManager');\n if (!sm) console.warn('Selector Manager not found');\n var sl = rule.selectors;\n var sels = sl instanceof Array ? sl : [sl];\n var newSels = [];\n\n for (var j = 0, le = sels.length; j < le; j++) {\n var selec = sm.add(sels[j]);\n newSels.push(selec);\n }\n\n var modelExists = this.get(newSels, rule.state, rule.mediaText, rule);\n var model = this.add(newSels, rule.state, rule.mediaText, rule);\n var updateStyle = !modelExists || !opts.avoidUpdateStyle;\n const style = rule.style || {};\n\n if (updateStyle) {\n let styleUpdate = opts.extend\n ? { ...model.get('style'), ...style }\n : style;\n model.set('style', styleUpdate);\n }\n\n result.push(model);\n }\n\n return result;\n },\n\n /**\n * Add/update the CSS rule with a generic selector\n * @param {string} selectors Selector, eg. '.myclass'\n * @param {Object} style Style properties and values\n * @param {Object} [opts={}] Additional properties\n * @param {String} [opts.atRuleType=''] At-rule type, eg. 'media'\n * @param {String} [opts.atRuleParams=''] At-rule parameters, eg. '(min-width: 500px)'\n * @return {CssRule} The new/updated rule\n * @example\n * // Simple class-based rule\n * const rule = cc.setRule('.class1.class2', { color: 'red' });\n * console.log(rule.toCSS()) // output: .class1.class2 { color: red }\n * // With state and other mixed selector\n * const rule = cc.setRule('.class1.class2:hover, div#myid', { color: 'red' });\n * // output: .class1.class2:hover, div#myid { color: red }\n * // With media\n * const rule = cc.setRule('.class1:hover', { color: 'red' }, {\n * atRuleType: 'media',\n * atRuleParams: '(min-width: 500px)',\n * });\n * // output: @media (min-width: 500px) { .class1:hover { color: red } }\n */\n setRule(selectors, style, opts = {}) {\n const { atRuleType, atRuleParams } = opts;\n const node = em.get('Parser').parserCss.checkNode({\n selectors,\n style\n })[0];\n const { state, selectorsAdd } = node;\n const sm = em.get('SelectorManager');\n const selector = sm.add(node.selectors);\n const rule = this.add(selector, state, atRuleParams, {\n selectorsAdd,\n atRule: atRuleType\n });\n rule.setStyle(style, opts);\n return rule;\n },\n\n /**\n * Get the CSS rule by a generic selector\n * @param {string} selectors Selector, eg. '.myclass:hover'\n * @param {String} [opts.atRuleType=''] At-rule type, eg. 'media'\n * @param {String} [opts.atRuleParams=''] At-rule parameters, eg. '(min-width: 500px)'\n * @return {CssRule}\n * @example\n * const rule = cc.getRule('.myclass1:hover');\n * const rule2 = cc.getRule('.myclass1:hover, div#myid');\n * const rule3 = cc.getRule('.myclass1', {\n * atRuleType: 'media',\n * atRuleParams: '(min-width: 500px)',\n * });\n */\n getRule(selectors, opts = {}) {\n const sm = em.get('SelectorManager');\n const node = em.get('Parser').parserCss.checkNode({ selectors })[0];\n const selector = sm.get(node.selectors);\n const { state, selectorsAdd } = node;\n const { atRuleType, atRuleParams } = opts;\n return (\n selector &&\n this.get(selector, state, atRuleParams, {\n selectorsAdd,\n atRule: atRuleType\n })\n );\n },\n\n /**\n * Find rules, in different states (eg. like `:hover`) and media queries, matching the selector.\n * @param {string} selector Selector, eg. '.myclass'\n * @returns {Array}\n * @example\n * // Common scenario, take all the component specific rules\n * const id = someComponent.getId();\n * const rules = cc.getRules(`#${id}`);\n * console.log(rules.map(rule => rule.toCSS()))\n */\n getRules(selector) {\n const rules = this.getAll();\n const result = rules.filter(\n r => r.getSelectors().getFullString() === selector\n );\n return result;\n },\n\n /**\n * Add/update the CSS rule with id selector\n * @param {string} name Id selector name, eg. 'my-id'\n * @param {Object} style Style properties and values\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule} The new/updated rule\n * @private\n * @example\n * const rule = cc.setIdRule('myid', { color: 'red' });\n * const ruleHover = cc.setIdRule('myid', { color: 'blue' }, { state: 'hover' });\n * // This will add current CSS:\n * // #myid { color: red }\n * // #myid:hover { color: blue }\n */\n setIdRule(name, style = {}, opts = {}) {\n const { addOpts = {} } = opts;\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const sm = em.get('SelectorManager');\n const selector = sm.add({ name, type: Selector.TYPE_ID }, addOpts);\n const rule = this.add(selector, state, media, {}, addOpts);\n rule.setStyle(style, { ...opts, ...addOpts });\n return rule;\n },\n\n /**\n * Get the CSS rule by id selector\n * @param {string} name Id selector name, eg. 'my-id'\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule}\n * @private\n * @example\n * const rule = cc.getIdRule('myid');\n * const ruleHover = cc.setIdRule('myid', { state: 'hover' });\n */\n getIdRule(name, opts = {}) {\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const selector = em.get('SelectorManager').get(name, Selector.TYPE_ID);\n return selector && this.get(selector, state, media);\n },\n\n /**\n * Add/update the CSS rule with class selector\n * @param {string} name Class selector name, eg. 'my-class'\n * @param {Object} style Style properties and values\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule} The new/updated rule\n * @private\n * @example\n * const rule = cc.setClassRule('myclass', { color: 'red' });\n * const ruleHover = cc.setClassRule('myclass', { color: 'blue' }, { state: 'hover' });\n * // This will add current CSS:\n * // .myclass { color: red }\n * // .myclass:hover { color: blue }\n */\n setClassRule(name, style = {}, opts = {}) {\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const sm = em.get('SelectorManager');\n const selector = sm.add({ name, type: Selector.TYPE_CLASS });\n const rule = this.add(selector, state, media);\n rule.setStyle(style, opts);\n return rule;\n },\n\n /**\n * Get the CSS rule by class selector\n * @param {string} name Class selector name, eg. 'my-class'\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule}\n * @private\n * @example\n * const rule = cc.getClassRule('myclass');\n * const ruleHover = cc.getClassRule('myclass', { state: 'hover' });\n */\n getClassRule(name, opts = {}) {\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const selector = em.get('SelectorManager').get(name, Selector.TYPE_CLASS);\n return selector && this.get(selector, state, media);\n },\n\n /**\n * Render the block of CSS rules\n * @return {HTMLElement}\n * @private\n */\n render() {\n return rulesView.render().el;\n },\n\n destroy() {\n rules.reset();\n rules.stopListening();\n rulesView.remove();\n [em, rules, rulesView].forEach(i => (i = null));\n c = {};\n }\n };\n};\n","export default {\n stylePrefix: 'com-',\n\n // Default array of commands\n defaults: [],\n\n // If true, stateful commands (with `run` and `stop` methods) can't be runned multiple times.\n // So, if the command is already active, running it again will not execute the `run` method\n strict: 1\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/commands/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * commands: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const commands = editor.Commands;\n * ```\n *\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [extend](#extend)\n * * [has](#has)\n * * [run](#run)\n * * [stop](#stop)\n * * [isActive](#isactive)\n * * [getActive](#getactive)\n *\n * @module Commands\n */\n\nimport { isFunction, includes } from 'underscore';\nimport CommandAbstract from './view/CommandAbstract';\nimport defaults from './config/config';\nimport { eventDrag } from 'dom_components/model/Component';\n\nconst commandsDef = [\n ['preview', 'Preview', 'preview'],\n ['resize', 'Resize', 'resize'],\n ['fullscreen', 'Fullscreen', 'fullscreen'],\n ['copy', 'CopyComponent'],\n ['paste', 'PasteComponent'],\n ['canvas-move', 'CanvasMove'],\n ['canvas-clear', 'CanvasClear'],\n ['open-code', 'ExportTemplate', 'export-template'],\n ['open-layers', 'OpenLayers', 'open-layers'],\n ['open-styles', 'OpenStyleManager', 'open-sm'],\n ['open-traits', 'OpenTraitManager', 'open-tm'],\n ['open-blocks', 'OpenBlocks', 'open-blocks'],\n ['open-assets', 'OpenAssets', 'open-assets'],\n ['component-select', 'SelectComponent', 'select-comp'],\n ['component-outline', 'SwitchVisibility', 'sw-visibility'],\n ['component-offset', 'ShowOffset', 'show-offset'],\n ['component-move', 'MoveComponent', 'move-comp'],\n ['component-next', 'ComponentNext'],\n ['component-prev', 'ComponentPrev'],\n ['component-enter', 'ComponentEnter'],\n ['component-exit', 'ComponentExit', 'select-parent'],\n ['component-delete', 'ComponentDelete'],\n ['component-style-clear', 'ComponentStyleClear'],\n ['component-drag', 'ComponentDrag']\n];\n\nexport default () => {\n let em;\n let c = {};\n const commands = {};\n const defaultCommands = {};\n const active = {};\n\n // Need it here as it would be used below\n const add = function(id, obj) {\n if (isFunction(obj)) obj = { run: obj };\n if (!obj.stop) obj.noStop = 1;\n delete obj.initialize;\n obj.id = id;\n commands[id] = CommandAbstract.extend(obj);\n return this;\n };\n\n return {\n CommandAbstract,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Commands',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config = {}) {\n c = {\n ...defaults,\n ...config\n };\n em = c.em;\n const ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n // Load commands passed via configuration\n Object.keys(c.defaults).forEach(k => {\n const obj = c.defaults[k];\n if (obj.id) this.add(obj.id, obj);\n });\n\n defaultCommands['tlb-delete'] = {\n run(ed) {\n return ed.runCommand('core:component-delete');\n }\n };\n\n defaultCommands['tlb-clone'] = {\n run(ed) {\n ed.runCommand('core:copy');\n ed.runCommand('core:paste');\n }\n };\n\n defaultCommands['tlb-move'] = {\n run(ed, sender, opts = {}) {\n let dragger;\n const em = ed.getModel();\n const event = opts && opts.event;\n const { target } = opts;\n const sel = target || ed.getSelected();\n const selAll = target ? [target] : [...ed.getSelectedAll()];\n const nativeDrag = event && event.type == 'dragstart';\n const defComOptions = { preserveSelected: 1 };\n const modes = ['absolute', 'translate'];\n\n if (!sel || !sel.get('draggable')) {\n return em.logWarning('The element is not draggable');\n }\n\n const mode = sel.get('dmode') || em.get('dmode');\n const hideTlb = () => em.stopDefault(defComOptions);\n const altMode = includes(modes, mode);\n selAll.forEach(sel => sel.trigger('disable'));\n\n // Without setTimeout the ghost image disappears\n nativeDrag ? setTimeout(hideTlb, 0) : hideTlb();\n\n const onStart = data => {\n em.trigger(`${eventDrag}:start`, data);\n };\n const onDrag = data => {\n em.trigger(eventDrag, data);\n };\n const onEnd = (e, opts, data) => {\n selAll.forEach(sel => sel.set('status', 'selected'));\n ed.select(selAll);\n sel.emitUpdate();\n em.trigger(`${eventDrag}:end`, data);\n\n // Defer selectComponent in order to prevent canvas \"freeze\" #2692\n setTimeout(() => em.runDefault(defComOptions));\n\n // Dirty patch to prevent parent selection on drop\n (altMode || data.cancelled) && em.set('_cmpDrag', 1);\n };\n\n if (altMode) {\n // TODO move grabbing func in editor/canvas from the Sorter\n dragger = ed.runCommand('core:component-drag', {\n guidesInfo: 1,\n mode,\n target: sel,\n onStart,\n onDrag,\n onEnd,\n event\n });\n } else {\n if (nativeDrag) {\n event.dataTransfer.setDragImage(sel.view.el, 0, 0);\n //sel.set('status', 'freezed');\n }\n\n const cmdMove = ed.Commands.get('move-comp');\n cmdMove.onStart = onStart;\n cmdMove.onDrag = onDrag;\n cmdMove.onEndMoveFromModel = onEnd;\n cmdMove.initSorterFromModels(selAll);\n }\n\n selAll.forEach(sel => sel.set('status', 'freezed-selected'));\n }\n };\n\n // Core commands\n defaultCommands['core:undo'] = e => e.UndoManager.undo();\n defaultCommands['core:redo'] = e => e.UndoManager.redo();\n commandsDef.forEach(item => {\n const oldCmd = item[2];\n const cmd = require(`./view/${item[1]}`).default;\n const cmdName = `core:${item[0]}`;\n defaultCommands[cmdName] = cmd;\n if (oldCmd) {\n defaultCommands[oldCmd] = cmd;\n // Propogate old commands (can be removed once we stop to call old commands)\n ['run', 'stop'].forEach(name => {\n em.on(`${name}:${oldCmd}`, (...args) =>\n em.trigger(`${name}:${cmdName}`, ...args)\n );\n });\n }\n });\n\n if (c.em) c.model = c.em.get('Canvas');\n\n this.loadDefaultCommands();\n\n return this;\n },\n\n /**\n * Add new command to the collection\n * @param\t{string} id Command's ID\n * @param\t{Object|Function} command Object representing your command,\n * By passing just a function it's intended as a stateless command\n * (just like passing an object with only `run` method).\n * @return {this}\n * @example\n * commands.add('myCommand', {\n * \trun(editor, sender) {\n * \t\talert('Hello world!');\n * \t},\n * \tstop(editor, sender) {\n * \t},\n * });\n * // As a function\n * commands.add('myCommand2', editor => { ... });\n * */\n add,\n\n /**\n * Get command by ID\n * @param\t{string}\tid Command's ID\n * @return {Object} Object representing the command\n * @example\n * var myCommand = commands.get('myCommand');\n * myCommand.run();\n * */\n get(id) {\n let el = commands[id];\n\n if (isFunction(el)) {\n el = new el(c);\n commands[id] = el;\n } else if (!el) {\n em.logWarning(`'${id}' command not found`);\n }\n\n return el;\n },\n\n /**\n * Extend the command. The command to extend should be defined as an object\n * @param\t{string}\tid Command's ID\n * @param {Object} Object with the new command functions\n * @returns {this}\n * @example\n * commands.extend('old-command', {\n * someInnerFunction() {\n * // ...\n * }\n * });\n * */\n extend(id, cmd = {}) {\n const command = this.get(id);\n if (command) {\n const cmdObj = {\n ...command.constructor.prototype,\n ...cmd\n };\n this.add(id, cmdObj);\n // Extend also old name commands if exist\n const oldCmd = commandsDef.filter(\n cmd => `core:${cmd[0]}` === id && cmd[2]\n )[0];\n oldCmd && this.add(oldCmd[2], cmdObj);\n }\n return this;\n },\n\n /**\n * Check if command exists\n * @param\t{string}\tid Command's ID\n * @return {Boolean}\n * */\n has(id) {\n return !!commands[id];\n },\n\n /**\n * Get an object containing all the commands\n * @return {Object}\n */\n getAll() {\n return commands;\n },\n\n /**\n * Execute the command\n * @param {String} id Command ID\n * @param {Object} [options={}] Options\n * @return {*} The return is defined by the command\n * @example\n * commands.run('myCommand', { someOption: 1 });\n */\n run(id, options = {}) {\n return this.runCommand(this.get(id), options);\n },\n\n /**\n * Stop the command\n * @param {String} id Command ID\n * @param {Object} [options={}] Options\n * @return {*} The return is defined by the command\n * @example\n * commands.stop('myCommand', { someOption: 1 });\n */\n stop(id, options = {}) {\n return this.stopCommand(this.get(id), options);\n },\n\n /**\n * Check if the command is active. You activate commands with `run`\n * and disable them with `stop`. If the command was created without `stop`\n * method it can't be registered as active\n * @param {String} id Command id\n * @return {Boolean}\n * @example\n * const cId = 'some-command';\n * commands.run(cId);\n * commands.isActive(cId);\n * // -> true\n * commands.stop(cId);\n * commands.isActive(cId);\n * // -> false\n */\n isActive(id) {\n return this.getActive().hasOwnProperty(id);\n },\n\n /**\n * Get all active commands\n * @return {Object}\n * @example\n * console.log(commands.getActive());\n * // -> { someCommand: itsLastReturn, anotherOne: ... };\n */\n getActive() {\n return active;\n },\n\n /**\n * Load default commands\n * @return {this}\n * @private\n * */\n loadDefaultCommands() {\n for (var id in defaultCommands) {\n this.add(id, defaultCommands[id]);\n }\n\n return this;\n },\n\n /**\n * Run command via its object\n * @param {Object} command\n * @param {Object} options\n * @return {*} Result of the command\n * @private\n */\n runCommand(command, options = {}) {\n let result;\n\n if (command && command.run) {\n const id = command.id;\n const editor = em.get('Editor');\n\n if (!this.isActive(id) || options.force || !c.strict) {\n result = command.callRun(editor, options);\n if (id && command.stop && !command.noStop && !options.abort) {\n active[id] = result;\n }\n }\n }\n\n return result;\n },\n\n /**\n * Stop the command\n * @param {Object} command\n * @param {Object} options\n * @return {*} Result of the command\n * @private\n */\n stopCommand(command, options = {}) {\n let result;\n\n if (command && command.run) {\n const id = command.id;\n const editor = em.get('Editor');\n\n if (this.isActive(id) || options.force || !c.strict) {\n if (id) delete active[id];\n result = command.callStop(editor, options);\n }\n }\n\n return result;\n },\n\n /**\n * Create anonymous Command instance\n * @param {Object} command Command object\n * @return {Command}\n * @private\n * */\n create(command) {\n if (!command.stop) command.noStop = 1;\n const cmd = CommandAbstract.extend(command);\n return new cmd(c);\n },\n\n destroy() {\n [em, c, commands, defaultCommands, active].forEach(i => (i = {}));\n }\n };\n};\n","!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?exports[\"grapesjs-mjml\"]=e():t[\"grapesjs-mjml\"]=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,\"a\",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p=\"\",r(r.s=6)}([function(t,e,r){\"use strict\";r.r(e),e.default={\"grapesjs-mjml\":{category:\"\",panels:{buttons:{undo:\"Undo\",redo:\"Redo\",desktop:\"Desktop\",tablet:\"Tablet\",mobile:\"Mobile\",import:\"Import MJML\"},import:{title:\"Import MJML\",button:\"Import\",label:\"\"},export:{title:\"Export MJML\"}},components:{names:{body:\"Body\",button:\"Button\",column:\"Column\",oneColumn:\"1 Column\",twoColumn:\"2 Columns\",threeColumn:\"3 Columns\",divider:\"Divider\",group:\"Group\",hero:\"Hero\",image:\"Image\",navBar:\"Navbar\",navLink:\"Navbar Link\",section:\"Section\",socialGroup:\"Group Social\",socialElement:\"Social Element\",spacer:\"Spacer\",text:\"Text\",wrapper:\"Wrapper\",raw:\"Raw\"}}}}},function(t,e,r){var n;window,n=function(){return e=[function(t){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t){\"function\"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){var r;e&&(t.super_=e,(r=function(){}).prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t)}},function(t,e,r){var n=r(6),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,r){if(\"number\"==typeof t)throw new TypeError(\"Argument must not be a number\");return i(t,e,r)},a.alloc=function(t,e,r){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return t=i(t),void 0!==e?\"string\"==typeof r?t.fill(e,r):t.fill(e):t.fill(0),t},a.allocUnsafe=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return i(t)},a.allocUnsafeSlow=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return n.SlowBuffer(t)}},function(t){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t,e,r){\"use strict\";(function(t){function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)),n}function o(t){for(var e=1;e=a())throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+a().toString(16)+\" bytes\");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if(\"undefined\"!=typeof ArrayBuffer&&\"function\"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;\"string\"!=typeof t&&(t=\"\"+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":case void 0:return M(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return C(t).length;default:if(n)return M(t).length;e=(\"\"+e).toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if(\"string\"==typeof r?(n=r,r=0):2147483647=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if(\"string\"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if(\"number\"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&\"function\"==typeof Uint8Array.prototype.indexOf?(i?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(t,e,r):b(t,[e],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function b(t,e,r,n,i){var o=1,a=t.length,s=e.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(t.length<2||e.length<2)return-1;a/=o=2,s/=2,r/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i)for(var c=-1,l=r;l>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(t){var e=t.length;if(e<=v)return String.fromCharCode.apply(String,t);for(var r=\"\",n=0;nthis.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\"\";if((r>>>=0)<=(e>>>=0))return\"\";for(t=t||\"utf8\";;)switch(t){case\"hex\":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||nr&&(t+=\" ... \")),\"\"},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError(\"out of range index\");if(i<=n&&r<=e)return 0;if(i<=n)return-1;if(r<=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),c=this.slice(n,i),l=t.slice(e,r),f=0;fthis.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n=n||\"utf8\";for(var o=!1;;)switch(n){case\"hex\":return function(t,e,r,n){r=Number(r)||0;var i=t.length-r;if((!n||i<(n=Number(n)))&&(n=i),(i=e.length)%2!=0)throw new TypeError(\"Invalid hex string\");i/2>8,n%=256,i.push(n),i.push(r);return i}(e,t.length-r),t,r,n)}(this,t,e,r);default:if(o)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};var v=4096;function w(t,e,r){if(t%1!=0||t<0)throw new RangeError(\"offset is not uint\");if(rt.length)throw new RangeError(\"Index out of range\")}function T(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function A(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function x(t,e,r,n){if(r+n>t.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function S(t,e,r,n,o){return o||x(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function O(t,e,r,n,o){return o||x(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):r>>8):T(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):A(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):A(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){t=+t,e|=0,n||E(this,t,e,r,(n=Math.pow(2,8*r-1))-1,-n);var i=0,o=1,a=0;for(this[e]=255&t;++i>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){t=+t,e|=0,n||E(this,t,e,r,(n=Math.pow(2,8*r-1))-1,-n);var i=r-1,o=1,a=0;for(this[e+i]=255&t;0<=--i&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):A(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||E(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):A(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return S(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return S(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return O(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return O(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r=r||0,n||0===n||(n=this.length),e>=t.length&&(e=t.length),e=e||0,0=this.length)throw new RangeError(\"sourceStart out of bounds\");if(n<0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,\"number\"==typeof(t=t||0))for(s=e;s>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error(\"Invalid code point\");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function C(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\\s+|\\s+$/g,\"\")}(t).replace(k,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function R(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(9))},function(t){t.exports={AT_RULE:\"at-rule\",AT_RULE_BLOCK:\"at-rule-block\",AT_RULE_BLOCK_SCOPE:\"at-rule-block-scope\",COMMENT:\"comment\",NESTED_BLOCK:\"nested-block\",NESTED_BLOCK_SCOPE:\"nested-block-scope\",PROPERTY:\"property\",PROPERTY_BLOCK:\"property-block\",PROPERTY_NAME:\"property-name\",PROPERTY_VALUE:\"property-value\",RAW:\"raw\",RULE:\"rule\",RULE_SCOPE:\"rule-scope\"}},function(t){var e=Array.isArray;t.exports=e},function(t){function e(t){return(e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}var r=function(){return this}();try{r=r||new Function(\"return this\")()}catch(t){\"object\"===(\"undefined\"==typeof window?\"undefined\":e(window))&&(r=window)}t.exports=r},function(t,e,r){var n=r(169);function i(t,e){t.output.push(\"string\"==typeof e?e:e[1])}function o(){return{output:[],store:i}}t.exports={all:function(t){var e=o();return n.all(e,t),e.output.join(\"\")},body:function(t){var e=o();return n.body(e,t),e.output.join(\"\")},property:function(t,e){var r=o();return n.property(r,t,e,!0),r.output.join(\"\")},rules:function(t){var e=o();return n.rules(e,t),e.output.join(\"\")},value:function(t){var e=o();return n.value(e,t),e.output.join(\"\")}}},function(t,e,r){(function(t){function e(t){return(e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}!function(t,n){\"use strict\";function i(t,e){if(!t)throw new Error(e||\"Assertion failed\")}function o(t,e){function r(){}t.super_=e,r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,(this.red=null)!==t&&(\"le\"!==e&&\"be\"!==e||(r=e,e=10),this._init(t||0,e||10,r||\"be\"))}var s;\"object\"===e(t)?t.exports=a:n.BN=a,(a.BN=a).wordSize=26;try{s=r(779).Buffer}catch(t){}function u(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o>>26-s&67108863,26<=(s+=24)&&(s-=26,n++);else if(\"le\"===r)for(n=a=0;a>>26-s&67108863,26<=(s+=24)&&(s-=26,n++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r,n=0;n>>26-i&4194303,26<=(i+=24)&&(i-=26,o++);n+6!==e&&(r=u(t,e,n+6),this.words[o]|=r<>>26-i&4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0];for(var n=0,i=this.length=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l\"};var l=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0,i=(n=(r.length=n)-1|0,67108863&(f=(0|t.words[0])*(0|e.words[0]))),o=f/67108864|0;r.words[0]=i;for(var a=1;a>>26,u=67108863&o,c=Math.min(a,e.length-1),l=Math.max(0,a-t.length+1);l<=c;l++){var f,h=a-l|0;s+=(f=(0|t.words[h])*(0|e.words[l])+u)/67108864|0,u=67108863&f}r.words[a]=0|u,o=0|s}return 0!==o?r.words[a]=0|o:r.length--,r.strip()}a.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||\"hex\"===t){u=\"\";for(var r=0,n=0,o=0;o>>24-r&16777215)||o!==this.length-1?l[6-s.length]+s+u:s+u;26<=(r+=2)&&(r-=26,o--)}for(0!==n&&(u=n.toString(16)+u);u.length%e!=0;)u=\"0\"+u;return 0!==this.negative&&(u=\"-\"+u),u}if(t===(0|t)&&2<=t&&t<=36){var c=f[t],p=h[t];for(u=\"\",(d=this.clone()).negative=0;!d.isZero();){var d,m=d.modn(p).toString(t);u=(d=d.idivn(p)).isZero()?m+u:l[c-m.length]+m+u}for(this.isZero()&&(u=\"0\"+u);u.length%e!=0;)u=\"0\"+u;return 0!==this.negative&&(u=\"-\"+u),u}i(!1,\"Base should be between 2 and 36\")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:2>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t;return t=0,0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},a.prototype.bitLength=function(){var t=this.words[this.length-1];return t=this._countBits(t),26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){for(var e=this.length>t.length?t:this,r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){for(var e,r=this.length>t.length?(e=this,t):(e=t,this),n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i(\"number\"==typeof t&&0<=t);var e=0|Math.ceil(t/26);t%=26,this._expand(e),0>26-t),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i(\"number\"==typeof t&&0<=t);var r=t/26|0;return t%=26,this._expand(1+r),this.words[r]=e?this.words[r]|1<t.length?(r=this,t):(r=t,this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;n=0>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,c=8191&(G=0|n[1]),l=G>>>13,f=8191&(K=0|n[2]),h=K>>>13,p=0|n[3],d=8191&p,m=p>>>13,g=8191&(W=0|n[4]),b=W>>>13,_=8191&(Y=0|n[5]),y=Y>>>13,v=0|n[6],w=8191&v,E=v>>>13,T=8191&(X=0|n[7]),A=X>>>13,x=8191&($=0|n[8]),S=$>>>13,O=8191&(Q=0|n[9]),k=Q>>>13,M=8191&(Z=0|i[0]),C=Z>>>13,R=0|i[1],j=8191&R,N=R>>>13,L=0|i[2],P=8191&L,D=L>>>13,I=8191&(J=0|i[3]),B=J>>>13,q=0|i[4],U=8191&q,H=q>>>13,F=0|i[5],z=8191&F,V=F>>>13,G=8191&(a=0|i[6]),K=a>>>13,W=8191&(p=0|i[7]),Y=p>>>13,X=8191&(v=0|i[8]),$=v>>>13,Q=8191&(n=0|i[9]),Z=n>>>13;r.negative=t.negative^e.negative,r.length=19;var J=(0+Math.imul(s,M)|0)+((8191&(L=Math.imul(s,C)+Math.imul(u,M)|0))<<13)|0,tt=(Math.imul(u,C)+(L>>>13)|0)+(J>>>26)|0;return J&=67108863,R=Math.imul(c,M),L=Math.imul(c,C)+Math.imul(l,M)|0,q=Math.imul(l,C),F=(tt+(R+Math.imul(s,j)|0)|0)+((8191&(L=(L+Math.imul(s,N)|0)+Math.imul(u,j)|0))<<13)|0,tt=((q+Math.imul(u,N)|0)+(L>>>13)|0)+(F>>>26)|0,F&=67108863,R=Math.imul(f,M),L=Math.imul(f,C)+Math.imul(h,M)|0,q=Math.imul(h,C),R=R+Math.imul(c,j)|0,L=(L+Math.imul(c,N)|0)+Math.imul(l,j)|0,q=q+Math.imul(l,N)|0,a=(tt+(R+Math.imul(s,P)|0)|0)+((8191&(L=(L+Math.imul(s,D)|0)+Math.imul(u,P)|0))<<13)|0,tt=((q+Math.imul(u,D)|0)+(L>>>13)|0)+(a>>>26)|0,a&=67108863,R=Math.imul(d,M),L=Math.imul(d,C)+Math.imul(m,M)|0,q=Math.imul(m,C),R=R+Math.imul(f,j)|0,L=(L+Math.imul(f,N)|0)+Math.imul(h,j)|0,q=q+Math.imul(h,N)|0,R=R+Math.imul(c,P)|0,L=(L+Math.imul(c,D)|0)+Math.imul(l,P)|0,q=q+Math.imul(l,D)|0,p=(tt+(R+Math.imul(s,I)|0)|0)+((8191&(L=(L+Math.imul(s,B)|0)+Math.imul(u,I)|0))<<13)|0,tt=((q+Math.imul(u,B)|0)+(L>>>13)|0)+(p>>>26)|0,p&=67108863,R=Math.imul(g,M),L=Math.imul(g,C)+Math.imul(b,M)|0,q=Math.imul(b,C),R=R+Math.imul(d,j)|0,L=(L+Math.imul(d,N)|0)+Math.imul(m,j)|0,q=q+Math.imul(m,N)|0,R=R+Math.imul(f,P)|0,L=(L+Math.imul(f,D)|0)+Math.imul(h,P)|0,q=q+Math.imul(h,D)|0,R=R+Math.imul(c,I)|0,L=(L+Math.imul(c,B)|0)+Math.imul(l,I)|0,q=q+Math.imul(l,B)|0,v=(tt+(R+Math.imul(s,U)|0)|0)+((8191&(L=(L+Math.imul(s,H)|0)+Math.imul(u,U)|0))<<13)|0,tt=((q+Math.imul(u,H)|0)+(L>>>13)|0)+(v>>>26)|0,v&=67108863,R=Math.imul(_,M),L=Math.imul(_,C)+Math.imul(y,M)|0,q=Math.imul(y,C),R=R+Math.imul(g,j)|0,L=(L+Math.imul(g,N)|0)+Math.imul(b,j)|0,q=q+Math.imul(b,N)|0,R=R+Math.imul(d,P)|0,L=(L+Math.imul(d,D)|0)+Math.imul(m,P)|0,q=q+Math.imul(m,D)|0,R=R+Math.imul(f,I)|0,L=(L+Math.imul(f,B)|0)+Math.imul(h,I)|0,q=q+Math.imul(h,B)|0,R=R+Math.imul(c,U)|0,L=(L+Math.imul(c,H)|0)+Math.imul(l,U)|0,q=q+Math.imul(l,H)|0,i=(tt+(R+Math.imul(s,z)|0)|0)+((8191&(L=(L+Math.imul(s,V)|0)+Math.imul(u,z)|0))<<13)|0,tt=((q+Math.imul(u,V)|0)+(L>>>13)|0)+(i>>>26)|0,i&=67108863,R=Math.imul(w,M),L=Math.imul(w,C)+Math.imul(E,M)|0,q=Math.imul(E,C),R=R+Math.imul(_,j)|0,L=(L+Math.imul(_,N)|0)+Math.imul(y,j)|0,q=q+Math.imul(y,N)|0,R=R+Math.imul(g,P)|0,L=(L+Math.imul(g,D)|0)+Math.imul(b,P)|0,q=q+Math.imul(b,D)|0,R=R+Math.imul(d,I)|0,L=(L+Math.imul(d,B)|0)+Math.imul(m,I)|0,q=q+Math.imul(m,B)|0,R=R+Math.imul(f,U)|0,L=(L+Math.imul(f,H)|0)+Math.imul(h,U)|0,q=q+Math.imul(h,H)|0,R=R+Math.imul(c,z)|0,L=(L+Math.imul(c,V)|0)+Math.imul(l,z)|0,q=q+Math.imul(l,V)|0,n=(tt+(R+Math.imul(s,G)|0)|0)+((8191&(L=(L+Math.imul(s,K)|0)+Math.imul(u,G)|0))<<13)|0,tt=((q+Math.imul(u,K)|0)+(L>>>13)|0)+(n>>>26)|0,n&=67108863,R=Math.imul(T,M),L=Math.imul(T,C)+Math.imul(A,M)|0,q=Math.imul(A,C),R=R+Math.imul(w,j)|0,L=(L+Math.imul(w,N)|0)+Math.imul(E,j)|0,q=q+Math.imul(E,N)|0,R=R+Math.imul(_,P)|0,L=(L+Math.imul(_,D)|0)+Math.imul(y,P)|0,q=q+Math.imul(y,D)|0,R=R+Math.imul(g,I)|0,L=(L+Math.imul(g,B)|0)+Math.imul(b,I)|0,q=q+Math.imul(b,B)|0,R=R+Math.imul(d,U)|0,L=(L+Math.imul(d,H)|0)+Math.imul(m,U)|0,q=q+Math.imul(m,H)|0,R=R+Math.imul(f,z)|0,L=(L+Math.imul(f,V)|0)+Math.imul(h,z)|0,q=q+Math.imul(h,V)|0,R=R+Math.imul(c,G)|0,L=(L+Math.imul(c,K)|0)+Math.imul(l,G)|0,q=q+Math.imul(l,K)|0,t=(tt+(R+Math.imul(s,W)|0)|0)+((8191&(L=(L+Math.imul(s,Y)|0)+Math.imul(u,W)|0))<<13)|0,tt=((q+Math.imul(u,Y)|0)+(L>>>13)|0)+(t>>>26)|0,t&=67108863,R=Math.imul(x,M),L=Math.imul(x,C)+Math.imul(S,M)|0,q=Math.imul(S,C),R=R+Math.imul(T,j)|0,L=(L+Math.imul(T,N)|0)+Math.imul(A,j)|0,q=q+Math.imul(A,N)|0,R=R+Math.imul(w,P)|0,L=(L+Math.imul(w,D)|0)+Math.imul(E,P)|0,q=q+Math.imul(E,D)|0,R=R+Math.imul(_,I)|0,L=(L+Math.imul(_,B)|0)+Math.imul(y,I)|0,q=q+Math.imul(y,B)|0,R=R+Math.imul(g,U)|0,L=(L+Math.imul(g,H)|0)+Math.imul(b,U)|0,q=q+Math.imul(b,H)|0,R=R+Math.imul(d,z)|0,L=(L+Math.imul(d,V)|0)+Math.imul(m,z)|0,q=q+Math.imul(m,V)|0,R=R+Math.imul(f,G)|0,L=(L+Math.imul(f,K)|0)+Math.imul(h,G)|0,q=q+Math.imul(h,K)|0,R=R+Math.imul(c,W)|0,L=(L+Math.imul(c,Y)|0)+Math.imul(l,W)|0,q=q+Math.imul(l,Y)|0,e=(tt+(R+Math.imul(s,X)|0)|0)+((8191&(L=(L+Math.imul(s,$)|0)+Math.imul(u,X)|0))<<13)|0,tt=((q+Math.imul(u,$)|0)+(L>>>13)|0)+(e>>>26)|0,e&=67108863,R=Math.imul(O,M),L=Math.imul(O,C)+Math.imul(k,M)|0,q=Math.imul(k,C),R=R+Math.imul(x,j)|0,L=(L+Math.imul(x,N)|0)+Math.imul(S,j)|0,q=q+Math.imul(S,N)|0,R=R+Math.imul(T,P)|0,L=(L+Math.imul(T,D)|0)+Math.imul(A,P)|0,q=q+Math.imul(A,D)|0,R=R+Math.imul(w,I)|0,L=(L+Math.imul(w,B)|0)+Math.imul(E,I)|0,q=q+Math.imul(E,B)|0,R=R+Math.imul(_,U)|0,L=(L+Math.imul(_,H)|0)+Math.imul(y,U)|0,q=q+Math.imul(y,H)|0,R=R+Math.imul(g,z)|0,L=(L+Math.imul(g,V)|0)+Math.imul(b,z)|0,q=q+Math.imul(b,V)|0,R=R+Math.imul(d,G)|0,L=(L+Math.imul(d,K)|0)+Math.imul(m,G)|0,q=q+Math.imul(m,K)|0,R=R+Math.imul(f,W)|0,L=(L+Math.imul(f,Y)|0)+Math.imul(h,W)|0,q=q+Math.imul(h,Y)|0,R=R+Math.imul(c,X)|0,L=(L+Math.imul(c,$)|0)+Math.imul(l,X)|0,q=q+Math.imul(l,$)|0,s=(tt+(R+Math.imul(s,Q)|0)|0)+((8191&(L=(L+Math.imul(s,Z)|0)+Math.imul(u,Q)|0))<<13)|0,tt=((q+Math.imul(u,Z)|0)+(L>>>13)|0)+(s>>>26)|0,s&=67108863,R=Math.imul(O,j),L=Math.imul(O,N)+Math.imul(k,j)|0,q=Math.imul(k,N),R=R+Math.imul(x,P)|0,L=(L+Math.imul(x,D)|0)+Math.imul(S,P)|0,q=q+Math.imul(S,D)|0,R=R+Math.imul(T,I)|0,L=(L+Math.imul(T,B)|0)+Math.imul(A,I)|0,q=q+Math.imul(A,B)|0,R=R+Math.imul(w,U)|0,L=(L+Math.imul(w,H)|0)+Math.imul(E,U)|0,q=q+Math.imul(E,H)|0,R=R+Math.imul(_,z)|0,L=(L+Math.imul(_,V)|0)+Math.imul(y,z)|0,q=q+Math.imul(y,V)|0,R=R+Math.imul(g,G)|0,L=(L+Math.imul(g,K)|0)+Math.imul(b,G)|0,q=q+Math.imul(b,K)|0,R=R+Math.imul(d,W)|0,L=(L+Math.imul(d,Y)|0)+Math.imul(m,W)|0,q=q+Math.imul(m,Y)|0,R=R+Math.imul(f,X)|0,L=(L+Math.imul(f,$)|0)+Math.imul(h,X)|0,q=q+Math.imul(h,$)|0,c=(tt+(R+Math.imul(c,Q)|0)|0)+((8191&(L=(L+Math.imul(c,Z)|0)+Math.imul(l,Q)|0))<<13)|0,tt=((q+Math.imul(l,Z)|0)+(L>>>13)|0)+(c>>>26)|0,c&=67108863,R=Math.imul(O,P),L=Math.imul(O,D)+Math.imul(k,P)|0,q=Math.imul(k,D),R=R+Math.imul(x,I)|0,L=(L+Math.imul(x,B)|0)+Math.imul(S,I)|0,q=q+Math.imul(S,B)|0,R=R+Math.imul(T,U)|0,L=(L+Math.imul(T,H)|0)+Math.imul(A,U)|0,q=q+Math.imul(A,H)|0,R=R+Math.imul(w,z)|0,L=(L+Math.imul(w,V)|0)+Math.imul(E,z)|0,q=q+Math.imul(E,V)|0,R=R+Math.imul(_,G)|0,L=(L+Math.imul(_,K)|0)+Math.imul(y,G)|0,q=q+Math.imul(y,K)|0,R=R+Math.imul(g,W)|0,L=(L+Math.imul(g,Y)|0)+Math.imul(b,W)|0,q=q+Math.imul(b,Y)|0,R=R+Math.imul(d,X)|0,L=(L+Math.imul(d,$)|0)+Math.imul(m,X)|0,q=q+Math.imul(m,$)|0,f=(tt+(R+Math.imul(f,Q)|0)|0)+((8191&(L=(L+Math.imul(f,Z)|0)+Math.imul(h,Q)|0))<<13)|0,tt=((q+Math.imul(h,Z)|0)+(L>>>13)|0)+(f>>>26)|0,f&=67108863,R=Math.imul(O,I),L=Math.imul(O,B)+Math.imul(k,I)|0,q=Math.imul(k,B),R=R+Math.imul(x,U)|0,L=(L+Math.imul(x,H)|0)+Math.imul(S,U)|0,q=q+Math.imul(S,H)|0,R=R+Math.imul(T,z)|0,L=(L+Math.imul(T,V)|0)+Math.imul(A,z)|0,q=q+Math.imul(A,V)|0,R=R+Math.imul(w,G)|0,L=(L+Math.imul(w,K)|0)+Math.imul(E,G)|0,q=q+Math.imul(E,K)|0,R=R+Math.imul(_,W)|0,L=(L+Math.imul(_,Y)|0)+Math.imul(y,W)|0,q=q+Math.imul(y,Y)|0,R=R+Math.imul(g,X)|0,L=(L+Math.imul(g,$)|0)+Math.imul(b,X)|0,q=q+Math.imul(b,$)|0,d=(tt+(R+Math.imul(d,Q)|0)|0)+((8191&(L=(L+Math.imul(d,Z)|0)+Math.imul(m,Q)|0))<<13)|0,tt=((q+Math.imul(m,Z)|0)+(L>>>13)|0)+(d>>>26)|0,d&=67108863,R=Math.imul(O,U),L=Math.imul(O,H)+Math.imul(k,U)|0,q=Math.imul(k,H),R=R+Math.imul(x,z)|0,L=(L+Math.imul(x,V)|0)+Math.imul(S,z)|0,q=q+Math.imul(S,V)|0,R=R+Math.imul(T,G)|0,L=(L+Math.imul(T,K)|0)+Math.imul(A,G)|0,q=q+Math.imul(A,K)|0,R=R+Math.imul(w,W)|0,L=(L+Math.imul(w,Y)|0)+Math.imul(E,W)|0,q=q+Math.imul(E,Y)|0,R=R+Math.imul(_,X)|0,L=(L+Math.imul(_,$)|0)+Math.imul(y,X)|0,q=q+Math.imul(y,$)|0,g=(tt+(R+Math.imul(g,Q)|0)|0)+((8191&(L=(L+Math.imul(g,Z)|0)+Math.imul(b,Q)|0))<<13)|0,tt=((q+Math.imul(b,Z)|0)+(L>>>13)|0)+(g>>>26)|0,g&=67108863,R=Math.imul(O,z),L=Math.imul(O,V)+Math.imul(k,z)|0,q=Math.imul(k,V),R=R+Math.imul(x,G)|0,L=(L+Math.imul(x,K)|0)+Math.imul(S,G)|0,q=q+Math.imul(S,K)|0,R=R+Math.imul(T,W)|0,L=(L+Math.imul(T,Y)|0)+Math.imul(A,W)|0,q=q+Math.imul(A,Y)|0,R=R+Math.imul(w,X)|0,L=(L+Math.imul(w,$)|0)+Math.imul(E,X)|0,q=q+Math.imul(E,$)|0,_=(tt+(R+Math.imul(_,Q)|0)|0)+((8191&(L=(L+Math.imul(_,Z)|0)+Math.imul(y,Q)|0))<<13)|0,tt=((q+Math.imul(y,Z)|0)+(L>>>13)|0)+(_>>>26)|0,_&=67108863,R=Math.imul(O,G),L=Math.imul(O,K)+Math.imul(k,G)|0,q=Math.imul(k,K),R=R+Math.imul(x,W)|0,L=(L+Math.imul(x,Y)|0)+Math.imul(S,W)|0,q=q+Math.imul(S,Y)|0,R=R+Math.imul(T,X)|0,L=(L+Math.imul(T,$)|0)+Math.imul(A,X)|0,q=q+Math.imul(A,$)|0,w=(tt+(R+Math.imul(w,Q)|0)|0)+((8191&(L=(L+Math.imul(w,Z)|0)+Math.imul(E,Q)|0))<<13)|0,tt=((q+Math.imul(E,Z)|0)+(L>>>13)|0)+(w>>>26)|0,w&=67108863,R=Math.imul(O,W),L=Math.imul(O,Y)+Math.imul(k,W)|0,q=Math.imul(k,Y),R=R+Math.imul(x,X)|0,L=(L+Math.imul(x,$)|0)+Math.imul(S,X)|0,q=q+Math.imul(S,$)|0,T=(tt+(R+Math.imul(T,Q)|0)|0)+((8191&(L=(L+Math.imul(T,Z)|0)+Math.imul(A,Q)|0))<<13)|0,tt=((q+Math.imul(A,Z)|0)+(L>>>13)|0)+(T>>>26)|0,T&=67108863,R=Math.imul(O,X),L=Math.imul(O,$)+Math.imul(k,X)|0,q=Math.imul(k,$),x=(tt+(R+Math.imul(x,Q)|0)|0)+((8191&(L=(L+Math.imul(x,Z)|0)+Math.imul(S,Q)|0))<<13)|0,tt=((q+Math.imul(S,Z)|0)+(L>>>13)|0)+(x>>>26)|0,x&=67108863,Q=(tt+Math.imul(O,Q)|0)+((8191&(L=Math.imul(O,Z)+Math.imul(k,Q)|0))<<13)|0,tt=(Math.imul(k,Z)+(L>>>13)|0)+(Q>>>26)|0,Q&=67108863,o[0]=J,o[1]=F,o[2]=a,o[3]=p,o[4]=v,o[5]=i,o[6]=n,o[7]=t,o[8]=e,o[9]=s,o[10]=c,o[11]=f,o[12]=d,o[13]=g,o[14]=_,o[15]=w,o[16]=T,o[17]=x,o[18]=Q,0!=tt&&(o[19]=tt,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(d=p),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return(10===this.length&&10===t.length?d:r<63?p:r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}:m)(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)r++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n>>26-e<<26-e;if(0!=e){for(var o=0,a=0;a>>26-e}o&&(this.words[a]=o,this.length++)}if(0!=r){for(a=this.length-1;0<=a;a--)this.words[a+r]=this.words[a];for(a=0;a>>o<a)for(this.length-=a,c=0;c>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i(\"number\"==typeof t&&0<=t),t=(t-(e=t%26))/26;var e=1<>>e<>26)-(u/67108864|0),this.words[s+r]=67108863&n}for(;s>26,this.words[s+r]=67108863&n;if(0===a)return this.strip();for(i(-1===a),s=a=0;s>26,this.words[s]=67108863&n;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,u=n.length-i.length;if(\"mod\"!==e){(s=new a(null)).length=1+u,s.words=new Array(s.length);for(var c=0;cthis.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?\"div\"===e?{div:this.divn(t.words[0]),mod:null}:\"mod\"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,o,s},a.prototype.div=function(t){return this.divmod(t,\"div\",!1).div},a.prototype.mod=function(t){return this.divmod(t,\"mod\",!1).mod},a.prototype.umod=function(t){return this.divmod(t,\"mod\",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1);return t=t.andln(1),(n=r.cmp(n))<0||1===t&&0===n?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;0<=n;n--)r=(e*r+(0|this.words[n]))%t;return r},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;0<=r;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());for(var e=this,r=t.clone(),n=(e=0!==e.negative?e.umod(t):e.clone(),new a(1)),o=new a(0),s=new a(0),u=new a(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,p=1;0==(e.words[0]&p)&&h<26;++h,p<<=1);if(0>>26,o&=67108863,this.words[n]=o}return 0!==r&&(this.words[n]=r,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e=t<0;return 0===this.negative||e?0===this.negative&&e?1:(this.strip(),t=1t.length)return 1;if(this.lengththis.n;);return 0===(t=e>>22,i=o}i>>>=22,0===(t.words[n-10]=i)&&10>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(b[t])return b[t];var e;if(\"k256\"===t)e=new y;else if(\"p224\"===t)e=new v;else if(\"p192\"===t)e=new w;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new E}return b[t]=e},T.prototype._verify1=function(t){i(0===t.negative,\"red works only with positives\"),i(t.red,\"red works only with red numbers\")},T.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),\"red works only with positives\"),i(t.red&&t.red===e.red,\"red works only with red numbers\")},T.prototype.imod=function(t){return(this.prime?this.prime.ireduce(t):t.umod(this.m))._forceRed(this)},T.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},T.prototype.add=function(t,e){return this._verify2(t,e),0<=(e=t.add(e)).cmp(this.m)&&e.isub(this.m),e._forceRed(this)},T.prototype.iadd=function(t,e){return this._verify2(t,e),0<=(e=t.iadd(e)).cmp(this.m)&&e.isub(this.m),e},T.prototype.sub=function(t,e){return this._verify2(t,e),(e=t.sub(e)).cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},T.prototype.isub=function(t,e){return this._verify2(t,e),(e=t.isub(e)).cmpn(0)<0&&e.iadd(this.m),e},T.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},T.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},T.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},T.prototype.isqr=function(t){return this.imul(t,t.clone())},T.prototype.sqr=function(t){return this.mul(t,t)},T.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e)return e=this.m.add(new a(1)).iushrn(2),this.pow(t,e);for(var r=this.m.subn(1),n=0;!r.isZero()&&0===r.andln(1);)n++,r.iushrn(1);i(!r.isZero());for(var o=new a(1).toRed(this),s=o.redNeg(),u=this.m.subn(1).iushrn(1),c=new a(2*(c=this.m.bitLength())*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var l=this.pow(c,r),f=this.pow(t,r.addn(1).iushrn(1)),h=this.pow(t,r),p=n;0!==h.cmp(o);){for(var d=h,m=0;0!==d.cmp(o);m++)d=d.redSqr();i(m>l&1;i!==r[0]&&(i=this.sqr(i)),0!=f||0!==o?(o<<=1,o|=f,(4==++s||0===n&&0===l)&&(i=this.mul(i,r[o]),o=s=0)):s=0}u=26}return i},T.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},T.prototype.convertFrom=function(t){return(t=t.clone()).red=null,t},a.mont=function(t){return new A(t)},o(A,T),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){return(t=this.imod(t.mul(this.rinv))).red=null,t},A.prototype.imul=function(t,e){return t.isZero()||e.isZero()?(t.words[0]=0,t.length=1,t):(e=(t=t.imul(e)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),0<=(e=t=t.isub(e).iushrn(this.shift)).cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this))},A.prototype.mul=function(t,e){return t.isZero()||e.isZero()?new a(0)._forceRed(this):(e=(t=t.mul(e)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),0<=(e=t=t.isub(e).iushrn(this.shift)).cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this))},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(28)(t))},function(t){t.exports={ASTERISK:\"*\",AT:\"@\",BACK_SLASH:\"\\\\\",CARRIAGE_RETURN:\"\\r\",CLOSE_CURLY_BRACKET:\"}\",CLOSE_ROUND_BRACKET:\")\",CLOSE_SQUARE_BRACKET:\"]\",COLON:\":\",COMMA:\",\",DOUBLE_QUOTE:'\"',EXCLAMATION:\"!\",FORWARD_SLASH:\"/\",INTERNAL:\"-clean-css-\",NEW_LINE_NIX:\"\\n\",OPEN_CURLY_BRACKET:\"{\",OPEN_ROUND_BRACKET:\"(\",OPEN_SQUARE_BRACKET:\"[\",SEMICOLON:\";\",SINGLE_QUOTE:\"'\",SPACE:\" \",TAB:\"\\t\",UNDERSCORE:\"_\"}},function(t,e,r){function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}var i=r(202);r=\"object\"==(\"undefined\"==typeof self?\"undefined\":n(self))&&self&&self.Object===Object&&self,r=i||r||Function(\"return this\")(),t.exports=r},function(t){function e(t){return(e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}t.exports=function(t){var r=e(t);return null!=t&&(\"object\"==r||\"function\"==r)}},function(t){function e(t){return(e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}t.exports=function(t){return null!=t&&\"object\"==e(t)}},function(t){(t.exports=function(t,e){if(!t)throw new Error(e||\"Assertion failed\")}).equal=function(t,e,r){if(t!=e)throw new Error(r||\"Assertion failed: \"+t+\" != \"+e)}},function(t,e,r){\"use strict\";var n=e,i=r(11);e=r(16),r=r(351),n.assert=e,n.toArray=r.toArray,n.zero2=r.zero2,n.toHex=r.toHex,n.encode=r.encode,n.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<>1)-1>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,i=0;0>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function o(t){return 1===t.length?\"0\"+t:t}function a(t){return 7===t.length?\"0\"+t:6===t.length?\"00\"+t:5===t.length?\"000\"+t:4===t.length?\"0000\"+t:3===t.length?\"00000\"+t:2===t.length?\"000000\"+t:1===t.length?\"0000000\"+t:t}r=r(1),e.inherits=r,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(\"string\"==typeof t)if(e){if(\"hex\"===e)for((t=t.replace(/[^a-z0-9]+/gi,\"\")).length%2!=0&&(t=\"0\"+t),i=0;i>6|192:(function(t,e){return 55296==(64512&t.charCodeAt(e))&&!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1))}(t,i)?(o=65536+((1023&o)<<10)+(1023&t.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128):r[n++]=o>>12|224,r[n++]=o>>6&63|128),r[n++]=63&o|128)}else for(i=0;i>>0}return o},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0;i=(o>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,a,s){var u=0,c=e;return u+=(c=c+n>>>0)>>0)>>0>>0},e.sum64_4_lo=function(t,e,r,n,i,o,a,s){return e+n+o+s>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,a,s,u,c){var l=0,f=e;return l+=(f=f+n>>>0)>>0)>>0)>>0>>0},e.sum64_5_lo=function(t,e,r,n,i,o,a,s,u,c){return e+n+o+s+c>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},function(t,e,r){var n=r(92),i=r(127);t.exports=function(t){return null!=t&&i(t.length)&&!n(t)}},function(t){t.exports=function(t){return t}},function(t){\"use strict\";function e(t){return(e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}var r=\"object\"===(\"undefined\"==typeof Reflect?\"undefined\":e(Reflect))?Reflect:null,n=r&&\"function\"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},i=r&&\"function\"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)},o=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise((function(r,n){function i(){void 0!==o&&t.removeListener(\"error\",o),r([].slice.call(arguments))}var o;\"error\"!==e&&(o=function(r){t.removeListener(e,i),n(r)},t.once(\"error\",o)),t.once(e,i)}))},(a.EventEmitter=a).prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function u(t){if(\"function\"!=typeof t)throw new TypeError('The \"listener\" argument must be of type Function. Received type '+e(t))}function c(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function l(t,e,r,n){var i,o;return u(r),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit(\"newListener\",e,r.listener||r),i=t._events),o=i[e]),void 0===o?(o=i[e]=r,++t._eventsCount):(\"function\"==typeof o?o=i[e]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),0<(r=c(t))&&o.length>r&&!o.warned&&(o.warned=!0,(r=new Error(\"Possible EventEmitter memory leak detected. \"+o.length+\" \"+String(e)+\" listeners added. Use emitter.setMaxListeners() to increase limit\")).name=\"MaxListenersExceededWarning\",r.emitter=t,r.type=e,r.count=o.length,function(t){console&&console.warn&&console.warn(t)}(r))),t}function f(t,e,r){return(e=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}.bind(t={fired:!1,wrapFn:void 0,target:t,type:e,listener:r})).listener=r,t.wrapFn=e}function h(t,e,r){return void 0===(t=t._events)||void 0===(e=t[e])?[]:\"function\"==typeof e?r?[e.listener||e]:[e]:r?function(t){for(var e=new Array(t.length),r=0;r>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){return 128!=(192&e[0])?(t.lastNeed=0,\"�\"):1\",'\"',\"`\",\" \",\"\\r\",\"\\n\",\"\\t\"]),[\"'\"].concat(e)),f=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(l),h=[\"/\",\"?\",\"#\"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,\"javascript:\":!0},g={javascript:!0,\"javascript:\":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},_=r(622);function y(t,e,r){if(t&&o.isObject(t)&&t instanceof a)return t;var n=new a;return n.parse(t,e,r),n}a.prototype.parse=function(t,e,r){if(!o.isString(t))throw new TypeError(\"Parameter 'url' must be a string, not \"+n(t));var a=t.indexOf(\"?\"),u=-1!==a&&a=a.DIGIT_0&&t<=a.DIGIT_9}function wt(t){return t>=a.LATIN_CAPITAL_A&&t<=a.LATIN_CAPITAL_Z}function Et(t){return t>=a.LATIN_SMALL_A&&t<=a.LATIN_SMALL_Z}function Tt(t){return Et(t)||wt(t)}function At(t,e){return vt(t)||e&&(t>=a.LATIN_CAPITAL_A&&t<=a.LATIN_CAPITAL_F||t>=a.LATIN_SMALL_A&&t<=a.LATIN_SMALL_F)}function xt(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(t>>>10&1023|55296)+String.fromCharCode(56320|1023&t))}function St(t){return String.fromCharCode(t+32)}var Ot=t.exports=function(){this.preprocessor=new n,this.tokenQueue=[],this.allowCDATA=!1,this.state=c,this.returnState=\"\",this.tempBuff=[],this.additionalAllowedCp=void 0,this.lastStartTagName=\"\",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null};Ot.CHARACTER_TOKEN=\"CHARACTER_TOKEN\",Ot.NULL_CHARACTER_TOKEN=\"NULL_CHARACTER_TOKEN\",Ot.WHITESPACE_CHARACTER_TOKEN=\"WHITESPACE_CHARACTER_TOKEN\",Ot.START_TAG_TOKEN=\"START_TAG_TOKEN\",Ot.END_TAG_TOKEN=\"END_TAG_TOKEN\",Ot.COMMENT_TOKEN=\"COMMENT_TOKEN\",Ot.DOCTYPE_TOKEN=\"DOCTYPE_TOKEN\",Ot.EOF_TOKEN=\"EOF_TOKEN\",Ot.HIBERNATION_TOKEN=\"HIBERNATION_TOKEN\",Ot.MODE={DATA:c,RCDATA:f,RAWTEXT:p,SCRIPT_DATA:d,PLAINTEXT:r},Ot.getTokenAttr=function(t,e){for(var r=t.attrs.length-1;0<=r;r--)if(t.attrs[r].name===e)return t.attrs[r].value;return null},Ot.prototype.getNextToken=function(){for(;!this.tokenQueue.length&&this.active;){this._hibernationSnapshot();var t=this._consume();this._ensureHibernation()||this[this.state](t)}return this.tokenQueue.shift()},Ot.prototype.write=function(t,e){this.active=!0,this.preprocessor.write(t,e)},Ot.prototype.insertHtmlAtCurrentPos=function(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t)},Ot.prototype._hibernationSnapshot=function(){this.consumedAfterSnapshot=0},Ot.prototype._ensureHibernation=function(){if(this.preprocessor.endOfChunkHit){for(;0>>1,s=o[a];if(s\")):t===a.NULL?(this.state=M,this._emitChar(i.REPLACEMENT_CHARACTER)):t===a.EOF?this._reconsumeInState(c):(this.state=M,this._emitCodePoint(t))},t[j]=function(t){t===a.SOLIDUS?(this.tempBuff=[],this.state=N):Tt(t)?(this.tempBuff=[],this._emitChar(\"<\"),this._reconsumeInState(P)):(this._emitChar(\"<\"),this._reconsumeInState(M))},t[N]=function(t){Tt(t)?(this._createEndTagToken(),this._reconsumeInState(L)):(this._emitChar(\"<\"),this._emitChar(\"/\"),this._reconsumeInState(M))},t[L]=function(t){if(wt(t))this.currentToken.tagName+=St(t),this.tempBuff.push(t);else if(Et(t))this.currentToken.tagName+=xt(t),this.tempBuff.push(t);else{if(this._isAppropriateEndTagToken()){if(yt(t))return void(this.state=H);if(t===a.SOLIDUS)return void(this.state=$);if(t===a.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=c)}this._emitChar(\"<\"),this._emitChar(\"/\"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(M)}},t[P]=function(t){yt(t)||t===a.SOLIDUS||t===a.GREATER_THAN_SIGN?(this.state=this.isTempBufferEqualToScriptString()?D:M,this._emitCodePoint(t)):wt(t)?(this.tempBuff.push(t+32),this._emitCodePoint(t)):Et(t)?(this.tempBuff.push(t),this._emitCodePoint(t)):this._reconsumeInState(M)},t[D]=function(t){t===a.HYPHEN_MINUS?(this.state=I,this._emitChar(\"-\")):t===a.LESS_THAN_SIGN?(this.state=q,this._emitChar(\"<\")):t===a.NULL?this._emitChar(i.REPLACEMENT_CHARACTER):t===a.EOF?this._reconsumeInState(c):this._emitCodePoint(t)},t[I]=function(t){t===a.HYPHEN_MINUS?(this.state=B,this._emitChar(\"-\")):t===a.LESS_THAN_SIGN?(this.state=q,this._emitChar(\"<\")):t===a.NULL?(this.state=D,this._emitChar(i.REPLACEMENT_CHARACTER)):t===a.EOF?this._reconsumeInState(c):(this.state=D,this._emitCodePoint(t))},t[B]=function(t){t===a.HYPHEN_MINUS?this._emitChar(\"-\"):t===a.LESS_THAN_SIGN?(this.state=q,this._emitChar(\"<\")):t===a.GREATER_THAN_SIGN?(this.state=d,this._emitChar(\">\")):t===a.NULL?(this.state=D,this._emitChar(i.REPLACEMENT_CHARACTER)):t===a.EOF?this._reconsumeInState(c):(this.state=D,this._emitCodePoint(t))},t[q]=function(t){t===a.SOLIDUS?(this.tempBuff=[],this.state=U,this._emitChar(\"/\")):this._reconsumeInState(D)},t[U]=function(t){yt(t)||t===a.SOLIDUS||t===a.GREATER_THAN_SIGN?(this.state=this.isTempBufferEqualToScriptString()?M:D,this._emitCodePoint(t)):wt(t)?(this.tempBuff.push(t+32),this._emitCodePoint(t)):Et(t)?(this.tempBuff.push(t),this._emitCodePoint(t)):this._reconsumeInState(D)},t[H]=function(t){yt(t)||(t===a.SOLIDUS||t===a.GREATER_THAN_SIGN||t===a.EOF?this._reconsumeInState(z):t===a.EQUALS_SIGN?(this._createAttr(\"=\"),this.state=F):(this._createAttr(\"\"),this._reconsumeInState(F)))},t[F]=function(t){yt(t)||t===a.SOLIDUS||t===a.GREATER_THAN_SIGN||t===a.EOF?(this._leaveAttrName(z),this._unconsume()):t===a.EQUALS_SIGN?this._leaveAttrName(V):wt(t)?this.currentAttr.name+=St(t):t!==a.QUOTATION_MARK&&t!==a.APOSTROPHE&&t!==a.LESS_THAN_SIGN&&t===a.NULL?this.currentAttr.name+=i.REPLACEMENT_CHARACTER:this.currentAttr.name+=xt(t)},t[z]=function(t){yt(t)||(t===a.SOLIDUS?this.state=$:t===a.EQUALS_SIGN?this.state=V:t===a.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):t===a.EOF?this._reconsumeInState(c):(this._createAttr(\"\"),this._reconsumeInState(F)))},t[V]=function(t){yt(t)||(t===a.QUOTATION_MARK?this.state=G:t===a.APOSTROPHE?this.state=K:this._reconsumeInState(W))},t[G]=function(t){t===a.QUOTATION_MARK?this.state=X:t===a.AMPERSAND?(this.additionalAllowedCp=a.QUOTATION_MARK,this.returnState=this.state,this.state=Y):t===a.NULL?this.currentAttr.value+=i.REPLACEMENT_CHARACTER:t===a.EOF?this._reconsumeInState(c):this.currentAttr.value+=xt(t)},t[K]=function(t){t===a.APOSTROPHE?this.state=X:t===a.AMPERSAND?(this.additionalAllowedCp=a.APOSTROPHE,this.returnState=this.state,this.state=Y):t===a.NULL?this.currentAttr.value+=i.REPLACEMENT_CHARACTER:t===a.EOF?this._reconsumeInState(c):this.currentAttr.value+=xt(t)},t[W]=function(t){yt(t)?this._leaveAttrValue(H):t===a.AMPERSAND?(this.additionalAllowedCp=a.GREATER_THAN_SIGN,this.returnState=this.state,this.state=Y):t===a.GREATER_THAN_SIGN?(this._leaveAttrValue(c),this._emitCurrentToken()):t===a.NULL?this.currentAttr.value+=i.REPLACEMENT_CHARACTER:t!==a.QUOTATION_MARK&&t!==a.APOSTROPHE&&t!==a.LESS_THAN_SIGN&&t!==a.EQUALS_SIGN&&t!==a.GRAVE_ACCENT&&t===a.EOF?this._reconsumeInState(c):this.currentAttr.value+=xt(t)},t[Y]=function(t){var e=this._consumeCharacterReference(t,!0);if(!this._ensureHibernation()){if(e)for(var r=0;rt.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t,\" argument\")?\"The \".concat(t,\" \").concat(o,\" \").concat(i(r,\"type\")):(a=function(t,e,r){return\"number\"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,\".\")?\"property\":\"argument\",'The \"'.concat(t,'\" ').concat(a,\" \").concat(o,\" \").concat(i(r,\"type\"))))+\". Received type \".concat(e(n))}),TypeError),n(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),n(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(t){return\"The \"+t+\" method is not implemented\"})),n(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),n(\"ERR_STREAM_DESTROYED\",(function(t){return\"Cannot call \"+t+\" after a stream was destroyed\"})),n(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),n(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),n(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),n(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),n(\"ERR_UNKNOWN_ENCODING\",(function(t){return\"Unknown encoding: \"+t}),TypeError),n(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),t.exports.codes=r},function(t,e,r){\"use strict\";(function(e){var n=Object.keys||function(t){var e,r=[];for(e in t)r.push(e);return r};t.exports=c;var i=r(320),o=r(324);r(1)(c,i);for(var a=n(o.prototype),s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0)),(e=8*this._len)<=4294967295?this._block.writeUInt32BE(e,this._blockSize-4):(e=(e-(r=(4294967295&e)>>>0))/4294967296,this._block.writeUInt32BE(e,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)),this._update(this._block);var r=this._hash();return t?r.toString(t):r},i.prototype._update=function(){throw new Error(\"_update must be implemented by subclass\")},t.exports=i},function(t){\"use strict\";function e(t){return(e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}var r={};function n(t,e,n){var i=function(t){function r(r,n,i){return t.call(this,function(t,r,n){return\"string\"==typeof e?e:e(t,r,n)}(r,n,i))||this}return function(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}(r,t),r}(n=n||Error);i.prototype.name=n.name,i.prototype.code=t,r[t]=i}function i(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),2t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t,\" argument\")?\"The \".concat(t,\" \").concat(o,\" \").concat(i(r,\"type\")):(a=function(t,e,r){return\"number\"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,\".\")?\"property\":\"argument\",'The \"'.concat(t,'\" ').concat(a,\" \").concat(o,\" \").concat(i(r,\"type\"))))+\". Received type \".concat(e(n))}),TypeError),n(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),n(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(t){return\"The \"+t+\" method is not implemented\"})),n(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),n(\"ERR_STREAM_DESTROYED\",(function(t){return\"Cannot call \"+t+\" after a stream was destroyed\"})),n(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),n(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),n(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),n(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),n(\"ERR_UNKNOWN_ENCODING\",(function(t){return\"Unknown encoding: \"+t}),TypeError),n(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),t.exports.codes=r},function(t,e,r){\"use strict\";(function(e){var n=Object.keys||function(t){var e,r=[];for(e in t)r.push(e);return r};t.exports=c;var i=r(345),o=r(349);r(1)(c,i);for(var a=n(o.prototype),s=0;s\";e.startConditionalTag=r;var n=\"\\x3c!--[if mso]>\";e.startMsoConditionalTag=n;var i=\"\\x3c!--\\x3e\";e.startNegationConditionalTag=o;var a=\"\\x3c!--[if !mso>\\x3c!--\\x3e\";e.startMsoNegationConditionalTag=a;var s=\"\\x3c!--)[^>]*$|#([\\w\\-]*)$)/;e.isHtml=function(t){return\"<\"===t.charAt(0)&&\">\"===t.charAt(t.length-1)&&3<=t.length||!(!(t=s.exec(t))||!t[1])}},function(t,e,r){var n=t.exports;[r(533),r(540),r(541),r(542),r(543),r(544)].forEach((function(t){Object.keys(t).forEach((function(e){n[e]=t[e].bind(n)}))}))},function(t){t.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},function(t,e,r){var n=r(167),i=r(12);t.exports=function(t,e){for(var r,o,a,s=t.length-1;0<=s;s--)(r=t[s]).unused||(r.dirty||r.important||r.hack)&&(e?(o=e(r),r.value=o):o=r.value,r.important&&function(t){t.value[t.value.length-1][1]+=\"!important\"}(r),r.hack&&function(t){t.hack[0]==n.UNDERSCORE?t.name=\"_\"+t.name:t.hack[0]==n.ASTERISK?t.name=\"*\"+t.name:t.hack[0]==n.BACKSLASH?t.value[t.value.length-1][1]+=\"\\\\\"+t.hack[1]:t.hack[0]==n.BANG&&(t.value[t.value.length-1][1]+=i.SPACE+\"!ie\")}(r),\"all\"in r&&((a=r.all[r.position])[1][1]=r.name,a.splice(2,a.length-1),Array.prototype.push.apply(a,o)))}},function(t,e){e.getArg=function(t,e,r){if(e in t)return t[e];if(3===arguments.length)return r;throw new Error('\"'+e+'\" is a required argument.')};var r=/^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/,n=/^data:.+\\,.+$/;function i(t){return(t=t.match(r))?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function o(t){var e=\"\";return t.scheme&&(e+=t.scheme+\":\"),e+=\"//\",t.auth&&(e+=t.auth+\"@\"),t.host&&(e+=t.host),t.port&&(e+=\":\"+t.port),t.path&&(e+=t.path),e}function a(t){var r=t,n=i(t);if(n){if(!n.path)return t;r=n.path}t=e.isAbsolute(r);for(var a,s=r.split(/\\/+/),u=0,c=s.length-1;0<=c;c--)\".\"===(a=s[c])?s.splice(c,1):\"..\"===a?u++:0=this._delta8){e=(t=this.pending).length%this._delta8,this.pending=t.slice(t.length-e,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-e,this.endian);for(var r=0;r>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o\",r,!1)[0]).type=\"root\",r.parent=null,e.update(n,r),r}).evaluate=function(t,e,r){return n.isBuffer(t)&&(t=t.toString()),\"string\"==typeof t?e.xmlMode||e._useHtmlParser2?i.parseDOM(t,e):function(t,e){return(e?o.parse:o.parseFragment)(t,{treeAdapter:o.treeAdapters.htmlparser2}).children}(t,r):t},e.update=function(t,e){Array.isArray(t)||(t=[t]),e?e.children=t:e=null;for(var r=0;r\\+~]/,c=[\":after\",\":before\",\":first-letter\",\":first-line\",\":lang\"],l=[\"::after\",\"::before\",\"::first-letter\",\"::first-line\"],f=\"double-quote\",h=\"single-quote\",p=\"root\";t.exports=function(t,e,r,d){for(var m,g=i(t,n.COMMA),b=0,_=g.length;b<_;b++)if(0===(m=g[b]).length||function(t){return o.test(t)}(m)||-1>>24]^l[d>>>16&255]^f[m>>>8&255]^h[255&g]^e[b++],a=c[d>>>24]^l[m>>>16&255]^f[g>>>8&255]^h[255&p]^e[b++],s=c[m>>>24]^l[g>>>16&255]^f[p>>>8&255]^h[255&d]^e[b++],u=c[g>>>24]^l[p>>>16&255]^f[d>>>8&255]^h[255&m]^e[b++],p=o,d=a,m=s,g=u;return o=(n[p>>>24]<<24|n[d>>>16&255]<<16|n[m>>>8&255]<<8|n[255&g])^e[b++],a=(n[d>>>24]<<24|n[m>>>16&255]<<16|n[g>>>8&255]<<8|n[255&p])^e[b++],s=(n[m>>>24]<<24|n[g>>>16&255]<<16|n[p>>>8&255]<<8|n[255&d])^e[b++],u=(n[g>>>24]<<24|n[p>>>16&255]<<16|n[d>>>8&255]<<8|n[255&m])^e[b++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=(c=s^s<<1^s<<2^s<<3^s<<4)>>>8^255&c^99,l=t[n[r[a]=c]=a],f=t[l],h=t[f],p=257*t[c]^16843008*c;i[0][a]=p<<24|p>>>8,i[1][a]=p<<16|p>>>16,i[2][a]=p<<8|p>>>24,i[3][a]=p,p=16843009*h^65537*f^257*l^16843008*a,o[0][c]=p<<24|p>>>8,o[1][c]=p<<16|p>>>16,o[2][c]=p<<8|p>>>24,o[3][c]=p,0===a?a=s=1:(a=l^t[t[t[h^l]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(t){this._key=i(t),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/e|0]<<24):6>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-e]^a}for(var c=[],l=0;l>>24]]^u.INV_SUB_MIX[1][u.SBOX[h>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[h>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return a(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t);return(t=n.allocUnsafe(16)).writeUInt32BE(e[0],0),t.writeUInt32BE(e[1],4),t.writeUInt32BE(e[2],8),t.writeUInt32BE(e[3],12),t},c.prototype.decryptBlock=function(t){var e=(t=i(t))[1];return t[1]=t[3],t[3]=e,e=a(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),(t=n.allocUnsafe(16)).writeUInt32BE(e[0],0),t.writeUInt32BE(e[3],4),t.writeUInt32BE(e[2],8),t.writeUInt32BE(e[1],12),t},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},function(t,e,r){var n=r(2).Buffer,i=r(183);t.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,\"binary\")),e&&(n.isBuffer(e)||(e=n.from(e,\"binary\")),8!==e.length))throw new RangeError(\"salt should be Buffer with 8 byte length\");for(var a=r/8,s=n.alloc(a),u=n.alloc(o||0),c=n.alloc(0);0>1]):u.mixedAdd(i[-l-1>>1].neg()):0>1]):u.add(i[-l-1>>1].neg())}return\"affine\"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){for(var s=this._wnafT1,u=this._wnafT2,c=this._wnafT3,l=0,f=0;f>1]:S<0&&(x=u[_][-S-1>>1].neg()),w=\"affine\"===x.type?w.mixedAdd(x):w.add(x))}}for(f=0;f=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i\",\"GT\":\">\",\"Gt\":\"≫\",\"gtdot\":\"⋗\",\"gtlPar\":\"⦕\",\"gtquest\":\"⩼\",\"gtrapprox\":\"⪆\",\"gtrarr\":\"⥸\",\"gtrdot\":\"⋗\",\"gtreqless\":\"⋛\",\"gtreqqless\":\"⪌\",\"gtrless\":\"≷\",\"gtrsim\":\"≳\",\"gvertneqq\":\"≩︀\",\"gvnE\":\"≩︀\",\"Hacek\":\"ˇ\",\"hairsp\":\" \",\"half\":\"½\",\"hamilt\":\"ℋ\",\"HARDcy\":\"Ъ\",\"hardcy\":\"ъ\",\"harrcir\":\"⥈\",\"harr\":\"↔\",\"hArr\":\"⇔\",\"harrw\":\"↭\",\"Hat\":\"^\",\"hbar\":\"ℏ\",\"Hcirc\":\"Ĥ\",\"hcirc\":\"ĥ\",\"hearts\":\"♥\",\"heartsuit\":\"♥\",\"hellip\":\"…\",\"hercon\":\"⊹\",\"hfr\":\"𝔥\",\"Hfr\":\"ℌ\",\"HilbertSpace\":\"ℋ\",\"hksearow\":\"⤥\",\"hkswarow\":\"⤦\",\"hoarr\":\"⇿\",\"homtht\":\"∻\",\"hookleftarrow\":\"↩\",\"hookrightarrow\":\"↪\",\"hopf\":\"𝕙\",\"Hopf\":\"ℍ\",\"horbar\":\"―\",\"HorizontalLine\":\"─\",\"hscr\":\"𝒽\",\"Hscr\":\"ℋ\",\"hslash\":\"ℏ\",\"Hstrok\":\"Ħ\",\"hstrok\":\"ħ\",\"HumpDownHump\":\"≎\",\"HumpEqual\":\"≏\",\"hybull\":\"⁃\",\"hyphen\":\"‐\",\"Iacute\":\"Í\",\"iacute\":\"í\",\"ic\":\"⁣\",\"Icirc\":\"Î\",\"icirc\":\"î\",\"Icy\":\"И\",\"icy\":\"и\",\"Idot\":\"İ\",\"IEcy\":\"Е\",\"iecy\":\"е\",\"iexcl\":\"¡\",\"iff\":\"⇔\",\"ifr\":\"𝔦\",\"Ifr\":\"ℑ\",\"Igrave\":\"Ì\",\"igrave\":\"ì\",\"ii\":\"ⅈ\",\"iiiint\":\"⨌\",\"iiint\":\"∭\",\"iinfin\":\"⧜\",\"iiota\":\"℩\",\"IJlig\":\"IJ\",\"ijlig\":\"ij\",\"Imacr\":\"Ī\",\"imacr\":\"ī\",\"image\":\"ℑ\",\"ImaginaryI\":\"ⅈ\",\"imagline\":\"ℐ\",\"imagpart\":\"ℑ\",\"imath\":\"ı\",\"Im\":\"ℑ\",\"imof\":\"⊷\",\"imped\":\"Ƶ\",\"Implies\":\"⇒\",\"incare\":\"℅\",\"in\":\"∈\",\"infin\":\"∞\",\"infintie\":\"⧝\",\"inodot\":\"ı\",\"intcal\":\"⊺\",\"int\":\"∫\",\"Int\":\"∬\",\"integers\":\"ℤ\",\"Integral\":\"∫\",\"intercal\":\"⊺\",\"Intersection\":\"⋂\",\"intlarhk\":\"⨗\",\"intprod\":\"⨼\",\"InvisibleComma\":\"⁣\",\"InvisibleTimes\":\"⁢\",\"IOcy\":\"Ё\",\"iocy\":\"ё\",\"Iogon\":\"Į\",\"iogon\":\"į\",\"Iopf\":\"𝕀\",\"iopf\":\"𝕚\",\"Iota\":\"Ι\",\"iota\":\"ι\",\"iprod\":\"⨼\",\"iquest\":\"¿\",\"iscr\":\"𝒾\",\"Iscr\":\"ℐ\",\"isin\":\"∈\",\"isindot\":\"⋵\",\"isinE\":\"⋹\",\"isins\":\"⋴\",\"isinsv\":\"⋳\",\"isinv\":\"∈\",\"it\":\"⁢\",\"Itilde\":\"Ĩ\",\"itilde\":\"ĩ\",\"Iukcy\":\"І\",\"iukcy\":\"і\",\"Iuml\":\"Ï\",\"iuml\":\"ï\",\"Jcirc\":\"Ĵ\",\"jcirc\":\"ĵ\",\"Jcy\":\"Й\",\"jcy\":\"й\",\"Jfr\":\"𝔍\",\"jfr\":\"𝔧\",\"jmath\":\"ȷ\",\"Jopf\":\"𝕁\",\"jopf\":\"𝕛\",\"Jscr\":\"𝒥\",\"jscr\":\"𝒿\",\"Jsercy\":\"Ј\",\"jsercy\":\"ј\",\"Jukcy\":\"Є\",\"jukcy\":\"є\",\"Kappa\":\"Κ\",\"kappa\":\"κ\",\"kappav\":\"ϰ\",\"Kcedil\":\"Ķ\",\"kcedil\":\"ķ\",\"Kcy\":\"К\",\"kcy\":\"к\",\"Kfr\":\"𝔎\",\"kfr\":\"𝔨\",\"kgreen\":\"ĸ\",\"KHcy\":\"Х\",\"khcy\":\"х\",\"KJcy\":\"Ќ\",\"kjcy\":\"ќ\",\"Kopf\":\"𝕂\",\"kopf\":\"𝕜\",\"Kscr\":\"𝒦\",\"kscr\":\"𝓀\",\"lAarr\":\"⇚\",\"Lacute\":\"Ĺ\",\"lacute\":\"ĺ\",\"laemptyv\":\"⦴\",\"lagran\":\"ℒ\",\"Lambda\":\"Λ\",\"lambda\":\"λ\",\"lang\":\"⟨\",\"Lang\":\"⟪\",\"langd\":\"⦑\",\"langle\":\"⟨\",\"lap\":\"⪅\",\"Laplacetrf\":\"ℒ\",\"laquo\":\"«\",\"larrb\":\"⇤\",\"larrbfs\":\"⤟\",\"larr\":\"←\",\"Larr\":\"↞\",\"lArr\":\"⇐\",\"larrfs\":\"⤝\",\"larrhk\":\"↩\",\"larrlp\":\"↫\",\"larrpl\":\"⤹\",\"larrsim\":\"⥳\",\"larrtl\":\"↢\",\"latail\":\"⤙\",\"lAtail\":\"⤛\",\"lat\":\"⪫\",\"late\":\"⪭\",\"lates\":\"⪭︀\",\"lbarr\":\"⤌\",\"lBarr\":\"⤎\",\"lbbrk\":\"❲\",\"lbrace\":\"{\",\"lbrack\":\"[\",\"lbrke\":\"⦋\",\"lbrksld\":\"⦏\",\"lbrkslu\":\"⦍\",\"Lcaron\":\"Ľ\",\"lcaron\":\"ľ\",\"Lcedil\":\"Ļ\",\"lcedil\":\"ļ\",\"lceil\":\"⌈\",\"lcub\":\"{\",\"Lcy\":\"Л\",\"lcy\":\"л\",\"ldca\":\"⤶\",\"ldquo\":\"“\",\"ldquor\":\"„\",\"ldrdhar\":\"⥧\",\"ldrushar\":\"⥋\",\"ldsh\":\"↲\",\"le\":\"≤\",\"lE\":\"≦\",\"LeftAngleBracket\":\"⟨\",\"LeftArrowBar\":\"⇤\",\"leftarrow\":\"←\",\"LeftArrow\":\"←\",\"Leftarrow\":\"⇐\",\"LeftArrowRightArrow\":\"⇆\",\"leftarrowtail\":\"↢\",\"LeftCeiling\":\"⌈\",\"LeftDoubleBracket\":\"⟦\",\"LeftDownTeeVector\":\"⥡\",\"LeftDownVectorBar\":\"⥙\",\"LeftDownVector\":\"⇃\",\"LeftFloor\":\"⌊\",\"leftharpoondown\":\"↽\",\"leftharpoonup\":\"↼\",\"leftleftarrows\":\"⇇\",\"leftrightarrow\":\"↔\",\"LeftRightArrow\":\"↔\",\"Leftrightarrow\":\"⇔\",\"leftrightarrows\":\"⇆\",\"leftrightharpoons\":\"⇋\",\"leftrightsquigarrow\":\"↭\",\"LeftRightVector\":\"⥎\",\"LeftTeeArrow\":\"↤\",\"LeftTee\":\"⊣\",\"LeftTeeVector\":\"⥚\",\"leftthreetimes\":\"⋋\",\"LeftTriangleBar\":\"⧏\",\"LeftTriangle\":\"⊲\",\"LeftTriangleEqual\":\"⊴\",\"LeftUpDownVector\":\"⥑\",\"LeftUpTeeVector\":\"⥠\",\"LeftUpVectorBar\":\"⥘\",\"LeftUpVector\":\"↿\",\"LeftVectorBar\":\"⥒\",\"LeftVector\":\"↼\",\"lEg\":\"⪋\",\"leg\":\"⋚\",\"leq\":\"≤\",\"leqq\":\"≦\",\"leqslant\":\"⩽\",\"lescc\":\"⪨\",\"les\":\"⩽\",\"lesdot\":\"⩿\",\"lesdoto\":\"⪁\",\"lesdotor\":\"⪃\",\"lesg\":\"⋚︀\",\"lesges\":\"⪓\",\"lessapprox\":\"⪅\",\"lessdot\":\"⋖\",\"lesseqgtr\":\"⋚\",\"lesseqqgtr\":\"⪋\",\"LessEqualGreater\":\"⋚\",\"LessFullEqual\":\"≦\",\"LessGreater\":\"≶\",\"lessgtr\":\"≶\",\"LessLess\":\"⪡\",\"lesssim\":\"≲\",\"LessSlantEqual\":\"⩽\",\"LessTilde\":\"≲\",\"lfisht\":\"⥼\",\"lfloor\":\"⌊\",\"Lfr\":\"𝔏\",\"lfr\":\"𝔩\",\"lg\":\"≶\",\"lgE\":\"⪑\",\"lHar\":\"⥢\",\"lhard\":\"↽\",\"lharu\":\"↼\",\"lharul\":\"⥪\",\"lhblk\":\"▄\",\"LJcy\":\"Љ\",\"ljcy\":\"љ\",\"llarr\":\"⇇\",\"ll\":\"≪\",\"Ll\":\"⋘\",\"llcorner\":\"⌞\",\"Lleftarrow\":\"⇚\",\"llhard\":\"⥫\",\"lltri\":\"◺\",\"Lmidot\":\"Ŀ\",\"lmidot\":\"ŀ\",\"lmoustache\":\"⎰\",\"lmoust\":\"⎰\",\"lnap\":\"⪉\",\"lnapprox\":\"⪉\",\"lne\":\"⪇\",\"lnE\":\"≨\",\"lneq\":\"⪇\",\"lneqq\":\"≨\",\"lnsim\":\"⋦\",\"loang\":\"⟬\",\"loarr\":\"⇽\",\"lobrk\":\"⟦\",\"longleftarrow\":\"⟵\",\"LongLeftArrow\":\"⟵\",\"Longleftarrow\":\"⟸\",\"longleftrightarrow\":\"⟷\",\"LongLeftRightArrow\":\"⟷\",\"Longleftrightarrow\":\"⟺\",\"longmapsto\":\"⟼\",\"longrightarrow\":\"⟶\",\"LongRightArrow\":\"⟶\",\"Longrightarrow\":\"⟹\",\"looparrowleft\":\"↫\",\"looparrowright\":\"↬\",\"lopar\":\"⦅\",\"Lopf\":\"𝕃\",\"lopf\":\"𝕝\",\"loplus\":\"⨭\",\"lotimes\":\"⨴\",\"lowast\":\"∗\",\"lowbar\":\"_\",\"LowerLeftArrow\":\"↙\",\"LowerRightArrow\":\"↘\",\"loz\":\"◊\",\"lozenge\":\"◊\",\"lozf\":\"⧫\",\"lpar\":\"(\",\"lparlt\":\"⦓\",\"lrarr\":\"⇆\",\"lrcorner\":\"⌟\",\"lrhar\":\"⇋\",\"lrhard\":\"⥭\",\"lrm\":\"‎\",\"lrtri\":\"⊿\",\"lsaquo\":\"‹\",\"lscr\":\"𝓁\",\"Lscr\":\"ℒ\",\"lsh\":\"↰\",\"Lsh\":\"↰\",\"lsim\":\"≲\",\"lsime\":\"⪍\",\"lsimg\":\"⪏\",\"lsqb\":\"[\",\"lsquo\":\"‘\",\"lsquor\":\"‚\",\"Lstrok\":\"Ł\",\"lstrok\":\"ł\",\"ltcc\":\"⪦\",\"ltcir\":\"⩹\",\"lt\":\"<\",\"LT\":\"<\",\"Lt\":\"≪\",\"ltdot\":\"⋖\",\"lthree\":\"⋋\",\"ltimes\":\"⋉\",\"ltlarr\":\"⥶\",\"ltquest\":\"⩻\",\"ltri\":\"◃\",\"ltrie\":\"⊴\",\"ltrif\":\"◂\",\"ltrPar\":\"⦖\",\"lurdshar\":\"⥊\",\"luruhar\":\"⥦\",\"lvertneqq\":\"≨︀\",\"lvnE\":\"≨︀\",\"macr\":\"¯\",\"male\":\"♂\",\"malt\":\"✠\",\"maltese\":\"✠\",\"Map\":\"⤅\",\"map\":\"↦\",\"mapsto\":\"↦\",\"mapstodown\":\"↧\",\"mapstoleft\":\"↤\",\"mapstoup\":\"↥\",\"marker\":\"▮\",\"mcomma\":\"⨩\",\"Mcy\":\"М\",\"mcy\":\"м\",\"mdash\":\"—\",\"mDDot\":\"∺\",\"measuredangle\":\"∡\",\"MediumSpace\":\" \",\"Mellintrf\":\"ℳ\",\"Mfr\":\"𝔐\",\"mfr\":\"𝔪\",\"mho\":\"℧\",\"micro\":\"µ\",\"midast\":\"*\",\"midcir\":\"⫰\",\"mid\":\"∣\",\"middot\":\"·\",\"minusb\":\"⊟\",\"minus\":\"−\",\"minusd\":\"∸\",\"minusdu\":\"⨪\",\"MinusPlus\":\"∓\",\"mlcp\":\"⫛\",\"mldr\":\"…\",\"mnplus\":\"∓\",\"models\":\"⊧\",\"Mopf\":\"𝕄\",\"mopf\":\"𝕞\",\"mp\":\"∓\",\"mscr\":\"𝓂\",\"Mscr\":\"ℳ\",\"mstpos\":\"∾\",\"Mu\":\"Μ\",\"mu\":\"μ\",\"multimap\":\"⊸\",\"mumap\":\"⊸\",\"nabla\":\"∇\",\"Nacute\":\"Ń\",\"nacute\":\"ń\",\"nang\":\"∠⃒\",\"nap\":\"≉\",\"napE\":\"⩰̸\",\"napid\":\"≋̸\",\"napos\":\"ʼn\",\"napprox\":\"≉\",\"natural\":\"♮\",\"naturals\":\"ℕ\",\"natur\":\"♮\",\"nbsp\":\" \",\"nbump\":\"≎̸\",\"nbumpe\":\"≏̸\",\"ncap\":\"⩃\",\"Ncaron\":\"Ň\",\"ncaron\":\"ň\",\"Ncedil\":\"Ņ\",\"ncedil\":\"ņ\",\"ncong\":\"≇\",\"ncongdot\":\"⩭̸\",\"ncup\":\"⩂\",\"Ncy\":\"Н\",\"ncy\":\"н\",\"ndash\":\"–\",\"nearhk\":\"⤤\",\"nearr\":\"↗\",\"neArr\":\"⇗\",\"nearrow\":\"↗\",\"ne\":\"≠\",\"nedot\":\"≐̸\",\"NegativeMediumSpace\":\"​\",\"NegativeThickSpace\":\"​\",\"NegativeThinSpace\":\"​\",\"NegativeVeryThinSpace\":\"​\",\"nequiv\":\"≢\",\"nesear\":\"⤨\",\"nesim\":\"≂̸\",\"NestedGreaterGreater\":\"≫\",\"NestedLessLess\":\"≪\",\"NewLine\":\"\\\\n\",\"nexist\":\"∄\",\"nexists\":\"∄\",\"Nfr\":\"𝔑\",\"nfr\":\"𝔫\",\"ngE\":\"≧̸\",\"nge\":\"≱\",\"ngeq\":\"≱\",\"ngeqq\":\"≧̸\",\"ngeqslant\":\"⩾̸\",\"nges\":\"⩾̸\",\"nGg\":\"⋙̸\",\"ngsim\":\"≵\",\"nGt\":\"≫⃒\",\"ngt\":\"≯\",\"ngtr\":\"≯\",\"nGtv\":\"≫̸\",\"nharr\":\"↮\",\"nhArr\":\"⇎\",\"nhpar\":\"⫲\",\"ni\":\"∋\",\"nis\":\"⋼\",\"nisd\":\"⋺\",\"niv\":\"∋\",\"NJcy\":\"Њ\",\"njcy\":\"њ\",\"nlarr\":\"↚\",\"nlArr\":\"⇍\",\"nldr\":\"‥\",\"nlE\":\"≦̸\",\"nle\":\"≰\",\"nleftarrow\":\"↚\",\"nLeftarrow\":\"⇍\",\"nleftrightarrow\":\"↮\",\"nLeftrightarrow\":\"⇎\",\"nleq\":\"≰\",\"nleqq\":\"≦̸\",\"nleqslant\":\"⩽̸\",\"nles\":\"⩽̸\",\"nless\":\"≮\",\"nLl\":\"⋘̸\",\"nlsim\":\"≴\",\"nLt\":\"≪⃒\",\"nlt\":\"≮\",\"nltri\":\"⋪\",\"nltrie\":\"⋬\",\"nLtv\":\"≪̸\",\"nmid\":\"∤\",\"NoBreak\":\"⁠\",\"NonBreakingSpace\":\" \",\"nopf\":\"𝕟\",\"Nopf\":\"ℕ\",\"Not\":\"⫬\",\"not\":\"¬\",\"NotCongruent\":\"≢\",\"NotCupCap\":\"≭\",\"NotDoubleVerticalBar\":\"∦\",\"NotElement\":\"∉\",\"NotEqual\":\"≠\",\"NotEqualTilde\":\"≂̸\",\"NotExists\":\"∄\",\"NotGreater\":\"≯\",\"NotGreaterEqual\":\"≱\",\"NotGreaterFullEqual\":\"≧̸\",\"NotGreaterGreater\":\"≫̸\",\"NotGreaterLess\":\"≹\",\"NotGreaterSlantEqual\":\"⩾̸\",\"NotGreaterTilde\":\"≵\",\"NotHumpDownHump\":\"≎̸\",\"NotHumpEqual\":\"≏̸\",\"notin\":\"∉\",\"notindot\":\"⋵̸\",\"notinE\":\"⋹̸\",\"notinva\":\"∉\",\"notinvb\":\"⋷\",\"notinvc\":\"⋶\",\"NotLeftTriangleBar\":\"⧏̸\",\"NotLeftTriangle\":\"⋪\",\"NotLeftTriangleEqual\":\"⋬\",\"NotLess\":\"≮\",\"NotLessEqual\":\"≰\",\"NotLessGreater\":\"≸\",\"NotLessLess\":\"≪̸\",\"NotLessSlantEqual\":\"⩽̸\",\"NotLessTilde\":\"≴\",\"NotNestedGreaterGreater\":\"⪢̸\",\"NotNestedLessLess\":\"⪡̸\",\"notni\":\"∌\",\"notniva\":\"∌\",\"notnivb\":\"⋾\",\"notnivc\":\"⋽\",\"NotPrecedes\":\"⊀\",\"NotPrecedesEqual\":\"⪯̸\",\"NotPrecedesSlantEqual\":\"⋠\",\"NotReverseElement\":\"∌\",\"NotRightTriangleBar\":\"⧐̸\",\"NotRightTriangle\":\"⋫\",\"NotRightTriangleEqual\":\"⋭\",\"NotSquareSubset\":\"⊏̸\",\"NotSquareSubsetEqual\":\"⋢\",\"NotSquareSuperset\":\"⊐̸\",\"NotSquareSupersetEqual\":\"⋣\",\"NotSubset\":\"⊂⃒\",\"NotSubsetEqual\":\"⊈\",\"NotSucceeds\":\"⊁\",\"NotSucceedsEqual\":\"⪰̸\",\"NotSucceedsSlantEqual\":\"⋡\",\"NotSucceedsTilde\":\"≿̸\",\"NotSuperset\":\"⊃⃒\",\"NotSupersetEqual\":\"⊉\",\"NotTilde\":\"≁\",\"NotTildeEqual\":\"≄\",\"NotTildeFullEqual\":\"≇\",\"NotTildeTilde\":\"≉\",\"NotVerticalBar\":\"∤\",\"nparallel\":\"∦\",\"npar\":\"∦\",\"nparsl\":\"⫽⃥\",\"npart\":\"∂̸\",\"npolint\":\"⨔\",\"npr\":\"⊀\",\"nprcue\":\"⋠\",\"nprec\":\"⊀\",\"npreceq\":\"⪯̸\",\"npre\":\"⪯̸\",\"nrarrc\":\"⤳̸\",\"nrarr\":\"↛\",\"nrArr\":\"⇏\",\"nrarrw\":\"↝̸\",\"nrightarrow\":\"↛\",\"nRightarrow\":\"⇏\",\"nrtri\":\"⋫\",\"nrtrie\":\"⋭\",\"nsc\":\"⊁\",\"nsccue\":\"⋡\",\"nsce\":\"⪰̸\",\"Nscr\":\"𝒩\",\"nscr\":\"𝓃\",\"nshortmid\":\"∤\",\"nshortparallel\":\"∦\",\"nsim\":\"≁\",\"nsime\":\"≄\",\"nsimeq\":\"≄\",\"nsmid\":\"∤\",\"nspar\":\"∦\",\"nsqsube\":\"⋢\",\"nsqsupe\":\"⋣\",\"nsub\":\"⊄\",\"nsubE\":\"⫅̸\",\"nsube\":\"⊈\",\"nsubset\":\"⊂⃒\",\"nsubseteq\":\"⊈\",\"nsubseteqq\":\"⫅̸\",\"nsucc\":\"⊁\",\"nsucceq\":\"⪰̸\",\"nsup\":\"⊅\",\"nsupE\":\"⫆̸\",\"nsupe\":\"⊉\",\"nsupset\":\"⊃⃒\",\"nsupseteq\":\"⊉\",\"nsupseteqq\":\"⫆̸\",\"ntgl\":\"≹\",\"Ntilde\":\"Ñ\",\"ntilde\":\"ñ\",\"ntlg\":\"≸\",\"ntriangleleft\":\"⋪\",\"ntrianglelefteq\":\"⋬\",\"ntriangleright\":\"⋫\",\"ntrianglerighteq\":\"⋭\",\"Nu\":\"Ν\",\"nu\":\"ν\",\"num\":\"#\",\"numero\":\"№\",\"numsp\":\" \",\"nvap\":\"≍⃒\",\"nvdash\":\"⊬\",\"nvDash\":\"⊭\",\"nVdash\":\"⊮\",\"nVDash\":\"⊯\",\"nvge\":\"≥⃒\",\"nvgt\":\">⃒\",\"nvHarr\":\"⤄\",\"nvinfin\":\"⧞\",\"nvlArr\":\"⤂\",\"nvle\":\"≤⃒\",\"nvlt\":\"<⃒\",\"nvltrie\":\"⊴⃒\",\"nvrArr\":\"⤃\",\"nvrtrie\":\"⊵⃒\",\"nvsim\":\"∼⃒\",\"nwarhk\":\"⤣\",\"nwarr\":\"↖\",\"nwArr\":\"⇖\",\"nwarrow\":\"↖\",\"nwnear\":\"⤧\",\"Oacute\":\"Ó\",\"oacute\":\"ó\",\"oast\":\"⊛\",\"Ocirc\":\"Ô\",\"ocirc\":\"ô\",\"ocir\":\"⊚\",\"Ocy\":\"О\",\"ocy\":\"о\",\"odash\":\"⊝\",\"Odblac\":\"Ő\",\"odblac\":\"ő\",\"odiv\":\"⨸\",\"odot\":\"⊙\",\"odsold\":\"⦼\",\"OElig\":\"Œ\",\"oelig\":\"œ\",\"ofcir\":\"⦿\",\"Ofr\":\"𝔒\",\"ofr\":\"𝔬\",\"ogon\":\"˛\",\"Ograve\":\"Ò\",\"ograve\":\"ò\",\"ogt\":\"⧁\",\"ohbar\":\"⦵\",\"ohm\":\"Ω\",\"oint\":\"∮\",\"olarr\":\"↺\",\"olcir\":\"⦾\",\"olcross\":\"⦻\",\"oline\":\"‾\",\"olt\":\"⧀\",\"Omacr\":\"Ō\",\"omacr\":\"ō\",\"Omega\":\"Ω\",\"omega\":\"ω\",\"Omicron\":\"Ο\",\"omicron\":\"ο\",\"omid\":\"⦶\",\"ominus\":\"⊖\",\"Oopf\":\"𝕆\",\"oopf\":\"𝕠\",\"opar\":\"⦷\",\"OpenCurlyDoubleQuote\":\"“\",\"OpenCurlyQuote\":\"‘\",\"operp\":\"⦹\",\"oplus\":\"⊕\",\"orarr\":\"↻\",\"Or\":\"⩔\",\"or\":\"∨\",\"ord\":\"⩝\",\"order\":\"ℴ\",\"orderof\":\"ℴ\",\"ordf\":\"ª\",\"ordm\":\"º\",\"origof\":\"⊶\",\"oror\":\"⩖\",\"orslope\":\"⩗\",\"orv\":\"⩛\",\"oS\":\"Ⓢ\",\"Oscr\":\"𝒪\",\"oscr\":\"ℴ\",\"Oslash\":\"Ø\",\"oslash\":\"ø\",\"osol\":\"⊘\",\"Otilde\":\"Õ\",\"otilde\":\"õ\",\"otimesas\":\"⨶\",\"Otimes\":\"⨷\",\"otimes\":\"⊗\",\"Ouml\":\"Ö\",\"ouml\":\"ö\",\"ovbar\":\"⌽\",\"OverBar\":\"‾\",\"OverBrace\":\"⏞\",\"OverBracket\":\"⎴\",\"OverParenthesis\":\"⏜\",\"para\":\"¶\",\"parallel\":\"∥\",\"par\":\"∥\",\"parsim\":\"⫳\",\"parsl\":\"⫽\",\"part\":\"∂\",\"PartialD\":\"∂\",\"Pcy\":\"П\",\"pcy\":\"п\",\"percnt\":\"%\",\"period\":\".\",\"permil\":\"‰\",\"perp\":\"⊥\",\"pertenk\":\"‱\",\"Pfr\":\"𝔓\",\"pfr\":\"𝔭\",\"Phi\":\"Φ\",\"phi\":\"φ\",\"phiv\":\"ϕ\",\"phmmat\":\"ℳ\",\"phone\":\"☎\",\"Pi\":\"Π\",\"pi\":\"π\",\"pitchfork\":\"⋔\",\"piv\":\"ϖ\",\"planck\":\"ℏ\",\"planckh\":\"ℎ\",\"plankv\":\"ℏ\",\"plusacir\":\"⨣\",\"plusb\":\"⊞\",\"pluscir\":\"⨢\",\"plus\":\"+\",\"plusdo\":\"∔\",\"plusdu\":\"⨥\",\"pluse\":\"⩲\",\"PlusMinus\":\"±\",\"plusmn\":\"±\",\"plussim\":\"⨦\",\"plustwo\":\"⨧\",\"pm\":\"±\",\"Poincareplane\":\"ℌ\",\"pointint\":\"⨕\",\"popf\":\"𝕡\",\"Popf\":\"ℙ\",\"pound\":\"£\",\"prap\":\"⪷\",\"Pr\":\"⪻\",\"pr\":\"≺\",\"prcue\":\"≼\",\"precapprox\":\"⪷\",\"prec\":\"≺\",\"preccurlyeq\":\"≼\",\"Precedes\":\"≺\",\"PrecedesEqual\":\"⪯\",\"PrecedesSlantEqual\":\"≼\",\"PrecedesTilde\":\"≾\",\"preceq\":\"⪯\",\"precnapprox\":\"⪹\",\"precneqq\":\"⪵\",\"precnsim\":\"⋨\",\"pre\":\"⪯\",\"prE\":\"⪳\",\"precsim\":\"≾\",\"prime\":\"′\",\"Prime\":\"″\",\"primes\":\"ℙ\",\"prnap\":\"⪹\",\"prnE\":\"⪵\",\"prnsim\":\"⋨\",\"prod\":\"∏\",\"Product\":\"∏\",\"profalar\":\"⌮\",\"profline\":\"⌒\",\"profsurf\":\"⌓\",\"prop\":\"∝\",\"Proportional\":\"∝\",\"Proportion\":\"∷\",\"propto\":\"∝\",\"prsim\":\"≾\",\"prurel\":\"⊰\",\"Pscr\":\"𝒫\",\"pscr\":\"𝓅\",\"Psi\":\"Ψ\",\"psi\":\"ψ\",\"puncsp\":\" \",\"Qfr\":\"𝔔\",\"qfr\":\"𝔮\",\"qint\":\"⨌\",\"qopf\":\"𝕢\",\"Qopf\":\"ℚ\",\"qprime\":\"⁗\",\"Qscr\":\"𝒬\",\"qscr\":\"𝓆\",\"quaternions\":\"ℍ\",\"quatint\":\"⨖\",\"quest\":\"?\",\"questeq\":\"≟\",\"quot\":\"\\\\\"\",\"QUOT\":\"\\\\\"\",\"rAarr\":\"⇛\",\"race\":\"∽̱\",\"Racute\":\"Ŕ\",\"racute\":\"ŕ\",\"radic\":\"√\",\"raemptyv\":\"⦳\",\"rang\":\"⟩\",\"Rang\":\"⟫\",\"rangd\":\"⦒\",\"range\":\"⦥\",\"rangle\":\"⟩\",\"raquo\":\"»\",\"rarrap\":\"⥵\",\"rarrb\":\"⇥\",\"rarrbfs\":\"⤠\",\"rarrc\":\"⤳\",\"rarr\":\"→\",\"Rarr\":\"↠\",\"rArr\":\"⇒\",\"rarrfs\":\"⤞\",\"rarrhk\":\"↪\",\"rarrlp\":\"↬\",\"rarrpl\":\"⥅\",\"rarrsim\":\"⥴\",\"Rarrtl\":\"⤖\",\"rarrtl\":\"↣\",\"rarrw\":\"↝\",\"ratail\":\"⤚\",\"rAtail\":\"⤜\",\"ratio\":\"∶\",\"rationals\":\"ℚ\",\"rbarr\":\"⤍\",\"rBarr\":\"⤏\",\"RBarr\":\"⤐\",\"rbbrk\":\"❳\",\"rbrace\":\"}\",\"rbrack\":\"]\",\"rbrke\":\"⦌\",\"rbrksld\":\"⦎\",\"rbrkslu\":\"⦐\",\"Rcaron\":\"Ř\",\"rcaron\":\"ř\",\"Rcedil\":\"Ŗ\",\"rcedil\":\"ŗ\",\"rceil\":\"⌉\",\"rcub\":\"}\",\"Rcy\":\"Р\",\"rcy\":\"р\",\"rdca\":\"⤷\",\"rdldhar\":\"⥩\",\"rdquo\":\"”\",\"rdquor\":\"”\",\"rdsh\":\"↳\",\"real\":\"ℜ\",\"realine\":\"ℛ\",\"realpart\":\"ℜ\",\"reals\":\"ℝ\",\"Re\":\"ℜ\",\"rect\":\"▭\",\"reg\":\"®\",\"REG\":\"®\",\"ReverseElement\":\"∋\",\"ReverseEquilibrium\":\"⇋\",\"ReverseUpEquilibrium\":\"⥯\",\"rfisht\":\"⥽\",\"rfloor\":\"⌋\",\"rfr\":\"𝔯\",\"Rfr\":\"ℜ\",\"rHar\":\"⥤\",\"rhard\":\"⇁\",\"rharu\":\"⇀\",\"rharul\":\"⥬\",\"Rho\":\"Ρ\",\"rho\":\"ρ\",\"rhov\":\"ϱ\",\"RightAngleBracket\":\"⟩\",\"RightArrowBar\":\"⇥\",\"rightarrow\":\"→\",\"RightArrow\":\"→\",\"Rightarrow\":\"⇒\",\"RightArrowLeftArrow\":\"⇄\",\"rightarrowtail\":\"↣\",\"RightCeiling\":\"⌉\",\"RightDoubleBracket\":\"⟧\",\"RightDownTeeVector\":\"⥝\",\"RightDownVectorBar\":\"⥕\",\"RightDownVector\":\"⇂\",\"RightFloor\":\"⌋\",\"rightharpoondown\":\"⇁\",\"rightharpoonup\":\"⇀\",\"rightleftarrows\":\"⇄\",\"rightleftharpoons\":\"⇌\",\"rightrightarrows\":\"⇉\",\"rightsquigarrow\":\"↝\",\"RightTeeArrow\":\"↦\",\"RightTee\":\"⊢\",\"RightTeeVector\":\"⥛\",\"rightthreetimes\":\"⋌\",\"RightTriangleBar\":\"⧐\",\"RightTriangle\":\"⊳\",\"RightTriangleEqual\":\"⊵\",\"RightUpDownVector\":\"⥏\",\"RightUpTeeVector\":\"⥜\",\"RightUpVectorBar\":\"⥔\",\"RightUpVector\":\"↾\",\"RightVectorBar\":\"⥓\",\"RightVector\":\"⇀\",\"ring\":\"˚\",\"risingdotseq\":\"≓\",\"rlarr\":\"⇄\",\"rlhar\":\"⇌\",\"rlm\":\"‏\",\"rmoustache\":\"⎱\",\"rmoust\":\"⎱\",\"rnmid\":\"⫮\",\"roang\":\"⟭\",\"roarr\":\"⇾\",\"robrk\":\"⟧\",\"ropar\":\"⦆\",\"ropf\":\"𝕣\",\"Ropf\":\"ℝ\",\"roplus\":\"⨮\",\"rotimes\":\"⨵\",\"RoundImplies\":\"⥰\",\"rpar\":\")\",\"rpargt\":\"⦔\",\"rppolint\":\"⨒\",\"rrarr\":\"⇉\",\"Rrightarrow\":\"⇛\",\"rsaquo\":\"›\",\"rscr\":\"𝓇\",\"Rscr\":\"ℛ\",\"rsh\":\"↱\",\"Rsh\":\"↱\",\"rsqb\":\"]\",\"rsquo\":\"’\",\"rsquor\":\"’\",\"rthree\":\"⋌\",\"rtimes\":\"⋊\",\"rtri\":\"▹\",\"rtrie\":\"⊵\",\"rtrif\":\"▸\",\"rtriltri\":\"⧎\",\"RuleDelayed\":\"⧴\",\"ruluhar\":\"⥨\",\"rx\":\"℞\",\"Sacute\":\"Ś\",\"sacute\":\"ś\",\"sbquo\":\"‚\",\"scap\":\"⪸\",\"Scaron\":\"Š\",\"scaron\":\"š\",\"Sc\":\"⪼\",\"sc\":\"≻\",\"sccue\":\"≽\",\"sce\":\"⪰\",\"scE\":\"⪴\",\"Scedil\":\"Ş\",\"scedil\":\"ş\",\"Scirc\":\"Ŝ\",\"scirc\":\"ŝ\",\"scnap\":\"⪺\",\"scnE\":\"⪶\",\"scnsim\":\"⋩\",\"scpolint\":\"⨓\",\"scsim\":\"≿\",\"Scy\":\"С\",\"scy\":\"с\",\"sdotb\":\"⊡\",\"sdot\":\"⋅\",\"sdote\":\"⩦\",\"searhk\":\"⤥\",\"searr\":\"↘\",\"seArr\":\"⇘\",\"searrow\":\"↘\",\"sect\":\"§\",\"semi\":\";\",\"seswar\":\"⤩\",\"setminus\":\"∖\",\"setmn\":\"∖\",\"sext\":\"✶\",\"Sfr\":\"𝔖\",\"sfr\":\"𝔰\",\"sfrown\":\"⌢\",\"sharp\":\"♯\",\"SHCHcy\":\"Щ\",\"shchcy\":\"щ\",\"SHcy\":\"Ш\",\"shcy\":\"ш\",\"ShortDownArrow\":\"↓\",\"ShortLeftArrow\":\"←\",\"shortmid\":\"∣\",\"shortparallel\":\"∥\",\"ShortRightArrow\":\"→\",\"ShortUpArrow\":\"↑\",\"shy\":\"­\",\"Sigma\":\"Σ\",\"sigma\":\"σ\",\"sigmaf\":\"ς\",\"sigmav\":\"ς\",\"sim\":\"∼\",\"simdot\":\"⩪\",\"sime\":\"≃\",\"simeq\":\"≃\",\"simg\":\"⪞\",\"simgE\":\"⪠\",\"siml\":\"⪝\",\"simlE\":\"⪟\",\"simne\":\"≆\",\"simplus\":\"⨤\",\"simrarr\":\"⥲\",\"slarr\":\"←\",\"SmallCircle\":\"∘\",\"smallsetminus\":\"∖\",\"smashp\":\"⨳\",\"smeparsl\":\"⧤\",\"smid\":\"∣\",\"smile\":\"⌣\",\"smt\":\"⪪\",\"smte\":\"⪬\",\"smtes\":\"⪬︀\",\"SOFTcy\":\"Ь\",\"softcy\":\"ь\",\"solbar\":\"⌿\",\"solb\":\"⧄\",\"sol\":\"/\",\"Sopf\":\"𝕊\",\"sopf\":\"𝕤\",\"spades\":\"♠\",\"spadesuit\":\"♠\",\"spar\":\"∥\",\"sqcap\":\"⊓\",\"sqcaps\":\"⊓︀\",\"sqcup\":\"⊔\",\"sqcups\":\"⊔︀\",\"Sqrt\":\"√\",\"sqsub\":\"⊏\",\"sqsube\":\"⊑\",\"sqsubset\":\"⊏\",\"sqsubseteq\":\"⊑\",\"sqsup\":\"⊐\",\"sqsupe\":\"⊒\",\"sqsupset\":\"⊐\",\"sqsupseteq\":\"⊒\",\"square\":\"□\",\"Square\":\"□\",\"SquareIntersection\":\"⊓\",\"SquareSubset\":\"⊏\",\"SquareSubsetEqual\":\"⊑\",\"SquareSuperset\":\"⊐\",\"SquareSupersetEqual\":\"⊒\",\"SquareUnion\":\"⊔\",\"squarf\":\"▪\",\"squ\":\"□\",\"squf\":\"▪\",\"srarr\":\"→\",\"Sscr\":\"𝒮\",\"sscr\":\"𝓈\",\"ssetmn\":\"∖\",\"ssmile\":\"⌣\",\"sstarf\":\"⋆\",\"Star\":\"⋆\",\"star\":\"☆\",\"starf\":\"★\",\"straightepsilon\":\"ϵ\",\"straightphi\":\"ϕ\",\"strns\":\"¯\",\"sub\":\"⊂\",\"Sub\":\"⋐\",\"subdot\":\"⪽\",\"subE\":\"⫅\",\"sube\":\"⊆\",\"subedot\":\"⫃\",\"submult\":\"⫁\",\"subnE\":\"⫋\",\"subne\":\"⊊\",\"subplus\":\"⪿\",\"subrarr\":\"⥹\",\"subset\":\"⊂\",\"Subset\":\"⋐\",\"subseteq\":\"⊆\",\"subseteqq\":\"⫅\",\"SubsetEqual\":\"⊆\",\"subsetneq\":\"⊊\",\"subsetneqq\":\"⫋\",\"subsim\":\"⫇\",\"subsub\":\"⫕\",\"subsup\":\"⫓\",\"succapprox\":\"⪸\",\"succ\":\"≻\",\"succcurlyeq\":\"≽\",\"Succeeds\":\"≻\",\"SucceedsEqual\":\"⪰\",\"SucceedsSlantEqual\":\"≽\",\"SucceedsTilde\":\"≿\",\"succeq\":\"⪰\",\"succnapprox\":\"⪺\",\"succneqq\":\"⪶\",\"succnsim\":\"⋩\",\"succsim\":\"≿\",\"SuchThat\":\"∋\",\"sum\":\"∑\",\"Sum\":\"∑\",\"sung\":\"♪\",\"sup1\":\"¹\",\"sup2\":\"²\",\"sup3\":\"³\",\"sup\":\"⊃\",\"Sup\":\"⋑\",\"supdot\":\"⪾\",\"supdsub\":\"⫘\",\"supE\":\"⫆\",\"supe\":\"⊇\",\"supedot\":\"⫄\",\"Superset\":\"⊃\",\"SupersetEqual\":\"⊇\",\"suphsol\":\"⟉\",\"suphsub\":\"⫗\",\"suplarr\":\"⥻\",\"supmult\":\"⫂\",\"supnE\":\"⫌\",\"supne\":\"⊋\",\"supplus\":\"⫀\",\"supset\":\"⊃\",\"Supset\":\"⋑\",\"supseteq\":\"⊇\",\"supseteqq\":\"⫆\",\"supsetneq\":\"⊋\",\"supsetneqq\":\"⫌\",\"supsim\":\"⫈\",\"supsub\":\"⫔\",\"supsup\":\"⫖\",\"swarhk\":\"⤦\",\"swarr\":\"↙\",\"swArr\":\"⇙\",\"swarrow\":\"↙\",\"swnwar\":\"⤪\",\"szlig\":\"ß\",\"Tab\":\"\\\\t\",\"target\":\"⌖\",\"Tau\":\"Τ\",\"tau\":\"τ\",\"tbrk\":\"⎴\",\"Tcaron\":\"Ť\",\"tcaron\":\"ť\",\"Tcedil\":\"Ţ\",\"tcedil\":\"ţ\",\"Tcy\":\"Т\",\"tcy\":\"т\",\"tdot\":\"⃛\",\"telrec\":\"⌕\",\"Tfr\":\"𝔗\",\"tfr\":\"𝔱\",\"there4\":\"∴\",\"therefore\":\"∴\",\"Therefore\":\"∴\",\"Theta\":\"Θ\",\"theta\":\"θ\",\"thetasym\":\"ϑ\",\"thetav\":\"ϑ\",\"thickapprox\":\"≈\",\"thicksim\":\"∼\",\"ThickSpace\":\"  \",\"ThinSpace\":\" \",\"thinsp\":\" \",\"thkap\":\"≈\",\"thksim\":\"∼\",\"THORN\":\"Þ\",\"thorn\":\"þ\",\"tilde\":\"˜\",\"Tilde\":\"∼\",\"TildeEqual\":\"≃\",\"TildeFullEqual\":\"≅\",\"TildeTilde\":\"≈\",\"timesbar\":\"⨱\",\"timesb\":\"⊠\",\"times\":\"×\",\"timesd\":\"⨰\",\"tint\":\"∭\",\"toea\":\"⤨\",\"topbot\":\"⌶\",\"topcir\":\"⫱\",\"top\":\"⊤\",\"Topf\":\"𝕋\",\"topf\":\"𝕥\",\"topfork\":\"⫚\",\"tosa\":\"⤩\",\"tprime\":\"‴\",\"trade\":\"™\",\"TRADE\":\"™\",\"triangle\":\"▵\",\"triangledown\":\"▿\",\"triangleleft\":\"◃\",\"trianglelefteq\":\"⊴\",\"triangleq\":\"≜\",\"triangleright\":\"▹\",\"trianglerighteq\":\"⊵\",\"tridot\":\"◬\",\"trie\":\"≜\",\"triminus\":\"⨺\",\"TripleDot\":\"⃛\",\"triplus\":\"⨹\",\"trisb\":\"⧍\",\"tritime\":\"⨻\",\"trpezium\":\"⏢\",\"Tscr\":\"𝒯\",\"tscr\":\"𝓉\",\"TScy\":\"Ц\",\"tscy\":\"ц\",\"TSHcy\":\"Ћ\",\"tshcy\":\"ћ\",\"Tstrok\":\"Ŧ\",\"tstrok\":\"ŧ\",\"twixt\":\"≬\",\"twoheadleftarrow\":\"↞\",\"twoheadrightarrow\":\"↠\",\"Uacute\":\"Ú\",\"uacute\":\"ú\",\"uarr\":\"↑\",\"Uarr\":\"↟\",\"uArr\":\"⇑\",\"Uarrocir\":\"⥉\",\"Ubrcy\":\"Ў\",\"ubrcy\":\"ў\",\"Ubreve\":\"Ŭ\",\"ubreve\":\"ŭ\",\"Ucirc\":\"Û\",\"ucirc\":\"û\",\"Ucy\":\"У\",\"ucy\":\"у\",\"udarr\":\"⇅\",\"Udblac\":\"Ű\",\"udblac\":\"ű\",\"udhar\":\"⥮\",\"ufisht\":\"⥾\",\"Ufr\":\"𝔘\",\"ufr\":\"𝔲\",\"Ugrave\":\"Ù\",\"ugrave\":\"ù\",\"uHar\":\"⥣\",\"uharl\":\"↿\",\"uharr\":\"↾\",\"uhblk\":\"▀\",\"ulcorn\":\"⌜\",\"ulcorner\":\"⌜\",\"ulcrop\":\"⌏\",\"ultri\":\"◸\",\"Umacr\":\"Ū\",\"umacr\":\"ū\",\"uml\":\"¨\",\"UnderBar\":\"_\",\"UnderBrace\":\"⏟\",\"UnderBracket\":\"⎵\",\"UnderParenthesis\":\"⏝\",\"Union\":\"⋃\",\"UnionPlus\":\"⊎\",\"Uogon\":\"Ų\",\"uogon\":\"ų\",\"Uopf\":\"𝕌\",\"uopf\":\"𝕦\",\"UpArrowBar\":\"⤒\",\"uparrow\":\"↑\",\"UpArrow\":\"↑\",\"Uparrow\":\"⇑\",\"UpArrowDownArrow\":\"⇅\",\"updownarrow\":\"↕\",\"UpDownArrow\":\"↕\",\"Updownarrow\":\"⇕\",\"UpEquilibrium\":\"⥮\",\"upharpoonleft\":\"↿\",\"upharpoonright\":\"↾\",\"uplus\":\"⊎\",\"UpperLeftArrow\":\"↖\",\"UpperRightArrow\":\"↗\",\"upsi\":\"υ\",\"Upsi\":\"ϒ\",\"upsih\":\"ϒ\",\"Upsilon\":\"Υ\",\"upsilon\":\"υ\",\"UpTeeArrow\":\"↥\",\"UpTee\":\"⊥\",\"upuparrows\":\"⇈\",\"urcorn\":\"⌝\",\"urcorner\":\"⌝\",\"urcrop\":\"⌎\",\"Uring\":\"Ů\",\"uring\":\"ů\",\"urtri\":\"◹\",\"Uscr\":\"𝒰\",\"uscr\":\"𝓊\",\"utdot\":\"⋰\",\"Utilde\":\"Ũ\",\"utilde\":\"ũ\",\"utri\":\"▵\",\"utrif\":\"▴\",\"uuarr\":\"⇈\",\"Uuml\":\"Ü\",\"uuml\":\"ü\",\"uwangle\":\"⦧\",\"vangrt\":\"⦜\",\"varepsilon\":\"ϵ\",\"varkappa\":\"ϰ\",\"varnothing\":\"∅\",\"varphi\":\"ϕ\",\"varpi\":\"ϖ\",\"varpropto\":\"∝\",\"varr\":\"↕\",\"vArr\":\"⇕\",\"varrho\":\"ϱ\",\"varsigma\":\"ς\",\"varsubsetneq\":\"⊊︀\",\"varsubsetneqq\":\"⫋︀\",\"varsupsetneq\":\"⊋︀\",\"varsupsetneqq\":\"⫌︀\",\"vartheta\":\"ϑ\",\"vartriangleleft\":\"⊲\",\"vartriangleright\":\"⊳\",\"vBar\":\"⫨\",\"Vbar\":\"⫫\",\"vBarv\":\"⫩\",\"Vcy\":\"В\",\"vcy\":\"в\",\"vdash\":\"⊢\",\"vDash\":\"⊨\",\"Vdash\":\"⊩\",\"VDash\":\"⊫\",\"Vdashl\":\"⫦\",\"veebar\":\"⊻\",\"vee\":\"∨\",\"Vee\":\"⋁\",\"veeeq\":\"≚\",\"vellip\":\"⋮\",\"verbar\":\"|\",\"Verbar\":\"‖\",\"vert\":\"|\",\"Vert\":\"‖\",\"VerticalBar\":\"∣\",\"VerticalLine\":\"|\",\"VerticalSeparator\":\"❘\",\"VerticalTilde\":\"≀\",\"VeryThinSpace\":\" \",\"Vfr\":\"𝔙\",\"vfr\":\"𝔳\",\"vltri\":\"⊲\",\"vnsub\":\"⊂⃒\",\"vnsup\":\"⊃⃒\",\"Vopf\":\"𝕍\",\"vopf\":\"𝕧\",\"vprop\":\"∝\",\"vrtri\":\"⊳\",\"Vscr\":\"𝒱\",\"vscr\":\"𝓋\",\"vsubnE\":\"⫋︀\",\"vsubne\":\"⊊︀\",\"vsupnE\":\"⫌︀\",\"vsupne\":\"⊋︀\",\"Vvdash\":\"⊪\",\"vzigzag\":\"⦚\",\"Wcirc\":\"Ŵ\",\"wcirc\":\"ŵ\",\"wedbar\":\"⩟\",\"wedge\":\"∧\",\"Wedge\":\"⋀\",\"wedgeq\":\"≙\",\"weierp\":\"℘\",\"Wfr\":\"𝔚\",\"wfr\":\"𝔴\",\"Wopf\":\"𝕎\",\"wopf\":\"𝕨\",\"wp\":\"℘\",\"wr\":\"≀\",\"wreath\":\"≀\",\"Wscr\":\"𝒲\",\"wscr\":\"𝓌\",\"xcap\":\"⋂\",\"xcirc\":\"◯\",\"xcup\":\"⋃\",\"xdtri\":\"▽\",\"Xfr\":\"𝔛\",\"xfr\":\"𝔵\",\"xharr\":\"⟷\",\"xhArr\":\"⟺\",\"Xi\":\"Ξ\",\"xi\":\"ξ\",\"xlarr\":\"⟵\",\"xlArr\":\"⟸\",\"xmap\":\"⟼\",\"xnis\":\"⋻\",\"xodot\":\"⨀\",\"Xopf\":\"𝕏\",\"xopf\":\"𝕩\",\"xoplus\":\"⨁\",\"xotime\":\"⨂\",\"xrarr\":\"⟶\",\"xrArr\":\"⟹\",\"Xscr\":\"𝒳\",\"xscr\":\"𝓍\",\"xsqcup\":\"⨆\",\"xuplus\":\"⨄\",\"xutri\":\"△\",\"xvee\":\"⋁\",\"xwedge\":\"⋀\",\"Yacute\":\"Ý\",\"yacute\":\"ý\",\"YAcy\":\"Я\",\"yacy\":\"я\",\"Ycirc\":\"Ŷ\",\"ycirc\":\"ŷ\",\"Ycy\":\"Ы\",\"ycy\":\"ы\",\"yen\":\"¥\",\"Yfr\":\"𝔜\",\"yfr\":\"𝔶\",\"YIcy\":\"Ї\",\"yicy\":\"ї\",\"Yopf\":\"𝕐\",\"yopf\":\"𝕪\",\"Yscr\":\"𝒴\",\"yscr\":\"𝓎\",\"YUcy\":\"Ю\",\"yucy\":\"ю\",\"yuml\":\"ÿ\",\"Yuml\":\"Ÿ\",\"Zacute\":\"Ź\",\"zacute\":\"ź\",\"Zcaron\":\"Ž\",\"zcaron\":\"ž\",\"Zcy\":\"З\",\"zcy\":\"з\",\"Zdot\":\"Ż\",\"zdot\":\"ż\",\"zeetrf\":\"ℨ\",\"ZeroWidthSpace\":\"​\",\"Zeta\":\"Ζ\",\"zeta\":\"ζ\",\"zfr\":\"𝔷\",\"Zfr\":\"ℨ\",\"ZHcy\":\"Ж\",\"zhcy\":\"ж\",\"zigrarr\":\"⇝\",\"zopf\":\"𝕫\",\"Zopf\":\"ℤ\",\"Zscr\":\"𝒵\",\"zscr\":\"𝓏\",\"zwj\":\"‍\",\"zwnj\":\"‌\"}')},function(t){t.exports=JSON.parse('{\"amp\":\"&\",\"apos\":\"\\'\",\"gt\":\">\",\"lt\":\"<\",\"quot\":\"\\\\\"\"}')},function(t,e,r){\"use strict\";var n=r(21).DOCUMENT_MODE;function i(t){return{nodeName:\"#text\",value:t,parentNode:null}}e.createDocument=function(){return{nodeName:\"#document\",mode:n.NO_QUIRKS,childNodes:[]}},e.createDocumentFragment=function(){return{nodeName:\"#document-fragment\",childNodes:[]}},e.createElement=function(t,e,r){return{nodeName:t,tagName:t,attrs:r,namespaceURI:e,childNodes:[],parentNode:null}},e.createCommentNode=function(t){return{nodeName:\"#comment\",data:t,parentNode:null}};var o=e.appendChild=function(t,e){t.childNodes.push(e),e.parentNode=t},a=e.insertBefore=function(t,e,r){r=t.childNodes.indexOf(r),t.childNodes.splice(r,0,e),e.parentNode=t};e.setTemplateContent=function(t,e){t.content=e},e.getTemplateContent=function(t){return t.content},e.setDocumentType=function(t,e,r,n){for(var i=null,a=0;ae[n]?1:-1;return t.length-e.length},e.compare=function(t,r){return 1==e.compareFunc(t,r)?t:r},e.getDefaultOptions=function(t){return(t=Object.assign({extraCss:\"\",insertPreservedExtraCss:!0,applyStyleTags:!0,removeStyleTags:!0,preserveMediaQueries:!0,preserveFontFaces:!0,preserveKeyFrames:!0,preservePseudos:!0,applyWidthAttributes:!0,applyHeightAttributes:!0,applyAttributesTableElements:!0,url:\"\"},t)).webResources=t.webResources||{},t}},function(t,e,r){(function(e){t.exports=function(t){return function(t){var r=[].slice.call(arguments,1);r.unshift(\"[\"+t+\"]\"),e.stderr.write(r.join(\" \")+\"\\n\")}.bind(null,t)}}).call(this,r(5))},function(t,e){var r,n,i;function o(t){return(o=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function a(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return r[t].call(e.exports,e,e.exports,a),e.l=!0,e.exports}n={},a.m=r=[function(t,e,r){\"use strict\";var n=r(1).Beautifier,i=r(5).Options;t.exports=function(t,e){return new n(t,e).beautify()},t.exports.defaultOptions=function(){return new i}},function(t,e,r){\"use strict\";var n=r(2).Output,i=r(3).Token,o=r(4),a=r(5).Options,s=r(7).Tokenizer,u=r(7).line_starters,c=r(7).positionable_operators,l=r(7).TOKEN;function f(t,e){return-1!==e.indexOf(t)}function h(t,e){return t&&t.type===l.RESERVED&&t.text===e}function p(t,e){return t&&t.type===l.RESERVED&&f(t.text,e)}var d=[\"case\",\"return\",\"do\",\"if\",\"throw\",\"else\",\"await\",\"break\",\"continue\",\"async\"],m=function(t){for(var e={},r=0;rr&&(r=t.line_indent_level)),{mode:e,parent:t,last_token:t?t.last_token:new i(l.START_BLOCK,\"\"),last_word:t?t.last_word:\"\",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:r,alignment:0,line_indent_level:t?t.line_indent_level:r,start_line_index:this._output.get_line_number(),ternary_depth:0}},v.prototype._reset=function(t){var e=t.match(/^[\\t ]*/)[0];return this._last_last_text=\"\",this._output=new n(this._options,e),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(\"BlockStatement\"),e=new s(t,this._options),this._tokens=e.tokenize(),t},v.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._reset(this._source_text),e=this._options.eol;\"auto\"===this._options.eol&&(e=\"\\n\",t&&o.lineBreak.test(t||\"\")&&(e=t.match(o.lineBreak)[0]));for(var r=this._tokens.next();r;)this.handle_token(r),this._last_last_text=this._flags.last_token.text,this._flags.last_token=r,r=this._tokens.next();return this._output.get_code(e)},v.prototype.handle_token=function(t,e){t.type===l.START_EXPR?this.handle_start_expr(t):t.type===l.END_EXPR?this.handle_end_expr(t):t.type===l.START_BLOCK?this.handle_start_block(t):t.type===l.END_BLOCK?this.handle_end_block(t):t.type===l.WORD||t.type===l.RESERVED?this.handle_word(t):t.type===l.SEMICOLON?this.handle_semicolon(t):t.type===l.STRING?this.handle_string(t):t.type===l.EQUALS?this.handle_equals(t):t.type===l.OPERATOR?this.handle_operator(t):t.type===l.COMMA?this.handle_comma(t):t.type===l.BLOCK_COMMENT?this.handle_block_comment(t,e):t.type===l.COMMENT?this.handle_comment(t,e):t.type===l.DOT?this.handle_dot(t):t.type===l.EOF?this.handle_eof(t):(t.type,l.UNKNOWN,this.handle_unknown(t,e))},v.prototype.handle_whitespace_and_comments=function(t,e){var r=t.newlines,n=this._options.keep_array_indentation&&_(this._flags.mode);if(t.comments_before)for(var i=t.comments_before.next();i;)this.handle_whitespace_and_comments(i,e),this.handle_token(i,e),i=t.comments_before.next();if(n)for(var o=0;othis._options.max_preserve_newlines&&(r=this._options.max_preserve_newlines),this._options.preserve_newlines&&1this._flags.parent.indentation_level)&&(--this._flags.indentation_level,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},v.prototype.set_mode=function(t){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,t),this._flags=this.create_flags(this._previous_flags,t),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},v.prototype.restore_mode=function(){0\"===this._flags.last_token.text||!f(this._flags.last_token.type,[l.EQUALS,l.START_EXPR,l.COMMA,l.OPERATOR])&&!p(this._flags.last_token,[\"return\",\"throw\",\"import\",\"default\"])?this.set_mode(\"BlockStatement\"):this.set_mode(\"ObjectLiteral\"),e=(r=!e.comments_before&&\"}\"===e.text)&&\"function\"===this._flags.last_word&&this._flags.last_token.type===l.END_EXPR,this._options.brace_preserve_inline){var n=0,i=null;this._flags.inline_frame=!0;do{if(n+=1,(i=this._tokens.peek(n-1)).newlines){this._flags.inline_frame=!1;break}}while(i.type!==l.EOF&&(i.type!==l.END_BLOCK||i.opened!==t))}(\"expand\"===this._options.brace_style||\"none\"===this._options.brace_style&&t.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==l.OPERATOR&&(e||this._flags.last_token.type===l.EQUALS||p(this._flags.last_token,d)&&\"else\"!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(!_(this._previous_flags.mode)||this._flags.last_token.type!==l.START_EXPR&&this._flags.last_token.type!==l.COMMA||(this._flags.last_token.type!==l.COMMA&&!this._options.space_in_paren||(this._output.space_before_token=!0),(this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(t),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==l.OPERATOR&&this._flags.last_token.type!==l.START_EXPR&&(this._flags.last_token.type!==l.START_BLOCK||this._flags.inline_frame?this._output.space_before_token=!0:this.print_newline())),this.print_token(t),this.indent(),r||this._options.brace_preserve_inline&&this._flags.inline_frame||this.print_newline()},v.prototype.handle_end_block=function(t){for(this.handle_whitespace_and_comments(t);\"Statement\"===this._flags.mode;)this.restore_mode();var e=this._flags.last_token.type===l.START_BLOCK;this._flags.inline_frame&&!e?this._output.space_before_token=!0:\"expand\"===this._options.brace_style?e||this.print_newline():e||(_(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(t)},v.prototype.handle_word=function(t){if(t.type===l.RESERVED&&(f(t.text,[\"set\",\"get\"])&&\"ObjectLiteral\"!==this._flags.mode||\"import\"===t.text&&\"(\"===this._tokens.peek().text||f(t.text,[\"as\",\"from\"])&&!this._flags.import_block||\"ObjectLiteral\"===this._flags.mode&&\":\"===this._tokens.peek().text)&&(t.type=l.WORD),this.start_of_statement(t)?p(this._flags.last_token,[\"var\",\"let\",\"const\"])&&t.type===l.WORD&&(this._flags.declaration_statement=!0):!t.newlines||y(this._flags.mode)||this._flags.last_token.type===l.OPERATOR&&\"--\"!==this._flags.last_token.text&&\"++\"!==this._flags.last_token.text||this._flags.last_token.type===l.EQUALS||!this._options.preserve_newlines&&p(this._flags.last_token,[\"var\",\"let\",\"const\",\"set\",\"get\"])?this.handle_whitespace_and_comments(t):(this.handle_whitespace_and_comments(t),this.print_newline()),this._flags.do_block&&!this._flags.do_while){if(h(t,\"while\"))return this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0,void(this._flags.do_while=!0);this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&h(t,\"else\"))this._flags.else_block=!0;else{for(;\"Statement\"===this._flags.mode;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&p(t,[\"case\",\"default\"]))return this.print_newline(),this._flags.last_token.type!==l.END_BLOCK&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(t),void(this._flags.in_case=!0);if(this._flags.last_token.type!==l.COMMA&&this._flags.last_token.type!==l.START_EXPR&&this._flags.last_token.type!==l.EQUALS&&this._flags.last_token.type!==l.OPERATOR||this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t),h(t,\"function\"))return(f(this._flags.last_token.text,[\"}\",\";\"])||this._output.just_added_newline()&&!f(this._flags.last_token.text,[\"(\",\"[\",\"{\",\":\",\"=\",\",\"])&&this._flags.last_token.type!==l.OPERATOR)&&(this._output.just_added_blankline()||t.comments_before||(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD?p(this._flags.last_token,[\"get\",\"set\",\"new\",\"export\"])||p(this._flags.last_token,w)||h(this._flags.last_token,\"default\")&&\"export\"===this._last_last_text||\"declare\"===this._flags.last_token.text?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===l.OPERATOR||\"=\"===this._flags.last_token.text?this._output.space_before_token=!0:!this._flags.multiline_frame&&(y(this._flags.mode)||_(this._flags.mode))||this.print_newline(),this.print_token(t),void(this._flags.last_word=t.text);var e=\"NONE\";this._flags.last_token.type===l.END_BLOCK?this._previous_flags.inline_frame?e=\"SPACE\":!p(t,[\"else\",\"catch\",\"finally\",\"from\"])||\"expand\"===this._options.brace_style||\"end-expand\"===this._options.brace_style||\"none\"===this._options.brace_style&&t.newlines?e=\"NEWLINE\":(e=\"SPACE\",this._output.space_before_token=!0):this._flags.last_token.type===l.SEMICOLON&&\"BlockStatement\"===this._flags.mode?e=\"NEWLINE\":this._flags.last_token.type===l.SEMICOLON&&y(this._flags.mode)?e=\"SPACE\":this._flags.last_token.type===l.STRING?e=\"NEWLINE\":this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||\"*\"===this._flags.last_token.text&&(f(this._last_last_text,[\"function\",\"yield\"])||\"ObjectLiteral\"===this._flags.mode&&f(this._last_last_text,[\"{\",\",\"]))?e=\"SPACE\":this._flags.last_token.type===l.START_BLOCK?e=this._flags.inline_frame?\"SPACE\":\"NEWLINE\":this._flags.last_token.type===l.END_EXPR&&(this._output.space_before_token=!0,e=\"NEWLINE\"),p(t,u)&&\")\"!==this._flags.last_token.text&&(e=this._flags.inline_frame||\"else\"===this._flags.last_token.text||\"export\"===this._flags.last_token.text?\"SPACE\":\"NEWLINE\"),p(t,[\"else\",\"catch\",\"finally\"])?(this._flags.last_token.type!==l.END_BLOCK||\"BlockStatement\"!==this._previous_flags.mode||\"expand\"===this._options.brace_style||\"end-expand\"===this._options.brace_style||\"none\"===this._options.brace_style&&t.newlines)&&!this._flags.inline_frame?this.print_newline():(this._output.trim(!0),\"}\"!==this._output.current_line.last()&&this.print_newline(),this._output.space_before_token=!0):\"NEWLINE\"===e?p(this._flags.last_token,d)||\"declare\"===this._flags.last_token.text&&p(t,[\"var\",\"let\",\"const\"])?this._output.space_before_token=!0:this._flags.last_token.type!==l.END_EXPR?this._flags.last_token.type===l.START_EXPR&&p(t,[\"var\",\"let\",\"const\"])||\":\"===this._flags.last_token.text||(h(t,\"if\")&&h(t.previous,\"else\")?this._output.space_before_token=!0:this.print_newline()):p(t,u)&&\")\"!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&_(this._flags.mode)&&\",\"===this._flags.last_token.text&&\"}\"===this._last_last_text?this.print_newline():\"SPACE\"===e&&(this._output.space_before_token=!0),!t.previous||t.previous.type!==l.WORD&&t.previous.type!==l.RESERVED||(this._output.space_before_token=!0),this.print_token(t),this._flags.last_word=t.text,t.type===l.RESERVED&&(\"do\"===t.text?this._flags.do_block=!0:\"if\"===t.text?this._flags.if_block=!0:\"import\"===t.text?this._flags.import_block=!0:this._flags.import_block&&h(t,\"from\")&&(this._flags.import_block=!1))},v.prototype.handle_semicolon=function(t){this.start_of_statement(t)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(t);for(var e=this._tokens.peek();!(\"Statement\"!==this._flags.mode||this._flags.if_block&&h(e,\"else\")||this._flags.do_block);)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(t)},v.prototype.handle_string=function(t){this.start_of_statement(t)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(t),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t):this.print_newline()),this.print_token(t)},v.prototype.handle_equals=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0},v.prototype.handle_comma=function(t){this.handle_whitespace_and_comments(t,!0),this.print_token(t),this._output.space_before_token=!0,this._flags.declaration_statement?(y(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)):\"ObjectLiteral\"===this._flags.mode||\"Statement\"===this._flags.mode&&\"ObjectLiteral\"===this._flags.parent.mode?(\"Statement\"===this._flags.mode&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)},v.prototype.handle_operator=function(t){var e=\"*\"===t.text&&(p(this._flags.last_token,[\"function\",\"yield\"])||f(this._flags.last_token.type,[l.START_BLOCK,l.COMMA,l.END_BLOCK,l.SEMICOLON])),r=f(t.text,[\"-\",\"+\"])&&(f(this._flags.last_token.type,[l.START_BLOCK,l.START_EXPR,l.EQUALS,l.OPERATOR])||f(this._flags.last_token.text,u)||\",\"===this._flags.last_token.text);if(this.start_of_statement(t)||(o=!e,this.handle_whitespace_and_comments(t,o)),p(this._flags.last_token,d))return this._output.space_before_token=!0,void this.print_token(t);if(\"*\"!==t.text||this._flags.last_token.type!==l.DOT)if(\"::\"!==t.text){if(this._flags.last_token.type===l.OPERATOR&&f(this._options.operator_position,g)&&this.allow_wrap_or_preserved_newline(t),\":\"===t.text&&this._flags.in_case)return this.print_token(t),this._flags.in_case=!1,this._flags.case_body=!0,void(this._tokens.peek().type!==l.START_BLOCK?(this.indent(),this.print_newline()):this._output.space_before_token=!0);var n=!0,i=!0,o=!1;if(\":\"===t.text?0===this._flags.ternary_depth?n=!1:(--this._flags.ternary_depth,o=!0):\"?\"===t.text&&(this._flags.ternary_depth+=1),!r&&!e&&this._options.preserve_newlines&&f(t.text,c)){var a=\":\"===t.text,s=a&&o,h=a&&!o;switch(this._options.operator_position){case m.before_newline:return this._output.space_before_token=!h,this.print_token(t),a&&!s||this.allow_wrap_or_preserved_newline(t),void(this._output.space_before_token=!0);case m.after_newline:return this._output.space_before_token=!0,!a||s?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(t):this._output.space_before_token=!1,this.print_token(t),void(this._output.space_before_token=!0);case m.preserve_newline:return h||this.allow_wrap_or_preserved_newline(t),n=!(this._output.just_added_newline()||h),this._output.space_before_token=n,this.print_token(t),void(this._output.space_before_token=!0)}}e?(this.allow_wrap_or_preserved_newline(t),n=!1,i=(e=this._tokens.peek())&&f(e.type,[l.WORD,l.RESERVED])):\"...\"===t.text?(this.allow_wrap_or_preserved_newline(t),n=this._flags.last_token.type===l.START_BLOCK,i=!1):(f(t.text,[\"--\",\"++\",\"!\",\"~\"])||r)&&(this._flags.last_token.type!==l.COMMA&&this._flags.last_token.type!==l.START_EXPR||this.allow_wrap_or_preserved_newline(t),i=n=!1,!t.newlines||\"--\"!==t.text&&\"++\"!==t.text||this.print_newline(!1,!0),\";\"===this._flags.last_token.text&&y(this._flags.mode)&&(n=!0),this._flags.last_token.type===l.RESERVED?n=!0:this._flags.last_token.type===l.END_EXPR?n=!(\"]\"===this._flags.last_token.text&&(\"--\"===t.text||\"++\"===t.text)):this._flags.last_token.type===l.OPERATOR&&(n=f(t.text,[\"--\",\"-\",\"++\",\"+\"])&&f(this._flags.last_token.text,[\"--\",\"-\",\"++\",\"+\"]),f(t.text,[\"+\",\"-\"])&&f(this._flags.last_token.text,[\"--\",\"++\"])&&(i=!0)),(\"BlockStatement\"!==this._flags.mode||this._flags.inline_frame)&&\"Statement\"!==this._flags.mode||\"{\"!==this._flags.last_token.text&&\";\"!==this._flags.last_token.text||this.print_newline()),this._output.space_before_token=this._output.space_before_token||n,this.print_token(t),this._output.space_before_token=i}else this.print_token(t);else this.print_token(t)},v.prototype.handle_block_comment=function(t,e){return this._output.raw?(this._output.add_raw_token(t),void(t.directives&&\"end\"===t.directives.preserve&&(this._output.raw=this._options.test_output_raw))):t.directives?(this.print_newline(!1,e),this.print_token(t),\"start\"===t.directives.preserve&&(this._output.raw=!0),void this.print_newline(!1,!0)):void(o.newline.test(t.text)||t.newlines?this.print_block_commment(t,e):(this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0))},v.prototype.print_block_commment=function(t,e){var r,n,i,a=function(t){for(var e=[],r=(t=t.replace(o.allLineBreaks,\"\\n\")).indexOf(\"\\n\");-1!==r;)e.push(t.substring(0,r)),r=(t=t.substring(r+1)).indexOf(\"\\n\");return t.length&&e.push(t),e}(t.text),s=t.whitespace_before,u=s.length;if(this.print_newline(!1,e),this.print_token_line_indentation(t),this._output.add_token(a[0]),this.print_newline(!1,e),1this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,\" \"===t.__items[0]&&(t.__items.splice(0,1),--t.__character_count),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf(\"\\n\");-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},e.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},e.prototype._remove_indent=function(){0=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var t,e=this.__cache.length,r=\"\";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,r=new Array(t+1).join(this.__indent_string)),e&&(r+=new Array(e+1).join(\" \")),this.__cache.push(r)},n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},n.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline()||(this.raw||this.__add_outputline(),0))},n.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();return e&&(\"\\n\"===e[e.length-1]&&(e=e.replace(/\\n+$/g,\"\")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline(),e=this.__lines.join(\"\\n\"),\"\\n\"!==t&&(e=e.replace(/[\\n]/g,t)),e},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),1>> === !== << && >= ** != == <= >> || |> < / - + > : & % ? ^ | *\".split(\" \"),o=(o=\"\\\\?\\\\.(?!\\\\d) \"+(o=\">>>= ... >>= <<= === >>> !== **= => ^= :: /= << <= == && -= >= >> != -- += ** || ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |\").replace(/[-[\\]{}()*+?.,\\\\^$|#]/g,\"\\\\$&\")).replace(/ /g,\"|\");var g,b=new RegExp(o),_=(o=(a=\"continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export\".split(\",\")).concat([\"do\",\"in\",\"of\",\"else\",\"get\",\"set\",\"new\",\"catch\",\"finally\",\"typeof\",\"yield\",\"async\",\"await\",\"from\",\"as\"]),new RegExp(\"^(?:\"+o.join(\"|\")+\")$\"));((o=function(t,e){i.call(this,t,e),this._patterns.whitespace=this._patterns.whitespace.matching(/\\u00A0\\u1680\\u180e\\u2000-\\u200a\\u202f\\u205f\\u3000\\ufeff/.source,/\\u2028\\u2029/.source),t=new u(this._input),e=new c(this._input).read_options(this._options),this.__patterns={template:e,identifier:e.starting_with(s.identifier).matching(s.identifierMatch),number:t.matching(p),punct:t.matching(b),comment:t.starting_with(/\\/\\//).until(/[\\n\\r\\u2028\\u2029]/),block_comment:t.starting_with(/\\/\\*/).until_after(/\\*\\//),html_comment_start:t.matching(//),include:t.starting_with(/#include/).until_after(s.lineBreak),shebang:t.starting_with(/#!/).until_after(s.lineBreak),xml:t.matching(/[\\s\\S]*?<(\\/?)([-a-zA-Z:0-9_.]+|{[\\s\\S]+?}|!\\[CDATA\\[[\\s\\S]*?\\]\\])(\\s+{[\\s\\S]+?}|\\s+[-a-zA-Z:0-9_.]+|\\s+[-a-zA-Z:0-9_.]+\\s*=\\s*('[^']*'|\"[^\"]*\"|{[\\s\\S]+?}))*\\s*(\\/?)\\s*>/),single_quote:e.until(/['\\\\\\n\\r\\u2028\\u2029]/),double_quote:e.until(/[\"\\\\\\n\\r\\u2028\\u2029]/),template_text:e.until(/[`\\\\$]/),template_expression:e.until(/[`}\\\\]/)}}).prototype=new i)._is_comment=function(t){return t.type===f.COMMENT||t.type===f.BLOCK_COMMENT||t.type===f.UNKNOWN},o.prototype._is_opening=function(t){return t.type===f.START_BLOCK||t.type===f.START_EXPR},o.prototype._is_closing=function(t,e){return(t.type===f.END_BLOCK||t.type===f.END_EXPR)&&e&&(\"]\"===t.text&&\"[\"===e.text||\")\"===t.text&&\"(\"===e.text||\"}\"===t.text&&\"{\"===e.text)},o.prototype._reset=function(){g=!1},o.prototype._get_next_token=function(t){this._readWhitespace();var e=this._input.peek();return null===e?this._create_token(f.EOF,\"\"):this._read_non_javascript(e)||this._read_string(e)||this._read_word(t)||this._read_singles(e)||this._read_comment(e)||this._read_regexp(e,t)||this._read_xml(e,t)||this._read_punctuation()||this._create_token(f.UNKNOWN,this._input.next())},o.prototype._read_word=function(t){var e=this.__patterns.identifier.read();return\"\"!==e?(e=e.replace(s.allLineBreaks,\"\\n\"),t.type!==f.DOT&&(t.type!==f.RESERVED||\"set\"!==t.text&&\"get\"!==t.text)&&_.test(e)?\"in\"===e||\"of\"===e?this._create_token(f.OPERATOR,e):this._create_token(f.RESERVED,e):this._create_token(f.WORD,e)):\"\"!==(e=this.__patterns.number.read())?this._create_token(f.WORD,e):void 0},o.prototype._read_singles=function(t){var e=null;return\"(\"===t||\"[\"===t?e=this._create_token(f.START_EXPR,t):\")\"===t||\"]\"===t?e=this._create_token(f.END_EXPR,t):\"{\"===t?e=this._create_token(f.START_BLOCK,t):\"}\"===t?e=this._create_token(f.END_BLOCK,t):\";\"===t?e=this._create_token(f.SEMICOLON,t):\".\"===t&&m.test(this._input.peek(1))?e=this._create_token(f.DOT,t):\",\"===t&&(e=this._create_token(f.COMMA,t)),e&&this._input.next(),e},o.prototype._read_punctuation=function(){var t=this.__patterns.punct.read();if(\"\"!==t)return\"=\"===t?this._create_token(f.EQUALS,t):\"?.\"===t?this._create_token(f.DOT,t):this._create_token(f.OPERATOR,t)},o.prototype._read_non_javascript=function(t){var e=\"\";if(\"#\"===t){if(this._is_first_token()&&(e=this.__patterns.shebang.read()))return this._create_token(f.UNKNOWN,e.trim()+\"\\n\");if(e=this.__patterns.include.read())return this._create_token(f.UNKNOWN,e.trim()+\"\\n\");t=this._input.next();var r=\"#\";if(this._input.hasNext()&&this._input.testChar(d)){for(;r+=t=this._input.next(),this._input.hasNext()&&\"#\"!==t&&\"=\"!==t;);return\"#\"===t||(\"[\"===this._input.peek()&&\"]\"===this._input.peek(1)?(r+=\"[]\",this._input.next(),this._input.next()):\"{\"===this._input.peek()&&\"}\"===this._input.peek(1)&&(r+=\"{}\",this._input.next(),this._input.next())),this._create_token(f.WORD,r)}this._input.back()}else if(\"<\"===t&&this._is_first_token()){if(e=this.__patterns.html_comment_start.read()){for(;this._input.hasNext()&&!this._input.testChar(s.newline);)e+=this._input.next();return g=!0,this._create_token(f.COMMENT,e)}}else if(g&&\"-\"===t&&(e=this.__patterns.html_comment_end.read()))return g=!1,this._create_token(f.COMMENT,e);return null},o.prototype._read_comment=function(t){var e,r=null;return\"/\"===t&&(e=\"\",\"*\"===this._input.peek(1)?(e=this.__patterns.block_comment.read(),(t=h.get_directives(e))&&\"start\"===t.ignore&&(e+=h.readIgnored(this._input)),e=e.replace(s.allLineBreaks,\"\\n\"),(r=this._create_token(f.BLOCK_COMMENT,e)).directives=t):\"/\"===this._input.peek(1)&&(e=this.__patterns.comment.read(),r=this._create_token(f.COMMENT,e))),r},o.prototype._read_string=function(t){if(\"`\"!==t&&\"'\"!==t&&'\"'!==t)return null;var e=this._input.next();return this.has_char_escapes=!1,e+=\"`\"===t?this._read_string_recursive(\"`\",!0,\"${\"):this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(e=function(t){for(var e,r=\"\",i=new n(t),o=null;i.hasNext();)if((o=i.match(/([\\s]|[^\\\\]|\\\\\\\\)+/g))&&(r+=o[0]),\"\\\\\"===i.peek()){if(i.next(),\"x\"===i.peek())o=i.match(/x([0-9A-Fa-f]{2})/g);else{if(\"u\"!==i.peek()){r+=\"\\\\\",i.hasNext()&&(r+=i.next());continue}o=i.match(/u([0-9A-Fa-f]{4})/g)}if(!o)return t;if(126<(e=parseInt(o[1],16))&&e<=255&&0===o[0].indexOf(\"x\"))return t;r+=0<=e&&e<32?\"\\\\\"+o[0]:34===e||39===e||92===e?\"\\\\\"+String.fromCharCode(e):String.fromCharCode(e)}return r}(e)),this._input.peek()===t&&(e+=this._input.next()),e=e.replace(s.allLineBreaks,\"\\n\"),this._create_token(f.STRING,e)},o.prototype._allow_regexp_or_xml=function(t){return t.type===f.RESERVED&&l(t.text,[\"return\",\"case\",\"throw\",\"else\",\"do\",\"typeof\",\"yield\"])||t.type===f.END_EXPR&&\")\"===t.text&&t.opened.previous.type===f.RESERVED&&l(t.opened.previous.text,[\"if\",\"while\",\"for\"])||l(t.type,[f.COMMENT,f.START_EXPR,f.START_BLOCK,f.START,f.END_BLOCK,f.OPERATOR,f.EQUALS,f.EOF,f.SEMICOLON,f.COMMA])},o.prototype._read_regexp=function(t,e){if(\"/\"===t&&this._allow_regexp_or_xml(e)){for(var r=this._input.next(),n=!1,i=!1;this._input.hasNext()&&(n||i||this._input.peek()!==t)&&!this._input.testChar(s.newline);)r+=this._input.peek(),n?n=!1:(n=\"\\\\\"===this._input.peek(),\"[\"===this._input.peek()?i=!0:\"]\"===this._input.peek()&&(i=!1)),this._input.next();return this._input.peek()===t&&(r+=this._input.next(),r+=this._input.read(s.identifier)),this._create_token(f.STRING,r)}return null},o.prototype._read_xml=function(t,e){if(this._options.e4x&&\"<\"===t&&this._allow_regexp_or_xml(e)){var r=\"\",n=this.__patterns.xml.read_match();if(n){for(var i=n[2].replace(/^{\\s+/,\"{\").replace(/\\s+}$/,\"}\"),o=0===i.indexOf(\"{\"),a=0;n;){var u=!!n[1],c=n[2];if(!n[n.length-1]&&\"![CDATA[\"!==c.slice(0,8)&&(c===i||o&&c.replace(/^{\\s+/,\"{\").replace(/\\s+}$/,\"}\"))&&(u?--a:++a),r+=n[0],a<=0)break;n=this.__patterns.xml.read_match()}return n||(r+=this._input.match(/[\\s\\S]*/g)[0]),r=r.replace(s.allLineBreaks,\"\\n\"),this._create_token(f.STRING,r)}}return null},o.prototype._read_string_recursive=function(t,e,r){var n,i;\"'\"===t?i=this.__patterns.single_quote:'\"'===t?i=this.__patterns.double_quote:\"`\"===t?i=this.__patterns.template_text:\"}\"===t&&(i=this.__patterns.template_expression);for(var o=i.read(),a=\"\";this._input.hasNext();){if((a=this._input.next())===t||!e&&s.newline.test(a)){this._input.back();break}\"\\\\\"===a&&this._input.hasNext()?(\"x\"===(n=this._input.peek())||\"u\"===n?this.has_char_escapes=!0:\"\\r\"===n&&\"\\n\"===this._input.peek(1)&&this._input.next(),a+=this._input.next()):r&&(\"${\"===r&&\"$\"===a&&\"{\"===this._input.peek()&&(a+=this._input.next()),r===a&&(a+=\"`\"===t?this._read_string_recursive(\"}\",e,\"`\"):this._read_string_recursive(\"`\",e,\"${\"),this._input.hasNext()&&(a+=this._input.next()))),o+=a+=i.read()}return o},t.exports.Tokenizer=o,t.exports.TOKEN=f,t.exports.positionable_operators=r.slice(),t.exports.line_starters=a.slice()},function(t){\"use strict\";var e=RegExp.prototype.hasOwnProperty(\"sticky\");function r(t){this.__input=t||\"\",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){0=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=r},function(t,e,r){\"use strict\";var n=r(8).InputScanner,i=r(3).Token,o=r(10).TokenStream,a=r(11).WhitespacePattern,s={START:\"TK_START\",RAW:\"TK_RAW\",EOF:\"TK_EOF\"};(r=function(t,e){this._input=new n(t),this._options=e||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new a(this._input)}).prototype.tokenize=function(){var t;this._input.restart(),this.__tokens=new o,this._reset();for(var e=new i(s.START,\"\"),r=null,n=[],a=new o;e.type!==s.EOF;){for(t=this._get_next_token(e,r);this._is_comment(t);)a.add(t),t=this._get_next_token(e,r);a.isEmpty()||(t.comments_before=a,a=new o),t.parent=r,this._is_opening(t)?(n.push(r),r=t):r&&this._is_closing(t,r)&&((t.opened=r).closed=t,r=n.pop(),t.parent=r),(t.previous=e).next=t,this.__tokens.add(t),e=t}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(s.RAW,t):this._create_token(s.EOF,\"\")},r.prototype._is_comment=function(){return!1},r.prototype._is_opening=function(){return!1},r.prototype._is_closing=function(){return!1},r.prototype._create_token=function(t,e){return new i(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=r,t.exports.TOKEN=s},function(t){\"use strict\";function e(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position/),erb:t.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:t.starting_with(/{%/).until_after(/%}/),django_value:t.starting_with(/{{/).until_after(/}}/),django_comment:t.starting_with(/{#/).until_after(/#}/)}}(o.prototype=new n)._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e},o.prototype.read_options=function(t){var e,r=this._create();for(e in i)r._disabled[e]=-1===t.templating.indexOf(e);return r._update(),r},o.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e},o.prototype.read=function(){for(var t=\"\",e=(t=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern),this._read_template());e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t},o.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp(\"(?:\"+t.join(\"|\")+\")\")},o.prototype._read_template=function(){var t,e=\"\",r=this._input.peek();return\"<\"===r?(t=this._input.peek(1),this._disabled.php||this._excluded.php||\"?\"!==t||(e=e||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||\"%\"!==t||(e=e||this.__patterns.erb.read())):\"{\"===r&&(this._disabled.handlebars||this._excluded.handlebars||(e=(e=(e=e||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=(e=e||this.__patterns.django_comment.read())||this.__patterns.django.read()))),e},t.exports.TemplatablePattern=o}],a.c=n,a.d=function(t,e,r){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},a.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&\"object\"===o(t)&&t&&t.__esModule)return t;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var n in t)a.d(r,n,function(e){return t[e]}.bind(null,n));return r},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,\"a\",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p=\"\",i=a(a.s=0),void 0===(e=function(){return{js_beautify:i}}.apply(e,[]))||(t.exports=e)},function(t,e){var r,n,i;function o(t){return(o=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function a(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return r[t].call(e.exports,e,e.exports,a),e.l=!0,e.exports}n={},a.m=r=[,,function(t){\"use strict\";function e(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function r(t,e){this.__cache=[\"\"],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||\"\",0this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,\" \"===t.__items[0]&&(t.__items.splice(0,1),--t.__character_count),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf(\"\\n\");-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},e.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},e.prototype._remove_indent=function(){0=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var t,e=this.__cache.length,r=\"\";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,r=new Array(t+1).join(this.__indent_string)),e&&(r+=new Array(e+1).join(\" \")),this.__cache.push(r)},n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},n.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline()||(this.raw||this.__add_outputline(),0))},n.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();return e&&(\"\\n\"===e[e.length-1]&&(e=e.replace(/\\n+$/g,\"\")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline(),e=this.__lines.join(\"\\n\"),\"\\n\"!==t&&(e=e.replace(/[\\n]/g,t)),e},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),1=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=r},,,,,function(t){\"use strict\";function e(t,e){t=\"string\"==typeof t?t:t.source,e=\"string\"==typeof e?e:e.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \\w+[:]\\w+)+ /.source+e,\"g\"),this.__directive_pattern=/ (\\w+)[:](\\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\\sbeautify\\signore:end\\s/.source+e,\"g\")}e.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var e={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(t);r;)e[r[1]]=r[2],r=this.__directive_pattern.exec(t);return e},e.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=e},,function(t,e,r){\"use strict\";var n=r(16).Beautifier,i=r(17).Options;t.exports=function(t,e){return new n(t,e).beautify()},t.exports.defaultOptions=function(){return new i}},function(t,e,r){\"use strict\";var n=r(17).Options,i=r(2).Output,o=r(8).InputScanner,a=new(r(13).Directives)(/\\/\\*/,/\\*\\//),s=/\\r\\n|[\\r\\n]/,u=/\\r\\n|[\\r\\n]/g,c=/\\s/,l=/(?:\\s|\\n)+/g,f=/\\/\\*(?:[\\s\\S]*?)((?:\\*\\/)|$)/g,h=/\\/\\/(?:[^\\n\\r\\u2028\\u2029]*)/g;function p(t,e){this._source_text=t||\"\",this._options=new n(e),this._ch=null,this._input=null,this.NESTED_AT_RULE={\"@page\":!0,\"@font-face\":!0,\"@keyframes\":!0,\"@media\":!0,\"@supports\":!0,\"@document\":!0},this.CONDITIONAL_GROUP_RULE={\"@media\":!0,\"@supports\":!0,\"@document\":!0}}p.prototype.eatString=function(t){var e=\"\";for(this._ch=this._input.next();this._ch;){if(e+=this._ch,\"\\\\\"===this._ch)e+=this._input.next();else if(-1!==t.indexOf(this._ch)||\"\\n\"===this._ch)break;this._ch=this._input.next()}return e},p.prototype.eatWhitespace=function(t){for(var e=c.test(this._input.peek()),r=!0;c.test(this._input.peek());)this._ch=this._input.next(),t&&\"\\n\"===this._ch&&(this._options.preserve_newlines||r)&&(r=!1,this._output.add_new_line(!0));return e},p.prototype.foundNestedPseudoClass=function(){for(var t=0,e=1,r=this._input.peek(e);r;){if(\"{\"===r)return!0;if(\"(\"===r)t+=1;else if(\")\"===r){if(0===t)return!1;--t}else if(\";\"===r||\"}\"===r)return!1;e++,r=this._input.peek(e)}return!1},p.prototype.print_string=function(t){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(t)},p.prototype.preserveSingleSpace=function(t){t&&(this._output.space_before_token=!0)},p.prototype.indent=function(){this._indentLevel++},p.prototype.outdent=function(){0this._nestedLevel):this._indentLevel>=this._nestedLevel,this._options.newline_between_rules&&b&&this._output.previous_line&&\"{\"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above(\"/\",\",\"),this.eatWhitespace(!0),this._output.add_new_line()):\"}\"===this._ch?(this.outdent(),this._output.add_new_line(),\"{\"===p&&this._output.trim(!0),v=w=!1,_&&(this.outdent(),_=!1),this.print_string(this._ch),b=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&\"}\"!==this._input.peek()&&this._output.add_new_line(!0)):\":\"===this._ch?!b&&!y||this._input.lookBack(\"&\")||this.foundNestedPseudoClass()||this._input.lookBack(\"(\")||v||0!==g?(this._input.lookBack(\" \")&&(this._output.space_before_token=!0),\":\"===this._input.peek()?(this._ch=this._input.next(),this.print_string(\"::\")):this.print_string(\":\")):(this.print_string(\":\"),_||(_=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):'\"'===this._ch||\"'\"===this._ch?(this.preserveSingleSpace(n),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)):\";\"===this._ch?0===g?(_&&(this.outdent(),_=!1),w=v=!1,this.print_string(this._ch),this.eatWhitespace(!0),\"/\"!==this._input.peek()&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0):\"(\"===this._ch?this._input.lookBack(\"url\")?(this.print_string(this._ch),this.eatWhitespace(),g++,this.indent(),this._ch=this._input.next(),\")\"===this._ch||'\"'===this._ch||\"'\"===this._ch?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(\")\")),g&&(g--,this.outdent()))):(this.preserveSingleSpace(n),this.print_string(this._ch),this.eatWhitespace(),g++,this.indent()):\")\"===this._ch?(g&&(g--,this.outdent()),this.print_string(this._ch)):\",\"===this._ch?(this.print_string(this._ch),this.eatWhitespace(!0),!this._options.selector_separator_newline||_||0!==g||w?this._output.space_before_token=!0:this._output.add_new_line()):\">\"!==this._ch&&\"+\"!==this._ch&&\"~\"!==this._ch||_||0!==g?\"]\"===this._ch?this.print_string(this._ch):\"[\"===this._ch?(this.preserveSingleSpace(n),this.print_string(this._ch)):\"=\"===this._ch?(this.eatWhitespace(),this.print_string(\"=\"),c.test(this._ch)&&(this._ch=\"\")):(\"!\"!==this._ch||this._input.lookBack(\"\\\\\")?this.preserveSingleSpace(n):this.print_string(\" \"),this.print_string(this._ch)):this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&c.test(this._ch)&&(this._ch=\"\"));return this._output.get_code(e)},t.exports.Beautifier=p},function(t,e,r){\"use strict\";var n=r(6).Options;function i(t){n.call(this,t,\"css\"),this.selector_separator_newline=this._get_boolean(\"selector_separator_newline\",!0),this.newline_between_rules=this._get_boolean(\"newline_between_rules\",!0),t=this._get_boolean(\"space_around_selector_separator\"),this.space_around_combinator=this._get_boolean(\"space_around_combinator\")||t}i.prototype=new n,t.exports.Options=i}],a.c=n,a.d=function(t,e,r){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},a.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&\"object\"===o(t)&&t&&t.__esModule)return t;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var n in t)a.d(r,n,function(e){return t[e]}.bind(null,n));return r},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,\"a\",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p=\"\",i=a(a.s=15),void 0===(e=function(){return{css_beautify:i}}.apply(e,[]))||(t.exports=e)},function(t,e,r){var n=r(584);function i(t,e){return n(t[1],e[1])}function o(t,e){return t[1]>e[1]?1:-1}t.exports=function(t,e){switch(e){case\"natural\":return t.sort(i);case\"standard\":return t.sort(o);case\"none\":case!1:return t}}},function(t,e,r){var n=r(113).Spaces,i=r(12),o=r(114),a=/[\\s\"'][iI]\\s*\\]/,s=/([\\d\\w])([iI])\\]/g,u=/=\"([a-zA-Z][a-zA-Z\\d\\-_]+)\"([iI])/g,c=/=\"([a-zA-Z][a-zA-Z\\d\\-_]+)\"(\\s|\\])/g,l=/^(?:(?:)\\s*)+/,f=/='([a-zA-Z][a-zA-Z\\d\\-_]+)'([iI])/g,h=/='([a-zA-Z][a-zA-Z\\d\\-_]+)'(\\s|\\])/g,p=/[>\\+~]/,d=/\\s/;t.exports=function(t,e,r,m,g){var b=[],_=[];function y(t,e){return g.push(\"HTML comment '\"+e+\"' at \"+o(t[2][0])+\". Removing.\"),\"\"}for(var v=0,w=t.length;v~]/.test(i(e[1])),u=0,c=e[2].length;ut.length)&&(e=t.length);for(var r=0,n=new Array(e);r\")?\"\".concat(n,\"\"):n,l=function(t,e){var r=1t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:e}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var o,a=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(a);try{for(g.s();!(b=g.n()).done;){var b=b.value;u.push.apply(u,n(t(b,o)))}}catch(e){g.e(e)}finally{g.f()}}return u},Object.defineProperty(e,\"rulesCollection\",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,\"registerRule\",{enumerable:!0,get:function(){return l.registerRule}}),Object.defineProperty(e,\"dependencies\",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,\"registerDependencies\",{enumerable:!0,get:function(){return f.registerDependencies}}),Object.defineProperty(e,\"assignDependencies\",{enumerable:!0,get:function(){return f.assignDependencies}}),e.formatValidationError=void 0,c=c(r(58));var l=u(r(705)),f=u(r(711)),h=[\"mjml\"];c=c.default,e.formatValidationError=c},function(t){t.exports=function(t){return null==t}},function(t,e,r){\"use strict\";var n=r(0);Object.defineProperty(e,\"__esModule\",{value:!0}),e.registerComponent=function(t){o[t.componentName||(0,i.default)(t.name)]=t},e.initComponent=function(t){var e=t.initialDatas,r=t.name;return(t=o[r])?((e=new t(e)).headStyle&&e.context.addHeadStyle(r,e.headStyle),e.componentHeadStyle&&e.context.addComponentHeadSyle(e.componentHeadStyle),e):null},e.default=void 0;var i=n(r(316)),o={};e.default=o},function(t){function e(t){throw(t=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",t}e.keys=function(){return[]},e.resolve=e,(t.exports=e).id=182},function(t,e,r){\"use strict\";var n=r(1),i=r(319),o=r(2).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<>>32-e}function c(t,e,r,n,i,o,a){return u(t+(e&r|~e&n)+i+o|0,a)+e|0}function l(t,e,r,n,i,o,a){return u(t+(e&n|r&~n)+i+o|0,a)+e|0}function f(t,e,r,n,i,o,a){return u(t+(e^r^n)+i+o|0,a)+e|0}function h(t,e,r,n,i,o,a){return u(t+(r^(e|~n))+i+o|0,a)+e|0}n(s,i),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=c(this._a,o=this._b,i=this._c,n=this._d,t[0],3614090360,7),n=c(n,r,o,i,t[1],3905402710,12),i=c(i,n,r,o,t[2],606105819,17),o=c(o,i,n,r,t[3],3250441966,22);r=c(r,o,i,n,t[4],4118548399,7),n=c(n,r,o,i,t[5],1200080426,12),i=c(i,n,r,o,t[6],2821735955,17),o=c(o,i,n,r,t[7],4249261313,22),r=c(r,o,i,n,t[8],1770035416,7),n=c(n,r,o,i,t[9],2336552879,12),i=c(i,n,r,o,t[10],4294925233,17),o=c(o,i,n,r,t[11],2304563134,22),r=c(r,o,i,n,t[12],1804603682,7),n=c(n,r,o,i,t[13],4254626195,12),i=c(i,n,r,o,t[14],2792965006,17),r=l(r,o=c(o,i,n,r,t[15],1236535329,22),i,n,t[1],4129170786,5),n=l(n,r,o,i,t[6],3225465664,9),i=l(i,n,r,o,t[11],643717713,14),o=l(o,i,n,r,t[0],3921069994,20),r=l(r,o,i,n,t[5],3593408605,5),n=l(n,r,o,i,t[10],38016083,9),i=l(i,n,r,o,t[15],3634488961,14),o=l(o,i,n,r,t[4],3889429448,20),r=l(r,o,i,n,t[9],568446438,5),n=l(n,r,o,i,t[14],3275163606,9),i=l(i,n,r,o,t[3],4107603335,14),o=l(o,i,n,r,t[8],1163531501,20),r=l(r,o,i,n,t[13],2850285829,5),n=l(n,r,o,i,t[2],4243563512,9),i=l(i,n,r,o,t[7],1735328473,14),r=f(r,o=l(o,i,n,r,t[12],2368359562,20),i,n,t[5],4294588738,4),n=f(n,r,o,i,t[8],2272392833,11),i=f(i,n,r,o,t[11],1839030562,16),o=f(o,i,n,r,t[14],4259657740,23),r=f(r,o,i,n,t[1],2763975236,4),n=f(n,r,o,i,t[4],1272893353,11),i=f(i,n,r,o,t[7],4139469664,16),o=f(o,i,n,r,t[10],3200236656,23),r=f(r,o,i,n,t[13],681279174,4),n=f(n,r,o,i,t[0],3936430074,11),i=f(i,n,r,o,t[3],3572445317,16),o=f(o,i,n,r,t[6],76029189,23),r=f(r,o,i,n,t[9],3654602809,4),n=f(n,r,o,i,t[12],3873151461,11),i=f(i,n,r,o,t[15],530742520,16),r=h(r,o=f(o,i,n,r,t[2],3299628645,23),i,n,t[0],4096336452,6),n=h(n,r,o,i,t[7],1126891415,10),i=h(i,n,r,o,t[14],2878612391,15),o=h(o,i,n,r,t[5],4237533241,21),r=h(r,o,i,n,t[12],1700485571,6),n=h(n,r,o,i,t[3],2399980690,10),i=h(i,n,r,o,t[10],4293915773,15),o=h(o,i,n,r,t[1],2240044497,21),r=h(r,o,i,n,t[8],1873313359,6),n=h(n,r,o,i,t[15],4264355552,10),i=h(i,n,r,o,t[6],2734768916,15),o=h(o,i,n,r,t[13],1309151649,21),r=h(r,o,i,n,t[4],4149444226,6),n=h(n,r,o,i,t[11],3174756917,10),i=h(i,n,r,o,t[2],718787259,15),o=h(o,i,n,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+o|0,this._c=this._c+i|0,this._d=this._d+n|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,56>>32-e}function m(t,e,r,n,i,o,a,s){return d(t+(e^r^n)+o+a|0,s)+i|0}function g(t,e,r,n,i,o,a,s){return d(t+(e&r|~e&n)+o+a|0,s)+i|0}function b(t,e,r,n,i,o,a,s){return d(t+((e|~r)^n)+o+a|0,s)+i|0}function _(t,e,r,n,i,o,a,s){return d(t+(e&n|r&~n)+o+a|0,s)+i|0}function y(t,e,r,n,i,o,a,s){return d(t+(e^(r|~n))+o+a|0,s)+i|0}i(p,o),p.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,p=0|this._e,v=0|this._a,w=0|this._b,E=0|this._c,T=0|this._d,A=0|this._e,x=0;x<80;x+=1){var S,O=x<16?(S=m(r,n,i,o,p,t[s[x]],f[0],c[x]),y(v,w,E,T,A,t[u[x]],h[0],l[x])):x<32?(S=g(r,n,i,o,p,t[s[x]],f[1],c[x]),_(v,w,E,T,A,t[u[x]],h[1],l[x])):x<48?(S=b(r,n,i,o,p,t[s[x]],f[2],c[x]),b(v,w,E,T,A,t[u[x]],h[2],l[x])):x<64?(S=_(r,n,i,o,p,t[s[x]],f[3],c[x]),g(v,w,E,T,A,t[u[x]],h[3],l[x])):(S=y(r,n,i,o,p,t[s[x]],f[4],c[x]),m(v,w,E,T,A,t[u[x]],h[4],l[x]));r=p,p=o,o=d(i,10),i=n,n=S,v=A,A=T,T=d(E,10),E=w,w=O}var k=this._b+i+T|0;this._b=this._c+o+A|0,this._c=this._d+p+v|0,this._d=this._e+r+w|0,this._e=this._a+n+E|0,this._a=k},p.prototype._digest=function(){this._block[this._blockOffset++]=128,56this._sectionStart&&this._cbs.ontext(this._getSection()),this._state=1,this._sectionStart=this._index):this._decodeEntities&&this._special===u&&\"&\"===t&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=s,this._state=50,this._sectionStart=this._index)},h.prototype._stateBeforeTagName=function(t){\"/\"===t?this._state=4:\"<\"===t?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):\">\"===t||this._special!==u||c(t)?this._state=s:\"!\"===t?(this._state=14,this._sectionStart=this._index+1):\"?\"===t?(this._state=16,this._sectionStart=this._index+1):(this._state=this._xmlMode||\"s\"!==t&&\"S\"!==t?2:30,this._sectionStart=this._index)},h.prototype._stateInTagName=function(t){\"/\"!==t&&\">\"!==t&&!c(t)||(this._emitToken(\"onopentagname\"),this._state=7,this._index--)},h.prototype._stateBeforeCloseingTagName=function(t){c(t)||(\">\"===t?this._state=s:this._special!==u?\"s\"===t||\"S\"===t?this._state=31:(this._state=s,this._index--):(this._state=5,this._sectionStart=this._index))},h.prototype._stateInCloseingTagName=function(t){\">\"!==t&&!c(t)||(this._emitToken(\"onclosetag\"),this._state=6,this._index--)},h.prototype._stateAfterCloseingTagName=function(t){\">\"===t&&(this._state=s,this._sectionStart=this._index+1)},h.prototype._stateBeforeAttributeName=function(t){\">\"===t?(this._cbs.onopentagend(),this._state=s,this._sectionStart=this._index+1):\"/\"===t?this._state=3:c(t)||(this._state=8,this._sectionStart=this._index)},h.prototype._stateInSelfClosingTag=function(t){\">\"===t?(this._cbs.onselfclosingtag(),this._state=s,this._sectionStart=this._index+1):c(t)||(this._state=7,this._index--)},h.prototype._stateInAttributeName=function(t){\"=\"!==t&&\"/\"!==t&&\">\"!==t&&!c(t)||(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=9,this._index--)},h.prototype._stateAfterAttributeName=function(t){\"=\"===t?this._state=10:\"/\"===t||\">\"===t?(this._cbs.onattribend(),this._state=7,this._index--):c(t)||(this._cbs.onattribend(),this._state=8,this._sectionStart=this._index)},h.prototype._stateBeforeAttributeValue=function(t){'\"'===t?(this._state=11,this._sectionStart=this._index+1):\"'\"===t?(this._state=12,this._sectionStart=this._index+1):c(t)||(this._state=13,this._sectionStart=this._index,this._index--)},h.prototype._stateInAttributeValueDoubleQuotes=function(t){'\"'===t?(this._emitToken(\"onattribdata\"),this._cbs.onattribend(),this._state=7):this._decodeEntities&&\"&\"===t&&(this._emitToken(\"onattribdata\"),this._baseState=this._state,this._state=50,this._sectionStart=this._index)},h.prototype._stateInAttributeValueSingleQuotes=function(t){\"'\"===t?(this._emitToken(\"onattribdata\"),this._cbs.onattribend(),this._state=7):this._decodeEntities&&\"&\"===t&&(this._emitToken(\"onattribdata\"),this._baseState=this._state,this._state=50,this._sectionStart=this._index)},h.prototype._stateInAttributeValueNoQuotes=function(t){c(t)||\">\"===t?(this._emitToken(\"onattribdata\"),this._cbs.onattribend(),this._state=7,this._index--):this._decodeEntities&&\"&\"===t&&(this._emitToken(\"onattribdata\"),this._baseState=this._state,this._state=50,this._sectionStart=this._index)},h.prototype._stateBeforeDeclaration=function(t){this._state=\"[\"===t?21:\"-\"===t?17:15},h.prototype._stateInDeclaration=function(t){\">\"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=s,this._sectionStart=this._index+1)},h.prototype._stateInProcessingInstruction=function(t){\">\"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=s,this._sectionStart=this._index+1)},h.prototype._stateBeforeComment=function(t){\"-\"===t?(this._state=18,this._sectionStart=this._index+1):this._state=15},h.prototype._stateInComment=function(t){\"-\"===t&&(this._state=19)},h.prototype._stateAfterComment1=function(t){this._state=\"-\"===t?20:18},h.prototype._stateAfterComment2=function(t){\">\"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=s,this._sectionStart=this._index+1):\"-\"!==t&&(this._state=18)},h.prototype._stateBeforeCdata1=l(\"C\",22,15),h.prototype._stateBeforeCdata2=l(\"D\",23,15),h.prototype._stateBeforeCdata3=l(\"A\",24,15),h.prototype._stateBeforeCdata4=l(\"T\",25,15),h.prototype._stateBeforeCdata5=l(\"A\",26,15),h.prototype._stateBeforeCdata6=function(t){\"[\"===t?(this._state=27,this._sectionStart=this._index+1):(this._state=15,this._index--)},h.prototype._stateInCdata=function(t){\"]\"===t&&(this._state=28)},h.prototype._stateAfterCdata1=function(t){this._state=\"]\"===t?29:27},h.prototype._stateAfterCdata2=function(t){\">\"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=s,this._sectionStart=this._index+1):\"]\"!==t&&(this._state=27)},h.prototype._stateBeforeSpecial=function(t){\"c\"===t||\"C\"===t?this._state=32:\"t\"===t||\"T\"===t?this._state=42:(this._state=2,this._index--)},h.prototype._stateBeforeSpecialEnd=function(t){1!==this._special||\"c\"!==t&&\"C\"!==t?2!==this._special||\"t\"!==t&&\"T\"!==t?this._state=s:this._state=46:this._state=37},h.prototype._stateBeforeScript1=f(\"R\",33),h.prototype._stateBeforeScript2=f(\"I\",34),h.prototype._stateBeforeScript3=f(\"P\",35),h.prototype._stateBeforeScript4=f(\"T\",36),h.prototype._stateBeforeScript5=function(t){\"/\"!==t&&\">\"!==t&&!c(t)||(this._special=1),this._state=2,this._index--},h.prototype._stateAfterScript1=l(\"R\",38,s),h.prototype._stateAfterScript2=l(\"I\",39,s),h.prototype._stateAfterScript3=l(\"P\",40,s),h.prototype._stateAfterScript4=l(\"T\",41,s),h.prototype._stateAfterScript5=function(t){\">\"===t||c(t)?(this._special=u,this._state=5,this._sectionStart=this._index-6,this._index--):this._state=s},h.prototype._stateBeforeStyle1=f(\"Y\",43),h.prototype._stateBeforeStyle2=f(\"L\",44),h.prototype._stateBeforeStyle3=f(\"E\",45),h.prototype._stateBeforeStyle4=function(t){\"/\"!==t&&\">\"!==t&&!c(t)||(this._special=2),this._state=2,this._index--},h.prototype._stateAfterStyle1=l(\"Y\",47,s),h.prototype._stateAfterStyle2=l(\"L\",48,s),h.prototype._stateAfterStyle3=l(\"E\",49,s),h.prototype._stateAfterStyle4=function(t){\">\"===t||c(t)?(this._special=u,this._state=5,this._sectionStart=this._index-5,this._index--):this._state=s},h.prototype._stateBeforeEntity=l(\"#\",51,52),h.prototype._stateBeforeNumericEntity=l(\"X\",54,53),h.prototype._parseNamedEntityStrict=function(){var t,e;this._sectionStart+1>>10&1023|55296),t=56320|1023&t),e+String.fromCharCode(t)}},function(t){t.exports=JSON.parse('{\"Aacute\":\"Á\",\"aacute\":\"á\",\"Acirc\":\"Â\",\"acirc\":\"â\",\"acute\":\"´\",\"AElig\":\"Æ\",\"aelig\":\"æ\",\"Agrave\":\"À\",\"agrave\":\"à\",\"amp\":\"&\",\"AMP\":\"&\",\"Aring\":\"Å\",\"aring\":\"å\",\"Atilde\":\"Ã\",\"atilde\":\"ã\",\"Auml\":\"Ä\",\"auml\":\"ä\",\"brvbar\":\"¦\",\"Ccedil\":\"Ç\",\"ccedil\":\"ç\",\"cedil\":\"¸\",\"cent\":\"¢\",\"copy\":\"©\",\"COPY\":\"©\",\"curren\":\"¤\",\"deg\":\"°\",\"divide\":\"÷\",\"Eacute\":\"É\",\"eacute\":\"é\",\"Ecirc\":\"Ê\",\"ecirc\":\"ê\",\"Egrave\":\"È\",\"egrave\":\"è\",\"ETH\":\"Ð\",\"eth\":\"ð\",\"Euml\":\"Ë\",\"euml\":\"ë\",\"frac12\":\"½\",\"frac14\":\"¼\",\"frac34\":\"¾\",\"gt\":\">\",\"GT\":\">\",\"Iacute\":\"Í\",\"iacute\":\"í\",\"Icirc\":\"Î\",\"icirc\":\"î\",\"iexcl\":\"¡\",\"Igrave\":\"Ì\",\"igrave\":\"ì\",\"iquest\":\"¿\",\"Iuml\":\"Ï\",\"iuml\":\"ï\",\"laquo\":\"«\",\"lt\":\"<\",\"LT\":\"<\",\"macr\":\"¯\",\"micro\":\"µ\",\"middot\":\"·\",\"nbsp\":\" \",\"not\":\"¬\",\"Ntilde\":\"Ñ\",\"ntilde\":\"ñ\",\"Oacute\":\"Ó\",\"oacute\":\"ó\",\"Ocirc\":\"Ô\",\"ocirc\":\"ô\",\"Ograve\":\"Ò\",\"ograve\":\"ò\",\"ordf\":\"ª\",\"ordm\":\"º\",\"Oslash\":\"Ø\",\"oslash\":\"ø\",\"Otilde\":\"Õ\",\"otilde\":\"õ\",\"Ouml\":\"Ö\",\"ouml\":\"ö\",\"para\":\"¶\",\"plusmn\":\"±\",\"pound\":\"£\",\"quot\":\"\\\\\"\",\"QUOT\":\"\\\\\"\",\"raquo\":\"»\",\"reg\":\"®\",\"REG\":\"®\",\"sect\":\"§\",\"shy\":\"­\",\"sup1\":\"¹\",\"sup2\":\"²\",\"sup3\":\"³\",\"szlig\":\"ß\",\"THORN\":\"Þ\",\"thorn\":\"þ\",\"times\":\"×\",\"Uacute\":\"Ú\",\"uacute\":\"ú\",\"Ucirc\":\"Û\",\"ucirc\":\"û\",\"Ugrave\":\"Ù\",\"ugrave\":\"ù\",\"uml\":\"¨\",\"Uuml\":\"Ü\",\"uuml\":\"ü\",\"Yacute\":\"Ý\",\"yacute\":\"ý\",\"yen\":\"¥\",\"yuml\":\"ÿ\"}')},function(t,e,r){function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}var i=r(26),o=/\\s+/g,a=r(241),s=r(468);function u(t,e,r){\"object\"===n(t)?(r=e,e=t,t=null):\"function\"==typeof e&&(r=e,e=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var c={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1};u.prototype.onparserinit=function(t){this._parser=t},u.prototype.onreset=function(){u.call(this,this._callback,this._options,this._elementCB)},u.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this._handleCallback(null))},u.prototype._handleCallback=u.prototype.onerror=function(t){if(\"function\"==typeof this._callback)this._callback(t,this.dom);else if(t)throw t},u.prototype.onclosetag=function(){var t=this._tagStack.pop();this._options.withEndIndices&&t&&(t.endIndex=this._parser.endIndex),this._elementCB&&this._elementCB(t)},u.prototype._createDomElement=function(t){if(!this._options.withDomLvl1)return t;var e,r=\"tag\"===t.type?Object.create(s):Object.create(a);for(e in t)t.hasOwnProperty(e)&&(r[e]=t[e]);return r},u.prototype._addDomElement=function(t){var e=this._tagStack[this._tagStack.length-1],r=e?e.children:this.dom,n=r[r.length-1];t.next=null,this._options.withStartIndices&&(t.startIndex=this._parser.startIndex),this._options.withEndIndices&&(t.endIndex=this._parser.endIndex),n?(t.prev=n).next=t:t.prev=null,r.push(t),t.parent=e||null},u.prototype.onopentag=function(t,e){e={type:\"script\"===t?i.Script:\"style\"===t?i.Style:i.Tag,name:t,attribs:e,children:[]},e=this._createDomElement(e),this._addDomElement(e),this._tagStack.push(e)},u.prototype.ontext=function(t){var e,r=this._options.normalizeWhitespace||this._options.ignoreWhitespace;!this._tagStack.length&&this.dom.length&&(e=this.dom[this.dom.length-1]).type===i.Text||this._tagStack.length&&(e=this._tagStack[this._tagStack.length-1])&&(e=e.children[e.children.length-1])&&e.type===i.Text?r?e.data=(e.data+t).replace(o,\" \"):e.data+=t:(r&&(t=t.replace(o,\" \")),t=this._createDomElement({data:t,type:i.Text}),this._addDomElement(t))},u.prototype.oncomment=function(t){var e=this._tagStack[this._tagStack.length-1];e&&e.type===i.Comment?e.data+=t:(t={data:t,type:i.Comment},t=this._createDomElement(t),this._addDomElement(t),this._tagStack.push(t))},u.prototype.oncdatastart=function(){var t={children:[{data:\"\",type:i.Text}],type:i.CDATA};t=this._createDomElement(t),this._addDomElement(t),this._tagStack.push(t)},u.prototype.oncommentend=u.prototype.oncdataend=function(){this._tagStack.pop()},u.prototype.onprocessinginstruction=function(t,e){e=this._createDomElement({name:t,data:e,type:i.Directive}),this._addDomElement(e)},t.exports=u},function(t){var e=t.exports={get firstChild(){var t=this.children;return t&&t[0]||null},get lastChild(){var t=this.children;return t&&t[t.length-1]||null},get nodeType(){return n[this.type]||n.element}},r={tagName:\"name\",childNodes:\"children\",parentNode:\"parent\",previousSibling:\"prev\",nextSibling:\"next\",nodeValue:\"data\"},n={element:1,text:3,cdata:4,comment:8};Object.keys(r).forEach((function(t){var n=r[t];Object.defineProperty(e,t,{get:function(){return this[n]||null},set:function(t){return this[n]=t}})}))},function(t,e,r){var n=t.exports;[r(470),r(478),r(479),r(480),r(481),r(482)].forEach((function(t){Object.keys(t).forEach((function(e){n[e]=t[e].bind(n)}))}))},function(t,e,r){\"use strict\";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.decodeHTML=e.decodeHTMLStrict=e.decodeXML=void 0;var i=n(r(244)),o=n(r(474)),a=n(r(245)),s=n(r(475));function u(t){var e=Object.keys(t).join(\"|\"),r=l(t),n=new RegExp(\"&(?:\"+(e+=\"|#[xX][\\\\da-fA-F]+|#\\\\d+\")+\");\",\"g\");return function(t){return String(t).replace(n,r)}}function c(t,e){return t\",\"GT\":\">\",\"Gt\":\"≫\",\"gtdot\":\"⋗\",\"gtlPar\":\"⦕\",\"gtquest\":\"⩼\",\"gtrapprox\":\"⪆\",\"gtrarr\":\"⥸\",\"gtrdot\":\"⋗\",\"gtreqless\":\"⋛\",\"gtreqqless\":\"⪌\",\"gtrless\":\"≷\",\"gtrsim\":\"≳\",\"gvertneqq\":\"≩︀\",\"gvnE\":\"≩︀\",\"Hacek\":\"ˇ\",\"hairsp\":\" \",\"half\":\"½\",\"hamilt\":\"ℋ\",\"HARDcy\":\"Ъ\",\"hardcy\":\"ъ\",\"harrcir\":\"⥈\",\"harr\":\"↔\",\"hArr\":\"⇔\",\"harrw\":\"↭\",\"Hat\":\"^\",\"hbar\":\"ℏ\",\"Hcirc\":\"Ĥ\",\"hcirc\":\"ĥ\",\"hearts\":\"♥\",\"heartsuit\":\"♥\",\"hellip\":\"…\",\"hercon\":\"⊹\",\"hfr\":\"𝔥\",\"Hfr\":\"ℌ\",\"HilbertSpace\":\"ℋ\",\"hksearow\":\"⤥\",\"hkswarow\":\"⤦\",\"hoarr\":\"⇿\",\"homtht\":\"∻\",\"hookleftarrow\":\"↩\",\"hookrightarrow\":\"↪\",\"hopf\":\"𝕙\",\"Hopf\":\"ℍ\",\"horbar\":\"―\",\"HorizontalLine\":\"─\",\"hscr\":\"𝒽\",\"Hscr\":\"ℋ\",\"hslash\":\"ℏ\",\"Hstrok\":\"Ħ\",\"hstrok\":\"ħ\",\"HumpDownHump\":\"≎\",\"HumpEqual\":\"≏\",\"hybull\":\"⁃\",\"hyphen\":\"‐\",\"Iacute\":\"Í\",\"iacute\":\"í\",\"ic\":\"⁣\",\"Icirc\":\"Î\",\"icirc\":\"î\",\"Icy\":\"И\",\"icy\":\"и\",\"Idot\":\"İ\",\"IEcy\":\"Е\",\"iecy\":\"е\",\"iexcl\":\"¡\",\"iff\":\"⇔\",\"ifr\":\"𝔦\",\"Ifr\":\"ℑ\",\"Igrave\":\"Ì\",\"igrave\":\"ì\",\"ii\":\"ⅈ\",\"iiiint\":\"⨌\",\"iiint\":\"∭\",\"iinfin\":\"⧜\",\"iiota\":\"℩\",\"IJlig\":\"IJ\",\"ijlig\":\"ij\",\"Imacr\":\"Ī\",\"imacr\":\"ī\",\"image\":\"ℑ\",\"ImaginaryI\":\"ⅈ\",\"imagline\":\"ℐ\",\"imagpart\":\"ℑ\",\"imath\":\"ı\",\"Im\":\"ℑ\",\"imof\":\"⊷\",\"imped\":\"Ƶ\",\"Implies\":\"⇒\",\"incare\":\"℅\",\"in\":\"∈\",\"infin\":\"∞\",\"infintie\":\"⧝\",\"inodot\":\"ı\",\"intcal\":\"⊺\",\"int\":\"∫\",\"Int\":\"∬\",\"integers\":\"ℤ\",\"Integral\":\"∫\",\"intercal\":\"⊺\",\"Intersection\":\"⋂\",\"intlarhk\":\"⨗\",\"intprod\":\"⨼\",\"InvisibleComma\":\"⁣\",\"InvisibleTimes\":\"⁢\",\"IOcy\":\"Ё\",\"iocy\":\"ё\",\"Iogon\":\"Į\",\"iogon\":\"į\",\"Iopf\":\"𝕀\",\"iopf\":\"𝕚\",\"Iota\":\"Ι\",\"iota\":\"ι\",\"iprod\":\"⨼\",\"iquest\":\"¿\",\"iscr\":\"𝒾\",\"Iscr\":\"ℐ\",\"isin\":\"∈\",\"isindot\":\"⋵\",\"isinE\":\"⋹\",\"isins\":\"⋴\",\"isinsv\":\"⋳\",\"isinv\":\"∈\",\"it\":\"⁢\",\"Itilde\":\"Ĩ\",\"itilde\":\"ĩ\",\"Iukcy\":\"І\",\"iukcy\":\"і\",\"Iuml\":\"Ï\",\"iuml\":\"ï\",\"Jcirc\":\"Ĵ\",\"jcirc\":\"ĵ\",\"Jcy\":\"Й\",\"jcy\":\"й\",\"Jfr\":\"𝔍\",\"jfr\":\"𝔧\",\"jmath\":\"ȷ\",\"Jopf\":\"𝕁\",\"jopf\":\"𝕛\",\"Jscr\":\"𝒥\",\"jscr\":\"𝒿\",\"Jsercy\":\"Ј\",\"jsercy\":\"ј\",\"Jukcy\":\"Є\",\"jukcy\":\"є\",\"Kappa\":\"Κ\",\"kappa\":\"κ\",\"kappav\":\"ϰ\",\"Kcedil\":\"Ķ\",\"kcedil\":\"ķ\",\"Kcy\":\"К\",\"kcy\":\"к\",\"Kfr\":\"𝔎\",\"kfr\":\"𝔨\",\"kgreen\":\"ĸ\",\"KHcy\":\"Х\",\"khcy\":\"х\",\"KJcy\":\"Ќ\",\"kjcy\":\"ќ\",\"Kopf\":\"𝕂\",\"kopf\":\"𝕜\",\"Kscr\":\"𝒦\",\"kscr\":\"𝓀\",\"lAarr\":\"⇚\",\"Lacute\":\"Ĺ\",\"lacute\":\"ĺ\",\"laemptyv\":\"⦴\",\"lagran\":\"ℒ\",\"Lambda\":\"Λ\",\"lambda\":\"λ\",\"lang\":\"⟨\",\"Lang\":\"⟪\",\"langd\":\"⦑\",\"langle\":\"⟨\",\"lap\":\"⪅\",\"Laplacetrf\":\"ℒ\",\"laquo\":\"«\",\"larrb\":\"⇤\",\"larrbfs\":\"⤟\",\"larr\":\"←\",\"Larr\":\"↞\",\"lArr\":\"⇐\",\"larrfs\":\"⤝\",\"larrhk\":\"↩\",\"larrlp\":\"↫\",\"larrpl\":\"⤹\",\"larrsim\":\"⥳\",\"larrtl\":\"↢\",\"latail\":\"⤙\",\"lAtail\":\"⤛\",\"lat\":\"⪫\",\"late\":\"⪭\",\"lates\":\"⪭︀\",\"lbarr\":\"⤌\",\"lBarr\":\"⤎\",\"lbbrk\":\"❲\",\"lbrace\":\"{\",\"lbrack\":\"[\",\"lbrke\":\"⦋\",\"lbrksld\":\"⦏\",\"lbrkslu\":\"⦍\",\"Lcaron\":\"Ľ\",\"lcaron\":\"ľ\",\"Lcedil\":\"Ļ\",\"lcedil\":\"ļ\",\"lceil\":\"⌈\",\"lcub\":\"{\",\"Lcy\":\"Л\",\"lcy\":\"л\",\"ldca\":\"⤶\",\"ldquo\":\"“\",\"ldquor\":\"„\",\"ldrdhar\":\"⥧\",\"ldrushar\":\"⥋\",\"ldsh\":\"↲\",\"le\":\"≤\",\"lE\":\"≦\",\"LeftAngleBracket\":\"⟨\",\"LeftArrowBar\":\"⇤\",\"leftarrow\":\"←\",\"LeftArrow\":\"←\",\"Leftarrow\":\"⇐\",\"LeftArrowRightArrow\":\"⇆\",\"leftarrowtail\":\"↢\",\"LeftCeiling\":\"⌈\",\"LeftDoubleBracket\":\"⟦\",\"LeftDownTeeVector\":\"⥡\",\"LeftDownVectorBar\":\"⥙\",\"LeftDownVector\":\"⇃\",\"LeftFloor\":\"⌊\",\"leftharpoondown\":\"↽\",\"leftharpoonup\":\"↼\",\"leftleftarrows\":\"⇇\",\"leftrightarrow\":\"↔\",\"LeftRightArrow\":\"↔\",\"Leftrightarrow\":\"⇔\",\"leftrightarrows\":\"⇆\",\"leftrightharpoons\":\"⇋\",\"leftrightsquigarrow\":\"↭\",\"LeftRightVector\":\"⥎\",\"LeftTeeArrow\":\"↤\",\"LeftTee\":\"⊣\",\"LeftTeeVector\":\"⥚\",\"leftthreetimes\":\"⋋\",\"LeftTriangleBar\":\"⧏\",\"LeftTriangle\":\"⊲\",\"LeftTriangleEqual\":\"⊴\",\"LeftUpDownVector\":\"⥑\",\"LeftUpTeeVector\":\"⥠\",\"LeftUpVectorBar\":\"⥘\",\"LeftUpVector\":\"↿\",\"LeftVectorBar\":\"⥒\",\"LeftVector\":\"↼\",\"lEg\":\"⪋\",\"leg\":\"⋚\",\"leq\":\"≤\",\"leqq\":\"≦\",\"leqslant\":\"⩽\",\"lescc\":\"⪨\",\"les\":\"⩽\",\"lesdot\":\"⩿\",\"lesdoto\":\"⪁\",\"lesdotor\":\"⪃\",\"lesg\":\"⋚︀\",\"lesges\":\"⪓\",\"lessapprox\":\"⪅\",\"lessdot\":\"⋖\",\"lesseqgtr\":\"⋚\",\"lesseqqgtr\":\"⪋\",\"LessEqualGreater\":\"⋚\",\"LessFullEqual\":\"≦\",\"LessGreater\":\"≶\",\"lessgtr\":\"≶\",\"LessLess\":\"⪡\",\"lesssim\":\"≲\",\"LessSlantEqual\":\"⩽\",\"LessTilde\":\"≲\",\"lfisht\":\"⥼\",\"lfloor\":\"⌊\",\"Lfr\":\"𝔏\",\"lfr\":\"𝔩\",\"lg\":\"≶\",\"lgE\":\"⪑\",\"lHar\":\"⥢\",\"lhard\":\"↽\",\"lharu\":\"↼\",\"lharul\":\"⥪\",\"lhblk\":\"▄\",\"LJcy\":\"Љ\",\"ljcy\":\"љ\",\"llarr\":\"⇇\",\"ll\":\"≪\",\"Ll\":\"⋘\",\"llcorner\":\"⌞\",\"Lleftarrow\":\"⇚\",\"llhard\":\"⥫\",\"lltri\":\"◺\",\"Lmidot\":\"Ŀ\",\"lmidot\":\"ŀ\",\"lmoustache\":\"⎰\",\"lmoust\":\"⎰\",\"lnap\":\"⪉\",\"lnapprox\":\"⪉\",\"lne\":\"⪇\",\"lnE\":\"≨\",\"lneq\":\"⪇\",\"lneqq\":\"≨\",\"lnsim\":\"⋦\",\"loang\":\"⟬\",\"loarr\":\"⇽\",\"lobrk\":\"⟦\",\"longleftarrow\":\"⟵\",\"LongLeftArrow\":\"⟵\",\"Longleftarrow\":\"⟸\",\"longleftrightarrow\":\"⟷\",\"LongLeftRightArrow\":\"⟷\",\"Longleftrightarrow\":\"⟺\",\"longmapsto\":\"⟼\",\"longrightarrow\":\"⟶\",\"LongRightArrow\":\"⟶\",\"Longrightarrow\":\"⟹\",\"looparrowleft\":\"↫\",\"looparrowright\":\"↬\",\"lopar\":\"⦅\",\"Lopf\":\"𝕃\",\"lopf\":\"𝕝\",\"loplus\":\"⨭\",\"lotimes\":\"⨴\",\"lowast\":\"∗\",\"lowbar\":\"_\",\"LowerLeftArrow\":\"↙\",\"LowerRightArrow\":\"↘\",\"loz\":\"◊\",\"lozenge\":\"◊\",\"lozf\":\"⧫\",\"lpar\":\"(\",\"lparlt\":\"⦓\",\"lrarr\":\"⇆\",\"lrcorner\":\"⌟\",\"lrhar\":\"⇋\",\"lrhard\":\"⥭\",\"lrm\":\"‎\",\"lrtri\":\"⊿\",\"lsaquo\":\"‹\",\"lscr\":\"𝓁\",\"Lscr\":\"ℒ\",\"lsh\":\"↰\",\"Lsh\":\"↰\",\"lsim\":\"≲\",\"lsime\":\"⪍\",\"lsimg\":\"⪏\",\"lsqb\":\"[\",\"lsquo\":\"‘\",\"lsquor\":\"‚\",\"Lstrok\":\"Ł\",\"lstrok\":\"ł\",\"ltcc\":\"⪦\",\"ltcir\":\"⩹\",\"lt\":\"<\",\"LT\":\"<\",\"Lt\":\"≪\",\"ltdot\":\"⋖\",\"lthree\":\"⋋\",\"ltimes\":\"⋉\",\"ltlarr\":\"⥶\",\"ltquest\":\"⩻\",\"ltri\":\"◃\",\"ltrie\":\"⊴\",\"ltrif\":\"◂\",\"ltrPar\":\"⦖\",\"lurdshar\":\"⥊\",\"luruhar\":\"⥦\",\"lvertneqq\":\"≨︀\",\"lvnE\":\"≨︀\",\"macr\":\"¯\",\"male\":\"♂\",\"malt\":\"✠\",\"maltese\":\"✠\",\"Map\":\"⤅\",\"map\":\"↦\",\"mapsto\":\"↦\",\"mapstodown\":\"↧\",\"mapstoleft\":\"↤\",\"mapstoup\":\"↥\",\"marker\":\"▮\",\"mcomma\":\"⨩\",\"Mcy\":\"М\",\"mcy\":\"м\",\"mdash\":\"—\",\"mDDot\":\"∺\",\"measuredangle\":\"∡\",\"MediumSpace\":\" \",\"Mellintrf\":\"ℳ\",\"Mfr\":\"𝔐\",\"mfr\":\"𝔪\",\"mho\":\"℧\",\"micro\":\"µ\",\"midast\":\"*\",\"midcir\":\"⫰\",\"mid\":\"∣\",\"middot\":\"·\",\"minusb\":\"⊟\",\"minus\":\"−\",\"minusd\":\"∸\",\"minusdu\":\"⨪\",\"MinusPlus\":\"∓\",\"mlcp\":\"⫛\",\"mldr\":\"…\",\"mnplus\":\"∓\",\"models\":\"⊧\",\"Mopf\":\"𝕄\",\"mopf\":\"𝕞\",\"mp\":\"∓\",\"mscr\":\"𝓂\",\"Mscr\":\"ℳ\",\"mstpos\":\"∾\",\"Mu\":\"Μ\",\"mu\":\"μ\",\"multimap\":\"⊸\",\"mumap\":\"⊸\",\"nabla\":\"∇\",\"Nacute\":\"Ń\",\"nacute\":\"ń\",\"nang\":\"∠⃒\",\"nap\":\"≉\",\"napE\":\"⩰̸\",\"napid\":\"≋̸\",\"napos\":\"ʼn\",\"napprox\":\"≉\",\"natural\":\"♮\",\"naturals\":\"ℕ\",\"natur\":\"♮\",\"nbsp\":\" \",\"nbump\":\"≎̸\",\"nbumpe\":\"≏̸\",\"ncap\":\"⩃\",\"Ncaron\":\"Ň\",\"ncaron\":\"ň\",\"Ncedil\":\"Ņ\",\"ncedil\":\"ņ\",\"ncong\":\"≇\",\"ncongdot\":\"⩭̸\",\"ncup\":\"⩂\",\"Ncy\":\"Н\",\"ncy\":\"н\",\"ndash\":\"–\",\"nearhk\":\"⤤\",\"nearr\":\"↗\",\"neArr\":\"⇗\",\"nearrow\":\"↗\",\"ne\":\"≠\",\"nedot\":\"≐̸\",\"NegativeMediumSpace\":\"​\",\"NegativeThickSpace\":\"​\",\"NegativeThinSpace\":\"​\",\"NegativeVeryThinSpace\":\"​\",\"nequiv\":\"≢\",\"nesear\":\"⤨\",\"nesim\":\"≂̸\",\"NestedGreaterGreater\":\"≫\",\"NestedLessLess\":\"≪\",\"NewLine\":\"\\\\n\",\"nexist\":\"∄\",\"nexists\":\"∄\",\"Nfr\":\"𝔑\",\"nfr\":\"𝔫\",\"ngE\":\"≧̸\",\"nge\":\"≱\",\"ngeq\":\"≱\",\"ngeqq\":\"≧̸\",\"ngeqslant\":\"⩾̸\",\"nges\":\"⩾̸\",\"nGg\":\"⋙̸\",\"ngsim\":\"≵\",\"nGt\":\"≫⃒\",\"ngt\":\"≯\",\"ngtr\":\"≯\",\"nGtv\":\"≫̸\",\"nharr\":\"↮\",\"nhArr\":\"⇎\",\"nhpar\":\"⫲\",\"ni\":\"∋\",\"nis\":\"⋼\",\"nisd\":\"⋺\",\"niv\":\"∋\",\"NJcy\":\"Њ\",\"njcy\":\"њ\",\"nlarr\":\"↚\",\"nlArr\":\"⇍\",\"nldr\":\"‥\",\"nlE\":\"≦̸\",\"nle\":\"≰\",\"nleftarrow\":\"↚\",\"nLeftarrow\":\"⇍\",\"nleftrightarrow\":\"↮\",\"nLeftrightarrow\":\"⇎\",\"nleq\":\"≰\",\"nleqq\":\"≦̸\",\"nleqslant\":\"⩽̸\",\"nles\":\"⩽̸\",\"nless\":\"≮\",\"nLl\":\"⋘̸\",\"nlsim\":\"≴\",\"nLt\":\"≪⃒\",\"nlt\":\"≮\",\"nltri\":\"⋪\",\"nltrie\":\"⋬\",\"nLtv\":\"≪̸\",\"nmid\":\"∤\",\"NoBreak\":\"⁠\",\"NonBreakingSpace\":\" \",\"nopf\":\"𝕟\",\"Nopf\":\"ℕ\",\"Not\":\"⫬\",\"not\":\"¬\",\"NotCongruent\":\"≢\",\"NotCupCap\":\"≭\",\"NotDoubleVerticalBar\":\"∦\",\"NotElement\":\"∉\",\"NotEqual\":\"≠\",\"NotEqualTilde\":\"≂̸\",\"NotExists\":\"∄\",\"NotGreater\":\"≯\",\"NotGreaterEqual\":\"≱\",\"NotGreaterFullEqual\":\"≧̸\",\"NotGreaterGreater\":\"≫̸\",\"NotGreaterLess\":\"≹\",\"NotGreaterSlantEqual\":\"⩾̸\",\"NotGreaterTilde\":\"≵\",\"NotHumpDownHump\":\"≎̸\",\"NotHumpEqual\":\"≏̸\",\"notin\":\"∉\",\"notindot\":\"⋵̸\",\"notinE\":\"⋹̸\",\"notinva\":\"∉\",\"notinvb\":\"⋷\",\"notinvc\":\"⋶\",\"NotLeftTriangleBar\":\"⧏̸\",\"NotLeftTriangle\":\"⋪\",\"NotLeftTriangleEqual\":\"⋬\",\"NotLess\":\"≮\",\"NotLessEqual\":\"≰\",\"NotLessGreater\":\"≸\",\"NotLessLess\":\"≪̸\",\"NotLessSlantEqual\":\"⩽̸\",\"NotLessTilde\":\"≴\",\"NotNestedGreaterGreater\":\"⪢̸\",\"NotNestedLessLess\":\"⪡̸\",\"notni\":\"∌\",\"notniva\":\"∌\",\"notnivb\":\"⋾\",\"notnivc\":\"⋽\",\"NotPrecedes\":\"⊀\",\"NotPrecedesEqual\":\"⪯̸\",\"NotPrecedesSlantEqual\":\"⋠\",\"NotReverseElement\":\"∌\",\"NotRightTriangleBar\":\"⧐̸\",\"NotRightTriangle\":\"⋫\",\"NotRightTriangleEqual\":\"⋭\",\"NotSquareSubset\":\"⊏̸\",\"NotSquareSubsetEqual\":\"⋢\",\"NotSquareSuperset\":\"⊐̸\",\"NotSquareSupersetEqual\":\"⋣\",\"NotSubset\":\"⊂⃒\",\"NotSubsetEqual\":\"⊈\",\"NotSucceeds\":\"⊁\",\"NotSucceedsEqual\":\"⪰̸\",\"NotSucceedsSlantEqual\":\"⋡\",\"NotSucceedsTilde\":\"≿̸\",\"NotSuperset\":\"⊃⃒\",\"NotSupersetEqual\":\"⊉\",\"NotTilde\":\"≁\",\"NotTildeEqual\":\"≄\",\"NotTildeFullEqual\":\"≇\",\"NotTildeTilde\":\"≉\",\"NotVerticalBar\":\"∤\",\"nparallel\":\"∦\",\"npar\":\"∦\",\"nparsl\":\"⫽⃥\",\"npart\":\"∂̸\",\"npolint\":\"⨔\",\"npr\":\"⊀\",\"nprcue\":\"⋠\",\"nprec\":\"⊀\",\"npreceq\":\"⪯̸\",\"npre\":\"⪯̸\",\"nrarrc\":\"⤳̸\",\"nrarr\":\"↛\",\"nrArr\":\"⇏\",\"nrarrw\":\"↝̸\",\"nrightarrow\":\"↛\",\"nRightarrow\":\"⇏\",\"nrtri\":\"⋫\",\"nrtrie\":\"⋭\",\"nsc\":\"⊁\",\"nsccue\":\"⋡\",\"nsce\":\"⪰̸\",\"Nscr\":\"𝒩\",\"nscr\":\"𝓃\",\"nshortmid\":\"∤\",\"nshortparallel\":\"∦\",\"nsim\":\"≁\",\"nsime\":\"≄\",\"nsimeq\":\"≄\",\"nsmid\":\"∤\",\"nspar\":\"∦\",\"nsqsube\":\"⋢\",\"nsqsupe\":\"⋣\",\"nsub\":\"⊄\",\"nsubE\":\"⫅̸\",\"nsube\":\"⊈\",\"nsubset\":\"⊂⃒\",\"nsubseteq\":\"⊈\",\"nsubseteqq\":\"⫅̸\",\"nsucc\":\"⊁\",\"nsucceq\":\"⪰̸\",\"nsup\":\"⊅\",\"nsupE\":\"⫆̸\",\"nsupe\":\"⊉\",\"nsupset\":\"⊃⃒\",\"nsupseteq\":\"⊉\",\"nsupseteqq\":\"⫆̸\",\"ntgl\":\"≹\",\"Ntilde\":\"Ñ\",\"ntilde\":\"ñ\",\"ntlg\":\"≸\",\"ntriangleleft\":\"⋪\",\"ntrianglelefteq\":\"⋬\",\"ntriangleright\":\"⋫\",\"ntrianglerighteq\":\"⋭\",\"Nu\":\"Ν\",\"nu\":\"ν\",\"num\":\"#\",\"numero\":\"№\",\"numsp\":\" \",\"nvap\":\"≍⃒\",\"nvdash\":\"⊬\",\"nvDash\":\"⊭\",\"nVdash\":\"⊮\",\"nVDash\":\"⊯\",\"nvge\":\"≥⃒\",\"nvgt\":\">⃒\",\"nvHarr\":\"⤄\",\"nvinfin\":\"⧞\",\"nvlArr\":\"⤂\",\"nvle\":\"≤⃒\",\"nvlt\":\"<⃒\",\"nvltrie\":\"⊴⃒\",\"nvrArr\":\"⤃\",\"nvrtrie\":\"⊵⃒\",\"nvsim\":\"∼⃒\",\"nwarhk\":\"⤣\",\"nwarr\":\"↖\",\"nwArr\":\"⇖\",\"nwarrow\":\"↖\",\"nwnear\":\"⤧\",\"Oacute\":\"Ó\",\"oacute\":\"ó\",\"oast\":\"⊛\",\"Ocirc\":\"Ô\",\"ocirc\":\"ô\",\"ocir\":\"⊚\",\"Ocy\":\"О\",\"ocy\":\"о\",\"odash\":\"⊝\",\"Odblac\":\"Ő\",\"odblac\":\"ő\",\"odiv\":\"⨸\",\"odot\":\"⊙\",\"odsold\":\"⦼\",\"OElig\":\"Œ\",\"oelig\":\"œ\",\"ofcir\":\"⦿\",\"Ofr\":\"𝔒\",\"ofr\":\"𝔬\",\"ogon\":\"˛\",\"Ograve\":\"Ò\",\"ograve\":\"ò\",\"ogt\":\"⧁\",\"ohbar\":\"⦵\",\"ohm\":\"Ω\",\"oint\":\"∮\",\"olarr\":\"↺\",\"olcir\":\"⦾\",\"olcross\":\"⦻\",\"oline\":\"‾\",\"olt\":\"⧀\",\"Omacr\":\"Ō\",\"omacr\":\"ō\",\"Omega\":\"Ω\",\"omega\":\"ω\",\"Omicron\":\"Ο\",\"omicron\":\"ο\",\"omid\":\"⦶\",\"ominus\":\"⊖\",\"Oopf\":\"𝕆\",\"oopf\":\"𝕠\",\"opar\":\"⦷\",\"OpenCurlyDoubleQuote\":\"“\",\"OpenCurlyQuote\":\"‘\",\"operp\":\"⦹\",\"oplus\":\"⊕\",\"orarr\":\"↻\",\"Or\":\"⩔\",\"or\":\"∨\",\"ord\":\"⩝\",\"order\":\"ℴ\",\"orderof\":\"ℴ\",\"ordf\":\"ª\",\"ordm\":\"º\",\"origof\":\"⊶\",\"oror\":\"⩖\",\"orslope\":\"⩗\",\"orv\":\"⩛\",\"oS\":\"Ⓢ\",\"Oscr\":\"𝒪\",\"oscr\":\"ℴ\",\"Oslash\":\"Ø\",\"oslash\":\"ø\",\"osol\":\"⊘\",\"Otilde\":\"Õ\",\"otilde\":\"õ\",\"otimesas\":\"⨶\",\"Otimes\":\"⨷\",\"otimes\":\"⊗\",\"Ouml\":\"Ö\",\"ouml\":\"ö\",\"ovbar\":\"⌽\",\"OverBar\":\"‾\",\"OverBrace\":\"⏞\",\"OverBracket\":\"⎴\",\"OverParenthesis\":\"⏜\",\"para\":\"¶\",\"parallel\":\"∥\",\"par\":\"∥\",\"parsim\":\"⫳\",\"parsl\":\"⫽\",\"part\":\"∂\",\"PartialD\":\"∂\",\"Pcy\":\"П\",\"pcy\":\"п\",\"percnt\":\"%\",\"period\":\".\",\"permil\":\"‰\",\"perp\":\"⊥\",\"pertenk\":\"‱\",\"Pfr\":\"𝔓\",\"pfr\":\"𝔭\",\"Phi\":\"Φ\",\"phi\":\"φ\",\"phiv\":\"ϕ\",\"phmmat\":\"ℳ\",\"phone\":\"☎\",\"Pi\":\"Π\",\"pi\":\"π\",\"pitchfork\":\"⋔\",\"piv\":\"ϖ\",\"planck\":\"ℏ\",\"planckh\":\"ℎ\",\"plankv\":\"ℏ\",\"plusacir\":\"⨣\",\"plusb\":\"⊞\",\"pluscir\":\"⨢\",\"plus\":\"+\",\"plusdo\":\"∔\",\"plusdu\":\"⨥\",\"pluse\":\"⩲\",\"PlusMinus\":\"±\",\"plusmn\":\"±\",\"plussim\":\"⨦\",\"plustwo\":\"⨧\",\"pm\":\"±\",\"Poincareplane\":\"ℌ\",\"pointint\":\"⨕\",\"popf\":\"𝕡\",\"Popf\":\"ℙ\",\"pound\":\"£\",\"prap\":\"⪷\",\"Pr\":\"⪻\",\"pr\":\"≺\",\"prcue\":\"≼\",\"precapprox\":\"⪷\",\"prec\":\"≺\",\"preccurlyeq\":\"≼\",\"Precedes\":\"≺\",\"PrecedesEqual\":\"⪯\",\"PrecedesSlantEqual\":\"≼\",\"PrecedesTilde\":\"≾\",\"preceq\":\"⪯\",\"precnapprox\":\"⪹\",\"precneqq\":\"⪵\",\"precnsim\":\"⋨\",\"pre\":\"⪯\",\"prE\":\"⪳\",\"precsim\":\"≾\",\"prime\":\"′\",\"Prime\":\"″\",\"primes\":\"ℙ\",\"prnap\":\"⪹\",\"prnE\":\"⪵\",\"prnsim\":\"⋨\",\"prod\":\"∏\",\"Product\":\"∏\",\"profalar\":\"⌮\",\"profline\":\"⌒\",\"profsurf\":\"⌓\",\"prop\":\"∝\",\"Proportional\":\"∝\",\"Proportion\":\"∷\",\"propto\":\"∝\",\"prsim\":\"≾\",\"prurel\":\"⊰\",\"Pscr\":\"𝒫\",\"pscr\":\"𝓅\",\"Psi\":\"Ψ\",\"psi\":\"ψ\",\"puncsp\":\" \",\"Qfr\":\"𝔔\",\"qfr\":\"𝔮\",\"qint\":\"⨌\",\"qopf\":\"𝕢\",\"Qopf\":\"ℚ\",\"qprime\":\"⁗\",\"Qscr\":\"𝒬\",\"qscr\":\"𝓆\",\"quaternions\":\"ℍ\",\"quatint\":\"⨖\",\"quest\":\"?\",\"questeq\":\"≟\",\"quot\":\"\\\\\"\",\"QUOT\":\"\\\\\"\",\"rAarr\":\"⇛\",\"race\":\"∽̱\",\"Racute\":\"Ŕ\",\"racute\":\"ŕ\",\"radic\":\"√\",\"raemptyv\":\"⦳\",\"rang\":\"⟩\",\"Rang\":\"⟫\",\"rangd\":\"⦒\",\"range\":\"⦥\",\"rangle\":\"⟩\",\"raquo\":\"»\",\"rarrap\":\"⥵\",\"rarrb\":\"⇥\",\"rarrbfs\":\"⤠\",\"rarrc\":\"⤳\",\"rarr\":\"→\",\"Rarr\":\"↠\",\"rArr\":\"⇒\",\"rarrfs\":\"⤞\",\"rarrhk\":\"↪\",\"rarrlp\":\"↬\",\"rarrpl\":\"⥅\",\"rarrsim\":\"⥴\",\"Rarrtl\":\"⤖\",\"rarrtl\":\"↣\",\"rarrw\":\"↝\",\"ratail\":\"⤚\",\"rAtail\":\"⤜\",\"ratio\":\"∶\",\"rationals\":\"ℚ\",\"rbarr\":\"⤍\",\"rBarr\":\"⤏\",\"RBarr\":\"⤐\",\"rbbrk\":\"❳\",\"rbrace\":\"}\",\"rbrack\":\"]\",\"rbrke\":\"⦌\",\"rbrksld\":\"⦎\",\"rbrkslu\":\"⦐\",\"Rcaron\":\"Ř\",\"rcaron\":\"ř\",\"Rcedil\":\"Ŗ\",\"rcedil\":\"ŗ\",\"rceil\":\"⌉\",\"rcub\":\"}\",\"Rcy\":\"Р\",\"rcy\":\"р\",\"rdca\":\"⤷\",\"rdldhar\":\"⥩\",\"rdquo\":\"”\",\"rdquor\":\"”\",\"rdsh\":\"↳\",\"real\":\"ℜ\",\"realine\":\"ℛ\",\"realpart\":\"ℜ\",\"reals\":\"ℝ\",\"Re\":\"ℜ\",\"rect\":\"▭\",\"reg\":\"®\",\"REG\":\"®\",\"ReverseElement\":\"∋\",\"ReverseEquilibrium\":\"⇋\",\"ReverseUpEquilibrium\":\"⥯\",\"rfisht\":\"⥽\",\"rfloor\":\"⌋\",\"rfr\":\"𝔯\",\"Rfr\":\"ℜ\",\"rHar\":\"⥤\",\"rhard\":\"⇁\",\"rharu\":\"⇀\",\"rharul\":\"⥬\",\"Rho\":\"Ρ\",\"rho\":\"ρ\",\"rhov\":\"ϱ\",\"RightAngleBracket\":\"⟩\",\"RightArrowBar\":\"⇥\",\"rightarrow\":\"→\",\"RightArrow\":\"→\",\"Rightarrow\":\"⇒\",\"RightArrowLeftArrow\":\"⇄\",\"rightarrowtail\":\"↣\",\"RightCeiling\":\"⌉\",\"RightDoubleBracket\":\"⟧\",\"RightDownTeeVector\":\"⥝\",\"RightDownVectorBar\":\"⥕\",\"RightDownVector\":\"⇂\",\"RightFloor\":\"⌋\",\"rightharpoondown\":\"⇁\",\"rightharpoonup\":\"⇀\",\"rightleftarrows\":\"⇄\",\"rightleftharpoons\":\"⇌\",\"rightrightarrows\":\"⇉\",\"rightsquigarrow\":\"↝\",\"RightTeeArrow\":\"↦\",\"RightTee\":\"⊢\",\"RightTeeVector\":\"⥛\",\"rightthreetimes\":\"⋌\",\"RightTriangleBar\":\"⧐\",\"RightTriangle\":\"⊳\",\"RightTriangleEqual\":\"⊵\",\"RightUpDownVector\":\"⥏\",\"RightUpTeeVector\":\"⥜\",\"RightUpVectorBar\":\"⥔\",\"RightUpVector\":\"↾\",\"RightVectorBar\":\"⥓\",\"RightVector\":\"⇀\",\"ring\":\"˚\",\"risingdotseq\":\"≓\",\"rlarr\":\"⇄\",\"rlhar\":\"⇌\",\"rlm\":\"‏\",\"rmoustache\":\"⎱\",\"rmoust\":\"⎱\",\"rnmid\":\"⫮\",\"roang\":\"⟭\",\"roarr\":\"⇾\",\"robrk\":\"⟧\",\"ropar\":\"⦆\",\"ropf\":\"𝕣\",\"Ropf\":\"ℝ\",\"roplus\":\"⨮\",\"rotimes\":\"⨵\",\"RoundImplies\":\"⥰\",\"rpar\":\")\",\"rpargt\":\"⦔\",\"rppolint\":\"⨒\",\"rrarr\":\"⇉\",\"Rrightarrow\":\"⇛\",\"rsaquo\":\"›\",\"rscr\":\"𝓇\",\"Rscr\":\"ℛ\",\"rsh\":\"↱\",\"Rsh\":\"↱\",\"rsqb\":\"]\",\"rsquo\":\"’\",\"rsquor\":\"’\",\"rthree\":\"⋌\",\"rtimes\":\"⋊\",\"rtri\":\"▹\",\"rtrie\":\"⊵\",\"rtrif\":\"▸\",\"rtriltri\":\"⧎\",\"RuleDelayed\":\"⧴\",\"ruluhar\":\"⥨\",\"rx\":\"℞\",\"Sacute\":\"Ś\",\"sacute\":\"ś\",\"sbquo\":\"‚\",\"scap\":\"⪸\",\"Scaron\":\"Š\",\"scaron\":\"š\",\"Sc\":\"⪼\",\"sc\":\"≻\",\"sccue\":\"≽\",\"sce\":\"⪰\",\"scE\":\"⪴\",\"Scedil\":\"Ş\",\"scedil\":\"ş\",\"Scirc\":\"Ŝ\",\"scirc\":\"ŝ\",\"scnap\":\"⪺\",\"scnE\":\"⪶\",\"scnsim\":\"⋩\",\"scpolint\":\"⨓\",\"scsim\":\"≿\",\"Scy\":\"С\",\"scy\":\"с\",\"sdotb\":\"⊡\",\"sdot\":\"⋅\",\"sdote\":\"⩦\",\"searhk\":\"⤥\",\"searr\":\"↘\",\"seArr\":\"⇘\",\"searrow\":\"↘\",\"sect\":\"§\",\"semi\":\";\",\"seswar\":\"⤩\",\"setminus\":\"∖\",\"setmn\":\"∖\",\"sext\":\"✶\",\"Sfr\":\"𝔖\",\"sfr\":\"𝔰\",\"sfrown\":\"⌢\",\"sharp\":\"♯\",\"SHCHcy\":\"Щ\",\"shchcy\":\"щ\",\"SHcy\":\"Ш\",\"shcy\":\"ш\",\"ShortDownArrow\":\"↓\",\"ShortLeftArrow\":\"←\",\"shortmid\":\"∣\",\"shortparallel\":\"∥\",\"ShortRightArrow\":\"→\",\"ShortUpArrow\":\"↑\",\"shy\":\"­\",\"Sigma\":\"Σ\",\"sigma\":\"σ\",\"sigmaf\":\"ς\",\"sigmav\":\"ς\",\"sim\":\"∼\",\"simdot\":\"⩪\",\"sime\":\"≃\",\"simeq\":\"≃\",\"simg\":\"⪞\",\"simgE\":\"⪠\",\"siml\":\"⪝\",\"simlE\":\"⪟\",\"simne\":\"≆\",\"simplus\":\"⨤\",\"simrarr\":\"⥲\",\"slarr\":\"←\",\"SmallCircle\":\"∘\",\"smallsetminus\":\"∖\",\"smashp\":\"⨳\",\"smeparsl\":\"⧤\",\"smid\":\"∣\",\"smile\":\"⌣\",\"smt\":\"⪪\",\"smte\":\"⪬\",\"smtes\":\"⪬︀\",\"SOFTcy\":\"Ь\",\"softcy\":\"ь\",\"solbar\":\"⌿\",\"solb\":\"⧄\",\"sol\":\"/\",\"Sopf\":\"𝕊\",\"sopf\":\"𝕤\",\"spades\":\"♠\",\"spadesuit\":\"♠\",\"spar\":\"∥\",\"sqcap\":\"⊓\",\"sqcaps\":\"⊓︀\",\"sqcup\":\"⊔\",\"sqcups\":\"⊔︀\",\"Sqrt\":\"√\",\"sqsub\":\"⊏\",\"sqsube\":\"⊑\",\"sqsubset\":\"⊏\",\"sqsubseteq\":\"⊑\",\"sqsup\":\"⊐\",\"sqsupe\":\"⊒\",\"sqsupset\":\"⊐\",\"sqsupseteq\":\"⊒\",\"square\":\"□\",\"Square\":\"□\",\"SquareIntersection\":\"⊓\",\"SquareSubset\":\"⊏\",\"SquareSubsetEqual\":\"⊑\",\"SquareSuperset\":\"⊐\",\"SquareSupersetEqual\":\"⊒\",\"SquareUnion\":\"⊔\",\"squarf\":\"▪\",\"squ\":\"□\",\"squf\":\"▪\",\"srarr\":\"→\",\"Sscr\":\"𝒮\",\"sscr\":\"𝓈\",\"ssetmn\":\"∖\",\"ssmile\":\"⌣\",\"sstarf\":\"⋆\",\"Star\":\"⋆\",\"star\":\"☆\",\"starf\":\"★\",\"straightepsilon\":\"ϵ\",\"straightphi\":\"ϕ\",\"strns\":\"¯\",\"sub\":\"⊂\",\"Sub\":\"⋐\",\"subdot\":\"⪽\",\"subE\":\"⫅\",\"sube\":\"⊆\",\"subedot\":\"⫃\",\"submult\":\"⫁\",\"subnE\":\"⫋\",\"subne\":\"⊊\",\"subplus\":\"⪿\",\"subrarr\":\"⥹\",\"subset\":\"⊂\",\"Subset\":\"⋐\",\"subseteq\":\"⊆\",\"subseteqq\":\"⫅\",\"SubsetEqual\":\"⊆\",\"subsetneq\":\"⊊\",\"subsetneqq\":\"⫋\",\"subsim\":\"⫇\",\"subsub\":\"⫕\",\"subsup\":\"⫓\",\"succapprox\":\"⪸\",\"succ\":\"≻\",\"succcurlyeq\":\"≽\",\"Succeeds\":\"≻\",\"SucceedsEqual\":\"⪰\",\"SucceedsSlantEqual\":\"≽\",\"SucceedsTilde\":\"≿\",\"succeq\":\"⪰\",\"succnapprox\":\"⪺\",\"succneqq\":\"⪶\",\"succnsim\":\"⋩\",\"succsim\":\"≿\",\"SuchThat\":\"∋\",\"sum\":\"∑\",\"Sum\":\"∑\",\"sung\":\"♪\",\"sup1\":\"¹\",\"sup2\":\"²\",\"sup3\":\"³\",\"sup\":\"⊃\",\"Sup\":\"⋑\",\"supdot\":\"⪾\",\"supdsub\":\"⫘\",\"supE\":\"⫆\",\"supe\":\"⊇\",\"supedot\":\"⫄\",\"Superset\":\"⊃\",\"SupersetEqual\":\"⊇\",\"suphsol\":\"⟉\",\"suphsub\":\"⫗\",\"suplarr\":\"⥻\",\"supmult\":\"⫂\",\"supnE\":\"⫌\",\"supne\":\"⊋\",\"supplus\":\"⫀\",\"supset\":\"⊃\",\"Supset\":\"⋑\",\"supseteq\":\"⊇\",\"supseteqq\":\"⫆\",\"supsetneq\":\"⊋\",\"supsetneqq\":\"⫌\",\"supsim\":\"⫈\",\"supsub\":\"⫔\",\"supsup\":\"⫖\",\"swarhk\":\"⤦\",\"swarr\":\"↙\",\"swArr\":\"⇙\",\"swarrow\":\"↙\",\"swnwar\":\"⤪\",\"szlig\":\"ß\",\"Tab\":\"\\\\t\",\"target\":\"⌖\",\"Tau\":\"Τ\",\"tau\":\"τ\",\"tbrk\":\"⎴\",\"Tcaron\":\"Ť\",\"tcaron\":\"ť\",\"Tcedil\":\"Ţ\",\"tcedil\":\"ţ\",\"Tcy\":\"Т\",\"tcy\":\"т\",\"tdot\":\"⃛\",\"telrec\":\"⌕\",\"Tfr\":\"𝔗\",\"tfr\":\"𝔱\",\"there4\":\"∴\",\"therefore\":\"∴\",\"Therefore\":\"∴\",\"Theta\":\"Θ\",\"theta\":\"θ\",\"thetasym\":\"ϑ\",\"thetav\":\"ϑ\",\"thickapprox\":\"≈\",\"thicksim\":\"∼\",\"ThickSpace\":\"  \",\"ThinSpace\":\" \",\"thinsp\":\" \",\"thkap\":\"≈\",\"thksim\":\"∼\",\"THORN\":\"Þ\",\"thorn\":\"þ\",\"tilde\":\"˜\",\"Tilde\":\"∼\",\"TildeEqual\":\"≃\",\"TildeFullEqual\":\"≅\",\"TildeTilde\":\"≈\",\"timesbar\":\"⨱\",\"timesb\":\"⊠\",\"times\":\"×\",\"timesd\":\"⨰\",\"tint\":\"∭\",\"toea\":\"⤨\",\"topbot\":\"⌶\",\"topcir\":\"⫱\",\"top\":\"⊤\",\"Topf\":\"𝕋\",\"topf\":\"𝕥\",\"topfork\":\"⫚\",\"tosa\":\"⤩\",\"tprime\":\"‴\",\"trade\":\"™\",\"TRADE\":\"™\",\"triangle\":\"▵\",\"triangledown\":\"▿\",\"triangleleft\":\"◃\",\"trianglelefteq\":\"⊴\",\"triangleq\":\"≜\",\"triangleright\":\"▹\",\"trianglerighteq\":\"⊵\",\"tridot\":\"◬\",\"trie\":\"≜\",\"triminus\":\"⨺\",\"TripleDot\":\"⃛\",\"triplus\":\"⨹\",\"trisb\":\"⧍\",\"tritime\":\"⨻\",\"trpezium\":\"⏢\",\"Tscr\":\"𝒯\",\"tscr\":\"𝓉\",\"TScy\":\"Ц\",\"tscy\":\"ц\",\"TSHcy\":\"Ћ\",\"tshcy\":\"ћ\",\"Tstrok\":\"Ŧ\",\"tstrok\":\"ŧ\",\"twixt\":\"≬\",\"twoheadleftarrow\":\"↞\",\"twoheadrightarrow\":\"↠\",\"Uacute\":\"Ú\",\"uacute\":\"ú\",\"uarr\":\"↑\",\"Uarr\":\"↟\",\"uArr\":\"⇑\",\"Uarrocir\":\"⥉\",\"Ubrcy\":\"Ў\",\"ubrcy\":\"ў\",\"Ubreve\":\"Ŭ\",\"ubreve\":\"ŭ\",\"Ucirc\":\"Û\",\"ucirc\":\"û\",\"Ucy\":\"У\",\"ucy\":\"у\",\"udarr\":\"⇅\",\"Udblac\":\"Ű\",\"udblac\":\"ű\",\"udhar\":\"⥮\",\"ufisht\":\"⥾\",\"Ufr\":\"𝔘\",\"ufr\":\"𝔲\",\"Ugrave\":\"Ù\",\"ugrave\":\"ù\",\"uHar\":\"⥣\",\"uharl\":\"↿\",\"uharr\":\"↾\",\"uhblk\":\"▀\",\"ulcorn\":\"⌜\",\"ulcorner\":\"⌜\",\"ulcrop\":\"⌏\",\"ultri\":\"◸\",\"Umacr\":\"Ū\",\"umacr\":\"ū\",\"uml\":\"¨\",\"UnderBar\":\"_\",\"UnderBrace\":\"⏟\",\"UnderBracket\":\"⎵\",\"UnderParenthesis\":\"⏝\",\"Union\":\"⋃\",\"UnionPlus\":\"⊎\",\"Uogon\":\"Ų\",\"uogon\":\"ų\",\"Uopf\":\"𝕌\",\"uopf\":\"𝕦\",\"UpArrowBar\":\"⤒\",\"uparrow\":\"↑\",\"UpArrow\":\"↑\",\"Uparrow\":\"⇑\",\"UpArrowDownArrow\":\"⇅\",\"updownarrow\":\"↕\",\"UpDownArrow\":\"↕\",\"Updownarrow\":\"⇕\",\"UpEquilibrium\":\"⥮\",\"upharpoonleft\":\"↿\",\"upharpoonright\":\"↾\",\"uplus\":\"⊎\",\"UpperLeftArrow\":\"↖\",\"UpperRightArrow\":\"↗\",\"upsi\":\"υ\",\"Upsi\":\"ϒ\",\"upsih\":\"ϒ\",\"Upsilon\":\"Υ\",\"upsilon\":\"υ\",\"UpTeeArrow\":\"↥\",\"UpTee\":\"⊥\",\"upuparrows\":\"⇈\",\"urcorn\":\"⌝\",\"urcorner\":\"⌝\",\"urcrop\":\"⌎\",\"Uring\":\"Ů\",\"uring\":\"ů\",\"urtri\":\"◹\",\"Uscr\":\"𝒰\",\"uscr\":\"𝓊\",\"utdot\":\"⋰\",\"Utilde\":\"Ũ\",\"utilde\":\"ũ\",\"utri\":\"▵\",\"utrif\":\"▴\",\"uuarr\":\"⇈\",\"Uuml\":\"Ü\",\"uuml\":\"ü\",\"uwangle\":\"⦧\",\"vangrt\":\"⦜\",\"varepsilon\":\"ϵ\",\"varkappa\":\"ϰ\",\"varnothing\":\"∅\",\"varphi\":\"ϕ\",\"varpi\":\"ϖ\",\"varpropto\":\"∝\",\"varr\":\"↕\",\"vArr\":\"⇕\",\"varrho\":\"ϱ\",\"varsigma\":\"ς\",\"varsubsetneq\":\"⊊︀\",\"varsubsetneqq\":\"⫋︀\",\"varsupsetneq\":\"⊋︀\",\"varsupsetneqq\":\"⫌︀\",\"vartheta\":\"ϑ\",\"vartriangleleft\":\"⊲\",\"vartriangleright\":\"⊳\",\"vBar\":\"⫨\",\"Vbar\":\"⫫\",\"vBarv\":\"⫩\",\"Vcy\":\"В\",\"vcy\":\"в\",\"vdash\":\"⊢\",\"vDash\":\"⊨\",\"Vdash\":\"⊩\",\"VDash\":\"⊫\",\"Vdashl\":\"⫦\",\"veebar\":\"⊻\",\"vee\":\"∨\",\"Vee\":\"⋁\",\"veeeq\":\"≚\",\"vellip\":\"⋮\",\"verbar\":\"|\",\"Verbar\":\"‖\",\"vert\":\"|\",\"Vert\":\"‖\",\"VerticalBar\":\"∣\",\"VerticalLine\":\"|\",\"VerticalSeparator\":\"❘\",\"VerticalTilde\":\"≀\",\"VeryThinSpace\":\" \",\"Vfr\":\"𝔙\",\"vfr\":\"𝔳\",\"vltri\":\"⊲\",\"vnsub\":\"⊂⃒\",\"vnsup\":\"⊃⃒\",\"Vopf\":\"𝕍\",\"vopf\":\"𝕧\",\"vprop\":\"∝\",\"vrtri\":\"⊳\",\"Vscr\":\"𝒱\",\"vscr\":\"𝓋\",\"vsubnE\":\"⫋︀\",\"vsubne\":\"⊊︀\",\"vsupnE\":\"⫌︀\",\"vsupne\":\"⊋︀\",\"Vvdash\":\"⊪\",\"vzigzag\":\"⦚\",\"Wcirc\":\"Ŵ\",\"wcirc\":\"ŵ\",\"wedbar\":\"⩟\",\"wedge\":\"∧\",\"Wedge\":\"⋀\",\"wedgeq\":\"≙\",\"weierp\":\"℘\",\"Wfr\":\"𝔚\",\"wfr\":\"𝔴\",\"Wopf\":\"𝕎\",\"wopf\":\"𝕨\",\"wp\":\"℘\",\"wr\":\"≀\",\"wreath\":\"≀\",\"Wscr\":\"𝒲\",\"wscr\":\"𝓌\",\"xcap\":\"⋂\",\"xcirc\":\"◯\",\"xcup\":\"⋃\",\"xdtri\":\"▽\",\"Xfr\":\"𝔛\",\"xfr\":\"𝔵\",\"xharr\":\"⟷\",\"xhArr\":\"⟺\",\"Xi\":\"Ξ\",\"xi\":\"ξ\",\"xlarr\":\"⟵\",\"xlArr\":\"⟸\",\"xmap\":\"⟼\",\"xnis\":\"⋻\",\"xodot\":\"⨀\",\"Xopf\":\"𝕏\",\"xopf\":\"𝕩\",\"xoplus\":\"⨁\",\"xotime\":\"⨂\",\"xrarr\":\"⟶\",\"xrArr\":\"⟹\",\"Xscr\":\"𝒳\",\"xscr\":\"𝓍\",\"xsqcup\":\"⨆\",\"xuplus\":\"⨄\",\"xutri\":\"△\",\"xvee\":\"⋁\",\"xwedge\":\"⋀\",\"Yacute\":\"Ý\",\"yacute\":\"ý\",\"YAcy\":\"Я\",\"yacy\":\"я\",\"Ycirc\":\"Ŷ\",\"ycirc\":\"ŷ\",\"Ycy\":\"Ы\",\"ycy\":\"ы\",\"yen\":\"¥\",\"Yfr\":\"𝔜\",\"yfr\":\"𝔶\",\"YIcy\":\"Ї\",\"yicy\":\"ї\",\"Yopf\":\"𝕐\",\"yopf\":\"𝕪\",\"Yscr\":\"𝒴\",\"yscr\":\"𝓎\",\"YUcy\":\"Ю\",\"yucy\":\"ю\",\"yuml\":\"ÿ\",\"Yuml\":\"Ÿ\",\"Zacute\":\"Ź\",\"zacute\":\"ź\",\"Zcaron\":\"Ž\",\"zcaron\":\"ž\",\"Zcy\":\"З\",\"zcy\":\"з\",\"Zdot\":\"Ż\",\"zdot\":\"ż\",\"zeetrf\":\"ℨ\",\"ZeroWidthSpace\":\"​\",\"Zeta\":\"Ζ\",\"zeta\":\"ζ\",\"zfr\":\"𝔷\",\"Zfr\":\"ℨ\",\"ZHcy\":\"Ж\",\"zhcy\":\"ж\",\"zigrarr\":\"⇝\",\"zopf\":\"𝕫\",\"Zopf\":\"ℤ\",\"Zscr\":\"𝒵\",\"zscr\":\"𝓏\",\"zwj\":\"‍\",\"zwnj\":\"‌\"}')},function(t){t.exports=JSON.parse('{\"amp\":\"&\",\"apos\":\"\\'\",\"gt\":\">\",\"lt\":\"<\",\"quot\":\"\\\\\"\"}')},function(t,e,r){\"use strict\";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.escape=e.encodeHTML=e.encodeXML=void 0;var i=a(n(r(245)).default),o=s(i);function a(t){return Object.keys(t).sort().reduce((function(e,r){return e[t[r]]=\"&\"+r+\";\",e}),{})}function s(t){for(var e=[],r=[],n=0,i=Object.keys(t);n/g,d=t.exports=function(t,e){this.options=i(u,e),this.treeAdapter=this.options.treeAdapter,this.html=\"\",this.startNode=t};d.escapeString=function(t,e){return t=t.replace(c,\"&\").replace(l,\" \"),e?t.replace(f,\""\"):t.replace(h,\"<\").replace(p,\">\")},d.prototype.serialize=function(){return this._serializeChildNodes(this.startNode),this.html},d.prototype._serializeChildNodes=function(t){var e=this.treeAdapter.getChildNodes(t);if(e)for(var r=0,n=e.length;r\",e!==a.AREA&&e!==a.BASE&&e!==a.BASEFONT&&e!==a.BGSOUND&&e!==a.BR&&e!==a.BR&&e!==a.COL&&e!==a.EMBED&&e!==a.FRAME&&e!==a.HR&&e!==a.IMG&&e!==a.INPUT&&e!==a.KEYGEN&&e!==a.LINK&&e!==a.MENUITEM&&e!==a.META&&e!==a.PARAM&&e!==a.SOURCE&&e!==a.TRACK&&e!==a.WBR&&(t=e===a.TEMPLATE&&r===s.HTML?this.treeAdapter.getTemplateContent(t):t,this._serializeChildNodes(t),this.html+=\"\")},d.prototype._serializeAttributes=function(t){for(var e=this.treeAdapter.getAttrList(t),r=0,n=e.length;r\"}},function(t,e,r){\"use strict\";var n=r(75).Writable,i=r(27).inherits,o=r(248);i(t=t.exports=function(t){n.call(this),this.parser=new o(t),this.lastChunkWritten=!1,this.writeCallback=null,this.pausedByScript=!1,this.document=this.parser.treeAdapter.createDocument(),this.pendingHtmlInsertions=[],this._resume=this._resume.bind(this),this._documentWrite=this._documentWrite.bind(this),this._scriptHandler=this._scriptHandler.bind(this),this.parser._bootstrap(this.document,null)},n),t.prototype._write=function(t,e,r){this.writeCallback=r,this.parser.tokenizer.write(t.toString(\"utf8\"),this.lastChunkWritten),this._runParsingLoop()},t.prototype.end=function(t,e,r){this.lastChunkWritten=!0,n.prototype.end.call(this,t||\"\",e,r)},t.prototype._runParsingLoop=function(){this.parser.runParsingLoopForCurrentChunk(this.writeCallback,this._scriptHandler)},t.prototype._resume=function(){if(!this.pausedByScript)throw new Error(\"Parser was already resumed\");for(;this.pendingHtmlInsertions.length;){var t=this.pendingHtmlInsertions.pop();this.parser.tokenizer.insertHtmlAtCurrentPos(t)}this.pausedByScript=!1,this.parser.tokenizer.active&&this._runParsingLoop()},t.prototype._documentWrite=function(t){this.parser.stopped||this.pendingHtmlInsertions.push(t)},t.prototype._scriptHandler=function(t){this.listeners(\"script\").length?(this.pausedByScript=!0,this.emit(\"script\",t,this._documentWrite,this._resume)):this._runParsingLoop()}},function(t,e,r){\"use strict\";(function(e,n){var i=r(108);t.exports=b;var o,a=r(235);function s(t,e){return t.listeners(e).length}b.ReadableState=g,r(25).EventEmitter;var u=r(255),c=r(147).Buffer,l=e.Uint8Array||function(){},f=Object.create(r(77));f.inherits=r(1),e=r(497);var h,p=void 0,d=(p=e&&e.debuglog?e.debuglog(\"stream\"):function(){},r(498));e=r(256),f.inherits(b,u);var m=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function g(t,e){t=t||{};var n=e instanceof(o=o||r(40));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark;e=this.objectMode?16:16384,this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:e,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h=h||r(31).StringDecoder,this.decoder=new h(t.encoding),this.encoding=t.encoding)}function b(t){if(o=o||r(40),!(this instanceof b))return new b(t);this._readableState=new g(t,this),this.readable=!0,t&&(\"function\"==typeof t.read&&(this._read=t.read),\"function\"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function _(t,e,r,n,i){var o,a=t._readableState;return null===e?(a.reading=!1,function(t,e){var r;e.ended||(!e.decoder||(r=e.decoder.end())&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length),e.ended=!0,w(t))}(t,a)):(i||(o=function(t,e){var r;return function(t){return c.isBuffer(t)||t instanceof l}(e)||\"string\"==typeof e||void 0===e||t.objectMode||(r=new TypeError(\"Invalid non-string/buffer chunk\")),r}(a,e)),o?t.emit(\"error\",o):a.objectMode||e&&0e.highWaterMark&&(e.highWaterMark=function(t){return 8388608<=t?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function w(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p(\"emitReadable\",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(E,t):E(t))}function E(t){p(\"emit readable\"),t.emit(\"readable\"),O(t)}function T(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(A,t,e))}function A(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;return to.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0==(t-=a)){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r).data=o.slice(a);break}++n}return e.length-=n,i}:function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),0==(t-=a)){a===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n).data=o.slice(a);break}++i}return e.length-=i,r})(t,e),n}(t,e.buffer,e.decoder),r);var r}function M(t){var e=t._readableState;if(0=e.highWaterMark||e.ended))return p(\"read: emitReadable\",e.length,e.ended),(0===e.length&&e.ended?M:w)(this),null;if(0===(t=v(t,e))&&e.ended)return 0===e.length&&M(this),null;var n=e.needReadable;return p(\"need readable\",n),(0===e.length||e.length-t\",t.children&&(r+=s(t.children,e)),a[t.name]&&!e.xmlMode||(r+=\"\")):r+=\"/>\",r}(c,e):c.type===n.Directive?r+=function(t){return\"<\"+t.data+\">\"}(c):c.type===n.Comment?r+=function(t){return\"\\x3c!--\"+t.data+\"--\\x3e\"}(c):c.type===n.CDATA?r+=function(t){return\"\"}(c):r+=function(t,e){var r=t.data||\"\";return!e.decodeEntities||t.parent&&t.parent.name in o||(r=i.encodeXML(r)),r}(c,e)}return r}},function(t,e,r){var n=r(30),i=r(150),o=r(51);i=i((function(t,e){n(e,o(e),t)})),t.exports=i},function(t,e,r){var n=r(24),i=r(262);n=i?function(t,e){return i.set(t,e),t}:n,t.exports=n},function(t,e,r){r=(r=r(204))&&new r,t.exports=r},function(t,e,r){var n=r(264),i=r(265),o=r(517),a=r(111),s=r(266),u=r(157),c=r(529),l=r(112),f=r(13);t.exports=function t(e,r,h,p,d,m,g,b,_,y){var v=128&r,w=1&r,E=2&r,T=24&r,A=512&r,x=E?void 0:a(e);return function S(){for(var O,k=arguments.length,M=Array(k),C=k;C--;)M[C]=arguments[C];if(T&&(j=u(S),O=o(M,j)),p&&(M=n(M,p,d,T)),m&&(M=i(M,m,g,T)),k-=O,T&&k\",t.children&&(r+=u(t.children,e)),s[t.name]&&!e.xmlMode||(r+=\"\")):r+=\"/>\",r}(f,e):f.type===n.Directive?r+=function(t){return\"<\"+t.data+\">\"}(f):f.type===n.Comment?r+=function(t){return\"\\x3c!--\"+t.data+\"--\\x3e\"}(f):f.type===n.CDATA?r+=function(t){return\"\"}(f):r+=function(t,e){var r=t.data||\"\";return!e.decodeEntities||t.parent&&t.parent.name in a||(r=i.encodeXML(r)),r}(f,e)}return r},c=[\"mi\",\"mo\",\"mn\",\"ms\",\"mtext\",\"annotation-xml\",\"foreignObject\",\"desc\",\"title\"]},function(t,e,r){\"use strict\";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.decodeHTML=e.decodeHTMLStrict=e.decodeXML=void 0;var i=n(r(275)),o=n(r(536)),a=n(r(276)),s=n(r(537));function u(t){var e=Object.keys(t).join(\"|\"),r=l(t),n=new RegExp(\"&(?:\"+(e+=\"|#[xX][\\\\da-fA-F]+|#\\\\d+\")+\");\",\"g\");return function(t){return String(t).replace(n,r)}}function c(t,e){return t\",\"GT\":\">\",\"Gt\":\"≫\",\"gtdot\":\"⋗\",\"gtlPar\":\"⦕\",\"gtquest\":\"⩼\",\"gtrapprox\":\"⪆\",\"gtrarr\":\"⥸\",\"gtrdot\":\"⋗\",\"gtreqless\":\"⋛\",\"gtreqqless\":\"⪌\",\"gtrless\":\"≷\",\"gtrsim\":\"≳\",\"gvertneqq\":\"≩︀\",\"gvnE\":\"≩︀\",\"Hacek\":\"ˇ\",\"hairsp\":\" \",\"half\":\"½\",\"hamilt\":\"ℋ\",\"HARDcy\":\"Ъ\",\"hardcy\":\"ъ\",\"harrcir\":\"⥈\",\"harr\":\"↔\",\"hArr\":\"⇔\",\"harrw\":\"↭\",\"Hat\":\"^\",\"hbar\":\"ℏ\",\"Hcirc\":\"Ĥ\",\"hcirc\":\"ĥ\",\"hearts\":\"♥\",\"heartsuit\":\"♥\",\"hellip\":\"…\",\"hercon\":\"⊹\",\"hfr\":\"𝔥\",\"Hfr\":\"ℌ\",\"HilbertSpace\":\"ℋ\",\"hksearow\":\"⤥\",\"hkswarow\":\"⤦\",\"hoarr\":\"⇿\",\"homtht\":\"∻\",\"hookleftarrow\":\"↩\",\"hookrightarrow\":\"↪\",\"hopf\":\"𝕙\",\"Hopf\":\"ℍ\",\"horbar\":\"―\",\"HorizontalLine\":\"─\",\"hscr\":\"𝒽\",\"Hscr\":\"ℋ\",\"hslash\":\"ℏ\",\"Hstrok\":\"Ħ\",\"hstrok\":\"ħ\",\"HumpDownHump\":\"≎\",\"HumpEqual\":\"≏\",\"hybull\":\"⁃\",\"hyphen\":\"‐\",\"Iacute\":\"Í\",\"iacute\":\"í\",\"ic\":\"⁣\",\"Icirc\":\"Î\",\"icirc\":\"î\",\"Icy\":\"И\",\"icy\":\"и\",\"Idot\":\"İ\",\"IEcy\":\"Е\",\"iecy\":\"е\",\"iexcl\":\"¡\",\"iff\":\"⇔\",\"ifr\":\"𝔦\",\"Ifr\":\"ℑ\",\"Igrave\":\"Ì\",\"igrave\":\"ì\",\"ii\":\"ⅈ\",\"iiiint\":\"⨌\",\"iiint\":\"∭\",\"iinfin\":\"⧜\",\"iiota\":\"℩\",\"IJlig\":\"IJ\",\"ijlig\":\"ij\",\"Imacr\":\"Ī\",\"imacr\":\"ī\",\"image\":\"ℑ\",\"ImaginaryI\":\"ⅈ\",\"imagline\":\"ℐ\",\"imagpart\":\"ℑ\",\"imath\":\"ı\",\"Im\":\"ℑ\",\"imof\":\"⊷\",\"imped\":\"Ƶ\",\"Implies\":\"⇒\",\"incare\":\"℅\",\"in\":\"∈\",\"infin\":\"∞\",\"infintie\":\"⧝\",\"inodot\":\"ı\",\"intcal\":\"⊺\",\"int\":\"∫\",\"Int\":\"∬\",\"integers\":\"ℤ\",\"Integral\":\"∫\",\"intercal\":\"⊺\",\"Intersection\":\"⋂\",\"intlarhk\":\"⨗\",\"intprod\":\"⨼\",\"InvisibleComma\":\"⁣\",\"InvisibleTimes\":\"⁢\",\"IOcy\":\"Ё\",\"iocy\":\"ё\",\"Iogon\":\"Į\",\"iogon\":\"į\",\"Iopf\":\"𝕀\",\"iopf\":\"𝕚\",\"Iota\":\"Ι\",\"iota\":\"ι\",\"iprod\":\"⨼\",\"iquest\":\"¿\",\"iscr\":\"𝒾\",\"Iscr\":\"ℐ\",\"isin\":\"∈\",\"isindot\":\"⋵\",\"isinE\":\"⋹\",\"isins\":\"⋴\",\"isinsv\":\"⋳\",\"isinv\":\"∈\",\"it\":\"⁢\",\"Itilde\":\"Ĩ\",\"itilde\":\"ĩ\",\"Iukcy\":\"І\",\"iukcy\":\"і\",\"Iuml\":\"Ï\",\"iuml\":\"ï\",\"Jcirc\":\"Ĵ\",\"jcirc\":\"ĵ\",\"Jcy\":\"Й\",\"jcy\":\"й\",\"Jfr\":\"𝔍\",\"jfr\":\"𝔧\",\"jmath\":\"ȷ\",\"Jopf\":\"𝕁\",\"jopf\":\"𝕛\",\"Jscr\":\"𝒥\",\"jscr\":\"𝒿\",\"Jsercy\":\"Ј\",\"jsercy\":\"ј\",\"Jukcy\":\"Є\",\"jukcy\":\"є\",\"Kappa\":\"Κ\",\"kappa\":\"κ\",\"kappav\":\"ϰ\",\"Kcedil\":\"Ķ\",\"kcedil\":\"ķ\",\"Kcy\":\"К\",\"kcy\":\"к\",\"Kfr\":\"𝔎\",\"kfr\":\"𝔨\",\"kgreen\":\"ĸ\",\"KHcy\":\"Х\",\"khcy\":\"х\",\"KJcy\":\"Ќ\",\"kjcy\":\"ќ\",\"Kopf\":\"𝕂\",\"kopf\":\"𝕜\",\"Kscr\":\"𝒦\",\"kscr\":\"𝓀\",\"lAarr\":\"⇚\",\"Lacute\":\"Ĺ\",\"lacute\":\"ĺ\",\"laemptyv\":\"⦴\",\"lagran\":\"ℒ\",\"Lambda\":\"Λ\",\"lambda\":\"λ\",\"lang\":\"⟨\",\"Lang\":\"⟪\",\"langd\":\"⦑\",\"langle\":\"⟨\",\"lap\":\"⪅\",\"Laplacetrf\":\"ℒ\",\"laquo\":\"«\",\"larrb\":\"⇤\",\"larrbfs\":\"⤟\",\"larr\":\"←\",\"Larr\":\"↞\",\"lArr\":\"⇐\",\"larrfs\":\"⤝\",\"larrhk\":\"↩\",\"larrlp\":\"↫\",\"larrpl\":\"⤹\",\"larrsim\":\"⥳\",\"larrtl\":\"↢\",\"latail\":\"⤙\",\"lAtail\":\"⤛\",\"lat\":\"⪫\",\"late\":\"⪭\",\"lates\":\"⪭︀\",\"lbarr\":\"⤌\",\"lBarr\":\"⤎\",\"lbbrk\":\"❲\",\"lbrace\":\"{\",\"lbrack\":\"[\",\"lbrke\":\"⦋\",\"lbrksld\":\"⦏\",\"lbrkslu\":\"⦍\",\"Lcaron\":\"Ľ\",\"lcaron\":\"ľ\",\"Lcedil\":\"Ļ\",\"lcedil\":\"ļ\",\"lceil\":\"⌈\",\"lcub\":\"{\",\"Lcy\":\"Л\",\"lcy\":\"л\",\"ldca\":\"⤶\",\"ldquo\":\"“\",\"ldquor\":\"„\",\"ldrdhar\":\"⥧\",\"ldrushar\":\"⥋\",\"ldsh\":\"↲\",\"le\":\"≤\",\"lE\":\"≦\",\"LeftAngleBracket\":\"⟨\",\"LeftArrowBar\":\"⇤\",\"leftarrow\":\"←\",\"LeftArrow\":\"←\",\"Leftarrow\":\"⇐\",\"LeftArrowRightArrow\":\"⇆\",\"leftarrowtail\":\"↢\",\"LeftCeiling\":\"⌈\",\"LeftDoubleBracket\":\"⟦\",\"LeftDownTeeVector\":\"⥡\",\"LeftDownVectorBar\":\"⥙\",\"LeftDownVector\":\"⇃\",\"LeftFloor\":\"⌊\",\"leftharpoondown\":\"↽\",\"leftharpoonup\":\"↼\",\"leftleftarrows\":\"⇇\",\"leftrightarrow\":\"↔\",\"LeftRightArrow\":\"↔\",\"Leftrightarrow\":\"⇔\",\"leftrightarrows\":\"⇆\",\"leftrightharpoons\":\"⇋\",\"leftrightsquigarrow\":\"↭\",\"LeftRightVector\":\"⥎\",\"LeftTeeArrow\":\"↤\",\"LeftTee\":\"⊣\",\"LeftTeeVector\":\"⥚\",\"leftthreetimes\":\"⋋\",\"LeftTriangleBar\":\"⧏\",\"LeftTriangle\":\"⊲\",\"LeftTriangleEqual\":\"⊴\",\"LeftUpDownVector\":\"⥑\",\"LeftUpTeeVector\":\"⥠\",\"LeftUpVectorBar\":\"⥘\",\"LeftUpVector\":\"↿\",\"LeftVectorBar\":\"⥒\",\"LeftVector\":\"↼\",\"lEg\":\"⪋\",\"leg\":\"⋚\",\"leq\":\"≤\",\"leqq\":\"≦\",\"leqslant\":\"⩽\",\"lescc\":\"⪨\",\"les\":\"⩽\",\"lesdot\":\"⩿\",\"lesdoto\":\"⪁\",\"lesdotor\":\"⪃\",\"lesg\":\"⋚︀\",\"lesges\":\"⪓\",\"lessapprox\":\"⪅\",\"lessdot\":\"⋖\",\"lesseqgtr\":\"⋚\",\"lesseqqgtr\":\"⪋\",\"LessEqualGreater\":\"⋚\",\"LessFullEqual\":\"≦\",\"LessGreater\":\"≶\",\"lessgtr\":\"≶\",\"LessLess\":\"⪡\",\"lesssim\":\"≲\",\"LessSlantEqual\":\"⩽\",\"LessTilde\":\"≲\",\"lfisht\":\"⥼\",\"lfloor\":\"⌊\",\"Lfr\":\"𝔏\",\"lfr\":\"𝔩\",\"lg\":\"≶\",\"lgE\":\"⪑\",\"lHar\":\"⥢\",\"lhard\":\"↽\",\"lharu\":\"↼\",\"lharul\":\"⥪\",\"lhblk\":\"▄\",\"LJcy\":\"Љ\",\"ljcy\":\"љ\",\"llarr\":\"⇇\",\"ll\":\"≪\",\"Ll\":\"⋘\",\"llcorner\":\"⌞\",\"Lleftarrow\":\"⇚\",\"llhard\":\"⥫\",\"lltri\":\"◺\",\"Lmidot\":\"Ŀ\",\"lmidot\":\"ŀ\",\"lmoustache\":\"⎰\",\"lmoust\":\"⎰\",\"lnap\":\"⪉\",\"lnapprox\":\"⪉\",\"lne\":\"⪇\",\"lnE\":\"≨\",\"lneq\":\"⪇\",\"lneqq\":\"≨\",\"lnsim\":\"⋦\",\"loang\":\"⟬\",\"loarr\":\"⇽\",\"lobrk\":\"⟦\",\"longleftarrow\":\"⟵\",\"LongLeftArrow\":\"⟵\",\"Longleftarrow\":\"⟸\",\"longleftrightarrow\":\"⟷\",\"LongLeftRightArrow\":\"⟷\",\"Longleftrightarrow\":\"⟺\",\"longmapsto\":\"⟼\",\"longrightarrow\":\"⟶\",\"LongRightArrow\":\"⟶\",\"Longrightarrow\":\"⟹\",\"looparrowleft\":\"↫\",\"looparrowright\":\"↬\",\"lopar\":\"⦅\",\"Lopf\":\"𝕃\",\"lopf\":\"𝕝\",\"loplus\":\"⨭\",\"lotimes\":\"⨴\",\"lowast\":\"∗\",\"lowbar\":\"_\",\"LowerLeftArrow\":\"↙\",\"LowerRightArrow\":\"↘\",\"loz\":\"◊\",\"lozenge\":\"◊\",\"lozf\":\"⧫\",\"lpar\":\"(\",\"lparlt\":\"⦓\",\"lrarr\":\"⇆\",\"lrcorner\":\"⌟\",\"lrhar\":\"⇋\",\"lrhard\":\"⥭\",\"lrm\":\"‎\",\"lrtri\":\"⊿\",\"lsaquo\":\"‹\",\"lscr\":\"𝓁\",\"Lscr\":\"ℒ\",\"lsh\":\"↰\",\"Lsh\":\"↰\",\"lsim\":\"≲\",\"lsime\":\"⪍\",\"lsimg\":\"⪏\",\"lsqb\":\"[\",\"lsquo\":\"‘\",\"lsquor\":\"‚\",\"Lstrok\":\"Ł\",\"lstrok\":\"ł\",\"ltcc\":\"⪦\",\"ltcir\":\"⩹\",\"lt\":\"<\",\"LT\":\"<\",\"Lt\":\"≪\",\"ltdot\":\"⋖\",\"lthree\":\"⋋\",\"ltimes\":\"⋉\",\"ltlarr\":\"⥶\",\"ltquest\":\"⩻\",\"ltri\":\"◃\",\"ltrie\":\"⊴\",\"ltrif\":\"◂\",\"ltrPar\":\"⦖\",\"lurdshar\":\"⥊\",\"luruhar\":\"⥦\",\"lvertneqq\":\"≨︀\",\"lvnE\":\"≨︀\",\"macr\":\"¯\",\"male\":\"♂\",\"malt\":\"✠\",\"maltese\":\"✠\",\"Map\":\"⤅\",\"map\":\"↦\",\"mapsto\":\"↦\",\"mapstodown\":\"↧\",\"mapstoleft\":\"↤\",\"mapstoup\":\"↥\",\"marker\":\"▮\",\"mcomma\":\"⨩\",\"Mcy\":\"М\",\"mcy\":\"м\",\"mdash\":\"—\",\"mDDot\":\"∺\",\"measuredangle\":\"∡\",\"MediumSpace\":\" \",\"Mellintrf\":\"ℳ\",\"Mfr\":\"𝔐\",\"mfr\":\"𝔪\",\"mho\":\"℧\",\"micro\":\"µ\",\"midast\":\"*\",\"midcir\":\"⫰\",\"mid\":\"∣\",\"middot\":\"·\",\"minusb\":\"⊟\",\"minus\":\"−\",\"minusd\":\"∸\",\"minusdu\":\"⨪\",\"MinusPlus\":\"∓\",\"mlcp\":\"⫛\",\"mldr\":\"…\",\"mnplus\":\"∓\",\"models\":\"⊧\",\"Mopf\":\"𝕄\",\"mopf\":\"𝕞\",\"mp\":\"∓\",\"mscr\":\"𝓂\",\"Mscr\":\"ℳ\",\"mstpos\":\"∾\",\"Mu\":\"Μ\",\"mu\":\"μ\",\"multimap\":\"⊸\",\"mumap\":\"⊸\",\"nabla\":\"∇\",\"Nacute\":\"Ń\",\"nacute\":\"ń\",\"nang\":\"∠⃒\",\"nap\":\"≉\",\"napE\":\"⩰̸\",\"napid\":\"≋̸\",\"napos\":\"ʼn\",\"napprox\":\"≉\",\"natural\":\"♮\",\"naturals\":\"ℕ\",\"natur\":\"♮\",\"nbsp\":\" \",\"nbump\":\"≎̸\",\"nbumpe\":\"≏̸\",\"ncap\":\"⩃\",\"Ncaron\":\"Ň\",\"ncaron\":\"ň\",\"Ncedil\":\"Ņ\",\"ncedil\":\"ņ\",\"ncong\":\"≇\",\"ncongdot\":\"⩭̸\",\"ncup\":\"⩂\",\"Ncy\":\"Н\",\"ncy\":\"н\",\"ndash\":\"–\",\"nearhk\":\"⤤\",\"nearr\":\"↗\",\"neArr\":\"⇗\",\"nearrow\":\"↗\",\"ne\":\"≠\",\"nedot\":\"≐̸\",\"NegativeMediumSpace\":\"​\",\"NegativeThickSpace\":\"​\",\"NegativeThinSpace\":\"​\",\"NegativeVeryThinSpace\":\"​\",\"nequiv\":\"≢\",\"nesear\":\"⤨\",\"nesim\":\"≂̸\",\"NestedGreaterGreater\":\"≫\",\"NestedLessLess\":\"≪\",\"NewLine\":\"\\\\n\",\"nexist\":\"∄\",\"nexists\":\"∄\",\"Nfr\":\"𝔑\",\"nfr\":\"𝔫\",\"ngE\":\"≧̸\",\"nge\":\"≱\",\"ngeq\":\"≱\",\"ngeqq\":\"≧̸\",\"ngeqslant\":\"⩾̸\",\"nges\":\"⩾̸\",\"nGg\":\"⋙̸\",\"ngsim\":\"≵\",\"nGt\":\"≫⃒\",\"ngt\":\"≯\",\"ngtr\":\"≯\",\"nGtv\":\"≫̸\",\"nharr\":\"↮\",\"nhArr\":\"⇎\",\"nhpar\":\"⫲\",\"ni\":\"∋\",\"nis\":\"⋼\",\"nisd\":\"⋺\",\"niv\":\"∋\",\"NJcy\":\"Њ\",\"njcy\":\"њ\",\"nlarr\":\"↚\",\"nlArr\":\"⇍\",\"nldr\":\"‥\",\"nlE\":\"≦̸\",\"nle\":\"≰\",\"nleftarrow\":\"↚\",\"nLeftarrow\":\"⇍\",\"nleftrightarrow\":\"↮\",\"nLeftrightarrow\":\"⇎\",\"nleq\":\"≰\",\"nleqq\":\"≦̸\",\"nleqslant\":\"⩽̸\",\"nles\":\"⩽̸\",\"nless\":\"≮\",\"nLl\":\"⋘̸\",\"nlsim\":\"≴\",\"nLt\":\"≪⃒\",\"nlt\":\"≮\",\"nltri\":\"⋪\",\"nltrie\":\"⋬\",\"nLtv\":\"≪̸\",\"nmid\":\"∤\",\"NoBreak\":\"⁠\",\"NonBreakingSpace\":\" \",\"nopf\":\"𝕟\",\"Nopf\":\"ℕ\",\"Not\":\"⫬\",\"not\":\"¬\",\"NotCongruent\":\"≢\",\"NotCupCap\":\"≭\",\"NotDoubleVerticalBar\":\"∦\",\"NotElement\":\"∉\",\"NotEqual\":\"≠\",\"NotEqualTilde\":\"≂̸\",\"NotExists\":\"∄\",\"NotGreater\":\"≯\",\"NotGreaterEqual\":\"≱\",\"NotGreaterFullEqual\":\"≧̸\",\"NotGreaterGreater\":\"≫̸\",\"NotGreaterLess\":\"≹\",\"NotGreaterSlantEqual\":\"⩾̸\",\"NotGreaterTilde\":\"≵\",\"NotHumpDownHump\":\"≎̸\",\"NotHumpEqual\":\"≏̸\",\"notin\":\"∉\",\"notindot\":\"⋵̸\",\"notinE\":\"⋹̸\",\"notinva\":\"∉\",\"notinvb\":\"⋷\",\"notinvc\":\"⋶\",\"NotLeftTriangleBar\":\"⧏̸\",\"NotLeftTriangle\":\"⋪\",\"NotLeftTriangleEqual\":\"⋬\",\"NotLess\":\"≮\",\"NotLessEqual\":\"≰\",\"NotLessGreater\":\"≸\",\"NotLessLess\":\"≪̸\",\"NotLessSlantEqual\":\"⩽̸\",\"NotLessTilde\":\"≴\",\"NotNestedGreaterGreater\":\"⪢̸\",\"NotNestedLessLess\":\"⪡̸\",\"notni\":\"∌\",\"notniva\":\"∌\",\"notnivb\":\"⋾\",\"notnivc\":\"⋽\",\"NotPrecedes\":\"⊀\",\"NotPrecedesEqual\":\"⪯̸\",\"NotPrecedesSlantEqual\":\"⋠\",\"NotReverseElement\":\"∌\",\"NotRightTriangleBar\":\"⧐̸\",\"NotRightTriangle\":\"⋫\",\"NotRightTriangleEqual\":\"⋭\",\"NotSquareSubset\":\"⊏̸\",\"NotSquareSubsetEqual\":\"⋢\",\"NotSquareSuperset\":\"⊐̸\",\"NotSquareSupersetEqual\":\"⋣\",\"NotSubset\":\"⊂⃒\",\"NotSubsetEqual\":\"⊈\",\"NotSucceeds\":\"⊁\",\"NotSucceedsEqual\":\"⪰̸\",\"NotSucceedsSlantEqual\":\"⋡\",\"NotSucceedsTilde\":\"≿̸\",\"NotSuperset\":\"⊃⃒\",\"NotSupersetEqual\":\"⊉\",\"NotTilde\":\"≁\",\"NotTildeEqual\":\"≄\",\"NotTildeFullEqual\":\"≇\",\"NotTildeTilde\":\"≉\",\"NotVerticalBar\":\"∤\",\"nparallel\":\"∦\",\"npar\":\"∦\",\"nparsl\":\"⫽⃥\",\"npart\":\"∂̸\",\"npolint\":\"⨔\",\"npr\":\"⊀\",\"nprcue\":\"⋠\",\"nprec\":\"⊀\",\"npreceq\":\"⪯̸\",\"npre\":\"⪯̸\",\"nrarrc\":\"⤳̸\",\"nrarr\":\"↛\",\"nrArr\":\"⇏\",\"nrarrw\":\"↝̸\",\"nrightarrow\":\"↛\",\"nRightarrow\":\"⇏\",\"nrtri\":\"⋫\",\"nrtrie\":\"⋭\",\"nsc\":\"⊁\",\"nsccue\":\"⋡\",\"nsce\":\"⪰̸\",\"Nscr\":\"𝒩\",\"nscr\":\"𝓃\",\"nshortmid\":\"∤\",\"nshortparallel\":\"∦\",\"nsim\":\"≁\",\"nsime\":\"≄\",\"nsimeq\":\"≄\",\"nsmid\":\"∤\",\"nspar\":\"∦\",\"nsqsube\":\"⋢\",\"nsqsupe\":\"⋣\",\"nsub\":\"⊄\",\"nsubE\":\"⫅̸\",\"nsube\":\"⊈\",\"nsubset\":\"⊂⃒\",\"nsubseteq\":\"⊈\",\"nsubseteqq\":\"⫅̸\",\"nsucc\":\"⊁\",\"nsucceq\":\"⪰̸\",\"nsup\":\"⊅\",\"nsupE\":\"⫆̸\",\"nsupe\":\"⊉\",\"nsupset\":\"⊃⃒\",\"nsupseteq\":\"⊉\",\"nsupseteqq\":\"⫆̸\",\"ntgl\":\"≹\",\"Ntilde\":\"Ñ\",\"ntilde\":\"ñ\",\"ntlg\":\"≸\",\"ntriangleleft\":\"⋪\",\"ntrianglelefteq\":\"⋬\",\"ntriangleright\":\"⋫\",\"ntrianglerighteq\":\"⋭\",\"Nu\":\"Ν\",\"nu\":\"ν\",\"num\":\"#\",\"numero\":\"№\",\"numsp\":\" \",\"nvap\":\"≍⃒\",\"nvdash\":\"⊬\",\"nvDash\":\"⊭\",\"nVdash\":\"⊮\",\"nVDash\":\"⊯\",\"nvge\":\"≥⃒\",\"nvgt\":\">⃒\",\"nvHarr\":\"⤄\",\"nvinfin\":\"⧞\",\"nvlArr\":\"⤂\",\"nvle\":\"≤⃒\",\"nvlt\":\"<⃒\",\"nvltrie\":\"⊴⃒\",\"nvrArr\":\"⤃\",\"nvrtrie\":\"⊵⃒\",\"nvsim\":\"∼⃒\",\"nwarhk\":\"⤣\",\"nwarr\":\"↖\",\"nwArr\":\"⇖\",\"nwarrow\":\"↖\",\"nwnear\":\"⤧\",\"Oacute\":\"Ó\",\"oacute\":\"ó\",\"oast\":\"⊛\",\"Ocirc\":\"Ô\",\"ocirc\":\"ô\",\"ocir\":\"⊚\",\"Ocy\":\"О\",\"ocy\":\"о\",\"odash\":\"⊝\",\"Odblac\":\"Ő\",\"odblac\":\"ő\",\"odiv\":\"⨸\",\"odot\":\"⊙\",\"odsold\":\"⦼\",\"OElig\":\"Œ\",\"oelig\":\"œ\",\"ofcir\":\"⦿\",\"Ofr\":\"𝔒\",\"ofr\":\"𝔬\",\"ogon\":\"˛\",\"Ograve\":\"Ò\",\"ograve\":\"ò\",\"ogt\":\"⧁\",\"ohbar\":\"⦵\",\"ohm\":\"Ω\",\"oint\":\"∮\",\"olarr\":\"↺\",\"olcir\":\"⦾\",\"olcross\":\"⦻\",\"oline\":\"‾\",\"olt\":\"⧀\",\"Omacr\":\"Ō\",\"omacr\":\"ō\",\"Omega\":\"Ω\",\"omega\":\"ω\",\"Omicron\":\"Ο\",\"omicron\":\"ο\",\"omid\":\"⦶\",\"ominus\":\"⊖\",\"Oopf\":\"𝕆\",\"oopf\":\"𝕠\",\"opar\":\"⦷\",\"OpenCurlyDoubleQuote\":\"“\",\"OpenCurlyQuote\":\"‘\",\"operp\":\"⦹\",\"oplus\":\"⊕\",\"orarr\":\"↻\",\"Or\":\"⩔\",\"or\":\"∨\",\"ord\":\"⩝\",\"order\":\"ℴ\",\"orderof\":\"ℴ\",\"ordf\":\"ª\",\"ordm\":\"º\",\"origof\":\"⊶\",\"oror\":\"⩖\",\"orslope\":\"⩗\",\"orv\":\"⩛\",\"oS\":\"Ⓢ\",\"Oscr\":\"𝒪\",\"oscr\":\"ℴ\",\"Oslash\":\"Ø\",\"oslash\":\"ø\",\"osol\":\"⊘\",\"Otilde\":\"Õ\",\"otilde\":\"õ\",\"otimesas\":\"⨶\",\"Otimes\":\"⨷\",\"otimes\":\"⊗\",\"Ouml\":\"Ö\",\"ouml\":\"ö\",\"ovbar\":\"⌽\",\"OverBar\":\"‾\",\"OverBrace\":\"⏞\",\"OverBracket\":\"⎴\",\"OverParenthesis\":\"⏜\",\"para\":\"¶\",\"parallel\":\"∥\",\"par\":\"∥\",\"parsim\":\"⫳\",\"parsl\":\"⫽\",\"part\":\"∂\",\"PartialD\":\"∂\",\"Pcy\":\"П\",\"pcy\":\"п\",\"percnt\":\"%\",\"period\":\".\",\"permil\":\"‰\",\"perp\":\"⊥\",\"pertenk\":\"‱\",\"Pfr\":\"𝔓\",\"pfr\":\"𝔭\",\"Phi\":\"Φ\",\"phi\":\"φ\",\"phiv\":\"ϕ\",\"phmmat\":\"ℳ\",\"phone\":\"☎\",\"Pi\":\"Π\",\"pi\":\"π\",\"pitchfork\":\"⋔\",\"piv\":\"ϖ\",\"planck\":\"ℏ\",\"planckh\":\"ℎ\",\"plankv\":\"ℏ\",\"plusacir\":\"⨣\",\"plusb\":\"⊞\",\"pluscir\":\"⨢\",\"plus\":\"+\",\"plusdo\":\"∔\",\"plusdu\":\"⨥\",\"pluse\":\"⩲\",\"PlusMinus\":\"±\",\"plusmn\":\"±\",\"plussim\":\"⨦\",\"plustwo\":\"⨧\",\"pm\":\"±\",\"Poincareplane\":\"ℌ\",\"pointint\":\"⨕\",\"popf\":\"𝕡\",\"Popf\":\"ℙ\",\"pound\":\"£\",\"prap\":\"⪷\",\"Pr\":\"⪻\",\"pr\":\"≺\",\"prcue\":\"≼\",\"precapprox\":\"⪷\",\"prec\":\"≺\",\"preccurlyeq\":\"≼\",\"Precedes\":\"≺\",\"PrecedesEqual\":\"⪯\",\"PrecedesSlantEqual\":\"≼\",\"PrecedesTilde\":\"≾\",\"preceq\":\"⪯\",\"precnapprox\":\"⪹\",\"precneqq\":\"⪵\",\"precnsim\":\"⋨\",\"pre\":\"⪯\",\"prE\":\"⪳\",\"precsim\":\"≾\",\"prime\":\"′\",\"Prime\":\"″\",\"primes\":\"ℙ\",\"prnap\":\"⪹\",\"prnE\":\"⪵\",\"prnsim\":\"⋨\",\"prod\":\"∏\",\"Product\":\"∏\",\"profalar\":\"⌮\",\"profline\":\"⌒\",\"profsurf\":\"⌓\",\"prop\":\"∝\",\"Proportional\":\"∝\",\"Proportion\":\"∷\",\"propto\":\"∝\",\"prsim\":\"≾\",\"prurel\":\"⊰\",\"Pscr\":\"𝒫\",\"pscr\":\"𝓅\",\"Psi\":\"Ψ\",\"psi\":\"ψ\",\"puncsp\":\" \",\"Qfr\":\"𝔔\",\"qfr\":\"𝔮\",\"qint\":\"⨌\",\"qopf\":\"𝕢\",\"Qopf\":\"ℚ\",\"qprime\":\"⁗\",\"Qscr\":\"𝒬\",\"qscr\":\"𝓆\",\"quaternions\":\"ℍ\",\"quatint\":\"⨖\",\"quest\":\"?\",\"questeq\":\"≟\",\"quot\":\"\\\\\"\",\"QUOT\":\"\\\\\"\",\"rAarr\":\"⇛\",\"race\":\"∽̱\",\"Racute\":\"Ŕ\",\"racute\":\"ŕ\",\"radic\":\"√\",\"raemptyv\":\"⦳\",\"rang\":\"⟩\",\"Rang\":\"⟫\",\"rangd\":\"⦒\",\"range\":\"⦥\",\"rangle\":\"⟩\",\"raquo\":\"»\",\"rarrap\":\"⥵\",\"rarrb\":\"⇥\",\"rarrbfs\":\"⤠\",\"rarrc\":\"⤳\",\"rarr\":\"→\",\"Rarr\":\"↠\",\"rArr\":\"⇒\",\"rarrfs\":\"⤞\",\"rarrhk\":\"↪\",\"rarrlp\":\"↬\",\"rarrpl\":\"⥅\",\"rarrsim\":\"⥴\",\"Rarrtl\":\"⤖\",\"rarrtl\":\"↣\",\"rarrw\":\"↝\",\"ratail\":\"⤚\",\"rAtail\":\"⤜\",\"ratio\":\"∶\",\"rationals\":\"ℚ\",\"rbarr\":\"⤍\",\"rBarr\":\"⤏\",\"RBarr\":\"⤐\",\"rbbrk\":\"❳\",\"rbrace\":\"}\",\"rbrack\":\"]\",\"rbrke\":\"⦌\",\"rbrksld\":\"⦎\",\"rbrkslu\":\"⦐\",\"Rcaron\":\"Ř\",\"rcaron\":\"ř\",\"Rcedil\":\"Ŗ\",\"rcedil\":\"ŗ\",\"rceil\":\"⌉\",\"rcub\":\"}\",\"Rcy\":\"Р\",\"rcy\":\"р\",\"rdca\":\"⤷\",\"rdldhar\":\"⥩\",\"rdquo\":\"”\",\"rdquor\":\"”\",\"rdsh\":\"↳\",\"real\":\"ℜ\",\"realine\":\"ℛ\",\"realpart\":\"ℜ\",\"reals\":\"ℝ\",\"Re\":\"ℜ\",\"rect\":\"▭\",\"reg\":\"®\",\"REG\":\"®\",\"ReverseElement\":\"∋\",\"ReverseEquilibrium\":\"⇋\",\"ReverseUpEquilibrium\":\"⥯\",\"rfisht\":\"⥽\",\"rfloor\":\"⌋\",\"rfr\":\"𝔯\",\"Rfr\":\"ℜ\",\"rHar\":\"⥤\",\"rhard\":\"⇁\",\"rharu\":\"⇀\",\"rharul\":\"⥬\",\"Rho\":\"Ρ\",\"rho\":\"ρ\",\"rhov\":\"ϱ\",\"RightAngleBracket\":\"⟩\",\"RightArrowBar\":\"⇥\",\"rightarrow\":\"→\",\"RightArrow\":\"→\",\"Rightarrow\":\"⇒\",\"RightArrowLeftArrow\":\"⇄\",\"rightarrowtail\":\"↣\",\"RightCeiling\":\"⌉\",\"RightDoubleBracket\":\"⟧\",\"RightDownTeeVector\":\"⥝\",\"RightDownVectorBar\":\"⥕\",\"RightDownVector\":\"⇂\",\"RightFloor\":\"⌋\",\"rightharpoondown\":\"⇁\",\"rightharpoonup\":\"⇀\",\"rightleftarrows\":\"⇄\",\"rightleftharpoons\":\"⇌\",\"rightrightarrows\":\"⇉\",\"rightsquigarrow\":\"↝\",\"RightTeeArrow\":\"↦\",\"RightTee\":\"⊢\",\"RightTeeVector\":\"⥛\",\"rightthreetimes\":\"⋌\",\"RightTriangleBar\":\"⧐\",\"RightTriangle\":\"⊳\",\"RightTriangleEqual\":\"⊵\",\"RightUpDownVector\":\"⥏\",\"RightUpTeeVector\":\"⥜\",\"RightUpVectorBar\":\"⥔\",\"RightUpVector\":\"↾\",\"RightVectorBar\":\"⥓\",\"RightVector\":\"⇀\",\"ring\":\"˚\",\"risingdotseq\":\"≓\",\"rlarr\":\"⇄\",\"rlhar\":\"⇌\",\"rlm\":\"‏\",\"rmoustache\":\"⎱\",\"rmoust\":\"⎱\",\"rnmid\":\"⫮\",\"roang\":\"⟭\",\"roarr\":\"⇾\",\"robrk\":\"⟧\",\"ropar\":\"⦆\",\"ropf\":\"𝕣\",\"Ropf\":\"ℝ\",\"roplus\":\"⨮\",\"rotimes\":\"⨵\",\"RoundImplies\":\"⥰\",\"rpar\":\")\",\"rpargt\":\"⦔\",\"rppolint\":\"⨒\",\"rrarr\":\"⇉\",\"Rrightarrow\":\"⇛\",\"rsaquo\":\"›\",\"rscr\":\"𝓇\",\"Rscr\":\"ℛ\",\"rsh\":\"↱\",\"Rsh\":\"↱\",\"rsqb\":\"]\",\"rsquo\":\"’\",\"rsquor\":\"’\",\"rthree\":\"⋌\",\"rtimes\":\"⋊\",\"rtri\":\"▹\",\"rtrie\":\"⊵\",\"rtrif\":\"▸\",\"rtriltri\":\"⧎\",\"RuleDelayed\":\"⧴\",\"ruluhar\":\"⥨\",\"rx\":\"℞\",\"Sacute\":\"Ś\",\"sacute\":\"ś\",\"sbquo\":\"‚\",\"scap\":\"⪸\",\"Scaron\":\"Š\",\"scaron\":\"š\",\"Sc\":\"⪼\",\"sc\":\"≻\",\"sccue\":\"≽\",\"sce\":\"⪰\",\"scE\":\"⪴\",\"Scedil\":\"Ş\",\"scedil\":\"ş\",\"Scirc\":\"Ŝ\",\"scirc\":\"ŝ\",\"scnap\":\"⪺\",\"scnE\":\"⪶\",\"scnsim\":\"⋩\",\"scpolint\":\"⨓\",\"scsim\":\"≿\",\"Scy\":\"С\",\"scy\":\"с\",\"sdotb\":\"⊡\",\"sdot\":\"⋅\",\"sdote\":\"⩦\",\"searhk\":\"⤥\",\"searr\":\"↘\",\"seArr\":\"⇘\",\"searrow\":\"↘\",\"sect\":\"§\",\"semi\":\";\",\"seswar\":\"⤩\",\"setminus\":\"∖\",\"setmn\":\"∖\",\"sext\":\"✶\",\"Sfr\":\"𝔖\",\"sfr\":\"𝔰\",\"sfrown\":\"⌢\",\"sharp\":\"♯\",\"SHCHcy\":\"Щ\",\"shchcy\":\"щ\",\"SHcy\":\"Ш\",\"shcy\":\"ш\",\"ShortDownArrow\":\"↓\",\"ShortLeftArrow\":\"←\",\"shortmid\":\"∣\",\"shortparallel\":\"∥\",\"ShortRightArrow\":\"→\",\"ShortUpArrow\":\"↑\",\"shy\":\"­\",\"Sigma\":\"Σ\",\"sigma\":\"σ\",\"sigmaf\":\"ς\",\"sigmav\":\"ς\",\"sim\":\"∼\",\"simdot\":\"⩪\",\"sime\":\"≃\",\"simeq\":\"≃\",\"simg\":\"⪞\",\"simgE\":\"⪠\",\"siml\":\"⪝\",\"simlE\":\"⪟\",\"simne\":\"≆\",\"simplus\":\"⨤\",\"simrarr\":\"⥲\",\"slarr\":\"←\",\"SmallCircle\":\"∘\",\"smallsetminus\":\"∖\",\"smashp\":\"⨳\",\"smeparsl\":\"⧤\",\"smid\":\"∣\",\"smile\":\"⌣\",\"smt\":\"⪪\",\"smte\":\"⪬\",\"smtes\":\"⪬︀\",\"SOFTcy\":\"Ь\",\"softcy\":\"ь\",\"solbar\":\"⌿\",\"solb\":\"⧄\",\"sol\":\"/\",\"Sopf\":\"𝕊\",\"sopf\":\"𝕤\",\"spades\":\"♠\",\"spadesuit\":\"♠\",\"spar\":\"∥\",\"sqcap\":\"⊓\",\"sqcaps\":\"⊓︀\",\"sqcup\":\"⊔\",\"sqcups\":\"⊔︀\",\"Sqrt\":\"√\",\"sqsub\":\"⊏\",\"sqsube\":\"⊑\",\"sqsubset\":\"⊏\",\"sqsubseteq\":\"⊑\",\"sqsup\":\"⊐\",\"sqsupe\":\"⊒\",\"sqsupset\":\"⊐\",\"sqsupseteq\":\"⊒\",\"square\":\"□\",\"Square\":\"□\",\"SquareIntersection\":\"⊓\",\"SquareSubset\":\"⊏\",\"SquareSubsetEqual\":\"⊑\",\"SquareSuperset\":\"⊐\",\"SquareSupersetEqual\":\"⊒\",\"SquareUnion\":\"⊔\",\"squarf\":\"▪\",\"squ\":\"□\",\"squf\":\"▪\",\"srarr\":\"→\",\"Sscr\":\"𝒮\",\"sscr\":\"𝓈\",\"ssetmn\":\"∖\",\"ssmile\":\"⌣\",\"sstarf\":\"⋆\",\"Star\":\"⋆\",\"star\":\"☆\",\"starf\":\"★\",\"straightepsilon\":\"ϵ\",\"straightphi\":\"ϕ\",\"strns\":\"¯\",\"sub\":\"⊂\",\"Sub\":\"⋐\",\"subdot\":\"⪽\",\"subE\":\"⫅\",\"sube\":\"⊆\",\"subedot\":\"⫃\",\"submult\":\"⫁\",\"subnE\":\"⫋\",\"subne\":\"⊊\",\"subplus\":\"⪿\",\"subrarr\":\"⥹\",\"subset\":\"⊂\",\"Subset\":\"⋐\",\"subseteq\":\"⊆\",\"subseteqq\":\"⫅\",\"SubsetEqual\":\"⊆\",\"subsetneq\":\"⊊\",\"subsetneqq\":\"⫋\",\"subsim\":\"⫇\",\"subsub\":\"⫕\",\"subsup\":\"⫓\",\"succapprox\":\"⪸\",\"succ\":\"≻\",\"succcurlyeq\":\"≽\",\"Succeeds\":\"≻\",\"SucceedsEqual\":\"⪰\",\"SucceedsSlantEqual\":\"≽\",\"SucceedsTilde\":\"≿\",\"succeq\":\"⪰\",\"succnapprox\":\"⪺\",\"succneqq\":\"⪶\",\"succnsim\":\"⋩\",\"succsim\":\"≿\",\"SuchThat\":\"∋\",\"sum\":\"∑\",\"Sum\":\"∑\",\"sung\":\"♪\",\"sup1\":\"¹\",\"sup2\":\"²\",\"sup3\":\"³\",\"sup\":\"⊃\",\"Sup\":\"⋑\",\"supdot\":\"⪾\",\"supdsub\":\"⫘\",\"supE\":\"⫆\",\"supe\":\"⊇\",\"supedot\":\"⫄\",\"Superset\":\"⊃\",\"SupersetEqual\":\"⊇\",\"suphsol\":\"⟉\",\"suphsub\":\"⫗\",\"suplarr\":\"⥻\",\"supmult\":\"⫂\",\"supnE\":\"⫌\",\"supne\":\"⊋\",\"supplus\":\"⫀\",\"supset\":\"⊃\",\"Supset\":\"⋑\",\"supseteq\":\"⊇\",\"supseteqq\":\"⫆\",\"supsetneq\":\"⊋\",\"supsetneqq\":\"⫌\",\"supsim\":\"⫈\",\"supsub\":\"⫔\",\"supsup\":\"⫖\",\"swarhk\":\"⤦\",\"swarr\":\"↙\",\"swArr\":\"⇙\",\"swarrow\":\"↙\",\"swnwar\":\"⤪\",\"szlig\":\"ß\",\"Tab\":\"\\\\t\",\"target\":\"⌖\",\"Tau\":\"Τ\",\"tau\":\"τ\",\"tbrk\":\"⎴\",\"Tcaron\":\"Ť\",\"tcaron\":\"ť\",\"Tcedil\":\"Ţ\",\"tcedil\":\"ţ\",\"Tcy\":\"Т\",\"tcy\":\"т\",\"tdot\":\"⃛\",\"telrec\":\"⌕\",\"Tfr\":\"𝔗\",\"tfr\":\"𝔱\",\"there4\":\"∴\",\"therefore\":\"∴\",\"Therefore\":\"∴\",\"Theta\":\"Θ\",\"theta\":\"θ\",\"thetasym\":\"ϑ\",\"thetav\":\"ϑ\",\"thickapprox\":\"≈\",\"thicksim\":\"∼\",\"ThickSpace\":\"  \",\"ThinSpace\":\" \",\"thinsp\":\" \",\"thkap\":\"≈\",\"thksim\":\"∼\",\"THORN\":\"Þ\",\"thorn\":\"þ\",\"tilde\":\"˜\",\"Tilde\":\"∼\",\"TildeEqual\":\"≃\",\"TildeFullEqual\":\"≅\",\"TildeTilde\":\"≈\",\"timesbar\":\"⨱\",\"timesb\":\"⊠\",\"times\":\"×\",\"timesd\":\"⨰\",\"tint\":\"∭\",\"toea\":\"⤨\",\"topbot\":\"⌶\",\"topcir\":\"⫱\",\"top\":\"⊤\",\"Topf\":\"𝕋\",\"topf\":\"𝕥\",\"topfork\":\"⫚\",\"tosa\":\"⤩\",\"tprime\":\"‴\",\"trade\":\"™\",\"TRADE\":\"™\",\"triangle\":\"▵\",\"triangledown\":\"▿\",\"triangleleft\":\"◃\",\"trianglelefteq\":\"⊴\",\"triangleq\":\"≜\",\"triangleright\":\"▹\",\"trianglerighteq\":\"⊵\",\"tridot\":\"◬\",\"trie\":\"≜\",\"triminus\":\"⨺\",\"TripleDot\":\"⃛\",\"triplus\":\"⨹\",\"trisb\":\"⧍\",\"tritime\":\"⨻\",\"trpezium\":\"⏢\",\"Tscr\":\"𝒯\",\"tscr\":\"𝓉\",\"TScy\":\"Ц\",\"tscy\":\"ц\",\"TSHcy\":\"Ћ\",\"tshcy\":\"ћ\",\"Tstrok\":\"Ŧ\",\"tstrok\":\"ŧ\",\"twixt\":\"≬\",\"twoheadleftarrow\":\"↞\",\"twoheadrightarrow\":\"↠\",\"Uacute\":\"Ú\",\"uacute\":\"ú\",\"uarr\":\"↑\",\"Uarr\":\"↟\",\"uArr\":\"⇑\",\"Uarrocir\":\"⥉\",\"Ubrcy\":\"Ў\",\"ubrcy\":\"ў\",\"Ubreve\":\"Ŭ\",\"ubreve\":\"ŭ\",\"Ucirc\":\"Û\",\"ucirc\":\"û\",\"Ucy\":\"У\",\"ucy\":\"у\",\"udarr\":\"⇅\",\"Udblac\":\"Ű\",\"udblac\":\"ű\",\"udhar\":\"⥮\",\"ufisht\":\"⥾\",\"Ufr\":\"𝔘\",\"ufr\":\"𝔲\",\"Ugrave\":\"Ù\",\"ugrave\":\"ù\",\"uHar\":\"⥣\",\"uharl\":\"↿\",\"uharr\":\"↾\",\"uhblk\":\"▀\",\"ulcorn\":\"⌜\",\"ulcorner\":\"⌜\",\"ulcrop\":\"⌏\",\"ultri\":\"◸\",\"Umacr\":\"Ū\",\"umacr\":\"ū\",\"uml\":\"¨\",\"UnderBar\":\"_\",\"UnderBrace\":\"⏟\",\"UnderBracket\":\"⎵\",\"UnderParenthesis\":\"⏝\",\"Union\":\"⋃\",\"UnionPlus\":\"⊎\",\"Uogon\":\"Ų\",\"uogon\":\"ų\",\"Uopf\":\"𝕌\",\"uopf\":\"𝕦\",\"UpArrowBar\":\"⤒\",\"uparrow\":\"↑\",\"UpArrow\":\"↑\",\"Uparrow\":\"⇑\",\"UpArrowDownArrow\":\"⇅\",\"updownarrow\":\"↕\",\"UpDownArrow\":\"↕\",\"Updownarrow\":\"⇕\",\"UpEquilibrium\":\"⥮\",\"upharpoonleft\":\"↿\",\"upharpoonright\":\"↾\",\"uplus\":\"⊎\",\"UpperLeftArrow\":\"↖\",\"UpperRightArrow\":\"↗\",\"upsi\":\"υ\",\"Upsi\":\"ϒ\",\"upsih\":\"ϒ\",\"Upsilon\":\"Υ\",\"upsilon\":\"υ\",\"UpTeeArrow\":\"↥\",\"UpTee\":\"⊥\",\"upuparrows\":\"⇈\",\"urcorn\":\"⌝\",\"urcorner\":\"⌝\",\"urcrop\":\"⌎\",\"Uring\":\"Ů\",\"uring\":\"ů\",\"urtri\":\"◹\",\"Uscr\":\"𝒰\",\"uscr\":\"𝓊\",\"utdot\":\"⋰\",\"Utilde\":\"Ũ\",\"utilde\":\"ũ\",\"utri\":\"▵\",\"utrif\":\"▴\",\"uuarr\":\"⇈\",\"Uuml\":\"Ü\",\"uuml\":\"ü\",\"uwangle\":\"⦧\",\"vangrt\":\"⦜\",\"varepsilon\":\"ϵ\",\"varkappa\":\"ϰ\",\"varnothing\":\"∅\",\"varphi\":\"ϕ\",\"varpi\":\"ϖ\",\"varpropto\":\"∝\",\"varr\":\"↕\",\"vArr\":\"⇕\",\"varrho\":\"ϱ\",\"varsigma\":\"ς\",\"varsubsetneq\":\"⊊︀\",\"varsubsetneqq\":\"⫋︀\",\"varsupsetneq\":\"⊋︀\",\"varsupsetneqq\":\"⫌︀\",\"vartheta\":\"ϑ\",\"vartriangleleft\":\"⊲\",\"vartriangleright\":\"⊳\",\"vBar\":\"⫨\",\"Vbar\":\"⫫\",\"vBarv\":\"⫩\",\"Vcy\":\"В\",\"vcy\":\"в\",\"vdash\":\"⊢\",\"vDash\":\"⊨\",\"Vdash\":\"⊩\",\"VDash\":\"⊫\",\"Vdashl\":\"⫦\",\"veebar\":\"⊻\",\"vee\":\"∨\",\"Vee\":\"⋁\",\"veeeq\":\"≚\",\"vellip\":\"⋮\",\"verbar\":\"|\",\"Verbar\":\"‖\",\"vert\":\"|\",\"Vert\":\"‖\",\"VerticalBar\":\"∣\",\"VerticalLine\":\"|\",\"VerticalSeparator\":\"❘\",\"VerticalTilde\":\"≀\",\"VeryThinSpace\":\" \",\"Vfr\":\"𝔙\",\"vfr\":\"𝔳\",\"vltri\":\"⊲\",\"vnsub\":\"⊂⃒\",\"vnsup\":\"⊃⃒\",\"Vopf\":\"𝕍\",\"vopf\":\"𝕧\",\"vprop\":\"∝\",\"vrtri\":\"⊳\",\"Vscr\":\"𝒱\",\"vscr\":\"𝓋\",\"vsubnE\":\"⫋︀\",\"vsubne\":\"⊊︀\",\"vsupnE\":\"⫌︀\",\"vsupne\":\"⊋︀\",\"Vvdash\":\"⊪\",\"vzigzag\":\"⦚\",\"Wcirc\":\"Ŵ\",\"wcirc\":\"ŵ\",\"wedbar\":\"⩟\",\"wedge\":\"∧\",\"Wedge\":\"⋀\",\"wedgeq\":\"≙\",\"weierp\":\"℘\",\"Wfr\":\"𝔚\",\"wfr\":\"𝔴\",\"Wopf\":\"𝕎\",\"wopf\":\"𝕨\",\"wp\":\"℘\",\"wr\":\"≀\",\"wreath\":\"≀\",\"Wscr\":\"𝒲\",\"wscr\":\"𝓌\",\"xcap\":\"⋂\",\"xcirc\":\"◯\",\"xcup\":\"⋃\",\"xdtri\":\"▽\",\"Xfr\":\"𝔛\",\"xfr\":\"𝔵\",\"xharr\":\"⟷\",\"xhArr\":\"⟺\",\"Xi\":\"Ξ\",\"xi\":\"ξ\",\"xlarr\":\"⟵\",\"xlArr\":\"⟸\",\"xmap\":\"⟼\",\"xnis\":\"⋻\",\"xodot\":\"⨀\",\"Xopf\":\"𝕏\",\"xopf\":\"𝕩\",\"xoplus\":\"⨁\",\"xotime\":\"⨂\",\"xrarr\":\"⟶\",\"xrArr\":\"⟹\",\"Xscr\":\"𝒳\",\"xscr\":\"𝓍\",\"xsqcup\":\"⨆\",\"xuplus\":\"⨄\",\"xutri\":\"△\",\"xvee\":\"⋁\",\"xwedge\":\"⋀\",\"Yacute\":\"Ý\",\"yacute\":\"ý\",\"YAcy\":\"Я\",\"yacy\":\"я\",\"Ycirc\":\"Ŷ\",\"ycirc\":\"ŷ\",\"Ycy\":\"Ы\",\"ycy\":\"ы\",\"yen\":\"¥\",\"Yfr\":\"𝔜\",\"yfr\":\"𝔶\",\"YIcy\":\"Ї\",\"yicy\":\"ї\",\"Yopf\":\"𝕐\",\"yopf\":\"𝕪\",\"Yscr\":\"𝒴\",\"yscr\":\"𝓎\",\"YUcy\":\"Ю\",\"yucy\":\"ю\",\"yuml\":\"ÿ\",\"Yuml\":\"Ÿ\",\"Zacute\":\"Ź\",\"zacute\":\"ź\",\"Zcaron\":\"Ž\",\"zcaron\":\"ž\",\"Zcy\":\"З\",\"zcy\":\"з\",\"Zdot\":\"Ż\",\"zdot\":\"ż\",\"zeetrf\":\"ℨ\",\"ZeroWidthSpace\":\"​\",\"Zeta\":\"Ζ\",\"zeta\":\"ζ\",\"zfr\":\"𝔷\",\"Zfr\":\"ℨ\",\"ZHcy\":\"Ж\",\"zhcy\":\"ж\",\"zigrarr\":\"⇝\",\"zopf\":\"𝕫\",\"Zopf\":\"ℤ\",\"Zscr\":\"𝒵\",\"zscr\":\"𝓏\",\"zwj\":\"‍\",\"zwnj\":\"‌\"}')},function(t){t.exports=JSON.parse('{\"amp\":\"&\",\"apos\":\"\\'\",\"gt\":\">\",\"lt\":\"<\",\"quot\":\"\\\\\"\"}')},function(t,e,r){\"use strict\";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.escape=e.encodeHTML=e.encodeXML=void 0;var i=a(n(r(276)).default),o=s(i);function a(t){return Object.keys(t).sort().reduce((function(e,r){return e[t[r]]=\"&\"+r+\";\",e}),{})}function s(t){for(var e=[],r=[],n=0,i=Object.keys(t);nt._pos){var o=r.substr(t._pos);if(\"x-user-defined\"===t._charset){for(var a=new i(o.length),s=0;st._pos&&(t.push(new i(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){t.push(null)},c.readAsArrayBuffer(r)}t._xhr.readyState===u.DONE&&\"ms-stream\"!==t._mode&&t.push(null)}}).call(this,r(5),r(9),r(6).Buffer)},function(t,e,r){e.SourceMapGenerator=r(299).SourceMapGenerator,e.SourceMapConsumer=r(636).SourceMapConsumer,e.SourceNode=r(639).SourceNode},function(t,e,r){var n=r(300),i=r(83),o=r(301).ArraySet,a=r(635).MappingList;function s(t){t=t||{},this._file=i.getArg(t,\"file\",null),this._sourceRoot=i.getArg(t,\"sourceRoot\",null),this._skipValidation=i.getArg(t,\"skipValidation\",!1),this._sources=new o,this._names=new o,this._mappings=new a,this._sourcesContents=null}s.prototype._version=3,s.fromSourceMap=function(t){var e=t.sourceRoot,r=new s({file:t.file,sourceRoot:e});return t.eachMapping((function(t){var n={generated:{line:t.generatedLine,column:t.generatedColumn}};null!=t.source&&(n.source=t.source,null!=e&&(n.source=i.relative(e,n.source)),n.original={line:t.originalLine,column:t.originalColumn},null!=t.name&&(n.name=t.name)),r.addMapping(n)})),t.sources.forEach((function(n){var o=n;null!==e&&(o=i.relative(e,n)),r._sources.has(o)||r._sources.add(o),null!=(o=t.sourceContentFor(n))&&r.setSourceContent(n,o)})),r},s.prototype.addMapping=function(t){var e=i.getArg(t,\"generated\"),r=i.getArg(t,\"original\",null),n=i.getArg(t,\"source\",null);t=i.getArg(t,\"name\",null),this._skipValidation||this._validateMapping(e,r,n,t),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=t&&(t=String(t),this._names.has(t)||this._names.add(t)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:t})},s.prototype.setSourceContent=function(t,e){null!=this._sourceRoot&&(t=i.relative(this._sourceRoot,t)),null!=e?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(t)]=e):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(t)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},s.prototype.applySourceMap=function(t,e,r){var n=e;if(null==e){if(null==t.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\\'s \"file\" property. Both were omitted.');n=t.file}var a=this._sourceRoot;null!=a&&(n=i.relative(a,n));var s=new o,u=new o;this._mappings.unsortedForEach((function(e){e.source!==n||null==e.originalLine||null!=(o=t.originalPositionFor({line:e.originalLine,column:e.originalColumn})).source&&(e.source=o.source,null!=r&&(e.source=i.join(r,e.source)),null!=a&&(e.source=i.relative(a,e.source)),e.originalLine=o.line,e.originalColumn=o.column,null!=o.name&&(e.name=o.name));var o=e.source;null==o||s.has(o)||s.add(o),null==(e=e.name)||u.has(e)||u.add(e)}),this),this._sources=s,this._names=u,t.sources.forEach((function(e){var n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=i.join(r,e)),null!=a&&(e=i.relative(a,e)),this.setSourceContent(e,n))}),this)},s.prototype._validateMapping=function(t,e,r,n){if(e&&\"number\"!=typeof e.line&&\"number\"!=typeof e.column)throw new Error(\"original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.\");if((!(t&&\"line\"in t&&\"column\"in t&&0>>=5)&&(e|=32),r+=n.encode(e),0>1;return 1==(1&t)?-e:e}(s),r.rest=e}},function(t,e,r){var n=r(83),i=Object.prototype.hasOwnProperty,o=\"undefined\"!=typeof Map;function a(){this._array=[],this._set=o?new Map:Object.create(null)}a.fromArray=function(t,e){for(var r=new a,n=0,i=t.length;nthis._sectionStart&&this._cbs.ontext(this._getSection()),this._state=2,this._sectionStart=this._index):this._decodeEntities&&1===this._special&&\"&\"===t&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=1,this._state=51,this._sectionStart=this._index)},j.prototype._stateBeforeTagName=function(t){\"/\"===t?this._state=5:\"<\"===t?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):\">\"===t||1!==this._special||u(t)?this._state=1:\"!\"===t?(this._state=15,this._sectionStart=this._index+1):\"?\"===t?(this._state=17,this._sectionStart=this._index+1):(this._state=this._xmlMode||\"s\"!==t&&\"S\"!==t?3:31,this._sectionStart=this._index)},j.prototype._stateInTagName=function(t){\"/\"!==t&&\">\"!==t&&!u(t)||(this._emitToken(\"onopentagname\"),this._state=8,this._index--)},j.prototype._stateBeforeClosingTagName=function(t){u(t)||(\">\"===t?this._state=1:1!==this._special?\"s\"===t||\"S\"===t?this._state=32:(this._state=1,this._index--):(this._state=6,this._sectionStart=this._index))},j.prototype._stateInClosingTagName=function(t){\">\"!==t&&!u(t)||(this._emitToken(\"onclosetag\"),this._state=7,this._index--)},j.prototype._stateAfterClosingTagName=function(t){\">\"===t&&(this._state=1,this._sectionStart=this._index+1)},j.prototype._stateBeforeAttributeName=function(t){\">\"===t?(this._cbs.onopentagend(),this._state=1,this._sectionStart=this._index+1):\"/\"===t?this._state=4:u(t)||(this._state=9,this._sectionStart=this._index)},j.prototype._stateInSelfClosingTag=function(t){\">\"===t?(this._cbs.onselfclosingtag(),this._state=1,this._sectionStart=this._index+1):u(t)||(this._state=8,this._index--)},j.prototype._stateInAttributeName=function(t){\"=\"!==t&&\"/\"!==t&&\">\"!==t&&!u(t)||(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=10,this._index--)},j.prototype._stateAfterAttributeName=function(t){\"=\"===t?this._state=11:\"/\"===t||\">\"===t?(this._cbs.onattribend(),this._state=8,this._index--):u(t)||(this._cbs.onattribend(),this._state=9,this._sectionStart=this._index)},j.prototype._stateBeforeAttributeValue=function(t){'\"'===t?(this._state=12,this._sectionStart=this._index+1):\"'\"===t?(this._state=13,this._sectionStart=this._index+1):u(t)||(this._state=14,this._sectionStart=this._index,this._index--)},j.prototype._stateInAttributeValueDoubleQuotes=function(t){'\"'===t?(this._emitToken(\"onattribdata\"),this._cbs.onattribend(),this._state=8):this._decodeEntities&&\"&\"===t&&(this._emitToken(\"onattribdata\"),this._baseState=this._state,this._state=51,this._sectionStart=this._index)},j.prototype._stateInAttributeValueSingleQuotes=function(t){\"'\"===t?(this._emitToken(\"onattribdata\"),this._cbs.onattribend(),this._state=8):this._decodeEntities&&\"&\"===t&&(this._emitToken(\"onattribdata\"),this._baseState=this._state,this._state=51,this._sectionStart=this._index)},j.prototype._stateInAttributeValueNoQuotes=function(t){u(t)||\">\"===t?(this._emitToken(\"onattribdata\"),this._cbs.onattribend(),this._state=8,this._index--):this._decodeEntities&&\"&\"===t&&(this._emitToken(\"onattribdata\"),this._baseState=this._state,this._state=51,this._sectionStart=this._index)},j.prototype._stateBeforeDeclaration=function(t){this._state=\"[\"===t?22:\"-\"===t?18:16},j.prototype._stateInDeclaration=function(t){\">\"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=1,this._sectionStart=this._index+1)},j.prototype._stateInProcessingInstruction=function(t){\">\"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=1,this._sectionStart=this._index+1)},j.prototype._stateBeforeComment=function(t){\"-\"===t?(this._state=19,this._sectionStart=this._index+1):this._state=16},j.prototype._stateInComment=function(t){\"-\"===t&&(this._state=20)},j.prototype._stateAfterComment1=function(t){this._state=\"-\"===t?21:19},j.prototype._stateAfterComment2=function(t){\">\"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=1,this._sectionStart=this._index+1):\"-\"!==t&&(this._state=19)},j.prototype._stateBeforeCdata6=function(t){\"[\"===t?(this._state=28,this._sectionStart=this._index+1):(this._state=16,this._index--)},j.prototype._stateInCdata=function(t){\"]\"===t&&(this._state=29)},j.prototype._stateAfterCdata1=function(t){this._state=\"]\"===t?30:28},j.prototype._stateAfterCdata2=function(t){\">\"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=1,this._sectionStart=this._index+1):\"]\"!==t&&(this._state=28)},j.prototype._stateBeforeSpecial=function(t){\"c\"===t||\"C\"===t?this._state=33:\"t\"===t||\"T\"===t?this._state=43:(this._state=3,this._index--)},j.prototype._stateBeforeSpecialEnd=function(t){2!==this._special||\"c\"!==t&&\"C\"!==t?3!==this._special||\"t\"!==t&&\"T\"!==t?this._state=1:this._state=47:this._state=38},j.prototype._stateBeforeScript5=function(t){\"/\"!==t&&\">\"!==t&&!u(t)||(this._special=2),this._state=3,this._index--},j.prototype._stateAfterScript5=function(t){\">\"===t||u(t)?(this._special=1,this._state=6,this._sectionStart=this._index-6,this._index--):this._state=1},j.prototype._stateBeforeStyle4=function(t){\"/\"!==t&&\">\"!==t&&!u(t)||(this._special=3),this._state=3,this._index--},j.prototype._stateAfterStyle4=function(t){\">\"===t||u(t)?(this._special=1,this._state=6,this._sectionStart=this._index-5,this._index--):this._state=1},j.prototype._parseNamedEntityStrict=function(){var t,e;this._sectionStart+1=this._blockSize;){for(var o=this._blockOffset;oe.highWaterMark&&(e.highWaterMark=function(t){return 1073741824<=t?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function O(t){var e=t._readableState;p(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(p(\"emitReadable\",e.flowing),e.emittedReadable=!0,n.nextTick(k,t))}function k(t){var e=t._readableState;p(\"emitReadable_\",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,L(t)}function M(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(C,t,e))}function C(t,e){for(;!e.reading&&!e.ended&&(e.length=e.length?(r=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function D(t){var e=t._readableState;p(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(I,e,t))}function I(t,e){p(\"endReadableNT\",t.endEmitted,t.length),t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"),!t.autoDestroy||(!(t=e._writableState)||t.autoDestroy&&t.finished)&&e.destroy())}function B(t,e){for(var r=0,n=t.length;r=e.highWaterMark:0>>17|t<<15)^(t>>>19|t<<13)^t>>>10}(e[f-2])+e[f-7]+function(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}(e[f-15])+e[f-16]|0;for(var h=0;h<64;++h){var p=l+function(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}(s)+function(t,e,r){return r^t&(e^r)}(s,u,c)+a[h]+e[h]|0,d=function(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}(r)+function(t,e,r){return t&e|r&(t|e)}(r,n,i)|0;l=c,c=u,u=s,s=o+p|0,o=i,i=n,n=r,r=p+d|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0,this._f=u+this._f|0,this._g=c+this._g|0,this._h=l+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,r){var n=r(1),i=r(62),o=r(2).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(t,e,r){return r^t&(e^r)}function l(t,e,r){return t&e|r&(t|e)}function f(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function h(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function p(t,e){return t>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,d=0|this._gh,m=0|this._hh,g=0|this._al,b=0|this._bl,_=0|this._cl,y=0|this._dl,v=0|this._el,w=0|this._fl,E=0|this._gl,T=0|this._hl,A=0;A<32;A+=2)e[A]=t.readInt32BE(4*A),e[A+1]=t.readInt32BE(4*A+4);for(;A<160;A+=2){var x=function(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}(j=e[A-30],R=e[A-30+1]),S=function(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}(R,j),O=function(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}(j=e[A-4],R=e[A-4+1]),k=function(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}(R,j),M=e[A-14],C=e[A-14+1],R=e[A-32],j=e[A-32+1],N=S+C|0,L=(L=(L=x+M+p(N,S)|0)+O+p(N=N+k|0,k)|0)+R+p(N=N+j|0,j)|0;e[A]=L,e[A+1]=N}for(var P=0;P<160;P+=2){L=e[P],N=e[P+1];var D=l(r,n,i),I=l(g,b,_),B=f(r,g),q=f(g,r),U=h(s,v),H=h(v,s),F=a[P+1],z=c(s,u,d),V=c(v,w,E);U=(U=(U=(U=m+U+p(H=T+H|0,T)|0)+z+p(H=H+V|0,V)|0)+a[P]+p(H=H+F|0,F)|0)+L+p(H=H+N|0,N)|0,q=B+D+p(I=q+I|0,q)|0,m=d,T=E,d=u,E=w,u=s,w=v,s=o+U+p(v=y+H|0,y)|0,o=i,y=_,i=n,_=b,n=r,b=g,r=U+q+p(g=H+I|0,H)|0}this._al=this._al+g|0,this._bl=this._bl+b|0,this._cl=this._cl+_|0,this._dl=this._dl+y|0,this._el=this._el+v|0,this._fl=this._fl+w|0,this._gl=this._gl+E|0,this._hl=this._hl+T|0,this._ah=this._ah+r+p(this._al,g)|0,this._bh=this._bh+n+p(this._bl,b)|0,this._ch=this._ch+i+p(this._cl,_)|0,this._dh=this._dh+o+p(this._dl,y)|0,this._eh=this._eh+s+p(this._el,v)|0,this._fh=this._fh+u+p(this._fl,w)|0,this._gh=this._gh+d+p(this._gl,E)|0,this._hh=this._hh+m+p(this._hl,T)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,r){\"use strict\";var n=r(1),i=r(760),o=r(35),a=r(2).Buffer,s=r(329),u=r(185),c=r(186),l=a.alloc(128);function f(t,e){o.call(this,\"digest\"),\"string\"==typeof e&&(e=a.from(e));var r=\"sha512\"===t||\"sha384\"===t?128:64;this._alg=t,(this._key=e).length>r?e=(\"rmd160\"===t?new u:c(t)).update(e).digest():e.lengthu?e=s(e):e.length>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,n){for(var i=0,o=0,a=6;0<=a;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1}for(a=6;0<=a;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},e.rip=function(t,e,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;0<=s;s-=8)i<<=1,i|=e>>>s+a&1,i<<=1,i|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;0<=s;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.pc1=function(t,e,r,n){for(var i=0,o=0,a=7;5<=a;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.r28shl=function(t,e){return t<>>28-e};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,n,i){for(var o=0,a=0,s=r.length>>>1,u=0;u>>r[u]&1;for(u=s;u>>r[u]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},e.expand=function(t,e,r){for(var n=0,i=0,o=(n=(1&t)<<5|t>>>27,23);15<=o;o-=4)n<<=6,n|=t>>>o&63;for(o=11;3<=o;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var r=0,i=0;i<4;i++)r<<=4,r|=n[64*i+(t>>>18-6*i&63)];for(i=0;i<4;i++)r<<=4,r|=n[256+64*i+(e>>>18-6*i&63)];return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r>>i[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var n=t.toString(2);n.length>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,t.keys,a)}},u.prototype._update=function(t,e,r,n){var i=this._desState,a=o.readUInt32BE(t,e);e=o.readUInt32BE(t,e+4),o.ip(a,e,i.tmp,0),a=i.tmp[0],e=i.tmp[1],\"encrypt\"===this.type?this._encrypt(i,a,e,i.tmp,0):this._decrypt(i,a,e,i.tmp,0),a=i.tmp[0],e=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,e,n+4)},u.prototype._pad=function(t,e){for(var r=t.length-e,n=e;n>>0,a=l}o.rip(s,a,n,i)},u.prototype._decrypt=function(t,e,r,n,i){for(var a=r,s=e,u=t.keys.length-2;0<=u;u-=2){var c=t.keys[u],l=t.keys[u+1];o.expand(a,t.tmp,0),c^=t.tmp[0],l^=t.tmp[1],c=o.substitute(c,l),l=a,a=(s^o.permute(c))>>>0,s=l}o.rip(a,s,n,i)}},function(t,e,r){var n=r(89),i=r(2).Buffer,o=r(339);e.encrypt=function(t,e){var r=Math.ceil(e.length/16),a=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*r)]);for(var s=0;st;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),e.cmp(u)){if(!e.cmp(c))for(;r.mod(l).cmp(f);)r.iadd(p)}else for(;r.mod(o).cmp(h);)r.iadd(p);if(m(d=r.shrn(1))&&m(r)&&g(d)&&g(r)&&a.test(d)&&a.test(r))return r}}},function(t,e,r){var n=r(11),i=r(190);function o(t){this.rand=t||new i.Rand}(t.exports=o).create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(0<=i.cmp(t));return i},o.prototype._randrange=function(t,e){return e=e.sub(t),t.add(this._randbelow(e))},o.prototype.test=function(t,e,r){var i=t.bitLength(),o=n.mont(t),a=new n(1).toRed(o);e=e||Math.max(1,i/48|0);for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var c=t.shrn(u),l=s.toRed(o);0e.highWaterMark&&(e.highWaterMark=function(t){return 1073741824<=t?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function O(t){var e=t._readableState;p(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(p(\"emitReadable\",e.flowing),e.emittedReadable=!0,n.nextTick(k,t))}function k(t){var e=t._readableState;p(\"emitReadable_\",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,L(t)}function M(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(C,t,e))}function C(t,e){for(;!e.reading&&!e.ended&&(e.length=e.length?(r=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function D(t){var e=t._readableState;p(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(I,e,t))}function I(t,e){p(\"endReadableNT\",t.endEmitted,t.length),t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"),!t.autoDestroy||(!(t=e._writableState)||t.autoDestroy&&t.finished)&&e.destroy())}function B(t,e){for(var r=0,n=t.length;r=e.highWaterMark:0>8,o=255&o;i?r.push(i,o):r.push(o)}return r},e.zero2=r,e.toHex=n,e.encode=function(t,e){return\"hex\"===e?n(t):t}},function(t,e,r){\"use strict\";e.base=r(123),e.short=r(796),e.mont=r(797),e.edwards=r(798)},function(t,e,r){\"use strict\";var n=r(22).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?e^r^n:2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=function(t,e,r){return t^e^r},e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},function(t,e,r){\"use strict\";var n=r(22),i=r(90),o=r(353),a=r(16),s=n.sum32,u=n.sum32_4,c=n.sum32_5,l=o.ch32,f=o.maj32,h=o.s0_256,p=o.s1_256,d=o.g0_256,m=o.g1_256,g=i.BlockHash,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function _(){if(!(this instanceof _))return new _;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}n.inherits(_,g),(t.exports=_).blockSize=512,_.outSize=256,_.hmacStrength=192,_.padLength=64,_.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n>>26-s&67108863,26<=(s+=24)&&(s-=26,n++);else if(\"le\"===r)for(n=a=0;a>>26-s&67108863,26<=(s+=24)&&(s-=26,n++);return this._strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r,n=0;n>>26-i&4194303,26<=(i+=24)&&(i-=26,o++);n+6!==e&&(r=u(t,e,n+6),this.words[o]|=r<>>26-i&4194303),this._strip()},a.prototype._parseBase=function(t,e,r){this.words=[0];for(var n=0,i=this.length=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l\"}var h=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0,i=(n=(r.length=n)-1|0,67108863&(f=(0|t.words[0])*(0|e.words[0]))),o=f/67108864|0;r.words[0]=i;for(var a=1;a>>26,u=67108863&o,c=Math.min(a,e.length-1),l=Math.max(0,a-t.length+1);l<=c;l++){var f,h=a-l|0;s+=(f=(0|t.words[h])*(0|e.words[l])+u)/67108864|0,u=67108863&f}r.words[a]=0|u,o=0|s}return 0!==o?r.words[a]=0|o:r.length--,r._strip()}a.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||\"hex\"===t){u=\"\";for(var r=0,n=0,o=0;o>>24-r&16777215)||o!==this.length-1?h[6-s.length]+s+u:s+u;26<=(r+=2)&&(r-=26,o--)}for(0!==n&&(u=n.toString(16)+u);u.length%e!=0;)u=\"0\"+u;return 0!==this.negative&&(u=\"-\"+u),u}if(t===(0|t)&&2<=t&&t<=36){var c=p[t],l=d[t];for(u=\"\",(f=this.clone()).negative=0;!f.isZero();){var f,m=f.modrn(l).toString(t);u=(f=f.idivn(l)).isZero()?m+u:h[c-m.length]+m+u}for(this.isZero()&&(u=\"0\"+u);u.length%e!=0;)u=\"0\"+u;return 0!==this.negative&&(u=\"-\"+u),u}i(!1,\"Base should be between 2 and 36\")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:2>8&255),e>16&255),6===i?(e>24&255),i=r=0):(r=o>>>24,i+=2)}if(e>8&255),0<=e&&(t[e--]=o>>16&255),6===i?(0<=e&&(t[e--]=o>>24&255),i=r=0):(r=o>>>24,i+=2)}if(0<=e)for(t[e--]=r;0<=e;)t[e--]=0},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t;return t=0,4096<=e&&(t+=13,e>>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t;return t=0,0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},a.prototype.bitLength=function(){var t=this.words[this.length-1];return t=this._countBits(t),26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){for(var e=this.length>t.length?t:this,r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){for(var e,r=this.length>t.length?(e=this,t):(e=t,this),n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i(\"number\"==typeof t&&0<=t);var e=0|Math.ceil(t/26);t%=26,this._expand(e),0>26-t),this._strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i(\"number\"==typeof t&&0<=t);var r=t/26|0;return t%=26,this._expand(1+r),this.words[r]=e?this.words[r]|1<t.length?(r=this,t):(r=t,this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;n=0>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,c=8191&(G=0|n[1]),l=G>>>13,f=8191&(K=0|n[2]),h=K>>>13,p=0|n[3],d=8191&p,m=p>>>13,g=8191&(W=0|n[4]),b=W>>>13,_=8191&(Y=0|n[5]),y=Y>>>13,v=0|n[6],w=8191&v,E=v>>>13,T=8191&(X=0|n[7]),A=X>>>13,x=8191&($=0|n[8]),S=$>>>13,O=8191&(Q=0|n[9]),k=Q>>>13,M=8191&(Z=0|i[0]),C=Z>>>13,R=0|i[1],j=8191&R,N=R>>>13,L=0|i[2],P=8191&L,D=L>>>13,I=8191&(J=0|i[3]),B=J>>>13,q=0|i[4],U=8191&q,H=q>>>13,F=0|i[5],z=8191&F,V=F>>>13,G=8191&(a=0|i[6]),K=a>>>13,W=8191&(p=0|i[7]),Y=p>>>13,X=8191&(v=0|i[8]),$=v>>>13,Q=8191&(n=0|i[9]),Z=n>>>13;r.negative=t.negative^e.negative,r.length=19;var J=(0+Math.imul(s,M)|0)+((8191&(L=Math.imul(s,C)+Math.imul(u,M)|0))<<13)|0,tt=(Math.imul(u,C)+(L>>>13)|0)+(J>>>26)|0;return J&=67108863,R=Math.imul(c,M),L=Math.imul(c,C)+Math.imul(l,M)|0,q=Math.imul(l,C),F=(tt+(R+Math.imul(s,j)|0)|0)+((8191&(L=(L+Math.imul(s,N)|0)+Math.imul(u,j)|0))<<13)|0,tt=((q+Math.imul(u,N)|0)+(L>>>13)|0)+(F>>>26)|0,F&=67108863,R=Math.imul(f,M),L=Math.imul(f,C)+Math.imul(h,M)|0,q=Math.imul(h,C),R=R+Math.imul(c,j)|0,L=(L+Math.imul(c,N)|0)+Math.imul(l,j)|0,q=q+Math.imul(l,N)|0,a=(tt+(R+Math.imul(s,P)|0)|0)+((8191&(L=(L+Math.imul(s,D)|0)+Math.imul(u,P)|0))<<13)|0,tt=((q+Math.imul(u,D)|0)+(L>>>13)|0)+(a>>>26)|0,a&=67108863,R=Math.imul(d,M),L=Math.imul(d,C)+Math.imul(m,M)|0,q=Math.imul(m,C),R=R+Math.imul(f,j)|0,L=(L+Math.imul(f,N)|0)+Math.imul(h,j)|0,q=q+Math.imul(h,N)|0,R=R+Math.imul(c,P)|0,L=(L+Math.imul(c,D)|0)+Math.imul(l,P)|0,q=q+Math.imul(l,D)|0,p=(tt+(R+Math.imul(s,I)|0)|0)+((8191&(L=(L+Math.imul(s,B)|0)+Math.imul(u,I)|0))<<13)|0,tt=((q+Math.imul(u,B)|0)+(L>>>13)|0)+(p>>>26)|0,p&=67108863,R=Math.imul(g,M),L=Math.imul(g,C)+Math.imul(b,M)|0,q=Math.imul(b,C),R=R+Math.imul(d,j)|0,L=(L+Math.imul(d,N)|0)+Math.imul(m,j)|0,q=q+Math.imul(m,N)|0,R=R+Math.imul(f,P)|0,L=(L+Math.imul(f,D)|0)+Math.imul(h,P)|0,q=q+Math.imul(h,D)|0,R=R+Math.imul(c,I)|0,L=(L+Math.imul(c,B)|0)+Math.imul(l,I)|0,q=q+Math.imul(l,B)|0,v=(tt+(R+Math.imul(s,U)|0)|0)+((8191&(L=(L+Math.imul(s,H)|0)+Math.imul(u,U)|0))<<13)|0,tt=((q+Math.imul(u,H)|0)+(L>>>13)|0)+(v>>>26)|0,v&=67108863,R=Math.imul(_,M),L=Math.imul(_,C)+Math.imul(y,M)|0,q=Math.imul(y,C),R=R+Math.imul(g,j)|0,L=(L+Math.imul(g,N)|0)+Math.imul(b,j)|0,q=q+Math.imul(b,N)|0,R=R+Math.imul(d,P)|0,L=(L+Math.imul(d,D)|0)+Math.imul(m,P)|0,q=q+Math.imul(m,D)|0,R=R+Math.imul(f,I)|0,L=(L+Math.imul(f,B)|0)+Math.imul(h,I)|0,q=q+Math.imul(h,B)|0,R=R+Math.imul(c,U)|0,L=(L+Math.imul(c,H)|0)+Math.imul(l,U)|0,q=q+Math.imul(l,H)|0,i=(tt+(R+Math.imul(s,z)|0)|0)+((8191&(L=(L+Math.imul(s,V)|0)+Math.imul(u,z)|0))<<13)|0,tt=((q+Math.imul(u,V)|0)+(L>>>13)|0)+(i>>>26)|0,i&=67108863,R=Math.imul(w,M),L=Math.imul(w,C)+Math.imul(E,M)|0,q=Math.imul(E,C),R=R+Math.imul(_,j)|0,L=(L+Math.imul(_,N)|0)+Math.imul(y,j)|0,q=q+Math.imul(y,N)|0,R=R+Math.imul(g,P)|0,L=(L+Math.imul(g,D)|0)+Math.imul(b,P)|0,q=q+Math.imul(b,D)|0,R=R+Math.imul(d,I)|0,L=(L+Math.imul(d,B)|0)+Math.imul(m,I)|0,q=q+Math.imul(m,B)|0,R=R+Math.imul(f,U)|0,L=(L+Math.imul(f,H)|0)+Math.imul(h,U)|0,q=q+Math.imul(h,H)|0,R=R+Math.imul(c,z)|0,L=(L+Math.imul(c,V)|0)+Math.imul(l,z)|0,q=q+Math.imul(l,V)|0,n=(tt+(R+Math.imul(s,G)|0)|0)+((8191&(L=(L+Math.imul(s,K)|0)+Math.imul(u,G)|0))<<13)|0,tt=((q+Math.imul(u,K)|0)+(L>>>13)|0)+(n>>>26)|0,n&=67108863,R=Math.imul(T,M),L=Math.imul(T,C)+Math.imul(A,M)|0,q=Math.imul(A,C),R=R+Math.imul(w,j)|0,L=(L+Math.imul(w,N)|0)+Math.imul(E,j)|0,q=q+Math.imul(E,N)|0,R=R+Math.imul(_,P)|0,L=(L+Math.imul(_,D)|0)+Math.imul(y,P)|0,q=q+Math.imul(y,D)|0,R=R+Math.imul(g,I)|0,L=(L+Math.imul(g,B)|0)+Math.imul(b,I)|0,q=q+Math.imul(b,B)|0,R=R+Math.imul(d,U)|0,L=(L+Math.imul(d,H)|0)+Math.imul(m,U)|0,q=q+Math.imul(m,H)|0,R=R+Math.imul(f,z)|0,L=(L+Math.imul(f,V)|0)+Math.imul(h,z)|0,q=q+Math.imul(h,V)|0,R=R+Math.imul(c,G)|0,L=(L+Math.imul(c,K)|0)+Math.imul(l,G)|0,q=q+Math.imul(l,K)|0,t=(tt+(R+Math.imul(s,W)|0)|0)+((8191&(L=(L+Math.imul(s,Y)|0)+Math.imul(u,W)|0))<<13)|0,tt=((q+Math.imul(u,Y)|0)+(L>>>13)|0)+(t>>>26)|0,t&=67108863,R=Math.imul(x,M),L=Math.imul(x,C)+Math.imul(S,M)|0,q=Math.imul(S,C),R=R+Math.imul(T,j)|0,L=(L+Math.imul(T,N)|0)+Math.imul(A,j)|0,q=q+Math.imul(A,N)|0,R=R+Math.imul(w,P)|0,L=(L+Math.imul(w,D)|0)+Math.imul(E,P)|0,q=q+Math.imul(E,D)|0,R=R+Math.imul(_,I)|0,L=(L+Math.imul(_,B)|0)+Math.imul(y,I)|0,q=q+Math.imul(y,B)|0,R=R+Math.imul(g,U)|0,L=(L+Math.imul(g,H)|0)+Math.imul(b,U)|0,q=q+Math.imul(b,H)|0,R=R+Math.imul(d,z)|0,L=(L+Math.imul(d,V)|0)+Math.imul(m,z)|0,q=q+Math.imul(m,V)|0,R=R+Math.imul(f,G)|0,L=(L+Math.imul(f,K)|0)+Math.imul(h,G)|0,q=q+Math.imul(h,K)|0,R=R+Math.imul(c,W)|0,L=(L+Math.imul(c,Y)|0)+Math.imul(l,W)|0,q=q+Math.imul(l,Y)|0,e=(tt+(R+Math.imul(s,X)|0)|0)+((8191&(L=(L+Math.imul(s,$)|0)+Math.imul(u,X)|0))<<13)|0,tt=((q+Math.imul(u,$)|0)+(L>>>13)|0)+(e>>>26)|0,e&=67108863,R=Math.imul(O,M),L=Math.imul(O,C)+Math.imul(k,M)|0,q=Math.imul(k,C),R=R+Math.imul(x,j)|0,L=(L+Math.imul(x,N)|0)+Math.imul(S,j)|0,q=q+Math.imul(S,N)|0,R=R+Math.imul(T,P)|0,L=(L+Math.imul(T,D)|0)+Math.imul(A,P)|0,q=q+Math.imul(A,D)|0,R=R+Math.imul(w,I)|0,L=(L+Math.imul(w,B)|0)+Math.imul(E,I)|0,q=q+Math.imul(E,B)|0,R=R+Math.imul(_,U)|0,L=(L+Math.imul(_,H)|0)+Math.imul(y,U)|0,q=q+Math.imul(y,H)|0,R=R+Math.imul(g,z)|0,L=(L+Math.imul(g,V)|0)+Math.imul(b,z)|0,q=q+Math.imul(b,V)|0,R=R+Math.imul(d,G)|0,L=(L+Math.imul(d,K)|0)+Math.imul(m,G)|0,q=q+Math.imul(m,K)|0,R=R+Math.imul(f,W)|0,L=(L+Math.imul(f,Y)|0)+Math.imul(h,W)|0,q=q+Math.imul(h,Y)|0,R=R+Math.imul(c,X)|0,L=(L+Math.imul(c,$)|0)+Math.imul(l,X)|0,q=q+Math.imul(l,$)|0,s=(tt+(R+Math.imul(s,Q)|0)|0)+((8191&(L=(L+Math.imul(s,Z)|0)+Math.imul(u,Q)|0))<<13)|0,tt=((q+Math.imul(u,Z)|0)+(L>>>13)|0)+(s>>>26)|0,s&=67108863,R=Math.imul(O,j),L=Math.imul(O,N)+Math.imul(k,j)|0,q=Math.imul(k,N),R=R+Math.imul(x,P)|0,L=(L+Math.imul(x,D)|0)+Math.imul(S,P)|0,q=q+Math.imul(S,D)|0,R=R+Math.imul(T,I)|0,L=(L+Math.imul(T,B)|0)+Math.imul(A,I)|0,q=q+Math.imul(A,B)|0,R=R+Math.imul(w,U)|0,L=(L+Math.imul(w,H)|0)+Math.imul(E,U)|0,q=q+Math.imul(E,H)|0,R=R+Math.imul(_,z)|0,L=(L+Math.imul(_,V)|0)+Math.imul(y,z)|0,q=q+Math.imul(y,V)|0,R=R+Math.imul(g,G)|0,L=(L+Math.imul(g,K)|0)+Math.imul(b,G)|0,q=q+Math.imul(b,K)|0,R=R+Math.imul(d,W)|0,L=(L+Math.imul(d,Y)|0)+Math.imul(m,W)|0,q=q+Math.imul(m,Y)|0,R=R+Math.imul(f,X)|0,L=(L+Math.imul(f,$)|0)+Math.imul(h,X)|0,q=q+Math.imul(h,$)|0,c=(tt+(R+Math.imul(c,Q)|0)|0)+((8191&(L=(L+Math.imul(c,Z)|0)+Math.imul(l,Q)|0))<<13)|0,tt=((q+Math.imul(l,Z)|0)+(L>>>13)|0)+(c>>>26)|0,c&=67108863,R=Math.imul(O,P),L=Math.imul(O,D)+Math.imul(k,P)|0,q=Math.imul(k,D),R=R+Math.imul(x,I)|0,L=(L+Math.imul(x,B)|0)+Math.imul(S,I)|0,q=q+Math.imul(S,B)|0,R=R+Math.imul(T,U)|0,L=(L+Math.imul(T,H)|0)+Math.imul(A,U)|0,q=q+Math.imul(A,H)|0,R=R+Math.imul(w,z)|0,L=(L+Math.imul(w,V)|0)+Math.imul(E,z)|0,q=q+Math.imul(E,V)|0,R=R+Math.imul(_,G)|0,L=(L+Math.imul(_,K)|0)+Math.imul(y,G)|0,q=q+Math.imul(y,K)|0,R=R+Math.imul(g,W)|0,L=(L+Math.imul(g,Y)|0)+Math.imul(b,W)|0,q=q+Math.imul(b,Y)|0,R=R+Math.imul(d,X)|0,L=(L+Math.imul(d,$)|0)+Math.imul(m,X)|0,q=q+Math.imul(m,$)|0,f=(tt+(R+Math.imul(f,Q)|0)|0)+((8191&(L=(L+Math.imul(f,Z)|0)+Math.imul(h,Q)|0))<<13)|0,tt=((q+Math.imul(h,Z)|0)+(L>>>13)|0)+(f>>>26)|0,f&=67108863,R=Math.imul(O,I),L=Math.imul(O,B)+Math.imul(k,I)|0,q=Math.imul(k,B),R=R+Math.imul(x,U)|0,L=(L+Math.imul(x,H)|0)+Math.imul(S,U)|0,q=q+Math.imul(S,H)|0,R=R+Math.imul(T,z)|0,L=(L+Math.imul(T,V)|0)+Math.imul(A,z)|0,q=q+Math.imul(A,V)|0,R=R+Math.imul(w,G)|0,L=(L+Math.imul(w,K)|0)+Math.imul(E,G)|0,q=q+Math.imul(E,K)|0,R=R+Math.imul(_,W)|0,L=(L+Math.imul(_,Y)|0)+Math.imul(y,W)|0,q=q+Math.imul(y,Y)|0,R=R+Math.imul(g,X)|0,L=(L+Math.imul(g,$)|0)+Math.imul(b,X)|0,q=q+Math.imul(b,$)|0,d=(tt+(R+Math.imul(d,Q)|0)|0)+((8191&(L=(L+Math.imul(d,Z)|0)+Math.imul(m,Q)|0))<<13)|0,tt=((q+Math.imul(m,Z)|0)+(L>>>13)|0)+(d>>>26)|0,d&=67108863,R=Math.imul(O,U),L=Math.imul(O,H)+Math.imul(k,U)|0,q=Math.imul(k,H),R=R+Math.imul(x,z)|0,L=(L+Math.imul(x,V)|0)+Math.imul(S,z)|0,q=q+Math.imul(S,V)|0,R=R+Math.imul(T,G)|0,L=(L+Math.imul(T,K)|0)+Math.imul(A,G)|0,q=q+Math.imul(A,K)|0,R=R+Math.imul(w,W)|0,L=(L+Math.imul(w,Y)|0)+Math.imul(E,W)|0,q=q+Math.imul(E,Y)|0,R=R+Math.imul(_,X)|0,L=(L+Math.imul(_,$)|0)+Math.imul(y,X)|0,q=q+Math.imul(y,$)|0,g=(tt+(R+Math.imul(g,Q)|0)|0)+((8191&(L=(L+Math.imul(g,Z)|0)+Math.imul(b,Q)|0))<<13)|0,tt=((q+Math.imul(b,Z)|0)+(L>>>13)|0)+(g>>>26)|0,g&=67108863,R=Math.imul(O,z),L=Math.imul(O,V)+Math.imul(k,z)|0,q=Math.imul(k,V),R=R+Math.imul(x,G)|0,L=(L+Math.imul(x,K)|0)+Math.imul(S,G)|0,q=q+Math.imul(S,K)|0,R=R+Math.imul(T,W)|0,L=(L+Math.imul(T,Y)|0)+Math.imul(A,W)|0,q=q+Math.imul(A,Y)|0,R=R+Math.imul(w,X)|0,L=(L+Math.imul(w,$)|0)+Math.imul(E,X)|0,q=q+Math.imul(E,$)|0,_=(tt+(R+Math.imul(_,Q)|0)|0)+((8191&(L=(L+Math.imul(_,Z)|0)+Math.imul(y,Q)|0))<<13)|0,tt=((q+Math.imul(y,Z)|0)+(L>>>13)|0)+(_>>>26)|0,_&=67108863,R=Math.imul(O,G),L=Math.imul(O,K)+Math.imul(k,G)|0,q=Math.imul(k,K),R=R+Math.imul(x,W)|0,L=(L+Math.imul(x,Y)|0)+Math.imul(S,W)|0,q=q+Math.imul(S,Y)|0,R=R+Math.imul(T,X)|0,L=(L+Math.imul(T,$)|0)+Math.imul(A,X)|0,q=q+Math.imul(A,$)|0,w=(tt+(R+Math.imul(w,Q)|0)|0)+((8191&(L=(L+Math.imul(w,Z)|0)+Math.imul(E,Q)|0))<<13)|0,tt=((q+Math.imul(E,Z)|0)+(L>>>13)|0)+(w>>>26)|0,w&=67108863,R=Math.imul(O,W),L=Math.imul(O,Y)+Math.imul(k,W)|0,q=Math.imul(k,Y),R=R+Math.imul(x,X)|0,L=(L+Math.imul(x,$)|0)+Math.imul(S,X)|0,q=q+Math.imul(S,$)|0,T=(tt+(R+Math.imul(T,Q)|0)|0)+((8191&(L=(L+Math.imul(T,Z)|0)+Math.imul(A,Q)|0))<<13)|0,tt=((q+Math.imul(A,Z)|0)+(L>>>13)|0)+(T>>>26)|0,T&=67108863,R=Math.imul(O,X),L=Math.imul(O,$)+Math.imul(k,X)|0,q=Math.imul(k,$),x=(tt+(R+Math.imul(x,Q)|0)|0)+((8191&(L=(L+Math.imul(x,Z)|0)+Math.imul(S,Q)|0))<<13)|0,tt=((q+Math.imul(S,Z)|0)+(L>>>13)|0)+(x>>>26)|0,x&=67108863,Q=(tt+Math.imul(O,Q)|0)+((8191&(L=Math.imul(O,Z)+Math.imul(k,Q)|0))<<13)|0,tt=(Math.imul(k,Z)+(L>>>13)|0)+(Q>>>26)|0,Q&=67108863,o[0]=J,o[1]=F,o[2]=a,o[3]=p,o[4]=v,o[5]=i,o[6]=n,o[7]=t,o[8]=e,o[9]=s,o[10]=c,o[11]=f,o[12]=d,o[13]=g,o[14]=_,o[15]=w,o[16]=T,o[17]=x,o[18]=Q,0!=tt&&(o[19]=tt,r.length++),r};function b(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function _(t,e,r){return b(t,e,r)}Math.imul||(g=m),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return(10===this.length&&10===t.length?g:r<63?m:r<1024?b:_)(this,t,e)},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),_(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){var e=t<0;e&&(t=-t),i(\"number\"==typeof t),i(t<67108864);for(var r=0,n=0;n>=26,r+=o/67108864|0,r+=a>>>26,this.words[n]=67108863&a}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n>>26-e<<26-e;if(0!=e){for(var o=0,a=0;a>>26-e}o&&(this.words[a]=o,this.length++)}if(0!=r){for(a=this.length-1;0<=a;a--)this.words[a+r]=this.words[a];for(a=0;a>>o<a)for(this.length-=a,c=0;c>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i(\"number\"==typeof t&&0<=t),t=(t-(e=t%26))/26;var e=1<>>e<>26)-(u/67108864|0),this.words[s+r]=67108863&n}for(;s>26,this.words[s+r]=67108863&n;if(0===a)return this._strip();for(i(-1===a),s=a=0;s>26,this.words[s]=67108863&n;return this.negative=1,this._strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,u=n.length-i.length;if(\"mod\"!==e){(s=new a(null)).length=1+u,s.words=new Array(s.length);for(var c=0;cthis.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?\"div\"===e?{div:this.divn(t.words[0]),mod:null}:\"mod\"===e?{div:null,mod:new a(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modrn(t.words[0]))}:this._wordDiv(t,e);var n,o,s},a.prototype.div=function(t){return this.divmod(t,\"div\",!1).div},a.prototype.mod=function(t){return this.divmod(t,\"mod\",!1).mod},a.prototype.umod=function(t){return this.divmod(t,\"mod\",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1);return t=t.andln(1),(n=r.cmp(n))<0||1===t&&0===n?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=(1<<26)%t,n=0,o=this.length-1;0<=o;o--)n=(r*n+(0|this.words[o]))%t;return e?-n:n},a.prototype.modn=function(t){return this.modrn(t)},a.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=0,n=this.length-1;0<=n;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());for(var e=this,r=t.clone(),n=(e=0!==e.negative?e.umod(t):e.clone(),new a(1)),o=new a(0),s=new a(0),u=new a(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,p=1;0==(e.words[0]&p)&&h<26;++h,p<<=1);if(0>>26,o&=67108863,this.words[n]=o}return 0!==r&&(this.words[n]=r,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e=t<0;return 0===this.negative||e?0===this.negative&&e?1:(this._strip(),t=1t.length)return 1;if(this.lengththis.n;);return 0===(t=e>>22,i=o}i>>>=22,0===(t.words[n-10]=i)&&10>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if(\"k256\"===t)e=new w;else if(\"p224\"===t)e=new E;else if(\"p192\"===t)e=new T;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new A}return y[t]=e},x.prototype._verify1=function(t){i(0===t.negative,\"red works only with positives\"),i(t.red,\"red works only with red numbers\")},x.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),\"red works only with positives\"),i(t.red&&t.red===e.red,\"red works only with red numbers\")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){return this._verify2(t,e),0<=(e=t.add(e)).cmp(this.m)&&e.isub(this.m),e._forceRed(this)},x.prototype.iadd=function(t,e){return this._verify2(t,e),0<=(e=t.iadd(e)).cmp(this.m)&&e.isub(this.m),e},x.prototype.sub=function(t,e){return this._verify2(t,e),(e=t.sub(e)).cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},x.prototype.isub=function(t,e){return this._verify2(t,e),(e=t.isub(e)).cmpn(0)<0&&e.iadd(this.m),e},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e)return e=this.m.add(new a(1)).iushrn(2),this.pow(t,e);for(var r=this.m.subn(1),n=0;!r.isZero()&&0===r.andln(1);)n++,r.iushrn(1);i(!r.isZero());for(var o=new a(1).toRed(this),s=o.redNeg(),u=this.m.subn(1).iushrn(1),c=new a(2*(c=this.m.bitLength())*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var l=this.pow(c,r),f=this.pow(t,r.addn(1).iushrn(1)),h=this.pow(t,r),p=n;0!==h.cmp(o);){for(var d=h,m=0;0!==d.cmp(o);m++)d=d.redSqr();i(m>l&1;i!==r[0]&&(i=this.sqr(i)),0!=f||0!==o?(o<<=1,o|=f,(4==++s||0===n&&0===l)&&(i=this.mul(i,r[o]),o=s=0)):s=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){return(t=t.clone()).red=null,t},a.mont=function(t){return new S(t)},o(S,x),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){return(t=this.imod(t.mul(this.rinv))).red=null,t},S.prototype.imul=function(t,e){return t.isZero()||e.isZero()?(t.words[0]=0,t.length=1,t):(e=(t=t.imul(e)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),0<=(e=t=t.isub(e).iushrn(this.shift)).cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this))},S.prototype.mul=function(t,e){return t.isZero()||e.isZero()?new a(0)._forceRed(this):(e=(t=t.mul(e)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),0<=(e=t=t.isub(e).iushrn(this.shift)).cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this))},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(28)(t))},function(t,e,r){\"use strict\";e.bignum=r(11),e.define=r(815).define,e.base=r(818),e.constants=r(819),e.decoders=r(360),e.encoders=r(358)},function(t,e,r){\"use strict\";e.der=r(359),e.pem=r(816)},function(t,e,r){\"use strict\";var n=r(1),i=r(196).Buffer,o=r(197),a=r(199);function s(t){o.call(this,\"der\",t)}function u(t){return t<10?\"0\"+t:t}(t.exports=function(t){this.enc=\"der\",this.name=t.name,this.entity=t,this.tree=new s,this.tree._init(t.body)}).prototype.encode=function(t,e){return this.tree._encode(t,e).join()},n(s,o),s.prototype._encodeComposite=function(t,e,r,n){if(e=function(t,e,r,n){var i;if(\"seqof\"===t?t=\"seq\":\"setof\"===t&&(t=\"set\"),a.tagByName.hasOwnProperty(t))i=a.tagByName[t];else{if(\"number\"!=typeof t||(0|t)!==t)return n.error(\"Unknown tag: \"+t);i=t}return 31<=i?n.error(\"Multi-octet tag encoding unsupported\"):(e||(i|=32),i|a.tagClassByName[r||\"universal\"]<<6)}(t,e,r,this.reporter),n.length<128)return(r=i.alloc(2))[0]=e,r[1]=n.length,this._createEncoderBuffer([r,n]);for(var o=1,s=n.length;256<=s;s>>=8)o++;var u=i.alloc(2+o);u[0]=e,u[1]=128|o;for(var c=1+o,l=n.length;0>=8)u[c]=255&l;return this._createEncoderBuffer([u,n])},s.prototype._encodeStr=function(t,e){if(\"bitstr\"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if(\"bmpstr\"!==e)return\"numstr\"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error(\"Encoding of string type: numstr supports only digits and space\"):\"printstr\"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error(\"Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark\"):/str$/.test(e)||\"objDesc\"===e?this._createEncoderBuffer(t):this.reporter.error(\"Encoding of string type: \"+e+\" unsupported\");for(var r=i.alloc(2*t.length),n=0;n>=7)a++}for(var c=i.alloc(a),l=c.length-1,f=t.length-1;0<=f;f--){var h=t[f];for(c[l--]=127&h;0<(h>>=7);)c[l--]=128|127&h}return this._createEncoderBuffer(c)},s.prototype._encodeTime=function(t,e){var r;return t=new Date(t),\"gentime\"===e?r=[u(t.getUTCFullYear()),u(t.getUTCMonth()+1),u(t.getUTCDate()),u(t.getUTCHours()),u(t.getUTCMinutes()),u(t.getUTCSeconds()),\"Z\"].join(\"\"):\"utctime\"===e?r=[u(t.getUTCFullYear()%100),u(t.getUTCMonth()+1),u(t.getUTCDate()),u(t.getUTCHours()),u(t.getUTCMinutes()),u(t.getUTCSeconds()),\"Z\"].join(\"\"):this.reporter.error(\"Encoding \"+e+\" time is not supported yet\"),this._encodeStr(r,\"octstr\")},s.prototype._encodeNull=function(){return this._createEncoderBuffer(\"\")},s.prototype._encodeInt=function(t,e){if(\"string\"==typeof t){if(!e)return this.reporter.error(\"String int or enum given, but no values map\");if(!e.hasOwnProperty(t))return this.reporter.error(\"Values map doesn't contain: \"+JSON.stringify(t));t=e[t]}if(\"number\"==typeof t||i.isBuffer(t)||(r=t.toArray(),!t.sign&&128&r[0]&&r.unshift(0),t=i.from(r)),i.isBuffer(t)){var r=t.length;return 0===t.length&&r++,r=i.alloc(r),t.copy(r),0===t.length&&(r[0]=0),this._createEncoderBuffer(r)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);for(var n=1,o=t;256<=o;o>>=8)n++;for(var a=new Array(n),s=a.length-1;0<=s;s--)a[s]=255&t,t>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(i.from(a))},s.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},s.prototype._use=function(t,e){return\"function\"==typeof t&&(t=t(e)),t._getEncoder(\"der\").tree},s.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function l(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(4\\n \").concat(this.getContent(),\"\\n \\n \")}},{key:\"render\",value:function(){return\"\\n \\n \\n \\n \\n \").concat(this.renderContent(),\"\\n \\n \\n \\n \\n \")}}]),e}(),e.default=r,(0,s.default)(r,\"componentName\",\"mj-accordion-text\"),(0,s.default)(r,\"endingTag\",!0),(0,s.default)(r,\"allowedAttributes\",{\"background-color\":\"color\",\"font-size\":\"unit(px)\",\"font-family\":\"string\",\"font-weight\":\"string\",\"letter-spacing\":\"unitWithNegative(px,em)\",\"line-height\":\"unit(px,%,)\",color:\"color\",\"padding-bottom\":\"unit(px,%)\",\"padding-left\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"padding-top\":\"unit(px,%)\",padding:\"unit(px,%){1,4}\"}),(0,s.default)(r,\"defaultAttributes\",{\"font-size\":\"13px\",\"line-height\":\"1\",padding:\"16px\"}),t.exports=e.default},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){for(var r=0;r\\n \").concat(this.getContent(),\"\\n \\n \")}},{key:\"renderIcons\",value:function(){return(0,l.default)(\"\\n \\n \\n \\n \\n \"),!0)}},{key:\"render\",value:function(){var t=[this.renderTitle(),this.renderIcons()];return t=(\"right\"===this.getAttribute(\"icon-position\")?t:t.reverse()).join(\"\\n\"),\"\\n
\\n \\n \\n \\n \").concat(t,\"\\n \\n \\n \\n
\\n \")}}]),e}(),e.default=r,(0,u.default)(r,\"componentName\",\"mj-accordion-title\"),(0,u.default)(r,\"endingTag\",!0),(0,u.default)(r,\"allowedAttributes\",{\"background-color\":\"color\",color:\"color\",\"font-size\":\"unit(px)\",\"font-family\":\"string\",\"padding-bottom\":\"unit(px,%)\",\"padding-left\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"padding-top\":\"unit(px,%)\",padding:\"unit(px,%){1,4}\"}),(0,u.default)(r,\"defaultAttributes\",{\"font-size\":\"13px\",padding:\"16px\"}),t.exports=e.default},function(t,e,r){var n=r(86)(\"join\",r(853));n.placeholder=r(57),t.exports=n},function(t,e,r){var n=r(86)(\"identity\",r(24),r(854));n.placeholder=r(57),t.exports=n},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(t,e)||o(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function o(t,e){if(t){if(\"string\"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \").concat(t?\"
\"):\"\",\"\\n \\n \\n \\n \\n \\x3c!--[if mso | IE]>\\n \\n \\n
\\n \\n \\n \\n \\n \").concat(t?\"
\":\"\",\"\\n \\n \")}},{key:\"renderFullWidth\",value:function(){var t=this.hasBackground()?this.renderWithBackground(\"\\n \".concat(this.renderBefore(),\"\\n \").concat(this.renderSection(),\"\\n \").concat(this.renderAfter(),\"\\n \")):\"\\n \".concat(this.renderBefore(),\"\\n \").concat(this.renderSection(),\"\\n \").concat(this.renderAfter(),\"\\n \");return\"\\n \\n \\n \\n \\n \").concat(t,\"\\n \\n \\n \\n \\n \")}},{key:\"renderSimple\",value:function(){var t=this.renderSection();return\"\\n \".concat(this.renderBefore(),\"\\n \").concat(this.hasBackground()?this.renderWithBackground(t):t,\"\\n \").concat(this.renderAfter(),\"\\n \")}},{key:\"render\",value:function(){return this.isFullWidth()?this.renderFullWidth():this.renderSimple()}}]),e}(),e.default=m,(0,p.default)(m,\"componentName\",\"mj-section\"),(0,p.default)(m,\"allowedAttributes\",{\"background-color\":\"color\",\"background-url\":\"string\",\"background-repeat\":\"enum(repeat,no-repeat)\",\"background-size\":\"string\",\"background-position\":\"string\",\"background-position-x\":\"string\",\"background-position-y\":\"string\",border:\"string\",\"border-bottom\":\"string\",\"border-left\":\"string\",\"border-radius\":\"string\",\"border-right\":\"string\",\"border-top\":\"string\",direction:\"enum(ltr,rtl)\",\"full-width\":\"enum(full-width,false,)\",padding:\"unit(px,%){1,4}\",\"padding-top\":\"unit(px,%)\",\"padding-bottom\":\"unit(px,%)\",\"padding-left\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"text-align\":\"enum(left,center,right)\",\"text-padding\":\"unit(px,%){1,4}\"}),(0,p.default)(m,\"defaultAttributes\",{\"background-repeat\":\"repeat\",\"background-size\":\"auto\",\"background-position\":\"top center\",direction:\"ltr\",padding:\"20px 0\",\"text-align\":\"center\",\"text-padding\":\"4px 4px 4px 0\"}),t.exports=e.default},function(t,e,r){t.exports=r(373)},function(t,e,r){\"use strict\";var n=r(0),i=r(43);Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=void 0;var o=i(r(4)),a=r(179),s=r(743),u=r(746),c=r(830),l=r(840),f=n(r(843)),h=n(r(844)),p=n(r(845)),d=n(r(846)),m=n(r(847)),g=n(r(848)),b=n(r(849)),_=n(r(850)),y=n(r(851)),v=n(r(852)),w=n(r(855)),E=n(r(856)),T=n(r(857)),A=n(r(858)),x=n(r(859)),S=n(r(860)),O=n(r(371)),k=n(r(861)),M=n(r(862)),C=n(r(863));i=n(r(864)),r=n(r(865)),(0,o.registerComponent)(f.default),(0,o.registerComponent)(h.default),(0,o.registerComponent)(p.default),(0,o.registerComponent)(d.default),(0,o.registerComponent)(m.default),(0,o.registerComponent)(g.default),(0,o.registerComponent)(b.default),(0,o.registerComponent)(_.default),(0,o.registerComponent)(y.default),(0,o.registerComponent)(v.default),(0,o.registerComponent)(w.default),(0,o.registerComponent)(E.default),(0,o.registerComponent)(T.default),(0,o.registerComponent)(A.default),(0,o.registerComponent)(x.default),(0,o.registerComponent)(S.default),(0,o.registerComponent)(O.default),(0,o.registerComponent)(k.default),(0,o.registerComponent)(M.default),(0,o.registerComponent)(C.default),(0,o.registerComponent)(i.default),(0,o.registerComponent)(s.Social),(0,o.registerComponent)(s.SocialElement),(0,o.registerComponent)(u.Navbar),(0,o.registerComponent)(u.NavbarLink),(0,o.registerComponent)(l.Accordion),(0,o.registerComponent)(l.AccordionElement),(0,o.registerComponent)(l.AccordionText),(0,o.registerComponent)(l.AccordionTitle),(0,o.registerComponent)(c.Carousel),(0,o.registerComponent)(c.CarouselImage),(0,a.registerDependencies)(r.default),o=o.default,e.default=o,t.exports=e.default},function(t){function e(r){return\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?t.exports=e=function(t){return typeof t}:t.exports=e=function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},e(r)}t.exports=e},function(t,e,r){r=r(201)(Object.keys,Object),t.exports=r},function(t,e,r){r=r(36)(r(13),\"DataView\"),t.exports=r},function(t,e,r){var n=r(92),i=r(380),o=r(14),a=r(203),s=/^\\[object .+?Constructor\\]$/,u=Function.prototype,c=(r=Object.prototype,u=u.toString,r=r.hasOwnProperty,RegExp(\"^\"+u.call(r).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"));t.exports=function(t){return!(!o(t)||i(t))&&(n(t)?c:s).test(a(t))}},function(t,e,r){var n=r(45),i=(r=Object.prototype).hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=i.call(t,a),r=t[a];try{var n=!(t[a]=void 0)}catch(t){}var s=o.call(t);return n&&(e?t[a]=r:delete t[a]),s}},function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},function(t,e,r){r=r(381);var n=(r=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+r:\"\";t.exports=function(t){return!!n&&n in t}},function(t,e,r){r=r(13)[\"__core-js_shared__\"],t.exports=r},function(t){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,r){r=r(36)(r(13),\"Promise\"),t.exports=r},function(t,e,r){r=r(36)(r(13),\"Set\"),t.exports=r},function(t,e,r){var n=r(37),i=r(15);t.exports=function(t){return i(t)&&\"[object Arguments]\"==n(t)}},function(t){t.exports=function(){return!1}},function(t,e,r){var n=r(37),i=r(127),o=r(15),a={};a[\"[object Float32Array]\"]=a[\"[object Float64Array]\"]=a[\"[object Int8Array]\"]=a[\"[object Int16Array]\"]=a[\"[object Int32Array]\"]=a[\"[object Uint8Array]\"]=a[\"[object Uint8ClampedArray]\"]=a[\"[object Uint16Array]\"]=a[\"[object Uint32Array]\"]=!0,a[\"[object Arguments]\"]=a[\"[object Array]\"]=a[\"[object ArrayBuffer]\"]=a[\"[object Boolean]\"]=a[\"[object DataView]\"]=a[\"[object Date]\"]=a[\"[object Error]\"]=a[\"[object Function]\"]=a[\"[object Map]\"]=a[\"[object Number]\"]=a[\"[object Object]\"]=a[\"[object RegExp]\"]=a[\"[object Set]\"]=a[\"[object String]\"]=a[\"[object WeakMap]\"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[n(t)]}},function(t){t.exports=function(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===r(o[u],u,o))break}return e}}},function(t){t.exports=function(t,e){for(var r=-1,n=Array(t);++r>>0,e>>>=0;for(var o=Array(i);++n\"},HBS:{start:\"{{\",end:\"}}\"}}},function(t,e){\"use strict\";e.byteLength=function(t){var e=u(t);return 3*((t=e[0])+(e=e[1]))/4-e},e.toByteArray=function(t){for(var e,r=(o=u(t))[0],o=o[1],a=new i(function(t,e,r){return 3*(e+r)/4-r}(0,r,o)),s=0,c=0>16&255,a[s++]=e>>8&255,a[s++]=255&e;return 2===o&&(e=n[t.charCodeAt(l)]<<2|n[t.charCodeAt(l+1)]>>4,a[s++]=255&e),1===o&&(e=n[t.charCodeAt(l)]<<10|n[t.charCodeAt(l+1)]<<4|n[t.charCodeAt(l+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e),a},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,s=n-i;a>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}(i));return o.join(\"\")}(t,a,s>2]+r[e<<4&63]+\"==\")):2==i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+\"=\")),o.join(\"\")};for(var r=[],n=[],i=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",a=0,s=o.length;a>1,l=-7,f=r?i-1:0,h=r?-1:1;for(r=t[e+f],f+=h,o=r&(1<<-l)-1,r>>=-l,l+=s;0>=-l,l+=n;0>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1;for(o=e<0||0===e&&1/e<0?1:0,e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(n=Math.pow(2,-a))<1&&(a--,n*=2),2<=(e+=1<=a+l?f/n:f*Math.pow(2,1-l))*n&&(a++,n/=2),c<=a+l?(s=0,a=c):1<=a+l?(s=(e*n-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));8<=i;t[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<\",t.children&&(r+=u(t.children,e)),s[t.name]&&!e.xmlMode||(r+=\"\")):r+=\"/>\",r}(f,e):f.type===n.Directive?r+=function(t){return\"<\"+t.data+\">\"}(f):f.type===n.Comment?r+=function(t){return\"\\x3c!--\"+t.data+\"--\\x3e\"}(f):f.type===n.CDATA?r+=function(t){return\"\"}(f):r+=function(t,e){var r=t.data||\"\";return!e.decodeEntities||t.parent&&t.parent.name in a||(r=i.encodeXML(r)),r}(f,e)}return r},c=[\"mi\",\"mo\",\"mn\",\"ms\",\"mtext\",\"annotation-xml\",\"foreignObject\",\"desc\",\"title\"]},function(t,e){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.isTag=function(t){return\"tag\"===t.type||\"script\"===t.type||\"style\"===t.type},e.Text=\"text\",e.Directive=\"directive\",e.Comment=\"comment\",e.Script=\"script\",e.Style=\"style\",e.Tag=\"tag\",e.CDATA=\"cdata\",e.Doctype=\"doctype\"},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.encode=e.decodeStrict=e.decode=void 0;var n=r(243),i=r(246);e.decode=function(t,e){return(!e||e<=0?n.decodeXML:n.decodeHTML)(t)},e.decodeStrict=function(t,e){return(!e||e<=0?n.decodeXML:n.decodeHTMLStrict)(t)},e.encode=function(t,e){return(!e||e<=0?i.encodeXML:i.encodeHTML)(t)};var o=r(246);Object.defineProperty(e,\"encodeXML\",{enumerable:!0,get:function(){return o.encodeXML}}),Object.defineProperty(e,\"encodeHTML\",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,\"escape\",{enumerable:!0,get:function(){return o.escape}}),Object.defineProperty(e,\"encodeHTML4\",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,\"encodeHTML5\",{enumerable:!0,get:function(){return o.encodeHTML}});var a=r(243);Object.defineProperty(e,\"decodeXML\",{enumerable:!0,get:function(){return a.decodeXML}}),Object.defineProperty(e,\"decodeHTML\",{enumerable:!0,get:function(){return a.decodeHTML}}),Object.defineProperty(e,\"decodeHTMLStrict\",{enumerable:!0,get:function(){return a.decodeHTMLStrict}}),Object.defineProperty(e,\"decodeHTML4\",{enumerable:!0,get:function(){return a.decodeHTML}}),Object.defineProperty(e,\"decodeHTML5\",{enumerable:!0,get:function(){return a.decodeHTML}}),Object.defineProperty(e,\"decodeHTML4Strict\",{enumerable:!0,get:function(){return a.decodeHTMLStrict}}),Object.defineProperty(e,\"decodeHTML5Strict\",{enumerable:!0,get:function(){return a.decodeHTMLStrict}}),Object.defineProperty(e,\"decodeXMLStrict\",{enumerable:!0,get:function(){return a.decodeXML}})},function(t){t.exports=JSON.parse('{\"Aacute\":\"Á\",\"aacute\":\"á\",\"Acirc\":\"Â\",\"acirc\":\"â\",\"acute\":\"´\",\"AElig\":\"Æ\",\"aelig\":\"æ\",\"Agrave\":\"À\",\"agrave\":\"à\",\"amp\":\"&\",\"AMP\":\"&\",\"Aring\":\"Å\",\"aring\":\"å\",\"Atilde\":\"Ã\",\"atilde\":\"ã\",\"Auml\":\"Ä\",\"auml\":\"ä\",\"brvbar\":\"¦\",\"Ccedil\":\"Ç\",\"ccedil\":\"ç\",\"cedil\":\"¸\",\"cent\":\"¢\",\"copy\":\"©\",\"COPY\":\"©\",\"curren\":\"¤\",\"deg\":\"°\",\"divide\":\"÷\",\"Eacute\":\"É\",\"eacute\":\"é\",\"Ecirc\":\"Ê\",\"ecirc\":\"ê\",\"Egrave\":\"È\",\"egrave\":\"è\",\"ETH\":\"Ð\",\"eth\":\"ð\",\"Euml\":\"Ë\",\"euml\":\"ë\",\"frac12\":\"½\",\"frac14\":\"¼\",\"frac34\":\"¾\",\"gt\":\">\",\"GT\":\">\",\"Iacute\":\"Í\",\"iacute\":\"í\",\"Icirc\":\"Î\",\"icirc\":\"î\",\"iexcl\":\"¡\",\"Igrave\":\"Ì\",\"igrave\":\"ì\",\"iquest\":\"¿\",\"Iuml\":\"Ï\",\"iuml\":\"ï\",\"laquo\":\"«\",\"lt\":\"<\",\"LT\":\"<\",\"macr\":\"¯\",\"micro\":\"µ\",\"middot\":\"·\",\"nbsp\":\" \",\"not\":\"¬\",\"Ntilde\":\"Ñ\",\"ntilde\":\"ñ\",\"Oacute\":\"Ó\",\"oacute\":\"ó\",\"Ocirc\":\"Ô\",\"ocirc\":\"ô\",\"Ograve\":\"Ò\",\"ograve\":\"ò\",\"ordf\":\"ª\",\"ordm\":\"º\",\"Oslash\":\"Ø\",\"oslash\":\"ø\",\"Otilde\":\"Õ\",\"otilde\":\"õ\",\"Ouml\":\"Ö\",\"ouml\":\"ö\",\"para\":\"¶\",\"plusmn\":\"±\",\"pound\":\"£\",\"quot\":\"\\\\\"\",\"QUOT\":\"\\\\\"\",\"raquo\":\"»\",\"reg\":\"®\",\"REG\":\"®\",\"sect\":\"§\",\"shy\":\"­\",\"sup1\":\"¹\",\"sup2\":\"²\",\"sup3\":\"³\",\"szlig\":\"ß\",\"THORN\":\"Þ\",\"thorn\":\"þ\",\"times\":\"×\",\"Uacute\":\"Ú\",\"uacute\":\"ú\",\"Ucirc\":\"Û\",\"ucirc\":\"û\",\"Ugrave\":\"Ù\",\"ugrave\":\"ù\",\"uml\":\"¨\",\"Uuml\":\"Ü\",\"uuml\":\"ü\",\"Yacute\":\"Ý\",\"yacute\":\"ý\",\"yen\":\"¥\",\"yuml\":\"ÿ\"}')},function(t,e,r){\"use strict\";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,\"__esModule\",{value:!0});var i=n(r(476));e.default=function(t){if(55296<=t&&t<=57343||1114111>>10&1023|55296),t=56320|1023&t),e+String.fromCharCode(t)}},function(t){t.exports=JSON.parse('{\"0\":65533,\"128\":8364,\"130\":8218,\"131\":402,\"132\":8222,\"133\":8230,\"134\":8224,\"135\":8225,\"136\":710,\"137\":8240,\"138\":352,\"139\":8249,\"140\":338,\"142\":381,\"145\":8216,\"146\":8217,\"147\":8220,\"148\":8221,\"149\":8226,\"150\":8211,\"151\":8212,\"152\":732,\"153\":8482,\"154\":353,\"155\":8250,\"156\":339,\"158\":382,\"159\":376}')},function(t){t.exports=JSON.parse('{\"elementNames\":{\"altglyph\":\"altGlyph\",\"altglyphdef\":\"altGlyphDef\",\"altglyphitem\":\"altGlyphItem\",\"animatecolor\":\"animateColor\",\"animatemotion\":\"animateMotion\",\"animatetransform\":\"animateTransform\",\"clippath\":\"clipPath\",\"feblend\":\"feBlend\",\"fecolormatrix\":\"feColorMatrix\",\"fecomponenttransfer\":\"feComponentTransfer\",\"fecomposite\":\"feComposite\",\"feconvolvematrix\":\"feConvolveMatrix\",\"fediffuselighting\":\"feDiffuseLighting\",\"fedisplacementmap\":\"feDisplacementMap\",\"fedistantlight\":\"feDistantLight\",\"fedropshadow\":\"feDropShadow\",\"feflood\":\"feFlood\",\"fefunca\":\"feFuncA\",\"fefuncb\":\"feFuncB\",\"fefuncg\":\"feFuncG\",\"fefuncr\":\"feFuncR\",\"fegaussianblur\":\"feGaussianBlur\",\"feimage\":\"feImage\",\"femerge\":\"feMerge\",\"femergenode\":\"feMergeNode\",\"femorphology\":\"feMorphology\",\"feoffset\":\"feOffset\",\"fepointlight\":\"fePointLight\",\"fespecularlighting\":\"feSpecularLighting\",\"fespotlight\":\"feSpotLight\",\"fetile\":\"feTile\",\"feturbulence\":\"feTurbulence\",\"foreignobject\":\"foreignObject\",\"glyphref\":\"glyphRef\",\"lineargradient\":\"linearGradient\",\"radialgradient\":\"radialGradient\",\"textpath\":\"textPath\"},\"attributeNames\":{\"definitionurl\":\"definitionURL\",\"attributename\":\"attributeName\",\"attributetype\":\"attributeType\",\"basefrequency\":\"baseFrequency\",\"baseprofile\":\"baseProfile\",\"calcmode\":\"calcMode\",\"clippathunits\":\"clipPathUnits\",\"diffuseconstant\":\"diffuseConstant\",\"edgemode\":\"edgeMode\",\"filterunits\":\"filterUnits\",\"glyphref\":\"glyphRef\",\"gradienttransform\":\"gradientTransform\",\"gradientunits\":\"gradientUnits\",\"kernelmatrix\":\"kernelMatrix\",\"kernelunitlength\":\"kernelUnitLength\",\"keypoints\":\"keyPoints\",\"keysplines\":\"keySplines\",\"keytimes\":\"keyTimes\",\"lengthadjust\":\"lengthAdjust\",\"limitingconeangle\":\"limitingConeAngle\",\"markerheight\":\"markerHeight\",\"markerunits\":\"markerUnits\",\"markerwidth\":\"markerWidth\",\"maskcontentunits\":\"maskContentUnits\",\"maskunits\":\"maskUnits\",\"numoctaves\":\"numOctaves\",\"pathlength\":\"pathLength\",\"patterncontentunits\":\"patternContentUnits\",\"patterntransform\":\"patternTransform\",\"patternunits\":\"patternUnits\",\"pointsatx\":\"pointsAtX\",\"pointsaty\":\"pointsAtY\",\"pointsatz\":\"pointsAtZ\",\"preservealpha\":\"preserveAlpha\",\"preserveaspectratio\":\"preserveAspectRatio\",\"primitiveunits\":\"primitiveUnits\",\"refx\":\"refX\",\"refy\":\"refY\",\"repeatcount\":\"repeatCount\",\"repeatdur\":\"repeatDur\",\"requiredextensions\":\"requiredExtensions\",\"requiredfeatures\":\"requiredFeatures\",\"specularconstant\":\"specularConstant\",\"specularexponent\":\"specularExponent\",\"spreadmethod\":\"spreadMethod\",\"startoffset\":\"startOffset\",\"stddeviation\":\"stdDeviation\",\"stitchtiles\":\"stitchTiles\",\"surfacescale\":\"surfaceScale\",\"systemlanguage\":\"systemLanguage\",\"tablevalues\":\"tableValues\",\"targetx\":\"targetX\",\"targety\":\"targetY\",\"textlength\":\"textLength\",\"viewbox\":\"viewBox\",\"viewtarget\":\"viewTarget\",\"xchannelselector\":\"xChannelSelector\",\"ychannelselector\":\"yChannelSelector\",\"zoomandpan\":\"zoomAndPan\"}}')},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){var e;t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent&&(e=t.parent.children).splice(e.lastIndexOf(t),1)},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e),(r=e.next=t.next)&&(r.prev=e),(r=e.parent=t.parent)&&((r=r.children)[r.lastIndexOf(t)]=e)},e.appendChild=function(t,e){1!==(e.parent=t).children.push(e)&&(((t=t.children[t.children.length-2]).next=e).prev=t,e.next=null)},e.append=function(t,e){var r=t.parent,n=t.next;e.next=n,((e.prev=t).next=e).parent=r,n?(n.prev=e,r&&(t=r.children).splice(t.lastIndexOf(n),0,e)):r&&r.children.push(e)},e.prepend=function(t,e){var r,n=t.parent;n&&(r=n.children).splice(r.lastIndexOf(t),0,e),t.prev&&(t.prev.next=e),e.parent=n,e.prev=t.prev,(e.next=t).prev=e}},function(t,e,r){var n=r(26).isTag;function i(t,e,r,n){for(var o,a=[],s=0,u=e.length;si.indexOf(a)?n===e?20:4:n===t?10:2)};e.uniqueSort=function(t){var e,n=t.length;for(t=t.slice();-1<--n;)e=t[n],-1<(e=t.indexOf(e))&&ethis.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])},t.prototype._addGap=function(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos},t.prototype._processHighRangeCodePoint=function(t){if(this.pos!==this.lastCharPos){var e=this.html.charCodeAt(this.pos+1);!function(t,e){return 55296<=t&&t<=56319&&56320<=e&&e<=57343}(t,e)||(this.pos++,t=function(t,e){return 1024*(t-55296)+9216+e}(t,e),this._addGap())}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,n.EOF;return t},t.prototype.write=function(t,e){this.html?this.html+=t:this.html=t,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=e},t.prototype.insertHtmlAtCurrentPos=function(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1},t.prototype.advance=function(){if(this.pos++,this.pos>this.lastCharPos)return this.lastChunkWritten||(this.endOfChunkHit=!0),n.EOF;var t=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&t===n.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):t===n.CARRIAGE_RETURN?(this.skipNextNewLine=!0,n.LINE_FEED):(this.skipNextNewLine=!1,55296<=t?this._processHighRangeCodePoint(t):t)},t.prototype.retreat=function(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}},function(t){\"use strict\";t.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])},function(t,e,r){\"use strict\";var n=(r=r(21)).TAG_NAMES,i=r.NAMESPACES;function o(t){switch(t.length){case 1:return t===n.P;case 2:return t===n.RB||t===n.RP||t===n.RT||t===n.DD||t===n.DT||t===n.LI;case 3:return t===n.RTC;case 6:return t===n.OPTION;case 8:return t===n.OPTGROUP||t===n.MENUITEM}}function a(t,e){switch(t.length){case 2:if(t===n.TD||t===n.TH)return e===i.HTML;if(t===n.MI||t===n.MO||t===n.MN||t===n.MS)return e===i.MATHML;break;case 4:if(t===n.HTML)return e===i.HTML;if(t===n.DESC)return e===i.SVG;break;case 5:if(t===n.TABLE)return e===i.HTML;if(t===n.MTEXT)return e===i.MATHML;if(t===n.TITLE)return e===i.SVG;break;case 6:return(t===n.APPLET||t===n.OBJECT)&&e===i.HTML;case 7:return(t===n.CAPTION||t===n.MARQUEE)&&e===i.HTML;case 8:return t===n.TEMPLATE&&e===i.HTML;case 13:return t===n.FOREIGN_OBJECT&&e===i.SVG;case 14:return t===n.ANNOTATION_XML&&e===i.MATHML}}(t=t.exports=function(t,e){this.stackTop=-1,this.items=[],this.current=t,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=e}).prototype._indexOf=function(t){for(var e=-1,r=this.stackTop;0<=r;r--)if(this.items[r]===t){e=r;break}return e},t.prototype._isInTemplate=function(){return this.currentTagName===n.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===i.HTML},t.prototype._updateCurrentElement=function(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null},t.prototype.push=function(t){this.items[++this.stackTop]=t,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++},t.prototype.pop=function(){this.stackTop--,0>>0),r=this.head,i=0;r;)!function(t,e,r){t.copy(e,r)}(r.data,e,i),i+=r.data.length,r=r.next;return e},o),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+\" \"+t})},function(){},function(t,e,r){(function(t){var n=void 0!==t&&t||\"undefined\"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;0<=e&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(501),e.setImmediate=\"undefined\"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate=\"undefined\"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(9))},function(t,e,r){(function(t,e){!function(t,r){\"use strict\";var n,i,o,a,s,u;function c(t){delete i[t]}function l(t){if(o)setTimeout(l,0,t);else{var e=i[t];if(e){o=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(void 0,r)}}(e)}finally{c(t),o=!1}}}}t.setImmediate||(n=1,o=!(i={}),a=t.document,u=(u=Object.getPrototypeOf&&Object.getPrototypeOf(t))&&u.setTimeout?u:t,(\"[object process]\"==={}.toString.call(t.process)?function(){s=function(t){e.nextTick((function(){l(t)}))}}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage(\"\",\"*\"),t.onmessage=r,e}}()?function(){function e(e){e.source===t&&\"string\"==typeof e.data&&0===e.data.indexOf(r)&&l(+e.data.slice(r.length))}var r=\"setImmediate$\"+Math.random()+\"$\";t.addEventListener?t.addEventListener(\"message\",e,!1):t.attachEvent(\"onmessage\",e),s=function(e){t.postMessage(r+e,\"*\")}}:t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){l(t.data)},s=function(e){t.port2.postMessage(e)}}:a&&\"onreadystatechange\"in a.createElement(\"script\")?function(){var t=a.documentElement;s=function(e){var r=a.createElement(\"script\");r.onreadystatechange=function(){l(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}:function(){s=function(t){setTimeout(l,0,t)}})(),u.setImmediate=function(t){\"function\"!=typeof t&&(t=new Function(\"\"+t));for(var e=new Array(arguments.length-1),r=0;r\",\"GT\":\">\",\"Iacute\":\"Í\",\"iacute\":\"í\",\"Icirc\":\"Î\",\"icirc\":\"î\",\"iexcl\":\"¡\",\"Igrave\":\"Ì\",\"igrave\":\"ì\",\"iquest\":\"¿\",\"Iuml\":\"Ï\",\"iuml\":\"ï\",\"laquo\":\"«\",\"lt\":\"<\",\"LT\":\"<\",\"macr\":\"¯\",\"micro\":\"µ\",\"middot\":\"·\",\"nbsp\":\" \",\"not\":\"¬\",\"Ntilde\":\"Ñ\",\"ntilde\":\"ñ\",\"Oacute\":\"Ó\",\"oacute\":\"ó\",\"Ocirc\":\"Ô\",\"ocirc\":\"ô\",\"Ograve\":\"Ò\",\"ograve\":\"ò\",\"ordf\":\"ª\",\"ordm\":\"º\",\"Oslash\":\"Ø\",\"oslash\":\"ø\",\"Otilde\":\"Õ\",\"otilde\":\"õ\",\"Ouml\":\"Ö\",\"ouml\":\"ö\",\"para\":\"¶\",\"plusmn\":\"±\",\"pound\":\"£\",\"quot\":\"\\\\\"\",\"QUOT\":\"\\\\\"\",\"raquo\":\"»\",\"reg\":\"®\",\"REG\":\"®\",\"sect\":\"§\",\"shy\":\"­\",\"sup1\":\"¹\",\"sup2\":\"²\",\"sup3\":\"³\",\"szlig\":\"ß\",\"THORN\":\"Þ\",\"thorn\":\"þ\",\"times\":\"×\",\"Uacute\":\"Ú\",\"uacute\":\"ú\",\"Ucirc\":\"Û\",\"ucirc\":\"û\",\"Ugrave\":\"Ù\",\"ugrave\":\"ù\",\"uml\":\"¨\",\"Uuml\":\"Ü\",\"uuml\":\"ü\",\"Yacute\":\"Ý\",\"yacute\":\"ý\",\"yen\":\"¥\",\"yuml\":\"ÿ\"}')},function(t,e,r){\"use strict\";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,\"__esModule\",{value:!0});var i=n(r(538));e.default=function(t){if(55296<=t&&t<=57343||1114111>>10&1023|55296),t=56320|1023&t),e+String.fromCharCode(t)}},function(t){t.exports=JSON.parse('{\"0\":65533,\"128\":8364,\"130\":8218,\"131\":402,\"132\":8222,\"133\":8230,\"134\":8224,\"135\":8225,\"136\":710,\"137\":8240,\"138\":352,\"139\":8249,\"140\":338,\"142\":381,\"145\":8216,\"146\":8217,\"147\":8220,\"148\":8221,\"149\":8226,\"150\":8211,\"151\":8212,\"152\":732,\"153\":8482,\"154\":353,\"155\":8250,\"156\":339,\"158\":382,\"159\":376}')},function(t){t.exports=JSON.parse('{\"elementNames\":{\"altglyph\":\"altGlyph\",\"altglyphdef\":\"altGlyphDef\",\"altglyphitem\":\"altGlyphItem\",\"animatecolor\":\"animateColor\",\"animatemotion\":\"animateMotion\",\"animatetransform\":\"animateTransform\",\"clippath\":\"clipPath\",\"feblend\":\"feBlend\",\"fecolormatrix\":\"feColorMatrix\",\"fecomponenttransfer\":\"feComponentTransfer\",\"fecomposite\":\"feComposite\",\"feconvolvematrix\":\"feConvolveMatrix\",\"fediffuselighting\":\"feDiffuseLighting\",\"fedisplacementmap\":\"feDisplacementMap\",\"fedistantlight\":\"feDistantLight\",\"fedropshadow\":\"feDropShadow\",\"feflood\":\"feFlood\",\"fefunca\":\"feFuncA\",\"fefuncb\":\"feFuncB\",\"fefuncg\":\"feFuncG\",\"fefuncr\":\"feFuncR\",\"fegaussianblur\":\"feGaussianBlur\",\"feimage\":\"feImage\",\"femerge\":\"feMerge\",\"femergenode\":\"feMergeNode\",\"femorphology\":\"feMorphology\",\"feoffset\":\"feOffset\",\"fepointlight\":\"fePointLight\",\"fespecularlighting\":\"feSpecularLighting\",\"fespotlight\":\"feSpotLight\",\"fetile\":\"feTile\",\"feturbulence\":\"feTurbulence\",\"foreignobject\":\"foreignObject\",\"glyphref\":\"glyphRef\",\"lineargradient\":\"linearGradient\",\"radialgradient\":\"radialGradient\",\"textpath\":\"textPath\"},\"attributeNames\":{\"definitionurl\":\"definitionURL\",\"attributename\":\"attributeName\",\"attributetype\":\"attributeType\",\"basefrequency\":\"baseFrequency\",\"baseprofile\":\"baseProfile\",\"calcmode\":\"calcMode\",\"clippathunits\":\"clipPathUnits\",\"diffuseconstant\":\"diffuseConstant\",\"edgemode\":\"edgeMode\",\"filterunits\":\"filterUnits\",\"glyphref\":\"glyphRef\",\"gradienttransform\":\"gradientTransform\",\"gradientunits\":\"gradientUnits\",\"kernelmatrix\":\"kernelMatrix\",\"kernelunitlength\":\"kernelUnitLength\",\"keypoints\":\"keyPoints\",\"keysplines\":\"keySplines\",\"keytimes\":\"keyTimes\",\"lengthadjust\":\"lengthAdjust\",\"limitingconeangle\":\"limitingConeAngle\",\"markerheight\":\"markerHeight\",\"markerunits\":\"markerUnits\",\"markerwidth\":\"markerWidth\",\"maskcontentunits\":\"maskContentUnits\",\"maskunits\":\"maskUnits\",\"numoctaves\":\"numOctaves\",\"pathlength\":\"pathLength\",\"patterncontentunits\":\"patternContentUnits\",\"patterntransform\":\"patternTransform\",\"patternunits\":\"patternUnits\",\"pointsatx\":\"pointsAtX\",\"pointsaty\":\"pointsAtY\",\"pointsatz\":\"pointsAtZ\",\"preservealpha\":\"preserveAlpha\",\"preserveaspectratio\":\"preserveAspectRatio\",\"primitiveunits\":\"primitiveUnits\",\"refx\":\"refX\",\"refy\":\"refY\",\"repeatcount\":\"repeatCount\",\"repeatdur\":\"repeatDur\",\"requiredextensions\":\"requiredExtensions\",\"requiredfeatures\":\"requiredFeatures\",\"specularconstant\":\"specularConstant\",\"specularexponent\":\"specularExponent\",\"spreadmethod\":\"spreadMethod\",\"startoffset\":\"startOffset\",\"stddeviation\":\"stdDeviation\",\"stitchtiles\":\"stitchTiles\",\"surfacescale\":\"surfaceScale\",\"systemlanguage\":\"systemLanguage\",\"tablevalues\":\"tableValues\",\"targetx\":\"targetX\",\"targety\":\"targetY\",\"textlength\":\"textLength\",\"viewbox\":\"viewBox\",\"viewtarget\":\"viewTarget\",\"xchannelselector\":\"xChannelSelector\",\"ychannelselector\":\"yChannelSelector\",\"zoomandpan\":\"zoomAndPan\"}}')},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){var e;t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent&&(e=t.parent.children).splice(e.lastIndexOf(t),1)},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e),(r=e.next=t.next)&&(r.prev=e),(r=e.parent=t.parent)&&((r=r.children)[r.lastIndexOf(t)]=e)},e.appendChild=function(t,e){1!==(e.parent=t).children.push(e)&&(((t=t.children[t.children.length-2]).next=e).prev=t,e.next=null)},e.append=function(t,e){var r=t.parent,n=t.next;e.next=n,((e.prev=t).next=e).parent=r,n?(n.prev=e,r&&(t=r.children).splice(t.lastIndexOf(n),0,e)):r&&r.children.push(e)},e.prepend=function(t,e){var r,n=t.parent;n&&(r=n.children).splice(r.lastIndexOf(t),0,e),t.prev&&(t.prev.next=e),e.parent=n,e.prev=t.prev,(e.next=t).prev=e}},function(t,e,r){var n=r(26).isTag;function i(t,e,r,n){for(var o,a=[],s=0,u=e.length;si.indexOf(a)?n===e?20:4:n===t?10:2)};e.uniqueSort=function(t){var e,n=t.length;for(t=t.slice();-1<--n;)e=t[n],-1<(e=t.indexOf(e))&&e\":\"child\",\"<\":\"parent\",\"~\":\"sibling\",\"+\":\"adjacent\"},a={__proto__:null,\"#\":[\"id\",\"equals\"],\".\":[\"class\",\"element\"]},s={__proto__:null,has:!0,not:!0,matches:!0},u={__proto__:null,contains:!0,icontains:!0},c={__proto__:null,'\"':!0,\"'\":!0};function l(t,e,r){var n=\"0x\"+e-65536;return n!=n||r?e:n<0?String.fromCharCode(65536+n):String.fromCharCode(n>>10|55296,1023&n|56320)}function f(t){return t.replace(r,l)}function h(t){return\" \"===t||\"\\n\"===t||\"\\t\"===t||\"\\f\"===t||\"\\r\"===t}function p(t,e){if(0>=1);else if(e===n.pseudo)if(t.data)if(\"has\"===t.name||\"contains\"===t.name)e=0;else if(\"matches\"===t.name||\"not\"===t.name){for(var r=e=0;r=s.children.length);)\"tag\"===s.children[u].type?(s=s.children[u],u=0):u++;i=f.indexOf(n),o([n],s),h(f,i,0,a,l)}}),this)),this},e.after=function(){var t=l.call(arguments),e=this.length-1;return s(this,(function(r,n){var o,a,s=n.parent||n.root;s&&((a=(o=s.children).indexOf(n))<0||(n=\"function\"==typeof t[0]?t[0].call(n,r,i.html(n.children)):t,h(o,a+1,0,r=this._makeDomArray(n,r (mat.io)\",\"license\":\"MIT\",\"keywords\":[\"htmlparser\",\"jquery\",\"selector\",\"scraper\",\"parser\",\"html\"],\"repository\":{\"type\":\"git\",\"url\":\"git://github.com/cheeriojs/cheerio.git\"},\"main\":\"./index.js\",\"files\":[\"index.js\",\"lib\"],\"engines\":{\"node\":\">= 0.6\"},\"dependencies\":{\"css-select\":\"~1.2.0\",\"dom-serializer\":\"~0.1.1\",\"entities\":\"~1.1.1\",\"htmlparser2\":\"^3.9.1\",\"lodash\":\"^4.15.0\",\"parse5\":\"^3.0.1\"},\"devDependencies\":{\"benchmark\":\"^2.1.0\",\"coveralls\":\"^2.11.9\",\"expect.js\":\"~0.3.1\",\"istanbul\":\"^0.4.3\",\"jquery\":\"^3.0.0\",\"jsdom\":\"^9.2.1\",\"jshint\":\"^2.9.2\",\"mocha\":\"^3.1.2\",\"xyz\":\"~1.1.0\"},\"scripts\":{\"test\":\"make test\"}}')},function(t,e,r){t.exports={lex:r(285),parse:r(569),stringify:r(570)}},function(t,e,r){r(162)(\"parse\");var n,i,o,a,s=r(285);function u(t,e){var r;e=e||{};for(var n=[\"type\",\"name\",\"value\"],i={},a=0;a+)\\\\s*|(\\\\s+)|(+|\\\\*)|\\\\#(+)|\\\\.(+)|\\\\[\\\\s*(+)(?:\\\\s*([*^$!~|]?=)(?:\\\\s*(?:([\\\"']?)(.*?)\\\\9)))?\\\\s*\\\\](?!\\\\])|(:+)(+)(?:\\\\((?:(?:([\\\"'])([^\\\\13]*)\\\\13)|((?:\\\\([^)]+\\\\)|[^()]*)+))\\\\))?)\".replace(//,\"[\"+e(\">+~`!@$%^&={}\\\\;/g,\"(?:[\\\\w\\\\u00a1-\\\\uFFFF-]|\\\\\\\\[^\\\\s0-9a-f])\").replace(//g,\"(?:[:\\\\w\\\\u00a1-\\\\uFFFF-]|\\\\\\\\[^\\\\s0-9a-f])\"));function s(){this.length=0}function u(t,i,o,a,u,c,l,f,h,p,d,m,g,b,_,y){var v,w;return(i||!this.length)&&(v=this[this.length++]=new s,i)||(v=v||this[this.length-1],!o&&!a&&v.length||(w=v[v.length++]=new n(o)),w=w||v[v.length-1],u?w.tag=r(u):c?w.id=r(c):l?(u=r(l),(c=w.classes||(w.classes={}))[u]||(c[u]=e(l),(l=w.classList||(w.classList=[])).push(u),l.sort())):g?(y=y||_,(w.pseudos||(w.pseudos=[])).push({type:1==m.length?\"class\":\"element\",name:r(g),escapedName:e(g),value:y?r(y):null,escapedValue:y?e(y):null})):f&&(d=d?e(d):null,(w.attributes||(w.attributes=[])).push({operator:h,name:r(f),escapedName:e(f),value:d?r(d):null,escapedValue:d?e(d):null}))),\"\"}function c(t){this.length=0;for(var e,r=this,n=t;t;){if((e=t.replace(a,(function(){return u.apply(r,arguments)})))===t)throw new Error(n+\" is an invalid expression\");t=e}}n.prototype.toString=function(){if(!this.raw){var t,e,r=\"\";if(r+=this.tag||\"*\",this.id&&(r+=\"#\"+this.id),this.classes&&(r+=\".\"+this.classList.join(\".\")),this.attributes)for(t=0;e=this.attributes[t++];)r+=\"[\"+e.name+(e.operator?e.operator+'\"'+e.value+'\"':\"\")+\"]\";if(this.pseudos)for(t=0;e=this.pseudos[t++];)r+=\":\"+e.name,e.value&&(r+=\"(\"+e.value+\")\");this.raw=r}return this.raw},s.prototype.toString=function(){if(!this.raw){for(var t,e=\"\",r=0;t=this[r++];)1!==r&&(e+=\" \"),\" \"!==t.combinator&&(e+=t.combinator+\" \"),e+=t;this.raw=e}return this.raw},c.prototype.toString=function(){if(!this.raw){for(var t,e=[],r=0;t=this[r++];)e.push(t);this.raw=e.join(\", \")}return this.raw};var l={};t.exports=function(t){return null==t?null:(t=(\"\"+t).replace(/^\\s+|\\s+$/g,\"\"),l[t]||(l[t]=new c(t)))}},function(t,e,r){\"use strict\";t.exports=i;var n=r(161);function i(t,e,r,n,i){this.prop=t,this.value=e,this.selector=r,this.priority=n||0,this.additionalPriority=i||[]}i.prototype.compareFunc=function(t){var e=[];e.push.apply(e,this.selector.specificity()),e.push.apply(e,this.additionalPriority),e[0]+=this.priority;var r=[];return r.push.apply(r,t.selector.specificity()),r.push.apply(r,t.additionalPriority),r[0]+=t.priority,n.compareFunc(e,r)},i.prototype.compare=function(t){return 1===this.compareFunc(t)?this:t},i.prototype.toString=function(){return this.prop+\": \"+this.value.replace(/['\"]+/g,\"\")+\";\"}},function(t,e,r){\"use strict\";var n=r(161);t.exports=function(t){function e(e,i,o){o=o||{};var a=n.parseCSS(i),s=[],u=\"style\";function c(r,n){if(r.name){var i=r.name.toUpperCase();if(-1\").get(0)).pseudoElementType=d,(i.pseudoElementParent=a)[r]=i),a=i),a.styleProps||(a.styleProps={},e(a).attr(u)&&(i=\"* { \"+e(a).attr(u)+\" } \",f(n.parseCSS(i)[0][1],new n.Selector(\"\"))}function r(t){return\"before\"===t.name||\"after\"===t.name}return t.ignoredPseudos=[\"hover\",\"active\",\"focus\",\"visited\",\"link\"],t.widthElements=[\"TABLE\",\"TD\",\"TH\",\"IMG\"],t.heightElements=[\"TABLE\",\"TD\",\"TH\",\"IMG\"],t.tableElements=[\"TABLE\",\"TH\",\"TR\",\"TD\",\"CAPTION\",\"COLGROUP\",\"COL\",\"THEAD\",\"TBODY\",\"TFOOT\"],t.nonVisualElements=[\"HEAD\",\"TITLE\",\"BASE\",\"LINK\",\"STYLE\",\"META\",\"SCRIPT\",\"NOSCRIPT\"],t.styleToAttribute={\"background-color\":\"bgcolor\",\"background-image\":\"background\",\"text-align\":\"align\",\"vertical-align\":\"valign\"},t.excludedProperties=[],t.juiceDocument=function(r,i){var o=function(e,r){return function(e,r){var i,o,a=[];return e(\"style\").each((function(){var s,u=!!(o=this).childNodes;1===(i=u?o.childNodes:o.children).length?(i=i[0].data,r.applyStyleTags&&void 0===e(o).attr(\"data-embed\")&&a.push(i),r.removeStyleTags&&void 0===e(o).attr(\"data-embed\")&&(s=u?o.childNodes[0].nodeValue:o.children[0].data,(s=n.getPreservedText(s,{mediaQueries:r.preserveMediaQueries,fontFaces:r.preserveFontFaces,keyFrames:r.preserveKeyFrames,pseudos:r.preservePseudos},t.ignoredPseudos))?u?o.childNodes[0].nodeValue=s:o.children[0].data=s:e(o).remove()),e(o).removeAttr(\"data-embed\")):r.removeStyleTags&&e(o).remove()})),a}(e,r).join(\"\\n\")}(r,i=n.getDefaultOptions(i));return e(r,o+=\"\\n\"+i.extraCss,i),r},t.inlineDocument=e,t}},function(t,e,r){var n,i,o,a;function s(t){return(s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function u(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,u),e.l=!0,e.exports}o={},u.m=i=[,,function(t){\"use strict\";function e(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function r(t,e){this.__cache=[\"\"],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||\"\",0this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,\" \"===t.__items[0]&&(t.__items.splice(0,1),--t.__character_count),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf(\"\\n\");-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},e.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},e.prototype._remove_indent=function(){0=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var t,e=this.__cache.length,r=\"\";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,r=new Array(t+1).join(this.__indent_string)),e&&(r+=new Array(e+1).join(\" \")),this.__cache.push(r)},n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},n.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline()||(this.raw||this.__add_outputline(),0))},n.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();return e&&(\"\\n\"===e[e.length-1]&&(e=e.replace(/\\n+$/g,\"\")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline(),e=this.__lines.join(\"\\n\"),\"\\n\"!==t&&(e=e.replace(/[\\n]/g,t)),e},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),1=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=r},function(t,e,r){\"use strict\";var n=r(8).InputScanner,i=r(3).Token,o=r(10).TokenStream,a=r(11).WhitespacePattern,s={START:\"TK_START\",RAW:\"TK_RAW\",EOF:\"TK_EOF\"};(r=function(t,e){this._input=new n(t),this._options=e||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new a(this._input)}).prototype.tokenize=function(){var t;this._input.restart(),this.__tokens=new o,this._reset();for(var e=new i(s.START,\"\"),r=null,n=[],a=new o;e.type!==s.EOF;){for(t=this._get_next_token(e,r);this._is_comment(t);)a.add(t),t=this._get_next_token(e,r);a.isEmpty()||(t.comments_before=a,a=new o),t.parent=r,this._is_opening(t)?(n.push(r),r=t):r&&this._is_closing(t,r)&&((t.opened=r).closed=t,r=n.pop(),t.parent=r),(t.previous=e).next=t,this.__tokens.add(t),e=t}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(s.RAW,t):this._create_token(s.EOF,\"\")},r.prototype._is_comment=function(){return!1},r.prototype._is_opening=function(){return!1},r.prototype._is_closing=function(){return!1},r.prototype._create_token=function(t,e){return new i(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=r,t.exports.TOKEN=s},function(t){\"use strict\";function e(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position/),erb:t.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:t.starting_with(/{%/).until_after(/%}/),django_value:t.starting_with(/{{/).until_after(/}}/),django_comment:t.starting_with(/{#/).until_after(/#}/)}}(o.prototype=new n)._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e},o.prototype.read_options=function(t){var e,r=this._create();for(e in i)r._disabled[e]=-1===t.templating.indexOf(e);return r._update(),r},o.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e},o.prototype.read=function(){for(var t=\"\",e=(t=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern),this._read_template());e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t},o.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp(\"(?:\"+t.join(\"|\")+\")\")},o.prototype._read_template=function(){var t,e=\"\",r=this._input.peek();return\"<\"===r?(t=this._input.peek(1),this._disabled.php||this._excluded.php||\"?\"!==t||(e=e||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||\"%\"!==t||(e=e||this.__patterns.erb.read())):\"{\"===r&&(this._disabled.handlebars||this._excluded.handlebars||(e=(e=(e=e||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=(e=e||this.__patterns.django_comment.read())||this.__patterns.django.read()))),e},t.exports.TemplatablePattern=o},,,,function(t,e,r){\"use strict\";var n=r(19).Beautifier,i=r(20).Options;t.exports=function(t,e,r,i){return new n(t,e,r,i).beautify()},t.exports.defaultOptions=function(){return new i}},function(t,e,r){\"use strict\";function n(t,e){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=t.max_preserve_newlines,this.preserve_newlines=t.preserve_newlines,this._output=new o(t,e)}var i=r(20).Options,o=r(2).Output,a=r(21).Tokenizer,s=r(21).TOKEN,u=/\\r\\n|[\\r\\n]/,c=/\\r\\n|[\\r\\n]/g;function l(t,e){return-1!==e.indexOf(t)}function f(t,e,r){this.parent=t||null,this.tag=e?e.tag_name:\"\",this.indent_level=r||0,this.parser_token=e||null}function h(t){this._printer=t,this._current_frame=null}function p(t,e,r,n){this._source_text=t||\"\",e=e||{},this._js_beautify=r,this._css_beautify=n,this._tag_stack=null,e=new i(e,\"html\"),this._options=e,this._is_wrap_attributes_force=\"force\"===this._options.wrap_attributes.substr(0,\"force\".length),this._is_wrap_attributes_force_expand_multiline=\"force-expand-multiline\"===this._options.wrap_attributes,this._is_wrap_attributes_force_aligned=\"force-aligned\"===this._options.wrap_attributes,this._is_wrap_attributes_aligned_multiple=\"aligned-multiple\"===this._options.wrap_attributes,this._is_wrap_attributes_preserve=\"preserve\"===this._options.wrap_attributes.substr(0,\"preserve\".length),this._is_wrap_attributes_preserve_aligned=\"preserve-aligned\"===this._options.wrap_attributes}n.prototype.current_line_has_match=function(t){return this._output.current_line.has_match(t)},n.prototype.set_space_before_token=function(t,e){this._output.space_before_token=t,this._output.non_breaking_space=e},n.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},n.prototype.add_raw_token=function(t){this._output.add_raw_token(t)},n.prototype.print_preserved_newlines=function(t){var e=0;t.type!==s.TEXT&&t.previous.type!==s.TEXT&&(e=t.newlines?1:0),this.preserve_newlines&&(e=t.newlines|]]>)$/.exec(a)))return void t.add_raw_token(e);u=s+r[1]+\"\\n\",a=r[4],r[5]&&(c=s+r[5]),a=a.replace(/\\n[ \\t]*$/,\"\"),(r[2]||-1!==r[3].indexOf(\"\\n\"))&&(r=r[3].match(/[ \\t]+$/))&&(e.whitespace_before=r[0])}a=a&&(i?((o=function(){this.eol=\"\\n\"}).prototype=this._options.raw_options,i(s+a,new o)):((o=e.whitespace_before)&&(a=a.replace(new RegExp(\"\\n(\"+o+\")?\",\"g\"),\"\\n\")),s+a.replace(/\\n/g,\"\\n\"+s))),u&&(a=a?u+a+\"\\n\"+c:u+c),t.print_newline(!1),a&&(e.text=a,e.whitespace_before=\"\",e.newlines=0,t.add_raw_token(e),t.print_newline(!0))}},p.prototype._handle_tag_open=function(t,e,r,n){var i=this._get_tag_open_token(e);return(r.is_unformatted||r.is_content_unformatted)&&e.type===s.TAG_OPEN&&0===e.text.indexOf(\"]*)/),this.tag_check=r?r[1]:\"\"):(r=e.text.match(/^{{(?:[\\^]|#\\*?)?([^\\s}]+)/),this.tag_check=r?r[1]:\"\",\"{{#>\"===e.text&&\">\"===this.tag_check&&null!==e.next&&(this.tag_check=e.next.text)),this.tag_check=this.tag_check.toLowerCase(),e.type===s.COMMENT&&(this.tag_complete=!0),this.is_start_tag=\"/\"!==this.tag_check.charAt(0),this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||e.closed&&\"/>\"===e.closed.text,this.is_end_tag=this.is_end_tag||\"{\"===this.tag_start_char&&(this.text.length<3||/[^#\\^]/.test(this.text.charAt(2)))):this.tag_complete=!0};p.prototype._get_tag_open_token=function(t){return(t=new d(this._tag_stack.get_parser_token(),t)).alignment_size=this._options.wrap_attributes_indent_size,t.is_end_tag=t.is_end_tag||l(t.tag_check,this._options.void_elements),t.is_empty_element=t.tag_complete||t.is_start_tag&&t.is_end_tag,t.is_unformatted=!t.tag_complete&&l(t.tag_check,this._options.unformatted),t.is_content_unformatted=!t.is_empty_element&&l(t.tag_check,this._options.content_unformatted),t.is_inline_element=l(t.tag_name,this._options.inline)||\"{\"===t.tag_start_char,t},p.prototype._set_tag_position=function(t,e,r,n,i){r.is_empty_element||(r.is_end_tag?r.start_tag_token=this._tag_stack.try_pop(r.tag_name):(this._do_optional_end_element(r)&&(r.is_inline_element||(r.parent&&(r.parent.multiline_content=!0),t.print_newline(!1))),this._tag_stack.record_tag(r),\"script\"!==r.tag_name&&\"style\"!==r.tag_name||r.is_unformatted||r.is_content_unformatted||(r.custom_beautifier_name=function(t,e){var r=null,n=null;return e.closed?(\"script\"===t?r=\"text/javascript\":\"style\"===t&&(r=\"text/css\"),-1<(r=function(t){for(var e=null,r=t.next;r.type!==s.EOF&&t.closed!==r;){if(r.type===s.ATTRIBUTE&&\"type\"===r.text){r.next&&r.next.type===s.EQUALS&&r.next.next&&r.next.next.type===s.VALUE&&(e=r.next.next.text);break}r=r.next}return e}(e)||r).search(\"text/css\")?n=\"css\":-1/);((o=function(t,e){n.call(this,t,e),this._current_tag_name=\"\",t=new a(this._input).read_options(this._options),e=new s(this._input),this.__patterns={word:t.until(/[\\n\\r\\t <]/),single_quote:t.until_after(/'/),double_quote:t.until_after(/\"/),attribute:t.until(/[\\n\\r\\t =>]|\\/>/),element_name:t.until(/[\\n\\r\\t >\\/]/),handlebars_comment:e.starting_with(/{{!--/).until_after(/--}}/),handlebars:e.starting_with(/{{/).until_after(/}}/),handlebars_open:e.until(/[\\n\\r\\t }]/),handlebars_raw_close:e.until(/}}/),comment:e.starting_with(//),cdata:e.starting_with(//),conditional_comment:e.starting_with(//),processing:e.starting_with(/<\\?/).until_after(/\\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude(\"handlebars\")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter&&(t=this._input.get_literal_regexp(this._options.unformatted_content_delimiter),this.__patterns.unformatted_content_delimiter=e.matching(t).until_after(t))}).prototype=new n)._is_comment=function(){return!1},o.prototype._is_opening=function(t){return t.type===u.TAG_OPEN},o.prototype._is_closing=function(t,e){return t.type===u.TAG_CLOSE&&e&&((\">\"===t.text||\"/>\"===t.text)&&\"<\"===e.text[0]||\"}}\"===t.text&&\"{\"===e.text[0]&&\"{\"===e.text[1])},o.prototype._reset=function(){this._current_tag_name=\"\"},o.prototype._get_next_token=function(t,e){this._readWhitespace();var r=this._input.peek();return null===r?this._create_token(u.EOF,\"\"):this._read_open_handlebars(r,e)||this._read_attribute(r,t,e)||this._read_raw_content(r,t,e)||this._read_close(r,e)||this._read_content_word(r)||this._read_comment_or_cdata(r)||this._read_processing(r)||this._read_open(r,e)||this._create_token(u.UNKNOWN,this._input.next())},o.prototype._read_comment_or_cdata=function(t){var e=null,r=null,n=null;return\"<\"===t&&(\"!\"===this._input.peek(1)&&((r=this.__patterns.comment.read())?(n=c.get_directives(r))&&\"start\"===n.ignore&&(r+=c.readIgnored(this._input)):r=this.__patterns.cdata.read()),r&&((e=this._create_token(u.COMMENT,r)).directives=n)),e},o.prototype._read_processing=function(t){var e=null,r=null;return\"<\"===t&&(\"!\"!==(t=this._input.peek(1))&&\"?\"!==t||(r=(r=this.__patterns.conditional_comment.read())||this.__patterns.processing.read()),r&&((e=this._create_token(u.COMMENT,r)).directives=null)),e},o.prototype._read_open=function(t,e){var r=null,n=null;return e||\"<\"===t&&(r=this._input.next(),\"/\"===this._input.peek()&&(r+=this._input.next()),r+=this.__patterns.element_name.read(),n=this._create_token(u.TAG_OPEN,r)),n},o.prototype._read_open_handlebars=function(t,e){var r=null,n=null;return e||this._options.indent_handlebars&&\"{\"===t&&\"{\"===this._input.peek(1)&&(n=\"!\"===this._input.peek(2)?(r=(r=this.__patterns.handlebars_comment.read())||this.__patterns.handlebars.read(),this._create_token(u.COMMENT,r)):(r=this.__patterns.handlebars_open.read(),this._create_token(u.TAG_OPEN,r))),n},o.prototype._read_close=function(t,e){var r=null,n=null;return e&&(\"<\"===e.text[0]&&(\">\"===t||\"/\"===t&&\">\"===this._input.peek(1))?(r=this._input.next(),\"/\"===t&&(r+=this._input.next()),n=this._create_token(u.TAG_CLOSE,r)):\"{\"===e.text[0]&&\"}\"===t&&\"}\"===this._input.peek(1)&&(this._input.next(),this._input.next(),n=this._create_token(u.TAG_CLOSE,\"}}\"))),n},o.prototype._read_attribute=function(t,e,r){var n=null;return r&&\"<\"===r.text[0]&&(\"=\"===t?n=this._create_token(u.EQUALS,this._input.next()):'\"'===t||\"'\"===t?(r=this._input.next(),r+=('\"'===t?this.__patterns.double_quote:this.__patterns.single_quote).read(),n=this._create_token(u.VALUE,r)):(r=this.__patterns.attribute.read())&&(n=e.type===u.EQUALS?this._create_token(u.VALUE,r):this._create_token(u.ATTRIBUTE,r))),n},o.prototype._is_content_unformatted=function(t){return-1===this._options.void_elements.indexOf(t)&&(-1!==this._options.content_unformatted.indexOf(t)||-1!==this._options.unformatted.indexOf(t))},o.prototype._read_raw_content=function(t,e,r){var n=\"\";if(r&&\"{\"===r.text[0])n=this.__patterns.handlebars_raw_close.read();else if(e.type===u.TAG_CLOSE&&\"<\"===e.opened.text[0])if(\"script\"===(e=e.opened.text.substr(1).toLowerCase())||\"style\"===e){if(t=this._read_comment_or_cdata(t))return t.type=u.TEXT,t;n=this._input.readUntil(new RegExp(\"\",\"ig\"))}else this._is_content_unformatted(e)&&(n=this._input.readUntil(new RegExp(\"\",\"ig\")));return n?this._create_token(u.TEXT,n):null},o.prototype._read_content_word=function(t){var e=\"\";if(this._options.unformatted_content_delimiter&&t===this._options.unformatted_content_delimiter[0]&&(e=this.__patterns.unformatted_content_delimiter.read()),e=e||this.__patterns.word.read())return this._create_token(u.TEXT,e)},t.exports.Tokenizer=o,t.exports.TOKEN=u}],u.c=o,u.d=function(t,e,r){u.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},u.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},u.t=function(t,e){if(1&e&&(t=u(t)),8&e)return t;if(4&e&&\"object\"===s(t)&&t&&t.__esModule)return t;var r=Object.create(null);if(u.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var n in t)u.d(r,n,function(e){return t[e]}.bind(null,n));return r},u.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return u.d(e,\"a\",e),e},u.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},u.p=\"\",a=u(u.s=18),n=[r,r(163),r(164)],void 0===(n=function(){var t=r(163),e=r(164);return{html_beautify:function(r,n){return a(r,n,t.js_beautify,e.css_beautify)}}}.apply(e,n))||(t.exports=n)},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}var i=r(577),o=r(651).decode,a=r(652).HTMLParser,s=r(653),u=r(667),c=r(668),l=r(307);function f(t){return t&&t.replace(/^[ \\n\\r\\t\\f]+/,\"\").replace(/[ \\n\\r\\t\\f]+$/,\"\")}function h(t){return t&&t.replace(/[ \\n\\r\\t\\f\\xA0]+/g,(function(t){return\"\\t\"===t?\"\\t\":t.replace(/(^|\\xA0+)[^\\xA0]+/g,\"$1 \")}))}function p(t,e,r,n,i){var o=\"\",a=\"\";return e.preserveLineBreaks&&(t=t.replace(/^[ \\n\\r\\t\\f]*?[\\n\\r][ \\n\\r\\t\\f]*/,(function(){return o=\"\\n\",\"\"})).replace(/[ \\n\\r\\t\\f]*?[\\n\\r][ \\n\\r\\t\\f]*$/,(function(){return a=\"\\n\",\"\"}))),r&&(t=t.replace(/^[ \\n\\r\\t\\f\\xA0]+/,(function(t){var r=!o&&e.conservativeCollapse;return r&&\"\\t\"===t?\"\\t\":t.replace(/^[^\\xA0]+/,\"\").replace(/(\\xA0+)[^\\xA0]+/g,\"$1 \")||(r?\" \":\"\")}))),n&&(t=t.replace(/[ \\n\\r\\t\\f\\xA0]+$/,(function(t){var r=!a&&e.conservativeCollapse;return r&&\"\\t\"===t?\"\\t\":t.replace(/[^\\xA0]+(\\xA0+)/g,\" $1\").replace(/[^\\xA0]+$/,\"\")||(r?\" \":\"\")}))),i&&(t=h(t)),o+t+a}var d=(r=l.createMapFromString)(\"a,abbr,acronym,b,bdi,bdo,big,button,cite,code,del,dfn,em,font,i,ins,kbd,label,mark,math,nobr,object,q,rp,rt,rtc,ruby,s,samp,select,small,span,strike,strong,sub,sup,svg,textarea,time,tt,u,var\"),m=r(\"a,abbr,acronym,b,big,del,em,font,i,ins,kbd,mark,nobr,rp,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var\"),g=r(\"comment,img,input,wbr\");function b(t,e,r,n){var i=e&&!g(e);i&&!n.collapseInlineTagWhitespace&&(i=\"/\"===e.charAt(0)?!d(e.slice(1)):!m(e));var o=r&&!g(r);return o&&!n.collapseInlineTagWhitespace&&(o=\"/\"===r.charAt(0)?!m(r.slice(1)):!d(r)),p(t,n,i,o,e&&r)}function _(t,e){for(var r=t.length;r--;)if(t[r].name.toLowerCase()===e)return 1}var y=l.createMap([\"text/javascript\",\"text/ecmascript\",\"text/jscript\",\"application/javascript\",\"application/x-javascript\",\"application/ecmascript\"]);function v(t){return\"\"===(t=f(t.split(/;/,2)[0]).toLowerCase())||y(t)}function w(t){return\"\"===(t=f(t).toLowerCase())||\"text/css\"===t}function E(t,e){if(\"style\"===t){for(var r=0,n=e.length;r([\\s\\S]*?)/g,(function(t,n){l||(l=Z(e),i=new RegExp(\"^\"+l+\"([0-9]+)$\"),r.ignoreCustomComments?r.ignoreCustomComments=r.ignoreCustomComments.slice():r.ignoreCustomComments=[],r.ignoreCustomComments.push(i));var i=\"\\x3c!--\"+l+nt.length+\"--\\x3e\";return nt.push(n),i}));var ot=r.ignoreCustomFragments.map((function(t){return t.source}));function at(t,e){return r.canTrimWhitespace(t,e,X)}function st(){for(var t=y.length-1;0$/);if(o)n=o[1];else if(/>$/.test(i)||(y[t]=b(i,null,e,r)))break}}function lt(t){var e,r=y.length-1;1]+$/.test(t)}(u)?a=!n||e||/\\/$/.test(u)?u+\" \":u:(r.preventAttributesEscaping||(u='\"'==(t=void 0===r.quoteCharacter?(u.match(/'/g)||[]).length<(u.match(/\"/g)||[]).length?\"'\":'\"':\"'\"===r.quoteCharacter?\"'\":'\"')?u.replace(/\"/g,\""\"):u.replace(/'/g,\"'\")),a=t+u+t,n||r.removeTagWhitespace||(a+=\" \")),void 0===u||r.collapseBooleanAttributes&&function(t,e){return T(t)||\"draggable\"===t&&!A(e)}(s.toLowerCase(),u.toLowerCase())?(o=s,n||(o+=\" \")):o=s+c.customAssign+a,c.customOpen+o+c.customClose}(d,l,r,p,g)),p=!1)}0\"),o&&!r.includeAutoGeneratedTags&&(st(),et=\"\")},end:function(t,e,n){\"svg\"===t.toLowerCase()&&(r=Object.getPrototypeOf(r)),t=r.name(t),r.collapseWhitespace&&(K.length?t===K[K.length-1]&&K.pop():lt(\"/\"+t),tt.length&&t===tt[tt.length-1]&&tt.pop());var i=!1;t===x&&(x=\"\",i=!c),r.removeOptionalTags&&(i&&H(et)&&st(),et=\"\",!G(t)||!rt||V(rt)||\"p\"===rt&&L(t)||ut(),rt=C(t)?t:\"\"),r.removeEmptyElements&&i&&function(t,e){switch(t){case\"textarea\":return;case\"audio\":case\"script\":case\"video\":if(W(\"src\",e))return;break;case\"iframe\":if(W(\"src\",e)||W(\"srcdoc\",e))return;break;case\"object\":if(W(\"data\",e))return;break;case\"applet\":if(W(\"code\",e))return}return 1}(t,e)?(st(),rt=et=\"\"):(n&&!r.includeAutoGeneratedTags?rt=\"\":y.push(\"\"),s=\"/\"+t,d(t)?i&&(w+=\"|\"):w=\"\")},chars:function(e,n,i){if(n=\"\"===n?\"comment\":n,i=\"\"===i?\"comment\":i,r.decodeEntities&&e&&!J(x)&&(e=o(e)),r.collapseWhitespace){if(!K.length){var a;if(\"comment\"!==n||-1===(a=y[y.length-1]).indexOf(l)&&(a||(n=s),1\":\"--\\x3e\",e=function(t){return/^\\[if\\s[^\\]]+]|\\[endif]$/.test(t)}(e)?i+function(e,r){return r.processConditionalComments?e.replace(/^(\\[if\\s[^\\]]+]>)([\\s\\S]*?)(\":h(t))}}),r.removeOptionalTags&&(H(et)&&st(),rt&&!V(rt)&&ut()),r.collapseWhitespace&<(\"br\"),function(t,e,r,n){var i,o=e.maxLineLength;if(o){for(var a=\"\",s=[];t.length;){var u=a.length,c=t[0].indexOf(\"\\n\");c<0?a+=n(r(t.shift())):(a+=n(r(t[0].slice(0,c))),t[0]=t[0].slice(c+1)),0o?(s.push(a.slice(0,u)),a=a.slice(u)):0<=c&&(s.push(a),a=\"\")}a&&s.push(a),i=s.join(\"\\n\")}else i=n(r(t.join(\"\")));return e.collapseWhitespace?p(i,e,!0,!0):i}(y,r,_?function(t){return t.replace(_,(function(t,e,n,i){return n=it[+n][0],r.collapseWhitespace?(\"\\t\"!==e&&(n=e+n),\"\\t\"!==i&&(n+=i),p(n,{preserveLineBreaks:r.preserveLineBreaks,conservativeCollapse:!r.trimCustomFragments},/^[ \\n\\r\\t\\f]/.test(n),/[ \\n\\r\\t\\f]$/.test(n))):n}))}:Q,l?function(t){return t.replace(new RegExp(\"\\x3c!--\"+l+\"([0-9]+)--\\x3e\",\"g\"),(function(t,e){return nt[+e]}))}:Q)}(t,e=function(t){var e={name:function(t){return t.toLowerCase()},canCollapseWhitespace:Y,canTrimWhitespace:X,html5:!0,ignoreCustomComments:[/^!/],ignoreCustomFragments:[/<%[\\s\\S]*?%>/,/<\\?[\\s\\S]*?\\?>/],includeAutoGeneratedTags:!0,log:Q,minifyCSS:Q,minifyJS:Q,minifyURLs:Q};return Object.keys(t).forEach((function(r){var o=t[r];\"caseSensitive\"===r?o&&(e.name=Q):\"log\"===r?\"function\"==typeof o&&(e.log=o):\"minifyCSS\"===r&&\"function\"!=typeof o?o&&(\"object\"!==n(o)&&(o={}),e.minifyCSS=function(t,r){t=t.replace(/(url\\s*\\(\\s*)(\"|'|)(.*?)\\2(\\s*\\))/gi,(function(t,r,n,i,o){return r+n+e.minifyURLs(i)+n+o}));var n=new i(o).minify(k(t,r));return 0\\s*$/,\"\"):t;return o.parse.bare_returns=r,(n=c.minify(n,o)).error?(e.log(n.error),t):n.code.replace(/;$/,\"\")}):\"minifyURLs\"===r&&\"function\"!=typeof o?o&&(\"string\"==typeof o?o={site:o}:\"object\"!==n(o)&&(o={}),e.minifyURLs=function(t){try{return s.relate(t,o)}catch(r){return e.log(r),t}}):e[r]=o})),e}(e||{})),e.log(\"minified in: \"+(Date.now()-r)+\"ms\"),t}},function(t,e,r){t.exports=r(578)},function(t,e,r){(function(e){var n=r(579),i=r(580),o=r(588),a=r(612),s=r(613),u=r(614),c=r(113).formatFrom,l=r(628),f=r(629),h=r(630),p=r(32).OptimizationLevel,d=r(32).optimizationLevelFrom,m=r(631),g=r(632),b=r(633),_=r(640),y=r(649),v=r(650),w=t.exports=function(t){t=t||{},this.options={compatibility:s(t.compatibility),fetch:u(t.fetch),format:c(t.format),inline:l(t.inline),inlineRequest:f(t.inlineRequest),inlineTimeout:h(t.inlineTimeout),level:d(t.level),rebase:m(t.rebase),rebaseTo:g(t.rebaseTo),returnPromise:!!t.returnPromise,sourceMap:!!t.sourceMap,sourceMapInlineSources:!!t.sourceMapInlineSources}};function E(t,r,s,u){var c=\"function\"!=typeof s?s:null,l=\"function\"==typeof u?u:\"function\"==typeof s?s:null,f={stats:{efficiency:0,minifiedSize:0,originalSize:0,startedAt:Date.now(),timeSpent:0},cache:{specificity:{}},errors:[],inlinedStylesheets:[],inputSourceMapTracker:b(),localOnly:!l,options:r,source:null,sourcesContent:{},validator:a(r.compatibility),warnings:[]};return c&&f.inputSourceMapTracker.track(void 0,c),function(t){return t?function(t){return t()}:e.nextTick}(f.localOnly)((function(){return _(t,f,(function(t){return t=function(t,e){return t.stats=function(t,e){var r=Date.now()-e.stats.startedAt;return delete e.stats.startedAt,e.stats.timeSpent=r,e.stats.efficiency=1-t.length/e.stats.originalSize,e.stats.minifiedSize=t.length,e.stats}(t.styles,e),t.errors=e.errors,t.inlinedStylesheets=e.inlinedStylesheets,t.warnings=e.warnings,t}((f.options.sourceMap?v:y)(function(t,e){var r=n(t,e);return r=p.One in e.options.level?i(t,e):t,p.Two in e.options.level?o(t,e,!0):r}(t,f),f),f),l?l(0s.length?1:a.length==s.length?0:-1}},function(t,e){e.endianness=function(){return\"LE\"},e.hostname=function(){return\"undefined\"!=typeof location?location.hostname:\"\"},e.loadavg=function(){return[]},e.uptime=function(){return 0},e.freemem=function(){return Number.MAX_VALUE},e.totalmem=function(){return Number.MAX_VALUE},e.cpus=function(){return[]},e.type=function(){return\"Browser\"},e.release=function(){return\"undefined\"!=typeof navigator?navigator.appVersion:\"\"},e.networkInterfaces=e.getNetworkInterfaces=function(){return{}},e.arch=function(){return\"javascript\"},e.platform=function(){return\"browser\"},e.tmpdir=e.tmpDir=function(){return\"/tmp\"},e.EOL=\"\\n\",e.homedir=function(){return\"/\"}},function(t){var e=/^@media\\W/;t.exports=function(t,r){for(var n,i=t.length-1;0<=i;i--)n=!r&&e.test(t[i][1]),t[i][1]=t[i][1].replace(/\\n|\\r\\n/g,\" \").replace(/\\s+/g,\" \").replace(/(,|:|\\() /g,\"$1\").replace(/ \\)/g,\")\").replace(/'([a-zA-Z][a-zA-Z\\d\\-_]+)'/,\"$1\").replace(/\"([a-zA-Z][a-zA-Z\\d\\-_]+)\"/,\"$1\").replace(n?/\\) /g:null,\")\");return t}},function(t){t.exports=function(t){return t.replace(/\\s+/g,\" \").replace(/url\\(\\s+/g,\"url(\").replace(/\\s+\\)/g,\")\").trim()}},function(t,e,r){var n=r(589),i=r(600),o=r(603),a=r(604),s=r(605),u=r(606),c=r(607),l=r(608),f=r(609),h=r(610),p=r(116),d=r(32).OptimizationLevel,m=r(7);t.exports=function t(e,r,g){var b,_,y=r.options.level[d.Two];if(function(e,r){for(var n=0,i=e.length;nObject.keys(b).length||!function(t){var e,r;for(r in t){if(void 0!==e&&t[r].important!=e)return 1;e=t[r].important}}(b)&&function(t,e,r){var i,s,u,c,f=a[e],p=(e=[h.PROPERTY,[h.PROPERTY_NAME,e],[h.PROPERTY_VALUE,f.defaultValue]],l(e));for(o([p],r,[]),u=0,c=f.components.length;u~\\+]/;t.exports=function(t){for(var e,r,a,s,u,c=[0,0,0],l=0,f=!1,h=!1,p=0,d=t.length;p\\+~:]+/g,\"\")}t.exports=function(t,e){for(var r=e.options,f=r.level[a.Two].mergeSemantically,h=r.compatibility.selectors.adjacentSpace,p=r.level[a.One].selectorsSortingMethod,d=r.compatibility.selectors.mergeablePseudoClasses,m=r.compatibility.selectors.mergeablePseudoElements,g=r.compatibility.selectors.multiplePseudoMerging,b={},_=t.length-1;0<=_;_--){var y,v,w=t[_];w[0]==c.RULE&&(0e[1]?1:t[1]==e[1]?0:-1}function A(t,e,r){return function t(e,r,n,i){var o=[[e,function(t,e,r){for(var n=0,i=t.length-1;0<=i;i--)n+=t[i][2].length>r?l(t[i][1]).length:-1;return n-(t.length-1)*e+1}(e,r,n)]];if(2d?(S(k+1,_[R]),_.splice(R,1),q=!(b[I]=[j])):(b[I]=b[I]||[],b[I].push(j)),q?_[R]=function(t,e){return(t=u(t))[5]=t[5].concat(e[5]),t}(_[R],B):_.push(B))}for(D=0,C=(v=v.sort(f)).length;De[1]?1:-1}t.exports=function(t){for(var r=[],n=[],i=0,o=t.length;i= 0x80 (not a basic code point)\",\"invalid-input\":\"Invalid input\"},_=Math.floor,y=String.fromCharCode;function v(t){throw new RangeError(b[t])}function w(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function E(t,e){var r=t.split(\"@\"),n=\"\";return 1>>10&1023|55296),t=56320|1023&t),e+y(t)})).join(\"\")}function x(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function S(t,e,r){var n=0;for(t=r?_(t/700):t>>1,t+=_(t/e);455_((h-l)/o))&&v(\"overflow\"),l+=s*o,!(s<(s=a<=d?1:d+26<=a?26:a-d));a+=p)o>_(h/(s=p-s))&&v(\"overflow\"),o*=s;d=S(l-i,e=u.length+1,0==i),_(l/e)>h-f&&v(\"overflow\"),f+=_(l/e),l%=e,u.splice(l++,0,f)}return A(u)}function k(t){for(var e,r,n,i,o,a,s,u,c,l,f,d=[],m=(t=T(t)).length,g=128,b=72,w=e=0;w_((h-e)/(c=r+1))&&v(\"overflow\"),e+=(i-g)*c,g=i,w=0;wh&&v(\"overflow\"),u==g){for(o=e,a=p;!(o<(s=a<=b?1:b+26<=a?26:a-b));a+=p)f=o-s,l=p-s,d.push(y(x(s+f%l,0))),o=_(f/l);d.push(y(x(o,0))),b=S(e,c,r==n),e=0,++r}++e,++g}return d.join(\"\")}if(l={version:\"1.4.1\",ucs2:{decode:T,encode:A},decode:O,encode:k,toASCII:function(t){return E(t,(function(t){return m.test(t)?\"xn--\"+k(t):t}))},toUnicode:function(t){return E(t,(function(t){return d.test(t)?O(t.slice(4).toLowerCase()):t}))}},\"object\"==o(r(119))&&r(119))void 0===(i=function(){return l}.call(e,r,e,t))||(t.exports=i);else if(s&&u)if(t.exports==s)u.exports=l;else for(f in l)l.hasOwnProperty(f)&&(s[f]=l[f]);else a.punycode=l}(this)}).call(this,r(28)(t),r(9))},function(t){\"use strict\";function e(t){return(e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}t.exports={isString:function(t){return\"string\"==typeof t},isObject:function(t){return\"object\"===e(t)&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,r){\"use strict\";e.decode=e.parse=r(623),e.encode=e.stringify=r(624)},function(t){\"use strict\";t.exports=function(t,r,n,i){r=r||\"&\",n=n||\"=\";var o={};if(\"string\"!=typeof t||0===t.length)return o;var a=/\\+/g;t=t.split(r),r=1e3,i&&\"number\"==typeof i.maxKeys&&(r=i.maxKeys);var s=t.length;0s;)c.column--,o=e[u].originalPositionFor(c);return!o||o.column<0?r:null===o.line&&1=this._sources.size()&&!this.sourcesContent.some((function(t){return null==t}))},c.prototype.sourceContentFor=function(t,e){if(!this.sourcesContent)return null;if(0<=(i=this._findSourceIndex(t)))return this.sourcesContent[i];var r,i=t;if(null!=this.sourceRoot&&(i=n.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(r=n.urlParse(this.sourceRoot))){if(t=i.replace(/^file:\\/\\//,\"\"),\"file\"==r.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!r.path||\"/\"==r.path)&&this._sources.has(\"/\"+i))return this.sourcesContent[this._sources.indexOf(\"/\"+i)]}if(e)return null;throw new Error('\"'+i+'\" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(t){var e=n.getArg(t,\"source\");return(e=this._findSourceIndex(e))<0?{line:null,column:null,lastColumn:null}:(e={source:e,originalLine:n.getArg(t,\"line\"),originalColumn:n.getArg(t,\"column\")},0<=(t=this._findMapping(e,this._originalMappings,\"originalLine\",\"originalColumn\",n.compareByOriginalPositions,n.getArg(t,\"bias\",u.GREATEST_LOWER_BOUND)))&&(t=this._originalMappings[t]).source===e.source?{line:n.getArg(t,\"generatedLine\",null),column:n.getArg(t,\"generatedColumn\",null),lastColumn:n.getArg(t,\"lastGeneratedColumn\",null)}:{line:null,column:null,lastColumn:null})},e.BasicSourceMapConsumer=c,(f.prototype=Object.create(u.prototype)).constructor=u,f.prototype._version=3,Object.defineProperty(f.prototype,\"sources\",{get:function(){for(var t=[],e=0;et.format.wrapAt&&(a(t,t.format.breakWith),t.output.push(t.format.breakWith))}function a(t,e){e=e.split(\"\\n\"),t.line+=e.length-1,t.column=1t.format.wrapAt&&(l(t,t.format.breakWith,!1),t.output.push(t.format.breakWith))}function l(t,e,r){e=e.split(\"\\n\"),r&&function(t,e){for(var r=0,n=e.length;r>>10&1023|55296),t=56320|1023&t),r+=C(t))}function p(t){return\"&#x\"+t.toString(16).toUpperCase()+\";\"}function d(t){return\"&#\"+t+\";\"}function m(t,e){function r(t){return a(t.charCodeAt(0))}(e=f(e,m.options)).strict&&A.test(t)&&j(\"forbidden code point\");var n=e.encodeEverything,i=e.useNamedReferences,o=e.allowUnsafeSymbols,a=e.decimal?d:p;return n?(t=t.replace(b,(function(t){return i&&l(v,t)?\"&\"+v[t]+\";\":r(t)})),i&&(t=t.replace(/>\\u20D2/g,\">⃒\").replace(/<\\u20D2/g,\"<⃒\").replace(/fj/g,\"fj\")),i&&(t=t.replace(y,(function(t){return\"&\"+v[t]+\";\"})))):i?(o||(t=t.replace(w,(function(t){return\"&\"+v[t]+\";\"}))),t=(t=t.replace(/>\\u20D2/g,\">⃒\").replace(/<\\u20D2/g,\"<⃒\")).replace(y,(function(t){return\"&\"+v[t]+\";\"}))):o||(t=t.replace(w,r)),t.replace(g,(function(t){var e=t.charCodeAt(0);return t=t.charCodeAt(1),a(1024*(e-55296)+t-56320+65536)})).replace(_,r)}c.global!==c&&c.window!==c||(a=c);var g=/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,b=/[\\x01-\\x7F]/g,_=/[\\x01-\\t\\x0B\\f\\x0E-\\x1F\\x7F\\x81\\x8D\\x8F\\x90\\x9D\\xA0-\\uFFFF]/g,y=/<\\u20D2|=\\u20E5|>\\u20D2|\\u205F\\u200A|\\u219D\\u0338|\\u2202\\u0338|\\u2220\\u20D2|\\u2229\\uFE00|\\u222A\\uFE00|\\u223C\\u20D2|\\u223D\\u0331|\\u223E\\u0333|\\u2242\\u0338|\\u224B\\u0338|\\u224D\\u20D2|\\u224E\\u0338|\\u224F\\u0338|\\u2250\\u0338|\\u2261\\u20E5|\\u2264\\u20D2|\\u2265\\u20D2|\\u2266\\u0338|\\u2267\\u0338|\\u2268\\uFE00|\\u2269\\uFE00|\\u226A\\u0338|\\u226A\\u20D2|\\u226B\\u0338|\\u226B\\u20D2|\\u227F\\u0338|\\u2282\\u20D2|\\u2283\\u20D2|\\u228A\\uFE00|\\u228B\\uFE00|\\u228F\\u0338|\\u2290\\u0338|\\u2293\\uFE00|\\u2294\\uFE00|\\u22B4\\u20D2|\\u22B5\\u20D2|\\u22D8\\u0338|\\u22D9\\u0338|\\u22DA\\uFE00|\\u22DB\\uFE00|\\u22F5\\u0338|\\u22F9\\u0338|\\u2933\\u0338|\\u29CF\\u0338|\\u29D0\\u0338|\\u2A6D\\u0338|\\u2A70\\u0338|\\u2A7D\\u0338|\\u2A7E\\u0338|\\u2AA1\\u0338|\\u2AA2\\u0338|\\u2AAC\\uFE00|\\u2AAD\\uFE00|\\u2AAF\\u0338|\\u2AB0\\u0338|\\u2AC5\\u0338|\\u2AC6\\u0338|\\u2ACB\\uFE00|\\u2ACC\\uFE00|\\u2AFD\\u20E5|[\\xA0-\\u0113\\u0116-\\u0122\\u0124-\\u012B\\u012E-\\u014D\\u0150-\\u017E\\u0192\\u01B5\\u01F5\\u0237\\u02C6\\u02C7\\u02D8-\\u02DD\\u0311\\u0391-\\u03A1\\u03A3-\\u03A9\\u03B1-\\u03C9\\u03D1\\u03D2\\u03D5\\u03D6\\u03DC\\u03DD\\u03F0\\u03F1\\u03F5\\u03F6\\u0401-\\u040C\\u040E-\\u044F\\u0451-\\u045C\\u045E\\u045F\\u2002-\\u2005\\u2007-\\u2010\\u2013-\\u2016\\u2018-\\u201A\\u201C-\\u201E\\u2020-\\u2022\\u2025\\u2026\\u2030-\\u2035\\u2039\\u203A\\u203E\\u2041\\u2043\\u2044\\u204F\\u2057\\u205F-\\u2063\\u20AC\\u20DB\\u20DC\\u2102\\u2105\\u210A-\\u2113\\u2115-\\u211E\\u2122\\u2124\\u2127-\\u2129\\u212C\\u212D\\u212F-\\u2131\\u2133-\\u2138\\u2145-\\u2148\\u2153-\\u215E\\u2190-\\u219B\\u219D-\\u21A7\\u21A9-\\u21AE\\u21B0-\\u21B3\\u21B5-\\u21B7\\u21BA-\\u21DB\\u21DD\\u21E4\\u21E5\\u21F5\\u21FD-\\u2205\\u2207-\\u2209\\u220B\\u220C\\u220F-\\u2214\\u2216-\\u2218\\u221A\\u221D-\\u2238\\u223A-\\u2257\\u2259\\u225A\\u225C\\u225F-\\u2262\\u2264-\\u228B\\u228D-\\u229B\\u229D-\\u22A5\\u22A7-\\u22B0\\u22B2-\\u22BB\\u22BD-\\u22DB\\u22DE-\\u22E3\\u22E6-\\u22F7\\u22F9-\\u22FE\\u2305\\u2306\\u2308-\\u2310\\u2312\\u2313\\u2315\\u2316\\u231C-\\u231F\\u2322\\u2323\\u232D\\u232E\\u2336\\u233D\\u233F\\u237C\\u23B0\\u23B1\\u23B4-\\u23B6\\u23DC-\\u23DF\\u23E2\\u23E7\\u2423\\u24C8\\u2500\\u2502\\u250C\\u2510\\u2514\\u2518\\u251C\\u2524\\u252C\\u2534\\u253C\\u2550-\\u256C\\u2580\\u2584\\u2588\\u2591-\\u2593\\u25A1\\u25AA\\u25AB\\u25AD\\u25AE\\u25B1\\u25B3-\\u25B5\\u25B8\\u25B9\\u25BD-\\u25BF\\u25C2\\u25C3\\u25CA\\u25CB\\u25EC\\u25EF\\u25F8-\\u25FC\\u2605\\u2606\\u260E\\u2640\\u2642\\u2660\\u2663\\u2665\\u2666\\u266A\\u266D-\\u266F\\u2713\\u2717\\u2720\\u2736\\u2758\\u2772\\u2773\\u27C8\\u27C9\\u27E6-\\u27ED\\u27F5-\\u27FA\\u27FC\\u27FF\\u2902-\\u2905\\u290C-\\u2913\\u2916\\u2919-\\u2920\\u2923-\\u292A\\u2933\\u2935-\\u2939\\u293C\\u293D\\u2945\\u2948-\\u294B\\u294E-\\u2976\\u2978\\u2979\\u297B-\\u297F\\u2985\\u2986\\u298B-\\u2996\\u299A\\u299C\\u299D\\u29A4-\\u29B7\\u29B9\\u29BB\\u29BC\\u29BE-\\u29C5\\u29C9\\u29CD-\\u29D0\\u29DC-\\u29DE\\u29E3-\\u29E5\\u29EB\\u29F4\\u29F6\\u2A00-\\u2A02\\u2A04\\u2A06\\u2A0C\\u2A0D\\u2A10-\\u2A17\\u2A22-\\u2A27\\u2A29\\u2A2A\\u2A2D-\\u2A31\\u2A33-\\u2A3C\\u2A3F\\u2A40\\u2A42-\\u2A4D\\u2A50\\u2A53-\\u2A58\\u2A5A-\\u2A5D\\u2A5F\\u2A66\\u2A6A\\u2A6D-\\u2A75\\u2A77-\\u2A9A\\u2A9D-\\u2AA2\\u2AA4-\\u2AB0\\u2AB3-\\u2AC8\\u2ACB\\u2ACC\\u2ACF-\\u2ADB\\u2AE4\\u2AE6-\\u2AE9\\u2AEB-\\u2AF3\\u2AFD\\uFB00-\\uFB04]|\\uD835[\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDCCF\\uDD04\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDD6B]/g,v={\"­\":\"shy\",\"‌\":\"zwnj\",\"‍\":\"zwj\",\"‎\":\"lrm\",\"⁣\":\"ic\",\"⁢\":\"it\",\"⁡\":\"af\",\"‏\":\"rlm\",\"​\":\"ZeroWidthSpace\",\"⁠\":\"NoBreak\",\"̑\":\"DownBreve\",\"⃛\":\"tdot\",\"⃜\":\"DotDot\",\"\\t\":\"Tab\",\"\\n\":\"NewLine\",\" \":\"puncsp\",\" \":\"MediumSpace\",\" \":\"thinsp\",\" \":\"hairsp\",\" \":\"emsp13\",\" \":\"ensp\",\" \":\"emsp14\",\" \":\"emsp\",\" \":\"numsp\",\" \":\"nbsp\",\"  \":\"ThickSpace\",\"‾\":\"oline\",_:\"lowbar\",\"‐\":\"dash\",\"–\":\"ndash\",\"—\":\"mdash\",\"―\":\"horbar\",\",\":\"comma\",\";\":\"semi\",\"⁏\":\"bsemi\",\":\":\"colon\",\"⩴\":\"Colone\",\"!\":\"excl\",\"¡\":\"iexcl\",\"?\":\"quest\",\"¿\":\"iquest\",\".\":\"period\",\"‥\":\"nldr\",\"…\":\"mldr\",\"·\":\"middot\",\"'\":\"apos\",\"‘\":\"lsquo\",\"’\":\"rsquo\",\"‚\":\"sbquo\",\"‹\":\"lsaquo\",\"›\":\"rsaquo\",'\"':\"quot\",\"“\":\"ldquo\",\"”\":\"rdquo\",\"„\":\"bdquo\",\"«\":\"laquo\",\"»\":\"raquo\",\"(\":\"lpar\",\")\":\"rpar\",\"[\":\"lsqb\",\"]\":\"rsqb\",\"{\":\"lcub\",\"}\":\"rcub\",\"⌈\":\"lceil\",\"⌉\":\"rceil\",\"⌊\":\"lfloor\",\"⌋\":\"rfloor\",\"⦅\":\"lopar\",\"⦆\":\"ropar\",\"⦋\":\"lbrke\",\"⦌\":\"rbrke\",\"⦍\":\"lbrkslu\",\"⦎\":\"rbrksld\",\"⦏\":\"lbrksld\",\"⦐\":\"rbrkslu\",\"⦑\":\"langd\",\"⦒\":\"rangd\",\"⦓\":\"lparlt\",\"⦔\":\"rpargt\",\"⦕\":\"gtlPar\",\"⦖\":\"ltrPar\",\"⟦\":\"lobrk\",\"⟧\":\"robrk\",\"⟨\":\"lang\",\"⟩\":\"rang\",\"⟪\":\"Lang\",\"⟫\":\"Rang\",\"⟬\":\"loang\",\"⟭\":\"roang\",\"❲\":\"lbbrk\",\"❳\":\"rbbrk\",\"‖\":\"Vert\",\"§\":\"sect\",\"¶\":\"para\",\"@\":\"commat\",\"*\":\"ast\",\"/\":\"sol\",undefined:null,\"&\":\"amp\",\"#\":\"num\",\"%\":\"percnt\",\"‰\":\"permil\",\"‱\":\"pertenk\",\"†\":\"dagger\",\"‡\":\"Dagger\",\"•\":\"bull\",\"⁃\":\"hybull\",\"′\":\"prime\",\"″\":\"Prime\",\"‴\":\"tprime\",\"⁗\":\"qprime\",\"‵\":\"bprime\",\"⁁\":\"caret\",\"`\":\"grave\",\"´\":\"acute\",\"˜\":\"tilde\",\"^\":\"Hat\",\"¯\":\"macr\",\"˘\":\"breve\",\"˙\":\"dot\",\"¨\":\"die\",\"˚\":\"ring\",\"˝\":\"dblac\",\"¸\":\"cedil\",\"˛\":\"ogon\",\"ˆ\":\"circ\",\"ˇ\":\"caron\",\"°\":\"deg\",\"©\":\"copy\",\"®\":\"reg\",\"℗\":\"copysr\",\"℘\":\"wp\",\"℞\":\"rx\",\"℧\":\"mho\",\"℩\":\"iiota\",\"←\":\"larr\",\"↚\":\"nlarr\",\"→\":\"rarr\",\"↛\":\"nrarr\",\"↑\":\"uarr\",\"↓\":\"darr\",\"↔\":\"harr\",\"↮\":\"nharr\",\"↕\":\"varr\",\"↖\":\"nwarr\",\"↗\":\"nearr\",\"↘\":\"searr\",\"↙\":\"swarr\",\"↝\":\"rarrw\",\"↝̸\":\"nrarrw\",\"↞\":\"Larr\",\"↟\":\"Uarr\",\"↠\":\"Rarr\",\"↡\":\"Darr\",\"↢\":\"larrtl\",\"↣\":\"rarrtl\",\"↤\":\"mapstoleft\",\"↥\":\"mapstoup\",\"↦\":\"map\",\"↧\":\"mapstodown\",\"↩\":\"larrhk\",\"↪\":\"rarrhk\",\"↫\":\"larrlp\",\"↬\":\"rarrlp\",\"↭\":\"harrw\",\"↰\":\"lsh\",\"↱\":\"rsh\",\"↲\":\"ldsh\",\"↳\":\"rdsh\",\"↵\":\"crarr\",\"↶\":\"cularr\",\"↷\":\"curarr\",\"↺\":\"olarr\",\"↻\":\"orarr\",\"↼\":\"lharu\",\"↽\":\"lhard\",\"↾\":\"uharr\",\"↿\":\"uharl\",\"⇀\":\"rharu\",\"⇁\":\"rhard\",\"⇂\":\"dharr\",\"⇃\":\"dharl\",\"⇄\":\"rlarr\",\"⇅\":\"udarr\",\"⇆\":\"lrarr\",\"⇇\":\"llarr\",\"⇈\":\"uuarr\",\"⇉\":\"rrarr\",\"⇊\":\"ddarr\",\"⇋\":\"lrhar\",\"⇌\":\"rlhar\",\"⇐\":\"lArr\",\"⇍\":\"nlArr\",\"⇑\":\"uArr\",\"⇒\":\"rArr\",\"⇏\":\"nrArr\",\"⇓\":\"dArr\",\"⇔\":\"iff\",\"⇎\":\"nhArr\",\"⇕\":\"vArr\",\"⇖\":\"nwArr\",\"⇗\":\"neArr\",\"⇘\":\"seArr\",\"⇙\":\"swArr\",\"⇚\":\"lAarr\",\"⇛\":\"rAarr\",\"⇝\":\"zigrarr\",\"⇤\":\"larrb\",\"⇥\":\"rarrb\",\"⇵\":\"duarr\",\"⇽\":\"loarr\",\"⇾\":\"roarr\",\"⇿\":\"hoarr\",\"∀\":\"forall\",\"∁\":\"comp\",\"∂\":\"part\",\"∂̸\":\"npart\",\"∃\":\"exist\",\"∄\":\"nexist\",\"∅\":\"empty\",\"∇\":\"Del\",\"∈\":\"in\",\"∉\":\"notin\",\"∋\":\"ni\",\"∌\":\"notni\",\"϶\":\"bepsi\",\"∏\":\"prod\",\"∐\":\"coprod\",\"∑\":\"sum\",\"+\":\"plus\",\"±\":\"pm\",\"÷\":\"div\",\"×\":\"times\",\"<\":\"lt\",\"≮\":\"nlt\",\"<⃒\":\"nvlt\",\"=\":\"equals\",\"≠\":\"ne\",\"=⃥\":\"bne\",\"⩵\":\"Equal\",\">\":\"gt\",\"≯\":\"ngt\",\">⃒\":\"nvgt\",\"¬\":\"not\",\"|\":\"vert\",\"¦\":\"brvbar\",\"−\":\"minus\",\"∓\":\"mp\",\"∔\":\"plusdo\",\"⁄\":\"frasl\",\"∖\":\"setmn\",\"∗\":\"lowast\",\"∘\":\"compfn\",\"√\":\"Sqrt\",\"∝\":\"prop\",\"∞\":\"infin\",\"∟\":\"angrt\",\"∠\":\"ang\",\"∠⃒\":\"nang\",\"∡\":\"angmsd\",\"∢\":\"angsph\",\"∣\":\"mid\",\"∤\":\"nmid\",\"∥\":\"par\",\"∦\":\"npar\",\"∧\":\"and\",\"∨\":\"or\",\"∩\":\"cap\",\"∩︀\":\"caps\",\"∪\":\"cup\",\"∪︀\":\"cups\",\"∫\":\"int\",\"∬\":\"Int\",\"∭\":\"tint\",\"⨌\":\"qint\",\"∮\":\"oint\",\"∯\":\"Conint\",\"∰\":\"Cconint\",\"∱\":\"cwint\",\"∲\":\"cwconint\",\"∳\":\"awconint\",\"∴\":\"there4\",\"∵\":\"becaus\",\"∶\":\"ratio\",\"∷\":\"Colon\",\"∸\":\"minusd\",\"∺\":\"mDDot\",\"∻\":\"homtht\",\"∼\":\"sim\",\"≁\":\"nsim\",\"∼⃒\":\"nvsim\",\"∽\":\"bsim\",\"∽̱\":\"race\",\"∾\":\"ac\",\"∾̳\":\"acE\",\"∿\":\"acd\",\"≀\":\"wr\",\"≂\":\"esim\",\"≂̸\":\"nesim\",\"≃\":\"sime\",\"≄\":\"nsime\",\"≅\":\"cong\",\"≇\":\"ncong\",\"≆\":\"simne\",\"≈\":\"ap\",\"≉\":\"nap\",\"≊\":\"ape\",\"≋\":\"apid\",\"≋̸\":\"napid\",\"≌\":\"bcong\",\"≍\":\"CupCap\",\"≭\":\"NotCupCap\",\"≍⃒\":\"nvap\",\"≎\":\"bump\",\"≎̸\":\"nbump\",\"≏\":\"bumpe\",\"≏̸\":\"nbumpe\",\"≐\":\"doteq\",\"≐̸\":\"nedot\",\"≑\":\"eDot\",\"≒\":\"efDot\",\"≓\":\"erDot\",\"≔\":\"colone\",\"≕\":\"ecolon\",\"≖\":\"ecir\",\"≗\":\"cire\",\"≙\":\"wedgeq\",\"≚\":\"veeeq\",\"≜\":\"trie\",\"≟\":\"equest\",\"≡\":\"equiv\",\"≢\":\"nequiv\",\"≡⃥\":\"bnequiv\",\"≤\":\"le\",\"≰\":\"nle\",\"≤⃒\":\"nvle\",\"≥\":\"ge\",\"≱\":\"nge\",\"≥⃒\":\"nvge\",\"≦\":\"lE\",\"≦̸\":\"nlE\",\"≧\":\"gE\",\"≧̸\":\"ngE\",\"≨︀\":\"lvnE\",\"≨\":\"lnE\",\"≩\":\"gnE\",\"≩︀\":\"gvnE\",\"≪\":\"ll\",\"≪̸\":\"nLtv\",\"≪⃒\":\"nLt\",\"≫\":\"gg\",\"≫̸\":\"nGtv\",\"≫⃒\":\"nGt\",\"≬\":\"twixt\",\"≲\":\"lsim\",\"≴\":\"nlsim\",\"≳\":\"gsim\",\"≵\":\"ngsim\",\"≶\":\"lg\",\"≸\":\"ntlg\",\"≷\":\"gl\",\"≹\":\"ntgl\",\"≺\":\"pr\",\"⊀\":\"npr\",\"≻\":\"sc\",\"⊁\":\"nsc\",\"≼\":\"prcue\",\"⋠\":\"nprcue\",\"≽\":\"sccue\",\"⋡\":\"nsccue\",\"≾\":\"prsim\",\"≿\":\"scsim\",\"≿̸\":\"NotSucceedsTilde\",\"⊂\":\"sub\",\"⊄\":\"nsub\",\"⊂⃒\":\"vnsub\",\"⊃\":\"sup\",\"⊅\":\"nsup\",\"⊃⃒\":\"vnsup\",\"⊆\":\"sube\",\"⊈\":\"nsube\",\"⊇\":\"supe\",\"⊉\":\"nsupe\",\"⊊︀\":\"vsubne\",\"⊊\":\"subne\",\"⊋︀\":\"vsupne\",\"⊋\":\"supne\",\"⊍\":\"cupdot\",\"⊎\":\"uplus\",\"⊏\":\"sqsub\",\"⊏̸\":\"NotSquareSubset\",\"⊐\":\"sqsup\",\"⊐̸\":\"NotSquareSuperset\",\"⊑\":\"sqsube\",\"⋢\":\"nsqsube\",\"⊒\":\"sqsupe\",\"⋣\":\"nsqsupe\",\"⊓\":\"sqcap\",\"⊓︀\":\"sqcaps\",\"⊔\":\"sqcup\",\"⊔︀\":\"sqcups\",\"⊕\":\"oplus\",\"⊖\":\"ominus\",\"⊗\":\"otimes\",\"⊘\":\"osol\",\"⊙\":\"odot\",\"⊚\":\"ocir\",\"⊛\":\"oast\",\"⊝\":\"odash\",\"⊞\":\"plusb\",\"⊟\":\"minusb\",\"⊠\":\"timesb\",\"⊡\":\"sdotb\",\"⊢\":\"vdash\",\"⊬\":\"nvdash\",\"⊣\":\"dashv\",\"⊤\":\"top\",\"⊥\":\"bot\",\"⊧\":\"models\",\"⊨\":\"vDash\",\"⊭\":\"nvDash\",\"⊩\":\"Vdash\",\"⊮\":\"nVdash\",\"⊪\":\"Vvdash\",\"⊫\":\"VDash\",\"⊯\":\"nVDash\",\"⊰\":\"prurel\",\"⊲\":\"vltri\",\"⋪\":\"nltri\",\"⊳\":\"vrtri\",\"⋫\":\"nrtri\",\"⊴\":\"ltrie\",\"⋬\":\"nltrie\",\"⊴⃒\":\"nvltrie\",\"⊵\":\"rtrie\",\"⋭\":\"nrtrie\",\"⊵⃒\":\"nvrtrie\",\"⊶\":\"origof\",\"⊷\":\"imof\",\"⊸\":\"mumap\",\"⊹\":\"hercon\",\"⊺\":\"intcal\",\"⊻\":\"veebar\",\"⊽\":\"barvee\",\"⊾\":\"angrtvb\",\"⊿\":\"lrtri\",\"⋀\":\"Wedge\",\"⋁\":\"Vee\",\"⋂\":\"xcap\",\"⋃\":\"xcup\",\"⋄\":\"diam\",\"⋅\":\"sdot\",\"⋆\":\"Star\",\"⋇\":\"divonx\",\"⋈\":\"bowtie\",\"⋉\":\"ltimes\",\"⋊\":\"rtimes\",\"⋋\":\"lthree\",\"⋌\":\"rthree\",\"⋍\":\"bsime\",\"⋎\":\"cuvee\",\"⋏\":\"cuwed\",\"⋐\":\"Sub\",\"⋑\":\"Sup\",\"⋒\":\"Cap\",\"⋓\":\"Cup\",\"⋔\":\"fork\",\"⋕\":\"epar\",\"⋖\":\"ltdot\",\"⋗\":\"gtdot\",\"⋘\":\"Ll\",\"⋘̸\":\"nLl\",\"⋙\":\"Gg\",\"⋙̸\":\"nGg\",\"⋚︀\":\"lesg\",\"⋚\":\"leg\",\"⋛\":\"gel\",\"⋛︀\":\"gesl\",\"⋞\":\"cuepr\",\"⋟\":\"cuesc\",\"⋦\":\"lnsim\",\"⋧\":\"gnsim\",\"⋨\":\"prnsim\",\"⋩\":\"scnsim\",\"⋮\":\"vellip\",\"⋯\":\"ctdot\",\"⋰\":\"utdot\",\"⋱\":\"dtdot\",\"⋲\":\"disin\",\"⋳\":\"isinsv\",\"⋴\":\"isins\",\"⋵\":\"isindot\",\"⋵̸\":\"notindot\",\"⋶\":\"notinvc\",\"⋷\":\"notinvb\",\"⋹\":\"isinE\",\"⋹̸\":\"notinE\",\"⋺\":\"nisd\",\"⋻\":\"xnis\",\"⋼\":\"nis\",\"⋽\":\"notnivc\",\"⋾\":\"notnivb\",\"⌅\":\"barwed\",\"⌆\":\"Barwed\",\"⌌\":\"drcrop\",\"⌍\":\"dlcrop\",\"⌎\":\"urcrop\",\"⌏\":\"ulcrop\",\"⌐\":\"bnot\",\"⌒\":\"profline\",\"⌓\":\"profsurf\",\"⌕\":\"telrec\",\"⌖\":\"target\",\"⌜\":\"ulcorn\",\"⌝\":\"urcorn\",\"⌞\":\"dlcorn\",\"⌟\":\"drcorn\",\"⌢\":\"frown\",\"⌣\":\"smile\",\"⌭\":\"cylcty\",\"⌮\":\"profalar\",\"⌶\":\"topbot\",\"⌽\":\"ovbar\",\"⌿\":\"solbar\",\"⍼\":\"angzarr\",\"⎰\":\"lmoust\",\"⎱\":\"rmoust\",\"⎴\":\"tbrk\",\"⎵\":\"bbrk\",\"⎶\":\"bbrktbrk\",\"⏜\":\"OverParenthesis\",\"⏝\":\"UnderParenthesis\",\"⏞\":\"OverBrace\",\"⏟\":\"UnderBrace\",\"⏢\":\"trpezium\",\"⏧\":\"elinters\",\"␣\":\"blank\",\"─\":\"boxh\",\"│\":\"boxv\",\"┌\":\"boxdr\",\"┐\":\"boxdl\",\"└\":\"boxur\",\"┘\":\"boxul\",\"├\":\"boxvr\",\"┤\":\"boxvl\",\"┬\":\"boxhd\",\"┴\":\"boxhu\",\"┼\":\"boxvh\",\"═\":\"boxH\",\"║\":\"boxV\",\"╒\":\"boxdR\",\"╓\":\"boxDr\",\"╔\":\"boxDR\",\"╕\":\"boxdL\",\"╖\":\"boxDl\",\"╗\":\"boxDL\",\"╘\":\"boxuR\",\"╙\":\"boxUr\",\"╚\":\"boxUR\",\"╛\":\"boxuL\",\"╜\":\"boxUl\",\"╝\":\"boxUL\",\"╞\":\"boxvR\",\"╟\":\"boxVr\",\"╠\":\"boxVR\",\"╡\":\"boxvL\",\"╢\":\"boxVl\",\"╣\":\"boxVL\",\"╤\":\"boxHd\",\"╥\":\"boxhD\",\"╦\":\"boxHD\",\"╧\":\"boxHu\",\"╨\":\"boxhU\",\"╩\":\"boxHU\",\"╪\":\"boxvH\",\"╫\":\"boxVh\",\"╬\":\"boxVH\",\"▀\":\"uhblk\",\"▄\":\"lhblk\",\"█\":\"block\",\"░\":\"blk14\",\"▒\":\"blk12\",\"▓\":\"blk34\",\"□\":\"squ\",\"▪\":\"squf\",\"▫\":\"EmptyVerySmallSquare\",\"▭\":\"rect\",\"▮\":\"marker\",\"▱\":\"fltns\",\"△\":\"xutri\",\"▴\":\"utrif\",\"▵\":\"utri\",\"▸\":\"rtrif\",\"▹\":\"rtri\",\"▽\":\"xdtri\",\"▾\":\"dtrif\",\"▿\":\"dtri\",\"◂\":\"ltrif\",\"◃\":\"ltri\",\"◊\":\"loz\",\"○\":\"cir\",\"◬\":\"tridot\",\"◯\":\"xcirc\",\"◸\":\"ultri\",\"◹\":\"urtri\",\"◺\":\"lltri\",\"◻\":\"EmptySmallSquare\",\"◼\":\"FilledSmallSquare\",\"★\":\"starf\",\"☆\":\"star\",\"☎\":\"phone\",\"♀\":\"female\",\"♂\":\"male\",\"♠\":\"spades\",\"♣\":\"clubs\",\"♥\":\"hearts\",\"♦\":\"diams\",\"♪\":\"sung\",\"✓\":\"check\",\"✗\":\"cross\",\"✠\":\"malt\",\"✶\":\"sext\",\"❘\":\"VerticalSeparator\",\"⟈\":\"bsolhsub\",\"⟉\":\"suphsol\",\"⟵\":\"xlarr\",\"⟶\":\"xrarr\",\"⟷\":\"xharr\",\"⟸\":\"xlArr\",\"⟹\":\"xrArr\",\"⟺\":\"xhArr\",\"⟼\":\"xmap\",\"⟿\":\"dzigrarr\",\"⤂\":\"nvlArr\",\"⤃\":\"nvrArr\",\"⤄\":\"nvHarr\",\"⤅\":\"Map\",\"⤌\":\"lbarr\",\"⤍\":\"rbarr\",\"⤎\":\"lBarr\",\"⤏\":\"rBarr\",\"⤐\":\"RBarr\",\"⤑\":\"DDotrahd\",\"⤒\":\"UpArrowBar\",\"⤓\":\"DownArrowBar\",\"⤖\":\"Rarrtl\",\"⤙\":\"latail\",\"⤚\":\"ratail\",\"⤛\":\"lAtail\",\"⤜\":\"rAtail\",\"⤝\":\"larrfs\",\"⤞\":\"rarrfs\",\"⤟\":\"larrbfs\",\"⤠\":\"rarrbfs\",\"⤣\":\"nwarhk\",\"⤤\":\"nearhk\",\"⤥\":\"searhk\",\"⤦\":\"swarhk\",\"⤧\":\"nwnear\",\"⤨\":\"toea\",\"⤩\":\"tosa\",\"⤪\":\"swnwar\",\"⤳\":\"rarrc\",\"⤳̸\":\"nrarrc\",\"⤵\":\"cudarrr\",\"⤶\":\"ldca\",\"⤷\":\"rdca\",\"⤸\":\"cudarrl\",\"⤹\":\"larrpl\",\"⤼\":\"curarrm\",\"⤽\":\"cularrp\",\"⥅\":\"rarrpl\",\"⥈\":\"harrcir\",\"⥉\":\"Uarrocir\",\"⥊\":\"lurdshar\",\"⥋\":\"ldrushar\",\"⥎\":\"LeftRightVector\",\"⥏\":\"RightUpDownVector\",\"⥐\":\"DownLeftRightVector\",\"⥑\":\"LeftUpDownVector\",\"⥒\":\"LeftVectorBar\",\"⥓\":\"RightVectorBar\",\"⥔\":\"RightUpVectorBar\",\"⥕\":\"RightDownVectorBar\",\"⥖\":\"DownLeftVectorBar\",\"⥗\":\"DownRightVectorBar\",\"⥘\":\"LeftUpVectorBar\",\"⥙\":\"LeftDownVectorBar\",\"⥚\":\"LeftTeeVector\",\"⥛\":\"RightTeeVector\",\"⥜\":\"RightUpTeeVector\",\"⥝\":\"RightDownTeeVector\",\"⥞\":\"DownLeftTeeVector\",\"⥟\":\"DownRightTeeVector\",\"⥠\":\"LeftUpTeeVector\",\"⥡\":\"LeftDownTeeVector\",\"⥢\":\"lHar\",\"⥣\":\"uHar\",\"⥤\":\"rHar\",\"⥥\":\"dHar\",\"⥦\":\"luruhar\",\"⥧\":\"ldrdhar\",\"⥨\":\"ruluhar\",\"⥩\":\"rdldhar\",\"⥪\":\"lharul\",\"⥫\":\"llhard\",\"⥬\":\"rharul\",\"⥭\":\"lrhard\",\"⥮\":\"udhar\",\"⥯\":\"duhar\",\"⥰\":\"RoundImplies\",\"⥱\":\"erarr\",\"⥲\":\"simrarr\",\"⥳\":\"larrsim\",\"⥴\":\"rarrsim\",\"⥵\":\"rarrap\",\"⥶\":\"ltlarr\",\"⥸\":\"gtrarr\",\"⥹\":\"subrarr\",\"⥻\":\"suplarr\",\"⥼\":\"lfisht\",\"⥽\":\"rfisht\",\"⥾\":\"ufisht\",\"⥿\":\"dfisht\",\"⦚\":\"vzigzag\",\"⦜\":\"vangrt\",\"⦝\":\"angrtvbd\",\"⦤\":\"ange\",\"⦥\":\"range\",\"⦦\":\"dwangle\",\"⦧\":\"uwangle\",\"⦨\":\"angmsdaa\",\"⦩\":\"angmsdab\",\"⦪\":\"angmsdac\",\"⦫\":\"angmsdad\",\"⦬\":\"angmsdae\",\"⦭\":\"angmsdaf\",\"⦮\":\"angmsdag\",\"⦯\":\"angmsdah\",\"⦰\":\"bemptyv\",\"⦱\":\"demptyv\",\"⦲\":\"cemptyv\",\"⦳\":\"raemptyv\",\"⦴\":\"laemptyv\",\"⦵\":\"ohbar\",\"⦶\":\"omid\",\"⦷\":\"opar\",\"⦹\":\"operp\",\"⦻\":\"olcross\",\"⦼\":\"odsold\",\"⦾\":\"olcir\",\"⦿\":\"ofcir\",\"⧀\":\"olt\",\"⧁\":\"ogt\",\"⧂\":\"cirscir\",\"⧃\":\"cirE\",\"⧄\":\"solb\",\"⧅\":\"bsolb\",\"⧉\":\"boxbox\",\"⧍\":\"trisb\",\"⧎\":\"rtriltri\",\"⧏\":\"LeftTriangleBar\",\"⧏̸\":\"NotLeftTriangleBar\",\"⧐\":\"RightTriangleBar\",\"⧐̸\":\"NotRightTriangleBar\",\"⧜\":\"iinfin\",\"⧝\":\"infintie\",\"⧞\":\"nvinfin\",\"⧣\":\"eparsl\",\"⧤\":\"smeparsl\",\"⧥\":\"eqvparsl\",\"⧫\":\"lozf\",\"⧴\":\"RuleDelayed\",\"⧶\":\"dsol\",\"⨀\":\"xodot\",\"⨁\":\"xoplus\",\"⨂\":\"xotime\",\"⨄\":\"xuplus\",\"⨆\":\"xsqcup\",\"⨍\":\"fpartint\",\"⨐\":\"cirfnint\",\"⨑\":\"awint\",\"⨒\":\"rppolint\",\"⨓\":\"scpolint\",\"⨔\":\"npolint\",\"⨕\":\"pointint\",\"⨖\":\"quatint\",\"⨗\":\"intlarhk\",\"⨢\":\"pluscir\",\"⨣\":\"plusacir\",\"⨤\":\"simplus\",\"⨥\":\"plusdu\",\"⨦\":\"plussim\",\"⨧\":\"plustwo\",\"⨩\":\"mcomma\",\"⨪\":\"minusdu\",\"⨭\":\"loplus\",\"⨮\":\"roplus\",\"⨯\":\"Cross\",\"⨰\":\"timesd\",\"⨱\":\"timesbar\",\"⨳\":\"smashp\",\"⨴\":\"lotimes\",\"⨵\":\"rotimes\",\"⨶\":\"otimesas\",\"⨷\":\"Otimes\",\"⨸\":\"odiv\",\"⨹\":\"triplus\",\"⨺\":\"triminus\",\"⨻\":\"tritime\",\"⨼\":\"iprod\",\"⨿\":\"amalg\",\"⩀\":\"capdot\",\"⩂\":\"ncup\",\"⩃\":\"ncap\",\"⩄\":\"capand\",\"⩅\":\"cupor\",\"⩆\":\"cupcap\",\"⩇\":\"capcup\",\"⩈\":\"cupbrcap\",\"⩉\":\"capbrcup\",\"⩊\":\"cupcup\",\"⩋\":\"capcap\",\"⩌\":\"ccups\",\"⩍\":\"ccaps\",\"⩐\":\"ccupssm\",\"⩓\":\"And\",\"⩔\":\"Or\",\"⩕\":\"andand\",\"⩖\":\"oror\",\"⩗\":\"orslope\",\"⩘\":\"andslope\",\"⩚\":\"andv\",\"⩛\":\"orv\",\"⩜\":\"andd\",\"⩝\":\"ord\",\"⩟\":\"wedbar\",\"⩦\":\"sdote\",\"⩪\":\"simdot\",\"⩭\":\"congdot\",\"⩭̸\":\"ncongdot\",\"⩮\":\"easter\",\"⩯\":\"apacir\",\"⩰\":\"apE\",\"⩰̸\":\"napE\",\"⩱\":\"eplus\",\"⩲\":\"pluse\",\"⩳\":\"Esim\",\"⩷\":\"eDDot\",\"⩸\":\"equivDD\",\"⩹\":\"ltcir\",\"⩺\":\"gtcir\",\"⩻\":\"ltquest\",\"⩼\":\"gtquest\",\"⩽\":\"les\",\"⩽̸\":\"nles\",\"⩾\":\"ges\",\"⩾̸\":\"nges\",\"⩿\":\"lesdot\",\"⪀\":\"gesdot\",\"⪁\":\"lesdoto\",\"⪂\":\"gesdoto\",\"⪃\":\"lesdotor\",\"⪄\":\"gesdotol\",\"⪅\":\"lap\",\"⪆\":\"gap\",\"⪇\":\"lne\",\"⪈\":\"gne\",\"⪉\":\"lnap\",\"⪊\":\"gnap\",\"⪋\":\"lEg\",\"⪌\":\"gEl\",\"⪍\":\"lsime\",\"⪎\":\"gsime\",\"⪏\":\"lsimg\",\"⪐\":\"gsiml\",\"⪑\":\"lgE\",\"⪒\":\"glE\",\"⪓\":\"lesges\",\"⪔\":\"gesles\",\"⪕\":\"els\",\"⪖\":\"egs\",\"⪗\":\"elsdot\",\"⪘\":\"egsdot\",\"⪙\":\"el\",\"⪚\":\"eg\",\"⪝\":\"siml\",\"⪞\":\"simg\",\"⪟\":\"simlE\",\"⪠\":\"simgE\",\"⪡\":\"LessLess\",\"⪡̸\":\"NotNestedLessLess\",\"⪢\":\"GreaterGreater\",\"⪢̸\":\"NotNestedGreaterGreater\",\"⪤\":\"glj\",\"⪥\":\"gla\",\"⪦\":\"ltcc\",\"⪧\":\"gtcc\",\"⪨\":\"lescc\",\"⪩\":\"gescc\",\"⪪\":\"smt\",\"⪫\":\"lat\",\"⪬\":\"smte\",\"⪬︀\":\"smtes\",\"⪭\":\"late\",\"⪭︀\":\"lates\",\"⪮\":\"bumpE\",\"⪯\":\"pre\",\"⪯̸\":\"npre\",\"⪰\":\"sce\",\"⪰̸\":\"nsce\",\"⪳\":\"prE\",\"⪴\":\"scE\",\"⪵\":\"prnE\",\"⪶\":\"scnE\",\"⪷\":\"prap\",\"⪸\":\"scap\",\"⪹\":\"prnap\",\"⪺\":\"scnap\",\"⪻\":\"Pr\",\"⪼\":\"Sc\",\"⪽\":\"subdot\",\"⪾\":\"supdot\",\"⪿\":\"subplus\",\"⫀\":\"supplus\",\"⫁\":\"submult\",\"⫂\":\"supmult\",\"⫃\":\"subedot\",\"⫄\":\"supedot\",\"⫅\":\"subE\",\"⫅̸\":\"nsubE\",\"⫆\":\"supE\",\"⫆̸\":\"nsupE\",\"⫇\":\"subsim\",\"⫈\":\"supsim\",\"⫋︀\":\"vsubnE\",\"⫋\":\"subnE\",\"⫌︀\":\"vsupnE\",\"⫌\":\"supnE\",\"⫏\":\"csub\",\"⫐\":\"csup\",\"⫑\":\"csube\",\"⫒\":\"csupe\",\"⫓\":\"subsup\",\"⫔\":\"supsub\",\"⫕\":\"subsub\",\"⫖\":\"supsup\",\"⫗\":\"suphsub\",\"⫘\":\"supdsub\",\"⫙\":\"forkv\",\"⫚\":\"topfork\",\"⫛\":\"mlcp\",\"⫤\":\"Dashv\",\"⫦\":\"Vdashl\",\"⫧\":\"Barv\",\"⫨\":\"vBar\",\"⫩\":\"vBarv\",\"⫫\":\"Vbar\",\"⫬\":\"Not\",\"⫭\":\"bNot\",\"⫮\":\"rnmid\",\"⫯\":\"cirmid\",\"⫰\":\"midcir\",\"⫱\":\"topcir\",\"⫲\":\"nhpar\",\"⫳\":\"parsim\",\"⫽\":\"parsl\",\"⫽⃥\":\"nparsl\",\"♭\":\"flat\",\"♮\":\"natur\",\"♯\":\"sharp\",\"¤\":\"curren\",\"¢\":\"cent\",$:\"dollar\",\"£\":\"pound\",\"¥\":\"yen\",\"€\":\"euro\",\"¹\":\"sup1\",\"½\":\"half\",\"⅓\":\"frac13\",\"¼\":\"frac14\",\"⅕\":\"frac15\",\"⅙\":\"frac16\",\"⅛\":\"frac18\",\"²\":\"sup2\",\"⅔\":\"frac23\",\"⅖\":\"frac25\",\"³\":\"sup3\",\"¾\":\"frac34\",\"⅗\":\"frac35\",\"⅜\":\"frac38\",\"⅘\":\"frac45\",\"⅚\":\"frac56\",\"⅝\":\"frac58\",\"⅞\":\"frac78\",\"𝒶\":\"ascr\",\"𝕒\":\"aopf\",\"𝔞\":\"afr\",\"𝔸\":\"Aopf\",\"𝔄\":\"Afr\",\"𝒜\":\"Ascr\",\"ª\":\"ordf\",\"á\":\"aacute\",\"Á\":\"Aacute\",\"à\":\"agrave\",\"À\":\"Agrave\",\"ă\":\"abreve\",\"Ă\":\"Abreve\",\"â\":\"acirc\",\"Â\":\"Acirc\",\"å\":\"aring\",\"Å\":\"angst\",\"ä\":\"auml\",\"Ä\":\"Auml\",\"ã\":\"atilde\",\"Ã\":\"Atilde\",\"ą\":\"aogon\",\"Ą\":\"Aogon\",\"ā\":\"amacr\",\"Ā\":\"Amacr\",\"æ\":\"aelig\",\"Æ\":\"AElig\",\"𝒷\":\"bscr\",\"𝕓\":\"bopf\",\"𝔟\":\"bfr\",\"𝔹\":\"Bopf\",\"ℬ\":\"Bscr\",\"𝔅\":\"Bfr\",\"𝔠\":\"cfr\",\"𝒸\":\"cscr\",\"𝕔\":\"copf\",\"ℭ\":\"Cfr\",\"𝒞\":\"Cscr\",\"ℂ\":\"Copf\",\"ć\":\"cacute\",\"Ć\":\"Cacute\",\"ĉ\":\"ccirc\",\"Ĉ\":\"Ccirc\",\"č\":\"ccaron\",\"Č\":\"Ccaron\",\"ċ\":\"cdot\",\"Ċ\":\"Cdot\",\"ç\":\"ccedil\",\"Ç\":\"Ccedil\",\"℅\":\"incare\",\"𝔡\":\"dfr\",\"ⅆ\":\"dd\",\"𝕕\":\"dopf\",\"𝒹\":\"dscr\",\"𝒟\":\"Dscr\",\"𝔇\":\"Dfr\",\"ⅅ\":\"DD\",\"𝔻\":\"Dopf\",\"ď\":\"dcaron\",\"Ď\":\"Dcaron\",\"đ\":\"dstrok\",\"Đ\":\"Dstrok\",\"ð\":\"eth\",\"Ð\":\"ETH\",\"ⅇ\":\"ee\",\"ℯ\":\"escr\",\"𝔢\":\"efr\",\"𝕖\":\"eopf\",\"ℰ\":\"Escr\",\"𝔈\":\"Efr\",\"𝔼\":\"Eopf\",\"é\":\"eacute\",\"É\":\"Eacute\",\"è\":\"egrave\",\"È\":\"Egrave\",\"ê\":\"ecirc\",\"Ê\":\"Ecirc\",\"ě\":\"ecaron\",\"Ě\":\"Ecaron\",\"ë\":\"euml\",\"Ë\":\"Euml\",\"ė\":\"edot\",\"Ė\":\"Edot\",\"ę\":\"eogon\",\"Ę\":\"Eogon\",\"ē\":\"emacr\",\"Ē\":\"Emacr\",\"𝔣\":\"ffr\",\"𝕗\":\"fopf\",\"𝒻\":\"fscr\",\"𝔉\":\"Ffr\",\"𝔽\":\"Fopf\",\"ℱ\":\"Fscr\",\"ff\":\"fflig\",\"ffi\":\"ffilig\",\"ffl\":\"ffllig\",\"fi\":\"filig\",fj:\"fjlig\",\"fl\":\"fllig\",\"ƒ\":\"fnof\",\"ℊ\":\"gscr\",\"𝕘\":\"gopf\",\"𝔤\":\"gfr\",\"𝒢\":\"Gscr\",\"𝔾\":\"Gopf\",\"𝔊\":\"Gfr\",\"ǵ\":\"gacute\",\"ğ\":\"gbreve\",\"Ğ\":\"Gbreve\",\"ĝ\":\"gcirc\",\"Ĝ\":\"Gcirc\",\"ġ\":\"gdot\",\"Ġ\":\"Gdot\",\"Ģ\":\"Gcedil\",\"𝔥\":\"hfr\",\"ℎ\":\"planckh\",\"𝒽\":\"hscr\",\"𝕙\":\"hopf\",\"ℋ\":\"Hscr\",\"ℌ\":\"Hfr\",\"ℍ\":\"Hopf\",\"ĥ\":\"hcirc\",\"Ĥ\":\"Hcirc\",\"ℏ\":\"hbar\",\"ħ\":\"hstrok\",\"Ħ\":\"Hstrok\",\"𝕚\":\"iopf\",\"𝔦\":\"ifr\",\"𝒾\":\"iscr\",\"ⅈ\":\"ii\",\"𝕀\":\"Iopf\",\"ℐ\":\"Iscr\",\"ℑ\":\"Im\",\"í\":\"iacute\",\"Í\":\"Iacute\",\"ì\":\"igrave\",\"Ì\":\"Igrave\",\"î\":\"icirc\",\"Î\":\"Icirc\",\"ï\":\"iuml\",\"Ï\":\"Iuml\",\"ĩ\":\"itilde\",\"Ĩ\":\"Itilde\",\"İ\":\"Idot\",\"į\":\"iogon\",\"Į\":\"Iogon\",\"ī\":\"imacr\",\"Ī\":\"Imacr\",\"ij\":\"ijlig\",\"IJ\":\"IJlig\",\"ı\":\"imath\",\"𝒿\":\"jscr\",\"𝕛\":\"jopf\",\"𝔧\":\"jfr\",\"𝒥\":\"Jscr\",\"𝔍\":\"Jfr\",\"𝕁\":\"Jopf\",\"ĵ\":\"jcirc\",\"Ĵ\":\"Jcirc\",\"ȷ\":\"jmath\",\"𝕜\":\"kopf\",\"𝓀\":\"kscr\",\"𝔨\":\"kfr\",\"𝒦\":\"Kscr\",\"𝕂\":\"Kopf\",\"𝔎\":\"Kfr\",\"ķ\":\"kcedil\",\"Ķ\":\"Kcedil\",\"𝔩\":\"lfr\",\"𝓁\":\"lscr\",\"ℓ\":\"ell\",\"𝕝\":\"lopf\",\"ℒ\":\"Lscr\",\"𝔏\":\"Lfr\",\"𝕃\":\"Lopf\",\"ĺ\":\"lacute\",\"Ĺ\":\"Lacute\",\"ľ\":\"lcaron\",\"Ľ\":\"Lcaron\",\"ļ\":\"lcedil\",\"Ļ\":\"Lcedil\",\"ł\":\"lstrok\",\"Ł\":\"Lstrok\",\"ŀ\":\"lmidot\",\"Ŀ\":\"Lmidot\",\"𝔪\":\"mfr\",\"𝕞\":\"mopf\",\"𝓂\":\"mscr\",\"𝔐\":\"Mfr\",\"𝕄\":\"Mopf\",\"ℳ\":\"Mscr\",\"𝔫\":\"nfr\",\"𝕟\":\"nopf\",\"𝓃\":\"nscr\",\"ℕ\":\"Nopf\",\"𝒩\":\"Nscr\",\"𝔑\":\"Nfr\",\"ń\":\"nacute\",\"Ń\":\"Nacute\",\"ň\":\"ncaron\",\"Ň\":\"Ncaron\",\"ñ\":\"ntilde\",\"Ñ\":\"Ntilde\",\"ņ\":\"ncedil\",\"Ņ\":\"Ncedil\",\"№\":\"numero\",\"ŋ\":\"eng\",\"Ŋ\":\"ENG\",\"𝕠\":\"oopf\",\"𝔬\":\"ofr\",\"ℴ\":\"oscr\",\"𝒪\":\"Oscr\",\"𝔒\":\"Ofr\",\"𝕆\":\"Oopf\",\"º\":\"ordm\",\"ó\":\"oacute\",\"Ó\":\"Oacute\",\"ò\":\"ograve\",\"Ò\":\"Ograve\",\"ô\":\"ocirc\",\"Ô\":\"Ocirc\",\"ö\":\"ouml\",\"Ö\":\"Ouml\",\"ő\":\"odblac\",\"Ő\":\"Odblac\",\"õ\":\"otilde\",\"Õ\":\"Otilde\",\"ø\":\"oslash\",\"Ø\":\"Oslash\",\"ō\":\"omacr\",\"Ō\":\"Omacr\",\"œ\":\"oelig\",\"Œ\":\"OElig\",\"𝔭\":\"pfr\",\"𝓅\":\"pscr\",\"𝕡\":\"popf\",\"ℙ\":\"Popf\",\"𝔓\":\"Pfr\",\"𝒫\":\"Pscr\",\"𝕢\":\"qopf\",\"𝔮\":\"qfr\",\"𝓆\":\"qscr\",\"𝒬\":\"Qscr\",\"𝔔\":\"Qfr\",\"ℚ\":\"Qopf\",\"ĸ\":\"kgreen\",\"𝔯\":\"rfr\",\"𝕣\":\"ropf\",\"𝓇\":\"rscr\",\"ℛ\":\"Rscr\",\"ℜ\":\"Re\",\"ℝ\":\"Ropf\",\"ŕ\":\"racute\",\"Ŕ\":\"Racute\",\"ř\":\"rcaron\",\"Ř\":\"Rcaron\",\"ŗ\":\"rcedil\",\"Ŗ\":\"Rcedil\",\"𝕤\":\"sopf\",\"𝓈\":\"sscr\",\"𝔰\":\"sfr\",\"𝕊\":\"Sopf\",\"𝔖\":\"Sfr\",\"𝒮\":\"Sscr\",\"Ⓢ\":\"oS\",\"ś\":\"sacute\",\"Ś\":\"Sacute\",\"ŝ\":\"scirc\",\"Ŝ\":\"Scirc\",\"š\":\"scaron\",\"Š\":\"Scaron\",\"ş\":\"scedil\",\"Ş\":\"Scedil\",\"ß\":\"szlig\",\"𝔱\":\"tfr\",\"𝓉\":\"tscr\",\"𝕥\":\"topf\",\"𝒯\":\"Tscr\",\"𝔗\":\"Tfr\",\"𝕋\":\"Topf\",\"ť\":\"tcaron\",\"Ť\":\"Tcaron\",\"ţ\":\"tcedil\",\"Ţ\":\"Tcedil\",\"™\":\"trade\",\"ŧ\":\"tstrok\",\"Ŧ\":\"Tstrok\",\"𝓊\":\"uscr\",\"𝕦\":\"uopf\",\"𝔲\":\"ufr\",\"𝕌\":\"Uopf\",\"𝔘\":\"Ufr\",\"𝒰\":\"Uscr\",\"ú\":\"uacute\",\"Ú\":\"Uacute\",\"ù\":\"ugrave\",\"Ù\":\"Ugrave\",\"ŭ\":\"ubreve\",\"Ŭ\":\"Ubreve\",\"û\":\"ucirc\",\"Û\":\"Ucirc\",\"ů\":\"uring\",\"Ů\":\"Uring\",\"ü\":\"uuml\",\"Ü\":\"Uuml\",\"ű\":\"udblac\",\"Ű\":\"Udblac\",\"ũ\":\"utilde\",\"Ũ\":\"Utilde\",\"ų\":\"uogon\",\"Ų\":\"Uogon\",\"ū\":\"umacr\",\"Ū\":\"Umacr\",\"𝔳\":\"vfr\",\"𝕧\":\"vopf\",\"𝓋\":\"vscr\",\"𝔙\":\"Vfr\",\"𝕍\":\"Vopf\",\"𝒱\":\"Vscr\",\"𝕨\":\"wopf\",\"𝓌\":\"wscr\",\"𝔴\":\"wfr\",\"𝒲\":\"Wscr\",\"𝕎\":\"Wopf\",\"𝔚\":\"Wfr\",\"ŵ\":\"wcirc\",\"Ŵ\":\"Wcirc\",\"𝔵\":\"xfr\",\"𝓍\":\"xscr\",\"𝕩\":\"xopf\",\"𝕏\":\"Xopf\",\"𝔛\":\"Xfr\",\"𝒳\":\"Xscr\",\"𝔶\":\"yfr\",\"𝓎\":\"yscr\",\"𝕪\":\"yopf\",\"𝒴\":\"Yscr\",\"𝔜\":\"Yfr\",\"𝕐\":\"Yopf\",\"ý\":\"yacute\",\"Ý\":\"Yacute\",\"ŷ\":\"ycirc\",\"Ŷ\":\"Ycirc\",\"ÿ\":\"yuml\",\"Ÿ\":\"Yuml\",\"𝓏\":\"zscr\",\"𝔷\":\"zfr\",\"𝕫\":\"zopf\",\"ℨ\":\"Zfr\",\"ℤ\":\"Zopf\",\"𝒵\":\"Zscr\",\"ź\":\"zacute\",\"Ź\":\"Zacute\",\"ž\":\"zcaron\",\"Ž\":\"Zcaron\",\"ż\":\"zdot\",\"Ż\":\"Zdot\",\"Ƶ\":\"imped\",\"þ\":\"thorn\",\"Þ\":\"THORN\",\"ʼn\":\"napos\",\"α\":\"alpha\",\"Α\":\"Alpha\",\"β\":\"beta\",\"Β\":\"Beta\",\"γ\":\"gamma\",\"Γ\":\"Gamma\",\"δ\":\"delta\",\"Δ\":\"Delta\",\"ε\":\"epsi\",\"ϵ\":\"epsiv\",\"Ε\":\"Epsilon\",\"ϝ\":\"gammad\",\"Ϝ\":\"Gammad\",\"ζ\":\"zeta\",\"Ζ\":\"Zeta\",\"η\":\"eta\",\"Η\":\"Eta\",\"θ\":\"theta\",\"ϑ\":\"thetav\",\"Θ\":\"Theta\",\"ι\":\"iota\",\"Ι\":\"Iota\",\"κ\":\"kappa\",\"ϰ\":\"kappav\",\"Κ\":\"Kappa\",\"λ\":\"lambda\",\"Λ\":\"Lambda\",\"μ\":\"mu\",\"µ\":\"micro\",\"Μ\":\"Mu\",\"ν\":\"nu\",\"Ν\":\"Nu\",\"ξ\":\"xi\",\"Ξ\":\"Xi\",\"ο\":\"omicron\",\"Ο\":\"Omicron\",\"π\":\"pi\",\"ϖ\":\"piv\",\"Π\":\"Pi\",\"ρ\":\"rho\",\"ϱ\":\"rhov\",\"Ρ\":\"Rho\",\"σ\":\"sigma\",\"Σ\":\"Sigma\",\"ς\":\"sigmaf\",\"τ\":\"tau\",\"Τ\":\"Tau\",\"υ\":\"upsi\",\"Υ\":\"Upsilon\",\"ϒ\":\"Upsi\",\"φ\":\"phi\",\"ϕ\":\"phiv\",\"Φ\":\"Phi\",\"χ\":\"chi\",\"Χ\":\"Chi\",\"ψ\":\"psi\",\"Ψ\":\"Psi\",\"ω\":\"omega\",\"Ω\":\"ohm\",\"а\":\"acy\",\"А\":\"Acy\",\"б\":\"bcy\",\"Б\":\"Bcy\",\"в\":\"vcy\",\"В\":\"Vcy\",\"г\":\"gcy\",\"Г\":\"Gcy\",\"ѓ\":\"gjcy\",\"Ѓ\":\"GJcy\",\"д\":\"dcy\",\"Д\":\"Dcy\",\"ђ\":\"djcy\",\"Ђ\":\"DJcy\",\"е\":\"iecy\",\"Е\":\"IEcy\",\"ё\":\"iocy\",\"Ё\":\"IOcy\",\"є\":\"jukcy\",\"Є\":\"Jukcy\",\"ж\":\"zhcy\",\"Ж\":\"ZHcy\",\"з\":\"zcy\",\"З\":\"Zcy\",\"ѕ\":\"dscy\",\"Ѕ\":\"DScy\",\"и\":\"icy\",\"И\":\"Icy\",\"і\":\"iukcy\",\"І\":\"Iukcy\",\"ї\":\"yicy\",\"Ї\":\"YIcy\",\"й\":\"jcy\",\"Й\":\"Jcy\",\"ј\":\"jsercy\",\"Ј\":\"Jsercy\",\"к\":\"kcy\",\"К\":\"Kcy\",\"ќ\":\"kjcy\",\"Ќ\":\"KJcy\",\"л\":\"lcy\",\"Л\":\"Lcy\",\"љ\":\"ljcy\",\"Љ\":\"LJcy\",\"м\":\"mcy\",\"М\":\"Mcy\",\"н\":\"ncy\",\"Н\":\"Ncy\",\"њ\":\"njcy\",\"Њ\":\"NJcy\",\"о\":\"ocy\",\"О\":\"Ocy\",\"п\":\"pcy\",\"П\":\"Pcy\",\"р\":\"rcy\",\"Р\":\"Rcy\",\"с\":\"scy\",\"С\":\"Scy\",\"т\":\"tcy\",\"Т\":\"Tcy\",\"ћ\":\"tshcy\",\"Ћ\":\"TSHcy\",\"у\":\"ucy\",\"У\":\"Ucy\",\"ў\":\"ubrcy\",\"Ў\":\"Ubrcy\",\"ф\":\"fcy\",\"Ф\":\"Fcy\",\"х\":\"khcy\",\"Х\":\"KHcy\",\"ц\":\"tscy\",\"Ц\":\"TScy\",\"ч\":\"chcy\",\"Ч\":\"CHcy\",\"џ\":\"dzcy\",\"Џ\":\"DZcy\",\"ш\":\"shcy\",\"Ш\":\"SHcy\",\"щ\":\"shchcy\",\"Щ\":\"SHCHcy\",\"ъ\":\"hardcy\",\"Ъ\":\"HARDcy\",\"ы\":\"ycy\",\"Ы\":\"Ycy\",\"ь\":\"softcy\",\"Ь\":\"SOFTcy\",\"э\":\"ecy\",\"Э\":\"Ecy\",\"ю\":\"yucy\",\"Ю\":\"YUcy\",\"я\":\"yacy\",\"Я\":\"YAcy\",\"ℵ\":\"aleph\",\"ℶ\":\"beth\",\"ℷ\":\"gimel\",\"ℸ\":\"daleth\"},w=/[\"&'<>`]/g,E={'\"':\""\",\"&\":\"&\",\"'\":\"'\",\"<\":\"<\",\">\":\">\",\"`\":\"`\"},T=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,A=/[\\0-\\x08\\x0B\\x0E-\\x1F\\x7F-\\x9F\\uFDD0-\\uFDEF\\uFFFE\\uFFFF]|[\\uD83F\\uD87F\\uD8BF\\uD8FF\\uD93F\\uD97F\\uD9BF\\uD9FF\\uDA3F\\uDA7F\\uDABF\\uDAFF\\uDB3F\\uDB7F\\uDBBF\\uDBFF][\\uDFFE\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,x=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,S={aacute:\"á\",Aacute:\"Á\",abreve:\"ă\",Abreve:\"Ă\",ac:\"∾\",acd:\"∿\",acE:\"∾̳\",acirc:\"â\",Acirc:\"Â\",acute:\"´\",acy:\"а\",Acy:\"А\",aelig:\"æ\",AElig:\"Æ\",af:\"⁡\",afr:\"𝔞\",Afr:\"𝔄\",agrave:\"à\",Agrave:\"À\",alefsym:\"ℵ\",aleph:\"ℵ\",alpha:\"α\",Alpha:\"Α\",amacr:\"ā\",Amacr:\"Ā\",amalg:\"⨿\",amp:\"&\",AMP:\"&\",and:\"∧\",And:\"⩓\",andand:\"⩕\",andd:\"⩜\",andslope:\"⩘\",andv:\"⩚\",ang:\"∠\",ange:\"⦤\",angle:\"∠\",angmsd:\"∡\",angmsdaa:\"⦨\",angmsdab:\"⦩\",angmsdac:\"⦪\",angmsdad:\"⦫\",angmsdae:\"⦬\",angmsdaf:\"⦭\",angmsdag:\"⦮\",angmsdah:\"⦯\",angrt:\"∟\",angrtvb:\"⊾\",angrtvbd:\"⦝\",angsph:\"∢\",angst:\"Å\",angzarr:\"⍼\",aogon:\"ą\",Aogon:\"Ą\",aopf:\"𝕒\",Aopf:\"𝔸\",ap:\"≈\",apacir:\"⩯\",ape:\"≊\",apE:\"⩰\",apid:\"≋\",apos:\"'\",ApplyFunction:\"⁡\",approx:\"≈\",approxeq:\"≊\",aring:\"å\",Aring:\"Å\",ascr:\"𝒶\",Ascr:\"𝒜\",Assign:\"≔\",ast:\"*\",asymp:\"≈\",asympeq:\"≍\",atilde:\"ã\",Atilde:\"Ã\",auml:\"ä\",Auml:\"Ä\",awconint:\"∳\",awint:\"⨑\",backcong:\"≌\",backepsilon:\"϶\",backprime:\"‵\",backsim:\"∽\",backsimeq:\"⋍\",Backslash:\"∖\",Barv:\"⫧\",barvee:\"⊽\",barwed:\"⌅\",Barwed:\"⌆\",barwedge:\"⌅\",bbrk:\"⎵\",bbrktbrk:\"⎶\",bcong:\"≌\",bcy:\"б\",Bcy:\"Б\",bdquo:\"„\",becaus:\"∵\",because:\"∵\",Because:\"∵\",bemptyv:\"⦰\",bepsi:\"϶\",bernou:\"ℬ\",Bernoullis:\"ℬ\",beta:\"β\",Beta:\"Β\",beth:\"ℶ\",between:\"≬\",bfr:\"𝔟\",Bfr:\"𝔅\",bigcap:\"⋂\",bigcirc:\"◯\",bigcup:\"⋃\",bigodot:\"⨀\",bigoplus:\"⨁\",bigotimes:\"⨂\",bigsqcup:\"⨆\",bigstar:\"★\",bigtriangledown:\"▽\",bigtriangleup:\"△\",biguplus:\"⨄\",bigvee:\"⋁\",bigwedge:\"⋀\",bkarow:\"⤍\",blacklozenge:\"⧫\",blacksquare:\"▪\",blacktriangle:\"▴\",blacktriangledown:\"▾\",blacktriangleleft:\"◂\",blacktriangleright:\"▸\",blank:\"␣\",blk12:\"▒\",blk14:\"░\",blk34:\"▓\",block:\"█\",bne:\"=⃥\",bnequiv:\"≡⃥\",bnot:\"⌐\",bNot:\"⫭\",bopf:\"𝕓\",Bopf:\"𝔹\",bot:\"⊥\",bottom:\"⊥\",bowtie:\"⋈\",boxbox:\"⧉\",boxdl:\"┐\",boxdL:\"╕\",boxDl:\"╖\",boxDL:\"╗\",boxdr:\"┌\",boxdR:\"╒\",boxDr:\"╓\",boxDR:\"╔\",boxh:\"─\",boxH:\"═\",boxhd:\"┬\",boxhD:\"╥\",boxHd:\"╤\",boxHD:\"╦\",boxhu:\"┴\",boxhU:\"╨\",boxHu:\"╧\",boxHU:\"╩\",boxminus:\"⊟\",boxplus:\"⊞\",boxtimes:\"⊠\",boxul:\"┘\",boxuL:\"╛\",boxUl:\"╜\",boxUL:\"╝\",boxur:\"└\",boxuR:\"╘\",boxUr:\"╙\",boxUR:\"╚\",boxv:\"│\",boxV:\"║\",boxvh:\"┼\",boxvH:\"╪\",boxVh:\"╫\",boxVH:\"╬\",boxvl:\"┤\",boxvL:\"╡\",boxVl:\"╢\",boxVL:\"╣\",boxvr:\"├\",boxvR:\"╞\",boxVr:\"╟\",boxVR:\"╠\",bprime:\"‵\",breve:\"˘\",Breve:\"˘\",brvbar:\"¦\",bscr:\"𝒷\",Bscr:\"ℬ\",bsemi:\"⁏\",bsim:\"∽\",bsime:\"⋍\",bsol:\"\\\\\",bsolb:\"⧅\",bsolhsub:\"⟈\",bull:\"•\",bullet:\"•\",bump:\"≎\",bumpe:\"≏\",bumpE:\"⪮\",bumpeq:\"≏\",Bumpeq:\"≎\",cacute:\"ć\",Cacute:\"Ć\",cap:\"∩\",Cap:\"⋒\",capand:\"⩄\",capbrcup:\"⩉\",capcap:\"⩋\",capcup:\"⩇\",capdot:\"⩀\",CapitalDifferentialD:\"ⅅ\",caps:\"∩︀\",caret:\"⁁\",caron:\"ˇ\",Cayleys:\"ℭ\",ccaps:\"⩍\",ccaron:\"č\",Ccaron:\"Č\",ccedil:\"ç\",Ccedil:\"Ç\",ccirc:\"ĉ\",Ccirc:\"Ĉ\",Cconint:\"∰\",ccups:\"⩌\",ccupssm:\"⩐\",cdot:\"ċ\",Cdot:\"Ċ\",cedil:\"¸\",Cedilla:\"¸\",cemptyv:\"⦲\",cent:\"¢\",centerdot:\"·\",CenterDot:\"·\",cfr:\"𝔠\",Cfr:\"ℭ\",chcy:\"ч\",CHcy:\"Ч\",check:\"✓\",checkmark:\"✓\",chi:\"χ\",Chi:\"Χ\",cir:\"○\",circ:\"ˆ\",circeq:\"≗\",circlearrowleft:\"↺\",circlearrowright:\"↻\",circledast:\"⊛\",circledcirc:\"⊚\",circleddash:\"⊝\",CircleDot:\"⊙\",circledR:\"®\",circledS:\"Ⓢ\",CircleMinus:\"⊖\",CirclePlus:\"⊕\",CircleTimes:\"⊗\",cire:\"≗\",cirE:\"⧃\",cirfnint:\"⨐\",cirmid:\"⫯\",cirscir:\"⧂\",ClockwiseContourIntegral:\"∲\",CloseCurlyDoubleQuote:\"”\",CloseCurlyQuote:\"’\",clubs:\"♣\",clubsuit:\"♣\",colon:\":\",Colon:\"∷\",colone:\"≔\",Colone:\"⩴\",coloneq:\"≔\",comma:\",\",commat:\"@\",comp:\"∁\",compfn:\"∘\",complement:\"∁\",complexes:\"ℂ\",cong:\"≅\",congdot:\"⩭\",Congruent:\"≡\",conint:\"∮\",Conint:\"∯\",ContourIntegral:\"∮\",copf:\"𝕔\",Copf:\"ℂ\",coprod:\"∐\",Coproduct:\"∐\",copy:\"©\",COPY:\"©\",copysr:\"℗\",CounterClockwiseContourIntegral:\"∳\",crarr:\"↵\",cross:\"✗\",Cross:\"⨯\",cscr:\"𝒸\",Cscr:\"𝒞\",csub:\"⫏\",csube:\"⫑\",csup:\"⫐\",csupe:\"⫒\",ctdot:\"⋯\",cudarrl:\"⤸\",cudarrr:\"⤵\",cuepr:\"⋞\",cuesc:\"⋟\",cularr:\"↶\",cularrp:\"⤽\",cup:\"∪\",Cup:\"⋓\",cupbrcap:\"⩈\",cupcap:\"⩆\",CupCap:\"≍\",cupcup:\"⩊\",cupdot:\"⊍\",cupor:\"⩅\",cups:\"∪︀\",curarr:\"↷\",curarrm:\"⤼\",curlyeqprec:\"⋞\",curlyeqsucc:\"⋟\",curlyvee:\"⋎\",curlywedge:\"⋏\",curren:\"¤\",curvearrowleft:\"↶\",curvearrowright:\"↷\",cuvee:\"⋎\",cuwed:\"⋏\",cwconint:\"∲\",cwint:\"∱\",cylcty:\"⌭\",dagger:\"†\",Dagger:\"‡\",daleth:\"ℸ\",darr:\"↓\",dArr:\"⇓\",Darr:\"↡\",dash:\"‐\",dashv:\"⊣\",Dashv:\"⫤\",dbkarow:\"⤏\",dblac:\"˝\",dcaron:\"ď\",Dcaron:\"Ď\",dcy:\"д\",Dcy:\"Д\",dd:\"ⅆ\",DD:\"ⅅ\",ddagger:\"‡\",ddarr:\"⇊\",DDotrahd:\"⤑\",ddotseq:\"⩷\",deg:\"°\",Del:\"∇\",delta:\"δ\",Delta:\"Δ\",demptyv:\"⦱\",dfisht:\"⥿\",dfr:\"𝔡\",Dfr:\"𝔇\",dHar:\"⥥\",dharl:\"⇃\",dharr:\"⇂\",DiacriticalAcute:\"´\",DiacriticalDot:\"˙\",DiacriticalDoubleAcute:\"˝\",DiacriticalGrave:\"`\",DiacriticalTilde:\"˜\",diam:\"⋄\",diamond:\"⋄\",Diamond:\"⋄\",diamondsuit:\"♦\",diams:\"♦\",die:\"¨\",DifferentialD:\"ⅆ\",digamma:\"ϝ\",disin:\"⋲\",div:\"÷\",divide:\"÷\",divideontimes:\"⋇\",divonx:\"⋇\",djcy:\"ђ\",DJcy:\"Ђ\",dlcorn:\"⌞\",dlcrop:\"⌍\",dollar:\"$\",dopf:\"𝕕\",Dopf:\"𝔻\",dot:\"˙\",Dot:\"¨\",DotDot:\"⃜\",doteq:\"≐\",doteqdot:\"≑\",DotEqual:\"≐\",dotminus:\"∸\",dotplus:\"∔\",dotsquare:\"⊡\",doublebarwedge:\"⌆\",DoubleContourIntegral:\"∯\",DoubleDot:\"¨\",DoubleDownArrow:\"⇓\",DoubleLeftArrow:\"⇐\",DoubleLeftRightArrow:\"⇔\",DoubleLeftTee:\"⫤\",DoubleLongLeftArrow:\"⟸\",DoubleLongLeftRightArrow:\"⟺\",DoubleLongRightArrow:\"⟹\",DoubleRightArrow:\"⇒\",DoubleRightTee:\"⊨\",DoubleUpArrow:\"⇑\",DoubleUpDownArrow:\"⇕\",DoubleVerticalBar:\"∥\",downarrow:\"↓\",Downarrow:\"⇓\",DownArrow:\"↓\",DownArrowBar:\"⤓\",DownArrowUpArrow:\"⇵\",DownBreve:\"̑\",downdownarrows:\"⇊\",downharpoonleft:\"⇃\",downharpoonright:\"⇂\",DownLeftRightVector:\"⥐\",DownLeftTeeVector:\"⥞\",DownLeftVector:\"↽\",DownLeftVectorBar:\"⥖\",DownRightTeeVector:\"⥟\",DownRightVector:\"⇁\",DownRightVectorBar:\"⥗\",DownTee:\"⊤\",DownTeeArrow:\"↧\",drbkarow:\"⤐\",drcorn:\"⌟\",drcrop:\"⌌\",dscr:\"𝒹\",Dscr:\"𝒟\",dscy:\"ѕ\",DScy:\"Ѕ\",dsol:\"⧶\",dstrok:\"đ\",Dstrok:\"Đ\",dtdot:\"⋱\",dtri:\"▿\",dtrif:\"▾\",duarr:\"⇵\",duhar:\"⥯\",dwangle:\"⦦\",dzcy:\"џ\",DZcy:\"Џ\",dzigrarr:\"⟿\",eacute:\"é\",Eacute:\"É\",easter:\"⩮\",ecaron:\"ě\",Ecaron:\"Ě\",ecir:\"≖\",ecirc:\"ê\",Ecirc:\"Ê\",ecolon:\"≕\",ecy:\"э\",Ecy:\"Э\",eDDot:\"⩷\",edot:\"ė\",eDot:\"≑\",Edot:\"Ė\",ee:\"ⅇ\",efDot:\"≒\",efr:\"𝔢\",Efr:\"𝔈\",eg:\"⪚\",egrave:\"è\",Egrave:\"È\",egs:\"⪖\",egsdot:\"⪘\",el:\"⪙\",Element:\"∈\",elinters:\"⏧\",ell:\"ℓ\",els:\"⪕\",elsdot:\"⪗\",emacr:\"ē\",Emacr:\"Ē\",empty:\"∅\",emptyset:\"∅\",EmptySmallSquare:\"◻\",emptyv:\"∅\",EmptyVerySmallSquare:\"▫\",emsp:\" \",emsp13:\" \",emsp14:\" \",eng:\"ŋ\",ENG:\"Ŋ\",ensp:\" \",eogon:\"ę\",Eogon:\"Ę\",eopf:\"𝕖\",Eopf:\"𝔼\",epar:\"⋕\",eparsl:\"⧣\",eplus:\"⩱\",epsi:\"ε\",epsilon:\"ε\",Epsilon:\"Ε\",epsiv:\"ϵ\",eqcirc:\"≖\",eqcolon:\"≕\",eqsim:\"≂\",eqslantgtr:\"⪖\",eqslantless:\"⪕\",Equal:\"⩵\",equals:\"=\",EqualTilde:\"≂\",equest:\"≟\",Equilibrium:\"⇌\",equiv:\"≡\",equivDD:\"⩸\",eqvparsl:\"⧥\",erarr:\"⥱\",erDot:\"≓\",escr:\"ℯ\",Escr:\"ℰ\",esdot:\"≐\",esim:\"≂\",Esim:\"⩳\",eta:\"η\",Eta:\"Η\",eth:\"ð\",ETH:\"Ð\",euml:\"ë\",Euml:\"Ë\",euro:\"€\",excl:\"!\",exist:\"∃\",Exists:\"∃\",expectation:\"ℰ\",exponentiale:\"ⅇ\",ExponentialE:\"ⅇ\",fallingdotseq:\"≒\",fcy:\"ф\",Fcy:\"Ф\",female:\"♀\",ffilig:\"ffi\",fflig:\"ff\",ffllig:\"ffl\",ffr:\"𝔣\",Ffr:\"𝔉\",filig:\"fi\",FilledSmallSquare:\"◼\",FilledVerySmallSquare:\"▪\",fjlig:\"fj\",flat:\"♭\",fllig:\"fl\",fltns:\"▱\",fnof:\"ƒ\",fopf:\"𝕗\",Fopf:\"𝔽\",forall:\"∀\",ForAll:\"∀\",fork:\"⋔\",forkv:\"⫙\",Fouriertrf:\"ℱ\",fpartint:\"⨍\",frac12:\"½\",frac13:\"⅓\",frac14:\"¼\",frac15:\"⅕\",frac16:\"⅙\",frac18:\"⅛\",frac23:\"⅔\",frac25:\"⅖\",frac34:\"¾\",frac35:\"⅗\",frac38:\"⅜\",frac45:\"⅘\",frac56:\"⅚\",frac58:\"⅝\",frac78:\"⅞\",frasl:\"⁄\",frown:\"⌢\",fscr:\"𝒻\",Fscr:\"ℱ\",gacute:\"ǵ\",gamma:\"γ\",Gamma:\"Γ\",gammad:\"ϝ\",Gammad:\"Ϝ\",gap:\"⪆\",gbreve:\"ğ\",Gbreve:\"Ğ\",Gcedil:\"Ģ\",gcirc:\"ĝ\",Gcirc:\"Ĝ\",gcy:\"г\",Gcy:\"Г\",gdot:\"ġ\",Gdot:\"Ġ\",ge:\"≥\",gE:\"≧\",gel:\"⋛\",gEl:\"⪌\",geq:\"≥\",geqq:\"≧\",geqslant:\"⩾\",ges:\"⩾\",gescc:\"⪩\",gesdot:\"⪀\",gesdoto:\"⪂\",gesdotol:\"⪄\",gesl:\"⋛︀\",gesles:\"⪔\",gfr:\"𝔤\",Gfr:\"𝔊\",gg:\"≫\",Gg:\"⋙\",ggg:\"⋙\",gimel:\"ℷ\",gjcy:\"ѓ\",GJcy:\"Ѓ\",gl:\"≷\",gla:\"⪥\",glE:\"⪒\",glj:\"⪤\",gnap:\"⪊\",gnapprox:\"⪊\",gne:\"⪈\",gnE:\"≩\",gneq:\"⪈\",gneqq:\"≩\",gnsim:\"⋧\",gopf:\"𝕘\",Gopf:\"𝔾\",grave:\"`\",GreaterEqual:\"≥\",GreaterEqualLess:\"⋛\",GreaterFullEqual:\"≧\",GreaterGreater:\"⪢\",GreaterLess:\"≷\",GreaterSlantEqual:\"⩾\",GreaterTilde:\"≳\",gscr:\"ℊ\",Gscr:\"𝒢\",gsim:\"≳\",gsime:\"⪎\",gsiml:\"⪐\",gt:\">\",Gt:\"≫\",GT:\">\",gtcc:\"⪧\",gtcir:\"⩺\",gtdot:\"⋗\",gtlPar:\"⦕\",gtquest:\"⩼\",gtrapprox:\"⪆\",gtrarr:\"⥸\",gtrdot:\"⋗\",gtreqless:\"⋛\",gtreqqless:\"⪌\",gtrless:\"≷\",gtrsim:\"≳\",gvertneqq:\"≩︀\",gvnE:\"≩︀\",Hacek:\"ˇ\",hairsp:\" \",half:\"½\",hamilt:\"ℋ\",hardcy:\"ъ\",HARDcy:\"Ъ\",harr:\"↔\",hArr:\"⇔\",harrcir:\"⥈\",harrw:\"↭\",Hat:\"^\",hbar:\"ℏ\",hcirc:\"ĥ\",Hcirc:\"Ĥ\",hearts:\"♥\",heartsuit:\"♥\",hellip:\"…\",hercon:\"⊹\",hfr:\"𝔥\",Hfr:\"ℌ\",HilbertSpace:\"ℋ\",hksearow:\"⤥\",hkswarow:\"⤦\",hoarr:\"⇿\",homtht:\"∻\",hookleftarrow:\"↩\",hookrightarrow:\"↪\",hopf:\"𝕙\",Hopf:\"ℍ\",horbar:\"―\",HorizontalLine:\"─\",hscr:\"𝒽\",Hscr:\"ℋ\",hslash:\"ℏ\",hstrok:\"ħ\",Hstrok:\"Ħ\",HumpDownHump:\"≎\",HumpEqual:\"≏\",hybull:\"⁃\",hyphen:\"‐\",iacute:\"í\",Iacute:\"Í\",ic:\"⁣\",icirc:\"î\",Icirc:\"Î\",icy:\"и\",Icy:\"И\",Idot:\"İ\",iecy:\"е\",IEcy:\"Е\",iexcl:\"¡\",iff:\"⇔\",ifr:\"𝔦\",Ifr:\"ℑ\",igrave:\"ì\",Igrave:\"Ì\",ii:\"ⅈ\",iiiint:\"⨌\",iiint:\"∭\",iinfin:\"⧜\",iiota:\"℩\",ijlig:\"ij\",IJlig:\"IJ\",Im:\"ℑ\",imacr:\"ī\",Imacr:\"Ī\",image:\"ℑ\",ImaginaryI:\"ⅈ\",imagline:\"ℐ\",imagpart:\"ℑ\",imath:\"ı\",imof:\"⊷\",imped:\"Ƶ\",Implies:\"⇒\",in:\"∈\",incare:\"℅\",infin:\"∞\",infintie:\"⧝\",inodot:\"ı\",int:\"∫\",Int:\"∬\",intcal:\"⊺\",integers:\"ℤ\",Integral:\"∫\",intercal:\"⊺\",Intersection:\"⋂\",intlarhk:\"⨗\",intprod:\"⨼\",InvisibleComma:\"⁣\",InvisibleTimes:\"⁢\",iocy:\"ё\",IOcy:\"Ё\",iogon:\"į\",Iogon:\"Į\",iopf:\"𝕚\",Iopf:\"𝕀\",iota:\"ι\",Iota:\"Ι\",iprod:\"⨼\",iquest:\"¿\",iscr:\"𝒾\",Iscr:\"ℐ\",isin:\"∈\",isindot:\"⋵\",isinE:\"⋹\",isins:\"⋴\",isinsv:\"⋳\",isinv:\"∈\",it:\"⁢\",itilde:\"ĩ\",Itilde:\"Ĩ\",iukcy:\"і\",Iukcy:\"І\",iuml:\"ï\",Iuml:\"Ï\",jcirc:\"ĵ\",Jcirc:\"Ĵ\",jcy:\"й\",Jcy:\"Й\",jfr:\"𝔧\",Jfr:\"𝔍\",jmath:\"ȷ\",jopf:\"𝕛\",Jopf:\"𝕁\",jscr:\"𝒿\",Jscr:\"𝒥\",jsercy:\"ј\",Jsercy:\"Ј\",jukcy:\"є\",Jukcy:\"Є\",kappa:\"κ\",Kappa:\"Κ\",kappav:\"ϰ\",kcedil:\"ķ\",Kcedil:\"Ķ\",kcy:\"к\",Kcy:\"К\",kfr:\"𝔨\",Kfr:\"𝔎\",kgreen:\"ĸ\",khcy:\"х\",KHcy:\"Х\",kjcy:\"ќ\",KJcy:\"Ќ\",kopf:\"𝕜\",Kopf:\"𝕂\",kscr:\"𝓀\",Kscr:\"𝒦\",lAarr:\"⇚\",lacute:\"ĺ\",Lacute:\"Ĺ\",laemptyv:\"⦴\",lagran:\"ℒ\",lambda:\"λ\",Lambda:\"Λ\",lang:\"⟨\",Lang:\"⟪\",langd:\"⦑\",langle:\"⟨\",lap:\"⪅\",Laplacetrf:\"ℒ\",laquo:\"«\",larr:\"←\",lArr:\"⇐\",Larr:\"↞\",larrb:\"⇤\",larrbfs:\"⤟\",larrfs:\"⤝\",larrhk:\"↩\",larrlp:\"↫\",larrpl:\"⤹\",larrsim:\"⥳\",larrtl:\"↢\",lat:\"⪫\",latail:\"⤙\",lAtail:\"⤛\",late:\"⪭\",lates:\"⪭︀\",lbarr:\"⤌\",lBarr:\"⤎\",lbbrk:\"❲\",lbrace:\"{\",lbrack:\"[\",lbrke:\"⦋\",lbrksld:\"⦏\",lbrkslu:\"⦍\",lcaron:\"ľ\",Lcaron:\"Ľ\",lcedil:\"ļ\",Lcedil:\"Ļ\",lceil:\"⌈\",lcub:\"{\",lcy:\"л\",Lcy:\"Л\",ldca:\"⤶\",ldquo:\"“\",ldquor:\"„\",ldrdhar:\"⥧\",ldrushar:\"⥋\",ldsh:\"↲\",le:\"≤\",lE:\"≦\",LeftAngleBracket:\"⟨\",leftarrow:\"←\",Leftarrow:\"⇐\",LeftArrow:\"←\",LeftArrowBar:\"⇤\",LeftArrowRightArrow:\"⇆\",leftarrowtail:\"↢\",LeftCeiling:\"⌈\",LeftDoubleBracket:\"⟦\",LeftDownTeeVector:\"⥡\",LeftDownVector:\"⇃\",LeftDownVectorBar:\"⥙\",LeftFloor:\"⌊\",leftharpoondown:\"↽\",leftharpoonup:\"↼\",leftleftarrows:\"⇇\",leftrightarrow:\"↔\",Leftrightarrow:\"⇔\",LeftRightArrow:\"↔\",leftrightarrows:\"⇆\",leftrightharpoons:\"⇋\",leftrightsquigarrow:\"↭\",LeftRightVector:\"⥎\",LeftTee:\"⊣\",LeftTeeArrow:\"↤\",LeftTeeVector:\"⥚\",leftthreetimes:\"⋋\",LeftTriangle:\"⊲\",LeftTriangleBar:\"⧏\",LeftTriangleEqual:\"⊴\",LeftUpDownVector:\"⥑\",LeftUpTeeVector:\"⥠\",LeftUpVector:\"↿\",LeftUpVectorBar:\"⥘\",LeftVector:\"↼\",LeftVectorBar:\"⥒\",leg:\"⋚\",lEg:\"⪋\",leq:\"≤\",leqq:\"≦\",leqslant:\"⩽\",les:\"⩽\",lescc:\"⪨\",lesdot:\"⩿\",lesdoto:\"⪁\",lesdotor:\"⪃\",lesg:\"⋚︀\",lesges:\"⪓\",lessapprox:\"⪅\",lessdot:\"⋖\",lesseqgtr:\"⋚\",lesseqqgtr:\"⪋\",LessEqualGreater:\"⋚\",LessFullEqual:\"≦\",LessGreater:\"≶\",lessgtr:\"≶\",LessLess:\"⪡\",lesssim:\"≲\",LessSlantEqual:\"⩽\",LessTilde:\"≲\",lfisht:\"⥼\",lfloor:\"⌊\",lfr:\"𝔩\",Lfr:\"𝔏\",lg:\"≶\",lgE:\"⪑\",lHar:\"⥢\",lhard:\"↽\",lharu:\"↼\",lharul:\"⥪\",lhblk:\"▄\",ljcy:\"љ\",LJcy:\"Љ\",ll:\"≪\",Ll:\"⋘\",llarr:\"⇇\",llcorner:\"⌞\",Lleftarrow:\"⇚\",llhard:\"⥫\",lltri:\"◺\",lmidot:\"ŀ\",Lmidot:\"Ŀ\",lmoust:\"⎰\",lmoustache:\"⎰\",lnap:\"⪉\",lnapprox:\"⪉\",lne:\"⪇\",lnE:\"≨\",lneq:\"⪇\",lneqq:\"≨\",lnsim:\"⋦\",loang:\"⟬\",loarr:\"⇽\",lobrk:\"⟦\",longleftarrow:\"⟵\",Longleftarrow:\"⟸\",LongLeftArrow:\"⟵\",longleftrightarrow:\"⟷\",Longleftrightarrow:\"⟺\",LongLeftRightArrow:\"⟷\",longmapsto:\"⟼\",longrightarrow:\"⟶\",Longrightarrow:\"⟹\",LongRightArrow:\"⟶\",looparrowleft:\"↫\",looparrowright:\"↬\",lopar:\"⦅\",lopf:\"𝕝\",Lopf:\"𝕃\",loplus:\"⨭\",lotimes:\"⨴\",lowast:\"∗\",lowbar:\"_\",LowerLeftArrow:\"↙\",LowerRightArrow:\"↘\",loz:\"◊\",lozenge:\"◊\",lozf:\"⧫\",lpar:\"(\",lparlt:\"⦓\",lrarr:\"⇆\",lrcorner:\"⌟\",lrhar:\"⇋\",lrhard:\"⥭\",lrm:\"‎\",lrtri:\"⊿\",lsaquo:\"‹\",lscr:\"𝓁\",Lscr:\"ℒ\",lsh:\"↰\",Lsh:\"↰\",lsim:\"≲\",lsime:\"⪍\",lsimg:\"⪏\",lsqb:\"[\",lsquo:\"‘\",lsquor:\"‚\",lstrok:\"ł\",Lstrok:\"Ł\",lt:\"<\",Lt:\"≪\",LT:\"<\",ltcc:\"⪦\",ltcir:\"⩹\",ltdot:\"⋖\",lthree:\"⋋\",ltimes:\"⋉\",ltlarr:\"⥶\",ltquest:\"⩻\",ltri:\"◃\",ltrie:\"⊴\",ltrif:\"◂\",ltrPar:\"⦖\",lurdshar:\"⥊\",luruhar:\"⥦\",lvertneqq:\"≨︀\",lvnE:\"≨︀\",macr:\"¯\",male:\"♂\",malt:\"✠\",maltese:\"✠\",map:\"↦\",Map:\"⤅\",mapsto:\"↦\",mapstodown:\"↧\",mapstoleft:\"↤\",mapstoup:\"↥\",marker:\"▮\",mcomma:\"⨩\",mcy:\"м\",Mcy:\"М\",mdash:\"—\",mDDot:\"∺\",measuredangle:\"∡\",MediumSpace:\" \",Mellintrf:\"ℳ\",mfr:\"𝔪\",Mfr:\"𝔐\",mho:\"℧\",micro:\"µ\",mid:\"∣\",midast:\"*\",midcir:\"⫰\",middot:\"·\",minus:\"−\",minusb:\"⊟\",minusd:\"∸\",minusdu:\"⨪\",MinusPlus:\"∓\",mlcp:\"⫛\",mldr:\"…\",mnplus:\"∓\",models:\"⊧\",mopf:\"𝕞\",Mopf:\"𝕄\",mp:\"∓\",mscr:\"𝓂\",Mscr:\"ℳ\",mstpos:\"∾\",mu:\"μ\",Mu:\"Μ\",multimap:\"⊸\",mumap:\"⊸\",nabla:\"∇\",nacute:\"ń\",Nacute:\"Ń\",nang:\"∠⃒\",nap:\"≉\",napE:\"⩰̸\",napid:\"≋̸\",napos:\"ʼn\",napprox:\"≉\",natur:\"♮\",natural:\"♮\",naturals:\"ℕ\",nbsp:\" \",nbump:\"≎̸\",nbumpe:\"≏̸\",ncap:\"⩃\",ncaron:\"ň\",Ncaron:\"Ň\",ncedil:\"ņ\",Ncedil:\"Ņ\",ncong:\"≇\",ncongdot:\"⩭̸\",ncup:\"⩂\",ncy:\"н\",Ncy:\"Н\",ndash:\"–\",ne:\"≠\",nearhk:\"⤤\",nearr:\"↗\",neArr:\"⇗\",nearrow:\"↗\",nedot:\"≐̸\",NegativeMediumSpace:\"​\",NegativeThickSpace:\"​\",NegativeThinSpace:\"​\",NegativeVeryThinSpace:\"​\",nequiv:\"≢\",nesear:\"⤨\",nesim:\"≂̸\",NestedGreaterGreater:\"≫\",NestedLessLess:\"≪\",NewLine:\"\\n\",nexist:\"∄\",nexists:\"∄\",nfr:\"𝔫\",Nfr:\"𝔑\",nge:\"≱\",ngE:\"≧̸\",ngeq:\"≱\",ngeqq:\"≧̸\",ngeqslant:\"⩾̸\",nges:\"⩾̸\",nGg:\"⋙̸\",ngsim:\"≵\",ngt:\"≯\",nGt:\"≫⃒\",ngtr:\"≯\",nGtv:\"≫̸\",nharr:\"↮\",nhArr:\"⇎\",nhpar:\"⫲\",ni:\"∋\",nis:\"⋼\",nisd:\"⋺\",niv:\"∋\",njcy:\"њ\",NJcy:\"Њ\",nlarr:\"↚\",nlArr:\"⇍\",nldr:\"‥\",nle:\"≰\",nlE:\"≦̸\",nleftarrow:\"↚\",nLeftarrow:\"⇍\",nleftrightarrow:\"↮\",nLeftrightarrow:\"⇎\",nleq:\"≰\",nleqq:\"≦̸\",nleqslant:\"⩽̸\",nles:\"⩽̸\",nless:\"≮\",nLl:\"⋘̸\",nlsim:\"≴\",nlt:\"≮\",nLt:\"≪⃒\",nltri:\"⋪\",nltrie:\"⋬\",nLtv:\"≪̸\",nmid:\"∤\",NoBreak:\"⁠\",NonBreakingSpace:\" \",nopf:\"𝕟\",Nopf:\"ℕ\",not:\"¬\",Not:\"⫬\",NotCongruent:\"≢\",NotCupCap:\"≭\",NotDoubleVerticalBar:\"∦\",NotElement:\"∉\",NotEqual:\"≠\",NotEqualTilde:\"≂̸\",NotExists:\"∄\",NotGreater:\"≯\",NotGreaterEqual:\"≱\",NotGreaterFullEqual:\"≧̸\",NotGreaterGreater:\"≫̸\",NotGreaterLess:\"≹\",NotGreaterSlantEqual:\"⩾̸\",NotGreaterTilde:\"≵\",NotHumpDownHump:\"≎̸\",NotHumpEqual:\"≏̸\",notin:\"∉\",notindot:\"⋵̸\",notinE:\"⋹̸\",notinva:\"∉\",notinvb:\"⋷\",notinvc:\"⋶\",NotLeftTriangle:\"⋪\",NotLeftTriangleBar:\"⧏̸\",NotLeftTriangleEqual:\"⋬\",NotLess:\"≮\",NotLessEqual:\"≰\",NotLessGreater:\"≸\",NotLessLess:\"≪̸\",NotLessSlantEqual:\"⩽̸\",NotLessTilde:\"≴\",NotNestedGreaterGreater:\"⪢̸\",NotNestedLessLess:\"⪡̸\",notni:\"∌\",notniva:\"∌\",notnivb:\"⋾\",notnivc:\"⋽\",NotPrecedes:\"⊀\",NotPrecedesEqual:\"⪯̸\",NotPrecedesSlantEqual:\"⋠\",NotReverseElement:\"∌\",NotRightTriangle:\"⋫\",NotRightTriangleBar:\"⧐̸\",NotRightTriangleEqual:\"⋭\",NotSquareSubset:\"⊏̸\",NotSquareSubsetEqual:\"⋢\",NotSquareSuperset:\"⊐̸\",NotSquareSupersetEqual:\"⋣\",NotSubset:\"⊂⃒\",NotSubsetEqual:\"⊈\",NotSucceeds:\"⊁\",NotSucceedsEqual:\"⪰̸\",NotSucceedsSlantEqual:\"⋡\",NotSucceedsTilde:\"≿̸\",NotSuperset:\"⊃⃒\",NotSupersetEqual:\"⊉\",NotTilde:\"≁\",NotTildeEqual:\"≄\",NotTildeFullEqual:\"≇\",NotTildeTilde:\"≉\",NotVerticalBar:\"∤\",npar:\"∦\",nparallel:\"∦\",nparsl:\"⫽⃥\",npart:\"∂̸\",npolint:\"⨔\",npr:\"⊀\",nprcue:\"⋠\",npre:\"⪯̸\",nprec:\"⊀\",npreceq:\"⪯̸\",nrarr:\"↛\",nrArr:\"⇏\",nrarrc:\"⤳̸\",nrarrw:\"↝̸\",nrightarrow:\"↛\",nRightarrow:\"⇏\",nrtri:\"⋫\",nrtrie:\"⋭\",nsc:\"⊁\",nsccue:\"⋡\",nsce:\"⪰̸\",nscr:\"𝓃\",Nscr:\"𝒩\",nshortmid:\"∤\",nshortparallel:\"∦\",nsim:\"≁\",nsime:\"≄\",nsimeq:\"≄\",nsmid:\"∤\",nspar:\"∦\",nsqsube:\"⋢\",nsqsupe:\"⋣\",nsub:\"⊄\",nsube:\"⊈\",nsubE:\"⫅̸\",nsubset:\"⊂⃒\",nsubseteq:\"⊈\",nsubseteqq:\"⫅̸\",nsucc:\"⊁\",nsucceq:\"⪰̸\",nsup:\"⊅\",nsupe:\"⊉\",nsupE:\"⫆̸\",nsupset:\"⊃⃒\",nsupseteq:\"⊉\",nsupseteqq:\"⫆̸\",ntgl:\"≹\",ntilde:\"ñ\",Ntilde:\"Ñ\",ntlg:\"≸\",ntriangleleft:\"⋪\",ntrianglelefteq:\"⋬\",ntriangleright:\"⋫\",ntrianglerighteq:\"⋭\",nu:\"ν\",Nu:\"Ν\",num:\"#\",numero:\"№\",numsp:\" \",nvap:\"≍⃒\",nvdash:\"⊬\",nvDash:\"⊭\",nVdash:\"⊮\",nVDash:\"⊯\",nvge:\"≥⃒\",nvgt:\">⃒\",nvHarr:\"⤄\",nvinfin:\"⧞\",nvlArr:\"⤂\",nvle:\"≤⃒\",nvlt:\"<⃒\",nvltrie:\"⊴⃒\",nvrArr:\"⤃\",nvrtrie:\"⊵⃒\",nvsim:\"∼⃒\",nwarhk:\"⤣\",nwarr:\"↖\",nwArr:\"⇖\",nwarrow:\"↖\",nwnear:\"⤧\",oacute:\"ó\",Oacute:\"Ó\",oast:\"⊛\",ocir:\"⊚\",ocirc:\"ô\",Ocirc:\"Ô\",ocy:\"о\",Ocy:\"О\",odash:\"⊝\",odblac:\"ő\",Odblac:\"Ő\",odiv:\"⨸\",odot:\"⊙\",odsold:\"⦼\",oelig:\"œ\",OElig:\"Œ\",ofcir:\"⦿\",ofr:\"𝔬\",Ofr:\"𝔒\",ogon:\"˛\",ograve:\"ò\",Ograve:\"Ò\",ogt:\"⧁\",ohbar:\"⦵\",ohm:\"Ω\",oint:\"∮\",olarr:\"↺\",olcir:\"⦾\",olcross:\"⦻\",oline:\"‾\",olt:\"⧀\",omacr:\"ō\",Omacr:\"Ō\",omega:\"ω\",Omega:\"Ω\",omicron:\"ο\",Omicron:\"Ο\",omid:\"⦶\",ominus:\"⊖\",oopf:\"𝕠\",Oopf:\"𝕆\",opar:\"⦷\",OpenCurlyDoubleQuote:\"“\",OpenCurlyQuote:\"‘\",operp:\"⦹\",oplus:\"⊕\",or:\"∨\",Or:\"⩔\",orarr:\"↻\",ord:\"⩝\",order:\"ℴ\",orderof:\"ℴ\",ordf:\"ª\",ordm:\"º\",origof:\"⊶\",oror:\"⩖\",orslope:\"⩗\",orv:\"⩛\",oS:\"Ⓢ\",oscr:\"ℴ\",Oscr:\"𝒪\",oslash:\"ø\",Oslash:\"Ø\",osol:\"⊘\",otilde:\"õ\",Otilde:\"Õ\",otimes:\"⊗\",Otimes:\"⨷\",otimesas:\"⨶\",ouml:\"ö\",Ouml:\"Ö\",ovbar:\"⌽\",OverBar:\"‾\",OverBrace:\"⏞\",OverBracket:\"⎴\",OverParenthesis:\"⏜\",par:\"∥\",para:\"¶\",parallel:\"∥\",parsim:\"⫳\",parsl:\"⫽\",part:\"∂\",PartialD:\"∂\",pcy:\"п\",Pcy:\"П\",percnt:\"%\",period:\".\",permil:\"‰\",perp:\"⊥\",pertenk:\"‱\",pfr:\"𝔭\",Pfr:\"𝔓\",phi:\"φ\",Phi:\"Φ\",phiv:\"ϕ\",phmmat:\"ℳ\",phone:\"☎\",pi:\"π\",Pi:\"Π\",pitchfork:\"⋔\",piv:\"ϖ\",planck:\"ℏ\",planckh:\"ℎ\",plankv:\"ℏ\",plus:\"+\",plusacir:\"⨣\",plusb:\"⊞\",pluscir:\"⨢\",plusdo:\"∔\",plusdu:\"⨥\",pluse:\"⩲\",PlusMinus:\"±\",plusmn:\"±\",plussim:\"⨦\",plustwo:\"⨧\",pm:\"±\",Poincareplane:\"ℌ\",pointint:\"⨕\",popf:\"𝕡\",Popf:\"ℙ\",pound:\"£\",pr:\"≺\",Pr:\"⪻\",prap:\"⪷\",prcue:\"≼\",pre:\"⪯\",prE:\"⪳\",prec:\"≺\",precapprox:\"⪷\",preccurlyeq:\"≼\",Precedes:\"≺\",PrecedesEqual:\"⪯\",PrecedesSlantEqual:\"≼\",PrecedesTilde:\"≾\",preceq:\"⪯\",precnapprox:\"⪹\",precneqq:\"⪵\",precnsim:\"⋨\",precsim:\"≾\",prime:\"′\",Prime:\"″\",primes:\"ℙ\",prnap:\"⪹\",prnE:\"⪵\",prnsim:\"⋨\",prod:\"∏\",Product:\"∏\",profalar:\"⌮\",profline:\"⌒\",profsurf:\"⌓\",prop:\"∝\",Proportion:\"∷\",Proportional:\"∝\",propto:\"∝\",prsim:\"≾\",prurel:\"⊰\",pscr:\"𝓅\",Pscr:\"𝒫\",psi:\"ψ\",Psi:\"Ψ\",puncsp:\" \",qfr:\"𝔮\",Qfr:\"𝔔\",qint:\"⨌\",qopf:\"𝕢\",Qopf:\"ℚ\",qprime:\"⁗\",qscr:\"𝓆\",Qscr:\"𝒬\",quaternions:\"ℍ\",quatint:\"⨖\",quest:\"?\",questeq:\"≟\",quot:'\"',QUOT:'\"',rAarr:\"⇛\",race:\"∽̱\",racute:\"ŕ\",Racute:\"Ŕ\",radic:\"√\",raemptyv:\"⦳\",rang:\"⟩\",Rang:\"⟫\",rangd:\"⦒\",range:\"⦥\",rangle:\"⟩\",raquo:\"»\",rarr:\"→\",rArr:\"⇒\",Rarr:\"↠\",rarrap:\"⥵\",rarrb:\"⇥\",rarrbfs:\"⤠\",rarrc:\"⤳\",rarrfs:\"⤞\",rarrhk:\"↪\",rarrlp:\"↬\",rarrpl:\"⥅\",rarrsim:\"⥴\",rarrtl:\"↣\",Rarrtl:\"⤖\",rarrw:\"↝\",ratail:\"⤚\",rAtail:\"⤜\",ratio:\"∶\",rationals:\"ℚ\",rbarr:\"⤍\",rBarr:\"⤏\",RBarr:\"⤐\",rbbrk:\"❳\",rbrace:\"}\",rbrack:\"]\",rbrke:\"⦌\",rbrksld:\"⦎\",rbrkslu:\"⦐\",rcaron:\"ř\",Rcaron:\"Ř\",rcedil:\"ŗ\",Rcedil:\"Ŗ\",rceil:\"⌉\",rcub:\"}\",rcy:\"р\",Rcy:\"Р\",rdca:\"⤷\",rdldhar:\"⥩\",rdquo:\"”\",rdquor:\"”\",rdsh:\"↳\",Re:\"ℜ\",real:\"ℜ\",realine:\"ℛ\",realpart:\"ℜ\",reals:\"ℝ\",rect:\"▭\",reg:\"®\",REG:\"®\",ReverseElement:\"∋\",ReverseEquilibrium:\"⇋\",ReverseUpEquilibrium:\"⥯\",rfisht:\"⥽\",rfloor:\"⌋\",rfr:\"𝔯\",Rfr:\"ℜ\",rHar:\"⥤\",rhard:\"⇁\",rharu:\"⇀\",rharul:\"⥬\",rho:\"ρ\",Rho:\"Ρ\",rhov:\"ϱ\",RightAngleBracket:\"⟩\",rightarrow:\"→\",Rightarrow:\"⇒\",RightArrow:\"→\",RightArrowBar:\"⇥\",RightArrowLeftArrow:\"⇄\",rightarrowtail:\"↣\",RightCeiling:\"⌉\",RightDoubleBracket:\"⟧\",RightDownTeeVector:\"⥝\",RightDownVector:\"⇂\",RightDownVectorBar:\"⥕\",RightFloor:\"⌋\",rightharpoondown:\"⇁\",rightharpoonup:\"⇀\",rightleftarrows:\"⇄\",rightleftharpoons:\"⇌\",rightrightarrows:\"⇉\",rightsquigarrow:\"↝\",RightTee:\"⊢\",RightTeeArrow:\"↦\",RightTeeVector:\"⥛\",rightthreetimes:\"⋌\",RightTriangle:\"⊳\",RightTriangleBar:\"⧐\",RightTriangleEqual:\"⊵\",RightUpDownVector:\"⥏\",RightUpTeeVector:\"⥜\",RightUpVector:\"↾\",RightUpVectorBar:\"⥔\",RightVector:\"⇀\",RightVectorBar:\"⥓\",ring:\"˚\",risingdotseq:\"≓\",rlarr:\"⇄\",rlhar:\"⇌\",rlm:\"‏\",rmoust:\"⎱\",rmoustache:\"⎱\",rnmid:\"⫮\",roang:\"⟭\",roarr:\"⇾\",robrk:\"⟧\",ropar:\"⦆\",ropf:\"𝕣\",Ropf:\"ℝ\",roplus:\"⨮\",rotimes:\"⨵\",RoundImplies:\"⥰\",rpar:\")\",rpargt:\"⦔\",rppolint:\"⨒\",rrarr:\"⇉\",Rrightarrow:\"⇛\",rsaquo:\"›\",rscr:\"𝓇\",Rscr:\"ℛ\",rsh:\"↱\",Rsh:\"↱\",rsqb:\"]\",rsquo:\"’\",rsquor:\"’\",rthree:\"⋌\",rtimes:\"⋊\",rtri:\"▹\",rtrie:\"⊵\",rtrif:\"▸\",rtriltri:\"⧎\",RuleDelayed:\"⧴\",ruluhar:\"⥨\",rx:\"℞\",sacute:\"ś\",Sacute:\"Ś\",sbquo:\"‚\",sc:\"≻\",Sc:\"⪼\",scap:\"⪸\",scaron:\"š\",Scaron:\"Š\",sccue:\"≽\",sce:\"⪰\",scE:\"⪴\",scedil:\"ş\",Scedil:\"Ş\",scirc:\"ŝ\",Scirc:\"Ŝ\",scnap:\"⪺\",scnE:\"⪶\",scnsim:\"⋩\",scpolint:\"⨓\",scsim:\"≿\",scy:\"с\",Scy:\"С\",sdot:\"⋅\",sdotb:\"⊡\",sdote:\"⩦\",searhk:\"⤥\",searr:\"↘\",seArr:\"⇘\",searrow:\"↘\",sect:\"§\",semi:\";\",seswar:\"⤩\",setminus:\"∖\",setmn:\"∖\",sext:\"✶\",sfr:\"𝔰\",Sfr:\"𝔖\",sfrown:\"⌢\",sharp:\"♯\",shchcy:\"щ\",SHCHcy:\"Щ\",shcy:\"ш\",SHcy:\"Ш\",ShortDownArrow:\"↓\",ShortLeftArrow:\"←\",shortmid:\"∣\",shortparallel:\"∥\",ShortRightArrow:\"→\",ShortUpArrow:\"↑\",shy:\"­\",sigma:\"σ\",Sigma:\"Σ\",sigmaf:\"ς\",sigmav:\"ς\",sim:\"∼\",simdot:\"⩪\",sime:\"≃\",simeq:\"≃\",simg:\"⪞\",simgE:\"⪠\",siml:\"⪝\",simlE:\"⪟\",simne:\"≆\",simplus:\"⨤\",simrarr:\"⥲\",slarr:\"←\",SmallCircle:\"∘\",smallsetminus:\"∖\",smashp:\"⨳\",smeparsl:\"⧤\",smid:\"∣\",smile:\"⌣\",smt:\"⪪\",smte:\"⪬\",smtes:\"⪬︀\",softcy:\"ь\",SOFTcy:\"Ь\",sol:\"/\",solb:\"⧄\",solbar:\"⌿\",sopf:\"𝕤\",Sopf:\"𝕊\",spades:\"♠\",spadesuit:\"♠\",spar:\"∥\",sqcap:\"⊓\",sqcaps:\"⊓︀\",sqcup:\"⊔\",sqcups:\"⊔︀\",Sqrt:\"√\",sqsub:\"⊏\",sqsube:\"⊑\",sqsubset:\"⊏\",sqsubseteq:\"⊑\",sqsup:\"⊐\",sqsupe:\"⊒\",sqsupset:\"⊐\",sqsupseteq:\"⊒\",squ:\"□\",square:\"□\",Square:\"□\",SquareIntersection:\"⊓\",SquareSubset:\"⊏\",SquareSubsetEqual:\"⊑\",SquareSuperset:\"⊐\",SquareSupersetEqual:\"⊒\",SquareUnion:\"⊔\",squarf:\"▪\",squf:\"▪\",srarr:\"→\",sscr:\"𝓈\",Sscr:\"𝒮\",ssetmn:\"∖\",ssmile:\"⌣\",sstarf:\"⋆\",star:\"☆\",Star:\"⋆\",starf:\"★\",straightepsilon:\"ϵ\",straightphi:\"ϕ\",strns:\"¯\",sub:\"⊂\",Sub:\"⋐\",subdot:\"⪽\",sube:\"⊆\",subE:\"⫅\",subedot:\"⫃\",submult:\"⫁\",subne:\"⊊\",subnE:\"⫋\",subplus:\"⪿\",subrarr:\"⥹\",subset:\"⊂\",Subset:\"⋐\",subseteq:\"⊆\",subseteqq:\"⫅\",SubsetEqual:\"⊆\",subsetneq:\"⊊\",subsetneqq:\"⫋\",subsim:\"⫇\",subsub:\"⫕\",subsup:\"⫓\",succ:\"≻\",succapprox:\"⪸\",succcurlyeq:\"≽\",Succeeds:\"≻\",SucceedsEqual:\"⪰\",SucceedsSlantEqual:\"≽\",SucceedsTilde:\"≿\",succeq:\"⪰\",succnapprox:\"⪺\",succneqq:\"⪶\",succnsim:\"⋩\",succsim:\"≿\",SuchThat:\"∋\",sum:\"∑\",Sum:\"∑\",sung:\"♪\",sup:\"⊃\",Sup:\"⋑\",sup1:\"¹\",sup2:\"²\",sup3:\"³\",supdot:\"⪾\",supdsub:\"⫘\",supe:\"⊇\",supE:\"⫆\",supedot:\"⫄\",Superset:\"⊃\",SupersetEqual:\"⊇\",suphsol:\"⟉\",suphsub:\"⫗\",suplarr:\"⥻\",supmult:\"⫂\",supne:\"⊋\",supnE:\"⫌\",supplus:\"⫀\",supset:\"⊃\",Supset:\"⋑\",supseteq:\"⊇\",supseteqq:\"⫆\",supsetneq:\"⊋\",supsetneqq:\"⫌\",supsim:\"⫈\",supsub:\"⫔\",supsup:\"⫖\",swarhk:\"⤦\",swarr:\"↙\",swArr:\"⇙\",swarrow:\"↙\",swnwar:\"⤪\",szlig:\"ß\",Tab:\"\\t\",target:\"⌖\",tau:\"τ\",Tau:\"Τ\",tbrk:\"⎴\",tcaron:\"ť\",Tcaron:\"Ť\",tcedil:\"ţ\",Tcedil:\"Ţ\",tcy:\"т\",Tcy:\"Т\",tdot:\"⃛\",telrec:\"⌕\",tfr:\"𝔱\",Tfr:\"𝔗\",there4:\"∴\",therefore:\"∴\",Therefore:\"∴\",theta:\"θ\",Theta:\"Θ\",thetasym:\"ϑ\",thetav:\"ϑ\",thickapprox:\"≈\",thicksim:\"∼\",ThickSpace:\"  \",thinsp:\" \",ThinSpace:\" \",thkap:\"≈\",thksim:\"∼\",thorn:\"þ\",THORN:\"Þ\",tilde:\"˜\",Tilde:\"∼\",TildeEqual:\"≃\",TildeFullEqual:\"≅\",TildeTilde:\"≈\",times:\"×\",timesb:\"⊠\",timesbar:\"⨱\",timesd:\"⨰\",tint:\"∭\",toea:\"⤨\",top:\"⊤\",topbot:\"⌶\",topcir:\"⫱\",topf:\"𝕥\",Topf:\"𝕋\",topfork:\"⫚\",tosa:\"⤩\",tprime:\"‴\",trade:\"™\",TRADE:\"™\",triangle:\"▵\",triangledown:\"▿\",triangleleft:\"◃\",trianglelefteq:\"⊴\",triangleq:\"≜\",triangleright:\"▹\",trianglerighteq:\"⊵\",tridot:\"◬\",trie:\"≜\",triminus:\"⨺\",TripleDot:\"⃛\",triplus:\"⨹\",trisb:\"⧍\",tritime:\"⨻\",trpezium:\"⏢\",tscr:\"𝓉\",Tscr:\"𝒯\",tscy:\"ц\",TScy:\"Ц\",tshcy:\"ћ\",TSHcy:\"Ћ\",tstrok:\"ŧ\",Tstrok:\"Ŧ\",twixt:\"≬\",twoheadleftarrow:\"↞\",twoheadrightarrow:\"↠\",uacute:\"ú\",Uacute:\"Ú\",uarr:\"↑\",uArr:\"⇑\",Uarr:\"↟\",Uarrocir:\"⥉\",ubrcy:\"ў\",Ubrcy:\"Ў\",ubreve:\"ŭ\",Ubreve:\"Ŭ\",ucirc:\"û\",Ucirc:\"Û\",ucy:\"у\",Ucy:\"У\",udarr:\"⇅\",udblac:\"ű\",Udblac:\"Ű\",udhar:\"⥮\",ufisht:\"⥾\",ufr:\"𝔲\",Ufr:\"𝔘\",ugrave:\"ù\",Ugrave:\"Ù\",uHar:\"⥣\",uharl:\"↿\",uharr:\"↾\",uhblk:\"▀\",ulcorn:\"⌜\",ulcorner:\"⌜\",ulcrop:\"⌏\",ultri:\"◸\",umacr:\"ū\",Umacr:\"Ū\",uml:\"¨\",UnderBar:\"_\",UnderBrace:\"⏟\",UnderBracket:\"⎵\",UnderParenthesis:\"⏝\",Union:\"⋃\",UnionPlus:\"⊎\",uogon:\"ų\",Uogon:\"Ų\",uopf:\"𝕦\",Uopf:\"𝕌\",uparrow:\"↑\",Uparrow:\"⇑\",UpArrow:\"↑\",UpArrowBar:\"⤒\",UpArrowDownArrow:\"⇅\",updownarrow:\"↕\",Updownarrow:\"⇕\",UpDownArrow:\"↕\",UpEquilibrium:\"⥮\",upharpoonleft:\"↿\",upharpoonright:\"↾\",uplus:\"⊎\",UpperLeftArrow:\"↖\",UpperRightArrow:\"↗\",upsi:\"υ\",Upsi:\"ϒ\",upsih:\"ϒ\",upsilon:\"υ\",Upsilon:\"Υ\",UpTee:\"⊥\",UpTeeArrow:\"↥\",upuparrows:\"⇈\",urcorn:\"⌝\",urcorner:\"⌝\",urcrop:\"⌎\",uring:\"ů\",Uring:\"Ů\",urtri:\"◹\",uscr:\"𝓊\",Uscr:\"𝒰\",utdot:\"⋰\",utilde:\"ũ\",Utilde:\"Ũ\",utri:\"▵\",utrif:\"▴\",uuarr:\"⇈\",uuml:\"ü\",Uuml:\"Ü\",uwangle:\"⦧\",vangrt:\"⦜\",varepsilon:\"ϵ\",varkappa:\"ϰ\",varnothing:\"∅\",varphi:\"ϕ\",varpi:\"ϖ\",varpropto:\"∝\",varr:\"↕\",vArr:\"⇕\",varrho:\"ϱ\",varsigma:\"ς\",varsubsetneq:\"⊊︀\",varsubsetneqq:\"⫋︀\",varsupsetneq:\"⊋︀\",varsupsetneqq:\"⫌︀\",vartheta:\"ϑ\",vartriangleleft:\"⊲\",vartriangleright:\"⊳\",vBar:\"⫨\",Vbar:\"⫫\",vBarv:\"⫩\",vcy:\"в\",Vcy:\"В\",vdash:\"⊢\",vDash:\"⊨\",Vdash:\"⊩\",VDash:\"⊫\",Vdashl:\"⫦\",vee:\"∨\",Vee:\"⋁\",veebar:\"⊻\",veeeq:\"≚\",vellip:\"⋮\",verbar:\"|\",Verbar:\"‖\",vert:\"|\",Vert:\"‖\",VerticalBar:\"∣\",VerticalLine:\"|\",VerticalSeparator:\"❘\",VerticalTilde:\"≀\",VeryThinSpace:\" \",vfr:\"𝔳\",Vfr:\"𝔙\",vltri:\"⊲\",vnsub:\"⊂⃒\",vnsup:\"⊃⃒\",vopf:\"𝕧\",Vopf:\"𝕍\",vprop:\"∝\",vrtri:\"⊳\",vscr:\"𝓋\",Vscr:\"𝒱\",vsubne:\"⊊︀\",vsubnE:\"⫋︀\",vsupne:\"⊋︀\",vsupnE:\"⫌︀\",Vvdash:\"⊪\",vzigzag:\"⦚\",wcirc:\"ŵ\",Wcirc:\"Ŵ\",wedbar:\"⩟\",wedge:\"∧\",Wedge:\"⋀\",wedgeq:\"≙\",weierp:\"℘\",wfr:\"𝔴\",Wfr:\"𝔚\",wopf:\"𝕨\",Wopf:\"𝕎\",wp:\"℘\",wr:\"≀\",wreath:\"≀\",wscr:\"𝓌\",Wscr:\"𝒲\",xcap:\"⋂\",xcirc:\"◯\",xcup:\"⋃\",xdtri:\"▽\",xfr:\"𝔵\",Xfr:\"𝔛\",xharr:\"⟷\",xhArr:\"⟺\",xi:\"ξ\",Xi:\"Ξ\",xlarr:\"⟵\",xlArr:\"⟸\",xmap:\"⟼\",xnis:\"⋻\",xodot:\"⨀\",xopf:\"𝕩\",Xopf:\"𝕏\",xoplus:\"⨁\",xotime:\"⨂\",xrarr:\"⟶\",xrArr:\"⟹\",xscr:\"𝓍\",Xscr:\"𝒳\",xsqcup:\"⨆\",xuplus:\"⨄\",xutri:\"△\",xvee:\"⋁\",xwedge:\"⋀\",yacute:\"ý\",Yacute:\"Ý\",yacy:\"я\",YAcy:\"Я\",ycirc:\"ŷ\",Ycirc:\"Ŷ\",ycy:\"ы\",Ycy:\"Ы\",yen:\"¥\",yfr:\"𝔶\",Yfr:\"𝔜\",yicy:\"ї\",YIcy:\"Ї\",yopf:\"𝕪\",Yopf:\"𝕐\",yscr:\"𝓎\",Yscr:\"𝒴\",yucy:\"ю\",YUcy:\"Ю\",yuml:\"ÿ\",Yuml:\"Ÿ\",zacute:\"ź\",Zacute:\"Ź\",zcaron:\"ž\",Zcaron:\"Ž\",zcy:\"з\",Zcy:\"З\",zdot:\"ż\",Zdot:\"Ż\",zeetrf:\"ℨ\",ZeroWidthSpace:\"​\",zeta:\"ζ\",Zeta:\"Ζ\",zfr:\"𝔷\",Zfr:\"ℨ\",zhcy:\"ж\",ZHcy:\"Ж\",zigrarr:\"⇝\",zopf:\"𝕫\",Zopf:\"ℤ\",zscr:\"𝓏\",Zscr:\"𝒵\",zwj:\"‍\",zwnj:\"‌\"},O={aacute:\"á\",Aacute:\"Á\",acirc:\"â\",Acirc:\"Â\",acute:\"´\",aelig:\"æ\",AElig:\"Æ\",agrave:\"à\",Agrave:\"À\",amp:\"&\",AMP:\"&\",aring:\"å\",Aring:\"Å\",atilde:\"ã\",Atilde:\"Ã\",auml:\"ä\",Auml:\"Ä\",brvbar:\"¦\",ccedil:\"ç\",Ccedil:\"Ç\",cedil:\"¸\",cent:\"¢\",copy:\"©\",COPY:\"©\",curren:\"¤\",deg:\"°\",divide:\"÷\",eacute:\"é\",Eacute:\"É\",ecirc:\"ê\",Ecirc:\"Ê\",egrave:\"è\",Egrave:\"È\",eth:\"ð\",ETH:\"Ð\",euml:\"ë\",Euml:\"Ë\",frac12:\"½\",frac14:\"¼\",frac34:\"¾\",gt:\">\",GT:\">\",iacute:\"í\",Iacute:\"Í\",icirc:\"î\",Icirc:\"Î\",iexcl:\"¡\",igrave:\"ì\",Igrave:\"Ì\",iquest:\"¿\",iuml:\"ï\",Iuml:\"Ï\",laquo:\"«\",lt:\"<\",LT:\"<\",macr:\"¯\",micro:\"µ\",middot:\"·\",nbsp:\" \",not:\"¬\",ntilde:\"ñ\",Ntilde:\"Ñ\",oacute:\"ó\",Oacute:\"Ó\",ocirc:\"ô\",Ocirc:\"Ô\",ograve:\"ò\",Ograve:\"Ò\",ordf:\"ª\",ordm:\"º\",oslash:\"ø\",Oslash:\"Ø\",otilde:\"õ\",Otilde:\"Õ\",ouml:\"ö\",Ouml:\"Ö\",para:\"¶\",plusmn:\"±\",pound:\"£\",quot:'\"',QUOT:'\"',raquo:\"»\",reg:\"®\",REG:\"®\",sect:\"§\",shy:\"­\",sup1:\"¹\",sup2:\"²\",sup3:\"³\",szlig:\"ß\",thorn:\"þ\",THORN:\"Þ\",times:\"×\",uacute:\"ú\",Uacute:\"Ú\",ucirc:\"û\",Ucirc:\"Û\",ugrave:\"ù\",Ugrave:\"Ù\",uml:\"¨\",uuml:\"ü\",Uuml:\"Ü\",yacute:\"ý\",Yacute:\"Ý\",yen:\"¥\",yuml:\"ÿ\"},k={0:\"�\",128:\"€\",130:\"‚\",131:\"ƒ\",132:\"„\",133:\"…\",134:\"†\",135:\"‡\",136:\"ˆ\",137:\"‰\",138:\"Š\",139:\"‹\",140:\"Œ\",142:\"Ž\",145:\"‘\",146:\"’\",147:\"“\",148:\"”\",149:\"•\",150:\"–\",151:\"—\",152:\"˜\",153:\"™\",154:\"š\",155:\"›\",156:\"œ\",158:\"ž\",159:\"Ÿ\"},M=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],C=String.fromCharCode,R={}.hasOwnProperty,j=function(t){throw Error(\"Parse error: \"+t)};(c=function t(e,r){var n=(r=f(r,t.options)).strict;return n&&T.test(e)&&j(\"malformed character reference\"),e.replace(x,(function(t,e,i,o,a,s,u,c){var l,f,p;return e?S[p=e]:i?(p=i,o&&r.isAttributeValue?(n&&\"=\"==o&&j(\"`&` did not start a character reference\"),t):(n&&j(\"named character reference was not terminated by a semicolon\"),O[p]+(o||\"\"))):a?(f=a,l=s,n&&!l&&j(\"character reference was not terminated by a semicolon\"),h(f=parseInt(f,10),n)):u?(l=c,n&&!l&&j(\"character reference was not terminated by a semicolon\"),h(f=parseInt(u,16),n)):(n&&j(\"named character reference was not terminated by a semicolon\"),t)}))}).options={isAttributeValue:!(m.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1}),strict:!1};var N={version:\"1.2.0\",encode:m,decode:c,escape:function(t){return t.replace(w,(function(t){return E[t]}))},unescape:c};if(\"object\"==o(r(119))&&r(119))void 0===(i=function(){return N}.call(e,r,e,t))||(t.exports=i);else if(s&&!s.nodeType)if(u)u.exports=N;else for(var L in N)l(N,L)&&(s[L]=N[L]);else a.he=N}(this)}).call(this,r(28)(t),r(9))},function(t,e,r){\"use strict\";var n=r(307).createMapFromString,i=/([^\\s\"'<>/=]+)/,o=[/=/],a=[/\"([^\"]*)\"+/.source,/'([^']*)'+/.source,/([^ \\t\\n\\f\\r\"'`=<>]+)/.source],s=(r=\"((?:\"+(r=\"[\"+(r=\"A-Za-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\xF8-\\\\u0131\\\\u0134-\\\\u013E\\\\u0141-\\\\u0148\\\\u014A-\\\\u017E\\\\u0180-\\\\u01C3\\\\u01CD-\\\\u01F0\\\\u01F4\\\\u01F5\\\\u01FA-\\\\u0217\\\\u0250-\\\\u02A8\\\\u02BB-\\\\u02C1\\\\u0386\\\\u0388-\\\\u038A\\\\u038C\\\\u038E-\\\\u03A1\\\\u03A3-\\\\u03CE\\\\u03D0-\\\\u03D6\\\\u03DA\\\\u03DC\\\\u03DE\\\\u03E0\\\\u03E2-\\\\u03F3\\\\u0401-\\\\u040C\\\\u040E-\\\\u044F\\\\u0451-\\\\u045C\\\\u045E-\\\\u0481\\\\u0490-\\\\u04C4\\\\u04C7\\\\u04C8\\\\u04CB\\\\u04CC\\\\u04D0-\\\\u04EB\\\\u04EE-\\\\u04F5\\\\u04F8\\\\u04F9\\\\u0531-\\\\u0556\\\\u0559\\\\u0561-\\\\u0586\\\\u05D0-\\\\u05EA\\\\u05F0-\\\\u05F2\\\\u0621-\\\\u063A\\\\u0641-\\\\u064A\\\\u0671-\\\\u06B7\\\\u06BA-\\\\u06BE\\\\u06C0-\\\\u06CE\\\\u06D0-\\\\u06D3\\\\u06D5\\\\u06E5\\\\u06E6\\\\u0905-\\\\u0939\\\\u093D\\\\u0958-\\\\u0961\\\\u0985-\\\\u098C\\\\u098F\\\\u0990\\\\u0993-\\\\u09A8\\\\u09AA-\\\\u09B0\\\\u09B2\\\\u09B6-\\\\u09B9\\\\u09DC\\\\u09DD\\\\u09DF-\\\\u09E1\\\\u09F0\\\\u09F1\\\\u0A05-\\\\u0A0A\\\\u0A0F\\\\u0A10\\\\u0A13-\\\\u0A28\\\\u0A2A-\\\\u0A30\\\\u0A32\\\\u0A33\\\\u0A35\\\\u0A36\\\\u0A38\\\\u0A39\\\\u0A59-\\\\u0A5C\\\\u0A5E\\\\u0A72-\\\\u0A74\\\\u0A85-\\\\u0A8B\\\\u0A8D\\\\u0A8F-\\\\u0A91\\\\u0A93-\\\\u0AA8\\\\u0AAA-\\\\u0AB0\\\\u0AB2\\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\\u1100\\\\u1102\\\\u1103\\\\u1105-\\\\u1107\\\\u1109\\\\u110B\\\\u110C\\\\u110E-\\\\u1112\\\\u113C\\\\u113E\\\\u1140\\\\u114C\\\\u114E\\\\u1150\\\\u1154\\\\u1155\\\\u1159\\\\u115F-\\\\u1161\\\\u1163\\\\u1165\\\\u1167\\\\u1169\\\\u116D\\\\u116E\\\\u1172\\\\u1173\\\\u1175\\\\u119E\\\\u11A8\\\\u11AB\\\\u11AE\\\\u11AF\\\\u11B7\\\\u11B8\\\\u11BA\\\\u11BC-\\\\u11C2\\\\u11EB\\\\u11F0\\\\u11F9\\\\u1E00-\\\\u1E9B\\\\u1EA0-\\\\u1EF9\\\\u1F00-\\\\u1F15\\\\u1F18-\\\\u1F1D\\\\u1F20-\\\\u1F45\\\\u1F48-\\\\u1F4D\\\\u1F50-\\\\u1F57\\\\u1F59\\\\u1F5B\\\\u1F5D\\\\u1F5F-\\\\u1F7D\\\\u1F80-\\\\u1FB4\\\\u1FB6-\\\\u1FBC\\\\u1FBE\\\\u1FC2-\\\\u1FC4\\\\u1FC6-\\\\u1FCC\\\\u1FD0-\\\\u1FD3\\\\u1FD6-\\\\u1FDB\\\\u1FE0-\\\\u1FEC\\\\u1FF2-\\\\u1FF4\\\\u1FF6-\\\\u1FFC\\\\u2126\\\\u212A\\\\u212B\\\\u212E\\\\u2180-\\\\u2182\\\\u3007\\\\u3021-\\\\u3029\\\\u3041-\\\\u3094\\\\u30A1-\\\\u30FA\\\\u3105-\\\\u312C\\\\u4E00-\\\\u9FA5\\\\uAC00-\\\\uD7A3\")+\"_][\"+r+\"0-9\\\\u0660-\\\\u0669\\\\u06F0-\\\\u06F9\\\\u0966-\\\\u096F\\\\u09E6-\\\\u09EF\\\\u0A66-\\\\u0A6F\\\\u0AE6-\\\\u0AEF\\\\u0B66-\\\\u0B6F\\\\u0BE7-\\\\u0BEF\\\\u0C66-\\\\u0C6F\\\\u0CE6-\\\\u0CEF\\\\u0D66-\\\\u0D6F\\\\u0E50-\\\\u0E59\\\\u0ED0-\\\\u0ED9\\\\u0F20-\\\\u0F29\\\\.\\\\-_\\\\u0300-\\\\u0345\\\\u0360\\\\u0361\\\\u0483-\\\\u0486\\\\u0591-\\\\u05A1\\\\u05A3-\\\\u05B9\\\\u05BB-\\\\u05BD\\\\u05BF\\\\u05C1\\\\u05C2\\\\u05C4\\\\u064B-\\\\u0652\\\\u0670\\\\u06D6-\\\\u06E4\\\\u06E7\\\\u06E8\\\\u06EA-\\\\u06ED\\\\u0901-\\\\u0903\\\\u093C\\\\u093E-\\\\u094D\\\\u0951-\\\\u0954\\\\u0962\\\\u0963\\\\u0981-\\\\u0983\\\\u09BC\\\\u09BE-\\\\u09C4\\\\u09C7\\\\u09C8\\\\u09CB-\\\\u09CD\\\\u09D7\\\\u09E2\\\\u09E3\\\\u0A02\\\\u0A3C\\\\u0A3E-\\\\u0A42\\\\u0A47\\\\u0A48\\\\u0A4B-\\\\u0A4D\\\\u0A70\\\\u0A71\\\\u0A81-\\\\u0A83\\\\u0ABC\\\\u0ABE-\\\\u0AC5\\\\u0AC7-\\\\u0AC9\\\\u0ACB-\\\\u0ACD\\\\u0B01-\\\\u0B03\\\\u0B3C\\\\u0B3E-\\\\u0B43\\\\u0B47\\\\u0B48\\\\u0B4B-\\\\u0B4D\\\\u0B56\\\\u0B57\\\\u0B82\\\\u0B83\\\\u0BBE-\\\\u0BC2\\\\u0BC6-\\\\u0BC8\\\\u0BCA-\\\\u0BCD\\\\u0BD7\\\\u0C01-\\\\u0C03\\\\u0C3E-\\\\u0C44\\\\u0C46-\\\\u0C48\\\\u0C4A-\\\\u0C4D\\\\u0C55\\\\u0C56\\\\u0C82\\\\u0C83\\\\u0CBE-\\\\u0CC4\\\\u0CC6-\\\\u0CC8\\\\u0CCA-\\\\u0CCD\\\\u0CD5\\\\u0CD6\\\\u0D02\\\\u0D03\\\\u0D3E-\\\\u0D43\\\\u0D46-\\\\u0D48\\\\u0D4A-\\\\u0D4D\\\\u0D57\\\\u0E31\\\\u0E34-\\\\u0E3A\\\\u0E47-\\\\u0E4E\\\\u0EB1\\\\u0EB4-\\\\u0EB9\\\\u0EBB\\\\u0EBC\\\\u0EC8-\\\\u0ECD\\\\u0F18\\\\u0F19\\\\u0F35\\\\u0F37\\\\u0F39\\\\u0F3E\\\\u0F3F\\\\u0F71-\\\\u0F84\\\\u0F86-\\\\u0F8B\\\\u0F90-\\\\u0F95\\\\u0F97\\\\u0F99-\\\\u0FAD\\\\u0FB1-\\\\u0FB7\\\\u0FB9\\\\u20D0-\\\\u20DC\\\\u20E1\\\\u302A-\\\\u302F\\\\u3099\\\\u309A\\\\xB7\\\\u02D0\\\\u02D1\\\\u0387\\\\u0640\\\\u0E46\\\\u0EC6\\\\u3005\\\\u3031-\\\\u3035\\\\u309D\\\\u309E\\\\u30FC-\\\\u30FE]*\")+\"\\\\:)?\"+r+\")\",new RegExp(\"^<\"+r)),u=/^\\s*(\\/?)>/,c=new RegExp(\"^<\\\\/\"+r+\"[^>]*>\"),l=/^]+>/i,f=!1;\"x\".replace(/x(.)?/g,(function(t,e){f=\"\"===e}));var h=n(\"area,base,basefont,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr\",!0),p=n(\"a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,noscript,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,svg,textarea,tt,u,var\",!0),d=n(\"colgroup,dd,dt,li,option,p,td,tfoot,th,thead,tr,source\",!0),m=n(\"checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected\",!0),g=n(\"script,style\",!0),b=n(\"address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,ol,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track,ul\",!0),_={};function y(t,e){for(var r,n,y,v,w=[],E=function(t){var e=i.source+\"(?:\\\\s*(\"+function(t){return o.concat(t.customAttrAssign||[]).map((function(t){return\"(?:\"+t.source+\")\"})).join(\"|\")}(t)+\")[ \\\\t\\\\n\\\\f\\\\r]*(?:\"+a.join(\"|\")+\"))?\";if(t.customAttrSurround){for(var r=[],n=t.customAttrSurround.length-1;0<=n;n--)r[n]=\"(?:(\"+t.customAttrSurround[n][0].source+\")\\\\s*\"+e+\"\\\\s*(\"+t.customAttrSurround[n][1].source+\"))\";r.push(\"(?:\"+e+\")\"),e=\"(?:\"+r.join(\"|\")+\")\"}return new RegExp(\"^\\\\s*\"+e)}(e);t;){if(n=t,r&&g(r)){var T=r.toLowerCase(),A=_[T]||(_[T]=new RegExp(\"([\\\\s\\\\S]*?)]*>\",\"i\"));t=t.replace(A,(function(t,r){return\"script\"!==T&&\"style\"!==T&&\"noscript\"!==T&&(r=r.replace(//g,\"$1\").replace(//g,\"$1\")),e.chars&&e.chars(r),\"\"})),C(\"\",T)}else{if(0===(S=t.indexOf(\"<\"))){if(/^\\s*?)/gm,(function(t,e,r,n){return r=r.replace(/(^|>)(\\s+)(<|$)/gm,(function(t,e,r,n){return\"\".concat(e).concat(n)})).replace(/\\s{2,}/gm,\" \"),\"\".concat(e).concat(r).concat(n)}))},t.exports=e.default},function(t,e,r){\"use strict\";var n=r(0);Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=function(t){var e=void 0===(p=t.backgroundColor)?\"\":p,r=void 0===(_=t.breakpoint)?\"480px\":_,n=void 0===(d=t.content)?\"\":d,l=void 0===(m=t.fonts)?{}:m,f=void 0===(y=t.mediaQueries)?{}:y,h=void 0===(g=t.headStyle)?[]:g,p=void 0===(b=t.componentsHeadStyle)?{}:b,d=void 0===(_=t.headRaw)?[]:_,m=t.preview,g=void 0===(y=t.title)?\"\":y,b=t.style,_=t.forceOWADesktop,y=t.inlineStyle;return t=(t=t.lang)?'lang=\"'.concat(t,'\" '):\"\",\"\\n \\n \\n \\n \\n ').concat(g,'\\n \\n \\x3c!--[if !mso]>\\x3c!--\\x3e\\n \\n \\x3c!--\\n \\n \\n \\x3c!--[if mso]>\\n \\n \\n \\n 96\\n \\n \\n \\n \\n \\n ').concat((0,a.default)(p,(function(t,e){return\"\".concat(t,\"\\n\").concat(e(r))}),\"\"),\"\\n \").concat((0,a.default)(h,(function(t,e){return\"\".concat(t,\"\\n\").concat(e(r))}),\"\"),\"\\n \\n \").concat(b&&0'.concat(b.join(\"\"),\"\"):\"\",\"\\n \").concat(d.filter((0,o.default)(i.default)).join(\"\\n\"),'\\n \\n \\n ').concat((0,s.default)(m),\"\\n \").concat(n,\"\\n \\n \\n \")};var i=n(r(180)),o=n(r(284)),a=n(r(38)),s=n(r(726)),u=r(727),c=n(r(728));t.exports=e.default},function(t,e){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=function(t){return\"\"!==t?'\\n
\\n '.concat(t,\"\\n
\\n \"):\"\"},t.exports=e.default},function(t,e,r){\"use strict\";var n=r(0);Object.defineProperty(e,\"__esModule\",{value:!0}),e.buildFontsTags=function(t,e,r){r=2\\x3c!--\\x3e\\n \".concat((0,i.default)(n,(function(t){return'')})).join(\"\\n\"),'\\n \\n \\x3c!--\\n @media only screen and (min-width:'.concat(t,\") {\\n \").concat(r.join(\"\\n\"),\"\\n }\\n \\n \").concat(e?'\"):\"\",\"\\n \"))};var i=n(r(200)),o=n(r(52));t.exports=e.default},function(t,e,r){\"use strict\";var n=r(43);Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=void 0;var i=n(r(730)),o=n(r(731)),a=n(r(733)),s=n(r(734)),u=n(r(735));r=n(r(736)),r={boolean:{matcher:i.matcher,typeConstructor:i.default},enum:{matcher:a.matcher,typeConstructor:a.default},color:{matcher:o.matcher,typeConstructor:o.default},unit:{matcher:s.matcher,typeConstructor:s.default},string:{matcher:u.matcher,typeConstructor:u.default},integer:{matcher:r.matcher,typeConstructor:r.default}},e.default=r,t.exports=e.default},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){for(var r=0;r\".concat(t,\"\"),u(u({},e),{},{components:O.default,ignoreIncludes:!0})).children.map((function(t){return r.context.processing(t,r.context)})).join(\"\")}}]),t}();(0,d.default)(k,\"defaultAttributes\",{}),d=function(){i(e,k);var t=o(e);function e(){return c(this,e),t.apply(this,arguments)}return f(e,[{key:\"getStyles\",value:function(){return{}}},{key:\"getShorthandAttrValue\",value:function(t,e){var r=this.getAttribute(\"\".concat(t,\"-\").concat(e));return t=this.getAttribute(t),r?parseInt(r,10):t?(0,A.default)(t,e):0}},{key:\"getShorthandBorderValue\",value:function(t){var e=t&&this.getAttribute(\"border-\".concat(t));return t=this.getAttribute(\"border\"),(0,A.borderParser)(e||t||\"0\")}},{key:\"getBoxWidths\",value:function(){var t=this.context.containerWidth,e=parseInt(t,10),r=this.getShorthandAttrValue(\"padding\",\"right\")+this.getShorthandAttrValue(\"padding\",\"left\");return{totalWidth:e,borders:t=this.getShorthandBorderValue(\"right\")+this.getShorthandBorderValue(\"left\"),paddings:r,box:e-r-t}}},{key:\"htmlAttributes\",value:function(t){var e=this,r={style:function(t){return e.styles(t)},default:v.default};return(0,y.default)(t,(function(t,e,n){return e=(r[n]||r.default)(e),(0,m.default)(e)?t:\"\".concat(t,\" \").concat(n,'=\"').concat(e,'\"')}),\"\")}},{key:\"styles\",value:function(t){var e;return t&&(e=\"string\"==typeof t?(0,E.default)(this.getStyles(),t):t),(0,y.default)(e,(function(t,e,r){return(0,m.default)(e)?t:\"\".concat(t).concat(r,\":\").concat(e,\";\")}),\"\")}},{key:\"renderChildren\",value:function(t,e){var r=this,n=void 0===(e=(a=1\":\" \".concat(e,\">\")).concat(i,\"\")},t.exports=e.default},function(t){function e(t){throw(t=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",t}e.keys=function(){return[]},e.resolve=e,(t.exports=e).id=742},function(t,e,r){\"use strict\";var n=r(0);Object.defineProperty(e,\"__esModule\",{value:!0}),Object.defineProperty(e,\"Social\",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,\"SocialElement\",{enumerable:!0,get:function(){return o.default}});var i=n(r(744)),o=n(r(745))},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){for(var r=0;r\\n \\n \\n \\n \\n \\n \").concat(e.render(),\"\\n \\n \\x3c!--[if mso | IE]>\\n \\n \\n \\n \\n \\n \").concat(this.renderChildren(t,{attributes:this.getSocialElementAttributes()}),\"\\n \\n \")}},{key:\"render\",value:function(){return\"\\n \".concat(\"horizontal\"===this.getAttribute(\"mode\")?this.renderHorizontal():this.renderVertical(),\"\\n \")}}]),e}(),e.default=r,(0,s.default)(r,\"componentName\",\"mj-social\"),(0,s.default)(r,\"allowedAttributes\",{align:\"enum(left,right,center)\",\"border-radius\":\"unit(px,%)\",\"container-background-color\":\"color\",color:\"color\",\"font-family\":\"string\",\"font-size\":\"unit(px)\",\"font-style\":\"string\",\"font-weight\":\"string\",\"icon-size\":\"unit(px,%)\",\"icon-height\":\"unit(px,%)\",\"icon-padding\":\"unit(px,%){1,4}\",\"inner-padding\":\"unit(px,%){1,4}\",\"line-height\":\"unit(px,%,)\",mode:\"enum(horizontal,vertical)\",\"padding-bottom\":\"unit(px,%)\",\"padding-left\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"padding-top\":\"unit(px,%)\",padding:\"unit(px,%){1,4}\",\"table-layout\":\"enum(auto,fixed)\",\"text-padding\":\"unit(px,%){1,4}\",\"text-decoration\":\"string\",\"vertical-align\":\"enum(top,bottom,middle)\"}),(0,s.default)(r,\"defaultAttributes\",{align:\"center\",\"border-radius\":\"3px\",color:\"#333333\",\"font-family\":\"Ubuntu, Helvetica, Arial, sans-serif\",\"font-size\":\"13px\",\"icon-size\":\"20px\",\"inner-padding\":null,\"line-height\":\"22px\",mode:\"horizontal\",padding:\"10px 25px\",\"text-decoration\":\"none\"}),t.exports=e.default},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){for(var r=0;r\\n \\n \\n \\n \\n \").concat(a?\"\"):\"\",\"\\n \\n \").concat(a?\"\":\"\",\"\\n \\n \\n \\n \\n \").concat(this.getContent()?\"\\n \\n \").concat(a?\"\"):\"\"),\"\\n \").concat(this.getContent(),\"\\n \").concat(a?\"\":\"\",\"\\n \\n \"):\"\",\"\\n \\n \")}}]),e}(),e.default=h,(0,f.default)(h,\"componentName\",\"mj-social-element\"),(0,f.default)(h,\"endingTag\",!0),(0,f.default)(h,\"allowedAttributes\",{align:\"enum(left,center,right)\",\"background-color\":\"color\",color:\"color\",\"border-radius\":\"unit(px)\",\"font-family\":\"string\",\"font-size\":\"unit(px)\",\"font-style\":\"string\",\"font-weight\":\"string\",href:\"string\",\"icon-size\":\"unit(px,%)\",\"icon-height\":\"unit(px,%)\",\"icon-padding\":\"unit(px,%){1,4}\",\"line-height\":\"unit(px,%,)\",name:\"string\",\"padding-bottom\":\"unit(px,%)\",\"padding-left\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"padding-top\":\"unit(px,%)\",padding:\"unit(px,%){1,4}\",\"text-padding\":\"unit(px,%){1,4}\",src:\"string\",srcset:\"string\",sizes:\"string\",alt:\"string\",title:\"string\",target:\"string\",\"text-decoration\":\"string\",\"vertical-align\":\"enum(top,middle,bottom)\"}),(0,f.default)(h,\"defaultAttributes\",{align:\"left\",color:\"#000\",\"border-radius\":\"3px\",\"font-family\":\"Ubuntu, Helvetica, Arial, sans-serif\",\"font-size\":\"13px\",\"line-height\":\"1\",padding:\"4px\",\"text-padding\":\"4px 4px 4px 0\",target:\"_blank\",\"text-decoration\":\"none\",\"vertical-align\":\"middle\"}),t.exports=e.default},function(t,e,r){\"use strict\";var n=r(0);Object.defineProperty(e,\"__esModule\",{value:!0}),Object.defineProperty(e,\"Navbar\",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,\"NavbarLink\",{enumerable:!0,get:function(){return o.default}});var i=n(r(747)),o=n(r(829))},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){for(var r=0;r a { display:block!important; }\\n .mj-menu-checkbox[type=\"checkbox\"]:checked ~ .mj-menu-trigger .mj-menu-icon-close { display:block!important; }\\n .mj-menu-checkbox[type=\"checkbox\"]:checked ~ .mj-menu-trigger .mj-menu-icon-open { display:none!important; }\\n }\\n ')})),r}return function(t,e,r){e&&i(t.prototype,e),r&&i(t,r)}(e,[{key:\"getStyles\",value:function(){return{div:{align:this.getAttribute(\"align\"),width:\"100%\"},label:{display:\"block\",cursor:\"pointer\",\"mso-hide\":\"all\",\"-moz-user-select\":\"none\",\"user-select\":\"none\",color:this.getAttribute(\"ico-color\"),\"font-size\":this.getAttribute(\"ico-font-size\"),\"font-family\":this.getAttribute(\"ico-font-family\"),\"text-transform\":this.getAttribute(\"ico-text-transform\"),\"text-decoration\":this.getAttribute(\"ico-text-decoration\"),\"line-height\":this.getAttribute(\"ico-line-height\"),\"padding-top\":this.getAttribute(\"ico-padding-top\"),\"padding-right\":this.getAttribute(\"ico-padding-right\"),\"padding-bottom\":this.getAttribute(\"ico-padding-bottom\"),\"padding-left\":this.getAttribute(\"ico-padding-left\"),padding:this.getAttribute(\"ico-padding\")},trigger:{display:\"none\",\"max-height\":\"0px\",\"max-width\":\"0px\",\"font-size\":\"0px\",overflow:\"hidden\"},icoOpen:{\"mso-hide\":\"all\"},icoClose:{display:\"none\",\"mso-hide\":\"all\"}}}},{key:\"renderHamburger\",value:function(){var t=h.default.randomBytes(8).toString(\"hex\");return\"\\n \".concat((0,p.msoConditionalTag)('\\n \\n '),!0),\"\\n \\n \\n \\n \").concat(this.getAttribute(\"ico-open\"),\"\\n \\n \\n \").concat(this.getAttribute(\"ico-close\"),\"\\n \\n \\n \\n \")}},{key:\"render\",value:function(){return\"\\n \".concat(\"hamburger\"===this.getAttribute(\"hamburger\")?this.renderHamburger():\"\",\"\\n \\n \").concat((0,p.default)('\\n \\n \\n ')),\"\\n \").concat(this.renderChildren(this.props.children,{attributes:{navbarBaseUrl:this.getAttribute(\"base-url\")}}),\"\\n \").concat((0,p.default)(\"\\n
\\n \"),\"\\n \\n \")}}]),e}(),e.default=r,(0,l.default)(r,\"componentName\",\"mj-navbar\"),(0,l.default)(r,\"allowedAttributes\",{align:\"enum(left,center,right)\",\"base-url\":\"string\",hamburger:\"string\",\"ico-align\":\"enum(left,center,right)\",\"ico-open\":\"string\",\"ico-close\":\"string\",\"ico-color\":\"color\",\"ico-font-size\":\"unit(px,%)\",\"ico-font-family\":\"string\",\"ico-text-transform\":\"string\",\"ico-padding\":\"unit(px,%){1,4}\",\"ico-padding-left\":\"unit(px,%)\",\"ico-padding-top\":\"unit(px,%)\",\"ico-padding-right\":\"unit(px,%)\",\"ico-padding-bottom\":\"unit(px,%)\",padding:\"unit(px,%){1,4}\",\"padding-left\":\"unit(px,%)\",\"padding-top\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"padding-bottom\":\"unit(px,%)\",\"ico-text-decoration\":\"string\",\"ico-line-height\":\"unit(px,%,)\"}),(0,l.default)(r,\"defaultAttributes\",{align:\"center\",\"base-url\":null,hamburger:null,\"ico-align\":\"center\",\"ico-open\":\"☰\",\"ico-close\":\"⊗\",\"ico-color\":\"#000000\",\"ico-font-size\":\"30px\",\"ico-font-family\":\"Ubuntu, Helvetica, Arial, sans-serif\",\"ico-text-transform\":\"uppercase\",\"ico-padding\":\"10px\",\"ico-text-decoration\":\"none\",\"ico-line-height\":\"30px\"}),t.exports=e.default},function(t,e,r){(((e=t.exports=r(320)).Stream=e).Readable=e).Writable=r(324),e.Duplex=r(61),e.Transform=r(325),e.PassThrough=r(754),e.finished=r(184),e.pipeline=r(755)},function(){},function(t,e,r){\"use strict\";function n(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)),n}function i(t,e){for(var r=0;r>>0),r=this.head,n=0;r;)!function(t,e,r){o.prototype.copy.call(t,e,r)}(r.data,e,n),n+=r.data.length,r=r.next;return e}},{key:\"consume\",value:function(t,e){var r;return ti.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e).data=i.slice(o);break}++r}return this.length-=r,n}},{key:\"_getBuffer\",value:function(t){var e=o.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r).data=i.slice(a);break}++n}return this.length-=n,e}},{key:s,value:function(t,e){return a(this,function(t){for(var e=1;e>>27}(r)+function(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}(l=~~(c/20),n,i,o)+s+e[c]+a[l]|0;s=o,o=i,i=function(t){return t<<30|t>>>2}(n),n=r,r=l}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var n=r(1),i=r(62),o=r(2).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,u=0;u<16;++u)e[u]=t.readInt32BE(4*u);for(;u<80;++u)e[u]=function(t){return t<<1|t>>>31}(e[u-3]^e[u-8]^e[u-14]^e[u-16]);for(var c=0;c<80;++c){var l=function(t){return t<<5|t>>>27}(r)+function(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}(l=~~(c/20),n,i,o)+s+e[c]+a[l]|0;s=o,o=i,i=function(t){return t<<30|t>>>2}(n),n=r,r=l}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var n=r(1),i=r(326),o=r(62),a=r(2).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,r){var n=r(1),i=r(327),o=r(62),a=r(2).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,r){\"use strict\";var n=r(1),i=r(2).Buffer,o=r(35),a=i.alloc(128);function s(t,e){o.call(this,\"digest\"),\"string\"==typeof e&&(e=i.from(e)),this._alg=t,64<(this._key=e).length?e=t(e):e.length<64&&(e=i.concat([e,a],64));for(var r=this._ipad=i.allocUnsafe(64),n=this._opad=i.allocUnsafe(64),s=0;s<64;s++)r[s]=54^e[s],n[s]=92^e[s];this._hash=[r]}n(s,o),s.prototype._update=function(t){this._hash.push(t)},s.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=s},function(t,e,r){t.exports=r(330)},function(t,e,r){(function(e,n){var i,o=r(2).Buffer,a=r(332),s=r(333),u=r(334),c=r(335),l=e.crypto&&e.crypto.subtle,f={sha:\"SHA-1\",\"sha-1\":\"SHA-1\",sha1:\"SHA-1\",sha256:\"SHA-256\",\"sha-256\":\"SHA-256\",sha384:\"SHA-384\",\"sha-384\":\"SHA-384\",\"sha-512\":\"SHA-512\",sha512:\"SHA-512\"},h=[];function p(t,e,r,n,i){return l.importKey(\"raw\",t,{name:\"PBKDF2\"},!1,[\"deriveBits\"]).then((function(t){return l.deriveBits({name:\"PBKDF2\",salt:e,iterations:r,hash:{name:i}},t,n<<3)})).then((function(t){return o.from(t)}))}t.exports=function(t,r,d,m,g,b){\"function\"==typeof g&&(b=g,g=void 0);var _=f[(g=g||\"sha1\").toLowerCase()];if(!_||\"function\"!=typeof e.Promise)return n.nextTick((function(){var e;try{e=u(t,r,d,m,g)}catch(e){return b(e)}b(null,e)}));if(a(d,m),t=c(t,s,\"Password\"),r=c(r,s,\"Salt\"),\"function\"!=typeof b)throw new Error(\"No callback provided to pbkdf2\");!function(t,e){t.then((function(t){n.nextTick((function(){e(null,t)}))}),(function(t){n.nextTick((function(){e(t)}))}))}(function(t){if(e.process&&!e.process.browser)return Promise.resolve(!1);if(!l||!l.importKey||!l.deriveBits)return Promise.resolve(!1);if(void 0!==h[t])return h[t];var r=p(i=i||o.alloc(8),i,10,128,t).then((function(){return!0})).catch((function(){return!1}));return h[t]=r}(_).then((function(e){return e?p(t,r,d,m,_):u(t,r,d,m,g)})),b)}}).call(this,r(9),r(5))},function(t,e,r){var n=r(764),i=r(188),o=r(189),a=r(777),s=r(122);function u(t,e,r){if(t=t.toLowerCase(),o[t])return i.createCipheriv(t,e,r);if(a[t])return new n({key:e,iv:r,mode:t});throw new TypeError(\"invalid suite type\")}function c(t,e,r){if(t=t.toLowerCase(),o[t])return i.createDecipheriv(t,e,r);if(a[t])return new n({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError(\"invalid suite type\")}e.createCipher=e.Cipher=function(t,e){var r;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!a[t])throw new TypeError(\"invalid suite type\");r=8*a[t].key,n=a[t].iv}var n=s(e,!1,r,n);return u(t,n.key,n.iv)},e.createCipheriv=e.Cipheriv=u,e.createDecipher=e.Decipher=function(t,e){var r;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!a[t])throw new TypeError(\"invalid suite type\");r=8*a[t].key,n=a[t].iv}var n=s(e,!1,r,n);return c(t,n.key,n.iv)},e.createDecipheriv=e.Decipheriv=c,e.listCiphers=e.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},function(t,e,r){var n=r(35),i=r(765),o=r(1),a=r(2).Buffer,s={\"des-ede3-cbc\":i.CBC.instantiate(i.EDE),\"des-ede3\":i.EDE,\"des-ede-cbc\":i.CBC.instantiate(i.EDE),\"des-ede\":i.EDE,\"des-cbc\":i.CBC.instantiate(i.DES),\"des-ecb\":i.DES};function u(t){n.call(this);var e=t.mode.toLowerCase(),r=s[e],i=t.decrypt?\"decrypt\":\"encrypt\",o=t.key;a.isBuffer(o)||(o=a.from(o)),\"des-ede\"!==e&&\"des-ede-cbc\"!==e||(o=a.concat([o,o.slice(0,8)])),t=t.iv,a.isBuffer(t)||(t=a.from(t)),this._des=r.create({key:o,iv:t,type:i})}s.des=s[\"des-cbc\"],s.des3=s[\"des-ede3-cbc\"],o(t.exports=u,n),u.prototype._update=function(t){return a.from(this._des.update(t))},u.prototype._final=function(){return a.from(this._des.final())}},function(t,e,r){\"use strict\";e.utils=r(336),e.Cipher=r(187),e.DES=r(337),e.CBC=r(766),e.EDE=r(767)},function(t,e,r){\"use strict\";var n=r(16),i=r(1),o={};function a(t){n.equal(t.length,8,\"Invalid IV length\"),this.iv=new Array(8);for(var e=0;e>a%8,t._prev=function(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i>7;return o}(t._prev,r?i:o);return s}(t,e[a],r);return o}},function(t,e,r){(function(t){var n=r(89);e.encrypt=function(e,r){for(;e._cache.length>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function a(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(t){for(var e=-1;++e>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,e&&(r[0]=r[0]^225<<24)}this.state=o(n)},a.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);16<=this.cache.length;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},a.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=a},function(t,e,r){var n=r(341),i=r(2).Buffer,o=r(189),a=r(342),s=r(35),u=r(121),c=r(122);function l(t,e,r){s.call(this),this._cache=new f,this._last=void 0,this._cipher=new u.AES(e),this._prev=i.from(r),this._mode=t,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function h(t,e,r){if(!(t=o[t.toLowerCase()]))throw new TypeError(\"invalid suite type\");if(\"string\"==typeof r&&(r=i.from(r)),\"GCM\"!==t.mode&&r.length!==t.iv)throw new TypeError(\"invalid iv length \"+r.length);if(\"string\"==typeof e&&(e=i.from(e)),e.length!==t.key/8)throw new TypeError(\"invalid key length \"+e.length);return\"stream\"===t.type?new a(t.module,e,r,!0):\"auth\"===t.type?new n(t.module,e,r,!0):new l(t.module,e,r)}r(1)(l,s),l.prototype._update=function(t){var e;this._cache.add(t);for(var r=[];e=this._cache.get(this._autopadding);)e=this._mode.decrypt(this,e),r.push(e);return i.concat(r)},l.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||16>>0),r=this.head,n=0;r;)!function(t,e,r){o.prototype.copy.call(t,e,r)}(r.data,e,n),n+=r.data.length,r=r.next;return e}},{key:\"consume\",value:function(t,e){var r;return ti.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e).data=i.slice(o);break}++r}return this.length-=r,n}},{key:\"_getBuffer\",value:function(t){var e=o.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r).data=i.slice(a);break}++n}return this.length-=n,e}},{key:s,value:function(t,e){return a(this,function(t){for(var e=1;e>>26-s&67108863,26<=(s+=24)&&(s-=26,n++);else if(\"le\"===r)for(n=a=0;a>>26-s&67108863,26<=(s+=24)&&(s-=26,n++);return this._strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r,n=0;n>>26-i&4194303,26<=(i+=24)&&(i-=26,o++);n+6!==e&&(r=u(t,e,n+6),this.words[o]|=r<>>26-i&4194303),this._strip()},a.prototype._parseBase=function(t,e,r){this.words=[0];for(var n=0,i=this.length=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l\"}var h=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0,i=(n=(r.length=n)-1|0,67108863&(f=(0|t.words[0])*(0|e.words[0]))),o=f/67108864|0;r.words[0]=i;for(var a=1;a>>26,u=67108863&o,c=Math.min(a,e.length-1),l=Math.max(0,a-t.length+1);l<=c;l++){var f,h=a-l|0;s+=(f=(0|t.words[h])*(0|e.words[l])+u)/67108864|0,u=67108863&f}r.words[a]=0|u,o=0|s}return 0!==o?r.words[a]=0|o:r.length--,r._strip()}a.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||\"hex\"===t){u=\"\";for(var r=0,n=0,o=0;o>>24-r&16777215)||o!==this.length-1?h[6-s.length]+s+u:s+u;26<=(r+=2)&&(r-=26,o--)}for(0!==n&&(u=n.toString(16)+u);u.length%e!=0;)u=\"0\"+u;return 0!==this.negative&&(u=\"-\"+u),u}if(t===(0|t)&&2<=t&&t<=36){var c=p[t],l=d[t];for(u=\"\",(f=this.clone()).negative=0;!f.isZero();){var f,m=f.modrn(l).toString(t);u=(f=f.idivn(l)).isZero()?m+u:h[c-m.length]+m+u}for(this.isZero()&&(u=\"0\"+u);u.length%e!=0;)u=\"0\"+u;return 0!==this.negative&&(u=\"-\"+u),u}i(!1,\"Base should be between 2 and 36\")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:2>8&255),e>16&255),6===i?(e>24&255),i=r=0):(r=o>>>24,i+=2)}if(e>8&255),0<=e&&(t[e--]=o>>16&255),6===i?(0<=e&&(t[e--]=o>>24&255),i=r=0):(r=o>>>24,i+=2)}if(0<=e)for(t[e--]=r;0<=e;)t[e--]=0},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t;return t=0,4096<=e&&(t+=13,e>>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t;return t=0,0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},a.prototype.bitLength=function(){var t=this.words[this.length-1];return t=this._countBits(t),26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){for(var e=this.length>t.length?t:this,r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){for(var e,r=this.length>t.length?(e=this,t):(e=t,this),n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i(\"number\"==typeof t&&0<=t);var e=0|Math.ceil(t/26);t%=26,this._expand(e),0>26-t),this._strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i(\"number\"==typeof t&&0<=t);var r=t/26|0;return t%=26,this._expand(1+r),this.words[r]=e?this.words[r]|1<t.length?(r=this,t):(r=t,this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;n=0>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,c=8191&(G=0|n[1]),l=G>>>13,f=8191&(K=0|n[2]),h=K>>>13,p=0|n[3],d=8191&p,m=p>>>13,g=8191&(W=0|n[4]),b=W>>>13,_=8191&(Y=0|n[5]),y=Y>>>13,v=0|n[6],w=8191&v,E=v>>>13,T=8191&(X=0|n[7]),A=X>>>13,x=8191&($=0|n[8]),S=$>>>13,O=8191&(Q=0|n[9]),k=Q>>>13,M=8191&(Z=0|i[0]),C=Z>>>13,R=0|i[1],j=8191&R,N=R>>>13,L=0|i[2],P=8191&L,D=L>>>13,I=8191&(J=0|i[3]),B=J>>>13,q=0|i[4],U=8191&q,H=q>>>13,F=0|i[5],z=8191&F,V=F>>>13,G=8191&(a=0|i[6]),K=a>>>13,W=8191&(p=0|i[7]),Y=p>>>13,X=8191&(v=0|i[8]),$=v>>>13,Q=8191&(n=0|i[9]),Z=n>>>13;r.negative=t.negative^e.negative,r.length=19;var J=(0+Math.imul(s,M)|0)+((8191&(L=Math.imul(s,C)+Math.imul(u,M)|0))<<13)|0,tt=(Math.imul(u,C)+(L>>>13)|0)+(J>>>26)|0;return J&=67108863,R=Math.imul(c,M),L=Math.imul(c,C)+Math.imul(l,M)|0,q=Math.imul(l,C),F=(tt+(R+Math.imul(s,j)|0)|0)+((8191&(L=(L+Math.imul(s,N)|0)+Math.imul(u,j)|0))<<13)|0,tt=((q+Math.imul(u,N)|0)+(L>>>13)|0)+(F>>>26)|0,F&=67108863,R=Math.imul(f,M),L=Math.imul(f,C)+Math.imul(h,M)|0,q=Math.imul(h,C),R=R+Math.imul(c,j)|0,L=(L+Math.imul(c,N)|0)+Math.imul(l,j)|0,q=q+Math.imul(l,N)|0,a=(tt+(R+Math.imul(s,P)|0)|0)+((8191&(L=(L+Math.imul(s,D)|0)+Math.imul(u,P)|0))<<13)|0,tt=((q+Math.imul(u,D)|0)+(L>>>13)|0)+(a>>>26)|0,a&=67108863,R=Math.imul(d,M),L=Math.imul(d,C)+Math.imul(m,M)|0,q=Math.imul(m,C),R=R+Math.imul(f,j)|0,L=(L+Math.imul(f,N)|0)+Math.imul(h,j)|0,q=q+Math.imul(h,N)|0,R=R+Math.imul(c,P)|0,L=(L+Math.imul(c,D)|0)+Math.imul(l,P)|0,q=q+Math.imul(l,D)|0,p=(tt+(R+Math.imul(s,I)|0)|0)+((8191&(L=(L+Math.imul(s,B)|0)+Math.imul(u,I)|0))<<13)|0,tt=((q+Math.imul(u,B)|0)+(L>>>13)|0)+(p>>>26)|0,p&=67108863,R=Math.imul(g,M),L=Math.imul(g,C)+Math.imul(b,M)|0,q=Math.imul(b,C),R=R+Math.imul(d,j)|0,L=(L+Math.imul(d,N)|0)+Math.imul(m,j)|0,q=q+Math.imul(m,N)|0,R=R+Math.imul(f,P)|0,L=(L+Math.imul(f,D)|0)+Math.imul(h,P)|0,q=q+Math.imul(h,D)|0,R=R+Math.imul(c,I)|0,L=(L+Math.imul(c,B)|0)+Math.imul(l,I)|0,q=q+Math.imul(l,B)|0,v=(tt+(R+Math.imul(s,U)|0)|0)+((8191&(L=(L+Math.imul(s,H)|0)+Math.imul(u,U)|0))<<13)|0,tt=((q+Math.imul(u,H)|0)+(L>>>13)|0)+(v>>>26)|0,v&=67108863,R=Math.imul(_,M),L=Math.imul(_,C)+Math.imul(y,M)|0,q=Math.imul(y,C),R=R+Math.imul(g,j)|0,L=(L+Math.imul(g,N)|0)+Math.imul(b,j)|0,q=q+Math.imul(b,N)|0,R=R+Math.imul(d,P)|0,L=(L+Math.imul(d,D)|0)+Math.imul(m,P)|0,q=q+Math.imul(m,D)|0,R=R+Math.imul(f,I)|0,L=(L+Math.imul(f,B)|0)+Math.imul(h,I)|0,q=q+Math.imul(h,B)|0,R=R+Math.imul(c,U)|0,L=(L+Math.imul(c,H)|0)+Math.imul(l,U)|0,q=q+Math.imul(l,H)|0,i=(tt+(R+Math.imul(s,z)|0)|0)+((8191&(L=(L+Math.imul(s,V)|0)+Math.imul(u,z)|0))<<13)|0,tt=((q+Math.imul(u,V)|0)+(L>>>13)|0)+(i>>>26)|0,i&=67108863,R=Math.imul(w,M),L=Math.imul(w,C)+Math.imul(E,M)|0,q=Math.imul(E,C),R=R+Math.imul(_,j)|0,L=(L+Math.imul(_,N)|0)+Math.imul(y,j)|0,q=q+Math.imul(y,N)|0,R=R+Math.imul(g,P)|0,L=(L+Math.imul(g,D)|0)+Math.imul(b,P)|0,q=q+Math.imul(b,D)|0,R=R+Math.imul(d,I)|0,L=(L+Math.imul(d,B)|0)+Math.imul(m,I)|0,q=q+Math.imul(m,B)|0,R=R+Math.imul(f,U)|0,L=(L+Math.imul(f,H)|0)+Math.imul(h,U)|0,q=q+Math.imul(h,H)|0,R=R+Math.imul(c,z)|0,L=(L+Math.imul(c,V)|0)+Math.imul(l,z)|0,q=q+Math.imul(l,V)|0,n=(tt+(R+Math.imul(s,G)|0)|0)+((8191&(L=(L+Math.imul(s,K)|0)+Math.imul(u,G)|0))<<13)|0,tt=((q+Math.imul(u,K)|0)+(L>>>13)|0)+(n>>>26)|0,n&=67108863,R=Math.imul(T,M),L=Math.imul(T,C)+Math.imul(A,M)|0,q=Math.imul(A,C),R=R+Math.imul(w,j)|0,L=(L+Math.imul(w,N)|0)+Math.imul(E,j)|0,q=q+Math.imul(E,N)|0,R=R+Math.imul(_,P)|0,L=(L+Math.imul(_,D)|0)+Math.imul(y,P)|0,q=q+Math.imul(y,D)|0,R=R+Math.imul(g,I)|0,L=(L+Math.imul(g,B)|0)+Math.imul(b,I)|0,q=q+Math.imul(b,B)|0,R=R+Math.imul(d,U)|0,L=(L+Math.imul(d,H)|0)+Math.imul(m,U)|0,q=q+Math.imul(m,H)|0,R=R+Math.imul(f,z)|0,L=(L+Math.imul(f,V)|0)+Math.imul(h,z)|0,q=q+Math.imul(h,V)|0,R=R+Math.imul(c,G)|0,L=(L+Math.imul(c,K)|0)+Math.imul(l,G)|0,q=q+Math.imul(l,K)|0,t=(tt+(R+Math.imul(s,W)|0)|0)+((8191&(L=(L+Math.imul(s,Y)|0)+Math.imul(u,W)|0))<<13)|0,tt=((q+Math.imul(u,Y)|0)+(L>>>13)|0)+(t>>>26)|0,t&=67108863,R=Math.imul(x,M),L=Math.imul(x,C)+Math.imul(S,M)|0,q=Math.imul(S,C),R=R+Math.imul(T,j)|0,L=(L+Math.imul(T,N)|0)+Math.imul(A,j)|0,q=q+Math.imul(A,N)|0,R=R+Math.imul(w,P)|0,L=(L+Math.imul(w,D)|0)+Math.imul(E,P)|0,q=q+Math.imul(E,D)|0,R=R+Math.imul(_,I)|0,L=(L+Math.imul(_,B)|0)+Math.imul(y,I)|0,q=q+Math.imul(y,B)|0,R=R+Math.imul(g,U)|0,L=(L+Math.imul(g,H)|0)+Math.imul(b,U)|0,q=q+Math.imul(b,H)|0,R=R+Math.imul(d,z)|0,L=(L+Math.imul(d,V)|0)+Math.imul(m,z)|0,q=q+Math.imul(m,V)|0,R=R+Math.imul(f,G)|0,L=(L+Math.imul(f,K)|0)+Math.imul(h,G)|0,q=q+Math.imul(h,K)|0,R=R+Math.imul(c,W)|0,L=(L+Math.imul(c,Y)|0)+Math.imul(l,W)|0,q=q+Math.imul(l,Y)|0,e=(tt+(R+Math.imul(s,X)|0)|0)+((8191&(L=(L+Math.imul(s,$)|0)+Math.imul(u,X)|0))<<13)|0,tt=((q+Math.imul(u,$)|0)+(L>>>13)|0)+(e>>>26)|0,e&=67108863,R=Math.imul(O,M),L=Math.imul(O,C)+Math.imul(k,M)|0,q=Math.imul(k,C),R=R+Math.imul(x,j)|0,L=(L+Math.imul(x,N)|0)+Math.imul(S,j)|0,q=q+Math.imul(S,N)|0,R=R+Math.imul(T,P)|0,L=(L+Math.imul(T,D)|0)+Math.imul(A,P)|0,q=q+Math.imul(A,D)|0,R=R+Math.imul(w,I)|0,L=(L+Math.imul(w,B)|0)+Math.imul(E,I)|0,q=q+Math.imul(E,B)|0,R=R+Math.imul(_,U)|0,L=(L+Math.imul(_,H)|0)+Math.imul(y,U)|0,q=q+Math.imul(y,H)|0,R=R+Math.imul(g,z)|0,L=(L+Math.imul(g,V)|0)+Math.imul(b,z)|0,q=q+Math.imul(b,V)|0,R=R+Math.imul(d,G)|0,L=(L+Math.imul(d,K)|0)+Math.imul(m,G)|0,q=q+Math.imul(m,K)|0,R=R+Math.imul(f,W)|0,L=(L+Math.imul(f,Y)|0)+Math.imul(h,W)|0,q=q+Math.imul(h,Y)|0,R=R+Math.imul(c,X)|0,L=(L+Math.imul(c,$)|0)+Math.imul(l,X)|0,q=q+Math.imul(l,$)|0,s=(tt+(R+Math.imul(s,Q)|0)|0)+((8191&(L=(L+Math.imul(s,Z)|0)+Math.imul(u,Q)|0))<<13)|0,tt=((q+Math.imul(u,Z)|0)+(L>>>13)|0)+(s>>>26)|0,s&=67108863,R=Math.imul(O,j),L=Math.imul(O,N)+Math.imul(k,j)|0,q=Math.imul(k,N),R=R+Math.imul(x,P)|0,L=(L+Math.imul(x,D)|0)+Math.imul(S,P)|0,q=q+Math.imul(S,D)|0,R=R+Math.imul(T,I)|0,L=(L+Math.imul(T,B)|0)+Math.imul(A,I)|0,q=q+Math.imul(A,B)|0,R=R+Math.imul(w,U)|0,L=(L+Math.imul(w,H)|0)+Math.imul(E,U)|0,q=q+Math.imul(E,H)|0,R=R+Math.imul(_,z)|0,L=(L+Math.imul(_,V)|0)+Math.imul(y,z)|0,q=q+Math.imul(y,V)|0,R=R+Math.imul(g,G)|0,L=(L+Math.imul(g,K)|0)+Math.imul(b,G)|0,q=q+Math.imul(b,K)|0,R=R+Math.imul(d,W)|0,L=(L+Math.imul(d,Y)|0)+Math.imul(m,W)|0,q=q+Math.imul(m,Y)|0,R=R+Math.imul(f,X)|0,L=(L+Math.imul(f,$)|0)+Math.imul(h,X)|0,q=q+Math.imul(h,$)|0,c=(tt+(R+Math.imul(c,Q)|0)|0)+((8191&(L=(L+Math.imul(c,Z)|0)+Math.imul(l,Q)|0))<<13)|0,tt=((q+Math.imul(l,Z)|0)+(L>>>13)|0)+(c>>>26)|0,c&=67108863,R=Math.imul(O,P),L=Math.imul(O,D)+Math.imul(k,P)|0,q=Math.imul(k,D),R=R+Math.imul(x,I)|0,L=(L+Math.imul(x,B)|0)+Math.imul(S,I)|0,q=q+Math.imul(S,B)|0,R=R+Math.imul(T,U)|0,L=(L+Math.imul(T,H)|0)+Math.imul(A,U)|0,q=q+Math.imul(A,H)|0,R=R+Math.imul(w,z)|0,L=(L+Math.imul(w,V)|0)+Math.imul(E,z)|0,q=q+Math.imul(E,V)|0,R=R+Math.imul(_,G)|0,L=(L+Math.imul(_,K)|0)+Math.imul(y,G)|0,q=q+Math.imul(y,K)|0,R=R+Math.imul(g,W)|0,L=(L+Math.imul(g,Y)|0)+Math.imul(b,W)|0,q=q+Math.imul(b,Y)|0,R=R+Math.imul(d,X)|0,L=(L+Math.imul(d,$)|0)+Math.imul(m,X)|0,q=q+Math.imul(m,$)|0,f=(tt+(R+Math.imul(f,Q)|0)|0)+((8191&(L=(L+Math.imul(f,Z)|0)+Math.imul(h,Q)|0))<<13)|0,tt=((q+Math.imul(h,Z)|0)+(L>>>13)|0)+(f>>>26)|0,f&=67108863,R=Math.imul(O,I),L=Math.imul(O,B)+Math.imul(k,I)|0,q=Math.imul(k,B),R=R+Math.imul(x,U)|0,L=(L+Math.imul(x,H)|0)+Math.imul(S,U)|0,q=q+Math.imul(S,H)|0,R=R+Math.imul(T,z)|0,L=(L+Math.imul(T,V)|0)+Math.imul(A,z)|0,q=q+Math.imul(A,V)|0,R=R+Math.imul(w,G)|0,L=(L+Math.imul(w,K)|0)+Math.imul(E,G)|0,q=q+Math.imul(E,K)|0,R=R+Math.imul(_,W)|0,L=(L+Math.imul(_,Y)|0)+Math.imul(y,W)|0,q=q+Math.imul(y,Y)|0,R=R+Math.imul(g,X)|0,L=(L+Math.imul(g,$)|0)+Math.imul(b,X)|0,q=q+Math.imul(b,$)|0,d=(tt+(R+Math.imul(d,Q)|0)|0)+((8191&(L=(L+Math.imul(d,Z)|0)+Math.imul(m,Q)|0))<<13)|0,tt=((q+Math.imul(m,Z)|0)+(L>>>13)|0)+(d>>>26)|0,d&=67108863,R=Math.imul(O,U),L=Math.imul(O,H)+Math.imul(k,U)|0,q=Math.imul(k,H),R=R+Math.imul(x,z)|0,L=(L+Math.imul(x,V)|0)+Math.imul(S,z)|0,q=q+Math.imul(S,V)|0,R=R+Math.imul(T,G)|0,L=(L+Math.imul(T,K)|0)+Math.imul(A,G)|0,q=q+Math.imul(A,K)|0,R=R+Math.imul(w,W)|0,L=(L+Math.imul(w,Y)|0)+Math.imul(E,W)|0,q=q+Math.imul(E,Y)|0,R=R+Math.imul(_,X)|0,L=(L+Math.imul(_,$)|0)+Math.imul(y,X)|0,q=q+Math.imul(y,$)|0,g=(tt+(R+Math.imul(g,Q)|0)|0)+((8191&(L=(L+Math.imul(g,Z)|0)+Math.imul(b,Q)|0))<<13)|0,tt=((q+Math.imul(b,Z)|0)+(L>>>13)|0)+(g>>>26)|0,g&=67108863,R=Math.imul(O,z),L=Math.imul(O,V)+Math.imul(k,z)|0,q=Math.imul(k,V),R=R+Math.imul(x,G)|0,L=(L+Math.imul(x,K)|0)+Math.imul(S,G)|0,q=q+Math.imul(S,K)|0,R=R+Math.imul(T,W)|0,L=(L+Math.imul(T,Y)|0)+Math.imul(A,W)|0,q=q+Math.imul(A,Y)|0,R=R+Math.imul(w,X)|0,L=(L+Math.imul(w,$)|0)+Math.imul(E,X)|0,q=q+Math.imul(E,$)|0,_=(tt+(R+Math.imul(_,Q)|0)|0)+((8191&(L=(L+Math.imul(_,Z)|0)+Math.imul(y,Q)|0))<<13)|0,tt=((q+Math.imul(y,Z)|0)+(L>>>13)|0)+(_>>>26)|0,_&=67108863,R=Math.imul(O,G),L=Math.imul(O,K)+Math.imul(k,G)|0,q=Math.imul(k,K),R=R+Math.imul(x,W)|0,L=(L+Math.imul(x,Y)|0)+Math.imul(S,W)|0,q=q+Math.imul(S,Y)|0,R=R+Math.imul(T,X)|0,L=(L+Math.imul(T,$)|0)+Math.imul(A,X)|0,q=q+Math.imul(A,$)|0,w=(tt+(R+Math.imul(w,Q)|0)|0)+((8191&(L=(L+Math.imul(w,Z)|0)+Math.imul(E,Q)|0))<<13)|0,tt=((q+Math.imul(E,Z)|0)+(L>>>13)|0)+(w>>>26)|0,w&=67108863,R=Math.imul(O,W),L=Math.imul(O,Y)+Math.imul(k,W)|0,q=Math.imul(k,Y),R=R+Math.imul(x,X)|0,L=(L+Math.imul(x,$)|0)+Math.imul(S,X)|0,q=q+Math.imul(S,$)|0,T=(tt+(R+Math.imul(T,Q)|0)|0)+((8191&(L=(L+Math.imul(T,Z)|0)+Math.imul(A,Q)|0))<<13)|0,tt=((q+Math.imul(A,Z)|0)+(L>>>13)|0)+(T>>>26)|0,T&=67108863,R=Math.imul(O,X),L=Math.imul(O,$)+Math.imul(k,X)|0,q=Math.imul(k,$),x=(tt+(R+Math.imul(x,Q)|0)|0)+((8191&(L=(L+Math.imul(x,Z)|0)+Math.imul(S,Q)|0))<<13)|0,tt=((q+Math.imul(S,Z)|0)+(L>>>13)|0)+(x>>>26)|0,x&=67108863,Q=(tt+Math.imul(O,Q)|0)+((8191&(L=Math.imul(O,Z)+Math.imul(k,Q)|0))<<13)|0,tt=(Math.imul(k,Z)+(L>>>13)|0)+(Q>>>26)|0,Q&=67108863,o[0]=J,o[1]=F,o[2]=a,o[3]=p,o[4]=v,o[5]=i,o[6]=n,o[7]=t,o[8]=e,o[9]=s,o[10]=c,o[11]=f,o[12]=d,o[13]=g,o[14]=_,o[15]=w,o[16]=T,o[17]=x,o[18]=Q,0!=tt&&(o[19]=tt,r.length++),r};function b(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function _(t,e,r){return b(t,e,r)}Math.imul||(g=m),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return(10===this.length&&10===t.length?g:r<63?m:r<1024?b:_)(this,t,e)},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),_(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){var e=t<0;e&&(t=-t),i(\"number\"==typeof t),i(t<67108864);for(var r=0,n=0;n>=26,r+=o/67108864|0,r+=a>>>26,this.words[n]=67108863&a}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n>>26-e<<26-e;if(0!=e){for(var o=0,a=0;a>>26-e}o&&(this.words[a]=o,this.length++)}if(0!=r){for(a=this.length-1;0<=a;a--)this.words[a+r]=this.words[a];for(a=0;a>>o<a)for(this.length-=a,c=0;c>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i(\"number\"==typeof t&&0<=t),t=(t-(e=t%26))/26;var e=1<>>e<>26)-(u/67108864|0),this.words[s+r]=67108863&n}for(;s>26,this.words[s+r]=67108863&n;if(0===a)return this._strip();for(i(-1===a),s=a=0;s>26,this.words[s]=67108863&n;return this.negative=1,this._strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,u=n.length-i.length;if(\"mod\"!==e){(s=new a(null)).length=1+u,s.words=new Array(s.length);for(var c=0;cthis.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?\"div\"===e?{div:this.divn(t.words[0]),mod:null}:\"mod\"===e?{div:null,mod:new a(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modrn(t.words[0]))}:this._wordDiv(t,e);var n,o,s},a.prototype.div=function(t){return this.divmod(t,\"div\",!1).div},a.prototype.mod=function(t){return this.divmod(t,\"mod\",!1).mod},a.prototype.umod=function(t){return this.divmod(t,\"mod\",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1);return t=t.andln(1),(n=r.cmp(n))<0||1===t&&0===n?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=(1<<26)%t,n=0,o=this.length-1;0<=o;o--)n=(r*n+(0|this.words[o]))%t;return e?-n:n},a.prototype.modn=function(t){return this.modrn(t)},a.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=0,n=this.length-1;0<=n;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());for(var e=this,r=t.clone(),n=(e=0!==e.negative?e.umod(t):e.clone(),new a(1)),o=new a(0),s=new a(0),u=new a(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,p=1;0==(e.words[0]&p)&&h<26;++h,p<<=1);if(0>>26,o&=67108863,this.words[n]=o}return 0!==r&&(this.words[n]=r,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e=t<0;return 0===this.negative||e?0===this.negative&&e?1:(this._strip(),t=1t.length)return 1;if(this.lengththis.n;);return 0===(t=e>>22,i=o}i>>>=22,0===(t.words[n-10]=i)&&10>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if(\"k256\"===t)e=new w;else if(\"p224\"===t)e=new E;else if(\"p192\"===t)e=new T;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new A}return y[t]=e},x.prototype._verify1=function(t){i(0===t.negative,\"red works only with positives\"),i(t.red,\"red works only with red numbers\")},x.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),\"red works only with positives\"),i(t.red&&t.red===e.red,\"red works only with red numbers\")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){return this._verify2(t,e),0<=(e=t.add(e)).cmp(this.m)&&e.isub(this.m),e._forceRed(this)},x.prototype.iadd=function(t,e){return this._verify2(t,e),0<=(e=t.iadd(e)).cmp(this.m)&&e.isub(this.m),e},x.prototype.sub=function(t,e){return this._verify2(t,e),(e=t.sub(e)).cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},x.prototype.isub=function(t,e){return this._verify2(t,e),(e=t.isub(e)).cmpn(0)<0&&e.iadd(this.m),e},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e)return e=this.m.add(new a(1)).iushrn(2),this.pow(t,e);for(var r=this.m.subn(1),n=0;!r.isZero()&&0===r.andln(1);)n++,r.iushrn(1);i(!r.isZero());for(var o=new a(1).toRed(this),s=o.redNeg(),u=this.m.subn(1).iushrn(1),c=new a(2*(c=this.m.bitLength())*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var l=this.pow(c,r),f=this.pow(t,r.addn(1).iushrn(1)),h=this.pow(t,r),p=n;0!==h.cmp(o);){for(var d=h,m=0;0!==d.cmp(o);m++)d=d.redSqr();i(m>l&1;i!==r[0]&&(i=this.sqr(i)),0!=f||0!==o?(o<<=1,o|=f,(4==++s||0===n&&0===l)&&(i=this.mul(i,r[o]),o=s=0)):s=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){return(t=t.clone()).red=null,t},a.mont=function(t){return new S(t)},o(S,x),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){return(t=this.imod(t.mul(this.rinv))).red=null,t},S.prototype.imul=function(t,e){return t.isZero()||e.isZero()?(t.words[0]=0,t.length=1,t):(e=(t=t.imul(e)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),0<=(e=t=t.isub(e).iushrn(this.shift)).cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this))},S.prototype.mul=function(t,e){return t.isZero()||e.isZero()?new a(0)._forceRed(this):(e=(t=t.mul(e)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),0<=(e=t=t.isub(e).iushrn(this.shift)).cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this))},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(28)(t))},function(){},function(t){t.exports=JSON.parse('{\"name\":\"elliptic\",\"version\":\"6.5.3\",\"description\":\"EC cryptography\",\"main\":\"lib/elliptic.js\",\"files\":[\"lib\"],\"scripts\":{\"jscs\":\"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js\",\"jshint\":\"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js\",\"lint\":\"npm run jscs && npm run jshint\",\"unit\":\"istanbul test _mocha --reporter=spec test/index.js\",\"test\":\"npm run lint && npm run unit\",\"version\":\"grunt dist && git add dist/\"},\"repository\":{\"type\":\"git\",\"url\":\"git@github.com:indutny/elliptic\"},\"keywords\":[\"EC\",\"Elliptic\",\"curve\",\"Cryptography\"],\"author\":\"Fedor Indutny \",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/indutny/elliptic/issues\"},\"homepage\":\"https://github.com/indutny/elliptic\",\"devDependencies\":{\"brfs\":\"^1.4.3\",\"coveralls\":\"^3.0.8\",\"grunt\":\"^1.0.4\",\"grunt-browserify\":\"^5.0.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-connect\":\"^1.0.0\",\"grunt-contrib-copy\":\"^1.0.0\",\"grunt-contrib-uglify\":\"^1.0.1\",\"grunt-mocha-istanbul\":\"^3.0.1\",\"grunt-saucelabs\":\"^9.0.1\",\"istanbul\":\"^0.4.2\",\"jscs\":\"^3.0.7\",\"jshint\":\"^2.10.3\",\"mocha\":\"^6.2.2\"},\"dependencies\":{\"bn.js\":\"^4.4.0\",\"brorand\":\"^1.0.1\",\"hash.js\":\"^1.0.0\",\"hmac-drbg\":\"^1.0.0\",\"inherits\":\"^2.0.1\",\"minimalistic-assert\":\"^1.0.0\",\"minimalistic-crypto-utils\":\"^1.0.0\"}}')},function(t,e,r){\"use strict\";var n=r(17),i=r(11),o=r(1),a=r(123),s=n.assert;function u(t){a.call(this,\"short\",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(t,e,r,n){a.BasePoint.call(this,t,\"affine\"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(t,e,r,n){a.BasePoint.call(this,t,\"jacobian\"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),(t.exports=u).prototype._getEndomorphism=function(t){var e,r,n;if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3))return r=(t.beta?new i(t.beta,16):r=(n=this._getEndoRoots(this.p))[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red),t.lambda?e=new i(t.lambda,16):(n=this._getEndoRoots(this.n),0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(r))?e=n[0]:(e=n[1],s(0===this.g.mul(e).x.cmp(this.g.x.redMul(r))))),{beta:r,lambda:e,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(e)}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=(t=(r=new i(2).toRed(e).redInvm()).redNeg(),new i(3).toRed(e).redNeg().redSqrt().redMul(r));return[t.redAdd(r).fromRed(),t.redSub(r).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,r,n,o,a,s,u,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=t,f=this.n.clone(),h=new i(1),p=new i(0),d=new i(0),m=new i(1),g=0;0!==l.cmpn(0);){var b=f.div(l),_=f.sub(b.mul(l)),y=d.sub(b.mul(h));if(b=m.sub(b.mul(p)),!n&&_.cmp(c)<0)e=u.neg(),r=h,n=_.neg(),o=y;else if(n&&2==++g)break;f=l,l=u=_,d=h,h=y,m=p,p=b}return a=_.neg(),s=y,t=n.sqr().add(o.sqr()),0<=a.sqr().add(s.sqr()).cmp(t)&&(a=e,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},u.prototype._endoSplit=function(t){var e=(o=this.endo.basis)[0],r=(a=o[1]).b.mul(t).divRound(this.n),n=e.b.neg().mul(t).divRound(this.n),i=r.mul(e.a),o=n.mul(a.a),a=(e=r.mul(e.b),n.mul(a.b));return{k1:t.sub(i).sub(o),k2:e.add(a).neg()}},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error(\"invalid point\");return r=n.fromRed().isOdd(),(e&&!r||!e&&r)&&(n=n.redNeg()),this.point(t,n)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y;return t=this.a.redMul(e),t=e.redSqr().redMul(e).redIAdd(t).redIAdd(this.b),0===r.redSqr().redISub(t).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o\":\"\"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);return 0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm())),t=e.redSqr().redISub(this.x).redISub(t.x),e=e.redMul(this.x.redSub(t)).redISub(this.y),this.curve.point(t,e)},c.prototype.dbl=function(){if(this.inf)return this;if(0===(r=this.y.redAdd(this.y)).cmpn(0))return this.curve.point(null,null);var t=this.curve.a,e=this.x.redSqr(),r=r.redInvm();return r=(t=e.redAdd(e).redIAdd(e).redIAdd(t).redMul(r)).redSqr().redISub(this.x.redAdd(this.x)),t=t.redMul(this.x.redSub(r)).redISub(this.y),this.curve.point(r,t)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){return e=[this,e],r=[t,r],this.curve.endo?this.curve._endoWnafMulAdd(e,r):this.curve._wnafMulAdd(1,e,r,2)},c.prototype.jmulAdd=function(t,e,r){return e=[this,e],r=[t,r],this.curve.endo?this.curve._endoWnafMulAdd(e,r,!0):this.curve._wnafMulAdd(1,e,r,2,!0)},c.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},c.prototype.neg=function(t){if(this.inf)return this;var e,r=this.curve.point(this.x,this.y.redNeg());return t&&this.precomputed&&(e=this.precomputed,t=function(t){return t.neg()},r.precomputed={naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(t)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(t)}}),r},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,a.BasePoint),u.prototype.jpoint=function(t,e,r){return new l(this,t,e,r)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=(r=this.z.redInvm()).redSqr(),e=this.x.redMul(t),r=this.y.redMul(t).redMul(r);return this.curve.point(e,r)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(r.redMul(this.z));return e=n.redSub(i),r=o.redSub(a),0===e.cmpn(0)?0!==r.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(a=(i=e.redSqr()).redMul(e),n=n.redMul(i),i=r.redSqr().redIAdd(a).redISub(n).redISub(n),a=r.redMul(n.redISub(i)).redISub(o.redMul(a)),e=this.z.redMul(t.z).redMul(e),this.curve.jpoint(i,a,e))},l.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z);return t=r.redSub(n),e=i.redSub(o),0===t.cmpn(0)?0!==e.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(o=(n=t.redSqr()).redMul(t),r=r.redMul(n),n=e.redSqr().redIAdd(o).redISub(r).redISub(r),o=e.redMul(r.redISub(n)).redISub(i.redMul(o)),t=this.z.redMul(t),this.curve.jpoint(n,o,t))},l.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r\":\"\"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,r){\"use strict\";var n=r(11),i=r(1),o=r(123),a=r(17);function s(t){o.call(this,\"mont\",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,r){o.BasePoint.call(this,t,\"projective\"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),(t.exports=s).prototype.validate=function(t){var e=t.normalize().x;return 0===(e=(t=e.redSqr()).redMul(e).redAdd(t.redMul(this.a)).redAdd(e)).redSqrt().redSqr().cmp(e)},i(u,o.BasePoint),s.prototype.decodePoint=function(t,e){return this.point(a.toArray(t,e),1)},s.prototype.point=function(t,e){return new u(this,t,e)},s.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray(\"be\",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?\"\":\"\"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e);return t=t.redMul(e),r=r.redMul(e.redAdd(this.curve.a24.redMul(r))),this.curve.point(t,r)},u.prototype.add=function(){throw new Error(\"Not supported on Montgomery curve\")},u.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z);return r=t.x.redSub(t.z).redMul(r),i=i.redMul(n),n=e.z.redMul(r.redAdd(i).redSqr()),i=e.x.redMul(r.redISub(i).redSqr()),this.curve.point(n,i)},u.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;0<=o;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error(\"Not supported on Montgomery curve\")},u.prototype.jumlAdd=function(){throw new Error(\"Not supported on Montgomery curve\")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(t,e,r){\"use strict\";var n=r(17),i=r(11),o=r(1),a=r(123),s=n.assert;function u(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,a.call(this,\"edwards\",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function c(t,e,r,n,o){a.BasePoint.call(this,t,\"projective\"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,a),(t.exports=u).prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r));if(r=this.one.redSub(this.c2.redMul(this.d).redMul(r)),0!==(r=(n=n.redMul(r.redInvm())).redSqrt()).redSqr().redSub(n).cmp(this.zero))throw new Error(\"invalid point\");return n=r.fromRed().isOdd(),(e&&!n||!e&&n)&&(r=r.redNeg()),this.point(t,r)},u.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=(n=t.redSqr()).redSub(this.c2),n=n.redMul(this.d).redMul(this.c2).redSub(this.a);if(0===(r=r.redMul(n.redInvm())).cmp(this.zero)){if(e)throw new Error(\"invalid point\");return this.point(this.zero,t)}if(0!==(n=r.redSqrt()).redSqr().redSub(r).cmp(this.zero))throw new Error(\"invalid point\");return n.fromRed().isOdd()!==e&&(n=n.redNeg()),this.point(n,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr();return t=e.redMul(this.a).redAdd(r),r=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r))),0===t.cmp(r)},o(c,a.BasePoint),u.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},u.prototype.point=function(t,e,r,n){return new c(this,t,e,r,n)},c.fromJSON=function(t,e){return new c(t,e[0],e[1],e[2])},c.prototype.inspect=function(){return this.isInfinity()?\"\":\"\"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=(r=this.z.redSqr()).redIAdd(r),n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=(t=(o=n.redAdd(e)).redSub(r),r=n.redSub(e),n=i.redMul(t),e=o.redMul(r),r=i.redMul(r),t.redMul(o));return this.curve.point(n,e,o,r)},c.prototype._projDbl=function(){var t,e,r,n,i,o=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),s=this.y.redSqr(),u=this.curve.twisted?(t=(n=this.curve._mulA(a)).redAdd(s),this.zOne?(e=o.redSub(a).redSub(s).redMul(t.redSub(this.curve.two)),r=t.redMul(n.redSub(s)),t.redSqr().redSub(t).redSub(t)):(i=this.z.redSqr(),u=t.redSub(i).redISub(i),e=o.redSub(a).redISub(s).redMul(u),r=t.redMul(n.redSub(s)),t.redMul(u))):(n=a.redAdd(s),i=this.curve._mulC(this.z).redSqr(),u=n.redSub(i).redSub(i),e=this.curve._mulC(o.redISub(n)).redMul(u),r=this.curve._mulC(n).redMul(a.redISub(s)),n.redMul(u));return this.curve.point(e,r,u)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e);return t=i.redSub(n),i=i.redAdd(n),n=r.redAdd(e),r=o.redMul(t),e=i.redMul(n),n=o.redMul(n),i=t.redMul(i),this.curve.point(r,e,i,n)},c.prototype._projAdd=function(t){var e,r=this.z.redMul(t.z),n=r.redSqr(),i=this.x.redMul(t.x),o=this.y.redMul(t.y),a=this.curve.d.redMul(i).redMul(o),s=n.redSub(a);return a=n.redAdd(a),t=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(i).redISub(o),t=r.redMul(s).redMul(t),a=this.curve.twisted?(e=r.redMul(a).redMul(o.redSub(this.curve._mulA(i))),s.redMul(a)):(e=r.redMul(a).redMul(o.redSub(i)),this.curve._mulC(s).redMul(a)),this.curve.point(t,e,a)},c.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},c.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},c.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},c.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),0<=r.cmp(this.curve.p))return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(t,e,r){\"use strict\";e.sha1=r(800),e.sha224=r(801),e.sha256=r(354),e.sha384=r(802),e.sha512=r(355)},function(t,e,r){\"use strict\";var n=r(22),i=r(90),o=(r=r(353),n.rotl32),a=n.sum32,s=n.sum32_5,u=r.ft_1,c=i.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(f,c),(t.exports=f).blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;nthis.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e>=1,0<=s.cmp(this.curve.p.umod(this.curve.n))&&r)throw new Error(\"Unable to find sencond key candinate\");return s=r?this.curve.pointFromX(s.add(this.curve.n),t):this.curve.pointFromX(s,t),e=e.r.invm(o),a=o.sub(a).mul(e).umod(o),o=n.mul(e).umod(o),this.g.mulAdd(a,s,o)},h.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new f(e,n)).recoveryParam)return e.recoveryParam;for(var i,o=0;o<4;o++){try{i=this.recoverPubKey(t,e,o)}catch(t){continue}if(i.eq(r))return o}throw new Error(\"Unable to find valid recovery factor\")}},function(t,e,r){\"use strict\";var n=r(195),i=r(351),o=r(16);function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||\"hex\"),r=i.toArray(t.nonce,t.nonceEnc||\"hex\");t=i.toArray(t.pers,t.persEnc||\"hex\"),o(e.length>=this.minEntropy/8,\"Not enough entropy. Minimum is: \"+this.minEntropy+\" bits\"),this._init(e,r,t)}(t.exports=a).prototype._init=function(t,e,r){r=t.concat(e).concat(r),this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,\"Not enough entropy. Minimum is: \"+this.minEntropy+\" bits\"),this._update(t.concat(r||[])),this._reseed=1},a.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error(\"Reseed is required\");\"string\"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||\"hex\"),this._update(r));for(var o=[];o.length\"}},function(t,e,r){\"use strict\";var n=r(11),i=r(17),o=i.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(o(t.r&&t.s,\"Signature without r or s\"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function s(){this.place=0}function u(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0==n||4>>=0;return!(i<=127)&&(e.place=a,i)}function c(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}(t.exports=a).prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new s;if(48!==t[r.place++])return!1;var o=u(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;if(!1===(e=u(t,r)))return!1;if(o=t.slice(r.place,e+r.place),r.place+=e,2!==t[r.place++])return!1;if(!1===(e=u(t,r)))return!1;if(t.length!==e+r.place)return!1;if(r=t.slice(r.place,e+r.place),0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===r[0]){if(!(128&r[1]))return!1;r=r.slice(1)}return this.r=new n(o),this.s=new n(r),!(this.recoveryParam=null)},a.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=c(e),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];return l(n,e.length),(n=n.concat(e)).push(2),l(n,r.length),e=n.concat(r),l(n=[48],e.length),n=n.concat(e),i.encode(n,t)}},function(t,e,r){\"use strict\";var n=r(195),i=r(194),o=r(17),a=o.assert,s=o.parseBytes,u=r(811),c=r(812);function l(t){if(a(\"ed25519\"===t,\"only tested with ed25519 so far\"),!(this instanceof l))return new l(t);t=i[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}(t.exports=l).prototype.sign=function(t,e){t=s(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n);return e=this.encodePoint(i),r=this.hashInt(e,r.pubBytes(),t).mul(r.priv()),r=n.add(r).umod(this.curve.n),this.makeSignature({R:i,S:r,Rencoded:e})},l.prototype.verify=function(t,e,r){t=s(t),e=this.makeSignature(e);var n=this.keyFromPublic(r);return r=this.hashInt(e.Rencoded(),n.pubBytes(),t),t=this.g.mul(e.S()),e.R().add(n.pub().mul(r)).eq(t)},l.prototype.hashInt=function(){for(var t=this.hash(),e=0;e=e)throw new Error(\"invalid sig\")}t.exports=function(t,e,r,c,l){if(\"ec\"===(r=a(r)).type){if(\"ecdsa\"!==c&&\"ecdsa/rsa\"!==c)throw new Error(\"wrong public key type\");return function(t,e,r){var n=s[r.data.algorithm.curve.join(\".\")];if(!n)throw new Error(\"unknown curve \"+r.data.algorithm.curve.join(\".\"));return n=new o(n),r=r.data.subjectPrivateKey.data,n.verify(e,t,r)}(t,e,r)}if(\"dsa\"===r.type){if(\"dsa\"!==c)throw new Error(\"wrong public key type\");return function(t,e,r){var n=r.data.p,o=r.data.q,s=r.data.g,c=r.data.pub_key,l=a.signature.decode(t,\"der\");return r=l.s,t=l.r,u(r,o),u(t,o),l=i.mont(n),r=r.invm(o),0===s.toRed(l).redPow(new i(e).mul(r).mod(o)).fromRed().mul(c.toRed(l).redPow(t.mul(r).mod(o)).fromRed()).mod(n).mod(o).cmp(t)}(t,e,r)}if(\"rsa\"!==c&&\"ecdsa/rsa\"!==c)throw new Error(\"wrong public key type\");e=n.concat([l,e]);for(var f=r.modulus.byteLength(),h=[1],p=0;e.length+h.length+2p||0<=new a(e).cmp(h.modulus))throw new Error(\"decryption error\");if(t=r?c(new a(e),h):s(e,h),e=l.alloc(p-t.length),t=l.concat([e,t],p),4===f)return function(t,e){var r=t.modulus.byteLength(),n=u(\"sha1\").update(l.alloc(0)).digest(),a=n.length;if(0!==e[0])throw new Error(\"decryption error\");t=e.slice(1,a+1),e=e.slice(a+1),t=o(t,i(e,a));var s=o(e,i(t,r-a-1));if(function(t,e){t=l.from(t),e=l.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));for(var i=-1;++i=e.length){o++;break}var a=e.slice(2,i-1);if((\"0002\"!==n.toString(\"hex\")&&!r||\"0001\"!==n.toString(\"hex\")&&r)&&o++,a.length<8&&o++,o)throw new Error(\"decryption error\");return e.slice(i)}(0,t,r);if(3===f)return t;throw new Error(\"unknown padding\")}},function(t,e,r){\"use strict\";(function(t,n){function i(){throw new Error(\"secure random number generation not supported by this browser\\nuse chrome, FireFox or Internet Explorer 11\")}var o=r(2),a=r(59),s=o.Buffer,u=o.kMaxLength,c=t.crypto||t.msCrypto,l=Math.pow(2,32)-1;function f(t,e){if(\"number\"!=typeof t||t!=t)throw new TypeError(\"offset must be a number\");if(l\\n \").concat(this.getContent(),\"\\n \\n \")}},{key:\"render\",value:function(){return\"\\n \".concat((0,l.default)(\"\\n \\n \")),\"\\n \").concat(this.renderContent(),\"\\n \").concat((0,l.default)(\"\\n \\n \"),\"\\n \")}}]),e}(),e.default=r,(0,u.default)(r,\"componentName\",\"mj-navbar-link\"),(0,u.default)(r,\"endingTag\",!0),(0,u.default)(r,\"allowedAttributes\",{color:\"color\",\"font-family\":\"string\",\"font-size\":\"unit(px)\",\"font-style\":\"string\",\"font-weight\":\"string\",href:\"string\",name:\"string\",target:\"string\",rel:\"string\",\"letter-spacing\":\"unitWithNegative(px,em)\",\"line-height\":\"unit(px,%,)\",\"padding-bottom\":\"unit(px,%)\",\"padding-left\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"padding-top\":\"unit(px,%)\",padding:\"unit(px,%){1,4}\",\"text-decoration\":\"string\",\"text-transform\":\"string\"}),(0,u.default)(r,\"defaultAttributes\",{color:\"#000000\",\"font-family\":\"Ubuntu, Helvetica, Arial, sans-serif\",\"font-size\":\"13px\",\"font-weight\":\"normal\",\"line-height\":\"22px\",padding:\"15px 10px\",target:\"_blank\",\"text-decoration\":\"none\",\"text-transform\":\"uppercase\"}),t.exports=e.default},function(t,e,r){\"use strict\";var n=r(0);Object.defineProperty(e,\"__esModule\",{value:!0}),Object.defineProperty(e,\"Carousel\",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,\"CarouselImage\",{enumerable:!0,get:function(){return o.default}});var i=n(r(831)),o=n(r(839))},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){for(var r=0;r\\n \\n \").concat((0,p.default)(1,this.props.children.length+1).map((function(i){return\"\\n \\n \\n \\n \")})).join(\"\"),\"\\n \\n \\n \")}},{key:\"generateImages\",value:function(){return\"\\n \\n \\n \").concat(this.renderChildren(this.props.children,{attributes:{\"border-radius\":this.getAttribute(\"border-radius\")}}),\"\\n \\n \\n \")}},{key:\"generateCarousel\",value:function(){return\"\\n \\n \\n \\n \").concat(this.generateControls(\"previous\",this.getAttribute(\"left-icon\")),\"\\n \").concat(this.generateImages(),\"\\n \").concat(this.generateControls(\"next\",this.getAttribute(\"right-icon\")),\"\\n \\n \\n \\n \")}},{key:\"renderFallback\",value:function(){var t=this.props.children;return 0===t.length?\"\":(0,g.msoConditionalTag)(this.renderChildren([t[0]],{attributes:{\"border-radius\":this.getAttribute(\"border-radius\")}}))}},{key:\"render\",value:function(){return\"\\n \".concat((0,g.msoConditionalTag)(\"\\n \\n \").concat(this.generateRadios(),\"\\n \\n \").concat(this.generateThumbnails(),\"\\n \").concat(this.generateCarousel(),\"\\n \\n \\n \"),!0),\"\\n \").concat(this.renderFallback(),\"\\n \")}}]),e}(),e.default=r,(0,c.default)(r,\"componentName\",\"mj-carousel\"),(0,c.default)(r,\"allowedAttributes\",{align:\"enum(left,center,right)\",\"border-radius\":\"unit(px,%)\",\"icon-width\":\"unit(px,%)\",\"left-icon\":\"string\",padding:\"unit(px,%){1,4}\",\"padding-top\":\"unit(px,%)\",\"padding-bottom\":\"unit(px,%)\",\"padding-left\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"right-icon\":\"string\",thumbnails:\"enum(visible,hidden)\",\"tb-border\":\"string\",\"tb-border-radius\":\"unit(px,%)\",\"tb-hover-border-color\":\"color\",\"tb-selected-border-color\":\"color\",\"tb-width\":\"unit(px,%)\"}),(0,c.default)(r,\"defaultAttributes\",{align:\"center\",\"border-radius\":\"6px\",\"icon-width\":\"44px\",\"left-icon\":\"https://i.imgur.com/xTh3hln.png\",\"right-icon\":\"https://i.imgur.com/os7o9kz.png\",thumbnails:\"visible\",\"tb-border\":\"2px solid transparent\",\"tb-border-radius\":\"6px\",\"tb-hover-border-color\":\"#fead0d\",\"tb-selected-border-color\":\"#ccc\"}),t.exports=e.default},function(t,e,r){var n=r(49);t.exports=function(t,e,r){for(var i=-1,o=t.length;++i\\n \\n \\n \")}},{key:\"renderRadio\",value:function(){var t=this.props.index,e=this.getAttribute(\"carouselId\");return\"\\n \\n \")}},{key:\"render\",value:function(){var t=(o=this.attributes).src,e=o.alt,r=o.href,n=o.rel,i=o.title,o=this.props.index;return t=\"\\n \\n \"),e=this.getAttribute(\"css-class\")||\"\",\"\\n \\n \").concat(r?\"').concat(t,\"\"):t,\"\\n \\n \")}}]),e}(),e.default=r,(0,s.default)(r,\"componentName\",\"mj-carousel-image\"),(0,s.default)(r,\"endingTag\",!0),(0,s.default)(r,\"allowedAttributes\",{alt:\"string\",href:\"string\",rel:\"string\",title:\"string\",src:\"string\",\"thumbnails-src\":\"string\",\"border-radius\":\"unit(px,%){1,4}\",\"tb-border\":\"string\",\"tb-border-radius\":\"unit(px,%){1,4}\"}),(0,s.default)(r,\"defaultAttributes\",{target:\"_blank\"}),t.exports=e.default},function(t,e,r){\"use strict\";var n=r(0);Object.defineProperty(e,\"__esModule\",{value:!0}),Object.defineProperty(e,\"Accordion\",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,\"AccordionElement\",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,\"AccordionText\",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,\"AccordionTitle\",{enumerable:!0,get:function(){return s.default}});var i=n(r(841)),o=n(r(842)),a=n(r(367)),s=n(r(368))},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)),n}function o(t){for(var e=1;e\\n \\n \").concat(this.renderChildren(this.props.children,{attributes:e}),\"\\n \\n \\n \")}}]),e}(),e.default=r,(0,h.default)(r,\"componentName\",\"mj-accordion\"),(0,h.default)(r,\"allowedAttributes\",{\"container-background-color\":\"color\",border:\"string\",\"font-family\":\"string\",\"icon-align\":\"enum(top,middle,bottom)\",\"icon-width\":\"unit(px,%)\",\"icon-height\":\"unit(px,%)\",\"icon-wrapped-url\":\"string\",\"icon-wrapped-alt\":\"string\",\"icon-unwrapped-url\":\"string\",\"icon-unwrapped-alt\":\"string\",\"icon-position\":\"enum(left,right)\",\"padding-bottom\":\"unit(px,%)\",\"padding-left\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"padding-top\":\"unit(px,%)\",padding:\"unit(px,%){1,4}\"}),(0,h.default)(r,\"defaultAttributes\",{border:\"2px solid black\",\"font-family\":\"Ubuntu, Helvetica, Arial, sans-serif\",\"icon-align\":\"middle\",\"icon-wrapped-url\":\"https://i.imgur.com/bIXv1bk.png\",\"icon-wrapped-alt\":\"+\",\"icon-unwrapped-url\":\"https://i.imgur.com/w4uTygT.png\",\"icon-unwrapped-alt\":\"-\",\"icon-position\":\"right\",\"icon-height\":\"32px\",\"icon-width\":\"32px\",padding:\"10px 25px\"}),t.exports=e.default},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)),n}function o(t){for(var e=1;e\\n \\n \\n \").concat((0,d.default)(\"\\n \\n \"),!0),\"\\n
\\n \").concat(this.handleMissingChildren(),\"\\n
\\n \\n \\n \\n \")}}]),e}(),e.default=r,(0,f.default)(r,\"componentName\",\"mj-accordion-element\"),(0,f.default)(r,\"allowedAttributes\",{\"background-color\":\"color\",\"font-family\":\"string\",\"icon-align\":\"enum(top,middle,bottom)\",\"icon-width\":\"unit(px,%)\",\"icon-height\":\"unit(px,%)\",\"icon-wrapped-url\":\"string\",\"icon-wrapped-alt\":\"string\",\"icon-unwrapped-url\":\"string\",\"icon-unwrapped-alt\":\"string\",\"icon-position\":\"enum(left,right)\"}),(0,f.default)(r,\"defaultAttributes\",{title:{img:{width:\"32px\",height:\"32px\"}}}),t.exports=e.default},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)),n}function o(t){for(var e=1;e\\n \").concat(this.renderChildren(),\"\\n \\n \")}}]),e}(),e.default=r,(0,c.default)(r,\"componentName\",\"mj-body\"),(0,c.default)(r,\"allowedAttributes\",{width:\"unit(px)\",\"background-color\":\"color\"}),(0,c.default)(r,\"defaultAttributes\",{width:\"600px\"}),t.exports=e.default},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r\\n \\n \\n \\n \\n \\n \\n \\n \\n \").concat(this.renderChildren(e,{renderer:function(t){return t.constructor.isRawElement()?t.render():\"\\n \\n \\n \").concat(t.render(),\"\\n \\n \\n \")}}),\"\\n \\n \\n \\n \\n \\n \\x3c!--[if mso | IE]>\\n \\n \\n \\n \\n \\n \").concat(this.renderContent(),\"\\n \\n \\n \");case\"fixed-height\":default:return e=parseInt(this.getAttribute(\"height\"),10)-this.getShorthandAttrValue(\"padding\",\"top\")-this.getShorthandAttrValue(\"padding\",\"bottom\"),\"\\n \\n \").concat(this.renderContent(),\"\\n \\n \")}}},{key:\"render\",value:function(){var t=this.context.containerWidth;return\"\\n \\x3c!--[if mso | IE]>\\n \\n \\n \\n \\n \\n \\n \\n \").concat(this.renderMode(),\"\\n \\n \\n \\n \\x3c!--[if mso | IE]>\\n \\n \\n \\n \\n \\n \\n <\").concat(t,\"\\n \").concat(this.htmlAttributes({href:this.getAttribute(\"href\"),rel:this.getAttribute(\"rel\"),name:this.getAttribute(\"name\"),style:\"content\",target:\"a\"==t?this.getAttribute(\"target\"):void 0}),\"\\n >\\n \").concat(this.getContent(),\"\\n \\n \\n \\n \\n \")}}]),e}(),e.default=r,(0,u.default)(r,\"componentName\",\"mj-button\"),(0,u.default)(r,\"endingTag\",!0),(0,u.default)(r,\"allowedAttributes\",{align:\"enum(left,center,right)\",\"background-color\":\"color\",\"border-bottom\":\"string\",\"border-left\":\"string\",\"border-radius\":\"string\",\"border-right\":\"string\",\"border-top\":\"string\",border:\"string\",color:\"color\",\"container-background-color\":\"color\",\"font-family\":\"string\",\"font-size\":\"unit(px)\",\"font-style\":\"string\",\"font-weight\":\"string\",height:\"unit(px,%)\",href:\"string\",name:\"string\",\"inner-padding\":\"unit(px,%){1,4}\",\"letter-spacing\":\"unitWithNegative(px,em)\",\"line-height\":\"unit(px,%,)\",\"padding-bottom\":\"unit(px,%)\",\"padding-left\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"padding-top\":\"unit(px,%)\",padding:\"unit(px,%){1,4}\",rel:\"string\",target:\"string\",\"text-decoration\":\"string\",\"text-transform\":\"string\",\"vertical-align\":\"enum(top,bottom,middle)\",\"text-align\":\"enum(left,right,center)\",width:\"unit(px,%)\"}),(0,u.default)(r,\"defaultAttributes\",{align:\"center\",\"background-color\":\"#414141\",border:\"none\",\"border-radius\":\"3px\",color:\"#ffffff\",\"font-family\":\"Ubuntu, Helvetica, Arial, sans-serif\",\"font-size\":\"13px\",\"font-weight\":\"normal\",\"inner-padding\":\"10px 25px\",\"line-height\":\"120%\",padding:\"10px 25px\",target:\"_blank\",\"text-decoration\":\"none\",\"text-transform\":\"none\",\"vertical-align\":\"middle\"}),t.exports=e.default},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)),n}function o(t){for(var e=1;e\\n \\n \\n \\n \").concat(this.renderColumn(),\"\\n \\n \\n \\n \\n \")}},{key:\"renderColumn\",value:function(){var t=this.props.children;return\"\\n \\n \\n \").concat(this.renderChildren(t,{renderer:function(t){return t.constructor.isRawElement()?t.render():\"\\n \\n \\n \").concat(t.render(),\"\\n \\n \\n \")}}),\"\\n \\n \\n \")}},{key:\"render\",value:function(){var t=\"\".concat(this.getColumnClass(),\" mj-outlook-group-fix\");return this.getAttribute(\"css-class\")&&(t+=\" \".concat(this.getAttribute(\"css-class\"))),\"\\n \\n \").concat(this.hasGutter()?this.renderGutter():this.renderColumn(),\"\\n \\n \")}}]),e}(),e.default=r,(0,l.default)(r,\"componentName\",\"mj-column\"),(0,l.default)(r,\"allowedAttributes\",{\"background-color\":\"color\",border:\"string\",\"border-bottom\":\"string\",\"border-left\":\"string\",\"border-radius\":\"unit(px,%){1,4}\",\"border-right\":\"string\",\"border-top\":\"string\",direction:\"enum(ltr,rtl)\",\"inner-background-color\":\"color\",\"padding-bottom\":\"unit(px,%)\",\"padding-left\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"padding-top\":\"unit(px,%)\",\"inner-border\":\"string\",\"inner-border-bottom\":\"string\",\"inner-border-left\":\"string\",\"inner-border-radius\":\"unit(px,%){1,4}\",\"inner-border-right\":\"string\",\"inner-border-top\":\"string\",padding:\"unit(px,%){1,4}\",\"vertical-align\":\"enum(top,bottom,middle)\",width:\"unit(px,%)\"}),(0,l.default)(r,\"defaultAttributes\",{direction:\"ltr\",\"vertical-align\":\"top\"}),t.exports=e.default},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)),n}function o(t){for(var e=1;e\\n \\n \\n \\n  \\n \\n \\n \\n \\n

\\n \").concat(this.renderAfter(),\"\\n \")}}]),e}(),e.default=r,(0,l.default)(r,\"componentName\",\"mj-divider\"),(0,l.default)(r,\"tagOmission\",!0),(0,l.default)(r,\"allowedAttributes\",{\"border-color\":\"color\",\"border-style\":\"string\",\"border-width\":\"unit(px)\",\"container-background-color\":\"color\",padding:\"unit(px,%){1,4}\",\"padding-bottom\":\"unit(px,%)\",\"padding-left\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"padding-top\":\"unit(px,%)\",width:\"unit(px,%)\",align:\"enum(left,center,right)\"}),(0,l.default)(r,\"defaultAttributes\",{\"border-color\":\"#000000\",\"border-style\":\"solid\",\"border-width\":\"4px\",padding:\"10px 25px\",width:\"100%\",align:\"center\"}),t.exports=e.default},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)),n}function o(t){for(var e=1;e\\n \\x3c!--[if mso | IE]>\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \")}}]),e}(),e.default=r,(0,l.default)(r,\"componentName\",\"mj-group\"),(0,l.default)(r,\"allowedAttributes\",{\"background-color\":\"color\",direction:\"enum(ltr,rtl)\",\"vertical-align\":\"enum(top,bottom,middle)\",width:\"unit(px,%)\"}),(0,l.default)(r,\"defaultAttributes\",{direction:\"ltr\"}),t.exports=e.default},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){for(var r=0;r\\n \"),this.getAttribute(\"href\")?\"\\n \\n \").concat(t,\"\\n \\n \"):t}},{key:\"render\",value:function(){return\"\\n \\n \\n \\n \\n \").concat(this.renderImage(),\"\\n \\n \\n \\n \\n \")}}]),e}(),e.default=r,(0,c.default)(r,\"componentName\",\"mj-image\"),(0,c.default)(r,\"tagOmission\",!0),(0,c.default)(r,\"allowedAttributes\",{alt:\"string\",href:\"string\",name:\"string\",src:\"string\",srcset:\"string\",sizes:\"string\",title:\"string\",rel:\"string\",align:\"enum(left,center,right)\",border:\"string\",\"border-bottom\":\"string\",\"border-left\":\"string\",\"border-right\":\"string\",\"border-top\":\"string\",\"border-radius\":\"unit(px,%){1,4}\",\"container-background-color\":\"color\",\"fluid-on-mobile\":\"boolean\",padding:\"unit(px,%){1,4}\",\"padding-bottom\":\"unit(px,%)\",\"padding-left\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"padding-top\":\"unit(px,%)\",target:\"string\",width:\"unit(px)\",height:\"unit(px,auto)\",\"max-height\":\"unit(px,%)\",\"font-size\":\"unit(px)\",usemap:\"string\"}),(0,c.default)(r,\"defaultAttributes\",{align:\"center\",border:\"0\",height:\"auto\",padding:\"10px 25px\",target:\"_blank\",\"font-size\":\"13px\"}),t.exports=e.default},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){for(var r=0;r \\n \")}}]),e}(),e.default=r,(0,s.default)(r,\"componentName\",\"mj-spacer\"),(0,s.default)(r,\"allowedAttributes\",{border:\"string\",\"border-bottom\":\"string\",\"border-left\":\"string\",\"border-right\":\"string\",\"border-top\":\"string\",\"container-background-color\":\"color\",\"padding-bottom\":\"unit(px,%)\",\"padding-left\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"padding-top\":\"unit(px,%)\",padding:\"unit(px,%){1,4}\",height:\"unit(px,%)\"}),(0,s.default)(r,\"defaultAttributes\",{height:\"20px\"}),t.exports=e.default},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){for(var r=0;r\").concat(this.getContent(),\"\\n \")}},{key:\"render\",value:function(){var t=this.getAttribute(\"height\");return t?\"\\n \".concat((0,l.default)('\\n
\\n ')),\"\\n \").concat(this.renderContent(),\"\\n \").concat((0,l.default)(\"\\n
\\n \"),\"\\n \"):this.renderContent()}}]),e}(),e.default=r,(0,u.default)(r,\"componentName\",\"mj-text\"),(0,u.default)(r,\"endingTag\",!0),(0,u.default)(r,\"allowedAttributes\",{align:\"enum(left,right,center,justify)\",\"background-color\":\"color\",color:\"color\",\"container-background-color\":\"color\",\"font-family\":\"string\",\"font-size\":\"unit(px)\",\"font-style\":\"string\",\"font-weight\":\"string\",height:\"unit(px,%)\",\"letter-spacing\":\"unitWithNegative(px,em)\",\"line-height\":\"unit(px,%,)\",\"padding-bottom\":\"unit(px,%)\",\"padding-left\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"padding-top\":\"unit(px,%)\",padding:\"unit(px,%){1,4}\",\"text-decoration\":\"string\",\"text-transform\":\"string\",\"vertical-align\":\"enum(top,bottom,middle)\"}),(0,u.default)(r,\"defaultAttributes\",{align:\"left\",color:\"#000000\",\"font-family\":\"Ubuntu, Helvetica, Arial, sans-serif\",\"font-size\":\"13px\",\"line-height\":\"1\",padding:\"10px 25px\"}),t.exports=e.default},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)),n}function o(t){for(var e=1;e\\n \").concat(this.getContent(),\"\\n \\n \")}}]),e}(),e.default=r,(0,f.default)(r,\"componentName\",\"mj-table\"),(0,f.default)(r,\"endingTag\",!0),(0,f.default)(r,\"allowedAttributes\",{align:\"enum(left,right,center)\",border:\"string\",cellpadding:\"integer\",cellspacing:\"integer\",\"container-background-color\":\"color\",color:\"color\",\"font-family\":\"string\",\"font-size\":\"unit(px)\",\"font-weight\":\"string\",\"line-height\":\"unit(px,%,)\",\"padding-bottom\":\"unit(px,%)\",\"padding-left\":\"unit(px,%)\",\"padding-right\":\"unit(px,%)\",\"padding-top\":\"unit(px,%)\",padding:\"unit(px,%){1,4}\",\"table-layout\":\"enum(auto,fixed,initial,inherit)\",\"vertical-align\":\"enum(top,bottom,middle)\",width:\"unit(px,%)\"}),(0,f.default)(r,\"defaultAttributes\",{align:\"left\",border:\"none\",cellpadding:\"0\",cellspacing:\"0\",color:\"#000000\",\"font-family\":\"Ubuntu, Helvetica, Arial, sans-serif\",\"font-size\":\"13px\",\"line-height\":\"22px\",padding:\"10px 25px\",\"table-layout\":\"auto\",width:\"100%\"}),t.exports=e.default},function(t,e,r){\"use strict\";function n(t){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function i(t,e){for(var r=0;r\\n \\n \\n \\n \\n \\n 1&&void 0!==arguments[1]?arguments[1]:{},r=t.BlockManager,n={category:t.I18n.t(\"grapesjs-mjml.category\")};e.resetBlocks&&r.getAll().reset(),r.add(\"mj-1-column\",i({label:t.I18n.t(\"grapesjs-mjml.components.names.oneColumn\"),content:\"\\n Content 1\\n \",attributes:{class:\"gjs-fonts gjs-f-b1\"}},n)),r.add(\"mj-2-columns\",i({label:t.I18n.t(\"grapesjs-mjml.components.names.twoColumn\"),content:\"\\n Content 1\\n Content 2\\n \",attributes:{class:\"gjs-fonts gjs-f-b2\"}},n)),r.add(\"mj-3-columns\",i({label:t.I18n.t(\"grapesjs-mjml.components.names.threeColumn\"),content:\"\\n Content 1\\n Content 2\\n Content 3\\n \",attributes:{class:\"gjs-fonts gjs-f-b3\"}},n)),r.add(\"mj-text\",i({label:t.I18n.t(\"grapesjs-mjml.components.names.text\"),content:\"Insert text here\",attributes:{class:\"gjs-fonts gjs-f-text\"}},n)),r.add(\"mj-button\",i({label:t.I18n.t(\"grapesjs-mjml.components.names.button\"),content:\"Button\",attributes:{class:\"gjs-fonts gjs-f-button\"}},n)),r.add(\"mj-image\",i({label:t.I18n.t(\"grapesjs-mjml.components.names.image\"),content:'',attributes:{class:\"fa fa-image\"}},n)),r.add(\"mj-divider\",i({label:t.I18n.t(\"grapesjs-mjml.components.names.divider\"),content:\"\",attributes:{class:\"gjs-fonts gjs-f-divider\"}},n)),r.add(\"mj-social-group\",i({label:t.I18n.t(\"grapesjs-mjml.components.names.socialGroup\"),content:'\\n \\n \\n \\n ',attributes:{class:\"fa fa-share-alt\"}},n)),r.add(\"mj-social-element\",i({label:t.I18n.t(\"grapesjs-mjml.components.names.socialElement\"),content:'',attributes:{class:\"fa fa-share-alt\"}},n)),r.add(\"mj-spacer\",i({label:t.I18n.t(\"grapesjs-mjml.components.names.spacer\"),content:\"\",attributes:{class:\"fa fa-arrows-v\"}},n)),r.add(\"mj-navbar\",i({label:t.I18n.t(\"grapesjs-mjml.components.names.navBar\"),content:\"\\n Getting started\\n Try it live\\n Templates\\n Components\\n \",attributes:{class:\"fa fa-bars\"}},n)),r.add(\"mj-navbar-link\",i({label:t.I18n.t(\"grapesjs-mjml.components.names.navLink\"),content:\"Link 1\",attributes:{class:\"gjs-fonts gjs-f-button\"}},n)),r.add(\"mj-hero\",i({label:t.I18n.t(\"grapesjs-mjml.components.names.hero\"),content:'\\n \\n GO TO SPACE\\n \\n \\n ORDER YOUR TICKET NOW\\n \\n ',attributes:{class:\"fa fa-id-card\"}},n)),r.add(\"mj-wrapper\",i({label:t.I18n.t(\"grapesjs-mjml.components.names.wrapper\"),content:'\\n \\n \\n \\n \\n \\n \\n \\n First line of text \\n \\n Second line of text \\n \\n \\n ',attributes:{class:\"fa fa-window-maximize\"}},n)),r.add(\"mj-raw\",i({label:t.I18n.t(\"grapesjs-mjml.components.names.raw\"),content:'\\n
\\n \"Example\\n \"Example\\n \"Example\\n \"Example \\n \"Example\\n \"Example \\n
\\n
',attributes:{class:\"fa fa-html5\"}},n))},s=r(1),u=r.n(s),c=function(t){return function(e){return e.tagName===t.toUpperCase()}};function l(t,e){var r={useMjmlConfigOptions:!1,mjmlConfigPath:null,filePath:null};return e&&Object.keys(e).length>0&&e.constructor===Object&&(r.fonts=e),u()(t,r)}var f=function(t,e){e.dc.addType(\"mjml\",{isComponent:c(\"mjml\"),model:{defaults:{droppable:\"[data-gjs-type=mj-head], [data-gjs-type=mj-body]\",draggable:!1}}})},h=function(t,e){var r=e.dc,n=[\"mj-preview\",\"mj-attributes\",\"mj-style\",\"mj-font\",\"mj-title\",\"mj-raw\"].map((function(t){return\"[data-gjs-type=\".concat(t,\"]\")})).join(\", \");r.addType(\"mj-head\",{isComponent:c(\"mj-head\"),model:{defaults:{droppable:n,draggable:!1}}})};function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e\",end:\"\"}},getTemplateFromEl:function(t){return t.querySelector(\"style\").innerHTML},renderStyle:function(){},getTemplateFromMjml:function(){var t=this.getMjmlTemplate(),e=this.getInnerMjmlTemplate(),r=l(\"\".concat(t.start,\"\\n \").concat(e.start).concat(e.end).concat(t.end),n.fonts).html,i=r.indexOf(\"\")+6,o=r.indexOf(\"\");return r=r.substring(i,o).trim(),a.innerHTML=r,this.getTemplateFromEl(a)}})})};function b(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _(t){for(var e=1;e\",end:'')}},getTemplateFromEl:function(t){return t.querySelectorAll(\"style\")[1].innerHTML},renderStyle:function(){},renderContent:function(){},getTemplateFromMjml:function(){var t=this.getMjmlTemplate(),e=this.getInnerMjmlTemplate(),r=l(\"\".concat(t.start,\"\\n \").concat(e.start).concat(e.end).concat(t.end),n.fonts).html,i=r.indexOf(\"\")+6,o=r.indexOf(\"\");return r=r.substring(i,o).trim(),a.innerHTML=r,this.getTemplateFromEl(a)}})})};function w(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function E(t){for(var e=1;e\"),end:\"\".concat(t.end)}},renderStyle:function(){this.el.setAttribute(\"style\",\"\".concat(this.el.getAttribute(\"style\")+this.attributes.style))},renderContent:function(){this.getChildrenContainer().innerHTML=this.model.get(\"content\")},rerender:function(){i.rerender.call(this),this.model.components().models.forEach((function(t){\"mj-section\"!=t.attributes.type&&\"mj-raw\"!=t.attributes.type||t.view.rerender()}))}})})};function x(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function S(t){for(var e=1;e\",end:\"\"}},getChildrenSelector:function(){return\"table tr td\"},init:function(){i.init.call(this),this.listenTo(this.model.get(\"components\"),\"add remove\",(function(){this.getChildrenContainer().innerHTML=this.model.get(\"content\"),this.renderChildren()}))}})})};function M(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function C(t){for(var e=1;e\".concat(r.start),end:\"\".concat(r.end,\"\")}}return{start:\"\",end:\"\"}},getChildrenSelector:function(){return\"table > tbody > tr > td\"},init:function(){i.init.call(this),this.listenTo(this.model.get(\"components\"),\"add remove\",this.render)}})})};function N(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function L(t){for(var e=1;e\",end:\"\"}},getChildrenSelector:function(){return\"div\"}})})};function I(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function B(t){for(var e=1;e/,\"\"),s=o.indexOf(\"\")+6,u=o.indexOf(\"\");a.innerHTML=o.substring(s,u).trim();for(var c,f=this.getTemplateFromEl(a),h={},p=f.attributes,d=0,m=p.length;d\".concat(e.style,\"\")),this.getChildrenContainer().innerHTML=this.model.get(\"content\"),this.renderChildren(),this.renderStyle(),this},renderStyle:function(){this.el.setAttribute(\"style\",\"\".concat(this.el.getAttribute(\"style\")+this.attributes.style))},getMjmlTemplate:function(){var t=this.model.collection.length-1;t=t||0;var e=Array(t).fill(\"\").join(\"\");return{start:\"\",end:\"\".concat(e,\"\")}},getTemplateFromEl:function(t){return t.firstChild.querySelector(\"div > table > tbody > tr > td > div\")},getChildrenSelector:function(){return\"table\"}})})};function H(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function F(t){for(var e=1;e\",end:\"\"}},getTemplateFromEl:function(t){return t.querySelector(\"tr\").innerHTML},getChildrenSelector:function(){return\"td > div\"},renderChildren:function(){i.renderChildren.call(this)},onActive:function(){this.getChildrenContainer().style.pointerEvents=\"all\"}})})};function G(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function K(t){for(var e=1;e\",end:\"\"}},getTemplateFromEl:function(t){return t.querySelector(\"tr\").innerHTML},getChildrenSelector:function(){return\"a,p\"},renderChildren:function(){i.renderChildren.call(this)},onActive:function(){this.getChildrenContainer().style.pointerEvents=\"all\"},disableEditing:function(){this.getChildrenContainer().style.pointerEvents=\"none\"}})})};function X(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function $(t){for(var e=1;e',end:\"\"}},getTemplateFromEl:function(t){return t.querySelector(\"tr\").innerHTML},getChildrenSelector:function(){return\"img\"}})})};function J(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function tt(t){for(var e=1;e\",end:\"\"}},getTemplateFromEl:function(t){return t.querySelector(\"tr\").innerHTML},getChildrenSelector:function(){return\"td\"},rerender:function(){i.rerender.call(this),this.model.components().models.forEach((function(t){\"mj-social-element\"==t.attributes.type&&t.view.rerender()}))},init:function(){i.init.call(this),this.listenTo(this.model.get(\"components\"),\"add remove\",this.render)}})})};function nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function it(t){for(var e=1;e\".concat(e.start),end:\"\".concat(e.end,\"\")}}return{start:\"\",end:\"\"}},getTemplateFromEl:function(t){return t.querySelector(\"tr > td > table\").innerHTML},getChildrenSelector:function(){return\"img\"}})})};function st(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ut(t){for(var e=1;e\",end:\"\"}},getTemplateFromEl:function(t){return t.querySelector(\"tr\").innerHTML},getChildrenSelector:function(){return\"p\"}})})};function ft(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ht(t){for(var e=1;e\",end:\"\"}},getTemplateFromEl:function(t){return t.querySelector(\"tr\").innerHTML},getChildrenSelector:function(){return\"td\"},renderChildren:function(){i.renderChildren.call(this)}})})};function mt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function gt(t){for(var e=1;e/,\"\"),s=o.indexOf(\"\")+6,u=o.indexOf(\"\");a.innerHTML=o.substring(s,u).trim();for(var c,f=this.getTemplateFromEl(a),h={},p=f.attributes,d=0,m=p.length;d\".concat(e.style,\"\")),this.getChildrenContainer().innerHTML=this.model.get(\"content\"),this.renderChildren(),this.renderStyle(),this},getMjmlTemplate:function(){return{start:\"\",end:\"\"}},getTemplateFromEl:function(t){return t.firstChild.querySelector(\"tr\")},getChildrenSelector:function(){return\"div.mj-inline-links\"},rerender:function(){o.rerender.call(this),this.model.components().models.forEach((function(t){\"mj-navbar-link\"==t.attributes.type&&t.view.rerender()}))}})})};function yt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function vt(t){for(var e=1;e\".concat(e.start),end:\"\".concat(e.end,\"\")}}return{start:\"\",end:\"\"}},getTemplateFromEl:function(t){return t.querySelector(\"div\").innerHTML},getChildrenSelector:function(){return\"a,p\"},renderChildren:function(){i.renderChildren.call(this)},onActive:function(){this.getChildrenContainer().style.pointerEvents=\"all\"},disableEditing:function(){this.getChildrenContainer().style.pointerEvents=\"none\"}})})};function Tt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function At(t){for(var e=1;e\",end:\"\"}},getChildrenSelector:function(){return\"table tr td\"}})})};function Ot(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function kt(t){for(var e=1;e\".concat(r.start),end:\"\".concat(r.end,\"\")}}if(t.getInnerMjmlTemplate&&\"mj-head\"===e){var n=i.getInnerMjmlTemplate.call(t);return{start:\"\".concat(n.start),end:\"\".concat(n.end,\"\")}}return{start:\"\",end:\"\"}},getTemplateFromEl:function(t){return t.innerHTML},getChildrenSelector:function(){return\"*\"},init:function(){i.init.call(this),this.listenTo(this.model.get(\"components\"),\"add remove\",this.render)}})})};function Rt(t){return(Rt=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function jt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Nt(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},r=t.DomComponents,n=r.getType(\"default\"),i=r.getType(\"text\"),o=r.getType(\"image\"),a=r.getType(\"link\"),s=n.model,u=n.view,c=i.model,p=i.view,d=o.model,m=o.view,b=a.model,_=a.view,y=r,w=r.ComponentsView,E=document.createElement(\"div\"),T={init:function(){var t=Nt({},this.get(\"attributes\")),e=Nt(Nt({},this.get(\"style-default\")),this.get(\"style\"));for(var r in e)r in t||(t[r]=e[r]);this.set(\"attributes\",t),this.set(\"style\",t),this.listenTo(this,\"change:style\",this.handleStyleChange),this.listenTo(this,\"change:attributes\",this.handleAttributeChange)},handleAttributeChange:function(){this.set(\"style\",this.get(\"attributes\"))},handleStyleChange:function(){this.set(\"attributes\",this.get(\"style\"))},getMjmlAttributes:function(){var t=this.get(\"attributes\")||{};delete t.style;var e=this.get(\"src\");return e&&(t.src=e),t},getAttrToHTML:function(){var t=Nt({},this.get(\"attributes\")),e=Nt({},this.get(\"style-default\"));for(var r in delete t.style,t){var n=t[r];n&&n===e[r]&&delete t[r]}return t},toHTML:function(){var t=\"\",e=this.get(\"tagName\"),r=this.get(\"void\"),n=\"\",i=this.getAttrToHTML();for(var o in i){var a=i[o];n+=void 0!==Rt(a)&&\"\"!==a?\" \"+o+'=\"'+a+'\"':\"\"}return t+=\"<\".concat(e).concat(n).concat(r?\"/\":\"\",\">\")+this.get(\"content\"),this.get(\"components\").each((function(e){t+=e.toHTML()})),r||(t+=\"\")),t}},x={init:function(){this.stopListening(this.model,\"change:style\"),this.listenTo(this.model,\"change:attributes change:src\",this.rerender)},rerender:function(){this.render(null,null,{},1)},getMjmlTemplate:function(){return{start:\"\",end:\"\"}},getInnerMjmlTemplate:function(){var t=this.model,e=t.get(\"tagName\"),r=t.getMjmlAttributes(),n=\"\";for(var i in r){var o=r[i];n+=void 0!==Rt(o)&&\"\"!==o?\" \"+i+'=\"'+o+'\"':\"\"}return{start:\"<\".concat(e).concat(n,\">\"),end:\"\")}},getTemplateFromEl:function(t){return t.firstChild.innerHTML},getTemplateFromMjml:function(){var t=this.getMjmlTemplate(),r=this.getInnerMjmlTemplate(),n=l(\"\".concat(t.start,\"\\n \").concat(r.start).concat(r.end).concat(t.end),e.fonts).html,i=(n=n.replace(//,\"\")).indexOf(\"\")+6,o=n.indexOf(\"\");return n=n.substring(i,o).trim(),E.innerHTML=n,this.getTemplateFromEl(E)},renderChildren:function(t){var e=this.getChildrenContainer();t?this.componentsView.parentEl=e:(this.componentsView=new w({collection:this.model.get(\"components\"),config:this.config,defaultTypes:this.opts.defaultTypes,componentTypes:this.opts.componentTypes}),this.childNodes=this.componentsView.render(e).el.childNodes);for(var r=Array.prototype.slice.call(this.childNodes),n=0,i=r.length;n1&&void 0!==arguments[1]?arguments[1]:{},r=t.getConfig(),n=t.CodeManager.getViewer(\"CodeMirror\").clone(),i=document.createElement(\"button\"),o=document.createElement(\"div\"),a=r.stylePrefix||\"\";return i.innerHTML=t.I18n.t(\"grapesjs-mjml.panels.import.button\"),i.className=\"\".concat(a,\"btn-prim \").concat(a,\"btn-import\"),i.onclick=function(){var e=n.editor.getValue();t.DomComponents.getWrapper().set(\"content\",\"\"),t.setComponents(e.trim()),t.Modal.close(),t.runCommand(\"mjml-import:change\")},n.set({codeName:\"htmlmixed\",theme:e.codeViewerTheme,readOnly:0}),{run:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=t.Modal,u=n.editor;if(s.setTitle(t.I18n.t(\"grapesjs-mjml.panels.import.title\")),!u){var c=document.createElement(\"textarea\"),l=t.I18n.t(\"grapesjs-mjml.panels.import.label\");if(l){var f=document.createElement(\"div\");f.className=a+\"import-label\",f.innerHTML=l,o.appendChild(f)}o.appendChild(c),o.appendChild(i),n.init(c),u=n.editor}s.setContent(\"\"),s.setContent(o),n.setContent(e.importPlaceholder),s.open(),u.refresh(),r.set&&r.set(\"active\",0)}}},Bt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.getConfig(),n=t.CodeManager.getViewer(\"CodeMirror\").clone(),i=document.createElement(\"div\"),o=t.Commands;i.style.display=\"flex\",i.style.justifyContent=\"space-between\",n.set({codeName:\"htmlmixed\",theme:e.codeViewerTheme});var a,s,u=function(){return l(e.preMjml+t.getHtml()+e.postMjml,e.fonts)};return o.add(\"mjml-get-code\",{run:function(){return u()}}),{buildEditor:function(n){var i=t.CodeManager,o=i.getViewer(\"CodeMirror\").clone(),a=document.createElement(\"textarea\"),s=document.createElement(\"div\");s.style.flex=\"1 0 auto\",s.style.padding=\"5px\",s.style.maxWidth=\"50%\",s.style.boxSizing=\"border-box\";var u=o.set({label:n,codeName:\"htmlmixed\",theme:e.codeViewerTheme,input:a}),c=new i.EditorView({model:u,config:r}).render().el;return s.appendChild(c),u.init(a),{codeEditor:u,el:s}},run:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.Modal;if(n.setTitle(t.I18n.t(\"grapesjs-mjml.panels.export.title\")),n.setContent(\"\"),n.setContent(i),!a){var o=this.buildEditor(\"MJML\");a=o.codeEditor,i.appendChild(o.el)}if(!s){var c=this.buildEditor(\"HTML\");s=c.codeEditor,i.appendChild(c.el)}if(n.open(),a&&(a.setContent(e.preMjml+t.getHtml()+e.postMjml),a.editor.refresh()),s){var l=u();l.errors.length&&l.errors.forEach((function(t){console.warn(t.formattedMessage)})),s.setContent(l.html),s.editor.refresh()}r.set&&r.set(\"active\",0)}}},qt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.Commands,n=e.overwriteExport?\"export-template\":\"mjml-export\";r.add(\"mjml-import\",It(t,e)),r.add(\"mjml-import:change\",{run:function(){return t.getHtml().trim()}}),r.add(n,Bt(t,e)),r.add(e.cmdTglImages,Dt()),r.add(\"undo\",{run:function(t,e){e.set(\"active\",0),t.UndoManager.undo(1)}}),r.add(\"redo\",{run:function(t,e){e.set(\"active\",0),t.UndoManager.redo(1)}}),r.add(\"set-device-desktop\",{run:function(t){t.setDevice(\"Desktop\")}}),r.add(\"set-device-tablet\",{run:function(t){t.setDevice(\"Tablet\")}}),r.add(\"set-device-mobile\",{run:function(t){t.setDevice(\"Mobile portrait\")}})};function Ut(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ht=function(t){var e=t.Panels,r=e.getPanel(\"options\"),n=e.getPanel(\"options\"),i=function(t){t.each((function(t){var e=t.get(\"attributes\");e[\"data-tooltip-pos\"]=\"bottom\",t.set(\"attributes\",e)}))};if(e.addButton(\"options\",{id:\"mjml-import\",className:\"fa fa-download\",command:\"mjml-import\",attributes:Ut({},\"title\",t.I18n.t(\"grapesjs-mjml.panels.buttons.import\"))}),r){var o=r.get(\"buttons\");o.each((function(t){var e=t.get(\"attributes\");e[\"data-tooltip-pos\"]=\"bottom\",t.set(\"attributes\",e)}));var a=e.addButton(\"options\",\"preview\");a&&o.remove(a)}if(n){var s=n.get(\"buttons\");s.add([{id:\"undo\",className:\"fa fa-undo\",command:\"undo\",attributes:Ut({},\"title\",t.I18n.t(\"grapesjs-mjml.panels.buttons.undo\"))},{id:\"redo\",className:\"fa fa-repeat\",command:\"redo\",attributes:Ut({},\"title\",t.I18n.t(\"grapesjs-mjml.panels.buttons.redo\"))}]),i(s)}t.getConfig().showDevices=0;var u=e.addPanel({id:\"devices-c\"}),c=u.get(\"buttons\");u.get(\"buttons\").add([{id:\"deviceDesktop\",command:\"set-device-desktop\",className:\"fa fa-desktop\",attributes:Ut({},\"title\",t.I18n.t(\"grapesjs-mjml.panels.buttons.desktop\"))},{id:\"deviceTablet\",command:\"set-device-tablet\",className:\"fa fa-tablet\",attributes:Ut({},\"title\",t.I18n.t(\"grapesjs-mjml.panels.buttons.tablet\"))},{id:\"deviceMobile\",command:\"set-device-mobile\",className:\"fa fa-mobile\",attributes:Ut({},\"title\",t.I18n.t(\"grapesjs-mjml.panels.buttons.mobile\"))}]),i(c)},Ft=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.resetStyleManager){var r=t.StyleManager.getSectors();t.on(\"load\",(function(){r.reset(),r.add([{name:\"Dimension\",open:!1,buildProps:[\"width\",\"height\",\"max-width\",\"min-height\",\"margin\",\"padding\",\"vertical-align\"],properties:[{property:\"margin\",properties:[{name:\"Top\",property:\"margin-top\"},{name:\"Right\",property:\"margin-right\"},{name:\"Bottom\",property:\"margin-bottom\"},{name:\"Left\",property:\"margin-left\"}]},{property:\"padding\",detached:!0,properties:[{name:\"Top\",property:\"padding-top\"},{name:\"Right\",property:\"padding-right\"},{name:\"Bottom\",property:\"padding-bottom\"},{name:\"Left\",property:\"padding-left\"}]},{property:\"icon-size\",type:\"integer\",defaults:\"20px\",units:[\"px\",\"%\"]},{property:\"vertical-align\",type:\"select\",list:[{value:\"top\"},{value:\"middle\"},{value:\"bottom\"}]}]},{name:\"Typography\",open:!1,buildProps:[\"font-family\",\"font-size\",\"font-weight\",\"letter-spacing\",\"color\",\"line-height\",\"text-align\",\"align\",\"text-decoration\",\"font-style\"],properties:[{name:\"Font\",property:\"font-family\"},{name:\"Weight\",property:\"font-weight\"},{name:\"Font color\",property:\"color\"},{property:\"text-align\",type:\"radio\",defaults:\"left\",list:[{value:\"left\",name:\"Left\",className:\"fa fa-align-left\"},{value:\"center\",name:\"Center\",className:\"fa fa-align-center\"},{value:\"right\",name:\"Right\",className:\"fa fa-align-right\"},{value:\"justify\",name:\"Justify\",className:\"fa fa-align-justify\"}]},{property:\"align\",type:\"radio\",defaults:\"left\",list:[{value:\"left\",name:\"Left\",className:\"fa fa-align-left\"},{value:\"center\",name:\"Center\",className:\"fa fa-align-center\"},{value:\"right\",name:\"Right\",className:\"fa fa-align-right\"},{value:\"justify\",name:\"Justify\",className:\"fa fa-align-justify\"}]},{property:\"text-decoration\",type:\"radio\",defaults:\"none\",list:[{value:\"none\",name:\"None\",className:\"fa fa-times\"},{value:\"underline\",name:\"underline\",className:\"fa fa-underline\"},{value:\"line-through\",name:\"Line-through\",className:\"fa fa-strikethrough\"}]},{property:\"font-style\",type:\"radio\",defaults:\"normal\",list:[{value:\"normal\",name:\"Normal\",className:\"fa fa-font\"},{value:\"italic\",name:\"Italic\",className:\"fa fa-italic\"}]}]},{name:\"Decorations\",open:!1,buildProps:[\"background-color\",\"container-background-color\",\"background-url\",\"background-repeat\",\"background-size\",\"border-radius\",\"border\"],properties:[{name:\"Background color\",property:\"container-background-color\",type:\"color\"},{property:\"background-url\",type:\"file\"},{property:\"border-radius\",properties:[{name:\"Top\",property:\"border-top-left-radius\"},{name:\"Right\",property:\"border-top-right-radius\"},{name:\"Bottom\",property:\"border-bottom-left-radius\"},{name:\"Left\",property:\"border-bottom-right-radius\"}]},{property:\"border-detached\",name:\"Border detached\",type:\"composite\",detached:!0,properties:[{name:\"Width\",property:\"border-width\",type:\"integer\",units:[\"px\",\"%\"]},{name:\"Style\",property:\"border-style\",type:\"select\",list:[{value:\"none\"},{value:\"solid\"},{value:\"dotted\"},{value:\"dashed\"},{value:\"double\"},{value:\"groove\"},{value:\"ridge\"},{value:\"inset\"},{value:\"outset\"}]},{name:\"Color\",property:\"border-color\",type:\"color\"}]}]}])}))}},zt=r(0);function Vt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Gt(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},r=t.getConfig(),n=Gt({editor:t,defaultTemplate:\"\",codeViewerTheme:\"hopscotch\",importPlaceholder:\"\",overwriteExport:1,preMjml:\"\",postMjml:\"\",exportOnly:\"\",resetBlocks:1,resetStyleManager:1,columnsPadding:\"10px 0\",i18n:{},fonts:{}},e);if(r.forceClass=0,r.devicePreviewMode=1,r.avoidInlineStyle=0,t.I18n.addMessages(Gt({en:zt.default},n.i18n)),[a,Pt,qt,Ht,Ft].forEach((function(e){return e(t,n)})),n.resetDevices){var i=t.DeviceManager;i.getAll().reset(),i.add(\"Desktop\",\"\"),i.add(\"Mobile\",\"320px\"),i.add(\"Tablet\",\"820px\")}},Yt=(e.default=Wt,Wt.blocksPlugin=a),Xt=Wt.componentsPlugin=Pt,$t=Wt.commandsPlugin=qt,Qt=Wt.buttonsPlugin=Ht,Zt=Wt.stylePlugin=Ft}]).default}));","/*! grapesjs-preset-newsletter - 0.2.20 */\n!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e(require(\"grapesjs\")):\"function\"==typeof define&&define.amd?define([\"grapesjs\"],e):\"object\"==typeof exports?exports[\"grapesjs-preset-newsletter\"]=e(require(\"grapesjs\")):t[\"grapesjs-preset-newsletter\"]=e(t.grapesjs)}(\"undefined\"!=typeof self?self:this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,\"a\",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p=\"\",e(e.s=46)}([function(t,e){var r;r=function(){return this}();try{r=r||Function(\"return this\")()||(0,eval)(\"this\")}catch(t){\"object\"==typeof window&&(r=window)}t.exports=r},function(t,e){\"function\"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){\"use strict\";function n(t){if(!(this instanceof n))return new n(t);c.call(this,t),l.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once(\"end\",i)}function i(){this.allowHalfOpen||this._writableState.ended||a.nextTick(o,this)}function o(t){t.end()}var a=r(14),s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=n;var u=r(8);u.inherits=r(1);var c=r(36),l=r(21);u.inherits(n,c);for(var f=s(l.prototype),h=0;h1)for(var r=1;r)[^>]*$|#([\\w\\-]*)$)/;e.isHtml=function(t){if(\"<\"===t.charAt(0)&&\">\"===t.charAt(t.length-1)&&t.length>=3)return!0;var e=a.exec(t);return!(!e||!e[1])}},function(t,e){t.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},function(t,e,r){(function(n){var i=r(3);e=t.exports=function(t,r){var n=e.evaluate(t,r),i=e.evaluate(\"\",r)[0];return i.type=\"root\",e.update(n,i),i},e.evaluate=function(t,e){return\"string\"==typeof t||n.isBuffer(t)?i.parseDOM(t,e):t},e.update=function(t,e){Array.isArray(t)||(t=[t]),e?e.children=t:e=null;for(var r=0;r=n())throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+n().toString(16)+\" bytes\");return 0|t}function g(t){return+t!=t&&(t=0),o.alloc(+t)}function v(t,e){if(o.isBuffer(t))return t.length;if(\"undefined\"!=typeof ArrayBuffer&&\"function\"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;\"string\"!=typeof t&&(t=\"\"+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":case void 0:return $(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return G(t).length;default:if(n)return $(t).length;e=(\"\"+e).toLowerCase(),n=!0}}function b(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\"\";if(r>>>=0,e>>>=0,r<=e)return\"\";for(t||(t=\"utf8\");;)switch(t){case\"hex\":return B(this,e,r);case\"utf8\":case\"utf-8\":return T(this,e,r);case\"ascii\":return L(this,e,r);case\"latin1\":case\"binary\":return C(this,e,r);case\"base64\":return A(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return D(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if(\"string\"==typeof e&&(e=o.from(e,n)),o.isBuffer(e))return 0===e.length?-1:_(t,e,r,n,i);if(\"number\"==typeof e)return e&=255,o.TYPED_ARRAY_SUPPORT&&\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):_(t,[e],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function _(t,e,r,n,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,u=e.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}var c;if(i){var l=-1;for(c=r;cs&&(r=s-u),c=r;c>=0;c--){for(var f=!0,h=0;hi&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError(\"Invalid hex string\");n>o/2&&(n=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=r){var u,c,l,f;switch(s){case 1:o<128&&(a=o);break;case 2:u=t[i+1],128==(192&u)&&(f=(31&o)<<6|63&u)>127&&(a=f);break;case 3:u=t[i+1],c=t[i+2],128==(192&u)&&128==(192&c)&&(f=(15&o)<<12|(63&u)<<6|63&c)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=t[i+1],c=t[i+2],l=t[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return O(n)}function O(t){var e=t.length;if(e<=K)return String.fromCharCode.apply(String,t);for(var r=\"\",n=0;nn)&&(r=n);for(var i=\"\",o=e;or)throw new RangeError(\"Trying to access beyond buffer length\")}function P(t,e,r,n,i,a){if(!o.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError(\"Index out of range\")}function M(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function R(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function I(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function N(t,e,r,n,i){return i||I(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,i){return i||I(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,r,n,52,8),r+8}function F(t){if(t=z(t).replace(tt,\"\"),t.length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}function z(t){return t.trim?t.trim():t.replace(/^\\s+|\\s+$/g,\"\")}function V(t){return t<16?\"0\"+t.toString(16):t.toString(16)}function $(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error(\"Invalid code point\");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function H(t){for(var e=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function G(t){return Q.toByteArray(F(t))}function Y(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t){return t!==t}/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\nvar Q=r(55),X=r(56),Z=r(29);e.Buffer=o,e.SlowBuffer=g,e.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&\"function\"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=n(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,e,r){return a(null,t,e,r)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,\"undefined\"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,e,r){return u(null,t,e,r)},o.allocUnsafe=function(t){return c(null,t)},o.allocUnsafeSlow=function(t){return c(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError(\"Arguments must be Buffers\");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i0&&(t=this.toString(\"hex\",0,r).match(/.{2}/g).join(\" \"),this.length>r&&(t+=\" ... \")),\"\"},o.prototype.compare=function(t,e,r,n,i){if(!o.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError(\"out of range index\");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var a=i-n,s=r-e,u=Math.min(a,s),c=this.slice(n,i),l=t.slice(e,r),f=0;fi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");for(var o=!1;;)switch(n){case\"hex\":return w(this,t,e,r);case\"utf8\":case\"utf-8\":return x(this,t,e,r);case\"ascii\":return S(this,t,e,r);case\"latin1\":case\"binary\":return j(this,t,e,r);case\"base64\":return k(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return E(this,t,e,r);default:if(o)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};var K=4096;o.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)n+=this[t+--e]*i;return n},o.prototype.readUInt8=function(t,e){return e||q(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||q(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||q(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||q(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||q(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||q(t,e,this.length);for(var n=this[t],i=1,o=0;++o=i&&(n-=Math.pow(2,8*e)),n},o.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||q(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return e||q(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||q(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(t,e){e||q(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(t,e){return e||q(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||q(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||q(t,4,this.length),X.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||q(t,4,this.length),X.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||q(t,8,this.length),X.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||q(t,8,this.length),X.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){P(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},o.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+r},o.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},o.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},o.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},o.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},o.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},o.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError(\"sourceStart out of bounds\");if(n<0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var a;if(\"number\"==typeof t)for(a=e;a0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error(\"(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.\",this._events[t].length),\"function\"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError(\"listener must be a function\");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,a,s;if(!n(e))throw TypeError(\"listener must be a function\");if(!this._events||!this._events[t])return this;if(r=this._events[t],a=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit(\"removeListener\",t,e);else if(o(r)){for(s=a;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){i=s;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit(\"removeListener\",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)\"removeListener\"!==e&&this.removeAllListeners(e);return this.removeAllListeners(\"removeListener\"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){\"use strict\";(function(e){function r(t,r,n,i){if(\"function\"!=typeof t)throw new TypeError('\"callback\" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(o=new Array(s-1),a=0;a-1&&t%1==0&&t-1&&t%1==0&&t<=m}function g(t){var e=typeof t;return!!t&&(\"object\"==e||\"function\"==e)}function v(t){return!!t&&\"object\"==typeof t}function b(t){return f(t)?i(t):a(t)}function y(t){return t}var m=9007199254740991,_=\"[object Arguments]\",w=\"[object Function]\",x=\"[object GeneratorFunction]\",S=/^(?:0|[1-9]\\d*)$/,j=Object.prototype,k=j.hasOwnProperty,E=j.toString,A=j.propertyIsEnumerable,T=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),O=function(t,e){return function(r,n){if(null==r)return r;if(!f(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=Object(r);(e?o--:++o\",GT:\">\",Gt:\"≫\",gtdot:\"⋗\",gtlPar:\"⦕\",gtquest:\"⩼\",gtrapprox:\"⪆\",gtrarr:\"⥸\",gtrdot:\"⋗\",gtreqless:\"⋛\",gtreqqless:\"⪌\",gtrless:\"≷\",gtrsim:\"≳\",gvertneqq:\"≩︀\",gvnE:\"≩︀\",Hacek:\"ˇ\",hairsp:\" \",half:\"½\",hamilt:\"ℋ\",HARDcy:\"Ъ\",hardcy:\"ъ\",harrcir:\"⥈\",harr:\"↔\",hArr:\"⇔\",harrw:\"↭\",Hat:\"^\",hbar:\"ℏ\",Hcirc:\"Ĥ\",hcirc:\"ĥ\",hearts:\"♥\",heartsuit:\"♥\",hellip:\"…\",hercon:\"⊹\",hfr:\"𝔥\",Hfr:\"ℌ\",HilbertSpace:\"ℋ\",hksearow:\"⤥\",hkswarow:\"⤦\",hoarr:\"⇿\",homtht:\"∻\",hookleftarrow:\"↩\",hookrightarrow:\"↪\",hopf:\"𝕙\",Hopf:\"ℍ\",horbar:\"―\",HorizontalLine:\"─\",hscr:\"𝒽\",Hscr:\"ℋ\",hslash:\"ℏ\",Hstrok:\"Ħ\",hstrok:\"ħ\",HumpDownHump:\"≎\",HumpEqual:\"≏\",hybull:\"⁃\",hyphen:\"‐\",Iacute:\"Í\",iacute:\"í\",ic:\"⁣\",Icirc:\"Î\",icirc:\"î\",Icy:\"И\",icy:\"и\",Idot:\"İ\",IEcy:\"Е\",iecy:\"е\",iexcl:\"¡\",iff:\"⇔\",ifr:\"𝔦\",Ifr:\"ℑ\",Igrave:\"Ì\",igrave:\"ì\",ii:\"ⅈ\",iiiint:\"⨌\",iiint:\"∭\",iinfin:\"⧜\",iiota:\"℩\",IJlig:\"IJ\",ijlig:\"ij\",Imacr:\"Ī\",imacr:\"ī\",image:\"ℑ\",ImaginaryI:\"ⅈ\",imagline:\"ℐ\",imagpart:\"ℑ\",imath:\"ı\",Im:\"ℑ\",imof:\"⊷\",imped:\"Ƶ\",Implies:\"⇒\",incare:\"℅\",in:\"∈\",infin:\"∞\",infintie:\"⧝\",inodot:\"ı\",intcal:\"⊺\",int:\"∫\",Int:\"∬\",integers:\"ℤ\",Integral:\"∫\",intercal:\"⊺\",Intersection:\"⋂\",intlarhk:\"⨗\",intprod:\"⨼\",InvisibleComma:\"⁣\",InvisibleTimes:\"⁢\",IOcy:\"Ё\",iocy:\"ё\",Iogon:\"Į\",iogon:\"į\",Iopf:\"𝕀\",iopf:\"𝕚\",Iota:\"Ι\",iota:\"ι\",iprod:\"⨼\",iquest:\"¿\",iscr:\"𝒾\",Iscr:\"ℐ\",isin:\"∈\",isindot:\"⋵\",isinE:\"⋹\",isins:\"⋴\",isinsv:\"⋳\",isinv:\"∈\",it:\"⁢\",Itilde:\"Ĩ\",itilde:\"ĩ\",Iukcy:\"І\",iukcy:\"і\",Iuml:\"Ï\",iuml:\"ï\",Jcirc:\"Ĵ\",jcirc:\"ĵ\",Jcy:\"Й\",jcy:\"й\",Jfr:\"𝔍\",jfr:\"𝔧\",jmath:\"ȷ\",Jopf:\"𝕁\",jopf:\"𝕛\",Jscr:\"𝒥\",jscr:\"𝒿\",Jsercy:\"Ј\",jsercy:\"ј\",Jukcy:\"Є\",jukcy:\"є\",Kappa:\"Κ\",kappa:\"κ\",kappav:\"ϰ\",Kcedil:\"Ķ\",kcedil:\"ķ\",Kcy:\"К\",kcy:\"к\",Kfr:\"𝔎\",kfr:\"𝔨\",kgreen:\"ĸ\",KHcy:\"Х\",khcy:\"х\",KJcy:\"Ќ\",kjcy:\"ќ\",Kopf:\"𝕂\",kopf:\"𝕜\",Kscr:\"𝒦\",kscr:\"𝓀\",lAarr:\"⇚\",Lacute:\"Ĺ\",lacute:\"ĺ\",laemptyv:\"⦴\",lagran:\"ℒ\",Lambda:\"Λ\",lambda:\"λ\",lang:\"⟨\",Lang:\"⟪\",langd:\"⦑\",langle:\"⟨\",lap:\"⪅\",Laplacetrf:\"ℒ\",laquo:\"«\",larrb:\"⇤\",larrbfs:\"⤟\",larr:\"←\",Larr:\"↞\",lArr:\"⇐\",larrfs:\"⤝\",larrhk:\"↩\",larrlp:\"↫\",larrpl:\"⤹\",larrsim:\"⥳\",larrtl:\"↢\",latail:\"⤙\",lAtail:\"⤛\",lat:\"⪫\",late:\"⪭\",lates:\"⪭︀\",lbarr:\"⤌\",lBarr:\"⤎\",lbbrk:\"❲\",lbrace:\"{\",lbrack:\"[\",lbrke:\"⦋\",lbrksld:\"⦏\",lbrkslu:\"⦍\",Lcaron:\"Ľ\",lcaron:\"ľ\",Lcedil:\"Ļ\",lcedil:\"ļ\",lceil:\"⌈\",lcub:\"{\",Lcy:\"Л\",lcy:\"л\",ldca:\"⤶\",ldquo:\"“\",ldquor:\"„\",ldrdhar:\"⥧\",ldrushar:\"⥋\",ldsh:\"↲\",le:\"≤\",lE:\"≦\",LeftAngleBracket:\"⟨\",LeftArrowBar:\"⇤\",leftarrow:\"←\",LeftArrow:\"←\",Leftarrow:\"⇐\",LeftArrowRightArrow:\"⇆\",leftarrowtail:\"↢\",LeftCeiling:\"⌈\",LeftDoubleBracket:\"⟦\",LeftDownTeeVector:\"⥡\",LeftDownVectorBar:\"⥙\",LeftDownVector:\"⇃\",LeftFloor:\"⌊\",leftharpoondown:\"↽\",leftharpoonup:\"↼\",leftleftarrows:\"⇇\",leftrightarrow:\"↔\",LeftRightArrow:\"↔\",Leftrightarrow:\"⇔\",leftrightarrows:\"⇆\",leftrightharpoons:\"⇋\",leftrightsquigarrow:\"↭\",LeftRightVector:\"⥎\",LeftTeeArrow:\"↤\",LeftTee:\"⊣\",LeftTeeVector:\"⥚\",leftthreetimes:\"⋋\",LeftTriangleBar:\"⧏\",LeftTriangle:\"⊲\",LeftTriangleEqual:\"⊴\",LeftUpDownVector:\"⥑\",LeftUpTeeVector:\"⥠\",LeftUpVectorBar:\"⥘\",LeftUpVector:\"↿\",LeftVectorBar:\"⥒\",LeftVector:\"↼\",lEg:\"⪋\",leg:\"⋚\",leq:\"≤\",leqq:\"≦\",leqslant:\"⩽\",lescc:\"⪨\",les:\"⩽\",lesdot:\"⩿\",lesdoto:\"⪁\",lesdotor:\"⪃\",lesg:\"⋚︀\",lesges:\"⪓\",lessapprox:\"⪅\",lessdot:\"⋖\",lesseqgtr:\"⋚\",lesseqqgtr:\"⪋\",LessEqualGreater:\"⋚\",LessFullEqual:\"≦\",LessGreater:\"≶\",lessgtr:\"≶\",LessLess:\"⪡\",lesssim:\"≲\",LessSlantEqual:\"⩽\",LessTilde:\"≲\",lfisht:\"⥼\",lfloor:\"⌊\",Lfr:\"𝔏\",lfr:\"𝔩\",lg:\"≶\",lgE:\"⪑\",lHar:\"⥢\",lhard:\"↽\",lharu:\"↼\",lharul:\"⥪\",lhblk:\"▄\",LJcy:\"Љ\",ljcy:\"љ\",llarr:\"⇇\",ll:\"≪\",Ll:\"⋘\",llcorner:\"⌞\",Lleftarrow:\"⇚\",llhard:\"⥫\",lltri:\"◺\",Lmidot:\"Ŀ\",lmidot:\"ŀ\",lmoustache:\"⎰\",lmoust:\"⎰\",lnap:\"⪉\",lnapprox:\"⪉\",lne:\"⪇\",lnE:\"≨\",lneq:\"⪇\",lneqq:\"≨\",lnsim:\"⋦\",loang:\"⟬\",loarr:\"⇽\",lobrk:\"⟦\",longleftarrow:\"⟵\",LongLeftArrow:\"⟵\",Longleftarrow:\"⟸\",longleftrightarrow:\"⟷\",LongLeftRightArrow:\"⟷\",Longleftrightarrow:\"⟺\",longmapsto:\"⟼\",longrightarrow:\"⟶\",LongRightArrow:\"⟶\",Longrightarrow:\"⟹\",looparrowleft:\"↫\",looparrowright:\"↬\",lopar:\"⦅\",Lopf:\"𝕃\",lopf:\"𝕝\",loplus:\"⨭\",lotimes:\"⨴\",lowast:\"∗\",lowbar:\"_\",LowerLeftArrow:\"↙\",LowerRightArrow:\"↘\",loz:\"◊\",lozenge:\"◊\",lozf:\"⧫\",lpar:\"(\",lparlt:\"⦓\",lrarr:\"⇆\",lrcorner:\"⌟\",lrhar:\"⇋\",lrhard:\"⥭\",lrm:\"‎\",lrtri:\"⊿\",lsaquo:\"‹\",lscr:\"𝓁\",Lscr:\"ℒ\",lsh:\"↰\",Lsh:\"↰\",lsim:\"≲\",lsime:\"⪍\",lsimg:\"⪏\",lsqb:\"[\",lsquo:\"‘\",lsquor:\"‚\",Lstrok:\"Ł\",lstrok:\"ł\",ltcc:\"⪦\",ltcir:\"⩹\",lt:\"<\",LT:\"<\",Lt:\"≪\",ltdot:\"⋖\",lthree:\"⋋\",ltimes:\"⋉\",ltlarr:\"⥶\",ltquest:\"⩻\",ltri:\"◃\",ltrie:\"⊴\",ltrif:\"◂\",ltrPar:\"⦖\",lurdshar:\"⥊\",luruhar:\"⥦\",lvertneqq:\"≨︀\",lvnE:\"≨︀\",macr:\"¯\",male:\"♂\",malt:\"✠\",maltese:\"✠\",Map:\"⤅\",map:\"↦\",mapsto:\"↦\",mapstodown:\"↧\",mapstoleft:\"↤\",mapstoup:\"↥\",marker:\"▮\",mcomma:\"⨩\",Mcy:\"М\",mcy:\"м\",mdash:\"—\",mDDot:\"∺\",measuredangle:\"∡\",MediumSpace:\" \",Mellintrf:\"ℳ\",Mfr:\"𝔐\",mfr:\"𝔪\",mho:\"℧\",micro:\"µ\",midast:\"*\",midcir:\"⫰\",mid:\"∣\",middot:\"·\",minusb:\"⊟\",minus:\"−\",minusd:\"∸\",minusdu:\"⨪\",MinusPlus:\"∓\",mlcp:\"⫛\",mldr:\"…\",mnplus:\"∓\",models:\"⊧\",Mopf:\"𝕄\",mopf:\"𝕞\",mp:\"∓\",mscr:\"𝓂\",Mscr:\"ℳ\",mstpos:\"∾\",Mu:\"Μ\",mu:\"μ\",multimap:\"⊸\",mumap:\"⊸\",nabla:\"∇\",Nacute:\"Ń\",nacute:\"ń\",nang:\"∠⃒\",nap:\"≉\",napE:\"⩰̸\",napid:\"≋̸\",napos:\"ʼn\",napprox:\"≉\",natural:\"♮\",naturals:\"ℕ\",natur:\"♮\",nbsp:\" \",nbump:\"≎̸\",nbumpe:\"≏̸\",ncap:\"⩃\",Ncaron:\"Ň\",ncaron:\"ň\",Ncedil:\"Ņ\",ncedil:\"ņ\",ncong:\"≇\",ncongdot:\"⩭̸\",ncup:\"⩂\",Ncy:\"Н\",ncy:\"н\",ndash:\"–\",nearhk:\"⤤\",nearr:\"↗\",neArr:\"⇗\",nearrow:\"↗\",ne:\"≠\",nedot:\"≐̸\",NegativeMediumSpace:\"​\",NegativeThickSpace:\"​\",NegativeThinSpace:\"​\",NegativeVeryThinSpace:\"​\",nequiv:\"≢\",nesear:\"⤨\",nesim:\"≂̸\",NestedGreaterGreater:\"≫\",NestedLessLess:\"≪\",NewLine:\"\\n\",nexist:\"∄\",nexists:\"∄\",Nfr:\"𝔑\",nfr:\"𝔫\",ngE:\"≧̸\",nge:\"≱\",ngeq:\"≱\",ngeqq:\"≧̸\",ngeqslant:\"⩾̸\",nges:\"⩾̸\",nGg:\"⋙̸\",ngsim:\"≵\",nGt:\"≫⃒\",ngt:\"≯\",ngtr:\"≯\",nGtv:\"≫̸\",nharr:\"↮\",nhArr:\"⇎\",nhpar:\"⫲\",ni:\"∋\",nis:\"⋼\",nisd:\"⋺\",niv:\"∋\",NJcy:\"Њ\",njcy:\"њ\",nlarr:\"↚\",nlArr:\"⇍\",nldr:\"‥\",nlE:\"≦̸\",nle:\"≰\",nleftarrow:\"↚\",nLeftarrow:\"⇍\",nleftrightarrow:\"↮\",nLeftrightarrow:\"⇎\",nleq:\"≰\",nleqq:\"≦̸\",nleqslant:\"⩽̸\",nles:\"⩽̸\",nless:\"≮\",nLl:\"⋘̸\",nlsim:\"≴\",nLt:\"≪⃒\",nlt:\"≮\",nltri:\"⋪\",nltrie:\"⋬\",nLtv:\"≪̸\",nmid:\"∤\",NoBreak:\"⁠\",NonBreakingSpace:\" \",nopf:\"𝕟\",Nopf:\"ℕ\",Not:\"⫬\",not:\"¬\",NotCongruent:\"≢\",NotCupCap:\"≭\",NotDoubleVerticalBar:\"∦\",NotElement:\"∉\",NotEqual:\"≠\",NotEqualTilde:\"≂̸\",NotExists:\"∄\",NotGreater:\"≯\",NotGreaterEqual:\"≱\",NotGreaterFullEqual:\"≧̸\",NotGreaterGreater:\"≫̸\",NotGreaterLess:\"≹\",NotGreaterSlantEqual:\"⩾̸\",NotGreaterTilde:\"≵\",NotHumpDownHump:\"≎̸\",NotHumpEqual:\"≏̸\",notin:\"∉\",notindot:\"⋵̸\",notinE:\"⋹̸\",notinva:\"∉\",notinvb:\"⋷\",notinvc:\"⋶\",NotLeftTriangleBar:\"⧏̸\",NotLeftTriangle:\"⋪\",NotLeftTriangleEqual:\"⋬\",NotLess:\"≮\",NotLessEqual:\"≰\",NotLessGreater:\"≸\",NotLessLess:\"≪̸\",NotLessSlantEqual:\"⩽̸\",NotLessTilde:\"≴\",NotNestedGreaterGreater:\"⪢̸\",NotNestedLessLess:\"⪡̸\",notni:\"∌\",notniva:\"∌\",notnivb:\"⋾\",notnivc:\"⋽\",NotPrecedes:\"⊀\",NotPrecedesEqual:\"⪯̸\",NotPrecedesSlantEqual:\"⋠\",NotReverseElement:\"∌\",NotRightTriangleBar:\"⧐̸\",NotRightTriangle:\"⋫\",NotRightTriangleEqual:\"⋭\",NotSquareSubset:\"⊏̸\",NotSquareSubsetEqual:\"⋢\",NotSquareSuperset:\"⊐̸\",NotSquareSupersetEqual:\"⋣\",NotSubset:\"⊂⃒\",NotSubsetEqual:\"⊈\",NotSucceeds:\"⊁\",NotSucceedsEqual:\"⪰̸\",NotSucceedsSlantEqual:\"⋡\",NotSucceedsTilde:\"≿̸\",NotSuperset:\"⊃⃒\",NotSupersetEqual:\"⊉\",NotTilde:\"≁\",NotTildeEqual:\"≄\",NotTildeFullEqual:\"≇\",NotTildeTilde:\"≉\",NotVerticalBar:\"∤\",nparallel:\"∦\",npar:\"∦\",nparsl:\"⫽⃥\",npart:\"∂̸\",npolint:\"⨔\",npr:\"⊀\",nprcue:\"⋠\",nprec:\"⊀\",npreceq:\"⪯̸\",npre:\"⪯̸\",nrarrc:\"⤳̸\",nrarr:\"↛\",nrArr:\"⇏\",nrarrw:\"↝̸\",nrightarrow:\"↛\",nRightarrow:\"⇏\",nrtri:\"⋫\",nrtrie:\"⋭\",nsc:\"⊁\",nsccue:\"⋡\",nsce:\"⪰̸\",Nscr:\"𝒩\",nscr:\"𝓃\",nshortmid:\"∤\",nshortparallel:\"∦\",nsim:\"≁\",nsime:\"≄\",nsimeq:\"≄\",nsmid:\"∤\",nspar:\"∦\",nsqsube:\"⋢\",nsqsupe:\"⋣\",nsub:\"⊄\",nsubE:\"⫅̸\",nsube:\"⊈\",nsubset:\"⊂⃒\",nsubseteq:\"⊈\",nsubseteqq:\"⫅̸\",nsucc:\"⊁\",nsucceq:\"⪰̸\",nsup:\"⊅\",nsupE:\"⫆̸\",nsupe:\"⊉\",nsupset:\"⊃⃒\",nsupseteq:\"⊉\",nsupseteqq:\"⫆̸\",ntgl:\"≹\",Ntilde:\"Ñ\",ntilde:\"ñ\",ntlg:\"≸\",ntriangleleft:\"⋪\",ntrianglelefteq:\"⋬\",ntriangleright:\"⋫\",ntrianglerighteq:\"⋭\",Nu:\"Ν\",nu:\"ν\",num:\"#\",numero:\"№\",numsp:\" \",nvap:\"≍⃒\",nvdash:\"⊬\",nvDash:\"⊭\",nVdash:\"⊮\",nVDash:\"⊯\",nvge:\"≥⃒\",nvgt:\">⃒\",nvHarr:\"⤄\",nvinfin:\"⧞\",nvlArr:\"⤂\",nvle:\"≤⃒\",nvlt:\"<⃒\",nvltrie:\"⊴⃒\",nvrArr:\"⤃\",nvrtrie:\"⊵⃒\",nvsim:\"∼⃒\",nwarhk:\"⤣\",nwarr:\"↖\",nwArr:\"⇖\",nwarrow:\"↖\",nwnear:\"⤧\",Oacute:\"Ó\",oacute:\"ó\",oast:\"⊛\",Ocirc:\"Ô\",ocirc:\"ô\",ocir:\"⊚\",Ocy:\"О\",ocy:\"о\",odash:\"⊝\",Odblac:\"Ő\",odblac:\"ő\",odiv:\"⨸\",odot:\"⊙\",odsold:\"⦼\",OElig:\"Œ\",oelig:\"œ\",ofcir:\"⦿\",Ofr:\"𝔒\",ofr:\"𝔬\",ogon:\"˛\",Ograve:\"Ò\",ograve:\"ò\",ogt:\"⧁\",ohbar:\"⦵\",ohm:\"Ω\",oint:\"∮\",olarr:\"↺\",olcir:\"⦾\",olcross:\"⦻\",oline:\"‾\",olt:\"⧀\",Omacr:\"Ō\",omacr:\"ō\",Omega:\"Ω\",omega:\"ω\",Omicron:\"Ο\",omicron:\"ο\",omid:\"⦶\",ominus:\"⊖\",Oopf:\"𝕆\",oopf:\"𝕠\",opar:\"⦷\",OpenCurlyDoubleQuote:\"“\",OpenCurlyQuote:\"‘\",operp:\"⦹\",oplus:\"⊕\",orarr:\"↻\",Or:\"⩔\",or:\"∨\",ord:\"⩝\",order:\"ℴ\",orderof:\"ℴ\",ordf:\"ª\",ordm:\"º\",origof:\"⊶\",oror:\"⩖\",orslope:\"⩗\",orv:\"⩛\",oS:\"Ⓢ\",Oscr:\"𝒪\",oscr:\"ℴ\",Oslash:\"Ø\",oslash:\"ø\",osol:\"⊘\",Otilde:\"Õ\",otilde:\"õ\",otimesas:\"⨶\",Otimes:\"⨷\",otimes:\"⊗\",Ouml:\"Ö\",ouml:\"ö\",ovbar:\"⌽\",OverBar:\"‾\",OverBrace:\"⏞\",OverBracket:\"⎴\",OverParenthesis:\"⏜\",para:\"¶\",parallel:\"∥\",par:\"∥\",parsim:\"⫳\",parsl:\"⫽\",part:\"∂\",PartialD:\"∂\",Pcy:\"П\",pcy:\"п\",percnt:\"%\",period:\".\",permil:\"‰\",perp:\"⊥\",pertenk:\"‱\",Pfr:\"𝔓\",pfr:\"𝔭\",Phi:\"Φ\",phi:\"φ\",phiv:\"ϕ\",phmmat:\"ℳ\",phone:\"☎\",Pi:\"Π\",pi:\"π\",pitchfork:\"⋔\",piv:\"ϖ\",planck:\"ℏ\",planckh:\"ℎ\",plankv:\"ℏ\",plusacir:\"⨣\",plusb:\"⊞\",pluscir:\"⨢\",plus:\"+\",plusdo:\"∔\",plusdu:\"⨥\",pluse:\"⩲\",PlusMinus:\"±\",plusmn:\"±\",plussim:\"⨦\",plustwo:\"⨧\",pm:\"±\",Poincareplane:\"ℌ\",pointint:\"⨕\",popf:\"𝕡\",Popf:\"ℙ\",pound:\"£\",prap:\"⪷\",Pr:\"⪻\",pr:\"≺\",prcue:\"≼\",precapprox:\"⪷\",prec:\"≺\",preccurlyeq:\"≼\",Precedes:\"≺\",PrecedesEqual:\"⪯\",PrecedesSlantEqual:\"≼\",PrecedesTilde:\"≾\",preceq:\"⪯\",precnapprox:\"⪹\",precneqq:\"⪵\",precnsim:\"⋨\",pre:\"⪯\",prE:\"⪳\",precsim:\"≾\",prime:\"′\",Prime:\"″\",primes:\"ℙ\",prnap:\"⪹\",prnE:\"⪵\",prnsim:\"⋨\",prod:\"∏\",Product:\"∏\",profalar:\"⌮\",profline:\"⌒\",profsurf:\"⌓\",prop:\"∝\",Proportional:\"∝\",Proportion:\"∷\",propto:\"∝\",prsim:\"≾\",prurel:\"⊰\",Pscr:\"𝒫\",pscr:\"𝓅\",Psi:\"Ψ\",psi:\"ψ\",puncsp:\" \",Qfr:\"𝔔\",qfr:\"𝔮\",qint:\"⨌\",qopf:\"𝕢\",Qopf:\"ℚ\",qprime:\"⁗\",Qscr:\"𝒬\",qscr:\"𝓆\",quaternions:\"ℍ\",quatint:\"⨖\",quest:\"?\",questeq:\"≟\",quot:'\"',QUOT:'\"',rAarr:\"⇛\",race:\"∽̱\",Racute:\"Ŕ\",racute:\"ŕ\",radic:\"√\",raemptyv:\"⦳\",rang:\"⟩\",Rang:\"⟫\",rangd:\"⦒\",range:\"⦥\",rangle:\"⟩\",raquo:\"»\",rarrap:\"⥵\",rarrb:\"⇥\",rarrbfs:\"⤠\",rarrc:\"⤳\",rarr:\"→\",Rarr:\"↠\",rArr:\"⇒\",rarrfs:\"⤞\",rarrhk:\"↪\",rarrlp:\"↬\",rarrpl:\"⥅\",rarrsim:\"⥴\",Rarrtl:\"⤖\",rarrtl:\"↣\",rarrw:\"↝\",ratail:\"⤚\",rAtail:\"⤜\",ratio:\"∶\",rationals:\"ℚ\",rbarr:\"⤍\",rBarr:\"⤏\",RBarr:\"⤐\",rbbrk:\"❳\",rbrace:\"}\",rbrack:\"]\",rbrke:\"⦌\",rbrksld:\"⦎\",rbrkslu:\"⦐\",Rcaron:\"Ř\",rcaron:\"ř\",Rcedil:\"Ŗ\",rcedil:\"ŗ\",rceil:\"⌉\",rcub:\"}\",Rcy:\"Р\",rcy:\"р\",rdca:\"⤷\",rdldhar:\"⥩\",rdquo:\"”\",rdquor:\"”\",rdsh:\"↳\",real:\"ℜ\",realine:\"ℛ\",realpart:\"ℜ\",reals:\"ℝ\",Re:\"ℜ\",rect:\"▭\",reg:\"®\",REG:\"®\",ReverseElement:\"∋\",ReverseEquilibrium:\"⇋\",ReverseUpEquilibrium:\"⥯\",rfisht:\"⥽\",rfloor:\"⌋\",rfr:\"𝔯\",Rfr:\"ℜ\",rHar:\"⥤\",rhard:\"⇁\",rharu:\"⇀\",rharul:\"⥬\",Rho:\"Ρ\",rho:\"ρ\",rhov:\"ϱ\",RightAngleBracket:\"⟩\",RightArrowBar:\"⇥\",rightarrow:\"→\",RightArrow:\"→\",Rightarrow:\"⇒\",RightArrowLeftArrow:\"⇄\",rightarrowtail:\"↣\",RightCeiling:\"⌉\",RightDoubleBracket:\"⟧\",RightDownTeeVector:\"⥝\",RightDownVectorBar:\"⥕\",RightDownVector:\"⇂\",RightFloor:\"⌋\",rightharpoondown:\"⇁\",rightharpoonup:\"⇀\",rightleftarrows:\"⇄\",rightleftharpoons:\"⇌\",rightrightarrows:\"⇉\",rightsquigarrow:\"↝\",RightTeeArrow:\"↦\",RightTee:\"⊢\",RightTeeVector:\"⥛\",rightthreetimes:\"⋌\",RightTriangleBar:\"⧐\",RightTriangle:\"⊳\",RightTriangleEqual:\"⊵\",RightUpDownVector:\"⥏\",RightUpTeeVector:\"⥜\",RightUpVectorBar:\"⥔\",RightUpVector:\"↾\",RightVectorBar:\"⥓\",RightVector:\"⇀\",ring:\"˚\",risingdotseq:\"≓\",rlarr:\"⇄\",rlhar:\"⇌\",rlm:\"‏\",rmoustache:\"⎱\",rmoust:\"⎱\",rnmid:\"⫮\",roang:\"⟭\",roarr:\"⇾\",robrk:\"⟧\",ropar:\"⦆\",ropf:\"𝕣\",Ropf:\"ℝ\",roplus:\"⨮\",rotimes:\"⨵\",RoundImplies:\"⥰\",rpar:\")\",rpargt:\"⦔\",rppolint:\"⨒\",rrarr:\"⇉\",Rrightarrow:\"⇛\",rsaquo:\"›\",rscr:\"𝓇\",Rscr:\"ℛ\",rsh:\"↱\",Rsh:\"↱\",rsqb:\"]\",rsquo:\"’\",rsquor:\"’\",rthree:\"⋌\",rtimes:\"⋊\",rtri:\"▹\",rtrie:\"⊵\",rtrif:\"▸\",rtriltri:\"⧎\",RuleDelayed:\"⧴\",ruluhar:\"⥨\",rx:\"℞\",Sacute:\"Ś\",sacute:\"ś\",sbquo:\"‚\",scap:\"⪸\",Scaron:\"Š\",scaron:\"š\",Sc:\"⪼\",sc:\"≻\",sccue:\"≽\",sce:\"⪰\",scE:\"⪴\",Scedil:\"Ş\",scedil:\"ş\",Scirc:\"Ŝ\",scirc:\"ŝ\",scnap:\"⪺\",scnE:\"⪶\",scnsim:\"⋩\",scpolint:\"⨓\",scsim:\"≿\",Scy:\"С\",scy:\"с\",sdotb:\"⊡\",sdot:\"⋅\",sdote:\"⩦\",searhk:\"⤥\",searr:\"↘\",seArr:\"⇘\",searrow:\"↘\",sect:\"§\",semi:\";\",seswar:\"⤩\",setminus:\"∖\",setmn:\"∖\",sext:\"✶\",Sfr:\"𝔖\",sfr:\"𝔰\",sfrown:\"⌢\",sharp:\"♯\",SHCHcy:\"Щ\",shchcy:\"щ\",SHcy:\"Ш\",shcy:\"ш\",ShortDownArrow:\"↓\",ShortLeftArrow:\"←\",shortmid:\"∣\",shortparallel:\"∥\",ShortRightArrow:\"→\",ShortUpArrow:\"↑\",shy:\"­\",Sigma:\"Σ\",sigma:\"σ\",sigmaf:\"ς\",sigmav:\"ς\",sim:\"∼\",simdot:\"⩪\",sime:\"≃\",simeq:\"≃\",simg:\"⪞\",simgE:\"⪠\",siml:\"⪝\",simlE:\"⪟\",simne:\"≆\",simplus:\"⨤\",simrarr:\"⥲\",slarr:\"←\",SmallCircle:\"∘\",smallsetminus:\"∖\",smashp:\"⨳\",smeparsl:\"⧤\",smid:\"∣\",smile:\"⌣\",smt:\"⪪\",smte:\"⪬\",smtes:\"⪬︀\",SOFTcy:\"Ь\",softcy:\"ь\",solbar:\"⌿\",solb:\"⧄\",sol:\"/\",Sopf:\"𝕊\",sopf:\"𝕤\",spades:\"♠\",spadesuit:\"♠\",spar:\"∥\",sqcap:\"⊓\",sqcaps:\"⊓︀\",sqcup:\"⊔\",sqcups:\"⊔︀\",Sqrt:\"√\",sqsub:\"⊏\",sqsube:\"⊑\",sqsubset:\"⊏\",sqsubseteq:\"⊑\",sqsup:\"⊐\",sqsupe:\"⊒\",sqsupset:\"⊐\",sqsupseteq:\"⊒\",square:\"□\",Square:\"□\",SquareIntersection:\"⊓\",SquareSubset:\"⊏\",SquareSubsetEqual:\"⊑\",SquareSuperset:\"⊐\",SquareSupersetEqual:\"⊒\",SquareUnion:\"⊔\",squarf:\"▪\",squ:\"□\",squf:\"▪\",srarr:\"→\",Sscr:\"𝒮\",sscr:\"𝓈\",ssetmn:\"∖\",ssmile:\"⌣\",sstarf:\"⋆\",Star:\"⋆\",star:\"☆\",starf:\"★\",straightepsilon:\"ϵ\",straightphi:\"ϕ\",strns:\"¯\",sub:\"⊂\",Sub:\"⋐\",subdot:\"⪽\",subE:\"⫅\",sube:\"⊆\",subedot:\"⫃\",submult:\"⫁\",subnE:\"⫋\",subne:\"⊊\",subplus:\"⪿\",subrarr:\"⥹\",subset:\"⊂\",Subset:\"⋐\",subseteq:\"⊆\",subseteqq:\"⫅\",SubsetEqual:\"⊆\",subsetneq:\"⊊\",subsetneqq:\"⫋\",subsim:\"⫇\",subsub:\"⫕\",subsup:\"⫓\",succapprox:\"⪸\",succ:\"≻\",succcurlyeq:\"≽\",Succeeds:\"≻\",SucceedsEqual:\"⪰\",SucceedsSlantEqual:\"≽\",SucceedsTilde:\"≿\",succeq:\"⪰\",succnapprox:\"⪺\",succneqq:\"⪶\",succnsim:\"⋩\",succsim:\"≿\",SuchThat:\"∋\",sum:\"∑\",Sum:\"∑\",sung:\"♪\",sup1:\"¹\",sup2:\"²\",sup3:\"³\",sup:\"⊃\",Sup:\"⋑\",supdot:\"⪾\",supdsub:\"⫘\",supE:\"⫆\",supe:\"⊇\",supedot:\"⫄\",Superset:\"⊃\",SupersetEqual:\"⊇\",suphsol:\"⟉\",suphsub:\"⫗\",suplarr:\"⥻\",supmult:\"⫂\",supnE:\"⫌\",supne:\"⊋\",supplus:\"⫀\",supset:\"⊃\",Supset:\"⋑\",supseteq:\"⊇\",supseteqq:\"⫆\",supsetneq:\"⊋\",supsetneqq:\"⫌\",supsim:\"⫈\",supsub:\"⫔\",supsup:\"⫖\",swarhk:\"⤦\",swarr:\"↙\",swArr:\"⇙\",swarrow:\"↙\",swnwar:\"⤪\",szlig:\"ß\",Tab:\"\\t\",target:\"⌖\",Tau:\"Τ\",tau:\"τ\",tbrk:\"⎴\",Tcaron:\"Ť\",tcaron:\"ť\",Tcedil:\"Ţ\",tcedil:\"ţ\",Tcy:\"Т\",tcy:\"т\",tdot:\"⃛\",telrec:\"⌕\",Tfr:\"𝔗\",tfr:\"𝔱\",there4:\"∴\",therefore:\"∴\",Therefore:\"∴\",Theta:\"Θ\",theta:\"θ\",thetasym:\"ϑ\",thetav:\"ϑ\",thickapprox:\"≈\",thicksim:\"∼\",ThickSpace:\"  \",ThinSpace:\" \",thinsp:\" \",thkap:\"≈\",thksim:\"∼\",THORN:\"Þ\",thorn:\"þ\",tilde:\"˜\",Tilde:\"∼\",TildeEqual:\"≃\",TildeFullEqual:\"≅\",TildeTilde:\"≈\",timesbar:\"⨱\",timesb:\"⊠\",times:\"×\",timesd:\"⨰\",tint:\"∭\",toea:\"⤨\",topbot:\"⌶\",topcir:\"⫱\",top:\"⊤\",Topf:\"𝕋\",topf:\"𝕥\",topfork:\"⫚\",tosa:\"⤩\",tprime:\"‴\",trade:\"™\",TRADE:\"™\",triangle:\"▵\",triangledown:\"▿\",triangleleft:\"◃\",trianglelefteq:\"⊴\",triangleq:\"≜\",triangleright:\"▹\",trianglerighteq:\"⊵\",tridot:\"◬\",trie:\"≜\",triminus:\"⨺\",TripleDot:\"⃛\",triplus:\"⨹\",trisb:\"⧍\",tritime:\"⨻\",trpezium:\"⏢\",Tscr:\"𝒯\",tscr:\"𝓉\",TScy:\"Ц\",tscy:\"ц\",TSHcy:\"Ћ\",tshcy:\"ћ\",Tstrok:\"Ŧ\",tstrok:\"ŧ\",twixt:\"≬\",twoheadleftarrow:\"↞\",twoheadrightarrow:\"↠\",Uacute:\"Ú\",uacute:\"ú\",uarr:\"↑\",Uarr:\"↟\",uArr:\"⇑\",Uarrocir:\"⥉\",Ubrcy:\"Ў\",ubrcy:\"ў\",Ubreve:\"Ŭ\",ubreve:\"ŭ\",Ucirc:\"Û\",ucirc:\"û\",Ucy:\"У\",ucy:\"у\",udarr:\"⇅\",Udblac:\"Ű\",udblac:\"ű\",udhar:\"⥮\",ufisht:\"⥾\",Ufr:\"𝔘\",ufr:\"𝔲\",Ugrave:\"Ù\",ugrave:\"ù\",uHar:\"⥣\",uharl:\"↿\",uharr:\"↾\",uhblk:\"▀\",ulcorn:\"⌜\",ulcorner:\"⌜\",ulcrop:\"⌏\",ultri:\"◸\",Umacr:\"Ū\",umacr:\"ū\",uml:\"¨\",UnderBar:\"_\",UnderBrace:\"⏟\",UnderBracket:\"⎵\",UnderParenthesis:\"⏝\",Union:\"⋃\",UnionPlus:\"⊎\",Uogon:\"Ų\",uogon:\"ų\",Uopf:\"𝕌\",uopf:\"𝕦\",UpArrowBar:\"⤒\",uparrow:\"↑\",UpArrow:\"↑\",Uparrow:\"⇑\",UpArrowDownArrow:\"⇅\",updownarrow:\"↕\",UpDownArrow:\"↕\",Updownarrow:\"⇕\",UpEquilibrium:\"⥮\",upharpoonleft:\"↿\",upharpoonright:\"↾\",uplus:\"⊎\",UpperLeftArrow:\"↖\",UpperRightArrow:\"↗\",upsi:\"υ\",Upsi:\"ϒ\",upsih:\"ϒ\",Upsilon:\"Υ\",upsilon:\"υ\",UpTeeArrow:\"↥\",UpTee:\"⊥\",upuparrows:\"⇈\",urcorn:\"⌝\",urcorner:\"⌝\",urcrop:\"⌎\",Uring:\"Ů\",uring:\"ů\",urtri:\"◹\",Uscr:\"𝒰\",uscr:\"𝓊\",utdot:\"⋰\",Utilde:\"Ũ\",utilde:\"ũ\",utri:\"▵\",utrif:\"▴\",uuarr:\"⇈\",Uuml:\"Ü\",uuml:\"ü\",uwangle:\"⦧\",vangrt:\"⦜\",varepsilon:\"ϵ\",varkappa:\"ϰ\",varnothing:\"∅\",varphi:\"ϕ\",varpi:\"ϖ\",varpropto:\"∝\",varr:\"↕\",vArr:\"⇕\",varrho:\"ϱ\",varsigma:\"ς\",varsubsetneq:\"⊊︀\",varsubsetneqq:\"⫋︀\",varsupsetneq:\"⊋︀\",varsupsetneqq:\"⫌︀\",vartheta:\"ϑ\",vartriangleleft:\"⊲\",vartriangleright:\"⊳\",vBar:\"⫨\",Vbar:\"⫫\",vBarv:\"⫩\",Vcy:\"В\",vcy:\"в\",vdash:\"⊢\",vDash:\"⊨\",Vdash:\"⊩\",VDash:\"⊫\",Vdashl:\"⫦\",veebar:\"⊻\",vee:\"∨\",Vee:\"⋁\",veeeq:\"≚\",vellip:\"⋮\",verbar:\"|\",Verbar:\"‖\",vert:\"|\",Vert:\"‖\",VerticalBar:\"∣\",VerticalLine:\"|\",VerticalSeparator:\"❘\",VerticalTilde:\"≀\",VeryThinSpace:\" \",Vfr:\"𝔙\",vfr:\"𝔳\",vltri:\"⊲\",vnsub:\"⊂⃒\",vnsup:\"⊃⃒\",Vopf:\"𝕍\",vopf:\"𝕧\",vprop:\"∝\",vrtri:\"⊳\",Vscr:\"𝒱\",vscr:\"𝓋\",vsubnE:\"⫋︀\",vsubne:\"⊊︀\",vsupnE:\"⫌︀\",vsupne:\"⊋︀\",Vvdash:\"⊪\",vzigzag:\"⦚\",Wcirc:\"Ŵ\",wcirc:\"ŵ\",wedbar:\"⩟\",wedge:\"∧\",Wedge:\"⋀\",wedgeq:\"≙\",weierp:\"℘\",Wfr:\"𝔚\",wfr:\"𝔴\",Wopf:\"𝕎\",wopf:\"𝕨\",wp:\"℘\",wr:\"≀\",wreath:\"≀\",Wscr:\"𝒲\",wscr:\"𝓌\",xcap:\"⋂\",xcirc:\"◯\",xcup:\"⋃\",xdtri:\"▽\",Xfr:\"𝔛\",xfr:\"𝔵\",xharr:\"⟷\",xhArr:\"⟺\",Xi:\"Ξ\",xi:\"ξ\",xlarr:\"⟵\",xlArr:\"⟸\",xmap:\"⟼\",xnis:\"⋻\",xodot:\"⨀\",Xopf:\"𝕏\",xopf:\"𝕩\",xoplus:\"⨁\",xotime:\"⨂\",xrarr:\"⟶\",xrArr:\"⟹\",Xscr:\"𝒳\",xscr:\"𝓍\",xsqcup:\"⨆\",xuplus:\"⨄\",xutri:\"△\",xvee:\"⋁\",xwedge:\"⋀\",Yacute:\"Ý\",yacute:\"ý\",YAcy:\"Я\",yacy:\"я\",Ycirc:\"Ŷ\",ycirc:\"ŷ\",Ycy:\"Ы\",ycy:\"ы\",yen:\"¥\",Yfr:\"𝔜\",yfr:\"𝔶\",YIcy:\"Ї\",yicy:\"ї\",Yopf:\"𝕐\",yopf:\"𝕪\",Yscr:\"𝒴\",yscr:\"𝓎\",YUcy:\"Ю\",yucy:\"ю\",yuml:\"ÿ\",Yuml:\"Ÿ\",Zacute:\"Ź\",zacute:\"ź\",Zcaron:\"Ž\",zcaron:\"ž\",Zcy:\"З\",zcy:\"з\",Zdot:\"Ż\",zdot:\"ż\",zeetrf:\"ℨ\",ZeroWidthSpace:\"​\",Zeta:\"Ζ\",zeta:\"ζ\",zfr:\"𝔷\",Zfr:\"ℨ\",ZHcy:\"Ж\",zhcy:\"ж\",zigrarr:\"⇝\",zopf:\"𝕫\",Zopf:\"ℤ\",Zscr:\"𝒵\",zscr:\"𝓏\",zwj:\"‍\",zwnj:\"‌\"}},function(t,e){t.exports={amp:\"&\",apos:\"'\",gt:\">\",lt:\"<\",quot:'\"'}},function(t,e,r){e=t.exports=r(36),e.Stream=e,e.Readable=e,e.Writable=r(21),e.Duplex=r(2),e.Transform=r(39),e.PassThrough=r(69)},function(t,e,r){\"use strict\";(function(e,n,i){function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){A(e,t)}}function a(t){return q.from(t)}function s(t){return q.isBuffer(t)||t instanceof P}function u(){}function c(t,e){O=O||r(2),t=t||{};var n=e instanceof O;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,a=t.writableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var u=!1===t.decodeStrings;this.decodeStrings=!u,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){y(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function l(t){if(O=O||r(2),!(R.call(l,this)||this instanceof O))return new l(t);this._writableState=new c(t,this),this.writable=!0,t&&(\"function\"==typeof t.write&&(this._write=t.write),\"function\"==typeof t.writev&&(this._writev=t.writev),\"function\"==typeof t.destroy&&(this._destroy=t.destroy),\"function\"==typeof t.final&&(this._final=t.final)),D.call(this)}function f(t,e){var r=new Error(\"write after end\");t.emit(\"error\",r),T.nextTick(e,r)}function h(t,e,r,n){var i=!0,o=!1;return null===r?o=new TypeError(\"May not write null values to stream\"):\"string\"==typeof r||void 0===r||e.objectMode||(o=new TypeError(\"Invalid non-string/buffer chunk\")),o&&(t.emit(\"error\",o),T.nextTick(n,o),i=!1),i}function p(t,e,r){return t.objectMode||!1===t.decodeStrings||\"string\"!=typeof e||(e=q.from(e,r)),e}function d(t,e,r,n,i,o){if(!r){var a=p(e,n,i);n!==a&&(r=!0,i=\"buffer\",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var u=e.length-1?n:T.nextTick;l.WritableState=c;var C=r(8);C.inherits=r(1);var B={deprecate:r(68)},D=r(37),q=r(15).Buffer,P=i.Uint8Array||function(){},M=r(38);C.inherits(l,D),c.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(c.prototype,\"buffer\",{get:B.deprecate(function(){return this.getBuffer()},\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(t){}}();var R;\"function\"==typeof Symbol&&Symbol.hasInstance&&\"function\"==typeof Function.prototype[Symbol.hasInstance]?(R=Function.prototype[Symbol.hasInstance],Object.defineProperty(l,Symbol.hasInstance,{value:function(t){return!!R.call(this,t)||this===l&&(t&&t._writableState instanceof c)}})):R=function(t){return t instanceof this},l.prototype.pipe=function(){this.emit(\"error\",new Error(\"Cannot pipe, not readable\"))},l.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&s(t);return o&&!q.isBuffer(t)&&(t=a(t)),\"function\"==typeof e&&(r=e,e=null),o?e=\"buffer\":e||(e=n.defaultEncoding),\"function\"!=typeof r&&(r=u),n.ended?f(this,r):(o||h(this,n,t,r))&&(n.pendingcb++,i=d(this,n,o,t,e,r)),i},l.prototype.cork=function(){this._writableState.corked++},l.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},l.prototype.setDefaultEncoding=function(t){if(\"string\"==typeof t&&(t=t.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((t+\"\").toLowerCase())>-1))throw new TypeError(\"Unknown encoding: \"+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(l.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),l.prototype._write=function(t,e,r){r(new Error(\"_write() is not implemented\"))},l.prototype._writev=null,l.prototype.end=function(t,e,r){var n=this._writableState;\"function\"==typeof t?(r=t,t=null,e=null):\"function\"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||E(this,n,r)},Object.defineProperty(l.prototype,\"destroyed\",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),l.prototype.destroy=M.destroy,l.prototype._undestroy=M.undestroy,l.prototype._destroy=function(t,e){this.end(),e(t)}}).call(e,r(7),r(66).setImmediate,r(0))},function(t,e,r){\"use strict\";function n(t){if(!t)return\"utf8\";for(var e;;)switch(t){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}function i(t){var e=n(t);if(\"string\"!=typeof e&&(y.isEncoding===m||!m(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}function o(t){this.encoding=i(t);var e;switch(this.encoding){case\"utf16le\":this.text=h,this.end=p,e=4;break;case\"utf8\":this.fillLast=c,e=4;break;case\"base64\":this.text=d,this.end=g,e=3;break;default:return this.write=v,void(this.end=b)}this.lastNeed=0,this.lastTotal=0,this.lastChar=y.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t,e,r){var n=e.length-1;if(n=0?(i>0&&(t.lastNeed=i-1),i):--n=0?(i>0&&(t.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0)}function u(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,\"�\";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,\"�\";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,\"�\"}}function c(t){var e=this.lastTotal-this.lastNeed,r=u(this,t,e);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){var r=s(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString(\"utf8\",e,n)}function f(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+\"�\":e}function h(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function p(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function d(t,e){var r=(t.length-e)%3;return 0===r?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function g(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function v(t){return t.toString(this.encoding)}function b(t){return t&&t.length?this.write(t):\"\"}var y=r(15).Buffer,m=y.isEncoding||function(t){switch((t=\"\"+t)&&t.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return\"\";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r\",t.children&&(r+=d(t.children,e)),p[t.name]&&!e.xmlMode||(r+=\"\")):r+=\"/>\",r}function o(t){return\"<\"+t.data+\">\"}function a(t,e){var r=t.data||\"\";return!e.decodeEntities||t.parent&&t.parent.name in h||(r=l.encodeXML(r)),r}function s(t){return\"\"}function u(t){return\"\\x3c!--\"+t.data+\"--\\x3e\"}var c=r(77),l=r(78),f={__proto__:null,allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,hidden:!0,ismap:!0,loop:!0,multiple:!0,muted:!0,open:!0,readonly:!0,required:!0,reversed:!0,scoped:!0,seamless:!0,selected:!0,typemustmatch:!0},h={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},p={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},d=t.exports=function(t,e){Array.isArray(t)||t.cheerio||(t=[t]),e=e||{};for(var r=\"\",n=0;n-1}function o(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o1&&E.reverse(),p&&c1?\"& \":\"\")+e[n],e=e.join(r>2?\", \":\" \"),t.replace(ct,\"{\\n/* [wrapped with \"+e+\"] */\\n\")}function T(t,e){return!!(e=null==e?tt:e)&&(\"number\"==typeof t||vt.test(t))&&t>-1&&t%1==0&&t2?t:void 0}(),Dt=Bt?function(t,e,r){var n=e+\"\";return Bt(t,\"toString\",{configurable:!0,enumerable:!1,value:U(A(n,B(E(n),r)))})}:F,qt=function(t,e){return e=Lt(void 0===e?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Lt(n.length-e,0),a=Array(o);++i1&&\"scope\"!==e)throw new SyntaxError(\"pseudo-selector :\"+e+\" requires an argument\")}else if(1===t.length)throw new SyntaxError(\"pseudo-selector :\"+e+\" doesn't have any arguments\")}var s=r(4),u=s.isTag,c=s.getText,l=s.getParent,f=s.getChildren,h=s.getSiblings,p=s.hasAttrib,d=s.getName,g=s.getAttributeValue,v=r(88),b=r(43).rules.equals,y=r(10),m=y.trueFunc,_=y.falseFunc,w={contains:function(t,e){return function(r){return t(r)&&c(r).indexOf(e)>=0}},icontains:function(t,e){var r=e.toLowerCase();return function(e){return t(e)&&c(e).toLowerCase().indexOf(r)>=0}},\"nth-child\":function(t,e){var r=v(e);return r===_?r:r===m?o(t):function(e){for(var n=h(e),i=0,o=0;i=0;o--)if(u(n[o])){if(n[o]===e)break;i++}return r(i)&&t(e)}},\"nth-of-type\":function(t,e){var r=v(e);return r===_?r:r===m?o(t):function(e){for(var n=h(e),i=0,o=0;o=0;o--)if(u(n[o])){if(n[o]===e)break;d(n[o])===d(e)&&i++}return r(i)&&t(e)}},root:function(t){return function(e){return!l(e)&&t(e)}},scope:function(t,e,r,n){return n&&0!==n.length?1===n.length?function(e){return n[0]===e&&t(e)}:function(e){return n.indexOf(e)>=0&&t(e)}:w.root(t)},checkbox:i(\"type\",\"checkbox\"),file:i(\"type\",\"file\"),password:i(\"type\",\"password\"),radio:i(\"type\",\"radio\"),reset:i(\"type\",\"reset\"),image:i(\"type\",\"image\"),submit:i(\"type\",\"submit\")},x={empty:function(t){return!f(t).some(function(t){return u(t)||\"text\"===t.type})},\"first-child\":function(t){return n(h(t))===t},\"last-child\":function(t){for(var e=h(t),r=e.length-1;r>=0;r--){if(e[r]===t)return!0;if(u(e[r]))break}return!1},\"first-of-type\":function(t){for(var e=h(t),r=0;r=0;r--)if(u(e[r])){if(e[r]===t)return!0;if(d(e[r])===d(t))break}return!1},\"only-of-type\":function(t){for(var e=h(t),r=0,n=e.length;r=0;a--)(e.fontFaces&&\"font-face\"===i[a].type||e.mediaQueries&&\"media\"===i[a].type)&&o.unshift(n.stringify({stylesheet:{rules:[i[a]]}},{comments:!1,indentation:\" \"})),i[a].position.start;return 0!==o.length&&\"\\n\"+o.join(\"\\n\")+\"\\n\"},e.normalizeLineEndings=function(t){return t.replace(/\\r\\n/g,\"\\n\").replace(/\\n/g,\"\\r\\n\")},e.compareFunc=function(t,e){for(var r=Math.min(t.length,e.length),n=0;ne[n]?1:-1;return t.length-e.length},e.compare=function(t,r){return 1==e.compareFunc(t,r)?t:r},e.extend=function(t,e){for(var r in e)i.call(e,r)&&(t[r]=e[r]);return t},e.getDefaultOptions=function(t){var r=e.extend({extraCss:\"\",insertPreservedExtraCss:!0,applyStyleTags:!0,removeStyleTags:!0,preserveMediaQueries:!0,preserveFontFaces:!0,applyWidthAttributes:!0,applyHeightAttributes:!0,applyAttributesTableElements:!0,url:\"\"},t);return r.webResources=r.webResources||{},r}},function(t,e,r){(function(r){function n(t){return i.bind(null,t)}function i(t){var e=[].slice.call(arguments,1);e.unshift(\"[\"+t+\"]\"),r.stderr.write(e.join(\" \")+\"\\n\")}e=t.exports=n}).call(e,r(7))},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return\"[object Array]\"==r.call(t)}},function(t,e,r){function n(t,e){this._options=e||{},this._cbs=t||{},this._tagname=\"\",this._attribname=\"\",this._attribvalue=\"\",this._attribs=null,this._stack=[],this.startIndex=0,this.endIndex=null,this._lowerCaseTagNames=\"lowerCaseTags\"in this._options?!!this._options.lowerCaseTags:!this._options.xmlMode,this._lowerCaseAttributeNames=\"lowerCaseAttributeNames\"in this._options?!!this._options.lowerCaseAttributeNames:!this._options.xmlMode,this._options.Tokenizer&&(i=this._options.Tokenizer),this._tokenizer=new i(this._options,this),this._cbs.onparserinit&&this._cbs.onparserinit(this)}var i=r(31),o={input:!0,option:!0,optgroup:!0,select:!0,button:!0,datalist:!0,textarea:!0},a={tr:{tr:!0,th:!0,td:!0},th:{th:!0},td:{thead:!0,th:!0,td:!0},body:{head:!0,link:!0,script:!0},li:{li:!0},p:{p:!0},h1:{p:!0},h2:{p:!0},h3:{p:!0},h4:{p:!0},h5:{p:!0},h6:{p:!0},select:o,input:o,output:o,button:o,datalist:o,textarea:o,option:{option:!0},optgroup:{optgroup:!0}},s={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,path:!0,circle:!0,ellipse:!0,line:!0,rect:!0,use:!0,stop:!0,polyline:!0,polygon:!0},u=/\\s|\\//;r(1)(n,r(13).EventEmitter),n.prototype._updatePosition=function(t){null===this.endIndex?this._tokenizer._sectionStart<=t?this.startIndex=0:this.startIndex=this._tokenizer._sectionStart-t:this.startIndex=this.endIndex+1,this.endIndex=this._tokenizer.getAbsoluteIndex()},n.prototype.ontext=function(t){this._updatePosition(1),this.endIndex--,this._cbs.ontext&&this._cbs.ontext(t)},n.prototype.onopentagname=function(t){if(this._lowerCaseTagNames&&(t=t.toLowerCase()),this._tagname=t,!this._options.xmlMode&&t in a)for(var e;(e=this._stack[this._stack.length-1])in a[t];this.onclosetag(e));!this._options.xmlMode&&t in s||this._stack.push(t),this._cbs.onopentagname&&this._cbs.onopentagname(t),this._cbs.onopentag&&(this._attribs={})},n.prototype.onopentagend=function(){this._updatePosition(1),this._attribs&&(this._cbs.onopentag&&this._cbs.onopentag(this._tagname,this._attribs),this._attribs=null),!this._options.xmlMode&&this._cbs.onclosetag&&this._tagname in s&&this._cbs.onclosetag(this._tagname),this._tagname=\"\"},n.prototype.onclosetag=function(t){if(this._updatePosition(1),this._lowerCaseTagNames&&(t=t.toLowerCase()),!this._stack.length||t in s&&!this._options.xmlMode)this._options.xmlMode||\"br\"!==t&&\"p\"!==t||(this.onopentagname(t),this._closeCurrentTag());else{var e=this._stack.lastIndexOf(t);if(-1!==e)if(this._cbs.onclosetag)for(e=this._stack.length-e;e--;)this._cbs.onclosetag(this._stack.pop());else this._stack.length=e;else\"p\"!==t||this._options.xmlMode||(this.onopentagname(t),this._closeCurrentTag())}},n.prototype.onselfclosingtag=function(){this._options.xmlMode||this._options.recognizeSelfClosing?this._closeCurrentTag():this.onopentagend()},n.prototype._closeCurrentTag=function(){var t=this._tagname;this.onopentagend(),this._stack[this._stack.length-1]===t&&(this._cbs.onclosetag&&this._cbs.onclosetag(t),this._stack.pop())},n.prototype.onattribname=function(t){this._lowerCaseAttributeNames&&(t=t.toLowerCase()),this._attribname=t},n.prototype.onattribdata=function(t){this._attribvalue+=t},n.prototype.onattribend=function(){this._cbs.onattribute&&this._cbs.onattribute(this._attribname,this._attribvalue),this._attribs&&!Object.prototype.hasOwnProperty.call(this._attribs,this._attribname)&&(this._attribs[this._attribname]=this._attribvalue),this._attribname=\"\",this._attribvalue=\"\"},n.prototype._getInstructionName=function(t){var e=t.search(u),r=e<0?t:t.substr(0,e);return this._lowerCaseTagNames&&(r=r.toLowerCase()),r},n.prototype.ondeclaration=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction(\"!\"+e,\"!\"+t)}},n.prototype.onprocessinginstruction=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction(\"?\"+e,\"?\"+t)}},n.prototype.oncomment=function(t){this._updatePosition(4),this._cbs.oncomment&&this._cbs.oncomment(t),this._cbs.oncommentend&&this._cbs.oncommentend()},n.prototype.oncdata=function(t){this._updatePosition(1),this._options.xmlMode||this._options.recognizeCDATA?(this._cbs.oncdatastart&&this._cbs.oncdatastart(),this._cbs.ontext&&this._cbs.ontext(t),this._cbs.oncdataend&&this._cbs.oncdataend()):this.oncomment(\"[CDATA[\"+t+\"]]\")},n.prototype.onerror=function(t){this._cbs.onerror&&this._cbs.onerror(t)},n.prototype.onend=function(){if(this._cbs.onclosetag)for(var t=this._stack.length;t>0;this._cbs.onclosetag(this._stack[--t]));this._cbs.onend&&this._cbs.onend()},n.prototype.reset=function(){this._cbs.onreset&&this._cbs.onreset(),this._tokenizer.reset(),this._tagname=\"\",this._attribname=\"\",this._attribs=null,this._stack=[],this._cbs.onparserinit&&this._cbs.onparserinit(this)},n.prototype.parseComplete=function(t){this.reset(),this.end(t)},n.prototype.write=function(t){this._tokenizer.write(t)},n.prototype.end=function(t){this._tokenizer.end(t)},n.prototype.pause=function(){this._tokenizer.pause()},n.prototype.resume=function(){this._tokenizer.resume()},n.prototype.parseChunk=n.prototype.write,n.prototype.done=n.prototype.end,t.exports=n},function(t,e,r){function n(t){return\" \"===t||\"\\n\"===t||\"\\t\"===t||\"\\f\"===t||\"\\r\"===t}function i(t,e,r){var n=t.toLowerCase();return t===n?function(t){t===n?this._state=e:(this._state=r,this._index--)}:function(i){i===n||i===t?this._state=e:(this._state=r,this._index--)}}function o(t,e){var r=t.toLowerCase();return function(n){n===r||n===t?this._state=e:(this._state=d,this._index--)}}function a(t,e){this._state=h,this._buffer=\"\",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=h,this._special=dt,this._cbs=e,this._running=!0,this._ended=!1,this._xmlMode=!(!t||!t.xmlMode),this._decodeEntities=!(!t||!t.decodeEntities)}t.exports=a;var s=r(32),u=r(18),c=r(33),l=r(19),f=0,h=f++,p=f++,d=f++,g=f++,v=f++,b=f++,y=f++,m=f++,_=f++,w=f++,x=f++,S=f++,j=f++,k=f++,E=f++,A=f++,T=f++,O=f++,L=f++,C=f++,B=f++,D=f++,q=f++,P=f++,M=f++,R=f++,I=f++,N=f++,U=f++,F=f++,z=f++,V=f++,$=f++,H=f++,W=f++,G=f++,Y=f++,J=f++,Q=f++,X=f++,Z=f++,K=f++,tt=f++,et=f++,rt=f++,nt=f++,it=f++,ot=f++,at=f++,st=f++,ut=f++,ct=f++,lt=f++,ft=f++,ht=f++,pt=0,dt=pt++,gt=pt++,vt=pt++;a.prototype._stateText=function(t){\"<\"===t?(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._state=p,this._sectionStart=this._index):this._decodeEntities&&this._special===dt&&\"&\"===t&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=h,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){\"/\"===t?this._state=v:\"<\"===t?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):\">\"===t||this._special!==dt||n(t)?this._state=h:\"!\"===t?(this._state=E,this._sectionStart=this._index+1):\"?\"===t?(this._state=T,this._sectionStart=this._index+1):(this._state=this._xmlMode||\"s\"!==t&&\"S\"!==t?d:z,this._sectionStart=this._index)},a.prototype._stateInTagName=function(t){(\"/\"===t||\">\"===t||n(t))&&(this._emitToken(\"onopentagname\"),this._state=m,this._index--)},a.prototype._stateBeforeCloseingTagName=function(t){n(t)||(\">\"===t?this._state=h:this._special!==dt?\"s\"===t||\"S\"===t?this._state=V:(this._state=h,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(\">\"===t||n(t))&&(this._emitToken(\"onclosetag\"),this._state=y,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){\">\"===t&&(this._state=h,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){\">\"===t?(this._cbs.onopentagend(),this._state=h,this._sectionStart=this._index+1):\"/\"===t?this._state=g:n(t)||(this._state=_,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){\">\"===t?(this._cbs.onselfclosingtag(),this._state=h,this._sectionStart=this._index+1):n(t)||(this._state=m,this._index--)},a.prototype._stateInAttributeName=function(t){(\"=\"===t||\"/\"===t||\">\"===t||n(t))&&(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=w,this._index--)},a.prototype._stateAfterAttributeName=function(t){\"=\"===t?this._state=x:\"/\"===t||\">\"===t?(this._cbs.onattribend(),this._state=m,this._index--):n(t)||(this._cbs.onattribend(),this._state=_,this._sectionStart=this._index)},a.prototype._stateBeforeAttributeValue=function(t){'\"'===t?(this._state=S,this._sectionStart=this._index+1):\"'\"===t?(this._state=j,this._sectionStart=this._index+1):n(t)||(this._state=k,this._sectionStart=this._index,this._index--)},a.prototype._stateInAttributeValueDoubleQuotes=function(t){'\"'===t?(this._emitToken(\"onattribdata\"),this._cbs.onattribend(),this._state=m):this._decodeEntities&&\"&\"===t&&(this._emitToken(\"onattribdata\"),this._baseState=this._state,this._state=ut,this._sectionStart=this._index)},a.prototype._stateInAttributeValueSingleQuotes=function(t){\"'\"===t?(this._emitToken(\"onattribdata\"),this._cbs.onattribend(),this._state=m):this._decodeEntities&&\"&\"===t&&(this._emitToken(\"onattribdata\"),this._baseState=this._state,this._state=ut,this._sectionStart=this._index)},a.prototype._stateInAttributeValueNoQuotes=function(t){n(t)||\">\"===t?(this._emitToken(\"onattribdata\"),this._cbs.onattribend(),this._state=m,this._index--):this._decodeEntities&&\"&\"===t&&(this._emitToken(\"onattribdata\"),this._baseState=this._state,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state=\"[\"===t?D:\"-\"===t?O:A},a.prototype._stateInDeclaration=function(t){\">\"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=h,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){\">\"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=h,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){\"-\"===t?(this._state=L,this._sectionStart=this._index+1):this._state=A},a.prototype._stateInComment=function(t){\"-\"===t&&(this._state=C)},a.prototype._stateAfterComment1=function(t){this._state=\"-\"===t?B:L},a.prototype._stateAfterComment2=function(t){\">\"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=h,this._sectionStart=this._index+1):\"-\"!==t&&(this._state=L)},a.prototype._stateBeforeCdata1=i(\"C\",q,A),a.prototype._stateBeforeCdata2=i(\"D\",P,A),a.prototype._stateBeforeCdata3=i(\"A\",M,A),a.prototype._stateBeforeCdata4=i(\"T\",R,A),a.prototype._stateBeforeCdata5=i(\"A\",I,A),a.prototype._stateBeforeCdata6=function(t){\"[\"===t?(this._state=N,this._sectionStart=this._index+1):(this._state=A,this._index--)},a.prototype._stateInCdata=function(t){\"]\"===t&&(this._state=U)},a.prototype._stateAfterCdata1=function(t,e){return function(r){r===t&&(this._state=e)}}(\"]\",F),a.prototype._stateAfterCdata2=function(t){\">\"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=h,this._sectionStart=this._index+1):\"]\"!==t&&(this._state=N)},a.prototype._stateBeforeSpecial=function(t){\"c\"===t||\"C\"===t?this._state=$:\"t\"===t||\"T\"===t?this._state=tt:(this._state=d,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==gt||\"c\"!==t&&\"C\"!==t?this._special!==vt||\"t\"!==t&&\"T\"!==t?this._state=h:this._state=it:this._state=J},a.prototype._stateBeforeScript1=o(\"R\",H),a.prototype._stateBeforeScript2=o(\"I\",W),a.prototype._stateBeforeScript3=o(\"P\",G),a.prototype._stateBeforeScript4=o(\"T\",Y),a.prototype._stateBeforeScript5=function(t){(\"/\"===t||\">\"===t||n(t))&&(this._special=gt),this._state=d,this._index--},a.prototype._stateAfterScript1=i(\"R\",Q,h),a.prototype._stateAfterScript2=i(\"I\",X,h),a.prototype._stateAfterScript3=i(\"P\",Z,h),a.prototype._stateAfterScript4=i(\"T\",K,h),a.prototype._stateAfterScript5=function(t){\">\"===t||n(t)?(this._special=dt,this._state=b,this._sectionStart=this._index-6,this._index--):this._state=h},a.prototype._stateBeforeStyle1=o(\"Y\",et),a.prototype._stateBeforeStyle2=o(\"L\",rt),a.prototype._stateBeforeStyle3=o(\"E\",nt),a.prototype._stateBeforeStyle4=function(t){(\"/\"===t||\">\"===t||n(t))&&(this._special=vt),this._state=d,this._index--},a.prototype._stateAfterStyle1=i(\"Y\",ot,h),a.prototype._stateAfterStyle2=i(\"L\",at,h),a.prototype._stateAfterStyle3=i(\"E\",st,h),a.prototype._stateAfterStyle4=function(t){\">\"===t||n(t)?(this._special=dt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=h},a.prototype._stateBeforeEntity=i(\"#\",ct,lt),a.prototype._stateBeforeNumericEntity=i(\"X\",ht,ft),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+16&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(c.hasOwnProperty(r))return this._emitPartial(c[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){\";\"===t?(this._parseNamedEntityStrict(),this._sectionStart+1\"z\")&&(t<\"A\"||t>\"Z\")&&(t<\"0\"||t>\"9\")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==h?\"=\"!==t&&this._parseNamedEntityStrict():this._parseLegacyEntity()),this._state=this._baseState,this._index--)},a.prototype._decodeNumericEntity=function(t,e){var r=this._sectionStart+t;if(r!==this._index){var n=this._buffer.substring(r,this._index),i=parseInt(n,e);this._emitPartial(s(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){\";\"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):(t<\"0\"||t>\"9\")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(2,10),this._index--)},a.prototype._stateInHexEntity=function(t){\";\"===t?(this._decodeNumericEntity(3,16),this._sectionStart++):(t<\"a\"||t>\"f\")&&(t<\"A\"||t>\"F\")&&(t<\"0\"||t>\"9\")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(3,16),this._index--)},a.prototype._cleanup=function(){this._sectionStart<0?(this._buffer=\"\",this._bufferOffset+=this._index,this._index=0):this._running&&(this._state===h?(this._sectionStart!==this._index&&this._cbs.ontext(this._buffer.substr(this._sectionStart)),this._buffer=\"\",this._bufferOffset+=this._index,this._index=0):this._sectionStart===this._index?(this._buffer=\"\",this._bufferOffset+=this._index,this._index=0):(this._buffer=this._buffer.substr(this._sectionStart),this._index-=this._sectionStart,this._bufferOffset+=this._sectionStart),this._sectionStart=0)},a.prototype.write=function(t){this._ended&&this._cbs.onerror(Error(\".write() after done!\")),this._buffer+=t,this._parse()},a.prototype._parse=function(){for(;this._index=55296&&t<=57343||t>1114111)return\"�\";t in i&&(t=i[t]);var e=\"\";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t)}var i=r(57);t.exports=n},function(t,e){t.exports={Aacute:\"Á\",aacute:\"á\",Acirc:\"Â\",acirc:\"â\",acute:\"´\",AElig:\"Æ\",aelig:\"æ\",Agrave:\"À\",agrave:\"à\",amp:\"&\",AMP:\"&\",Aring:\"Å\",aring:\"å\",Atilde:\"Ã\",atilde:\"ã\",Auml:\"Ä\",auml:\"ä\",brvbar:\"¦\",Ccedil:\"Ç\",ccedil:\"ç\",cedil:\"¸\",cent:\"¢\",copy:\"©\",COPY:\"©\",curren:\"¤\",deg:\"°\",divide:\"÷\",Eacute:\"É\",eacute:\"é\",Ecirc:\"Ê\",ecirc:\"ê\",Egrave:\"È\",egrave:\"è\",ETH:\"Ð\",eth:\"ð\",Euml:\"Ë\",euml:\"ë\",frac12:\"½\",frac14:\"¼\",frac34:\"¾\",gt:\">\",GT:\">\",Iacute:\"Í\",iacute:\"í\",Icirc:\"Î\",icirc:\"î\",iexcl:\"¡\",Igrave:\"Ì\",igrave:\"ì\",iquest:\"¿\",Iuml:\"Ï\",iuml:\"ï\",laquo:\"«\",lt:\"<\",LT:\"<\",macr:\"¯\",micro:\"µ\",middot:\"·\",nbsp:\" \",not:\"¬\",Ntilde:\"Ñ\",ntilde:\"ñ\",Oacute:\"Ó\",oacute:\"ó\",Ocirc:\"Ô\",ocirc:\"ô\",Ograve:\"Ò\",ograve:\"ò\",ordf:\"ª\",ordm:\"º\",Oslash:\"Ø\",oslash:\"ø\",Otilde:\"Õ\",otilde:\"õ\",Ouml:\"Ö\",ouml:\"ö\",para:\"¶\",plusmn:\"±\",pound:\"£\",quot:'\"',QUOT:'\"',raquo:\"»\",reg:\"®\",REG:\"®\",sect:\"§\",shy:\"­\",sup1:\"¹\",sup2:\"²\",sup3:\"³\",szlig:\"ß\",THORN:\"Þ\",thorn:\"þ\",times:\"×\",Uacute:\"Ú\",uacute:\"ú\",Ucirc:\"Û\",ucirc:\"û\",Ugrave:\"Ù\",ugrave:\"ù\",uml:\"¨\",Uuml:\"Ü\",uuml:\"ü\",Yacute:\"Ý\",yacute:\"ý\",yen:\"¥\",yuml:\"ÿ\"}},function(t,e){var r=t.exports={get firstChild(){var t=this.children;return t&&t[0]||null},get lastChild(){var t=this.children;return t&&t[t.length-1]||null},get nodeType(){return i[this.type]||i.element}},n={tagName:\"name\",childNodes:\"children\",parentNode:\"parent\",previousSibling:\"prev\",nextSibling:\"next\",nodeValue:\"data\"},i={element:1,text:3,cdata:4,comment:8};Object.keys(n).forEach(function(t){var e=n[t];Object.defineProperty(r,t,{get:function(){return this[e]||null},set:function(t){return this[e]=t,t}})})},function(t,e,r){function n(t,e){var r=this._parser=new i(t,e),n=this._decoder=new a;o.call(this,{decodeStrings:!1}),this.once(\"finish\",function(){r.end(n.end())})}t.exports=n;var i=r(30),o=r(62).Writable||r(74).Writable,a=r(22).StringDecoder,s=r(12).Buffer;r(1)(n,o),o.prototype._write=function(t,e,r){t instanceof s&&(t=this._decoder.write(t)),this._parser.write(t),r()}},function(t,e,r){\"use strict\";(function(e,n){function i(t){return R.from(t)}function o(t){return R.isBuffer(t)||t instanceof I}function a(t,e,r){if(\"function\"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?q(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}function s(t,e){D=D||r(2),t=t||{};var n=e instanceof D;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new V,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(z||(z=r(22).StringDecoder),this.decoder=new z(t.encoding),this.encoding=t.encoding)}function u(t){if(D=D||r(2),!(this instanceof u))return new u(t);this._readableState=new s(t,this),this.readable=!0,t&&(\"function\"==typeof t.read&&(this._read=t.read),\"function\"==typeof t.destroy&&(this._destroy=t.destroy)),M.call(this)}function c(t,e,r,n,o){var a=t._readableState;if(null===e)a.reading=!1,g(t,a);else{var s;o||(s=f(a,e)),s?t.emit(\"error\",s):a.objectMode||e&&e.length>0?(\"string\"==typeof e||a.objectMode||Object.getPrototypeOf(e)===R.prototype||(e=i(e)),n?a.endEmitted?t.emit(\"error\",new Error(\"stream.unshift() after end event\")):l(t,a,e,!0):a.ended?t.emit(\"error\",new Error(\"stream.push() after EOF\")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?l(t,a,e,!1):y(t,a)):l(t,a,e,!1))):n||(a.reading=!1)}return h(a)}function l(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit(\"data\",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&v(t)),y(t,e)}function f(t,e){var r;return o(e)||\"string\"==typeof e||void 0===e||t.objectMode||(r=new TypeError(\"Invalid non-string/buffer chunk\")),r}function h(t){return!t.ended&&(t.needReadable||t.length=W?t=W:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function d(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=p(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function g(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,v(t)}}function v(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(F(\"emitReadable\",e.flowing),e.emittedReadable=!0,e.sync?B.nextTick(b,t):b(t))}function b(t){F(\"emit readable\"),t.emit(\"readable\"),j(t)}function y(t,e){e.readingMore||(e.readingMore=!0,B.nextTick(m,t,e))}function m(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=E(t,e.buffer,e.decoder),r}function E(t,e,r){var n;return to.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++n}return e.length-=n,i}function T(t,e){var r=R.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),0===(t-=a)){a===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++i}return e.length-=i,r}function O(t){var e=t._readableState;if(e.length>0)throw new Error('\"endReadable()\" called on non-empty stream');e.endEmitted||(e.ended=!0,B.nextTick(L,e,t))}function L(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"))}function C(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return F(\"read: emitReadable\",e.length,e.ended),0===e.length&&e.ended?O(this):v(this),null;if(0===(t=d(t,e))&&e.ended)return 0===e.length&&O(this),null;var n=e.needReadable;F(\"need readable\",n),(0===e.length||e.length-t0?k(t,e):null,null===i?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&O(this)),null!==i&&this.emit(\"data\",i),i},u.prototype._read=function(t){this.emit(\"error\",new Error(\"_read() is not implemented\"))},u.prototype.pipe=function(t,e){function r(t,e){F(\"onunpipe\"),t===h&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,o())}function i(){F(\"onend\"),t.end()}function o(){F(\"cleanup\"),t.removeListener(\"close\",c),t.removeListener(\"finish\",l),t.removeListener(\"drain\",v),t.removeListener(\"error\",u),t.removeListener(\"unpipe\",r),h.removeListener(\"end\",i),h.removeListener(\"end\",f),h.removeListener(\"data\",s),b=!0,!p.awaitDrain||t._writableState&&!t._writableState.needDrain||v()}function s(e){F(\"ondata\"),y=!1,!1!==t.write(e)||y||((1===p.pipesCount&&p.pipes===t||p.pipesCount>1&&-1!==C(p.pipes,t))&&!b&&(F(\"false write response, pause\",h._readableState.awaitDrain),h._readableState.awaitDrain++,y=!0),h.pause())}function u(e){F(\"onerror\",e),f(),t.removeListener(\"error\",u),0===P(t,\"error\")&&t.emit(\"error\",e)}function c(){t.removeListener(\"finish\",l),f()}function l(){F(\"onfinish\"),t.removeListener(\"close\",c),f()}function f(){F(\"unpipe\"),h.unpipe(t)}var h=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=t;break;case 1:p.pipes=[p.pipes,t];break;default:p.pipes.push(t)}p.pipesCount+=1,F(\"pipe count=%d opts=%j\",p.pipesCount,e);var d=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr,g=d?i:f;p.endEmitted?B.nextTick(g):h.once(\"end\",g),t.on(\"unpipe\",r);var v=_(h);t.on(\"drain\",v);var b=!1,y=!1;return h.on(\"data\",s),a(t,\"error\",u),t.once(\"close\",c),t.once(\"finish\",l),t.emit(\"pipe\",h),p.flowing||(F(\"pipe resume\"),h.resume()),t},u.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o-1&&t%1==0&&t-1&&t%1==0&&t<=x}function m(t){var e=typeof t;return!!t&&(\"object\"==e||\"function\"==e)}function _(t){return!!t&&\"object\"==typeof t}function w(t){return g(t)?i(t,!0):a(t)}var x=9007199254740991,S=\"[object Arguments]\",j=\"[object Function]\",k=\"[object GeneratorFunction]\",E=/^(?:0|[1-9]\\d*)$/,A=Object.prototype,T=A.hasOwnProperty,O=A.toString,L=A.propertyIsEnumerable,C=Math.max,B=Array.isArray,D=function(t){return s(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=t.length>3&&\"function\"==typeof o?(i--,o):void 0,a&&l(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++n-1&&t%1==0&&t-1&&t%1==0&&t<=S}function _(t){var e=typeof t;return!!t&&(\"object\"==e||\"function\"==e)}function w(t){return!!t&&\"object\"==typeof t}function x(t){return v(t)?i(t,!0):s(t)}var S=9007199254740991,j=\"[object Arguments]\",k=\"[object Function]\",E=\"[object GeneratorFunction]\",A=/^(?:0|[1-9]\\d*)$/,T=Object.prototype,O=T.hasOwnProperty,L=T.toString,C=T.propertyIsEnumerable,B=Math.max,D=Array.isArray,q=function(t){return u(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=t.length>3&&\"function\"==typeof o?(i--,o):void 0,a&&f(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++n=0&&t(e)}},not:function(t,e){var r=e.name,n=e.value;return\"\"===n?function(e){return!!o(e,r)&&t(e)}:e.ignoreCase?(n=n.toLowerCase(),function(e){var i=o(e,r);return null!=i&&i.toLowerCase()!==n&&t(e)}):function(e){return o(e,r)!==n&&t(e)}}};t.exports={compile:function(t,e,r){if(r&&r.strict&&(e.ignoreCase||\"not\"===e.action))throw SyntaxError(\"Unsupported attribute selector\");return u[e.action](t,e)},rules:u}},function(t,e){t.exports={universal:50,tag:30,attribute:1,pseudo:0,descendant:-1,child:-1,parent:-1,sibling:-1,adjacent:-1}},function(t,e,r){function n(t){function e(t){return t?w[w.length-1-t]:_}function r(t){return t===n(1)}function n(e){return t[b+(e||1)]}function s(){var t=w.pop();return _=w[w.length-1],t}function u(t){return _=t,w.push(_),w.length}function c(t){var e=_;return w[w.length-1]=_=t,e}function l(e){if(1==(e||1))\"\\n\"==t[b]?(m++,v=1):v++,b++;else{var r=t.slice(b,b+e).split(\"\\n\");r.length>1&&(m+=r.length-1,v=1),v+=r[r.length-1].length,b+=e}}function f(){x.end={line:m,col:v},i&&a(\"addToken:\",JSON.stringify(x,null,2)),S.push(x),g=\"\",x={}}function h(t){x={type:t,start:{line:m,col:v}}}var p,d,g=\"\",v=0,b=-1,y=0,m=1,_=\"before-selector\",w=[_],x={},S=[],j=[\"media\",\"keyframes\",{name:\"-webkit-keyframes\",type:\"keyframes\",prefix:\"-webkit-\"},{name:\"-moz-keyframes\",type:\"keyframes\",prefix:\"-moz-\"},{name:\"-ms-keyframes\",type:\"keyframes\",prefix:\"-ms-\"},{name:\"-o-keyframes\",type:\"keyframes\",prefix:\"-o-\"},\"font-face\",{name:\"import\",state:\"before-at-value\"},{name:\"charset\",state:\"before-at-value\"},\"supports\",\"viewport\",{name:\"namespace\",state:\"before-at-value\"},\"document\",{name:\"-moz-document\",type:\"document\",prefix:\"-moz-\"},\"page\"];for(o&&(p=Date.now());d=function(){return l(),t[b]}();)switch(i&&a(d,e()),d){case\" \":switch(e()){case\"selector\":case\"value\":case\"value-paren\":case\"at-group\":case\"at-value\":case\"comment\":case\"double-string\":case\"single-string\":g+=d}break;case\"\\n\":case\"\\t\":case\"\\r\":case\"\\f\":switch(e()){case\"value\":case\"value-paren\":case\"at-group\":case\"comment\":case\"single-string\":case\"double-string\":case\"selector\":g+=d;break;case\"at-value\":\"\\n\"===d&&(x.value=g.trim(),f(),s())}break;case\":\":switch(e()){case\"name\":x.name=g.trim(),g=\"\",c(\"before-value\");break;case\"before-selector\":g+=d,h(\"selector\"),u(\"selector\");break;case\"before-value\":c(\"value\"),g+=d;break;default:g+=d}break;case\";\":switch(e()){case\"name\":case\"before-value\":case\"value\":g.trim().length>0&&(x.value=g.trim(),f()),c(\"before-name\");break;case\"value-paren\":g+=d;break;case\"at-value\":x.value=g.trim(),f(),s();break;case\"before-name\":break;default:g+=d}break;case\"{\":switch(e()){case\"selector\":if(\"\\\\\"===n(-1)){g+=d;break}x.text=g.trim(),f(),c(\"before-name\"),y+=1;break;case\"at-group\":switch(x.name=g.trim(),x.type){case\"font-face\":case\"viewport\":case\"page\":u(\"before-name\");break;default:u(\"before-selector\")}f(),y+=1;break;case\"name\":case\"at-rule\":x.name=g.trim(),f(),u(\"before-name\"),y+=1;break;case\"comment\":case\"double-string\":case\"single-string\":g+=d;break;case\"before-value\":c(\"value\"),g+=d}break;case\"}\":switch(e()){case\"before-name\":case\"name\":case\"before-value\":case\"value\":g&&(x.value=g.trim()),x.name&&x.value&&f(),h(\"end\"),f(),s(),\"at-group\"===e()&&(h(\"at-group-end\"),f(),s()),y>0&&(y-=1);break;case\"at-group\":case\"before-selector\":case\"selector\":if(\"\\\\\"===n(-1)){g+=d;break}y>0&&\"at-group\"===e(1)&&(h(\"at-group-end\"),f()),y>1&&s(),y>0&&(y-=1);break;case\"double-string\":case\"single-string\":case\"comment\":g+=d}break;case'\"':case\"'\":switch(e()){case\"double-string\":'\"'===d&&\"\\\\\"!==n(-1)&&s();break;case\"single-string\":\"'\"===d&&\"\\\\\"!==n(-1)&&s();break;case\"before-at-value\":c(\"at-value\"),u('\"'===d?\"double-string\":\"single-string\");break;case\"before-value\":c(\"value\"),u('\"'===d?\"double-string\":\"single-string\");break;case\"comment\":break;default:\"\\\\\"!==n(-1)&&u('\"'===d?\"double-string\":\"single-string\")}g+=d;break;case\"/\":switch(e()){case\"comment\":case\"double-string\":case\"single-string\":g+=d;break;case\"before-value\":case\"selector\":case\"name\":case\"value\":if(r(\"*\")){var k=function(e){var r=t.slice(b).indexOf(e);return r>0&&r}(\"*/\");k&&l(k+1)}else\"before-value\"==e()&&c(\"value\"),g+=d;break;default:r(\"*\")?(h(\"comment\"),u(\"comment\"),l()):g+=d}break;case\"*\":switch(e()){case\"comment\":r(\"/\")?(x.text=g,l(),f(),s()):g+=d;break;case\"before-selector\":g+=d,h(\"selector\"),u(\"selector\");break;case\"before-value\":c(\"value\"),g+=d;break;default:g+=d}break;case\"@\":switch(e()){case\"comment\":case\"double-string\":case\"single-string\":g+=d;break;case\"before-value\":c(\"value\"),g+=d;break;default:for(var E,A,T=!1,O=0,L=j.length;!T&&O0&&void 0!==arguments[0]?arguments[0]:{},e=t.editor,n=e.Commands,i=r(50),a=r(51);n.add(t.cmdOpenImport,i(t)),n.add(t.cmdTglImages,(0,o.default)(t)),e.on(\"load\",function(){n.add(\"export-template\",a(t))}),n.add(\"undo\",{run:function(t,e){e.set(\"active\",0),t.UndoManager.undo(1)}}),n.add(\"redo\",{run:function(t,e){e.set(\"active\",0),t.UndoManager.redo(1)}}),n.add(\"set-device-desktop\",{run:function(t){t.setDevice(\"Desktop\")}}),n.add(\"set-device-tablet\",{run:function(t){t.setDevice(\"Tablet\")}}),n.add(\"set-device-mobile\",{run:function(t){t.setDevice(\"Mobile portrait\")}})}}.call(e,r,e,t))&&(t.exports=n)},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=function(){var t=function t(e,r){e.each(function(e){if(\"image\"===e.get(\"type\")){var n=e.get(\"src\");r?\"##\"===n&&e.set(\"src\",e.get(\"src_bkp\")):\"##\"!==n&&(e.set(\"src_bkp\",e.get(\"src\")),e.set(\"src\",\"##\"))}t(e.get(\"components\"),r)})};return{run:function(e){var r=e.getComponents();t(r)},stop:function(e){var r=e.getComponents();t(r,1)}}}},function(t,e,r){\"use strict\";var n;void 0!==(n=function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.editor,r=e&&e.CodeManager.getViewer(\"CodeMirror\").clone(),n=document.createElement(\"button\"),i=document.createElement(\"div\"),o=t.pfx||\"\";return n.innerHTML=t.modalBtnImport,n.className=o+\"btn-prim \"+o+\"btn-import\",n.onclick=function(){var t=r.editor.getValue();e.DomComponents.getWrapper().set(\"content\",\"\"),e.setComponents(t),e.Modal.close()},r.set({codeName:\"htmlmixed\",theme:t.codeViewerTheme,readOnly:0}),{run:function(e,a){var s=e.Modal,u=(s.getContentEl(),r.editor);if(s.setTitle(t.modalTitleImport),!u){var c=document.createElement(\"textarea\");if(t.modalLabelImport){var l=document.createElement(\"div\");l.className=o+\"import-label\",l.innerHTML=t.modalLabelImport,i.appendChild(l)}i.appendChild(c),i.appendChild(n),r.init(c),u=r.editor}s.setContent(\"\"),s.setContent(i),r.setContent(t.importPlaceholder||\"\"),s.open(),u.refresh(),a&&a.set(\"active\",0)}}}}.call(e,r,e,t))&&(t.exports=n)},function(t,e,r){\"use strict\";var n;void 0!==(n=function(){var t=r(52);return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.editor,n=r&&r.CodeManager.getViewer(\"CodeMirror\").clone(),i=document.createElement(\"div\"),o=e.pfx||\"\",a=r.Commands,s=e.juiceOpts||{};return n.set({codeName:\"htmlmixed\",theme:e.codeViewerTheme}),a.add(e.cmdInlineHtml,{run:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e.getHtml()+\"\";return t(i,n)}}),{run:function(r,a){var u=r.Modal,c=(u.getContentEl(),n.editor);if(u.setTitle(e.modalTitleExport),!c){var l=document.createElement(\"textarea\");if(e.modalLabelExport){var f=document.createElement(\"div\");f.className=o+\"export-label\",f.innerHTML=e.modalLabelExport,i.appendChild(f)}i.appendChild(l),n.init(l),c=n.editor,c.setOption(\"lineWrapping\",1)}u.setContent(i);var h=r.getHtml()+\"\";n.setContent(e.inlineCss?t(h,s):h),u.open(),c.refresh(),a&&a.set&&a.set(\"active\",0)}}}}.call(e,r,e,t))&&(t.exports=n)},function(t,e,r){\"use strict\";var n=r(53),i=r(114),o=i(function(t,e){return n(t,{xmlMode:e&&e.xmlMode},a,[e])}),a=function(t,e){return o.juiceDocument(t,e)};o.inlineContent=function(t,e,r){return n(t,{xmlMode:r&&r.xmlMode},o.inlineDocument,[e,r])},t.exports=o},function(t,e,r){\"use strict\";var n=r(54),i=r(27),o=function(t,e,r){return e=i.extend({decodeEntities:!1},e||{}),t=r(t),n.load(t,e)},a=function(){var e=[];return{encodeEntities:function(r){var n=t.exports.codeBlocks;return Object.keys(n).forEach(function(t){var i=new RegExp(n[t].start+\"([\\\\S\\\\s]*?)\"+n[t].end,\"g\");r=r.replace(i,function(t,r){return e.push(t),\"JUICE_CODE_BLOCK_\"+(e.length-1)+\"_\"})}),r},decodeEntities:function(t){for(var r=0;r\"},HBS:{start:\"{{\",end:\"}}\"}}},function(t,e,r){e=t.exports=r(17),e.version=r(107).version},function(t,e,r){\"use strict\";function n(t){var e=t.length;if(e%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=t.indexOf(\"=\");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function i(t){var e=n(t),r=e[0],i=e[1];return 3*(r+i)/4-i}function o(t,e,r){return 3*(e+r)/4-r}function a(t){for(var e,r=n(t),i=r[0],a=r[1],s=new h(o(t,i,a)),u=0,c=a>0?i-4:i,l=0;l>16&255,s[u++]=e>>8&255,s[u++]=255&e;return 2===a&&(e=f[t.charCodeAt(l)]<<2|f[t.charCodeAt(l+1)]>>4,s[u++]=255&e),1===a&&(e=f[t.charCodeAt(l)]<<10|f[t.charCodeAt(l+1)]<<4|f[t.charCodeAt(l+2)]>>2,s[u++]=e>>8&255,s[u++]=255&e),s}function s(t){return l[t>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}function u(t,e,r){for(var n,i=[],o=e;oa?a:o+16383));return 1===n?(e=t[r-1],i.push(l[e>>2]+l[e<<4&63]+\"==\")):2===n&&(e=(t[r-2]<<8)+t[r-1],i.push(l[e>>10]+l[e>>4&63]+l[e<<2&63]+\"=\")),i.join(\"\")}e.byteLength=i,e.toByteArray=a,e.fromByteArray=c;for(var l=[],f=[],h=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,p=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",d=0,g=p.length;d>1,l=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),e+=a+f>=1?h/u:h*Math.pow(2,1-f),e*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<0;t[r+p]=255&a,p+=d,a/=256,c-=8);t[r+p-d]|=128*g}},function(t,e){t.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},function(t,e,r){function n(t,e,r){\"object\"==typeof t?(r=e,e=t,t=null):\"function\"==typeof e&&(r=e,e=u),this._callback=t,this._options=e||u,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(6),o=/\\s+/g,a=r(34),s=r(59),u={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1};n.prototype.onparserinit=function(t){this._parser=t},n.prototype.onreset=function(){n.call(this,this._callback,this._options,this._elementCB)},n.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this._handleCallback(null))},n.prototype._handleCallback=n.prototype.onerror=function(t){if(\"function\"==typeof this._callback)this._callback(t,this.dom);else if(t)throw t},n.prototype.onclosetag=function(){var t=this._tagStack.pop();this._options.withEndIndices&&t&&(t.endIndex=this._parser.endIndex),this._elementCB&&this._elementCB(t)},n.prototype._createDomElement=function(t){if(!this._options.withDomLvl1)return t;var e;e=\"tag\"===t.type?Object.create(s):Object.create(a);for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},n.prototype._addDomElement=function(t){var e=this._tagStack[this._tagStack.length-1],r=e?e.children:this.dom,n=r[r.length-1];t.next=null,this._options.withStartIndices&&(t.startIndex=this._parser.startIndex),this._options.withEndIndices&&(t.endIndex=this._parser.endIndex),n?(t.prev=n,n.next=t):t.prev=null,r.push(t),t.parent=e||null},n.prototype.onopentag=function(t,e){var r={type:\"script\"===t?i.Script:\"style\"===t?i.Style:i.Tag,name:t,attribs:e,children:[]},n=this._createDomElement(r);this._addDomElement(n),this._tagStack.push(n)},n.prototype.ontext=function(t){var e,r=this._options.normalizeWhitespace||this._options.ignoreWhitespace;if(!this._tagStack.length&&this.dom.length&&(e=this.dom[this.dom.length-1]).type===i.Text)r?e.data=(e.data+t).replace(o,\" \"):e.data+=t;else if(this._tagStack.length&&(e=this._tagStack[this._tagStack.length-1])&&(e=e.children[e.children.length-1])&&e.type===i.Text)r?e.data=(e.data+t).replace(o,\" \"):e.data+=t;else{r&&(t=t.replace(o,\" \"));var n=this._createDomElement({data:t,type:i.Text});this._addDomElement(n)}},n.prototype.oncomment=function(t){var e=this._tagStack[this._tagStack.length-1];if(e&&e.type===i.Comment)return void(e.data+=t);var r={data:t,type:i.Comment},n=this._createDomElement(r);this._addDomElement(n),this._tagStack.push(n)},n.prototype.oncdatastart=function(){var t={children:[{data:\"\",type:i.Text}],type:i.CDATA},e=this._createDomElement(t);this._addDomElement(e),this._tagStack.push(e)},n.prototype.oncommentend=n.prototype.oncdataend=function(){this._tagStack.pop()},n.prototype.onprocessinginstruction=function(t,e){var r=this._createDomElement({name:t,data:e,type:i.Directive});this._addDomElement(r)},t.exports=n},function(t,e,r){var n=r(34),i=t.exports=Object.create(n),o={tagName:\"name\"};Object.keys(o).forEach(function(t){var e=o[t];Object.defineProperty(i,t,{get:function(){return this[e]||null},set:function(t){return this[e]=t,t}})})},function(t,e,r){function n(t,e){this.init(t,e)}function i(t,e){return l.getElementsByTagName(t,e,!0)}function o(t,e){return l.getElementsByTagName(t,e,!0,1)[0]}function a(t,e,r){return l.getText(l.getElementsByTagName(t,e,r,1)).trim()}function s(t,e,r,n,i){var o=a(r,n,i);o&&(t[e]=o)}var u=r(3),c=u.DomHandler,l=u.DomUtils;r(1)(n,c),n.prototype.init=c;var f=function(t){return\"rss\"===t||\"feed\"===t||\"rdf:RDF\"===t};n.prototype.onend=function(){var t,e,r={},n=o(f,this.dom);n&&(\"feed\"===n.name?(e=n.children,r.type=\"atom\",s(r,\"id\",\"id\",e),s(r,\"title\",\"title\",e),(t=o(\"link\",e))&&(t=t.attribs)&&(t=t.href)&&(r.link=t),s(r,\"description\",\"subtitle\",e),(t=a(\"updated\",e))&&(r.updated=new Date(t)),s(r,\"author\",\"email\",e,!0),r.items=i(\"entry\",e).map(function(t){var e,r={};return t=t.children,s(r,\"id\",\"id\",t),s(r,\"title\",\"title\",t),(e=o(\"link\",t))&&(e=e.attribs)&&(e=e.href)&&(r.link=e),(e=a(\"summary\",t)||a(\"content\",t))&&(r.description=e),(e=a(\"updated\",t))&&(r.pubDate=new Date(e)),r})):(e=o(\"channel\",n.children).children,r.type=n.name.substr(0,3),r.id=\"\",s(r,\"title\",\"title\",e),s(r,\"link\",\"link\",e),s(r,\"description\",\"description\",e),(t=a(\"lastBuildDate\",e))&&(r.updated=new Date(t)),s(r,\"author\",\"managingEditor\",e,!0),r.items=i(\"item\",n.children).map(function(t){var e,r={};return t=t.children,s(r,\"id\",\"guid\",t),s(r,\"title\",\"title\",t),s(r,\"link\",\"link\",t),s(r,\"description\",\"description\",t),(e=a(\"pubDate\",t))&&(r.pubDate=new Date(e)),r}))),this.dom=r,c.prototype._handleCallback.call(this,n?null:Error(\"couldn't find root of feed\"))},t.exports=n},function(t,e,r){function n(t){o.call(this,new i(this),t)}function i(t){this.scope=t}t.exports=n;var o=r(35);r(1)(n,o),n.prototype.readable=!0;var a=r(3).EVENTS;Object.keys(a).forEach(function(t){if(0===a[t])i.prototype[\"on\"+t]=function(){this.scope.emit(t)};else if(1===a[t])i.prototype[\"on\"+t]=function(e){this.scope.emit(t,e)};else{if(2!==a[t])throw Error(\"wrong number of arguments!\");i.prototype[\"on\"+t]=function(e,r){this.scope.emit(t,e,r)}}})},function(t,e,r){function n(){i.call(this)}t.exports=n;var i=r(13).EventEmitter;r(1)(n,i),n.Readable=r(20),n.Writable=r(70),n.Duplex=r(71),n.Transform=r(72),n.PassThrough=r(73),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&c.pause&&c.pause()}function n(){c.readable&&c.resume&&c.resume()}function o(){l||(l=!0,t.end())}function a(){l||(l=!0,\"function\"==typeof t.destroy&&t.destroy())}function s(t){if(u(),0===i.listenerCount(this,\"error\"))throw t}function u(){c.removeListener(\"data\",r),t.removeListener(\"drain\",n),c.removeListener(\"end\",o),c.removeListener(\"close\",a),c.removeListener(\"error\",s),t.removeListener(\"error\",s),c.removeListener(\"end\",u),c.removeListener(\"close\",u),t.removeListener(\"close\",u)}var c=this;c.on(\"data\",r),t.on(\"drain\",n),t._isStdio||e&&!1===e.end||(c.on(\"end\",o),c.on(\"close\",a));var l=!1;return c.on(\"error\",s),t.on(\"error\",s),c.on(\"end\",u),c.on(\"close\",u),t.on(\"close\",u),t.emit(\"pipe\",c),t}},function(t,e){},function(t,e,r){\"use strict\";function n(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function i(t,e,r){t.copy(e,r)}var o=r(15).Buffer,a=r(65);t.exports=function(){function t(){n(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return\"\";for(var e=this.head,r=\"\"+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return o.alloc(0);if(1===this.length)return this.head.data;for(var e=o.allocUnsafe(t>>>0),r=this.head,n=0;r;)i(r.data,e,n),n+=r.data.length,r=r.next;return e},t}(),a&&a.inspect&&a.inspect.custom&&(t.exports.prototype[a.inspect.custom]=function(){var t=a.inspect({length:this.length});return this.constructor.name+\" \"+t})},function(t,e){},function(t,e,r){(function(t){function n(t,e){this._id=t,this._clearFn=e}var i=void 0!==t&&t||\"undefined\"!=typeof self&&self||window,o=Function.prototype.apply;e.setTimeout=function(){return new n(o.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new n(o.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(67),e.setImmediate=\"undefined\"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate=\"undefined\"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,r(0))},function(t,e,r){(function(t,e){!function(t,r){\"use strict\";function n(t){\"function\"!=typeof t&&(t=new Function(\"\"+t));for(var e=new Array(arguments.length-1),r=0;r0&&(o=i(t,o,r,n),a=a.concat(o),(n-=o.length)<=0)));s++);return a}function o(t,e){for(var r=0,n=e.length;r0&&(r=a(t,e[n].children)));return r}function s(t,e){for(var r=0,n=e.length;r0&&s(t,e[r].children)))return!0;return!1}function u(t,e){for(var r=[],n=0,i=e.length;n0&&(r=r.concat(u(t,e[n].children))));return r}var c=r(6).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:a,existsOne:s,findAll:u}},function(t,e,r){function n(t,e){return\"function\"==typeof e?function(r){return r.attribs&&e(r.attribs[t])}:function(r){return r.attribs&&r.attribs[t]===e}}function i(t,e){return function(r){return t(r)||e(r)}}var o=r(6),a=e.isTag=o.isTag;e.testElement=function(t,e){for(var r in t)if(t.hasOwnProperty(r)){if(\"tag_name\"===r){if(!a(e)||!t.tag_name(e.name))return!1}else if(\"tag_type\"===r){if(!t.tag_type(e.type))return!1}else if(\"tag_contains\"===r){if(a(e)||!t.tag_contains(e.data))return!1}else if(!e.attribs||!t[r](e.attribs[r]))return!1}else;return!0};var s={tag_name:function(t){return\"function\"==typeof t?function(e){return a(e)&&t(e.name)}:\"*\"===t?a:function(e){return a(e)&&e.name===t}},tag_type:function(t){return\"function\"==typeof t?function(e){return t(e.type)}:function(e){return e.type===t}},tag_contains:function(t){return\"function\"==typeof t?function(e){return!a(e)&&t(e.data)}:function(e){return!a(e)&&e.data===t}}};e.getElements=function(t,e,r,o){var a=Object.keys(t).map(function(e){var r=t[e];return e in s?s[e](r):n(e,r)});return 0===a.length?[]:this.filter(a.reduce(i),e,r,o)},e.getElementById=function(t,e,r){return Array.isArray(e)||(e=[e]),this.findOne(n(\"id\",t),e,!1!==r)},e.getElementsByTagName=function(t,e,r,n){return this.filter(s.tag_name(t),e,r,n)},e.getElementsByTagType=function(t,e,r,n){return this.filter(s.tag_type(t),e,r,n)}},function(t,e){e.removeSubsets=function(t){for(var e,r,n,i=t.length;--i>-1;){for(e=r=t[i],t[i]=null,n=!0;r;){if(t.indexOf(r)>-1){n=!1,t.splice(i,1);break}r=r.parent}n&&(t[i]=e)}return t};var r={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16},n=e.compareDocumentPosition=function(t,e){var n,i,o,a,s,u,c=[],l=[];if(t===e)return 0;for(n=t;n;)c.unshift(n),n=n.parent;for(n=e;n;)l.unshift(n),n=n.parent;for(u=0;c[u]===l[u];)u++;return 0===u?r.DISCONNECTED:(i=c[u-1],o=i.children,a=c[u],s=l[u],o.indexOf(a)>o.indexOf(s)?i===e?r.FOLLOWING|r.CONTAINED_BY:r.FOLLOWING:i===t?r.PRECEDING|r.CONTAINS:r.PRECEDING)};e.uniqueSort=function(t){var e,i,o=t.length;for(t=t.slice();--o>-1;)e=t[o],(i=t.indexOf(e))>-1&&i-1;)if(r=o+t.length,(0===o||l.test(i[o-1]))&&(r===i.length||l.test(i[r])))return!0})},e.addClass=function(t){if(\"function\"==typeof t)return a(this,function(r,n){var i=n.attribs.class||\"\";e.addClass.call([n],t.call(n,r,i))});if(!t||\"string\"!=typeof t)return this;for(var r=t.split(l),n=this.length,i=0;i=0&&(u.splice(a,1),s=!0,c--);s&&(e.attribs.class=u.join(\" \"))}}))},e.toggleClass=function(t,r){if(\"function\"==typeof t)return a(this,function(n,i){e.toggleClass.call([i],t.call(i,n,i.attribs.class||\"\",r),r)});if(!t||\"string\"!=typeof t)return this;for(var n,i,s=t.split(l),u=s.length,c=\"boolean\"==typeof r?r?1:-1:0,f=this.length,h=0;h=0&&i<0?n.push(s[p]):c<=0&&i>=0&&n.splice(i,1);this[h].attribs.class=n.join(\" \")}return this},e.is=function(t){return!!t&&this.filter(t).length>0}},function(t,e,r){var n=r(89),i=r(90);t.exports=function(t){return i(n(t))},t.exports.parse=n,t.exports.compile=i},function(t,e){function r(t){if(\"even\"===(t=t.trim().toLowerCase()))return[2,0];if(\"odd\"===t)return[2,1];var e=t.match(n);if(!e)throw new SyntaxError(\"n-th rule couldn't be parsed ('\"+t+\"')\");var r;return e[1]?(r=parseInt(e[1],10),isNaN(r)&&(r=\"-\"===e[1].charAt(0)?-1:1)):r=0,[r,e[3]?parseInt((e[2]||\"\")+e[3],10):0]}t.exports=r;var n=/^([+\\-]?\\d*n)?\\s*(?:([+\\-]?)\\s*(\\d+))?$/},function(t,e,r){function n(t){var e=t[0],r=t[1]-1;if(r<0&&e<=0)return a;if(-1===e)return function(t){return t<=r};if(0===e)return function(t){return t===r};if(1===e)return r<0?o:function(t){return t>=r};var n=r%e;return n<0&&(n+=e),e>1?function(t){return t>=r&&t%e===n}:(e*=-1,function(t){return t<=r&&t%e===n})}t.exports=n;var i=r(10),o=i.trueFunc,a=i.falseFunc},function(t,e,r){function n(t,e,r){return i(o(t,e,r))}function i(t){return function(e){return g(e)&&t(e)}}function o(t,e,r){return u(p(t,e),e,r)}function a(t){return\"pseudo\"===t.type&&(\"scope\"===t.name||Array.isArray(t.data)&&t.data.some(function(t){return t.some(a)}))}function s(t,e){var r=!!e&&!!e.length&&e.every(function(t){return t===j||!!k(t)});t.forEach(function(t){if(t.length>0&&c(t[0])&&\"descendant\"!==t[0].type);else{if(!r||a(t))return;t.unshift(x)}t.unshift(S)})}function u(t,e,r){t=t.filter(function(t){return t.length>0}),t.forEach(b);var n=Array.isArray(r);return r=e&&e.context||r,r&&!n&&(r=[r]),s(t,r),t.map(function(t){return l(t,e,r,n)}).reduce(f,_)}function c(t){return w[t.type]<0}function l(t,e,r,n){var i=n&&\"scope\"===t[0].name&&\"descendant\"===t[1].type;return t.reduce(function(t,n,o){return t===_?t:v[n.type](t,n,e,r,i&&1===o)},e&&e.rootFunc||m)}function f(t,e){return e===_||t===m?t:t===_||e===m?e:function(r){return t(r)||e(r)}}function h(t){return t.some(c)}t.exports=n,t.exports.compileUnsafe=o,t.exports.compileToken=u;var p=r(92),d=r(4),g=d.isTag,v=r(93),b=r(94),y=r(10),m=y.trueFunc,_=y.falseFunc,w=r(44),x={type:\"descendant\"},S={type:\"pseudo\",name:\"scope\"},j={},k=d.getParent,E=r(26),A=E.filters,T=d.existsOne,g=d.isTag,O=d.getChildren;A.not=function(t,e,r,n){var i={xmlMode:!(!r||!r.xmlMode),strict:!(!r||!r.strict)};if(i.strict&&(e.length>1||e.some(h)))throw new SyntaxError(\"complex selectors in :not aren't allowed in strict mode\");var o=u(e,i,n);return o===_?t:o===m?_:function(e){return!o(e)&&t(e)}},A.has=function(t,e,r){var n={xmlMode:!(!r||!r.xmlMode),strict:!(!r||!r.strict)},o=e.some(h)?[j]:null,a=u(e,n,o);return a===_?_:a===m?function(e){return O(e).some(g)&&t(e)}:(a=i(a),o?function(e){return t(e)&&(o[0]=e,T(a,O(e)))}:function(e){return t(e)&&T(a,O(e))})},A.matches=function(t,e,r,n){return u(e,{xmlMode:!(!r||!r.xmlMode),strict:!(!r||!r.strict),rootFunc:t},n)}},function(t,e,r){\"use strict\";function n(t,e,r){var n=\"0x\"+e-65536;return n!==n||r?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)}function i(t){return t.replace(l,n)}function o(t){return\" \"===t||\"\\n\"===t||\"\\t\"===t||\"\\f\"===t||\"\\r\"===t}function a(t,e){var r=[];if(\"\"!==(t=s(r,t+\"\",e)))throw new SyntaxError(\"Unmatched selector: \"+t);return r}function s(t,e,r){function n(){var t=e.match(c)[0];return e=e.substr(t.length),i(t)}function a(t){for(;o(e.charAt(t));)t++;e=e.substr(t)}var l,y,m,_,w=[],x=!1;for(a(0);\"\"!==e;)if(y=e.charAt(0),o(y))x=!0,a(1);else if(y in p)w.push({type:p[y]}),x=!1,a(1);else if(\",\"===y){if(0===w.length)throw new SyntaxError(\"empty sub-selector\");t.push(w),w=[],x=!1,a(1)}else if(x&&(w.length>0&&w.push({type:\"descendant\"}),x=!1),\"*\"===y)e=e.substr(1),w.push({type:\"universal\"});else if(y in d)e=e.substr(1),w.push({type:\"attribute\",name:d[y][0],action:d[y][1],value:n(),ignoreCase:!1});else if(\"[\"===y){if(e=e.substr(1),!(l=e.match(f)))throw new SyntaxError(\"Malformed attribute selector: \"+e);e=e.substr(l[0].length),m=i(l[1]),r&&(\"lowerCaseAttributeNames\"in r?!r.lowerCaseAttributeNames:r.xmlMode)||(m=m.toLowerCase()),w.push({type:\"attribute\",name:m,action:h[l[2]],value:i(l[4]||l[5]||\"\"),ignoreCase:!!l[6]})}else if(\":\"===y){if(\":\"===e.charAt(1)){e=e.substr(2),w.push({type:\"pseudo-element\",name:n().toLowerCase()});continue}if(e=e.substr(1),m=n().toLowerCase(),l=null,\"(\"===e.charAt(0))if(m in g){_=e.charAt(1);var S=_ in b;if(e=e.substr(S+1),l=[],e=s(l,e,r),S){if(e.charAt(0)!==_)throw new SyntaxError(\"unmatched quotes in :\"+m);e=e.substr(1)}if(\")\"!==e.charAt(0))throw new SyntaxError(\"missing closing parenthesis in :\"+m+\" \"+e);e=e.substr(1)}else{for(var j=1,k=1;k>0&&j0&&0===e.length)throw new SyntaxError(\"empty sub-selector\");t.push(e)}t.exports=a;var c=/^(?:\\\\.|[\\w\\-\\u00c0-\\uFFFF])+/,l=/\\\\([\\da-f]{1,6}\\s?|(\\s)|.)/gi,f=/^\\s*((?:\\\\.|[\\w\\u00c0-\\uFFFF\\-])+)\\s*(?:(\\S?)=\\s*(?:(['\"])(.*?)\\3|(#?(?:\\\\.|[\\w\\u00c0-\\uFFFF\\-])*)|)|)\\s*(i)?\\]/,h={__proto__:null,undefined:\"exists\",\"\":\"equals\",\"~\":\"element\",\"^\":\"start\",$:\"end\",\"*\":\"any\",\"!\":\"not\",\"|\":\"hyphen\"},p={__proto__:null,\">\":\"child\",\"<\":\"parent\",\"~\":\"sibling\",\"+\":\"adjacent\"},d={__proto__:null,\"#\":[\"id\",\"equals\"],\".\":[\"class\",\"element\"]},g={__proto__:null,has:!0,not:!0,matches:!0},v={__proto__:null,contains:!0,icontains:!0},b={__proto__:null,'\"':!0,\"'\":!0}},function(t,e,r){var n=r(4),i=n.isTag,o=n.getParent,a=n.getChildren,s=n.getSiblings,u=n.getName;t.exports={__proto__:null,attribute:r(43).compile,pseudo:r(26).compile,tag:function(t,e){var r=e.name;return function(e){return u(e)===r&&t(e)}},descendant:function(t,e,r,n,i){return function(e){if(i&&t(e))return!0;for(var r=!1;!r&&(e=o(e));)r=t(e);return r}},parent:function(t,e,r){function n(e){return i(e)&&t(e)}if(r&&r.strict)throw SyntaxError(\"Parent selector isn't part of CSS3\");return function(t){return a(t).some(n)}},child:function(t){return function(e){var r=o(e);return!!r&&t(r)}},sibling:function(t){return function(e){for(var r=s(e),n=0;n=0&&n>=1);else if(e===o.pseudo)if(t.data)if(\"has\"===t.name||\"contains\"===t.name)e=0;else if(\"matches\"===t.name||\"not\"===t.name){e=0;for(var r=0;re&&(e=n)}t.data.length>1&&e>0&&(e-=1)}else e=1;else e=3;return e}t.exports=n;var o=r(44),a={__proto__:null,exists:10,equals:8,not:7,start:6,end:6,any:5,hyphen:4,element:4}},function(t,e,r){(function(t,r){function n(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function i(t,e){for(var r=-1,n=Array(t);++r-1}function y(t,e){var r=this.__data__,n=q(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function m(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=kt}function pt(t){var e=typeof t;return null!=t&&(\"object\"==e||\"function\"==e)}function dt(t){return null!=t&&\"object\"==typeof t}function gt(t){if(!dt(t)||M(t)!=Ct)return!1;var e=se(t);if(null===e)return!0;var r=Zt.call(e,\"constructor\")&&e.constructor;return\"function\"==typeof r&&r instanceof r&&Xt.call(r)==ee}function vt(t){return Y(t,bt(t))}function bt(t){return ct(t)?C(t,!0):U(t)}function yt(t){return function(){return t}}function mt(t){return t}function _t(){return!1}var wt=200,xt=\"__lodash_hash_undefined__\",St=800,jt=16,kt=9007199254740991,Et=\"[object Arguments]\",At=\"[object AsyncFunction]\",Tt=\"[object Function]\",Ot=\"[object GeneratorFunction]\",Lt=\"[object Null]\",Ct=\"[object Object]\",Bt=\"[object Proxy]\",Dt=\"[object Undefined]\",qt=/[\\\\^$.*+?()[\\]{}|]/g,Pt=/^\\[object .+?Constructor\\]$/,Mt=/^(?:0|[1-9]\\d*)$/,Rt={};Rt[\"[object Float32Array]\"]=Rt[\"[object Float64Array]\"]=Rt[\"[object Int8Array]\"]=Rt[\"[object Int16Array]\"]=Rt[\"[object Int32Array]\"]=Rt[\"[object Uint8Array]\"]=Rt[\"[object Uint8ClampedArray]\"]=Rt[\"[object Uint16Array]\"]=Rt[\"[object Uint32Array]\"]=!0,Rt[Et]=Rt[\"[object Array]\"]=Rt[\"[object ArrayBuffer]\"]=Rt[\"[object Boolean]\"]=Rt[\"[object DataView]\"]=Rt[\"[object Date]\"]=Rt[\"[object Error]\"]=Rt[Tt]=Rt[\"[object Map]\"]=Rt[\"[object Number]\"]=Rt[Ct]=Rt[\"[object RegExp]\"]=Rt[\"[object Set]\"]=Rt[\"[object String]\"]=Rt[\"[object WeakMap]\"]=!1;var It=\"object\"==typeof t&&t&&t.Object===Object&&t,Nt=\"object\"==typeof self&&self&&self.Object===Object&&self,Ut=It||Nt||Function(\"return this\")(),Ft=\"object\"==typeof e&&e&&!e.nodeType&&e,zt=Ft&&\"object\"==typeof r&&r&&!r.nodeType&&r,Vt=zt&&zt.exports===Ft,$t=Vt&&It.process,Ht=function(){try{return $t&&$t.binding&&$t.binding(\"util\")}catch(t){}}(),Wt=Ht&&Ht.isTypedArray,Gt=Array.prototype,Yt=Function.prototype,Jt=Object.prototype,Qt=Ut[\"__core-js_shared__\"],Xt=Yt.toString,Zt=Jt.hasOwnProperty,Kt=function(){var t=/[^.]+$/.exec(Qt&&Qt.keys&&Qt.keys.IE_PROTO||\"\");return t?\"Symbol(src)_1.\"+t:\"\"}(),te=Jt.toString,ee=Xt.call(Object),re=RegExp(\"^\"+Xt.call(Zt).replace(qt,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),ne=Vt?Ut.Buffer:void 0,ie=Ut.Symbol,oe=Ut.Uint8Array,ae=ne?ne.allocUnsafe:void 0,se=function(t,e){return function(r){return t(e(r))}}(Object.getPrototypeOf,Object),ue=Object.create,ce=Jt.propertyIsEnumerable,le=Gt.splice,fe=ie?ie.toStringTag:void 0,he=function(){try{var t=Q(Object,\"defineProperty\");return t({},\"\",{}),t}catch(t){}}(),pe=ne?ne.isBuffer:void 0,de=Math.max,ge=Date.now,ve=Q(Ut,\"Map\"),be=Q(Object,\"create\"),ye=function(){function t(){}return function(e){if(!pt(e))return{};if(ue)return ue(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();s.prototype.clear=u,s.prototype.delete=c,s.prototype.get=l,s.prototype.has=f,s.prototype.set=h,p.prototype.clear=d,p.prototype.delete=g,p.prototype.get=v,p.prototype.has=b,p.prototype.set=y,m.prototype.clear=_,m.prototype.delete=w,m.prototype.get=x,m.prototype.has=S,m.prototype.set=j,k.prototype.clear=E,k.prototype.delete=A,k.prototype.get=T,k.prototype.has=O,k.prototype.set=L;var me=function(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===r(o[u],u,o))break}return e}}(),_e=he?function(t,e){return he(t,\"toString\",{configurable:!0,enumerable:!1,value:yt(e),writable:!0})}:mt,we=function(t){var e=0,r=0;return function(){var n=ge(),i=jt-(n-r);if(r=n,i>0){if(++e>=St)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(_e),xe=R(function(){return arguments}())?R:function(t){return dt(t)&&Zt.call(t,\"callee\")&&!ce.call(t,\"callee\")},Se=Array.isArray,je=pe||_t,ke=Wt?function(t){return function(e){return t(e)}}(Wt):N,Ee=function(t){return V(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=t.length>3&&\"function\"==typeof o?(i--,o):void 0,a&&tt(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++n-1}function w(t,e){var r=this.__data__,n=I(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}function x(t){var e=-1,r=t?t.length:0;for(this.clear();++eu))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var f=-1,h=!0,p=o&Nt?new T:void 0;for(a.set(t,e),a.set(e,t);++f-1&&t%1==0&&t-1&&t%1==0&&t<=zt}function At(t){var e=typeof t;return!!t&&(\"object\"==e||\"function\"==e)}function Tt(t){return!!t&&\"object\"==typeof t}function Ot(t){return\"symbol\"==typeof t||Tt(t)&&Le.call(t)==re}function Lt(t){return null==t?\"\":tt(t)}function Ct(t,e,r){var n=null==t?void 0:U(t,e);return void 0===n?r:n}function Bt(t,e){return null!=t&&ut(t,e,z)}function Dt(t){return St(t)?R(t):J(t)}function qt(t){return t}function Pt(t){return ft(t)?i(bt(t)):Z(t)}var Mt=200,Rt=\"Expected a function\",It=\"__lodash_hash_undefined__\",Nt=1,Ut=2,Ft=1/0,zt=9007199254740991,Vt=\"[object Arguments]\",$t=\"[object Array]\",Ht=\"[object Boolean]\",Wt=\"[object Date]\",Gt=\"[object Error]\",Yt=\"[object Function]\",Jt=\"[object GeneratorFunction]\",Qt=\"[object Map]\",Xt=\"[object Number]\",Zt=\"[object Object]\",Kt=\"[object RegExp]\",te=\"[object Set]\",ee=\"[object String]\",re=\"[object Symbol]\",ne=\"[object ArrayBuffer]\",ie=\"[object DataView]\",oe=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,ae=/^\\w*$/,se=/^\\./,ue=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,ce=/[\\\\^$.*+?()[\\]{}|]/g,le=/\\\\(\\\\)?/g,fe=/^\\[object .+?Constructor\\]$/,he=/^(?:0|[1-9]\\d*)$/,pe={};pe[\"[object Float32Array]\"]=pe[\"[object Float64Array]\"]=pe[\"[object Int8Array]\"]=pe[\"[object Int16Array]\"]=pe[\"[object Int32Array]\"]=pe[\"[object Uint8Array]\"]=pe[\"[object Uint8ClampedArray]\"]=pe[\"[object Uint16Array]\"]=pe[\"[object Uint32Array]\"]=!0,pe[Vt]=pe[$t]=pe[ne]=pe[Ht]=pe[ie]=pe[Wt]=pe[Gt]=pe[Yt]=pe[Qt]=pe[Xt]=pe[Zt]=pe[Kt]=pe[te]=pe[ee]=pe[\"[object WeakMap]\"]=!1;var de=\"object\"==typeof t&&t&&t.Object===Object&&t,ge=\"object\"==typeof self&&self&&self.Object===Object&&self,ve=de||ge||Function(\"return this\")(),be=\"object\"==typeof e&&e&&!e.nodeType&&e,ye=be&&\"object\"==typeof r&&r&&!r.nodeType&&r,me=ye&&ye.exports===be,_e=me&&de.process,we=function(){try{return _e&&_e.binding(\"util\")}catch(t){}}(),xe=we&&we.isTypedArray,Se=Array.prototype,je=Function.prototype,ke=Object.prototype,Ee=ve[\"__core-js_shared__\"],Ae=function(){var t=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||\"\");return t?\"Symbol(src)_1.\"+t:\"\"}(),Te=je.toString,Oe=ke.hasOwnProperty,Le=ke.toString,Ce=RegExp(\"^\"+Te.call(Oe).replace(ce,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),Be=ve.Symbol,De=ve.Uint8Array,qe=ke.propertyIsEnumerable,Pe=Se.splice,Me=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),Re=st(ve,\"DataView\"),Ie=st(ve,\"Map\"),Ne=st(ve,\"Promise\"),Ue=st(ve,\"Set\"),Fe=st(ve,\"WeakMap\"),ze=st(Object,\"create\"),Ve=yt(Re),$e=yt(Ie),He=yt(Ne),We=yt(Ue),Ge=yt(Fe),Ye=Be?Be.prototype:void 0,Je=Ye?Ye.valueOf:void 0,Qe=Ye?Ye.toString:void 0;l.prototype.clear=f,l.prototype.delete=h,l.prototype.get=p,l.prototype.has=d,l.prototype.set=g,v.prototype.clear=b,v.prototype.delete=y,v.prototype.get=m,v.prototype.has=_,v.prototype.set=w,x.prototype.clear=S,x.prototype.delete=j,x.prototype.get=k,x.prototype.has=E,x.prototype.set=A,T.prototype.add=T.prototype.push=O,T.prototype.has=L,C.prototype.clear=B,C.prototype.delete=D,C.prototype.get=q,C.prototype.has=P,C.prototype.set=M;var Xe=function(t,e){return function(r,n){if(null==r)return r;if(!St(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=Object(r);(e?o--:++o0})},e.first=function(){return this.length>1?this._make(this[0]):this},e.last=function(){return this.length>1?this._make(this[this.length-1]):this},e.eq=function(t){return 0===(t=+t)&&this.length<=1?this:(t<0&&(t=this.length+t),this[t]?this._make(this[t]):this._make([]))},e.get=function(t){return null==t?Array.prototype.slice.call(this):this[t<0?this.length+t:t]},e.index=function(t){var e,r;return 0===arguments.length?(e=this.parent().children(),r=this[0]):\"string\"==typeof t?(e=this._make(t),r=this[0]):(e=this,r=t.cheerio?t[0]:t),e.get().indexOf(r)},e.slice=function(){return this._make([].slice.apply(this,arguments))},e.end=function(){return this.prevObject||this._make([])},e.add=function(t,e){for(var r=this._make(t,e),n=s(r.get().concat(this.get())),i=0;i-1}function x(t,e){var r=this.__data__,n=N(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}function S(t){var e=-1,r=t?t.length:0;for(this.clear();++eu))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var f=-1,h=!0,p=o&Ut?new O:void 0;for(a.set(t,e),a.set(e,t);++f-1&&t%1==0&&t-1&&t%1==0&&t<=Vt}function Tt(t){var e=typeof t;return!!t&&(\"object\"==e||\"function\"==e)}function Ot(t){return!!t&&\"object\"==typeof t}function Lt(t){return\"symbol\"==typeof t||Ot(t)&&Ce.call(t)==ne}function Ct(t){return null==t?\"\":et(t)}function Bt(t,e,r){var n=null==t?void 0:z(t,e);return void 0===n?r:n}function Dt(t,e){return null!=t&&ct(t,e,$)}function qt(t){return jt(t)?I(t):X(t)}function Pt(t){return t}function Mt(t){return ft(t)?o(bt(t)):tt(t)}var Rt=200,It=\"Expected a function\",Nt=\"__lodash_hash_undefined__\",Ut=1,Ft=2,zt=1/0,Vt=9007199254740991,$t=\"[object Arguments]\",Ht=\"[object Array]\",Wt=\"[object Boolean]\",Gt=\"[object Date]\",Yt=\"[object Error]\",Jt=\"[object Function]\",Qt=\"[object GeneratorFunction]\",Xt=\"[object Map]\",Zt=\"[object Number]\",Kt=\"[object Object]\",te=\"[object RegExp]\",ee=\"[object Set]\",re=\"[object String]\",ne=\"[object Symbol]\",ie=\"[object ArrayBuffer]\",oe=\"[object DataView]\",ae=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,se=/^\\w*$/,ue=/^\\./,ce=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,le=/[\\\\^$.*+?()[\\]{}|]/g,fe=/\\\\(\\\\)?/g,he=/^\\[object .+?Constructor\\]$/,pe=/^(?:0|[1-9]\\d*)$/,de={};de[\"[object Float32Array]\"]=de[\"[object Float64Array]\"]=de[\"[object Int8Array]\"]=de[\"[object Int16Array]\"]=de[\"[object Int32Array]\"]=de[\"[object Uint8Array]\"]=de[\"[object Uint8ClampedArray]\"]=de[\"[object Uint16Array]\"]=de[\"[object Uint32Array]\"]=!0,de[$t]=de[Ht]=de[ie]=de[Wt]=de[oe]=de[Gt]=de[Yt]=de[Jt]=de[Xt]=de[Zt]=de[Kt]=de[te]=de[ee]=de[re]=de[\"[object WeakMap]\"]=!1;var ge=\"object\"==typeof t&&t&&t.Object===Object&&t,ve=\"object\"==typeof self&&self&&self.Object===Object&&self,be=ge||ve||Function(\"return this\")(),ye=\"object\"==typeof e&&e&&!e.nodeType&&e,me=ye&&\"object\"==typeof r&&r&&!r.nodeType&&r,_e=me&&me.exports===ye,we=_e&&ge.process,xe=function(){try{return we&&we.binding(\"util\")}catch(t){}}(),Se=xe&&xe.isTypedArray,je=Array.prototype,ke=Function.prototype,Ee=Object.prototype,Ae=be[\"__core-js_shared__\"],Te=function(){var t=/[^.]+$/.exec(Ae&&Ae.keys&&Ae.keys.IE_PROTO||\"\");return t?\"Symbol(src)_1.\"+t:\"\"}(),Oe=ke.toString,Le=Ee.hasOwnProperty,Ce=Ee.toString,Be=RegExp(\"^\"+Oe.call(Le).replace(le,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),De=be.Symbol,qe=be.Uint8Array,Pe=Ee.propertyIsEnumerable,Me=je.splice,Re=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),Ie=ut(be,\"DataView\"),Ne=ut(be,\"Map\"),Ue=ut(be,\"Promise\"),Fe=ut(be,\"Set\"),ze=ut(be,\"WeakMap\"),Ve=ut(Object,\"create\"),$e=yt(Ie),He=yt(Ne),We=yt(Ue),Ge=yt(Fe),Ye=yt(ze),Je=De?De.prototype:void 0,Qe=Je?Je.valueOf:void 0,Xe=Je?Je.toString:void 0;f.prototype.clear=h,f.prototype.delete=p,f.prototype.get=d,f.prototype.has=g,f.prototype.set=v,b.prototype.clear=y,b.prototype.delete=m,b.prototype.get=_,b.prototype.has=w,b.prototype.set=x,S.prototype.clear=j,S.prototype.delete=k,S.prototype.get=E,S.prototype.has=A,S.prototype.set=T,O.prototype.add=O.prototype.push=L,O.prototype.has=C,B.prototype.clear=D,B.prototype.delete=q,B.prototype.get=P,B.prototype.has=M,B.prototype.set=R;var Ze=function(t,e){return function(r,n){if(null==r)return r;if(!jt(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=Object(r);(e?o--:++o-1}function x(t,e){var r=this.__data__,n=N(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}function S(t){var e=-1,r=t?t.length:0;for(this.clear();++eu))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var f=-1,h=!0,p=o&Nt?new O:void 0;for(a.set(t,e),a.set(e,t);++f-1&&t%1==0&&t-1&&t%1==0&&t<=zt}function At(t){var e=typeof t;return!!t&&(\"object\"==e||\"function\"==e)}function Tt(t){return!!t&&\"object\"==typeof t}function Ot(t){return\"symbol\"==typeof t||Tt(t)&&Le.call(t)==re}function Lt(t){return null==t?\"\":et(t)}function Ct(t,e,r){var n=null==t?void 0:z(t,e);return void 0===n?r:n}function Bt(t,e){return null!=t&&ct(t,e,$)}function Dt(t){return St(t)?I(t):X(t)}function qt(t){return t}function Pt(t){return ft(t)?o(bt(t)):tt(t)}var Mt=200,Rt=\"Expected a function\",It=\"__lodash_hash_undefined__\",Nt=1,Ut=2,Ft=1/0,zt=9007199254740991,Vt=\"[object Arguments]\",$t=\"[object Array]\",Ht=\"[object Boolean]\",Wt=\"[object Date]\",Gt=\"[object Error]\",Yt=\"[object Function]\",Jt=\"[object GeneratorFunction]\",Qt=\"[object Map]\",Xt=\"[object Number]\",Zt=\"[object Object]\",Kt=\"[object RegExp]\",te=\"[object Set]\",ee=\"[object String]\",re=\"[object Symbol]\",ne=\"[object ArrayBuffer]\",ie=\"[object DataView]\",oe=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,ae=/^\\w*$/,se=/^\\./,ue=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,ce=/[\\\\^$.*+?()[\\]{}|]/g,le=/\\\\(\\\\)?/g,fe=/^\\[object .+?Constructor\\]$/,he=/^(?:0|[1-9]\\d*)$/,pe={};pe[\"[object Float32Array]\"]=pe[\"[object Float64Array]\"]=pe[\"[object Int8Array]\"]=pe[\"[object Int16Array]\"]=pe[\"[object Int32Array]\"]=pe[\"[object Uint8Array]\"]=pe[\"[object Uint8ClampedArray]\"]=pe[\"[object Uint16Array]\"]=pe[\"[object Uint32Array]\"]=!0,pe[Vt]=pe[$t]=pe[ne]=pe[Ht]=pe[ie]=pe[Wt]=pe[Gt]=pe[Yt]=pe[Qt]=pe[Xt]=pe[Zt]=pe[Kt]=pe[te]=pe[ee]=pe[\"[object WeakMap]\"]=!1;var de=\"object\"==typeof t&&t&&t.Object===Object&&t,ge=\"object\"==typeof self&&self&&self.Object===Object&&self,ve=de||ge||Function(\"return this\")(),be=\"object\"==typeof e&&e&&!e.nodeType&&e,ye=be&&\"object\"==typeof r&&r&&!r.nodeType&&r,me=ye&&ye.exports===be,_e=me&&de.process,we=function(){try{return _e&&_e.binding(\"util\")}catch(t){}}(),xe=we&&we.isTypedArray,Se=Array.prototype,je=Function.prototype,ke=Object.prototype,Ee=ve[\"__core-js_shared__\"],Ae=function(){var t=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||\"\");return t?\"Symbol(src)_1.\"+t:\"\"}(),Te=je.toString,Oe=ke.hasOwnProperty,Le=ke.toString,Ce=RegExp(\"^\"+Te.call(Oe).replace(ce,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),Be=ve.Symbol,De=ve.Uint8Array,qe=ke.propertyIsEnumerable,Pe=Se.splice,Me=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),Re=ut(ve,\"DataView\"),Ie=ut(ve,\"Map\"),Ne=ut(ve,\"Promise\"),Ue=ut(ve,\"Set\"),Fe=ut(ve,\"WeakMap\"),ze=ut(Object,\"create\"),Ve=yt(Re),$e=yt(Ie),He=yt(Ne),We=yt(Ue),Ge=yt(Fe),Ye=Be?Be.prototype:void 0,Je=Ye?Ye.valueOf:void 0,Qe=Ye?Ye.toString:void 0;f.prototype.clear=h,f.prototype.delete=p,f.prototype.get=d,f.prototype.has=g,f.prototype.set=v,b.prototype.clear=y,b.prototype.delete=m,b.prototype.get=_,b.prototype.has=w,b.prototype.set=x,S.prototype.clear=j,S.prototype.delete=k,S.prototype.get=E,S.prototype.has=A,S.prototype.set=T,O.prototype.add=O.prototype.push=L,O.prototype.has=C,B.prototype.clear=D,B.prototype.delete=q,B.prototype.get=P,B.prototype.has=M,B.prototype.set=R;var Xe=function(t,e){return function(r,n){if(null==r)return r;if(!St(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=Object(r);(e?o--:++o-1}function S(t,e){var r=this.__data__,n=U(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}function j(t){var e=-1,r=t?t.length:0;for(this.clear();++eu))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var f=-1,h=!0,p=o&Nt?new L:void 0;for(a.set(t,e),a.set(e,t);++f-1&&t%1==0&&t-1&&t%1==0&&t<=zt}function At(t){var e=typeof t;return!!t&&(\"object\"==e||\"function\"==e)}function Tt(t){return!!t&&\"object\"==typeof t}function Ot(t){return\"symbol\"==typeof t||Tt(t)&&Le.call(t)==re}function Lt(t){return null==t?\"\":et(t)}function Ct(t,e,r){var n=null==t?void 0:z(t,e);return void 0===n?r:n}function Bt(t,e){return null!=t&&ct(t,e,$)}function Dt(t){return St(t)?N(t):X(t)}function qt(t){return t}function Pt(t){return ft(t)?o(bt(t)):tt(t)}var Mt=200,Rt=\"Expected a function\",It=\"__lodash_hash_undefined__\",Nt=1,Ut=2,Ft=1/0,zt=9007199254740991,Vt=\"[object Arguments]\",$t=\"[object Array]\",Ht=\"[object Boolean]\",Wt=\"[object Date]\",Gt=\"[object Error]\",Yt=\"[object Function]\",Jt=\"[object GeneratorFunction]\",Qt=\"[object Map]\",Xt=\"[object Number]\",Zt=\"[object Object]\",Kt=\"[object RegExp]\",te=\"[object Set]\",ee=\"[object String]\",re=\"[object Symbol]\",ne=\"[object ArrayBuffer]\",ie=\"[object DataView]\",oe=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,ae=/^\\w*$/,se=/^\\./,ue=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,ce=/[\\\\^$.*+?()[\\]{}|]/g,le=/\\\\(\\\\)?/g,fe=/^\\[object .+?Constructor\\]$/,he=/^(?:0|[1-9]\\d*)$/,pe={};pe[\"[object Float32Array]\"]=pe[\"[object Float64Array]\"]=pe[\"[object Int8Array]\"]=pe[\"[object Int16Array]\"]=pe[\"[object Int32Array]\"]=pe[\"[object Uint8Array]\"]=pe[\"[object Uint8ClampedArray]\"]=pe[\"[object Uint16Array]\"]=pe[\"[object Uint32Array]\"]=!0,pe[Vt]=pe[$t]=pe[ne]=pe[Ht]=pe[ie]=pe[Wt]=pe[Gt]=pe[Yt]=pe[Qt]=pe[Xt]=pe[Zt]=pe[Kt]=pe[te]=pe[ee]=pe[\"[object WeakMap]\"]=!1;var de=\"object\"==typeof t&&t&&t.Object===Object&&t,ge=\"object\"==typeof self&&self&&self.Object===Object&&self,ve=de||ge||Function(\"return this\")(),be=\"object\"==typeof e&&e&&!e.nodeType&&e,ye=be&&\"object\"==typeof r&&r&&!r.nodeType&&r,me=ye&&ye.exports===be,_e=me&&de.process,we=function(){try{return _e&&_e.binding(\"util\")}catch(t){}}(),xe=we&&we.isTypedArray,Se=Array.prototype,je=Function.prototype,ke=Object.prototype,Ee=ve[\"__core-js_shared__\"],Ae=function(){var t=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||\"\");return t?\"Symbol(src)_1.\"+t:\"\"}(),Te=je.toString,Oe=ke.hasOwnProperty,Le=ke.toString,Ce=RegExp(\"^\"+Te.call(Oe).replace(ce,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),Be=ve.Symbol,De=ve.Uint8Array,qe=ke.propertyIsEnumerable,Pe=Se.splice,Me=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),Re=ut(ve,\"DataView\"),Ie=ut(ve,\"Map\"),Ne=ut(ve,\"Promise\"),Ue=ut(ve,\"Set\"),Fe=ut(ve,\"WeakMap\"),ze=ut(Object,\"create\"),Ve=yt(Re),$e=yt(Ie),He=yt(Ne),We=yt(Ue),Ge=yt(Fe),Ye=Be?Be.prototype:void 0,Je=Ye?Ye.valueOf:void 0,Qe=Ye?Ye.toString:void 0;h.prototype.clear=p,h.prototype.delete=d,h.prototype.get=g,h.prototype.has=v,h.prototype.set=b,y.prototype.clear=m,y.prototype.delete=_,y.prototype.get=w,y.prototype.has=x,y.prototype.set=S,j.prototype.clear=k,j.prototype.delete=E,j.prototype.get=A,j.prototype.has=T,j.prototype.set=O,L.prototype.add=L.prototype.push=C,L.prototype.has=B,D.prototype.clear=q,D.prototype.delete=P,D.prototype.get=M,D.prototype.has=R,D.prototype.set=I;var Xe=function(t,e){return function(r,n){if(null==r)return r;if(!St(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=Object(r);(e?o--:++o-1&&(c.children.splice(s,1),i===c&&e>s&&l[0]--),u.root=null,u.parent=i,u.prev&&(u.prev.next=u.next||null),u.next&&(u.next.prev=u.prev||null),u.prev=n[o-1]||f,u.next=n[o+1]||h;return f&&(f.next=n[0]),h&&(h.prev=n[n.length-1]),t.splice.apply(t,l)};e.appendTo=function(t){return t.cheerio||(t=this.constructor.call(this.constructor,t,null,this._originalRoot)),t.append(this),this},e.prependTo=function(t){return t.cheerio||(t=this.constructor.call(this.constructor,t,null,this._originalRoot)),t.prepend(this),this},e.append=p(function(t,e,r){d(e,e.length,0,t,r)}),e.prepend=p(function(t,e,r){d(e,0,0,t,r)}),e.wrap=function(t){var e=\"function\"==typeof t&&t,r=this.length-1;return h.forEach(this,h.bind(function(n,i){var a,s,u=n.parent||n.root,c=u.children;u&&(e&&(t=e.call(n,i)),\"string\"!=typeof t||l(t)||(t=this.parents().last().find(t).clone()),a=this._makeDomArray(t,i0&&o(l)?e>1?n(l,e-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}function i(t){return E(t)||a(t)||!!(k&&t&&t[k])}function o(t){return(t?t.length:0)?n(t,1):[]}function a(t){return u(t)&&w.call(t,\"callee\")&&(!j.call(t,\"callee\")||x.call(t)==d)}function s(t){return null!=t&&l(t.length)&&!c(t)}function u(t){return h(t)&&s(t)}function c(t){var e=f(t)?x.call(t):\"\";return e==g||e==v}function l(t){return\"number\"==typeof t&&t>-1&&t%1==0&&t<=p}function f(t){var e=typeof t;return!!t&&(\"object\"==e||\"function\"==e)}function h(t){return!!t&&\"object\"==typeof t}var p=9007199254740991,d=\"[object Arguments]\",g=\"[object Function]\",v=\"[object GeneratorFunction]\",b=\"object\"==typeof e&&e&&e.Object===Object&&e,y=\"object\"==typeof self&&self&&self.Object===Object&&self,m=b||y||Function(\"return this\")(),_=Object.prototype,w=_.hasOwnProperty,x=_.toString,S=m.Symbol,j=_.propertyIsEnumerable,k=S?S.isConcatSpreadable:void 0,E=Array.isArray;t.exports=o}).call(e,r(0))},function(t,e,r){function n(t,e,r,a){if(\"string\"==typeof e){var s=i(t);\"function\"==typeof r&&(r=r.call(t,a,s[e])),\"\"===r?delete s[e]:null!=r&&(s[e]=r),t.attribs.style=o(s)}else\"object\"==typeof e&&Object.keys(e).forEach(function(r){n(t,r,e[r])})}function i(t,e){var r=a(t.attribs.style);return\"string\"==typeof e?r[e]:Array.isArray(e)?u.pick(r,e):r}function o(t){return Object.keys(t||{}).reduce(function(e,r){return e+=(e?\" \":\"\")+r+\": \"+t[r]+\";\"},\"\")}function a(t){return t=(t||\"\").trim(),t?t.split(\";\").reduce(function(t,e){var r=e.indexOf(\":\");return r<1||r===e.length-1?t:(t[e.slice(0,r).trim()]=e.slice(r+1).trim(),t)},{}):{}}var s=r(9).domEach,u={pick:r(104)},c=Object.prototype.toString;e.css=function(t,e){return 2===arguments.length||\"[object Object]\"===c.call(t)?s(this,function(r,i){n(i,t,e,r)}):i(this[0],t)}},function(t,e,r){(function(e){function r(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function n(t,e){for(var r=-1,n=t?t.length:0,i=Array(n);++r0&&r(l)?e>1?o(l,e-1,r,n,a):i(a,l):n||(a[a.length]=l)}return a}function a(t,e){return t=Object(t),s(t,e,function(e,r){return r in t})}function s(t,e,r){for(var n=-1,i=e.length,o={};++n-1&&t%1==0&&t<=m}function g(t){var e=typeof t;return!!t&&(\"object\"==e||\"function\"==e)}function v(t){return!!t&&\"object\"==typeof t}function b(t){return\"symbol\"==typeof t||v(t)&&O.call(t)==S}var y=1/0,m=9007199254740991,_=\"[object Arguments]\",w=\"[object Function]\",x=\"[object GeneratorFunction]\",S=\"[object Symbol]\",j=\"object\"==typeof e&&e&&e.Object===Object&&e,k=\"object\"==typeof self&&self&&self.Object===Object&&self,E=j||k||Function(\"return this\")(),A=Object.prototype,T=A.hasOwnProperty,O=A.toString,L=E.Symbol,C=A.propertyIsEnumerable,B=L?L.isConcatSpreadable:void 0,D=Math.max,q=Array.isArray,P=function(t,e){return e=D(void 0===e?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=D(n.length-e,0),a=Array(o);++i-1}function x(t,e){var r=this.__data__,n=N(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}function S(t){var e=-1,r=t?t.length:0;for(this.clear();++eu))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var f=-1,h=!0,p=o&Nt?new O:void 0;for(a.set(t,e),a.set(e,t);++f-1&&t%1==0&&t-1&&t%1==0&&t<=zt}function At(t){var e=typeof t;return!!t&&(\"object\"==e||\"function\"==e)}function Tt(t){return!!t&&\"object\"==typeof t}function Ot(t){return\"symbol\"==typeof t||Tt(t)&&Le.call(t)==re}function Lt(t){return null==t?\"\":et(t)}function Ct(t,e,r){var n=null==t?void 0:F(t,e);return void 0===n?r:n}function Bt(t,e){return null!=t&&ct(t,e,V)}function Dt(t){return St(t)?I(t):Q(t)}function qt(t){return t}function Pt(t){return ft(t)?o(bt(t)):tt(t)}var Mt=200,Rt=\"Expected a function\",It=\"__lodash_hash_undefined__\",Nt=1,Ut=2,Ft=1/0,zt=9007199254740991,Vt=\"[object Arguments]\",$t=\"[object Array]\",Ht=\"[object Boolean]\",Wt=\"[object Date]\",Gt=\"[object Error]\",Yt=\"[object Function]\",Jt=\"[object GeneratorFunction]\",Qt=\"[object Map]\",Xt=\"[object Number]\",Zt=\"[object Object]\",Kt=\"[object RegExp]\",te=\"[object Set]\",ee=\"[object String]\",re=\"[object Symbol]\",ne=\"[object ArrayBuffer]\",ie=\"[object DataView]\",oe=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,ae=/^\\w*$/,se=/^\\./,ue=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,ce=/[\\\\^$.*+?()[\\]{}|]/g,le=/\\\\(\\\\)?/g,fe=/^\\[object .+?Constructor\\]$/,he=/^(?:0|[1-9]\\d*)$/,pe={};pe[\"[object Float32Array]\"]=pe[\"[object Float64Array]\"]=pe[\"[object Int8Array]\"]=pe[\"[object Int16Array]\"]=pe[\"[object Int32Array]\"]=pe[\"[object Uint8Array]\"]=pe[\"[object Uint8ClampedArray]\"]=pe[\"[object Uint16Array]\"]=pe[\"[object Uint32Array]\"]=!0,pe[Vt]=pe[$t]=pe[ne]=pe[Ht]=pe[ie]=pe[Wt]=pe[Gt]=pe[Yt]=pe[Qt]=pe[Xt]=pe[Zt]=pe[Kt]=pe[te]=pe[ee]=pe[\"[object WeakMap]\"]=!1;var de=\"object\"==typeof t&&t&&t.Object===Object&&t,ge=\"object\"==typeof self&&self&&self.Object===Object&&self,ve=de||ge||Function(\"return this\")(),be=\"object\"==typeof e&&e&&!e.nodeType&&e,ye=be&&\"object\"==typeof r&&r&&!r.nodeType&&r,me=ye&&ye.exports===be,_e=me&&de.process,we=function(){try{return _e&&_e.binding(\"util\")}catch(t){}}(),xe=we&&we.isTypedArray,Se=Array.prototype,je=Function.prototype,ke=Object.prototype,Ee=ve[\"__core-js_shared__\"],Ae=function(){var t=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||\"\");return t?\"Symbol(src)_1.\"+t:\"\"}(),Te=je.toString,Oe=ke.hasOwnProperty,Le=ke.toString,Ce=RegExp(\"^\"+Te.call(Oe).replace(ce,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),Be=ve.Symbol,De=ve.Uint8Array,qe=ke.propertyIsEnumerable,Pe=Se.splice,Me=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),Re=ut(ve,\"DataView\"),Ie=ut(ve,\"Map\"),Ne=ut(ve,\"Promise\"),Ue=ut(ve,\"Set\"),Fe=ut(ve,\"WeakMap\"),ze=ut(Object,\"create\"),Ve=yt(Re),$e=yt(Ie),He=yt(Ne),We=yt(Ue),Ge=yt(Fe),Ye=Be?Be.prototype:void 0,Je=Ye?Ye.valueOf:void 0,Qe=Ye?Ye.toString:void 0;f.prototype.clear=h,f.prototype.delete=p,f.prototype.get=d,f.prototype.has=g,f.prototype.set=v,b.prototype.clear=y,b.prototype.delete=m,b.prototype.get=_,b.prototype.has=w,b.prototype.set=x,S.prototype.clear=j,S.prototype.delete=k,S.prototype.get=E,S.prototype.has=A,S.prototype.set=T,O.prototype.add=O.prototype.push=L,O.prototype.has=C,B.prototype.clear=D,B.prototype.delete=q,B.prototype.get=P,B.prototype.has=M,B.prototype.set=R;var Xe=function(t,e){return function(r,n){if(null==r)return r;if(!St(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=Object(r);(e?o--:++o= 0.6\"},files:[\"index.js\",\"lib\"],homepage:\"https://github.com/cheeriojs/cheerio#readme\",keywords:[\"htmlparser\",\"jquery\",\"selector\",\"scraper\",\"parser\",\"html\"],license:\"MIT\",main:\"./index.js\",name:\"cheerio\",repository:{type:\"git\",url:\"git://github.com/cheeriojs/cheerio.git\"},scripts:{test:\"make test\"},version:\"0.22.0\"}},function(t,e,r){t.exports={lex:r(45),parse:r(109),stringify:r(110)}},function(t,e,r){function n(t,e){var r;e||(e={}),w=!!e.comments,S=!!e.position,x=0,j=Array.isArray(t)?t.slice():_(t);var n,i,a=[];for(y&&(r=Date.now());i=o();)(n=p(i))&&a.push(n);return y&&m(\"ran in\",Date.now()-r+\"ms\"),{type:\"stylesheet\",stylesheet:{rules:a}}}function i(t,e){e||(e={});for(var r,n=[\"type\",\"name\",\"value\"],i={},o=0;o+)\\\\s*|(\\\\s+)|(+|\\\\*)|\\\\#(+)|\\\\.(+)|\\\\[\\\\s*(+)(?:\\\\s*([*^$!~|]?=)(?:\\\\s*(?:([\\\"']?)(.*?)\\\\9)))?\\\\s*\\\\](?!\\\\])|(:+)(+)(?:\\\\((?:(?:([\\\"'])([^\\\\13]*)\\\\13)|((?:\\\\([^)]+\\\\)|[^()]*)+))\\\\))?)\".replace(//,\"[\"+o(\">+~`!@$%^&={}\\\\;/g,\"(?:[\\\\w\\\\u00a1-\\\\uFFFF-]|\\\\\\\\[^\\\\s0-9a-f])\").replace(//g,\"(?:[:\\\\w\\\\u00a1-\\\\uFFFF-]|\\\\\\\\[^\\\\s0-9a-f])\")),u=function(t){this.combinator=t||\" \",this.tag=\"*\"};u.prototype.toString=function(){if(!this.raw){var t,e,r=\"\";if(r+=this.tag||\"*\",this.id&&(r+=\"#\"+this.id),this.classes&&(r+=\".\"+this.classList.join(\".\")),this.attributes)for(t=0;e=this.attributes[t++];)r+=\"[\"+e.name+(e.operator?e.operator+'\"'+e.value+'\"':\"\")+\"]\";if(this.pseudos)for(t=0;e=this.pseudos[t++];)r+=\":\"+e.name,e.value&&(r+=\"(\"+e.value+\")\");this.raw=r}return this.raw};var c=function(){this.length=0};c.prototype.toString=function(){if(!this.raw){for(var t,e=\"\",r=0;t=this[r++];)1!==r&&(e+=\" \"),\" \"!==t.combinator&&(e+=t.combinator+\" \"),e+=t;this.raw=e}return this.raw};var l=function(t,e,r,n,i,s,l,f,h,p,d,g,v,b,y,m){var _,w;if((e||!this.length)&&(_=this[this.length++]=new c,e))return\"\";if(_||(_=this[this.length-1]),(r||n||!_.length)&&(w=_[_.length++]=new u(r)),w||(w=_[_.length-1]),i)w.tag=a(i);else if(s)w.id=a(s);else if(l){var x=a(l),S=w.classes||(w.classes={});if(!S[x]){S[x]=o(l);var j=w.classList||(w.classList=[]);j.push(x),j.sort()}}else v?(m=m||y,(w.pseudos||(w.pseudos=[])).push({type:1==g.length?\"class\":\"element\",name:a(v),escapedName:o(v),value:m?a(m):null,escapedValue:m?o(m):null})):f&&(d=d?o(d):null,(w.attributes||(w.attributes=[])).push({operator:h,name:a(f),escapedName:o(f),value:d?a(d):null,escapedValue:d?o(d):null}));return\"\"},f=function(t){this.length=0;for(var e,r=this,n=t;t;){if((e=t.replace(s,function(){return l.apply(r,arguments)}))===t)throw new Error(n+\" is an invalid expression\");t=e}};f.prototype.toString=function(){if(!this.raw){for(var t,e=[],r=0;t=this[r++];)e.push(t);this.raw=e.join(\", \")}return this.raw};var h={},p=function(t){return null==t?null:(t=(\"\"+t).replace(/^\\s+|\\s+$/g,\"\"),h[t]||(h[t]=new f(t)))};t.exports=p},function(t,e,r){\"use strict\";function n(t,e,r,n,i){this.prop=t,this.value=e,this.selector=r,this.priority=n||0,this.additionalPriority=i||[]}t.exports=n;var i=r(27);n.prototype.compareFunc=function(t){var e=[];e.push.apply(e,this.selector.specificity()),e.push.apply(e,this.additionalPriority),e[0]+=this.priority;var r=[];return r.push.apply(r,t.selector.specificity()),r.push.apply(r,t.additionalPriority),r[0]+=t.priority,i.compareFunc(e,r)},n.prototype.compare=function(t){return 1===this.compareFunc(t)?this:t},n.prototype.toString=function(){return this.prop+\": \"+this.value.replace(/['\"]+/g,\"\")+\";\"}},function(t,e,r){\"use strict\";var n=r(27);t.exports=function(t){function e(e,o,s){function u(r){for(var o=r[0],u=r[1],c=new n.Selector(o),l=c.parsed(),f=i(l),h=0;h=0)return}}if(f){var y=l[l.length-1],m=y.pseudos;y.pseudos=a(y.pseudos),o=l.toString(),y.pseudos=m}var _;try{_=e(o)}catch(t){return}_.each(function(){function r(e,r){for(var o=0,a=e.length;o=0)){if(f){var o=\"pseudo\"+f,a=i[o];a||(a=i[o]=e(\"\").get(0),a.pseudoElementType=f,a.pseudoElementParent=i,i[o]=a),i=a}if(!i.styleProps){if(i.styleProps={},e(i).attr(v)){var l=\"* { \"+e(i).attr(v)+\" } \";r(n.parseCSS(l)[0][1],new n.Selector(\"\")}}}function r(t){if(\"none\"===t||\"normal\"===t)return\"\";var e=t.match(/^\\s*url\\s*\\(\\s*(.*?)\\s*\\)\\s*$/i);if(e){return{img:e[1].replace(/^['\"]|['\"]$/g,\"\")}}return t=t.slice(1,t.length-1),t=t.replace(/\\\\/g,\"\")}function i(t){if(0!==t.length){var e=t[t.length-1].pseudos;if(e)for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},e=\"\",r=\"\",n=t.editor,i=t.tableStyle||{},o=t.cellStyle||{},a=n.BlockManager;for(var s in i)e+=s+\": \"+i[s]+\"; \";for(var u in o)r+=u+\": \"+o[u]+\"; \";a.getAll().reset(),a.add(\"sect100\",{label:t.sect100BlkLabel,category:t.categoryLabel,attributes:{class:\"gjs-fonts gjs-f-b1\"},content:'\\n \\n \\n \\n
'}),a.add(\"sect50\",{label:t.sect50BlkLabel,category:t.categoryLabel,attributes:{class:\"gjs-fonts gjs-f-b2\"},content:'\\n \\n \\n \\n \\n
'}),a.add(\"sect30\",{label:t.sect30BlkLabel,category:t.categoryLabel,attributes:{class:\"gjs-fonts gjs-f-b3\"},content:'\\n \\n \\n \\n \\n \\n
'}),a.add(\"sect37\",{label:t.sect37BlkLabel,category:t.categoryLabel,attributes:{class:\"gjs-fonts gjs-f-b37\"},content:'\\n \\n \\n \\n \\n
'}),a.add(\"button\",{label:t.buttonBlkLabel,category:t.categoryLabel,content:'Button',attributes:{class:\"gjs-fonts gjs-f-button\"}}),a.add(\"divider\",{label:t.dividerBlkLabel,category:t.categoryLabel,content:'\\n \\n \\n \\n
\\n ',attributes:{class:\"gjs-fonts gjs-f-divider\"}}),a.add(\"text\",{label:t.textBlkLabel,category:t.categoryLabel,attributes:{class:\"gjs-fonts gjs-f-text\"},content:{type:\"text\",content:\"Insert your text here\",style:{padding:\"10px\"},activeOnRender:1}}),a.add(\"text-sect\",{label:t.textSectionBlkLabel,category:t.categoryLabel,content:'

Insert title here

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

',attributes:{class:\"gjs-fonts gjs-f-h1p\"}}),a.add(\"image\",{label:t.imageBlkLabel,category:t.categoryLabel,attributes:{class:\"gjs-fonts gjs-f-image\"},content:{type:\"image\",style:{color:\"black\"},activeOnRender:1}}),a.add(\"quote\",{label:t.quoteBlkLabel,category:t.categoryLabel,content:'
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
',attributes:{class:\"fa fa-quote-right\"}}),a.add(\"link\",{label:t.linkBlkLabel,category:t.categoryLabel,attributes:{class:\"fa fa-link\"},content:{type:\"link\",content:\"Link\",style:{color:\"#3b97e3\"}}}),a.add(\"link-block\",{label:t.linkBlockBlkLabel,category:t.categoryLabel,attributes:{class:\"fa fa-link\"},content:{type:\"link\",editable:!1,droppable:!0,style:{display:\"inline-block\",padding:\"5px\",\"min-height\":\"50px\",\"min-width\":\"50px\"}}});var c='\\n \\n \\n \\n
\\n \"Image\"/\\n \\n \\n \\n \\n
\\n

Title here

\\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt

\\n
\\n
';a.add(\"grid-items\",{label:t.gridItemsBlkLabel,category:t.categoryLabel,content:'\\n \\n \\n \\n \\n
'+c+''+c+\"
\",attributes:{class:\"fa fa-th\"}});var l='\\n \\n \\n \\n
\\n \\n \\n \\n \\n \\n
\\n \"Image\"/\\n \\n

Title here

\\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt

\\n
\\n
';a.add(\"list-items\",{label:t.listItemsBlkLabel,category:t.categoryLabel,content:l+l,attributes:{class:\"fa fa-th-list\"}})}}.call(e,r,e,t))&&(t.exports=n)},function(t,e,r){\"use strict\";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i;void 0!==(i=function(){var t=function(t){t.each(function(t){var e=t.get(\"attributes\");e[\"data-tooltip-pos\"]=\"bottom\",t.set(\"attributes\",e)})};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.editor,i=r.Panels,o=i.getPanel(\"options\");if(i.addButton(\"options\",{id:e.cmdOpenImport,className:\"fa fa-download\",command:e.cmdOpenImport,attributes:n({},\"title\",e.modalTitleImport)}),i.addButton(\"options\",{id:e.cmdTglImages,className:\"fa fa-warning\",command:e.cmdTglImages,attributes:n({},\"title\",e.cmtTglImagesLabel)}),o){var a=o.get(\"buttons\");a.each(function(t){var e=t.get(\"attributes\");e[\"data-tooltip-pos\"]=\"bottom\",t.set(\"attributes\",e)});var s=i.addButton(\"options\",\"preview\");s&&a.remove(s)}var u=i.getPanel(\"commands\");if(u){var c=u.get(\"buttons\");c.reset(),c.add([{id:\"undo\",className:\"fa fa-undo\",command:\"undo\",attributes:n({},\"title\",e.cmdBtnUndoLabel)},{id:\"redo\",className:\"fa fa-repeat\",command:\"redo\",attributes:n({},\"title\",e.cmdBtnRedoLabel)}]),t(c)}r.getConfig().showDevices=0;var l=i.addPanel({id:\"devices-c\"}),f=l.get(\"buttons\");l.get(\"buttons\").add([{id:\"deviceDesktop\",command:\"set-device-desktop\",className:\"fa fa-desktop\",attributes:n({},\"title\",e.cmdBtnDesktopLabel),active:1},{id:\"deviceTablet\",command:\"set-device-tablet\",className:\"fa fa-tablet\",attributes:n({},\"title\",e.cmdBtnTabletLabel)},{id:\"deviceMobile\",command:\"set-device-mobile\",className:\"fa fa-mobile\",attributes:n({},\"title\",e.cmdBtnMobileLabel)}]),t(f)}}.call(e,r,e,t))&&(t.exports=i)},function(t,e,r){\"use strict\";var n;void 0!==(n=function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.editor,r=e.StyleManager.getSectors();e.on(\"load\",function(){r.reset(),r.add(t.styleManagerSectors)})}}.call(e,r,e,t))&&(t.exports=n)}])});","/*! grapesjs-preset-webpage - 0.1.11 */\n!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t(require(\"grapesjs\")):\"function\"==typeof define&&define.amd?define([\"grapesjs\"],t):\"object\"==typeof exports?exports[\"grapesjs-preset-webpage\"]=t(require(\"grapesjs\")):e[\"grapesjs-preset-webpage\"]=t(e.grapesjs)}(\"undefined\"!=typeof self?self:this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=4)}([function(t,n){t.exports=e},function(e,t,n){(function(e){function r(e,t){this._id=e,this._clearFn=t}var i=Function.prototype.apply;t.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(10),t.setImmediate=\"undefined\"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate=\"undefined\"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n(2))},function(e,t){var n;n=function(){return this}();try{n=n||Function(\"return this\")()||(0,eval)(\"this\")}catch(e){\"object\"==typeof window&&(n=window)}e.exports=n},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});t.cmdImport=\"gjs-open-import-webpage\",t.cmdDeviceDesktop=\"set-device-desktop\",t.cmdDeviceTablet=\"set-device-tablet\",t.cmdDeviceMobile=\"set-device-mobile\",t.cmdClear=\"canvas-clear\"},function(e,t,n){\"use strict\";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0),a=r(i),o=n(5),s=r(o),l=n(6),u=r(l),c=n(7),f=r(c),h=n(8),d=r(h),p=n(9),m=r(p),g=n(12),v=r(g),b=n(13),y=r(b),w=n(14),_=r(w),k=n(16),x=r(k),S=n(17),E=r(S),T=n(18),C=r(T),A=n(19),O=r(A);t.default=a.default.plugins.add(\"gjs-preset-webpage\",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r={blocks:[\"link-block\",\"quote\",\"text-basic\"],modalImportTitle:\"Import\",modalImportButton:\"Import\",modalImportLabel:\"\",modalImportContent:\"\",importViewerOptions:{},textCleanCanvas:\"Are you sure to clean the canvas?\",showStylesOnChange:1,textGeneral:\"General\",textLayout:\"Layout\",textTypography:\"Typography\",textDecorations:\"Decorations\",textExtra:\"Extra\",customStyleManager:[],blocksBasicOpts:{},navbarOpts:{},countdownOpts:{},formsOpts:{},exportOpts:{},aviaryOpts:0,filestackOpts:0};for(var i in r)i in n||(n[i]=r[i]);var a=n.blocksBasicOpts,o=n.navbarOpts,l=n.countdownOpts,c=n.formsOpts,h=n.exportOpts,p=n.aviaryOpts,g=n.filestackOpts;a&&(0,s.default)(e,a),o&&(0,u.default)(e,o),l&&(0,f.default)(e,l),c&&(0,d.default)(e,c),h&&(0,m.default)(e,h),p&&(0,v.default)(e,p),g&&(0,y.default)(e,g),(0,E.default)(e,n),(0,x.default)(e,n),(0,_.default)(e,n),(0,C.default)(e,n),(0,O.default)(e,n)})},function(e,t,n){/*! grapesjs-blocks-basic - 0.1.7 */\n!function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=0)}([function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},i=r({blocks:[\"column1\",\"column2\",\"column3\",\"column3-7\",\"text\",\"link\",\"image\",\"video\",\"map\"],flexGrid:0,stylePrefix:\"\",addBasicStyle:!0,category:\"Basic\",labelColumn1:\"1 Column\",labelColumn2:\"2 Columns\",labelColumn3:\"3 Columns\",labelColumn37:\"2 Columns 3/7\",labelText:\"Text\",labelLink:\"Link\",labelImage:\"Image\",labelVideo:\"Video\",labelMap:\"Map\"},t);n(2).default(e,i)})},function(t,n){t.exports=e},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.BlockManager,a=n.blocks,o=n.stylePrefix,s=n.flexGrid,l=n.addBasicStyle,u=o+\"row\",c=o+\"cell\",f=s?\"\\n .\"+u+\" {\\n display: flex;\\n justify-content: flex-start;\\n align-items: stretch;\\n flex-wrap: nowrap;\\n padding: 10px;\\n }\\n @media (max-width: 768px) {\\n .\"+u+\" {\\n flex-wrap: wrap;\\n }\\n }\":\"\\n .\"+u+\" {\\n display: table;\\n padding: 10px;\\n width: 100%;\\n }\\n @media (max-width: 768px) {\\n .\"+o+\"cell, .\"+o+\"cell30, .\"+o+\"cell70 {\\n width: 100%;\\n display: block;\\n }\\n }\",h=s?\"\\n .\"+c+\" {\\n min-height: 75px;\\n flex-grow: 1;\\n flex-basis: 100%;\\n }\":\"\\n .\"+c+\" {\\n width: 8%;\\n display: table-cell;\\n height: 75px;\\n }\",d=\"\\n .\"+o+\"cell30 {\\n width: 30%;\\n }\",p=\"\\n .\"+o+\"cell70 {\\n width: 70%;\\n }\",m={tl:0,tc:0,tr:0,cl:0,cr:0,bl:0,br:0,minDim:1},g=r({},m,{cr:1,bc:0,currentUnit:1,minDim:1,step:.2});s&&(g.keyWidth=\"flex-basis\");var v={class:u,\"data-gjs-droppable\":\".\"+c,\"data-gjs-resizable\":m,\"data-gjs-name\":\"Row\"},b={class:c,\"data-gjs-draggable\":\".\"+u,\"data-gjs-resizable\":g,\"data-gjs-name\":\"Cell\"};s&&(b[\"data-gjs-unstylable\"]=[\"width\"],b[\"data-gjs-stylable-require\"]=[\"flex-basis\"]);var y=[\".\"+u,\".\"+c];e.on(\"selector:add\",function(e){return y.indexOf(e.getFullName())>=0&&e.set(\"private\",1)});var w=function(e){var t=[];for(var n in e){var r=e[n],i=r instanceof Array||r instanceof Object;r=i?JSON.stringify(r):r,t.push(n+\"=\"+(i?\"'\"+r+\"'\":'\"'+r+'\"'))}return t.length?\" \"+t.join(\" \"):\"\"},_=function(e){return a.indexOf(e)>=0},k=w(v),x=w(b);_(\"column1\")&&i.add(\"column1\",{label:n.labelColumn1,category:n.category,attributes:{class:\"gjs-fonts gjs-f-b1\"},content:\"
\\n
\\n
\\n \"+(l?\"\":\"\")}),_(\"column2\")&&i.add(\"column2\",{label:n.labelColumn2,attributes:{class:\"gjs-fonts gjs-f-b2\"},category:n.category,content:\"
\\n
\\n
\\n
\\n \"+(l?\"\":\"\")}),_(\"column3\")&&i.add(\"column3\",{label:n.labelColumn3,category:n.category,attributes:{class:\"gjs-fonts gjs-f-b3\"},content:\"
\\n
\\n
\\n
\\n
\\n \"+(l?\"\":\"\")}),_(\"column3-7\")&&i.add(\"column3-7\",{label:n.labelColumn37,category:n.category,attributes:{class:\"gjs-fonts gjs-f-b37\"},content:\"
\\n
\\n
\\n
\\n '+(l?\"\":\"\")}),_(\"text\")&&i.add(\"text\",{label:n.labelText,category:n.category,attributes:{class:\"gjs-fonts gjs-f-text\"},content:{type:\"text\",content:\"Insert your text here\",style:{padding:\"10px\"},activeOnRender:1}}),_(\"link\")&&i.add(\"link\",{label:n.labelLink,category:n.category,attributes:{class:\"fa fa-link\"},content:{type:\"link\",content:\"Link\",style:{color:\"#d983a6\"}}}),_(\"image\")&&i.add(\"image\",{label:n.labelImage,category:n.category,attributes:{class:\"gjs-fonts gjs-f-image\"},content:{style:{color:\"black\"},type:\"image\",activeOnRender:1}}),_(\"video\")&&i.add(\"video\",{label:n.labelVideo,category:n.category,attributes:{class:\"fa fa-youtube-play\"},content:{type:\"video\",src:\"img/video2.webm\",style:{height:\"350px\",width:\"615px\"}}}),_(\"map\")&&i.add(\"map\",{label:n.labelMap,category:n.category,attributes:{class:\"fa fa-map-o\"},content:{type:\"map\",style:{height:\"350px\"}}})}}])})},function(e,t,n){/*! grapesjs-navbar - 0.1.5 */\n!function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=1)}([function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.hNavbarRef=\"h-navbar\",t.navbarRef=\"navbar\",t.navbarItemsRef=\"navbar-items\",t.menuRef=\"navbar-menu\"},function(e,t,n){\"use strict\";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(2),a=r(i),o=n(3),s=r(o),l=n(4),u=r(l),c=n(0);t.default=a.default.plugins.add(\"gjs-navbar\",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r={blocks:[c.hNavbarRef],defaultStyle:1,navbarClsPfx:\"navbar\",labelNavbar:\"Navbar\",labelNavbarContainer:\"Navbar Container\",labelMenu:\"Navbar Menu\",labelMenuLink:\"Menu link\",labelBurger:\"Burger\",labelBurgerLine:\"Burger Line\",labelNavbarBlock:\"Navbar\",labelNavbarCategory:\"Extra\",labelHome:\"Home\",labelAbout:\"About\",labelContact:\"Contact\"};for(var i in r)i in n||(n[i]=r[i]);(0,s.default)(e,n),(0,u.default)(e,n)})},function(t,n){t.exports=e},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(0);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.BlockManager,a=n.navbarClsPfx||\"navbar\",o=n.defaultStyle?\"\\n \\n \":\"\";n.blocks.indexOf(r.hNavbarRef)>=0&&i.add(r.hNavbarRef,{label:'\\n \\n \\n \\n \\n \\n \\n
'+n.labelNavbarBlock+\"
\",category:n.labelNavbarCategory,content:'\\n
\\n
\\n\\n \\n\\n
\\n
\\n
\\n
\\n
\\n\\n \\n\\n
\\n
\\n \"+o+\"\\n \"})}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.DomComponents,a=i.getType(\"default\"),o=a.model;i.addType(\"burger-menu\",{model:o.extend({defaults:r({},o.prototype.defaults,{\"custom-name\":n.labelBurger,draggable:!1,droppable:!1,copyable:!1,removable:!1,script:function(){var e,t=0,n=function(){var e,t=document.createElement(\"void\"),n={transition:\"transitionend\",OTransition:\"oTransitionEnd\",MozTransition:\"transitionend\",WebkitTransition:\"webkitTransitionEnd\"};for(e in n)if(void 0!==t.style[e])return n[e]}(),r=function(e){var t=window.getComputedStyle(e),n=t.display,r=(t.position,t.visibility,t.height,parseInt(t[\"max-height\"]));if(\"none\"!==n&&\"0\"!==r)return e.offsetHeight;e.style.height=\"auto\",e.style.display=\"block\",e.style.position=\"absolute\",e.style.visibility=\"hidden\";var i=e.offsetHeight;return e.style.height=\"\",e.style.display=\"\",e.style.position=\"\",e.style.visibility=\"\",i},i=function(e){t=1;var n=r(e),i=e.style;i.display=\"block\",i.transition=\"max-height 0.25s ease-in-out\",i.overflowY=\"hidden\",\"\"==i[\"max-height\"]&&(i[\"max-height\"]=0),0==parseInt(i[\"max-height\"])?(i[\"max-height\"]=\"0\",setTimeout(function(){i[\"max-height\"]=n+\"px\"},10)):i[\"max-height\"]=\"0\"},a=function(r){if(r.preventDefault(),!t){var a=this.closest(\"[data-gjs=navbar]\"),o=a.querySelector(\"[data-gjs=navbar-items]\");i(o),e||(o.addEventListener(n,function(){t=0;var e=o.style;0==parseInt(e[\"max-height\"])&&(e.display=\"\",e[\"max-height\"]=\"\")}),e=1)}};\"gjs-collapse\"in this||this.addEventListener(\"click\",a),this[\"gjs-collapse\"]=1}})},{isComponent:function(e){if(e.getAttribute&&\"burger-menu\"==e.getAttribute(\"data-gjs-type\"))return{type:\"burger-menu\"}}}),view:a.view})}}])})},function(e,t,n){/*! grapesjs-component-countdown - 0.1.2 */\n!function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=1)}([function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.countdownRef=\"countdown\"},function(e,t,n){\"use strict\";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(2),a=r(i),o=n(3),s=r(o),l=n(4),u=r(l),c=n(0);t.default=a.default.plugins.add(\"gjs-component-countdown\",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r={blocks:[c.countdownRef],defaultStyle:!0,startTime:\"\",endText:\"EXPIRED\",dateInputType:\"date\",countdownClsPfx:\"countdown\",labelCountdown:\"Countdown\",labelCountdownCategory:\"Extra\",labelDays:\"days\",labelHours:\"hours\",labelMinutes:\"minutes\",labelSeconds:\"seconds\"};for(var i in r)i in n||(n[i]=r[i]);(0,s.default)(e,n),(0,u.default)(e,n)})},function(t,n){t.exports=e},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.DomComponents,a=i.getType(\"default\"),o=i.getType(\"text\"),s=a.model,l=a.view,u=(o.model,o.view,n.countdownClsPfx);i.addType(\"countdown\",{model:s.extend({defaults:r({},s.prototype.defaults,{startfrom:n.startTime,endText:n.endText,droppable:!1,traits:[{label:\"Start\",name:\"startfrom\",changeProp:1,type:n.dateInputType},{label:\"End text\",name:\"endText\",changeProp:1}],script:function(){var e=new Date(\"{[ startfrom ]}\").getTime(),t=this.querySelector(\"[data-js=countdown]\"),n=this.querySelector(\"[data-js=countdown-endtext]\"),r=this.querySelector(\"[data-js=countdown-day]\"),i=this.querySelector(\"[data-js=countdown-hour]\"),a=this.querySelector(\"[data-js=countdown-minute]\"),o=this.querySelector(\"[data-js=countdown-second]\"),s=this.gjs_countdown_interval;s&&s&&clearInterval(s);var l=function(e,t,n,s){r.innerHTML=e<10?\"0\"+e:e,i.innerHTML=t<10?\"0\"+t:t,a.innerHTML=n<10?\"0\"+n:n,o.innerHTML=s<10?\"0\"+s:s},u=function(){var r=(new Date).getTime(),i=e-r,a=Math.floor(i/864e5),o=Math.floor(i%864e5/36e5),s=Math.floor(i%36e4/6e4),u=Math.floor(i%6e4/1e3);l(a,o,s,u),i<0&&(clearInterval(c),n.innerHTML=\"{[ endText ]}\",t.style.display=\"none\",n.style.display=\"\")};if(e){var c=setInterval(u,1e3);this.gjs_countdown_interval=c,n.style.display=\"none\",t.style.display=\"\",u()}else l(0,0,0,0)}})},{isComponent:function(e){if(e.getAttribute&&\"countdown\"==e.getAttribute(\"data-gjs-type\"))return{type:\"countdown\"}}}),view:l.extend({init:function(){this.listenTo(this.model,\"change:startfrom change:endText\",this.updateScript);var e=this.model.get(\"components\");e.length||(e.reset(),e.add('\\n \\n
\\n
\\n
'+n.labelDays+'
\\n
\\n
\\n
\\n
'+n.labelHours+'
\\n
\\n
\\n
\\n
'+n.labelMinutes+'
\\n
\\n
\\n
\\n
'+n.labelSeconds+'
\\n
\\n
\\n \\n '))}})})}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.BlockManager,a=n.countdownClsPfx,o=n.defaultStyle?\"\":\"\";n.blocks.indexOf(r.countdownRef)>=0&&i.add(r.countdownRef,{label:n.labelCountdown,category:n.labelCountdownCategory,attributes:{class:\"fa fa-clock-o\"},content:'\\n
\\n '+o+\"\\n \"})};var r=n(0)}])})},function(e,t,n){/*! grapesjs-plugin-forms - 0.3.5 */\n!function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=0)}([function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=i.default.plugins.add(\"gjs-plugin-forms\",function(e,t){var r=t||{},i=e.getConfig(),a=(i.stylePrefix,{blocks:[\"form\",\"input\",\"textarea\",\"select\",\"button\",\"label\",\"checkbox\",\"radio\"],labelTraitMethod:\"Method\",labelTraitAction:\"Action\",labelTraitState:\"State\",labelTraitId:\"ID\",labelTraitFor:\"For\",labelInputName:\"Input\",labelTextareaName:\"Textarea\",labelSelectName:\"Select\",labelCheckboxName:\"Checkbox\",labelRadioName:\"Radio\",labelButtonName:\"Button\",labelTraitName:\"Name\",labelTraitPlaceholder:\"Placeholder\",labelTraitValue:\"Value\",labelTraitRequired:\"Required\",labelTraitType:\"Type\",labelTraitOptions:\"Options\",labelTraitChecked:\"Checked\",labelTypeText:\"Text\",labelTypeEmail:\"Email\",labelTypePassword:\"Password\",labelTypeNumber:\"Number\",labelTypeSubmit:\"Submit\",labelTypeReset:\"Reset\",labelTypeButton:\"Button\",labelNameLabel:\"Label\",labelForm:\"Form\",labelSelectOption:\"- Select option -\",labelOption:\"Option\",labelStateNormal:\"Normal\",labelStateSuccess:\"Success\",labelStateError:\"Error\"});for(var o in a)o in r||(r[o]=a[o]);n(2).default(e,r),n(3).default(e,r),n(4).default(e,r)})},function(t,n){t.exports=e},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.DomComponents,a=i.getType(\"default\"),o=i.getType(\"text\"),s=a.model,l=a.view,u=o.model,c=o.view,f={name:\"id\",label:n.labelTraitId},h={name:\"for\",label:n.labelTraitFor},d={name:\"name\",label:n.labelTraitName},p={name:\"placeholder\",label:n.labelTraitPlaceholder},m={name:\"value\",label:n.labelTraitValue},g={type:\"checkbox\",name:\"required\",label:n.labelTraitRequired},v={label:n.labelTraitChecked,type:\"checkbox\",name:\"checked\",changeProp:1};i.addType(\"form\",{model:s.extend({defaults:r({},s.prototype.defaults,{droppable:\":not(form)\",draggable:\":not(form)\",traits:[{type:\"select\",label:n.labelTraitMethod,name:\"method\",options:[{value:\"post\",name:\"POST\"},{value:\"get\",name:\"GET\"}]},{label:n.labelTraitAction,name:\"action\"}]}),init:function(){this.listenTo(this,\"change:formState\",this.updateFormState)},updateFormState:function(){switch(this.get(\"formState\")){case\"success\":this.showState(\"success\");break;case\"error\":this.showState(\"error\");break;default:this.showState(\"normal\")}},showState:function(e){var t,n,r=e||\"normal\";\"success\"==r?(t=\"none\",n=\"block\"):\"error\"==r?(t=\"block\",n=\"none\"):(t=\"none\",n=\"none\");var i=this.getStateModel(\"success\"),a=this.getStateModel(\"error\"),o=i.getStyle(),s=a.getStyle();o.display=n,s.display=t,i.setStyle(o),a.setStyle(s)},getStateModel:function(e){for(var t,n=e||\"success\",r=this.get(\"components\"),i=0;i1&&void 0!==arguments[1]&&arguments[1],e.TraitManager),n=t.getType(\"text\");t.addType(\"content\",{events:{keyup:\"onChange\"},onValueChange:function(){var e=this.model;e.target.set(\"content\",e.get(\"value\"))},getInputEl:function(){return this.inputEl||(this.inputEl=n.prototype.getInputEl.bind(this)(),this.inputEl.value=this.target.get(\"content\")),this.inputEl}}),t.addType(\"select-options\",{events:{keyup:\"onChange\"},onValueChange:function(){for(var e=this.model.get(\"value\").trim(),t=e.split(\"\\n\"),n=[],r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=t,r=e.BlockManager;n.blocks.indexOf(\"form\")>=0&&r.add(\"form\",{label:'\\n \\n \\n \\n \\n \\n
'+n.labelForm+\"
\",category:\"Forms\",content:'\\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n \\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n \\n
\\n
\\n '}),n.blocks.indexOf(\"input\")>=0&&r.add(\"input\",{label:'\\n \\n \\n \\n \\n
'+n.labelInputName+\"
\",category:\"Forms\",content:''}),n.blocks.indexOf(\"textarea\")>=0&&r.add(\"textarea\",{label:'\\n \\n \\n \\n \\n \\n \\n \\n
'+n.labelTextareaName+\"
\",category:\"Forms\",content:''}),n.blocks.indexOf(\"select\")>=0&&r.add(\"select\",{label:'\\n \\n \\n \\n \\n \\n
'+n.labelSelectName+\"
\",category:\"Forms\",content:'\"}),n.blocks.indexOf(\"button\")>=0&&r.add(\"button\",{label:'\\n \\n \\n \\n \\n
'+n.labelButtonName+\"
\",category:\"Forms\",content:''}),n.blocks.indexOf(\"label\")>=0&&r.add(\"label\",{label:'\\n \\n \\n \\n \\n \\n
'+n.labelNameLabel+\"
\",category:\"Forms\",content:''}),n.blocks.indexOf(\"checkbox\")>=0&&r.add(\"checkbox\",{label:n.labelCheckboxName,attributes:{class:\"fa fa-check-square\"},category:\"Forms\",content:''}),n.blocks.indexOf(\"radio\")>=0&&r.add(\"radio\",{label:n.labelRadioName,attributes:{class:\"fa fa-dot-circle-o\"},category:\"Forms\",content:''})}}])})},function(e,t,n){(function(t,r){/*! grapesjs-plugin-export - 0.1.5 */\n!function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=50)}([function(e,t,n){\"use strict\";function r(e){var t=null;return t=l.uint8array?new Uint8Array(e.length):new Array(e.length),a(e,t)}function i(e){return e}function a(e,t){for(var n=0;n1;)try{return d.stringifyByChunk(e,r,n)}catch(e){n=Math.floor(n/2)}return d.stringifyByChar(e)}function s(e,t){for(var n=0;n \"+e:e}},e.exports=r},function(e,t,n){\"use strict\";(function(e){function r(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(r()=r())throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+r().toString(16)+\" bytes\");return 0|e}function m(e){return+e!=e&&(e=0),a.alloc(+e)}function g(e,t){if(a.isBuffer(e))return e.length;if(\"undefined\"!=typeof ArrayBuffer&&\"function\"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;\"string\"!=typeof e&&(e=\"\"+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return n;case\"utf8\":case\"utf-8\":case void 0:return Y(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*n;case\"hex\":return n>>>1;case\"base64\":return V(e).length;default:if(r)return Y(e).length;t=(\"\"+t).toLowerCase(),r=!0}}function v(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return\"\";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return\"\";if(n>>>=0,t>>>=0,n<=t)return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return L(this,t,n);case\"utf8\":case\"utf-8\":return A(this,t,n);case\"ascii\":return I(this,t,n);case\"latin1\":case\"binary\":return R(this,t,n);case\"base64\":return C(this,t,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return j(this,t,n);default:if(r)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),r=!0}}function b(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if(\"string\"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if(\"string\"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,i);if(\"number\"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw new TypeError(\"val must be string, number or Buffer\")}function w(e,t,n,r,i){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,l=t.length;if(void 0!==r&&(\"ucs2\"===(r=String(r).toLowerCase())||\"ucs-2\"===r||\"utf16le\"===r||\"utf-16le\"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}var u;if(i){var c=-1;for(u=n;us&&(n=s-l),u=n;u>=0;u--){for(var f=!0,h=0;hi&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError(\"Invalid hex string\");r>a/2&&(r=a/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(i+s<=n){var l,u,c,f;switch(s){case 1:a<128&&(o=a);break;case 2:128==(192&(l=e[i+1]))&&(f=(31&a)<<6|63&l)>127&&(o=f);break;case 3:l=e[i+1],u=e[i+2],128==(192&l)&&128==(192&u)&&(f=(15&a)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&(f=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return O(r)}function O(e){var t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);for(var n=\"\",r=0;rr)&&(n=r);for(var i=\"\",a=t;an)throw new RangeError(\"Trying to access beyond buffer length\")}function M(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError(\"Index out of range\")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function z(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError(\"Index out of range\");if(n<0)throw new RangeError(\"Index out of range\")}function D(e,t,n,r,i){return i||z(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,i){return i||z(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(e,t,n,r,52,8),n+8}function U(e){if(e=Z(e).replace(ee,\"\"),e.length<2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}function Z(e){return e.trim?e.trim():e.replace(/^\\s+|\\s+$/g,\"\")}function W(e){return e<16?\"0\"+e.toString(16):e.toString(16)}function Y(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error(\"Invalid code point\");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function q(e){for(var t=[],n=0;n>8,i=n%256,a.push(i),a.push(r);return a}function V(e){return G.toByteArray(U(e))}function K(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function X(e){return e!==e}/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\nvar G=n(54),J=n(55),$=n(24);t.Buffer=a,t.SlowBuffer=m,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&\"function\"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return o(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,\"undefined\"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return l(null,e,t,n)},a.allocUnsafe=function(e){return u(null,e)},a.allocUnsafeSlow=function(e){return u(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError(\"Arguments must be Buffers\");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i0&&(e=this.toString(\"hex\",0,n).match(/.{2}/g).join(\" \"),this.length>n&&(e+=\" ... \")),\"\"},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError(\"out of range index\");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,l=Math.min(o,s),u=this.slice(r,i),c=e.slice(t,n),f=0;fi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");r||(r=\"utf8\");for(var a=!1;;)switch(r){case\"hex\":return _(this,e,t,n);case\"utf8\":case\"utf-8\":return k(this,e,t,n);case\"ascii\":return x(this,e,t,n);case\"latin1\":case\"binary\":return S(this,e,t,n);case\"base64\":return E(this,e,t,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return T(this,e,t,n);default:if(a)throw new TypeError(\"Unknown encoding: \"+r);r=(\"\"+r).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||B(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||B(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||B(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var r=this[e],i=1,a=0;++a=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||B(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||B(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||B(e,4,this.length),J.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||B(e,4,this.length),J.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||B(e,8,this.length),J.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||B(e,8,this.length),J.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError(\"sourceStart out of bounds\");if(r<0)throw new RangeError(\"sourceEnd out of bounds\");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if(\"number\"==typeof e)for(o=t;o=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;u[254]=u[254]=1;var f=function(e){var t,n,r,i,a,s=e.length,l=0;for(i=0;i>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},h=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0?t:0===n?t:n+u[e[n]]>t?n:t},d=function(e){var t,n,r,i,o=e.length,s=new Array(2*o);for(n=0,t=0;t4)s[n++]=65533,t+=i-1;else{for(r&=2===i?31:3===i?15:7;i>1&&t1?s[n++]=65533:r<65536?s[n++]=r:(r-=65536,s[n++]=55296|r>>10&1023,s[n++]=56320|1023&r)}return s.length!==n&&(s.subarray?s=s.subarray(0,n):s.length=n),a.applyFromCharCode(s)};t.utf8encode=function(e){return o.nodebuffer?s.newBufferFrom(e,\"utf-8\"):f(e)},t.utf8decode=function(e){return o.nodebuffer?a.transformTo(\"nodebuffer\",e).toString(\"utf-8\"):(e=a.transformTo(o.uint8array?\"uint8array\":\"array\",e),d(e))},a.inherits(r,l),r.prototype.processChunk=function(e){var n=a.transformTo(o.uint8array?\"uint8array\":\"array\",e.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var r=n;n=new Uint8Array(r.length+this.leftOver.length),n.set(this.leftOver,0),n.set(r,this.leftOver.length)}else n=this.leftOver.concat(n);this.leftOver=null}var i=h(n),s=n;i!==n.length&&(o.uint8array?(s=n.subarray(0,i),this.leftOver=n.subarray(i,n.length)):(s=n.slice(0,i),this.leftOver=n.slice(i,n.length))),this.push({data:t.utf8decode(s),meta:e.meta})},r.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=r,a.inherits(i,l),i.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=i},function(e,t){\"function\"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(e){function n(e){return Array.isArray?Array.isArray(e):\"[object Array]\"===g(e)}function r(e){return\"boolean\"==typeof e}function i(e){return null===e}function a(e){return null==e}function o(e){return\"number\"==typeof e}function s(e){return\"string\"==typeof e}function l(e){return\"symbol\"==typeof e}function u(e){return void 0===e}function c(e){return\"[object RegExp]\"===g(e)}function f(e){return\"object\"==typeof e&&null!==e}function h(e){return\"[object Date]\"===g(e)}function d(e){return\"[object Error]\"===g(e)||e instanceof Error}function p(e){return\"function\"==typeof e}function m(e){return null===e||\"boolean\"==typeof e||\"number\"==typeof e||\"string\"==typeof e||\"symbol\"==typeof e||void 0===e}function g(e){return Object.prototype.toString.call(e)}t.isArray=n,t.isBoolean=r,t.isNull=i,t.isNullOrUndefined=a,t.isNumber=o,t.isString=s,t.isSymbol=l,t.isUndefined=u,t.isRegExp=c,t.isObject=f,t.isDate=h,t.isError=d,t.isFunction=p,t.isPrimitive=m,t.isBuffer=e.isBuffer}).call(t,n(2).Buffer)},function(e,t,n){\"use strict\";var r=null;r=\"undefined\"!=typeof Promise?Promise:n(80),e.exports={Promise:r}},function(e,t){var n;n=function(){return this}();try{n=n||Function(\"return this\")()||(0,eval)(\"this\")}catch(e){\"object\"==typeof window&&(n=window)}e.exports=n},function(e,t,n){function r(){i.call(this)}e.exports=r;var i=n(12).EventEmitter;n(7)(r,i),r.Readable=n(56),r.Writable=n(62),r.Duplex=n(63),r.Transform=n(64),r.PassThrough=n(65),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&u.pause&&u.pause()}function r(){u.readable&&u.resume&&u.resume()}function a(){c||(c=!0,e.end())}function o(){c||(c=!0,\"function\"==typeof e.destroy&&e.destroy())}function s(e){if(l(),0===i.listenerCount(this,\"error\"))throw e}function l(){u.removeListener(\"data\",n),e.removeListener(\"drain\",r),u.removeListener(\"end\",a),u.removeListener(\"close\",o),u.removeListener(\"error\",s),e.removeListener(\"error\",s),u.removeListener(\"end\",l),u.removeListener(\"close\",l),e.removeListener(\"close\",l)}var u=this;u.on(\"data\",n),e.on(\"drain\",r),e._isStdio||t&&!1===t.end||(u.on(\"end\",a),u.on(\"close\",o));var c=!1;return u.on(\"error\",s),e.on(\"error\",s),u.on(\"end\",l),u.on(\"close\",l),e.on(\"close\",l),e.emit(\"pipe\",u),e}},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return\"function\"==typeof e}function i(e){return\"number\"==typeof e}function a(e){return\"object\"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError(\"n must be a positive number\");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,l,u;if(this._events||(this._events={}),\"error\"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified \"error\" event. ('+t+\")\");throw c.context=t,c}if(n=this._events[e],o(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),u=n.slice(),i=u.length,l=0;l0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error(\"(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.\",this._events[e].length),\"function\"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError(\"listener must be a function\");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,o,s;if(!r(t))throw TypeError(\"listener must be a function\");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit(\"removeListener\",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit(\"removeListener\",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)\"removeListener\"!==t&&this.removeAllListeners(t);return this.removeAllListeners(\"removeListener\"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t){function n(){throw new Error(\"setTimeout has not been defined\")}function r(){throw new Error(\"clearTimeout has not been defined\")}function i(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function a(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function o(){m&&d&&(m=!1,d.length?p=d.concat(p):g=-1,p.length&&s())}function s(){if(!m){var e=i(o);m=!0;for(var t=p.length;t;){for(d=p,p=[];++g1)for(var n=1;n-1?r:S,T=n(2).Buffer;s.WritableState=o;var C=n(8);C.inherits=n(7);var A,O={deprecate:n(60)};!function(){try{A=n(11)}catch(e){}finally{A||(A=n(12).EventEmitter)}}();var T=n(2).Buffer;C.inherits(s,A);var I;o.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(o.prototype,\"buffer\",{get:O.deprecate(function(){return this.getBuffer()},\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\")})}catch(e){}}();var I;s.prototype.pipe=function(){this.emit(\"error\",new Error(\"Cannot pipe. Not readable.\"))},s.prototype.write=function(e,t,n){var r=this._writableState,a=!1;return\"function\"==typeof t&&(n=t,t=null),T.isBuffer(e)?t=\"buffer\":t||(t=r.defaultEncoding),\"function\"!=typeof n&&(n=i),r.ended?l(this,n):u(this,r,e,n)&&(r.pendingcb++,a=f(this,r,e,t,n)),a},s.prototype.cork=function(){this._writableState.corked++},s.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||b(this,e))},s.prototype.setDefaultEncoding=function(e){if(\"string\"==typeof e&&(e=e.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((e+\"\").toLowerCase())>-1))throw new TypeError(\"Unknown encoding: \"+e);this._writableState.defaultEncoding=e},s.prototype._write=function(e,t,n){n(new Error(\"not implemented\"))},s.prototype._writev=null,s.prototype.end=function(e,t,n){var r=this._writableState;\"function\"==typeof e?(n=e,e=null,t=null):\"function\"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||k(this,r,n)}}).call(t,n(13),n(58).setImmediate)},function(e,t,n){\"use strict\";function r(e){this.afterTransform=function(t,n){return i(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit(\"error\",new Error(\"no writecb in Transform class\"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),i(t);var a=e._readableState;a.reading=!1,(a.needReadable||a.length>>8^i[255&(e^t[s])];return-1^e}function i(e,t,n,r){var i=o,a=r+n;e^=-1;for(var s=r;s>>8^i[255&(e^t.charCodeAt(s))];return-1^e}var a=n(0),o=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,t){return void 0!==e&&e.length?\"string\"!==a.getTypeOf(e)?r(0|t,e,e.length,0):i(0|t,e,e.length,0):0}},function(e,t,n){\"use strict\";e.exports={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return\"[object Array]\"==n.call(e)}},function(e,t,n){e.exports=n(11)},function(e,t,n){\"use strict\";(function(t){function r(e,t){B=B||n(5),e=e||{},this.objectMode=!!e.objectMode,t instanceof B&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||\"utf8\",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(j||(j=n(27).StringDecoder),this.decoder=new j(e.encoding),this.encoding=e.encoding)}function i(e){if(B=B||n(5),!(this instanceof i))return new i(e);this._readableState=new r(e,this),this.readable=!0,e&&\"function\"==typeof e.read&&(this._read=e.read),A.call(this)}function a(e,t,n,r,i){var a=u(t,n);if(a)e.emit(\"error\",a);else if(null===n)t.reading=!1,c(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var s=new Error(\"stream.push() after EOF\");e.emit(\"error\",s)}else if(t.endEmitted&&i){var s=new Error(\"stream.unshift() after end event\");e.emit(\"error\",s)}else{var l;!t.decoder||i||r||(n=t.decoder.write(n),l=!t.objectMode&&0===n.length),i||(t.reading=!1),l||(t.flowing&&0===t.length&&!t.sync?(e.emit(\"data\",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&f(e))),d(e,t)}else i||(t.reading=!1);return o(t)}function o(e){return!e.ended&&(e.needReadable||e.length=M?e=M:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function l(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function u(e,t){var n=null;return C.isBuffer(t)||\"string\"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError(\"Invalid non-string/buffer chunk\")),n}function c(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,f(e)}}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(L(\"emitReadable\",t.flowing),t.emittedReadable=!0,t.sync?E(h,e):h(e))}function h(e){L(\"emit readable\"),e.emit(\"readable\"),y(e)}function d(e,t){t.readingMore||(t.readingMore=!0,E(p,e,t))}function p(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=i)n=a?r.join(\"\"):1===r.length?r[0]:C.concat(r,i),r.length=0;else if(e0)throw new Error(\"endReadable called on non-empty stream\");t.endEmitted||(t.ended=!0,E(k,t,e))}function k(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit(\"end\"))}function x(e,t){for(var n=0,r=e.length;n0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return L(\"read: emitReadable\",t.length,t.ended),0===t.length&&t.ended?_(this):f(this),null;if(0===(e=l(e,t))&&t.ended)return 0===t.length&&_(this),null;var r=t.needReadable;L(\"need readable\",r),(0===t.length||t.length-e0?w(e,t):null,null===i&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),n!==e&&t.ended&&0===t.length&&_(this),null!==i&&this.emit(\"data\",i),i},i.prototype._read=function(e){this.emit(\"error\",new Error(\"not implemented\"))},i.prototype.pipe=function(e,n){function r(e){L(\"onunpipe\"),e===f&&a()}function i(){L(\"onend\"),e.end()}function a(){L(\"cleanup\"),e.removeListener(\"close\",l),e.removeListener(\"finish\",u),e.removeListener(\"drain\",g),e.removeListener(\"error\",s),e.removeListener(\"unpipe\",r),f.removeListener(\"end\",i),f.removeListener(\"end\",a),f.removeListener(\"data\",o),v=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||g()}function o(t){L(\"ondata\"),!1===e.write(t)&&(1!==h.pipesCount||h.pipes[0]!==e||1!==f.listenerCount(\"data\")||v||(L(\"false write response, pause\",f._readableState.awaitDrain),f._readableState.awaitDrain++),f.pause())}function s(t){L(\"onerror\",t),c(),e.removeListener(\"error\",s),0===O(e,\"error\")&&e.emit(\"error\",t)}function l(){e.removeListener(\"finish\",u),c()}function u(){L(\"onfinish\"),e.removeListener(\"close\",l),c()}function c(){L(\"unpipe\"),f.unpipe(e)}var f=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,L(\"pipe count=%d opts=%j\",h.pipesCount,n);var d=(!n||!1!==n.end)&&e!==t.stdout&&e!==t.stderr,p=d?i:a;h.endEmitted?E(p):f.once(\"end\",p),e.on(\"unpipe\",r);var g=m(f);e.on(\"drain\",g);var v=!1;return f.on(\"data\",o),e._events&&e._events.error?T(e._events.error)?e._events.error.unshift(s):e._events.error=[s,e._events.error]:e.on(\"error\",s),e.once(\"close\",l),e.once(\"finish\",u),e.emit(\"pipe\",f),h.flowing||(L(\"pipe resume\"),f.resume()),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(\"unpipe\",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i>5==6?2:e>>4==14?3:e>>3==30?4:-1}function s(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0)}function l(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,\"�\".repeat(n);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,\"�\".repeat(n+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,\"�\".repeat(n+2)}}function u(e){var t=this.lastTotal-this.lastNeed,n=l(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString(\"utf8\",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString(\"utf8\",t,r)}function f(e){var t=e&&e.length?this.write(e):\"\";return this.lastNeed?t+\"�\".repeat(this.lastTotal-this.lastNeed):t}function h(e,t){if((e.length-t)%2==0){var n=e.toString(\"utf16le\",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(\"utf16le\",t,e.length-1)}function d(e){var t=e&&e.length?this.write(e):\"\";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(\"utf16le\",0,n)}return t}function p(e,t){var n=(e.length-t)%3;return 0===n?e.toString(\"base64\",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(\"base64\",t,e.length-n))}function m(e){var t=e&&e.length?this.write(e):\"\";return this.lastNeed?t+this.lastChar.toString(\"base64\",0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):\"\"}var b=n(61).Buffer,y=b.isEncoding||function(e){switch((e=\"\"+e)&&e.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return\"\";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return\"\";n=this.lastNeed,this.lastNeed=0}else n=0;return n>2,s=(3&t)<<4|n>>4,l=d>1?(15&n)<<2|i>>6:64,u=d>2?63&i:64,c.push(a.charAt(o)+a.charAt(s)+a.charAt(l)+a.charAt(u));return c.join(\"\")},t.decode=function(e){var t,n,r,o,s,l,u,c=0,f=0;if(\"data:\"===e.substr(0,\"data:\".length))throw new Error(\"Invalid base64 input, it looks like a data url.\");e=e.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");var h=3*e.length/4;if(e.charAt(e.length-1)===a.charAt(64)&&h--,e.charAt(e.length-2)===a.charAt(64)&&h--,h%1!=0)throw new Error(\"Invalid base64 input, bad content length.\");var d;for(d=i.uint8array?new Uint8Array(0|h):new Array(0|h);c>4,n=(15&s)<<4|l>>2,r=(3&l)<<6|u,d[f++]=t,64!==l&&(d[f++]=n),64!==u&&(d[f++]=r);return d}},function(e,t){var n=e.exports={version:\"2.3.0\"};\"number\"==typeof __e&&(__e=n)},function(e,t,n){var r=n(69);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(19),i=n(15).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){\"use strict\";(function(t){function r(e,t,n){switch(e){case\"blob\":return s.newBlob(s.transformTo(\"arraybuffer\",t),n);case\"base64\":return c.encode(t);default:return s.transformTo(e,t)}}function i(e,n){var r,i=0,a=null,o=0;for(r=0;r=this.max)return this.end();switch(this.type){case\"string\":e=this.data.substring(this.index,t);break;case\"uint8array\":e=this.data.subarray(this.index,t);break;case\"array\":case\"nodebuffer\":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=r},function(e,t,n){\"use strict\";function r(e){a.call(this,\"DataLengthProbe for \"+e),this.propName=e,this.withStreamInfo(e,0)}var i=n(0),a=n(1);i.inherits(r,a),r.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}a.prototype.processChunk.call(this,e)},e.exports=r},function(e,t,n){\"use strict\";function r(){i.call(this,\"Crc32Probe\"),this.withStreamInfo(\"crc32\",0)}var i=n(1),a=n(22);n(0).inherits(r,i),r.prototype.processChunk=function(e){this.streamInfo.crc32=a(e.data,this.streamInfo.crc32||0),this.push(e)},e.exports=r},function(e,t,n){\"use strict\";var r=n(1);t.STORE={magic:\"\\0\\0\",compressWorker:function(e){return new r(\"STORE compression\")},uncompressWorker:function(){return new r(\"STORE decompression\")}},t.DEFLATE=n(86)},function(e,t,n){\"use strict\";function r(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==n;){o=n>2e3?2e3:n,n-=o;do{i=i+t[r++]|0,a=a+i|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}e.exports=r},function(e,t,n){\"use strict\";function r(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t[s])];return-1^e}var i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=r},function(e,t,n){\"use strict\";function r(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var n=\"\",r=0;r=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;s[254]=s[254]=1,t.string2buf=function(e){var t,n,r,a,o,s=e.length,l=0;for(a=0;a>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},t.buf2binstring=function(e){return r(e,e.length)},t.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,r=t.length;n4)u[i++]=65533,n+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&n1?u[i++]=65533:a<65536?u[i++]=a:(a-=65536,u[i++]=55296|a>>10&1023,u[i++]=56320|1023&a)}return r(u,i)},t.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0?t:0===n?t:n+s[e[n]]>t?n:t}},function(e,t,n){\"use strict\";function r(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0}e.exports=r},function(e,t,n){\"use strict\";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,n){\"use strict\";t.LOCAL_FILE_HEADER=\"PK\u0003\u0004\",t.CENTRAL_FILE_HEADER=\"PK\u0001\u0002\",t.CENTRAL_DIRECTORY_END=\"PK\u0005\u0006\",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR=\"PK\u0006\u0007\",t.ZIP64_CENTRAL_DIRECTORY_END=\"PK\u0006\u0006\",t.DATA_DESCRIPTOR=\"PK\u0007\\b\"},function(e,t,n){\"use strict\";var r=n(0),i=n(3),a=n(47),o=n(100),s=n(101),l=n(49);e.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),\"string\"!==t||i.uint8array?\"nodebuffer\"===t?new s(e):i.uint8array?new l(r.transformTo(\"uint8array\",e)):new a(r.transformTo(\"array\",e)):new o(e)}},function(e,t,n){\"use strict\";function r(e){i.call(this,e);for(var t=0;t=0;--a)if(this.data[a]===t&&this.data[a+1]===n&&this.data[a+2]===r&&this.data[a+3]===i)return a-this.zero;return-1},r.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&n===a[1]&&r===a[2]&&i===a[3]},r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){\"use strict\";function r(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}var i=n(0);r.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return i.transformTo(\"string\",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},e.exports=r},function(e,t,n){\"use strict\";function r(e){i.call(this,e)}var i=n(47);n(0).inherits(r,i),r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){\"use strict\";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(51),a=r(i),o=n(52),s=r(o),l=n(103),u=r(l);t.default=a.default.plugins.add(\"gjs-plugin-export\",function(e,t){var n=t||{},r=e.getConfig(),i=r.stylePrefix,a=document.createElement(\"BUTTON\"),o={addExportBtn:1,btnLabel:\"Export to ZIP\",preHtml:'',postHtml:\"\",preCss:\"\",postCss:\"\"};for(var l in o)l in n||(n[l]=o[l]);a.innerHTML=n.btnLabel,a.className=i+\"btn-prim\",e.Commands.add(\"gjs-export-zip\",{run:function(){var t=new s.default,r=t.folder(\"css\"),i=\"grapesjs_template_\"+Date.now()+\".zip\";t.file(\"index.html\",n.preHtml+e.getHtml()+n.postHtml),r.file(\"style.css\",n.preCss+e.getCss()+n.postCss),t.generateAsync({type:\"blob\"}).then(function(e){u.default.saveAs(e,i)})}}),n.addExportBtn&&e.on(\"run:export-template\",function(){e.Modal.getContentEl().appendChild(a),a.onclick=function(){e.runCommand(\"gjs-export-zip\")}})})},function(t,n){t.exports=e},function(e,t,n){\"use strict\";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");this.files={},this.comment=null,this.root=\"\",this.clone=function(){var e=new r;for(var t in this)\"function\"!=typeof this[t]&&(e[t]=this[t]);return e}}r.prototype=n(53),r.prototype.loadAsync=n(98),r.support=n(3),r.defaults=n(35),r.version=\"3.1.5\",r.loadAsync=function(e,t){return(new r).loadAsync(e,t)},r.external=n(9),e.exports=r},function(e,t,n){\"use strict\";function r(e){return\"[object RegExp]\"===Object.prototype.toString.call(e)}var i=n(6),a=n(0),o=n(1),s=n(34),l=n(35),u=n(21),c=n(84),f=n(85),h=n(14),d=n(97),p=function(e,t,n){var r,i=a.getTypeOf(t),s=a.extend(n||{},l);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),\"string\"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=g(e)),s.createFolders&&(r=m(e))&&v.call(this,r,!0);var f=\"string\"===i&&!1===s.binary&&!1===s.base64;n&&void 0!==n.binary||(s.binary=!f),(t instanceof u&&0===t.uncompressedSize||s.dir||!t||0===t.length)&&(s.base64=!1,s.binary=!0,t=\"\",s.compression=\"STORE\",i=\"string\");var p=null;p=t instanceof u||t instanceof o?t:h.isNode&&h.isStream(t)?new d(e,t):a.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var b=new c(e,p,s);this.files[e]=b},m=function(e){\"/\"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf(\"/\");return t>0?e.substring(0,t):\"\"},g=function(e){return\"/\"!==e.slice(-1)&&(e+=\"/\"),e},v=function(e,t){return t=void 0!==t?t:l.createFolders,e=g(e),this.files[e]||p.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]},b={load:function(){throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\")},forEach:function(e){var t,n,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(r)}),t},file:function(e,t,n){if(1===arguments.length){if(r(e)){var i=e;return this.filter(function(e,t){return!t.dir&&i.test(e)})}var a=this.files[this.root+e];return a&&!a.dir?a:null}return e=this.root+e,p.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(r(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=v.call(this,t),i=this.clone();return i.root=n.name,i},remove:function(e){e=this.root+e;var t=this.files[e];if(t||(\"/\"!==e.slice(-1)&&(e+=\"/\"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),r=0;r0)throw new Error(\"Invalid string. Length must be a multiple of 4\");return\"=\"===e[t-2]?2:\"=\"===e[t-1]?1:0}function i(e){return 3*e.length/4-r(e)}function a(e){var t,n,i,a,o,s=e.length;a=r(e),o=new f(3*s/4-a),n=a>0?s-4:s;var l=0;for(t=0;t>16&255,o[l++]=i>>8&255,o[l++]=255&i;return 2===a?(i=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,o[l++]=255&i):1===a&&(i=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,o[l++]=i>>8&255,o[l++]=255&i),o}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function s(e,t,n){for(var r,i=[],a=t;al?l:o+16383));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+=\"==\"):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+=\"=\"),a.push(i),a.join(\"\")}t.byteLength=i,t.toByteArray=a,t.fromByteArray=l;for(var u=[],c=[],f=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,h=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",d=0,p=h.length;d>1,c=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+f],f+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),a-=u}return(d?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=o+f>=1?h/l:h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;e[n+d]=255&o,d+=p,o/=256,u-=8);e[n+d-p]|=128*m}},function(e,t,n){var r=function(){try{return n(11)}catch(e){}}();t=e.exports=n(26),t.Stream=r||t,t.Readable=t,t.Writable=n(17),t.Duplex=n(5),t.Transform=n(18),t.PassThrough=n(28)},function(e,t){},function(e,n,i){function a(e,t){this._id=e,this._clearFn=t}var o=Function.prototype.apply;n.setTimeout=function(){return new a(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new a(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},i(59),n.setImmediate=t,n.clearImmediate=r},function(e,t,n){(function(e,t){!function(e,n){\"use strict\";function r(e){\"function\"!=typeof e&&(e=new Function(\"\"+e));for(var t=new Array(arguments.length-1),n=0;nn;)t.push(arguments[n++]);return g[++m]=function(){s(\"function\"==typeof e?e:Function(e),t)},r(m),m},d=function(e){delete g[e]},\"process\"==n(79)(f)?r=function(e){f.nextTick(o(v,e,1))}:p?(i=new p,a=i.port2,i.port1.onmessage=b,r=o(a.postMessage,a,1)):c.addEventListener&&\"function\"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+\"\",\"*\")},c.addEventListener(\"message\",b,!1)):r=\"onreadystatechange\"in u(\"script\")?function(e){l.appendChild(u(\"script\")).onreadystatechange=function(){l.removeChild(this),v.call(e)}}:function(e){setTimeout(o(v,e,1),0)}),e.exports={set:h,clear:d}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){e.exports=n(15).document&&document.documentElement},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){\"use strict\";function r(){}function i(e){if(\"function\"!=typeof e)throw new TypeError(\"resolver must be a function\");this.state=b,this.queue=[],this.outcome=void 0,e!==r&&l(this,e)}function a(e,t,n){this.promise=e,\"function\"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),\"function\"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function o(e,t,n){p(function(){var r;try{r=t(n)}catch(t){return m.reject(e,t)}r===e?m.reject(e,new TypeError(\"Cannot resolve promise with itself\")):m.resolve(e,r)})}function s(e){var t=e&&e.then;if(e&&(\"object\"==typeof e||\"function\"==typeof e)&&\"function\"==typeof t)return function(){t.apply(e,arguments)}}function l(e,t){function n(t){a||(a=!0,m.reject(e,t))}function r(t){a||(a=!0,m.resolve(e,t))}function i(){t(r,n)}var a=!1,o=u(i);\"error\"===o.status&&n(o.value)}function u(e,t){var n={};try{n.value=e(t),n.status=\"success\"}catch(e){n.status=\"error\",n.value=e}return n}function c(e){return e instanceof this?e:m.resolve(new this(r),e)}function f(e){var t=new this(r);return m.reject(t,e)}function h(e){var t=this;if(\"[object Array]\"!==Object.prototype.toString.call(e))return this.reject(new TypeError(\"must be an array\"));var n=e.length,i=!1;if(!n)return this.resolve([]);for(var a=new Array(n),o=0,s=-1,l=new this(r);++s0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var n=s.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==d)throw new Error(c[n]);if(t.header&&s.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(i=\"string\"==typeof t.dictionary?u.string2buf(t.dictionary):\"[object ArrayBuffer]\"===h.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=s.deflateSetDictionary(this.strm,i))!==d)throw new Error(c[n]);this._dict_set=!0}}function i(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||c[n.err];return n.result}function a(e,t){return t=t||{},t.raw=!0,i(e,t)}function o(e,t){return t=t||{},t.gzip=!0,i(e,t)}var s=n(89),l=n(4),u=n(42),c=n(23),f=n(43),h=Object.prototype.toString,d=0,p=-1,m=0,g=8;r.prototype.push=function(e,t){var n,r,i=this.strm,a=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:!0===t?4:0,\"string\"==typeof e?i.input=u.string2buf(e):\"[object ArrayBuffer]\"===h.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new l.Buf8(a),i.next_out=0,i.avail_out=a),1!==(n=s.deflate(i,r))&&n!==d)return this.onEnd(n),this.ended=!0,!1;0!==i.avail_out&&(0!==i.avail_in||4!==r&&2!==r)||(\"string\"===this.options.to?this.onData(u.buf2binstring(l.shrinkBuf(i.output,i.next_out))):this.onData(l.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||0===i.avail_out)&&1!==n);return 4===r?(n=s.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===d):2!==r||(this.onEnd(d),i.avail_out=0,!0)},r.prototype.onData=function(e){this.chunks.push(e)},r.prototype.onEnd=function(e){e===d&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=r,t.deflate=i,t.deflateRaw=a,t.gzip=o},function(e,t,n){\"use strict\";function r(e,t){return e.msg=B[t],t}function i(e){return(e<<1)-(e>4?9:0)}function a(e){for(var t=e.length;--t>=0;)e[t]=0}function o(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(I.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function s(e,t){R._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,o(e.strm)}function l(e,t){e.pending_buf[e.pending++]=t}function u(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function c(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,I.arraySet(t,e.input,e.next_in,i,n),1===e.state.wrap?e.adler=L(e.adler,t,i,n):2===e.state.wrap&&(e.adler=j(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function f(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-ue?e.strstart-(e.w_size-ue):0,u=e.window,c=e.w_mask,f=e.prev,h=e.strstart+le,d=u[a+o-1],p=u[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(n=t,u[n+o]===p&&u[n+o-1]===d&&u[n]===u[a]&&u[++n]===u[a+1]){a+=2,n++;do{}while(u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&ao){if(e.match_start=t,o=r,r>=s)break;d=u[a+o-1],p=u[a+o]}}}while((t=f[t&c])>l&&0!=--i);return o<=e.lookahead?o:e.lookahead}function h(e){var t,n,r,i,a,o=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=o+(o-ue)){I.arraySet(e.window,e.window,o,o,0),e.match_start-=o,e.strstart-=o,e.block_start-=o,n=e.hash_size,t=n;do{r=e.head[--t],e.head[t]=r>=o?r-o:0}while(--n);n=o,t=n;do{r=e.prev[--t],e.prev[t]=r>=o?r-o:0}while(--n);i+=o}if(0===e.strm.avail_in)break;if(n=c(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=n,e.lookahead+e.insert>=se)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(h(e),0===e.lookahead&&t===M)return be;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,s(e,!1),0===e.strm.avail_out))return be;if(e.strstart-e.block_start>=e.w_size-ue&&(s(e,!1),0===e.strm.avail_out))return be}return e.insert=0,t===z?(s(e,!0),0===e.strm.avail_out?we:_e):(e.strstart>e.block_start&&(s(e,!1),e.strm.avail_out),be)}function p(e,t){for(var n,r;;){if(e.lookahead=se&&(e.ins_h=(e.ins_h<=se)if(r=R._tr_tally(e,e.strstart-e.match_start,e.match_length-se),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=se){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=se&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=se-1)),e.prev_length>=se&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-se,r=R._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-se),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<=se&&e.strstart>0&&(i=e.strstart-1,(r=o[i])===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+le;do{}while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=se?(n=R._tr_tally(e,1,e.match_length-se),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=R._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(s(e,!1),0===e.strm.avail_out))return be}return e.insert=0,t===z?(s(e,!0),0===e.strm.avail_out?we:_e):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?be:ye}function v(e,t){for(var n;;){if(0===e.lookahead&&(h(e),0===e.lookahead)){if(t===M)return be;break}if(e.match_length=0,n=R._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(s(e,!1),0===e.strm.avail_out))return be}return e.insert=0,t===z?(s(e,!0),0===e.strm.avail_out?we:_e):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?be:ye}function b(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function y(e){e.window_size=2*e.w_size,a(e.head),e.max_lazy_match=O[e.level].max_lazy,e.good_match=O[e.level].good_length,e.nice_match=O[e.level].nice_length,e.max_chain_length=O[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=se-1,e.match_available=0,e.ins_h=0}function w(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=$,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new I.Buf16(2*ae),this.dyn_dtree=new I.Buf16(2*(2*re+1)),this.bl_tree=new I.Buf16(2*(2*ie+1)),a(this.dyn_ltree),a(this.dyn_dtree),a(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new I.Buf16(oe+1),this.heap=new I.Buf16(2*ne+1),a(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new I.Buf16(2*ne+1),a(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function _(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=J,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?fe:ge,e.adler=2===t.wrap?0:1,t.last_flush=M,R._tr_init(t),F):r(e,Z)}function k(e){var t=_(e);return t===F&&y(e.state),t}function x(e,t){return e&&e.state?2!==e.state.wrap?Z:(e.state.gzhead=t,F):Z}function S(e,t,n,i,a,o){if(!e)return Z;var s=1;if(t===q&&(t=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),a<1||a>Q||n!==$||i<8||i>15||t<0||t>9||o<0||o>X)return r(e,Z);8===i&&(i=9);var l=new w;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=i,l.w_size=1<D||t<0)return e?r(e,Z):Z;if(s=e.state,!e.output||!e.input&&0!==e.avail_in||s.status===ve&&t!==z)return r(e,0===e.avail_out?Y:Z);if(s.strm=e,n=s.last_flush,s.last_flush=t,s.status===fe)if(2===s.wrap)e.adler=0,l(s,31),l(s,139),l(s,8),s.gzhead?(l(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),l(s,255&s.gzhead.time),l(s,s.gzhead.time>>8&255),l(s,s.gzhead.time>>16&255),l(s,s.gzhead.time>>24&255),l(s,9===s.level?2:s.strategy>=V||s.level<2?4:0),l(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(l(s,255&s.gzhead.extra.length),l(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=j(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=he):(l(s,0),l(s,0),l(s,0),l(s,0),l(s,0),l(s,9===s.level?2:s.strategy>=V||s.level<2?4:0),l(s,ke),s.status=ge);else{var h=$+(s.w_bits-8<<4)<<8,d=-1;d=s.strategy>=V||s.level<2?0:s.level<6?1:6===s.level?2:3,h|=d<<6,0!==s.strstart&&(h|=ce),h+=31-h%31,s.status=ge,u(s,h),0!==s.strstart&&(u(s,e.adler>>>16),u(s,65535&e.adler)),e.adler=1}if(s.status===he)if(s.gzhead.extra){for(c=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>c&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),o(e),c=s.pending,s.pending!==s.pending_buf_size));)l(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>c&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=de)}else s.status=de;if(s.status===de)if(s.gzhead.name){c=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>c&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),o(e),c=s.pending,s.pending===s.pending_buf_size)){f=1;break}f=s.gzindexc&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),0===f&&(s.gzindex=0,s.status=pe)}else s.status=pe;if(s.status===pe)if(s.gzhead.comment){c=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>c&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),o(e),c=s.pending,s.pending===s.pending_buf_size)){f=1;break}f=s.gzindexc&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),0===f&&(s.status=me)}else s.status=me;if(s.status===me&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&o(e),s.pending+2<=s.pending_buf_size&&(l(s,255&e.adler),l(s,e.adler>>8&255),e.adler=0,s.status=ge)):s.status=ge),0!==s.pending){if(o(e),0===e.avail_out)return s.last_flush=-1,F}else if(0===e.avail_in&&i(t)<=i(n)&&t!==z)return r(e,Y);if(s.status===ve&&0!==e.avail_in)return r(e,Y);if(0!==e.avail_in||0!==s.lookahead||t!==M&&s.status!==ve){var p=s.strategy===V?v(s,t):s.strategy===K?g(s,t):O[s.level].func(s,t);if(p!==we&&p!==_e||(s.status=ve),p===be||p===we)return 0===e.avail_out&&(s.last_flush=-1),F;if(p===ye&&(t===P?R._tr_align(s):t!==D&&(R._tr_stored_block(s,0,0,!1),t===N&&(a(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),o(e),0===e.avail_out))return s.last_flush=-1,F}return t!==z?F:s.wrap<=0?U:(2===s.wrap?(l(s,255&e.adler),l(s,e.adler>>8&255),l(s,e.adler>>16&255),l(s,e.adler>>24&255),l(s,255&e.total_in),l(s,e.total_in>>8&255),l(s,e.total_in>>16&255),l(s,e.total_in>>24&255)):(u(s,e.adler>>>16),u(s,65535&e.adler)),o(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?F:U)}function C(e){var t;return e&&e.state?(t=e.state.status)!==fe&&t!==he&&t!==de&&t!==pe&&t!==me&&t!==ge&&t!==ve?r(e,Z):(e.state=null,t===ge?r(e,W):F):Z}function A(e,t){var n,r,i,o,s,l,u,c,f=t.length;if(!e||!e.state)return Z;if(n=e.state,2===(o=n.wrap)||1===o&&n.status!==fe||n.lookahead)return Z;for(1===o&&(e.adler=L(e.adler,t,f,0)),n.wrap=0,f>=n.w_size&&(0===o&&(a(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new I.Buf8(n.w_size),I.arraySet(c,t,f-n.w_size,n.w_size,0),t=c,f=n.w_size),s=e.avail_in,l=e.next_in,u=e.input,e.avail_in=f,e.next_in=0,e.input=t,h(n);n.lookahead>=se;){r=n.strstart,i=n.lookahead-(se-1);do{n.ins_h=(n.ins_h<=0;)e[t]=0}function i(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function a(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function o(e){return e<256?ae[e]:ae[256+(e>>>7)]}function s(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function l(e,t,n){e.bi_valid>V-n?(e.bi_buf|=t<>V-e.bi_valid,e.bi_valid+=n-V):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function f(e){16===e.bi_valid?(s(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function h(e,t){var n,r,i,a,o,s,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(a=0;a<=H;a++)e.bl_count[a]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;np&&(a=p,m++),l[2*r+1]=a,r>u||(e.bl_count[a]++,o=0,r>=d&&(o=h[r-d]),s=l[2*r],e.opt_len+=s*(a+o),f&&(e.static_len+=s*(c[2*r+1]+o)));if(0!==m){do{for(a=p-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[p]--,m-=2}while(m>0);for(a=p;0!==a;a--)for(r=e.bl_count[a];0!==r;)(i=e.heap[--n])>u||(l[2*i+1]!==a&&(e.opt_len+=(a-l[2*i+1])*l[2*i],l[2*i+1]=a),r--)}}function d(e,t,n){var r,i,a=new Array(H+1),o=0;for(r=1;r<=H;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=c(a[s]++,s))}}function p(){var e,t,n,r,a,o=new Array(H+1);for(n=0,r=0;r>=7;r8?s(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function v(e,t,n,r){g(e),r&&(s(e,n),s(e,~n)),L.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function b(e,t,n,r){var i=2*t,a=2*n;return e[i]>1;n>=1;n--)y(e,a,n);i=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],y(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,y(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],h(e,t),d(a,u,e.bl_count)}function k(e,t,n){var r,i,a=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=t[2*(r+1)+1],++s=3&&0===e.bl_tree[2*ne[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function E(e,t,n,r){var i;for(l(e,t-257,5),l(e,n-1,5),l(e,r-4,4),i=0;i>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return B;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return M;for(t=32;t0?(e.strm.data_type===P&&(e.strm.data_type=T(e)),_(e,e.l_desc),_(e,e.d_desc),o=S(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=n+5,n+4<=i&&-1!==t?A(e,t,n,r):e.strategy===j||a===i?(l(e,(z<<1)+(r?1:0),3),w(e,re,ie)):(l(e,(D<<1)+(r?1:0),3),E(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),w(e,e.dyn_ltree,e.dyn_dtree)),m(e),r&&g(e)}function R(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(oe[n]+U+1)]++,e.dyn_dtree[2*o(t)]++),e.last_lit===e.lit_bufsize-1}var L=n(4),j=4,B=0,M=1,P=2,N=0,z=1,D=2,F=29,U=256,Z=U+1+F,W=30,Y=19,q=2*Z+1,H=15,V=16,K=7,X=256,G=16,J=17,$=18,Q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ee=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],te=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ne=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],re=new Array(2*(Z+2));r(re);var ie=new Array(2*W);r(ie);var ae=new Array(512);r(ae);var oe=new Array(256);r(oe);var se=new Array(F);r(se);var le=new Array(W);r(le);var ue,ce,fe,he=!1;t._tr_init=C,t._tr_stored_block=A,t._tr_flush_block=I,t._tr_tally=R,t._tr_align=O},function(e,t,n){\"use strict\";function r(e){if(!(this instanceof r))return new r(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:\"\"},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var n=o.inflateInit2(this.strm,t.windowBits);if(n!==u.Z_OK)throw new Error(c[n]);this.header=new h,o.inflateGetHeader(this.strm,this.header)}function i(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||c[n.err];return n.result}function a(e,t){return t=t||{},t.raw=!0,i(e,t)}var o=n(92),s=n(4),l=n(42),u=n(44),c=n(23),f=n(43),h=n(95),d=Object.prototype.toString;r.prototype.push=function(e,t){var n,r,i,a,c,f,h=this.strm,p=this.options.chunkSize,m=this.options.dictionary,g=!1;if(this.ended)return!1;r=t===~~t?t:!0===t?u.Z_FINISH:u.Z_NO_FLUSH,\"string\"==typeof e?h.input=l.binstring2buf(e):\"[object ArrayBuffer]\"===d.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new s.Buf8(p),h.next_out=0,h.avail_out=p),n=o.inflate(h,u.Z_NO_FLUSH),n===u.Z_NEED_DICT&&m&&(f=\"string\"==typeof m?l.string2buf(m):\"[object ArrayBuffer]\"===d.call(m)?new Uint8Array(m):m,n=o.inflateSetDictionary(this.strm,f)),n===u.Z_BUF_ERROR&&!0===g&&(n=u.Z_OK,g=!1),n!==u.Z_STREAM_END&&n!==u.Z_OK)return this.onEnd(n),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&n!==u.Z_STREAM_END&&(0!==h.avail_in||r!==u.Z_FINISH&&r!==u.Z_SYNC_FLUSH)||(\"string\"===this.options.to?(i=l.utf8border(h.output,h.next_out),a=h.next_out-i,c=l.buf2string(h.output,i),h.next_out=a,h.avail_out=p-a,a&&s.arraySet(h.output,h.output,i,a,0),this.onData(c)):this.onData(s.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(g=!0)}while((h.avail_in>0||0===h.avail_out)&&n!==u.Z_STREAM_END);return n===u.Z_STREAM_END&&(r=u.Z_FINISH),r===u.Z_FINISH?(n=o.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===u.Z_OK):r!==u.Z_SYNC_FLUSH||(this.onEnd(u.Z_OK),h.avail_out=0,!0)},r.prototype.onData=function(e){this.chunks.push(e)},r.prototype.onEnd=function(e){e===u.Z_OK&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=r,t.inflate=i,t.inflateRaw=a,t.ungzip=i},function(e,t,n){\"use strict\";function r(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new b.Buf16(320),this.work=new b.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=\"\",t.wrap&&(e.adler=1&t.wrap),t.mode=N,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new b.Buf32(me),t.distcode=t.distdyn=new b.Buf32(ge),t.sane=1,t.back=-1,O):L}function o(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,a(e)):L}function s(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?L:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,o(e))):L}function l(e,t){var n,r;return e?(r=new i,e.state=r,r.window=null,n=s(e,t),n!==O&&(e.state=null),n):L}function u(e){return l(e,ve)}function c(e){if(be){var t;for(g=new b.Buf32(512),v=new b.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(k(S,e.lens,0,288,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;k(E,e.lens,0,32,v,0,e.work,{bits:5}),be=!1}e.lencode=g,e.lenbits=9,e.distcode=v,e.distbits=5}function f(e,t,n,r){var i,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(b.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),b.arraySet(a.window,t,n-r,i,a.wnext),r-=i,r?(b.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,n.check=w(n.check,Ce,2,0),h=0,d=0,n.mode=z;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg=\"incorrect header check\",n.mode=he;break}if((15&h)!==P){e.msg=\"unknown compression method\",n.mode=he;break}if(h>>>=4,d-=4,ke=8+(15&h),0===n.wbits)n.wbits=ke;else if(ke>n.wbits){e.msg=\"invalid window size\",n.mode=he;break}n.dmax=1<>8&1),512&n.flags&&(Ce[0]=255&h,Ce[1]=h>>>8&255,n.check=w(n.check,Ce,2,0)),h=0,d=0,n.mode=D;case D:for(;d<32;){if(0===l)break e;l--,h+=i[o++]<>>8&255,Ce[2]=h>>>16&255,Ce[3]=h>>>24&255,n.check=w(n.check,Ce,4,0)),h=0,d=0,n.mode=F;case F:for(;d<16;){if(0===l)break e;l--,h+=i[o++]<>8),512&n.flags&&(Ce[0]=255&h,Ce[1]=h>>>8&255,n.check=w(n.check,Ce,2,0)),h=0,d=0,n.mode=U;case U:if(1024&n.flags){for(;d<16;){if(0===l)break e;l--,h+=i[o++]<>>8&255,n.check=w(n.check,Ce,2,0)),h=0,d=0}else n.head&&(n.head.extra=null);n.mode=Z;case Z:if(1024&n.flags&&(g=n.length,g>l&&(g=l),g&&(n.head&&(ke=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),b.arraySet(n.head.extra,i,o,g,ke)),512&n.flags&&(n.check=w(n.check,i,g,o)),l-=g,o+=g,n.length-=g),n.length))break e;n.length=0,n.mode=W;case W:if(2048&n.flags){if(0===l)break e;g=0;do{ke=i[o+g++],n.head&&ke&&n.length<65536&&(n.head.name+=String.fromCharCode(ke))}while(ke&&g>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=K;break;case H:for(;d<32;){if(0===l)break e;l--,h+=i[o++]<>>=7&d,d-=7&d,n.mode=ue;break}for(;d<3;){if(0===l)break e;l--,h+=i[o++]<>>=1,d-=1,3&h){case 0:n.mode=G;break;case 1:if(c(n),n.mode=ne,t===A){h>>>=2,d-=2;break e}break;case 2:n.mode=Q;break;case 3:e.msg=\"invalid block type\",n.mode=he}h>>>=2,d-=2;break;case G:for(h>>>=7&d,d-=7&d;d<32;){if(0===l)break e;l--,h+=i[o++]<>>16^65535)){e.msg=\"invalid stored block lengths\",n.mode=he;break}if(n.length=65535&h,h=0,d=0,n.mode=J,t===A)break e;case J:n.mode=$;case $:if(g=n.length){if(g>l&&(g=l),g>u&&(g=u),0===g)break e;b.arraySet(a,i,o,g,s),l-=g,o+=g,u-=g,s+=g,n.length-=g;break}n.mode=K;break;case Q:for(;d<14;){if(0===l)break e;l--,h+=i[o++]<>>=5,d-=5,n.ndist=1+(31&h),h>>>=5,d-=5,n.ncode=4+(15&h),h>>>=4,d-=4,n.nlen>286||n.ndist>30){e.msg=\"too many length or distance symbols\",n.mode=he;break}n.have=0,n.mode=ee;case ee:for(;n.have>>=3,d-=3}for(;n.have<19;)n.lens[Ae[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Se={bits:n.lenbits},xe=k(x,n.lens,0,19,n.lencode,0,n.work,Se),n.lenbits=Se.bits,xe){e.msg=\"invalid code lengths set\",n.mode=he;break}n.have=0,n.mode=te;case te:for(;n.have>>24,ve=Te>>>16&255,be=65535&Te,!(ge<=d);){if(0===l)break e;l--,h+=i[o++]<>>=ge,d-=ge,n.lens[n.have++]=be;else{if(16===be){for(Ee=ge+2;d>>=ge,d-=ge,0===n.have){e.msg=\"invalid bit length repeat\",n.mode=he;break}ke=n.lens[n.have-1],g=3+(3&h),h>>>=2,d-=2}else if(17===be){for(Ee=ge+3;d>>=ge,d-=ge,ke=0,g=3+(7&h),h>>>=3,d-=3}else{for(Ee=ge+7;d>>=ge,d-=ge,ke=0,g=11+(127&h),h>>>=7,d-=7}if(n.have+g>n.nlen+n.ndist){e.msg=\"invalid bit length repeat\",n.mode=he;break}for(;g--;)n.lens[n.have++]=ke}}if(n.mode===he)break;if(0===n.lens[256]){e.msg=\"invalid code -- missing end-of-block\",n.mode=he;break}if(n.lenbits=9,Se={bits:n.lenbits},xe=k(S,n.lens,0,n.nlen,n.lencode,0,n.work,Se),n.lenbits=Se.bits,xe){e.msg=\"invalid literal/lengths set\",n.mode=he;break}if(n.distbits=6,n.distcode=n.distdyn,Se={bits:n.distbits},xe=k(E,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Se),n.distbits=Se.bits,xe){e.msg=\"invalid distances set\",n.mode=he;break}if(n.mode=ne,t===A)break e;case ne:n.mode=re;case re:if(l>=6&&u>=258){e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=l,n.hold=h,n.bits=d,_(e,m),s=e.next_out,a=e.output,u=e.avail_out,o=e.next_in,i=e.input,l=e.avail_in,h=n.hold,d=n.bits,n.mode===K&&(n.back=-1);break}for(n.back=0;Te=n.lencode[h&(1<>>24,ve=Te>>>16&255,be=65535&Te,!(ge<=d);){if(0===l)break e;l--,h+=i[o++]<>ye)],ge=Te>>>24,ve=Te>>>16&255,be=65535&Te,!(ye+ge<=d);){if(0===l)break e;l--,h+=i[o++]<>>=ye,d-=ye,n.back+=ye}if(h>>>=ge,d-=ge,n.back+=ge,n.length=be,0===ve){n.mode=le;break}if(32&ve){n.back=-1,n.mode=K;break}if(64&ve){e.msg=\"invalid literal/length code\",n.mode=he;break}n.extra=15&ve,n.mode=ie;case ie:if(n.extra){for(Ee=n.extra;d>>=n.extra,d-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=ae;case ae:for(;Te=n.distcode[h&(1<>>24,ve=Te>>>16&255,be=65535&Te,!(ge<=d);){if(0===l)break e;l--,h+=i[o++]<>ye)],ge=Te>>>24,ve=Te>>>16&255,be=65535&Te,!(ye+ge<=d);){if(0===l)break e;l--,h+=i[o++]<>>=ye,d-=ye,n.back+=ye}if(h>>>=ge,d-=ge,n.back+=ge,64&ve){e.msg=\"invalid distance code\",n.mode=he;break}n.offset=be,n.extra=15&ve,n.mode=oe;case oe:if(n.extra){for(Ee=n.extra;d>>=n.extra,d-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=\"invalid distance too far back\",n.mode=he;break}n.mode=se;case se:if(0===u)break e;if(g=m-u,n.offset>g){if((g=n.offset-g)>n.whave&&n.sane){e.msg=\"invalid distance too far back\",n.mode=he;break}g>n.wnext?(g-=n.wnext,v=n.wsize-g):v=n.wnext-g,g>n.length&&(g=n.length),me=n.window}else me=a,v=s-n.offset,g=n.length;g>u&&(g=u),u-=g,n.length-=g;do{a[s++]=me[v++]}while(--g);0===n.length&&(n.mode=re);break;case le:if(0===u)break e;a[s++]=n.length,u--,n.mode=re;break;case ue:if(n.wrap){for(;d<32;){if(0===l)break e;l--,h|=i[o++]<>>24,d>>>=w,p-=w,0==(w=y>>>16&255))T[a++]=65535&y;else{if(!(16&w)){if(0==(64&w)){y=m[(65535&y)+(d&(1<>>=w,p-=w),p<15&&(d+=E[r++]<>>24,d>>>=w,p-=w,!(16&(w=y>>>16&255))){if(0==(64&w)){y=g[(65535&y)+(d&(1<l){e.msg=\"invalid distance too far back\",n.mode=30;break e}if(d>>>=w,p-=w,w=a-o,k>w){if((w=k-w)>c&&n.sane){e.msg=\"invalid distance too far back\",n.mode=30;break e}if(x=0,S=h,0===f){if(x+=u-w,w<_){_-=w;do{T[a++]=h[x++]}while(--w);x=a-k,S=T}}else if(f2;)T[a++]=S[x++],T[a++]=S[x++],T[a++]=S[x++],_-=3;_&&(T[a++]=S[x++],_>1&&(T[a++]=S[x++]))}else{x=a-k;do{T[a++]=T[x++],T[a++]=T[x++],T[a++]=T[x++],_-=3}while(_>2);_&&(T[a++]=T[x++],_>1&&(T[a++]=T[x++]))}break}}break}}while(r>3,r-=_,p-=_<<3,d&=(1<=1&&0===M[T];T--);if(C>T&&(C=T),0===T)return u[c++]=20971520,u[c++]=20971520,h.bits=1,0;for(E=1;E0&&(0===e||1!==T))return-1;for(P[1]=0,x=1;x<15;x++)P[x+1]=P[x]+M[x];for(S=0;S852||2===e&&R>592)return 1;for(;;){y=x-O,f[S]b?(w=N[z+f[S]],_=j[B+f[S]]):(w=96,_=0),d=1<>O)+p]=y<<24|w<<16|_|0}while(0!==p);for(d=1<>=1;if(0!==d?(L&=d-1,L+=d):L=0,S++,0==--M[x]){if(x===T)break;x=t[n+f[S]]}if(x>C&&(L&g)!==m){for(0===O&&(O=C),v+=E,A=x-O,I=1<852||2===e&&R>592)return 1;m=L&g,u[m]=C<<24|A<<16|v-c|0}}return 0!==L&&(u[v+L]=x-O<<24|64<<16|0),h.bits=C,0}},function(e,t,n){\"use strict\";function r(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=\"\",this.comment=\"\",this.hcrc=0,this.done=!1}e.exports=r},function(e,t,n){\"use strict\";function r(e,t,n,r){a.call(this,\"ZipFileWorker\"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}var i=n(0),a=n(1),o=n(6),s=n(22),l=n(45),u=function(e,t){var n,r=\"\";for(n=0;n>>=8;return r},c=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16},f=function(e,t){return 63&(e||0)},h=function(e,t,n,r,a,h){var d,p,m=e.file,g=e.compression,v=h!==o.utf8encode,b=i.transformTo(\"string\",h(m.name)),y=i.transformTo(\"string\",o.utf8encode(m.name)),w=m.comment,_=i.transformTo(\"string\",h(w)),k=i.transformTo(\"string\",o.utf8encode(w)),x=y.length!==m.name.length,S=k.length!==w.length,E=\"\",T=\"\",C=\"\",A=m.dir,O=m.date,I={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(I.crc32=e.crc32,I.compressedSize=e.compressedSize,I.uncompressedSize=e.uncompressedSize);var R=0;t&&(R|=8),v||!x&&!S||(R|=2048);var L=0,j=0;A&&(L|=16),\"UNIX\"===a?(j=798,L|=c(m.unixPermissions,A)):(j=20,L|=f(m.dosPermissions)),d=O.getUTCHours(),d<<=6,d|=O.getUTCMinutes(),d<<=5,d|=O.getUTCSeconds()/2,p=O.getUTCFullYear()-1980,p<<=4,p|=O.getUTCMonth()+1,p<<=5,p|=O.getUTCDate(),x&&(T=u(1,1)+u(s(b),4)+y,E+=\"up\"+u(T.length,2)+T),S&&(C=u(1,1)+u(s(_),4)+k,E+=\"uc\"+u(C.length,2)+C);var B=\"\";return B+=\"\\n\\0\",B+=u(R,2),B+=g.magic,B+=u(d,2),B+=u(p,2),B+=u(I.crc32,4),B+=u(I.compressedSize,4),B+=u(I.uncompressedSize,4),B+=u(b.length,2),B+=u(E.length,2),{fileRecord:l.LOCAL_FILE_HEADER+B+b+E,dirRecord:l.CENTRAL_FILE_HEADER+u(j,2)+B+u(_.length,2)+\"\\0\\0\\0\\0\"+u(L,4)+u(r,4)+b+E+_}},d=function(e,t,n,r,a){var o=i.transformTo(\"string\",a(r));return l.CENTRAL_DIRECTORY_END+\"\\0\\0\\0\\0\"+u(e,2)+u(e,2)+u(t,4)+u(n,4)+u(o.length,2)+o},p=function(e){return l.DATA_DESCRIPTOR+u(e.crc32,4)+u(e.compressedSize,4)+u(e.uncompressedSize,4)};i.inherits(r,a),r.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},r.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=h(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},r.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=h(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:p(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},r.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t1)throw new Error(\"Multi-volumes zip are not supported\")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error(\"Corrupted zip: missing \"+Math.abs(r)+\" bytes.\")},prepareReader:function(e){this.reader=i(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=r},function(e,t,n){\"use strict\";function r(e){i.call(this,e)}var i=n(48);n(0).inherits(r,i),r.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},r.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},r.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){\"use strict\";function r(e){i.call(this,e)}var i=n(49);n(0).inherits(r,i),r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){\"use strict\";function r(e,t){this.options=e,this.loadOptions=t}var i=n(46),a=n(0),o=n(21),s=n(22),l=n(6),u=n(39),c=n(3),f=function(e){for(var t in u)if(u.hasOwnProperty(t)&&u[t].magic===e)return u[t];return null};r.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error(\"Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)\");if(null===(t=f(this.compressionMethod)))throw new Error(\"Corrupted zip : compression \"+a.pretty(this.compressionMethod)+\" unknown (inner file : \"+a.transformTo(\"string\",this.fileName)+\")\");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error(\"Encrypted zip are not supported\");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||\"/\"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index1)for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:{},n=t,r=e.getModel(),i=void 0,a={key:\"1\",onApply:null,getFilename:null,closeOnApply:!0,config:{}};for(var o in a)o in n||(n[o]=a[o]);var s=n.config;s.apiKey=n.key,s.onSave=function(e,t){i.set(\"src\",t);var r=\"function\"==typeof n.getFilename?n.getFilename:c,a=r(i);(\"function\"==typeof n.onApply?n.onApply:f)(t,a,i),n.closeOnApply&&l.close()};var l=new Aviary.Feather(s),u=e.Commands,c=function(e){var t=e.get(\"src\").split(\"/\").pop();return Date.now()+\"_\"+t.slice(-15)},f=function(t,n){e.AssetManager.add({src:t,name:n})},h=document.createElement(\"img\");u.add(\"image-editor\",{run:function(e,t,n){var a=n||{},o=a.model||e.getSelected();i=o,h.src=o.get(\"src\"),l.launch({image:h}),r.trigger(\"gjs-aviary:launch\",o,l)}})})},function(t,n){t.exports=e}])})},function(e,t,n){/*! grapesjs-plugin-filestack - 0.1.1 */\n!function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=0)}([function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=i.default.plugins.add(\"gjs-plugin-filestack\",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r=e.getConfig(),i=r.stylePrefix||\"\",a=void 0,o={key:\"\",btnEl:\"\",btnText:\"Add images\",filestackOpts:{accept:\"image/*\",maxFiles:10},onComplete:function(e,t){}};for(var s in o)s in n||(n[s]=o[s]);if(!filestack)throw new Error(\"Filestack instance not found\");if(!n.key)throw new Error(\"Filestack's API key not found\");var l=filestack.init(n.key);e.on(\"run:open-assets\",function(){var t=e.Modal,r=t.getContentEl(),o=r.querySelector(\".\"+i+\"am-file-uploader\"),s=r.querySelector(\".\"+i+\"am-assets-header\"),c=r.querySelector(\".\"+i+\"am-assets-cont\");o&&(o.style.display=\"none\"),s&&(s.style.display=\"none\"),c.style.width=\"100%\",a||(a=n.btnEl,a||(a=document.createElement(\"button\"),a.className=i+\"btn-prim \"+i+\"btn-filestack\",a.innerHTML=n.btnText),a.onclick=function(){l.pick(n.filestackOpts).then(function(e){var t=e.filesUploaded,r=t instanceof Array?t:[t],i=u(r);n.onComplete(r,i)})}),c.insertBefore(a,s)});var u=function(t){var n=t.map(function(e){return e.src=e.url,e});return e.AssetManager.add(n)}})},function(t,n){t.exports=e}])})},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(15),i=function(e){return e&&e.__esModule?e:{default:e}}(r),a=n(3);t.default=function(e,t){var n=e.Commands,r=t.textCleanCanvas;n.add(a.cmdImport,(0,i.default)(e,t)),n.add(a.cmdDeviceDesktop,function(e){return e.setDevice(\"Desktop\")}),n.add(a.cmdDeviceTablet,function(e){return e.setDevice(\"Tablet\")}),n.add(a.cmdDeviceMobile,function(e){return e.setDevice(\"Mobile portrait\")}),n.add(a.cmdClear,function(e){return confirm(r)&&e.runCommand(\"core:canvas-clear\")})}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0};r(\"link-block\")&&n.add(\"link-block\",{category:\"Basic\",label:\"Link Block\",attributes:{class:\"fa fa-link\"},content:{type:\"link\",editable:!1,droppable:!0,style:{display:\"inline-block\",padding:\"5px\",\"min-height\":\"50px\",\"min-width\":\"50px\"}}}),r(\"quote\")&&n.add(\"quote\",{label:\"Quote\",category:\"Basic\",attributes:{class:\"fa fa-quote-right\"},content:'
\\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit\\n
'}),r(\"text-basic\")&&n.add(\"text-basic\",{category:\"Basic\",label:\"Text section\",attributes:{class:\"gjs-fonts gjs-f-h1p\"},content:'
\\n

Insert title here

\\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

\\n
'})}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],e.DomComponents),n=t.getType(\"default\");n.model,n.view}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var r=n(3);t.default=function(e,t){var n=e.Panels,i=e.getConfig(),a=\"sw-visibility\",o=\"export-template\",s=\"open-sm\",l=\"open-layers\",u=\"open-blocks\",c=\"fullscreen\",f=\"preview\";i.showDevices=0,n.getPanels().reset([{id:\"commands\",buttons:[{}]},{id:\"options\",buttons:[{id:a,command:a,context:a,className:\"fa fa-square-o\"},{id:f,context:f,command:function(e){return e.runCommand(f)},className:\"fa fa-eye\"},{id:c,command:c,context:c,className:\"fa fa-arrows-alt\"},{id:o,className:\"fa fa-code\",command:function(e){return e.runCommand(o)}},{id:\"undo\",className:\"fa fa-undo\",command:function(e){return e.runCommand(\"core:undo\")}},{id:\"redo\",className:\"fa fa-repeat\",command:function(e){return e.runCommand(\"core:redo\")}},{id:r.cmdImport,className:\"fa fa-download\",command:function(e){return e.runCommand(r.cmdImport)}},{id:r.cmdClear,className:\"fa fa-trash\",command:function(e){return e.runCommand(r.cmdClear)}}]},{id:\"views\",buttons:[{id:s,command:s,active:!0,className:\"fa fa-paint-brush\"},{id:\"open-tm\",command:\"open-tm\",className:\"fa fa-cog\"},{id:l,command:l,className:\"fa fa-bars\"},{id:u,command:u,className:\"fa fa-th-large\"}]}]),n.addPanel({id:\"devices-c\"}).get(\"buttons\").add([{id:r.cmdDeviceDesktop,command:r.cmdDeviceDesktop,className:\"fa fa-desktop\",active:1},{id:r.cmdDeviceTablet,command:r.cmdDeviceTablet,className:\"fa fa-tablet\"},{id:r.cmdDeviceMobile,command:r.cmdDeviceMobile,className:\"fa fa-mobile\"}]);var h=n.getButton(\"views\",u);e.on(\"load\",function(){return h&&h.set(\"active\",1)}),t.showStylesOnChange&&e.on(\"component:selected\",function(){var t=n.getButton(\"views\",s),r=n.getButton(\"views\",l);r&&r.get(\"active\")||!e.getSelected()||t&&t.set(\"active\",1)})}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){var n=e.StyleManager,r=t.customStyleManager;n.getSectors().reset(r&&r.length?r:[{name:t.textGeneral,open:!1,buildProps:[\"float\",\"display\",\"position\",\"top\",\"right\",\"left\",\"bottom\"]},{name:t.textLayout,open:!1,buildProps:[\"width\",\"height\",\"max-width\",\"min-height\",\"margin\",\"padding\"]},{name:t.textTypography,open:!1,buildProps:[\"font-family\",\"font-size\",\"font-weight\",\"letter-spacing\",\"color\",\"line-height\",\"text-align\",\"text-shadow\"],properties:[{property:\"text-align\",list:[{value:\"left\",className:\"fa fa-align-left\"},{value:\"center\",className:\"fa fa-align-center\"},{value:\"right\",className:\"fa fa-align-right\"},{value:\"justify\",className:\"fa fa-align-justify\"}]}]},{name:t.textDecorations,open:!1,buildProps:[\"border-radius-c\",\"background-color\",\"border-radius\",\"border\",\"box-shadow\",\"background\"]},{name:t.textExtra,open:!1,buildProps:[\"transition\",\"perspective\",\"transform\"]}])}}])});","/*! grapesjs-parser-postcss - 0.1.1 */\n!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?exports[\"grapesjs-parser-postcss\"]=e():t[\"grapesjs-parser-postcss\"]=e()}(window,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,\"a\",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p=\"\",r(r.s=21)}([function(t,e){e.getArg=function(t,e,r){if(e in t)return t[e];if(3===arguments.length)return r;throw new Error('\"'+e+'\" is a required argument.')};var r=/^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/,n=/^data:.+\\,.+$/;function o(t){var e=t.match(r);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}function i(t){var e=\"\";return t.scheme&&(e+=t.scheme+\":\"),e+=\"//\",t.auth&&(e+=t.auth+\"@\"),t.host&&(e+=t.host),t.port&&(e+=\":\"+t.port),t.path&&(e+=t.path),e}function s(t){var r=t,n=o(t);if(n){if(!n.path)return t;r=n.path}for(var s,a=e.isAbsolute(r),u=r.split(/\\/+/),l=0,c=u.length-1;c>=0;c--)\".\"===(s=u[c])?u.splice(c,1):\"..\"===s?l++:l>0&&(\"\"===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return\"\"===(r=u.join(\"/\"))&&(r=a?\"/\":\".\"),n?(n.path=r,i(n)):r}function a(t,e){\"\"===t&&(t=\".\"),\"\"===e&&(e=\".\");var r=o(e),a=o(t);if(a&&(t=a.path||\"/\"),r&&!r.scheme)return a&&(r.scheme=a.scheme),i(r);if(r||e.match(n))return e;if(a&&!a.host&&!a.path)return a.host=e,i(a);var u=\"/\"===e.charAt(0)?e:s(t.replace(/\\/+$/,\"\")+\"/\"+e);return a?(a.path=u,i(a)):u}e.urlParse=o,e.urlGenerate=i,e.normalize=s,e.join=a,e.isAbsolute=function(t){return\"/\"===t.charAt(0)||r.test(t)},e.relative=function(t,e){\"\"===t&&(t=\".\"),t=t.replace(/\\/$/,\"\");for(var r=0;0!==e.indexOf(t+\"/\");){var n=t.lastIndexOf(\"/\");if(n<0)return e;if((t=t.slice(0,n)).match(/^([^\\/]+:\\/)?\\/*$/))return e;++r}return Array(r+1).join(\"../\")+e.substr(t.length+1)};var u=!(\"__proto__\"in Object.create(null));function l(t){return t}function c(t){if(!t)return!1;var e=t.length;if(e<9)return!1;if(95!==t.charCodeAt(e-1)||95!==t.charCodeAt(e-2)||111!==t.charCodeAt(e-3)||116!==t.charCodeAt(e-4)||111!==t.charCodeAt(e-5)||114!==t.charCodeAt(e-6)||112!==t.charCodeAt(e-7)||95!==t.charCodeAt(e-8)||95!==t.charCodeAt(e-9))return!1;for(var r=e-10;r>=0;r--)if(36!==t.charCodeAt(r))return!1;return!0}function f(t,e){return t===e?0:null===t?1:null===e?-1:t>e?1:-1}e.toSetString=u?l:function(t){return c(t)?\"$\"+t:t},e.fromSetString=u?l:function(t){return c(t)?t.slice(1):t},e.compareByOriginalPositions=function(t,e,r){var n=f(t.source,e.source);return 0!==n?n:0!=(n=t.originalLine-e.originalLine)?n:0!=(n=t.originalColumn-e.originalColumn)||r?n:0!=(n=t.generatedColumn-e.generatedColumn)?n:0!=(n=t.generatedLine-e.generatedLine)?n:f(t.name,e.name)},e.compareByGeneratedPositionsDeflated=function(t,e,r){var n=t.generatedLine-e.generatedLine;return 0!==n?n:0!=(n=t.generatedColumn-e.generatedColumn)||r?n:0!==(n=f(t.source,e.source))?n:0!=(n=t.originalLine-e.originalLine)?n:0!=(n=t.originalColumn-e.originalColumn)?n:f(t.name,e.name)},e.compareByGeneratedPositionsInflated=function(t,e){var r=t.generatedLine-e.generatedLine;return 0!==r?r:0!=(r=t.generatedColumn-e.generatedColumn)?r:0!==(r=f(t.source,e.source))?r:0!=(r=t.originalLine-e.originalLine)?r:0!=(r=t.originalColumn-e.originalColumn)?r:f(t.name,e.name)},e.parseSourceMapInput=function(t){return JSON.parse(t.replace(/^\\)]}'[^\\n]*\\n/,\"\"))},e.computeSourceURL=function(t,e,r){if(e=e||\"\",t&&(\"/\"!==t[t.length-1]&&\"/\"!==e[0]&&(t+=\"/\"),e=t+e),r){var n=o(r);if(!n)throw new Error(\"sourceMapURL could not be parsed\");if(n.path){var u=n.path.lastIndexOf(\"/\");u>=0&&(n.path=n.path.substring(0,u+1))}e=a(i(n),e)}return s(e)}},function(t,e,r){\"use strict\";e.__esModule=!0;var n=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,t.call(this,r));return n.type=\"decl\",n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(r(2)).default);e.default=n,t.exports=e.default},function(t,e,r){\"use strict\";e.__esModule=!0;var n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},o=a(r(10)),i=a(r(11)),s=a(r(3));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var r in function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.raws={},e)this[r]=e[r]}return t.prototype.error=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.source){var r=this.positionBy(e);return this.source.input.error(t,r.line,r.column,e)}return new o.default(t)},t.prototype.warn=function(t,e,r){var n={node:this};for(var o in r)n[o]=r[o];return t.warn(e,n)},t.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.prototype.toString=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default;t.stringify&&(t=t.stringify);var e=\"\";return t(this,function(t){e+=t}),e},t.prototype.clone=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function t(e,r){var o=new e.constructor;for(var i in e)if(e.hasOwnProperty(i)){var s=e[i],a=void 0===s?\"undefined\":n(s);\"parent\"===i&&\"object\"===a?r&&(o[i]=r):\"source\"===i?o[i]=s:s instanceof Array?o[i]=s.map(function(e){return t(e,o)}):(\"object\"===a&&null!==s&&(s=t(s)),o[i]=s)}return o}(this);for(var r in t)e[r]=t[r];return e},t.prototype.cloneBefore=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.clone(t);return this.parent.insertBefore(this,e),e},t.prototype.cloneAfter=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.clone(t);return this.parent.insertAfter(this,e),e},t.prototype.replaceWith=function(){if(this.parent){for(var t=arguments.length,e=Array(t),r=0;r=n.length)break;s=n[i++]}else{if((i=n.next()).done)break;s=i.value}var a=s;this.parent.insertBefore(this,a)}this.remove()}return this},t.prototype.next=function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}},t.prototype.prev=function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}},t.prototype.before=function(t){return this.parent.insertBefore(this,t),this},t.prototype.after=function(t){return this.parent.insertAfter(this,t),this},t.prototype.toJSON=function(){var t={};for(var e in this)if(this.hasOwnProperty(e)&&\"parent\"!==e){var r=this[e];r instanceof Array?t[e]=r.map(function(t){return\"object\"===(void 0===t?\"undefined\":n(t))&&t.toJSON?t.toJSON():t}):\"object\"===(void 0===r?\"undefined\":n(r))&&r.toJSON?t[e]=r.toJSON():t[e]=r}return t},t.prototype.raw=function(t,e){return(new i.default).raw(this,t,e)},t.prototype.root=function(){for(var t=this;t.parent;)t=t.parent;return t},t.prototype.cleanRaws=function(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between},t.prototype.positionInside=function(t){for(var e=this.toString(),r=this.source.start.column,n=this.source.start.line,o=0;o=0;n--){var o=t[n];\".\"===o?t.splice(n,1):\"..\"===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift(\"..\");return t}var n=/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/,o=function(t){return n.exec(t).slice(1)};function i(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n=-1&&!n;o--){var s=o>=0?arguments[o]:t.cwd();if(\"string\"!=typeof s)throw new TypeError(\"Arguments to path.resolve must be strings\");s&&(e=s+\"/\"+e,n=\"/\"===s.charAt(0))}return e=r(i(e.split(\"/\"),function(t){return!!t}),!n).join(\"/\"),(n?\"/\":\"\")+e||\".\"},e.normalize=function(t){var n=e.isAbsolute(t),o=\"/\"===s(t,-1);return(t=r(i(t.split(\"/\"),function(t){return!!t}),!n).join(\"/\"))||n||(t=\".\"),t&&o&&(t+=\"/\"),(n?\"/\":\"\")+t},e.isAbsolute=function(t){return\"/\"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(i(t,function(t,e){if(\"string\"!=typeof t)throw new TypeError(\"Arguments to path.join must be strings\");return t}).join(\"/\"))},e.relative=function(t,r){function n(t){for(var e=0;e=0&&\"\"===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=e.resolve(t).substr(1),r=e.resolve(r).substr(1);for(var o=n(t.split(\"/\")),i=n(r.split(\"/\")),s=Math.min(o.length,i.length),a=s,u=0;u=n.length)break;s=n[i++]}else{if((i=n.next()).done)break;s=i.value}var a=s,u=this.normalize(a,this.last),l=Array.isArray(u),c=0;for(u=l?u:u[Symbol.iterator]();;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if((c=u.next()).done)break;f=c.value}var p=f;this.nodes.push(p)}}return this},e.prototype.prepend=function(){for(var t=arguments.length,e=Array(t),r=0;r=n.length)break;s=n[i++]}else{if((i=n.next()).done)break;s=i.value}var a=s,u=this.normalize(a,this.first,\"prepend\").reverse(),l=u,c=Array.isArray(l),f=0;for(l=c?l:l[Symbol.iterator]();;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if((f=l.next()).done)break;p=f.value}var h=p;this.nodes.unshift(h)}for(var d in this.indexes)this.indexes[d]=this.indexes[d]+u.length}return this},e.prototype.cleanRaws=function(e){if(t.prototype.cleanRaws.call(this,e),this.nodes){var r=this.nodes,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var i;if(n){if(o>=r.length)break;i=r[o++]}else{if((o=r.next()).done)break;i=o.value}i.cleanRaws(e)}}},e.prototype.insertBefore=function(t,e){var r=0===(t=this.index(t))&&\"prepend\",n=this.normalize(e,this.nodes[t],r).reverse(),o=n,i=Array.isArray(o),s=0;for(o=i?o:o[Symbol.iterator]();;){var a;if(i){if(s>=o.length)break;a=o[s++]}else{if((s=o.next()).done)break;a=s.value}var u=a;this.nodes.splice(t,0,u)}var l=void 0;for(var c in this.indexes)t<=(l=this.indexes[c])&&(this.indexes[c]=l+n.length);return this},e.prototype.insertAfter=function(t,e){t=this.index(t);var r=this.normalize(e,this.nodes[t]).reverse(),n=r,o=Array.isArray(n),i=0;for(n=o?n:n[Symbol.iterator]();;){var s;if(o){if(i>=n.length)break;s=n[i++]}else{if((i=n.next()).done)break;s=i.value}var a=s;this.nodes.splice(t+1,0,a)}var u=void 0;for(var l in this.indexes)t<(u=this.indexes[l])&&(this.indexes[l]=u+r.length);return this},e.prototype.removeChild=function(t){t=this.index(t),this.nodes[t].parent=void 0,this.nodes.splice(t,1);var e=void 0;for(var r in this.indexes)(e=this.indexes[r])>=t&&(this.indexes[r]=e-1);return this},e.prototype.removeAll=function(){var t=this.nodes,e=Array.isArray(t),r=0;for(t=e?t:t[Symbol.iterator]();;){var n;if(e){if(r>=t.length)break;n=t[r++]}else{if((r=t.next()).done)break;n=r.value}n.parent=void 0}return this.nodes=[],this},e.prototype.replaceValues=function(t,e,r){return r||(r=e,e={}),this.walkDecls(function(n){e.props&&-1===e.props.indexOf(n.prop)||e.fast&&-1===n.value.indexOf(e.fast)||(n.value=n.value.replace(t,r))}),this},e.prototype.every=function(t){return this.nodes.every(t)},e.prototype.some=function(t){return this.nodes.some(t)},e.prototype.index=function(t){return\"number\"==typeof t?t:this.nodes.indexOf(t)},e.prototype.normalize=function(t,e){var n=this;if(\"string\"==typeof t)t=function t(e){return e.map(function(e){return e.nodes&&(e.nodes=t(e.nodes)),delete e.source,e})}(r(5)(t).nodes);else if(Array.isArray(t)){var s=t=t.slice(0),a=Array.isArray(s),u=0;for(s=a?s:s[Symbol.iterator]();;){var l;if(a){if(u>=s.length)break;l=s[u++]}else{if((u=s.next()).done)break;l=u.value}var c=l;c.parent&&c.parent.removeChild(c,\"ignore\")}}else if(\"root\"===t.type){var f=t=t.nodes.slice(0),p=Array.isArray(f),h=0;for(f=p?f:f[Symbol.iterator]();;){var d;if(p){if(h>=f.length)break;d=f[h++]}else{if((h=f.next()).done)break;d=h.value}var g=d;g.parent&&g.parent.removeChild(g,\"ignore\")}}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error(\"Value field is missed in node creation\");\"string\"!=typeof t.value&&(t.value=String(t.value)),t=[new o.default(t)]}else if(t.selector){t=[new(r(9))(t)]}else if(t.name){t=[new(r(7))(t)]}else{if(!t.text)throw new Error(\"Unknown node type in node creation\");t=[new i.default(t)]}return t.map(function(t){return t.parent&&t.parent.removeChild(t),void 0===t.raws.before&&e&&void 0!==e.raws.before&&(t.raws.before=e.raws.before.replace(/[^\\s]/g,\"\")),t.parent=n,t})},n(e,[{key:\"first\",get:function(){if(this.nodes)return this.nodes[0]}},{key:\"last\",get:function(){if(this.nodes)return this.nodes[this.nodes.length-1]}}]),e}(s(r(2)).default);e.default=a,t.exports=e.default},function(t,e,r){\"use strict\";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r\",void 0!==this.line&&(this.message+=\":\"+this.line+\":\"+this.column),this.message+=\": \"+this.reason},t.prototype.showSourceCode=function(t){var e=this;if(!this.source)return\"\";var r=this.source;i.default&&(void 0===t&&(t=n.default.stdout),t&&(r=(0,i.default)(r)));var s=r.split(/\\r?\\n/),a=Math.max(this.line-3,0),u=Math.min(this.line+2,s.length),l=String(u).length;function c(e){return t&&o.default.red?o.default.red.bold(e):e}function f(e){return t&&o.default.gray?o.default.gray(e):e}return s.slice(a,u).map(function(t,r){var n=a+1+r,o=\" \"+(\" \"+n).slice(-l)+\" | \";if(n===e.line){var i=f(o.replace(/\\d/g,\" \"))+t.slice(0,e.column-1).replace(/[^\\t]/g,\" \");return c(\">\")+f(o)+t+\"\\n \"+i+c(\"^\")}return\" \"+f(o)+t}).join(\"\\n\")},t.prototype.toString=function(){var t=this.showSourceCode();return t&&(t=\"\\n\\n\"+t+\"\\n\"),this.name+\": \"+this.message+t},t}();e.default=a,t.exports=e.default},function(t,e,r){\"use strict\";e.__esModule=!0;var n={colon:\": \",indent:\" \",beforeDecl:\"\\n\",beforeRule:\"\\n\",beforeOpen:\" \",beforeClose:\"\\n\",beforeComment:\"\\n\",after:\"\\n\",emptyBody:\"\",commentLeft:\" \",commentRight:\" \"};var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.builder=e}return t.prototype.stringify=function(t,e){this[t.type](t,e)},t.prototype.root=function(t){this.body(t),t.raws.after&&this.builder(t.raws.after)},t.prototype.comment=function(t){var e=this.raw(t,\"left\",\"commentLeft\"),r=this.raw(t,\"right\",\"commentRight\");this.builder(\"/*\"+e+t.text+r+\"*/\",t)},t.prototype.decl=function(t,e){var r=this.raw(t,\"between\",\"colon\"),n=t.prop+r+this.rawValue(t,\"value\");t.important&&(n+=t.raws.important||\" !important\"),e&&(n+=\";\"),this.builder(n,t)},t.prototype.rule=function(t){this.block(t,this.rawValue(t,\"selector\")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,\"end\")},t.prototype.atrule=function(t,e){var r=\"@\"+t.name,n=t.params?this.rawValue(t,\"params\"):\"\";if(void 0!==t.raws.afterName?r+=t.raws.afterName:n&&(r+=\" \"),t.nodes)this.block(t,r+n);else{var o=(t.raws.between||\"\")+(e?\";\":\"\");this.builder(r+n+o,t)}},t.prototype.body=function(t){for(var e=t.nodes.length-1;e>0&&\"comment\"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,\"semicolon\"),n=0;n0&&void 0!==t.raws.after)return-1!==(e=t.raws.after).indexOf(\"\\n\")&&(e=e.replace(/[^\\n]+$/,\"\")),!1}),e&&(e=e.replace(/[^\\s]/g,\"\")),e},t.prototype.rawBeforeOpen=function(t){var e=void 0;return t.walk(function(t){if(\"decl\"!==t.type&&void 0!==(e=t.raws.between))return!1}),e},t.prototype.rawColon=function(t){var e=void 0;return t.walkDecls(function(t){if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\\s:]/g,\"\"),!1}),e},t.prototype.beforeAfter=function(t,e){var r=void 0;r=\"decl\"===t.type?this.raw(t,null,\"beforeDecl\"):\"comment\"===t.type?this.raw(t,null,\"beforeComment\"):\"before\"===e?this.raw(t,null,\"beforeRule\"):this.raw(t,null,\"beforeClose\");for(var n=t.parent,o=0;n&&\"root\"!==n.type;)o+=1,n=n.parent;if(-1!==r.indexOf(\"\\n\")){var i=this.raw(t,null,\"indent\");if(i.length)for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.version=\"7.0.2\",this.plugins=this.normalize(e)}return t.prototype.use=function(t){return this.plugins=this.plugins.concat(this.normalize([t])),this},t.prototype.process=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return 0===this.plugins.length&&(e.parser,e.stringifier),new o.default(this,t,e)}),t.prototype.normalize=function(t){var e=[],r=t,o=Array.isArray(r),i=0;for(r=o?r:r[Symbol.iterator]();;){var s;if(o){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if(a.postcss&&(a=a.postcss),\"object\"===(void 0===a?\"undefined\":n(a))&&Array.isArray(a.plugins))e=e.concat(a.plugins);else if(\"function\"==typeof a)e.push(a);else{if(\"object\"!==(void 0===a?\"undefined\":n(a))||!a.parse&&!a.stringify)throw new Error(a+\" is not a PostCSS plugin\")}}return e},t}();e.default=i,t.exports=e.default},function(t,e,r){\"use strict\";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r=this.processor.plugins.length)return this.processed=!0,t();try{var n=this.processor.plugins[this.plugin],o=this.run(n);this.plugin+=1,c(o)?o.then(function(){r.asyncTick(t,e)}).catch(function(t){r.handleError(t,n),r.processed=!0,e(t)}):this.asyncTick(t,e)}catch(t){this.processed=!0,e(t)}},t.prototype.async=function(){var t=this;return this.processed?new Promise(function(e,r){t.error?r(t.error):e(t.stringify())}):this.processing?this.processing:(this.processing=new Promise(function(e,r){if(t.error)return r(t.error);t.plugin=0,t.asyncTick(e,r)}).then(function(){return t.processed=!0,t.stringify()}),this.processing)},t.prototype.sync=function(){if(this.processed)return this.result;if(this.processed=!0,this.processing)throw new Error(\"Use process(css).then(cb) to work with async plugins\");if(this.error)throw this.error;var t=this.result.processor.plugins,e=Array.isArray(t),r=0;for(t=e?t:t[Symbol.iterator]();;){var n;if(e){if(r>=t.length)break;n=t[r++]}else{if((r=t.next()).done)break;n=r.value}var o=n;if(c(this.run(o)))throw new Error(\"Use process(css).then(cb) to work with async plugins\")}return this.result},t.prototype.run=function(t){this.result.lastPlugin=t;try{return t(this.result.root,this.result)}catch(e){throw this.handleError(e,t),e}},t.prototype.stringify=function(){if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=s.default;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=new i.default(e,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result},n(t,[{key:\"processor\",get:function(){return this.result.processor}},{key:\"opts\",get:function(){return this.result.opts}},{key:\"css\",get:function(){return this.stringify().css}},{key:\"content\",get:function(){return this.stringify().content}},{key:\"map\",get:function(){return this.stringify().map}},{key:\"root\",get:function(){return this.sync().root}},{key:\"messages\",get:function(){return this.sync().messages}}]),t}();e.default=f,t.exports=e.default},function(t,e,r){\"use strict\";(function(t){\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\nvar n=r(29),o=r(30),i=r(31);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()=s())throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+s().toString(16)+\" bytes\");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if(\"undefined\"!=typeof ArrayBuffer&&\"function\"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;\"string\"!=typeof t&&(t=\"\"+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":case void 0:return F(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return Y(t).length;default:if(n)return F(t).length;e=(\"\"+e).toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,o){if(0===t.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if(\"string\"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,o);if(\"number\"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&\"function\"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,o);throw new TypeError(\"val must be string, number or Buffer\")}function m(t,e,r,n,o){var i,s=1,a=t.length,u=e.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var c=-1;for(i=r;ia&&(r=a-u),i=r;i>=0;i--){for(var f=!0,p=0;po&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError(\"Invalid hex string\");n>i/2&&(n=i/2);for(var s=0;s>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function C(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function E(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o239?4:l>223?3:l>191?2:1;if(o+f<=r)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&l)<<6|63&i)>127&&(c=u);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(u=(15&l)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=f}return function(t){var e=t.length;if(e<=O)return String.fromCharCode.apply(String,t);var r=\"\",n=0;for(;nthis.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\"\";if((r>>>=0)<=(e>>>=0))return\"\";for(t||(t=\"utf8\");;)switch(t){case\"hex\":return R(this,e,r);case\"utf8\":case\"utf-8\":return E(this,e,r);case\"ascii\":return M(this,e,r);case\"latin1\":case\"binary\":return x(this,e,r);case\"base64\":return C(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return k(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t=\"\",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString(\"hex\",0,r).match(/.{2}/g).join(\" \"),this.length>r&&(t+=\" ... \")),\"\"},u.prototype.compare=function(t,e,r,n,o){if(!u.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError(\"out of range index\");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,o>>>=0,this===t)return 0;for(var i=o-n,s=r-e,a=Math.min(i,s),l=this.slice(n,o),c=t.slice(e,r),f=0;fo)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");for(var i=!1;;)switch(n){case\"hex\":return v(this,t,e,r);case\"utf8\":case\"utf-8\":return w(this,t,e,r);case\"ascii\":return b(this,t,e,r);case\"latin1\":case\"binary\":return _(this,t,e,r);case\"base64\":return A(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return S(this,t,e,r);default:if(i)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function M(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var o=e;on)&&(r=n);for(var o=\"\",i=e;ir)throw new RangeError(\"Trying to access beyond buffer length\")}function L(t,e,r,n,o,i){if(!u.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError(\"Index out of range\")}function T(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o>>8*(n?o:1-o)}function B(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o>>8*(n?o:3-o)&255}function j(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function U(t,e,r,n,i){return i||j(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function I(t,e,r,n,i){return i||j(t,0,r,8),o.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if(t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(o*=256);)n+=this[t+--e]*o;return n},u.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):B(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);L(this,t,e,r,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);L(this,t,e,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):B(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError(\"sourceStart out of bounds\");if(n<0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),\"number\"==typeof t)for(i=e;i55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error(\"Invalid code point\");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Y(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\\s+|\\s+$/g,\"\")}(t).replace(D,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function z(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}}).call(this,r(28))},function(t,e,r){e.SourceMapGenerator=r(16).SourceMapGenerator,e.SourceMapConsumer=r(34).SourceMapConsumer,e.SourceNode=r(37).SourceNode},function(t,e,r){var n=r(17),o=r(0),i=r(18).ArraySet,s=r(33).MappingList;function a(t){t||(t={}),this._file=o.getArg(t,\"file\",null),this._sourceRoot=o.getArg(t,\"sourceRoot\",null),this._skipValidation=o.getArg(t,\"skipValidation\",!1),this._sources=new i,this._names=new i,this._mappings=new s,this._sourcesContents=null}a.prototype._version=3,a.fromSourceMap=function(t){var e=t.sourceRoot,r=new a({file:t.file,sourceRoot:e});return t.eachMapping(function(t){var n={generated:{line:t.generatedLine,column:t.generatedColumn}};null!=t.source&&(n.source=t.source,null!=e&&(n.source=o.relative(e,n.source)),n.original={line:t.originalLine,column:t.originalColumn},null!=t.name&&(n.name=t.name)),r.addMapping(n)}),t.sources.forEach(function(n){var i=n;null!==e&&(i=o.relative(e,n)),r._sources.has(i)||r._sources.add(i);var s=t.sourceContentFor(n);null!=s&&r.setSourceContent(n,s)}),r},a.prototype.addMapping=function(t){var e=o.getArg(t,\"generated\"),r=o.getArg(t,\"original\",null),n=o.getArg(t,\"source\",null),i=o.getArg(t,\"name\",null);this._skipValidation||this._validateMapping(e,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i})},a.prototype.setSourceContent=function(t,e){var r=t;null!=this._sourceRoot&&(r=o.relative(this._sourceRoot,r)),null!=e?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(r)]=e):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},a.prototype.applySourceMap=function(t,e,r){var n=e;if(null==e){if(null==t.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\\'s \"file\" property. Both were omitted.');n=t.file}var s=this._sourceRoot;null!=s&&(n=o.relative(s,n));var a=new i,u=new i;this._mappings.unsortedForEach(function(e){if(e.source===n&&null!=e.originalLine){var i=t.originalPositionFor({line:e.originalLine,column:e.originalColumn});null!=i.source&&(e.source=i.source,null!=r&&(e.source=o.join(r,e.source)),null!=s&&(e.source=o.relative(s,e.source)),e.originalLine=i.line,e.originalColumn=i.column,null!=i.name&&(e.name=i.name))}var l=e.source;null==l||a.has(l)||a.add(l);var c=e.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,t.sources.forEach(function(e){var n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=o.join(r,e)),null!=s&&(e=o.relative(s,e)),this.setSourceContent(e,n))},this)},a.prototype._validateMapping=function(t,e,r,n){if(e&&\"number\"!=typeof e.line&&\"number\"!=typeof e.column)throw new Error(\"original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.\");if((!(t&&\"line\"in t&&\"column\"in t&&t.line>0&&t.column>=0)||e||r||n)&&!(t&&\"line\"in t&&\"column\"in t&&e&&\"line\"in e&&\"column\"in e&&t.line>0&&t.column>=0&&e.line>0&&e.column>=0&&r))throw new Error(\"Invalid mapping: \"+JSON.stringify({generated:t,source:r,original:e,name:n}))},a.prototype._serializeMappings=function(){for(var t,e,r,i,s=0,a=1,u=0,l=0,c=0,f=0,p=\"\",h=this._mappings.toArray(),d=0,g=h.length;d0){if(!o.compareByGeneratedPositionsInflated(e,h[d-1]))continue;t+=\",\"}t+=n.encode(e.generatedColumn-s),s=e.generatedColumn,null!=e.source&&(i=this._sources.indexOf(e.source),t+=n.encode(i-f),f=i,t+=n.encode(e.originalLine-1-l),l=e.originalLine-1,t+=n.encode(e.originalColumn-u),u=e.originalColumn,null!=e.name&&(r=this._names.indexOf(e.name),t+=n.encode(r-c),c=r)),p+=t}return p},a.prototype._generateSourcesContent=function(t,e){return t.map(function(t){if(!this._sourcesContents)return null;null!=e&&(t=o.relative(e,t));var r=o.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},a.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(t.file=this._file),null!=this._sourceRoot&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=a},function(t,e,r){var n=r(32);e.encode=function(t){var e,r=\"\",o=function(t){return t<0?1+(-t<<1):0+(t<<1)}(t);do{e=31&o,(o>>>=5)>0&&(e|=32),r+=n.encode(e)}while(o>0);return r},e.decode=function(t,e,r){var o,i,s=t.length,a=0,u=0;do{if(e>=s)throw new Error(\"Expected more digits in base 64 VLQ value.\");if(-1===(i=n.decode(t.charCodeAt(e++))))throw new Error(\"Invalid base64 digit: \"+t.charAt(e-1));o=!!(32&i),a+=(i&=31)<>1;return 1==(1&t)?-e:e}(a),r.rest=e}},function(t,e,r){var n=r(0),o=Object.prototype.hasOwnProperty,i=\"undefined\"!=typeof Map;function s(){this._array=[],this._set=i?new Map:Object.create(null)}s.fromArray=function(t,e){for(var r=new s,n=0,o=t.length;n=0)return e}else{var r=n.toSetString(t);if(o.call(this._set,r))return this._set[r]}throw new Error('\"'+t+'\" is not in the set.')},s.prototype.at=function(t){if(t>=0&&t0&&(s-=1):0===s&&-1!==e.indexOf(c)&&(i=!0),i?(\"\"!==o&&n.push(o.trim()),o=\"\",i=!1):o+=c}return(r||\"\"!==o)&&n.push(o.trim()),n},space:function(t){return n.split(t,[\" \",\"\\n\",\"\\t\"])},comma:function(t){return n.split(t,[\",\"],!0)}};e.default=n,t.exports=e.default},function(t,e,r){\"use strict\";e.__esModule=!0;var n=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,t.call(this,r));return n.type=\"root\",n.nodes||(n.nodes=[]),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.removeChild=function(e,r){var n=this.index(e);return!r&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),t.prototype.removeChild.call(this,e)},e.prototype.normalize=function(e,r,n){var o=t.prototype.normalize.call(this,e);if(r)if(\"prepend\"===n)this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r){var i=o,s=Array.isArray(i),a=0;for(i=s?i:i[Symbol.iterator]();;){var u;if(s){if(a>=i.length)break;u=i[a++]}else{if((a=i.next()).done)break;u=a.value}u.raws.before=r.raws.before}}return o},e.prototype.toResult=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new(r(13))(new(r(12)),this,t).stringify()},e}(function(t){return t&&t.__esModule?t:{default:t}}(r(8)).default);e.default=n,t.exports=e.default},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};n({},e);t.setCustomParserCss(o.default)}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.createAtRule=e.createRule=e.log=void 0;var n=Object.assign||function(t){for(var e=1;e=0?t.nodes.forEach(function(t){e.push(n({},s(t),{atRule:r,params:o}))}):e.push(n({},s(t),{atRule:r}))};e.default=function(t,e){var r=[];i(e,[\"Input CSS\",t]);var n=o.default.parse(t);return i(e,[\"PostCSS AST\",n]),n.nodes.forEach(function(t){switch(t.type){case\"rule\":r.push(s(t));break;case\"atrule\":a(t,r)}}),i(e,[\"Output\",r]),r}},function(t,e,r){\"use strict\";e.__esModule=!0;var n=h(r(1)),o=h(r(12)),i=h(r(3)),s=h(r(6)),a=h(r(7)),u=h(r(47)),l=h(r(5)),c=h(r(19)),f=h(r(9)),p=h(r(20));function h(t){return t&&t.__esModule?t:{default:t}}function d(){for(var t=arguments.length,e=Array(t),r=0;r0},t.prototype.previous=function(){var t=this;return this.previousMaps||(this.previousMaps=[],this.root.walk(function(e){if(e.source&&e.source.input.map){var r=e.source.input.map;-1===t.previousMaps.indexOf(r)&&t.previousMaps.push(r)}})),this.previousMaps},t.prototype.isInline=function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(function(t){return t.inline}))},t.prototype.isSourcesContent=function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(t){return t.withContent()})},t.prototype.clearAnnotation=function(){if(!1!==this.mapOpts.annotation)for(var t=void 0,e=this.root.nodes.length-1;e>=0;e--)\"comment\"===(t=this.root.nodes[e]).type&&0===t.text.indexOf(\"# sourceMappingURL=\")&&this.root.removeChild(e)},t.prototype.setSourcesContent=function(){var t=this,e={};this.root.walk(function(r){if(r.source){var n=r.source.input.from;if(n&&!e[n]){e[n]=!0;var o=t.relative(n);t.map.setSourceContent(o,r.source.input.css)}}})},t.prototype.applyPrevMaps=function(){var t=this.previous(),e=Array.isArray(t),r=0;for(t=e?t:t[Symbol.iterator]();;){var n;if(e){if(r>=t.length)break;n=t[r++]}else{if((r=t.next()).done)break;n=r.value}var s=n,a=this.relative(s.file),u=s.root||i.default.dirname(s.file),l=void 0;!1===this.mapOpts.sourcesContent?(l=new o.default.SourceMapConsumer(s.text)).sourcesContent&&(l.sourcesContent=l.sourcesContent.map(function(){return null})):l=s.consumer(),this.map.applySourceMap(l,a,this.relative(u))}},t.prototype.isAnnotation=function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(t){return t.annotation}))},t.prototype.toBase64=function(t){return n?n.from(t).toString(\"base64\"):window.btoa(unescape(encodeURIComponent(t)))},t.prototype.addAnnotation=function(){var t=void 0;t=this.isInline()?\"data:application/json;base64,\"+this.toBase64(this.map.toString()):\"string\"==typeof this.mapOpts.annotation?this.mapOpts.annotation:this.outputFile()+\".map\";var e=\"\\n\";-1!==this.css.indexOf(\"\\r\\n\")&&(e=\"\\r\\n\"),this.css+=e+\"\"},t.prototype.outputFile=function(){return this.opts.to?this.relative(this.opts.to):this.opts.from?this.relative(this.opts.from):\"to.css\"},t.prototype.generateMap=function(){return this.generateString(),this.isSourcesContent()&&this.setSourcesContent(),this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.prototype.relative=function(t){if(0===t.indexOf(\"<\"))return t;if(/^\\w+:\\/\\//.test(t))return t;var e=this.opts.to?i.default.dirname(this.opts.to):\".\";return\"string\"==typeof this.mapOpts.annotation&&(e=i.default.dirname(i.default.resolve(e,this.mapOpts.annotation))),t=i.default.relative(e,t),\"\\\\\"===i.default.sep?t.replace(/\\\\/g,\"/\"):t},t.prototype.sourcePath=function(t){return this.mapOpts.from?this.mapOpts.from:this.relative(t.source.input.from)},t.prototype.generateString=function(){var t=this;this.css=\"\",this.map=new o.default.SourceMapGenerator({file:this.outputFile()});var e=1,r=1,n=void 0,i=void 0;this.stringify(this.root,function(o,s,a){t.css+=o,s&&\"end\"!==a&&(s.source&&s.source.start?t.map.addMapping({source:t.sourcePath(s),generated:{line:e,column:r-1},original:{line:s.source.start.line,column:s.source.start.column-1}}):t.map.addMapping({source:\"\",original:{line:1,column:0},generated:{line:e,column:r-1}})),(n=o.match(/\\n/g))?(e+=n.length,i=o.lastIndexOf(\"\\n\"),r=o.length-i):r+=o.length,s&&\"start\"!==a&&(s.source&&s.source.end?t.map.addMapping({source:t.sourcePath(s),generated:{line:e,column:r-1},original:{line:s.source.end.line,column:s.source.end.column}}):t.map.addMapping({source:\"\",original:{line:1,column:0},generated:{line:e,column:r-1}}))})},t.prototype.generate=function(){if(this.clearAnnotation(),this.isMap())return this.generateMap();var t=\"\";return this.stringify(this.root,function(e){t+=e}),[t]},t}();e.default=a,t.exports=e.default}).call(this,r(14).Buffer)},function(t,e){var r;r=function(){return this}();try{r=r||Function(\"return this\")()||(0,eval)(\"this\")}catch(t){\"object\"==typeof window&&(r=window)}t.exports=r},function(t,e,r){\"use strict\";e.byteLength=function(t){var e=l(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){for(var e,r=l(t),n=r[0],s=r[1],a=new i(function(t,e,r){return 3*(e+r)/4-r}(0,n,s)),u=0,c=s>0?n-4:n,f=0;f>16&255,a[u++]=e>>8&255,a[u++]=255&e;2===s&&(e=o[t.charCodeAt(f)]<<2|o[t.charCodeAt(f+1)]>>4,a[u++]=255&e);1===s&&(e=o[t.charCodeAt(f)]<<10|o[t.charCodeAt(f+1)]<<4|o[t.charCodeAt(f+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e);return a},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],s=0,a=r-o;sa?a:s+16383));1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+\"==\")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+\"=\"));return i.join(\"\")};for(var n=[],o=[],i=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,s=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",a=0,u=s.length;a0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=t.indexOf(\"=\");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]}function f(t,e,r){for(var n,o=[],i=e;i>1,c=-7,f=r?o-1:0,p=r?-1:1,h=t[e+f];for(f+=p,i=h&(1<<-c)-1,h>>=-c,c+=a;c>0;i=256*i+t[e+f],f+=p,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=n;c>0;s=256*s+t[e+f],f+=p,c-=8);if(0===i)i=1-l;else{if(i===u)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),i-=l}return(h?-1:1)*s*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var s,a,u,l=8*i-o-1,c=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(e*u-1)*Math.pow(2,o),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;t[r+h]=255&a,h+=d,a/=256,o-=8);for(s=s<0;t[r+h]=255&s,h+=d,s/=256,l-=8);t[r+h-d]|=128*g}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return\"[object Array]\"==r.call(t)}},function(t,e){var r=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\");e.encode=function(t){if(0<=t&&tr||o==r&&s>=i||n.compareByGeneratedPositionsInflated(t,e)<=0}(this._last,t)?(this._sorted=!1,this._array.push(t)):(this._last=t,this._array.push(t))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(n.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=o},function(t,e,r){var n=r(0),o=r(35),i=r(18).ArraySet,s=r(17),a=r(36).quickSort;function u(t,e){var r=t;return\"string\"==typeof t&&(r=n.parseSourceMapInput(t)),null!=r.sections?new f(r,e):new l(r,e)}function l(t,e){var r=t;\"string\"==typeof t&&(r=n.parseSourceMapInput(t));var o=n.getArg(r,\"version\"),s=n.getArg(r,\"sources\"),a=n.getArg(r,\"names\",[]),u=n.getArg(r,\"sourceRoot\",null),l=n.getArg(r,\"sourcesContent\",null),c=n.getArg(r,\"mappings\"),f=n.getArg(r,\"file\",null);if(o!=this._version)throw new Error(\"Unsupported version: \"+o);u&&(u=n.normalize(u)),s=s.map(String).map(n.normalize).map(function(t){return u&&n.isAbsolute(u)&&n.isAbsolute(t)?n.relative(u,t):t}),this._names=i.fromArray(a.map(String),!0),this._sources=i.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map(function(t){return n.computeSourceURL(u,t,e)}),this.sourceRoot=u,this.sourcesContent=l,this._mappings=c,this._sourceMapURL=e,this.file=f}function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function f(t,e){var r=t;\"string\"==typeof t&&(r=n.parseSourceMapInput(t));var o=n.getArg(r,\"version\"),s=n.getArg(r,\"sections\");if(o!=this._version)throw new Error(\"Unsupported version: \"+o);this._sources=new i,this._names=new i;var a={line:-1,column:0};this._sections=s.map(function(t){if(t.url)throw new Error(\"Support for url field in sections not implemented.\");var r=n.getArg(t,\"offset\"),o=n.getArg(r,\"line\"),i=n.getArg(r,\"column\");if(o=0){var a=this._originalMappings[s];if(void 0===t.column)for(var u=a.originalLine;a&&a.originalLine===u;)i.push({line:n.getArg(a,\"generatedLine\",null),column:n.getArg(a,\"generatedColumn\",null),lastColumn:n.getArg(a,\"lastGeneratedColumn\",null)}),a=this._originalMappings[++s];else for(var l=a.originalColumn;a&&a.originalLine===e&&a.originalColumn==l;)i.push({line:n.getArg(a,\"generatedLine\",null),column:n.getArg(a,\"generatedColumn\",null),lastColumn:n.getArg(a,\"lastGeneratedColumn\",null)}),a=this._originalMappings[++s]}return i},e.SourceMapConsumer=u,l.prototype=Object.create(u.prototype),l.prototype.consumer=u,l.prototype._findSourceIndex=function(t){var e,r=t;if(null!=this.sourceRoot&&(r=n.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(e=0;e1&&(r.source=g+i[1],g+=i[1],r.originalLine=h+i[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=d+i[3],d=r.originalColumn,i.length>4&&(r.name=y+i[4],y+=i[4])),A.push(r),\"number\"==typeof r.originalLine&&_.push(r)}a(A,n.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,a(_,n.compareByOriginalPositions),this.__originalMappings=_},l.prototype._findMapping=function(t,e,r,n,i,s){if(t[r]<=0)throw new TypeError(\"Line must be greater than or equal to 1, got \"+t[r]);if(t[n]<0)throw new TypeError(\"Column must be greater than or equal to 0, got \"+t[n]);return o.search(t,e,i,s)},l.prototype.computeColumnSpans=function(){for(var t=0;t=0){var o=this._generatedMappings[r];if(o.generatedLine===e.generatedLine){var i=n.getArg(o,\"source\",null);null!==i&&(i=this._sources.at(i),i=n.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=n.getArg(o,\"name\",null);return null!==s&&(s=this._names.at(s)),{source:i,line:n.getArg(o,\"originalLine\",null),column:n.getArg(o,\"originalColumn\",null),name:s}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return null==t}))},l.prototype.sourceContentFor=function(t,e){if(!this.sourcesContent)return null;var r=this._findSourceIndex(t);if(r>=0)return this.sourcesContent[r];var o,i=t;if(null!=this.sourceRoot&&(i=n.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(o=n.urlParse(this.sourceRoot))){var s=i.replace(/^file:\\/\\//,\"\");if(\"file\"==o.scheme&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||\"/\"==o.path)&&this._sources.has(\"/\"+i))return this.sourcesContent[this._sources.indexOf(\"/\"+i)]}if(e)return null;throw new Error('\"'+i+'\" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(t){var e=n.getArg(t,\"source\");if((e=this._findSourceIndex(e))<0)return{line:null,column:null,lastColumn:null};var r={source:e,originalLine:n.getArg(t,\"line\"),originalColumn:n.getArg(t,\"column\")},o=this._findMapping(r,this._originalMappings,\"originalLine\",\"originalColumn\",n.compareByOriginalPositions,n.getArg(t,\"bias\",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:n.getArg(i,\"generatedLine\",null),column:n.getArg(i,\"generatedColumn\",null),lastColumn:n.getArg(i,\"lastGeneratedColumn\",null)}}return{line:null,column:null,lastColumn:null}},e.BasicSourceMapConsumer=l,f.prototype=Object.create(u.prototype),f.prototype.constructor=u,f.prototype._version=3,Object.defineProperty(f.prototype,\"sources\",{get:function(){for(var t=[],e=0;e0?n-u>1?t(u,n,o,i,s,a):a==e.LEAST_UPPER_BOUND?n1?t(r,u,o,i,s,a):a==e.LEAST_UPPER_BOUND?u:r<0?-1:r}(-1,r.length,t,r,n,o||e.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===n(r[i],r[i-1],!0);)--i;return i}},function(t,e){function r(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function n(t,e,o,i){if(o=0;e--)this.prepend(t[e]);else{if(!t[s]&&\"string\"!=typeof t)throw new TypeError(\"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \"+t);this.children.unshift(t)}return this},a.prototype.walk=function(t){for(var e,r=0,n=this.children.length;r0){for(e=[],r=0;r1)for(var r=1;r1&&void 0!==arguments[1]?arguments[1]:{};e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);var r=new o.default(t,e);return this.messages.push(r),r},t.prototype.warnings=function(){return this.messages.filter(function(t){return\"warning\"===t.type})},n(t,[{key:\"content\",get:function(){return this.css}}]),t}();e.default=i,t.exports=e.default},function(t,e,r){\"use strict\";e.__esModule=!0;var n=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.type=\"warning\",this.text=e,r.node&&r.node.source){var n=r.node.positionBy(r);this.line=n.line,this.column=n.column}for(var o in r)this[o]=r[o]}return t.prototype.toString=function(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+\": \"+this.text:this.text},t}();e.default=n,t.exports=e.default},function(t,e,r){\"use strict\";e.__esModule=!0;var n=l(r(1)),o=l(r(43)),i=l(r(6)),s=l(r(7)),a=l(r(20)),u=l(r(9));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.input=e,this.root=new a.default,this.current=this.root,this.spaces=\"\",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{line:1,column:1}}}return t.prototype.createTokenizer=function(){this.tokenizer=(0,o.default)(this.input)},t.prototype.parse=function(){for(var t=void 0;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case\"space\":this.spaces+=t[1];break;case\";\":this.freeSemicolon(t);break;case\"}\":this.end(t);break;case\"comment\":this.comment(t);break;case\"at-word\":this.atrule(t);break;case\"{\":this.emptyRule(t);break;default:this.other(t)}this.endFile()},t.prototype.comment=function(t){var e=new i.default;this.init(e,t[2],t[3]),e.source.end={line:t[4],column:t[5]};var r=t[1].slice(2,-2);if(/^\\s*$/.test(r))e.text=\"\",e.raws.left=r,e.raws.right=\"\";else{var n=r.match(/^(\\s*)([^]*[^\\s])(\\s*)$/);e.text=n[2],e.raws.left=n[1],e.raws.right=n[3]}},t.prototype.emptyRule=function(t){var e=new u.default;this.init(e,t[2],t[3]),e.selector=\"\",e.raws.between=\"\",this.current=e},t.prototype.other=function(t){for(var e=!1,r=null,n=!1,o=null,i=[],s=[],a=t;a;){if(r=a[0],s.push(a),\"(\"===r||\"[\"===r)o||(o=a),i.push(\"(\"===r?\")\":\"]\");else if(0===i.length){if(\";\"===r){if(n)return void this.decl(s);break}if(\"{\"===r)return void this.rule(s);if(\"}\"===r){this.tokenizer.back(s.pop()),e=!0;break}\":\"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),i.length>0&&this.unclosedBracket(o),e&&n){for(;s.length&&(\"space\"===(a=s[s.length-1][0])||\"comment\"===a);)this.tokenizer.back(s.pop());this.decl(s)}else this.unknownWord(s)},t.prototype.rule=function(t){t.pop();var e=new u.default;this.init(e,t[0][2],t[0][3]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,\"selector\",t),this.current=e},t.prototype.decl=function(t){var e=new n.default;this.init(e);var r=t[t.length-1];for(\";\"===r[0]&&(this.semicolon=!0,t.pop()),r[4]?e.source.end={line:r[4],column:r[5]}:e.source.end={line:r[2],column:r[3]};\"word\"!==t[0][0];)1===t.length&&this.unknownWord(t),e.raws.before+=t.shift()[1];for(e.source.start={line:t[0][2],column:t[0][3]},e.prop=\"\";t.length;){var o=t[0][0];if(\":\"===o||\"space\"===o||\"comment\"===o)break;e.prop+=t.shift()[1]}e.raws.between=\"\";for(var i=void 0;t.length;){if(\":\"===(i=t.shift())[0]){e.raws.between+=i[1];break}e.raws.between+=i[1]}\"_\"!==e.prop[0]&&\"*\"!==e.prop[0]||(e.raws.before+=e.prop[0],e.prop=e.prop.slice(1)),e.raws.between+=this.spacesAndCommentsFromStart(t),this.precheckMissedSemicolon(t);for(var s=t.length-1;s>0;s--){if(\"!important\"===(i=t[s])[1].toLowerCase()){e.important=!0;var a=this.stringFrom(t,s);\" !important\"!==(a=this.spacesFromEnd(t)+a)&&(e.raws.important=a);break}if(\"important\"===i[1].toLowerCase()){for(var u=t.slice(0),l=\"\",c=s;c>0;c--){var f=u[c][0];if(0===l.trim().indexOf(\"!\")&&\"space\"!==f)break;l=u.pop()[1]+l}0===l.trim().indexOf(\"!\")&&(e.important=!0,e.raws.important=l,t=u)}if(\"space\"!==i[0]&&\"comment\"!==i[0])break}this.raw(e,\"value\",t),-1!==e.value.indexOf(\":\")&&this.checkMissedSemicolon(t)},t.prototype.atrule=function(t){var e=new s.default;e.name=t[1].slice(1),\"\"===e.name&&this.unnamedAtrule(e,t),this.init(e,t[2],t[3]);for(var r=void 0,n=void 0,o=!1,i=!1,a=[];!this.tokenizer.endOfFile();){if(\";\"===(t=this.tokenizer.nextToken())[0]){e.source.end={line:t[2],column:t[3]},this.semicolon=!0;break}if(\"{\"===t[0]){i=!0;break}if(\"}\"===t[0]){if(a.length>0){for(r=a[n=a.length-1];r&&\"space\"===r[0];)r=a[--n];r&&(e.source.end={line:r[4],column:r[5]})}this.end(t);break}if(a.push(t),this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(e.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(e,\"params\",a),o&&(t=a[a.length-1],e.source.end={line:t[4],column:t[5]},this.spaces=e.raws.between,e.raws.between=\"\")):(e.raws.afterName=\"\",e.params=\"\"),i&&(e.nodes=[],this.current=e)},t.prototype.end=function(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||\"\")+this.spaces,this.spaces=\"\",this.current.parent?(this.current.source.end={line:t[2],column:t[3]},this.current=this.current.parent):this.unexpectedClose(t)},t.prototype.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||\"\")+this.spaces},t.prototype.freeSemicolon=function(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&\"rule\"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces=\"\")}},t.prototype.init=function(t,e,r){this.current.push(t),t.source={start:{line:e,column:r},input:this.input},t.raws.before=this.spaces,this.spaces=\"\",\"comment\"!==t.type&&(this.semicolon=!1)},t.prototype.raw=function(t,e,r){for(var n=void 0,o=void 0,i=r.length,s=\"\",a=!0,u=void 0,l=void 0,c=/^([.|#])?([\\w])+/i,f=0;f=0&&(\"space\"===(n=t[o])[0]||2!==(r+=1));o--);throw this.input.error(\"Missed semicolon\",n[2],n[3])}},t}();e.default=c,t.exports=e.default},function(t,e,r){\"use strict\";e.__esModule=!0,e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.css.valueOf(),O=e.ignoreErrors,M=void 0,x=void 0,R=void 0,k=void 0,P=void 0,L=void 0,T=void 0,B=void 0,j=void 0,U=void 0,I=void 0,D=void 0,N=void 0,F=void 0,Y=r.length,z=-1,G=1,$=0,V=[],W=[];function J(e){throw t.error(\"Unclosed \"+e,G,$-z)}return{back:function(t){W.push(t)},nextToken:function(){if(W.length)return W.pop();if($>=Y)return;((M=r.charCodeAt($))===a||M===l||M===f&&r.charCodeAt($+1)!==a)&&(z=$,G+=1);switch(M){case a:case u:case c:case f:case l:x=$;do{x+=1,(M=r.charCodeAt(x))===a&&(z=x,G+=1)}while(M===u||M===a||M===c||M===f||M===l);F=[\"space\",r.slice($,x)],$=x-1;break;case p:F=[\"[\",\"[\",G,$-z];break;case h:F=[\"]\",\"]\",G,$-z];break;case y:F=[\"{\",\"{\",G,$-z];break;case m:F=[\"}\",\"}\",G,$-z];break;case b:F=[\":\",\":\",G,$-z];break;case v:F=[\";\",\";\",G,$-z];break;case d:if(D=V.length?V.pop()[1]:\"\",N=r.charCodeAt($+1),\"url\"===D&&N!==n&&N!==o&&N!==u&&N!==a&&N!==c&&N!==l&&N!==f){x=$;do{if(U=!1,-1===(x=r.indexOf(\")\",x+1))){if(O){x=$;break}J(\"bracket\")}for(I=x;r.charCodeAt(I-1)===i;)I-=1,U=!U}while(U);F=[\"brackets\",r.slice($,x+1),G,$-z,G,x-z],$=x}else x=r.indexOf(\")\",$+1),L=r.slice($,x+1),-1===x||C.test(L)?F=[\"(\",\"(\",G,$-z]:(F=[\"brackets\",L,G,$-z,G,x-z],$=x);break;case g:F=[\")\",\")\",G,$-z];break;case n:case o:R=M===n?\"'\":'\"',x=$;do{if(U=!1,-1===(x=r.indexOf(R,x+1))){if(O){x=$+1;break}J(\"string\")}for(I=x;r.charCodeAt(I-1)===i;)I-=1,U=!U}while(U);L=r.slice($,x+1),k=L.split(\"\\n\"),(P=k.length-1)>0?(B=G+P,j=x-k[P].length):(B=G,j=z),F=[\"string\",r.slice($,x+1),G,$-z,B,x-j],z=j,G=B,$=x;break;case _:A.lastIndex=$+1,A.test(r),x=0===A.lastIndex?r.length-1:A.lastIndex-2,F=[\"at-word\",r.slice($,x+1),G,$-z,G,x-z],$=x;break;case i:for(x=$,T=!0;r.charCodeAt(x+1)===i;)x+=1,T=!T;if(M=r.charCodeAt(x+1),T&&M!==s&&M!==u&&M!==a&&M!==c&&M!==f&&M!==l&&(x+=1,E.test(r.charAt(x)))){for(;E.test(r.charAt(x+1));)x+=1;r.charCodeAt(x+1)===u&&(x+=1)}F=[\"word\",r.slice($,x+1),G,$-z,G,x-z],$=x;break;default:M===s&&r.charCodeAt($+1)===w?(0===(x=r.indexOf(\"*/\",$+2)+1)&&(O?x=r.length:J(\"comment\")),L=r.slice($,x+1),k=L.split(\"\\n\"),(P=k.length-1)>0?(B=G+P,j=x-k[P].length):(B=G,j=z),F=[\"comment\",L,G,$-z,B,x-j],z=j,G=B,$=x):(S.lastIndex=$+1,S.test(r),x=0===S.lastIndex?r.length-1:S.lastIndex-2,F=[\"word\",r.slice($,x+1),G,$-z,G,x-z],V.push(F),$=x)}return $++,F},endOfFile:function(){return 0===W.length&&$>=Y}}};var n=39,o=34,i=92,s=47,a=10,u=32,l=12,c=9,f=13,p=91,h=93,d=40,g=41,y=123,m=125,v=59,w=42,b=58,_=64,A=/[ \\n\\t\\r\\f{}()'\"\\\\;/[\\]#]/g,S=/[ \\n\\t\\r\\f(){}:;@!'\"\\\\\\][#]|\\/(?=\\*)/g,C=/.[\\\\/(\"'\\n]/,E=/[a-f0-9]/i;t.exports=e.default},function(t,e,r){\"use strict\";e.__esModule=!0;var n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},o=function(){function t(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),null===e||\"object\"===(void 0===e?\"undefined\":n(e))&&!e.toString)throw new Error(\"PostCSS received \"+e+\" instead of CSS string\");this.css=e.toString(),\"\\ufeff\"!==this.css[0]&&\"￾\"!==this.css[0]||(this.css=this.css.slice(1)),r.from&&(/^\\w+:\\/\\//.test(r.from)?this.file=r.from:this.file=a.default.resolve(r.from));var o=new s.default(this.css,r);if(o.text){this.map=o;var i=o.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}this.file||(l+=1,this.id=\"\"),this.map&&(this.map.file=this.from)}return t.prototype.error=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0,s=this.origin(e,r);return(o=s?new i.default(t,s.line,s.column,s.source,s.file,n.plugin):new i.default(t,e,r,this.css,this.file,n.plugin)).input={line:e,column:r,source:this.css},this.file&&(o.input.file=this.file),o},t.prototype.origin=function(t,e){if(!this.map)return!1;var r=this.map.consumer(),n=r.originalPositionFor({line:t,column:e});if(!n.source)return!1;var o={file:this.mapResolve(n.source),line:n.line,column:n.column},i=r.sourceContentFor(n.source);return i&&(o.source=i),o},t.prototype.mapResolve=function(t){return/^\\w+:\\/\\//.test(t)?t:a.default.resolve(this.map.consumer().sourceRoot||\".\",t)},o(t,[{key:\"from\",get:function(){return this.file||this.id}}]),t}();e.default=c,t.exports=e.default},function(t,e,r){\"use strict\";(function(n){e.__esModule=!0;var o=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},i=u(r(15)),s=u(r(4)),a=u(r(46));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.loadAnnotation(e),this.inline=this.startWith(this.annotation,\"data:\");var n=r.map?r.map.prev:void 0,o=this.loadMap(r.from,n);o&&(this.text=o)}return t.prototype.consumer=function(){return this.consumerCache||(this.consumerCache=new i.default.SourceMapConsumer(this.text)),this.consumerCache},t.prototype.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},t.prototype.startWith=function(t,e){return!!t&&t.substr(0,e.length)===e},t.prototype.loadAnnotation=function(t){var e=t.match(/\\/\\*\\s*# sourceMappingURL=(.*)\\s*\\*\\//);e&&(this.annotation=e[1].trim())},t.prototype.decodeInline=function(t){var e=\"data:application/json,\";if(this.startWith(t,e))return decodeURIComponent(t.substr(e.length));if(/^data:application\\/json;charset=utf-?8;base64,/.test(t)||/^data:application\\/json;base64,/.test(t))return function(t){return n?n.from(t,\"base64\").toString():window.atob(t)}(t.substr(RegExp.lastMatch.length));var r=t.match(/data:application\\/json;([^,]+),/)[1];throw new Error(\"Unsupported source map encoding \"+r)},t.prototype.loadMap=function(t,e){if(!1===e)return!1;if(e){if(\"string\"==typeof e)return e;if(\"function\"==typeof e){var r=e(t);if(r&&a.default.existsSync&&a.default.existsSync(r))return a.default.readFileSync(r,\"utf-8\").toString().trim();throw new Error(\"Unable to load previous source map: \"+r.toString())}if(e instanceof i.default.SourceMapConsumer)return i.default.SourceMapGenerator.fromSourceMap(e).toString();if(e instanceof i.default.SourceMapGenerator)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error(\"Unsupported previous source map format: \"+e.toString())}if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var n=this.annotation;return t&&(n=s.default.join(s.default.dirname(t),n)),this.root=s.default.dirname(n),!(!a.default.existsSync||!a.default.existsSync(n))&&a.default.readFileSync(n,\"utf-8\").toString().trim()}},t.prototype.isMap=function(t){return\"object\"===(void 0===t?\"undefined\":o(t))&&(\"string\"==typeof t.mappings||\"string\"==typeof t._mappings)},t}();e.default=l,t.exports=e.default}).call(this,r(14).Buffer)},function(t,e){},function(t,e,r){\"use strict\";e.__esModule=!0;e.default={prefix:function(t){var e=t.match(/^(-\\w+-)/);return e?e[0]:\"\"},unprefixed:function(t){return t.replace(/^-\\w+-/,\"\")}},t.exports=e.default}])});\n//# sourceMappingURL=grapesjs-parser-postcss.min.js.map","export default (editor, opts = {}) => {\n const dc = editor.DomComponents;\n const defaultType = dc.getType('default');\n const defaultModel = defaultType.model;\n const cfg = editor.getConfig();\n\n // Add Dynamic Content block only for newsletter\n if ('grapesjsmjml' in cfg.pluginsOpts) {\n // Dynamic Content MJML block\n } else if ('grapesjsnewsletter' in cfg.pluginsOpts) {\n // Dynamic Content component\n dc.addType('dynamic-content', {\n model: defaultModel.extend(\n {\n defaults: {\n ...defaultModel.prototype.defaults,\n name: 'Dynamic Content',\n draggable: '[data-gjs-type=cell]',\n droppable: false,\n editable: false,\n stylable: false,\n propagate: ['droppable', 'editable'],\n attributes: {\n // Default attributes\n 'data-gjs-type': 'dynamic-content', // Type for GrapesJS\n 'data-slot': 'dynamicContent', // Retro compatibility with old template\n },\n },\n\n /**\n * Initilize the component\n */\n init() {\n const toolbar = this.get('toolbar');\n const id = 'toolbar-dynamic-content';\n\n // Add toolbar edit button if it's not already in\n if (!toolbar.filter((tlb) => tlb.id === id).length) {\n toolbar.unshift({\n id,\n command: 'preset-mautic:dynamic-content',\n label: '
',\n });\n }\n },\n },\n {\n // Dynamic Content component detection\n isComponent(el) {\n if (el.getAttribute && el.getAttribute('data-slot') == 'dynamicContent') {\n return {\n type: 'dynamic-content',\n };\n }\n },\n }\n ),\n\n view: defaultType.view.extend({\n attributes: {\n style: 'pointer-events: all; display: table; width: 100%;user-select: none;',\n },\n events: {\n dblclick: 'onActive',\n },\n onActive() {\n const target = this.model;\n\n this.em.get('Commands').run('preset-mautic:dynamic-content', { target });\n },\n }),\n });\n }\n};\n","class CodeEditor {\n constructor(editor, opts = {}) {\n this.editor = editor;\n this.opts = opts;\n\n this.codeEditor = this.buildCodeEditor();\n this.codePopup = this.buildCodePopup();\n }\n\n // Build codeEditor (CodeMirror instance)\n buildCodeEditor() {\n let codeEditor = this.editor.CodeManager.getViewer('CodeMirror').clone();\n\n codeEditor.set({\n codeName: 'htmlmixed',\n readOnly: false,\n theme: 'hopscotch',\n autoBeautify: true,\n autoCloseTags: true,\n autoCloseBrackets: true,\n lineWrapping: true,\n styleActiveLine: true,\n smartIndent: true,\n indentWithTabs: true,\n });\n\n return codeEditor;\n }\n\n // Build popup content, codeEditor area and buttons\n buildCodePopup() {\n const cfg = this.editor.getConfig();\n\n let codePopup = document.createElement('div');\n let btnEdit = document.createElement('button');\n let btnCancel = document.createElement('button');\n let textarea = document.createElement('textarea');\n\n btnEdit.innerHTML = this.opts.sourceEditBtnLabel;\n btnEdit.className = cfg.stylePrefix + 'btn-prim ' + cfg.stylePrefix + 'btn-code-edit';\n btnEdit.onclick = this.updateCode.bind(this);\n\n btnCancel.innerHTML = this.opts.sourceCancelBtnLabel;\n btnCancel.className = cfg.stylePrefix + 'btn-prim ' + cfg.stylePrefix + 'btn-code-cancel';\n btnCancel.onclick = this.cancelCode.bind(this);\n\n codePopup.appendChild(textarea);\n codePopup.appendChild(btnEdit);\n codePopup.appendChild(btnCancel);\n\n this.codeEditor.init(textarea);\n\n return codePopup;\n }\n\n // Load content and show popup\n showCodePopup() {\n this.updateEditorContents();\n this.codeEditor.editor.refresh();\n\n this.editor.Modal.setContent('');\n this.editor.Modal.setContent(this.codePopup);\n this.editor.Modal.setTitle(this.opts.sourceEditModalTitle);\n this.editor.Modal.open();\n }\n\n // Update GrapesJs content\n updateCode() {\n let code = this.codeEditor.editor.getValue();\n let codeSave = this.getEditorContent();\n\n // Catch error of code\n try {\n this.editor.DomComponents.getWrapper().set('content', '');\n this.editor.setComponents(code.trim());\n this.editor.Modal.close();\n } catch (e) {\n window.alert('Template error, you should fix your code before save! \\n' + e.message);\n this.editor.DomComponents.getWrapper().set('content', '');\n this.editor.setComponents(codeSave.trim());\n }\n }\n\n // Close popup\n cancelCode() {\n this.editor.Modal.close();\n }\n\n // Update CodeMirror content\n updateEditorContents() {\n this.codeEditor.setContent(this.getEditorContent());\n }\n\n // Get formated GrapesJs code\n getEditorContent() {\n const cfg = this.editor.getConfig();\n let content;\n\n // Check if MJML plugin is on\n if ('grapesjsmjml' in cfg.pluginsOpts) {\n content = this.editor.getHtml();\n } else {\n content =\n this.editor.getHtml() +\n '';\n }\n\n return content;\n }\n}\n\nexport default CodeEditor;\n","class DynamicContent {\n constructor(editor, opts = {}) {\n this.editor = editor;\n this.opts = opts;\n\n this.codePopup = this.buildCodePopup();\n }\n\n // Build popup content, Dynamic Content area and buttons\n buildCodePopup() {\n const cfg = this.editor.getConfig();\n\n let codePopup = document.createElement('div');\n let content = document.createElement('div');\n content.setAttribute('id', 'dynamic-content-popup');\n let btnEdit = document.createElement('button');\n\n btnEdit.innerHTML = this.opts.dynamicContentBtnLabel;\n btnEdit.className = cfg.stylePrefix + 'btn-prim ' + cfg.stylePrefix + 'btn-dynamic-content';\n btnEdit.onclick = this.updateCode.bind(this);\n\n codePopup.appendChild(content);\n codePopup.appendChild(btnEdit);\n\n return codePopup;\n }\n\n // Load content and show popup\n showCodePopup(component) {\n this.updatePopupContents(component);\n\n this.editor.Modal.setContent('');\n this.editor.Modal.setContent(this.codePopup);\n this.editor.Modal.setTitle(this.opts.dynamicContentModalTitle);\n this.editor.Modal.open();\n }\n\n // Close popup\n updateCode() {\n this.editor.Modal.close();\n }\n\n // Load Dynamic Content editor from Mautic and append to popup\n updatePopupContents(component) {\n let self = this;\n let popupContent = this.codePopup.querySelector('#dynamic-content-popup');\n let attributes = component.getAttributes();\n let focusForm = mQuery('#emailform_dynamicContent_' + attributes['data-param-dec-id']);\n\n // Remove Mautic Froala and reload one with custom setting\n focusForm.find('textarea.editor').each(function () {\n var buttons = self.opts.dynamicContentFroalaButtons;\n var froalaOptions = {\n toolbarButtons: buttons,\n toolbarButtonsMD: buttons,\n toolbarButtonsSM: buttons,\n toolbarButtonsXS: buttons,\n toolbarSticky: false,\n linkList: [],\n imageEditButtons: [\n 'imageReplace',\n 'imageAlign',\n 'imageRemove',\n 'imageAlt',\n 'imageSize',\n '|',\n 'imageLink',\n 'linkOpen',\n 'linkEdit',\n 'linkRemove',\n ],\n };\n\n mQuery(this).froalaEditor('destroy');\n mQuery(this).froalaEditor(mQuery.extend({}, Mautic.basicFroalaOptions, froalaOptions));\n });\n\n // Show if hidden\n focusForm.removeClass('fade');\n // Hide delete default button\n focusForm.find('.tab-pane:first').find('.remove-item').hide();\n // Insert inside popup\n mQuery(popupContent).empty().append(focusForm.detach());\n }\n}\n\nexport default DynamicContent;\n","import CodeEditor from './codeEditor';\nimport DynamicContent from './dynamicContent';\n\nexport default (editor, opts = {}) => {\n const cmd = editor.Commands;\n\n let codeEditor;\n let dynamicContent;\n\n // Launch Code Editor popup\n cmd.add('preset-mautic:code-edit', {\n run: (editor, sender, options = {}) => {\n if (!codeEditor) codeEditor = new CodeEditor(editor, opts);\n sender && sender.set('active', 0);\n\n // Transform DC to token\n Mautic.grapesConvertDynamicContentSlotsToTokens(editor);\n codeEditor.showCodePopup();\n },\n stop: (editor) => {\n // Transform token to DC\n Mautic.grapesConvertDynamicContentTokenToSlot(editor);\n },\n });\n\n // Launch Dynamic Content popup\n cmd.add('preset-mautic:dynamic-content', {\n run: (editor, sender, options = {}) => {\n const { target } = options;\n const component = target || editor.getSelected();\n\n if (!dynamicContent) dynamicContent = new DynamicContent(editor, opts);\n\n dynamicContent.showCodePopup(component);\n // Transform DC to token\n Mautic.grapesConvertDynamicContentSlotsToTokens(editor);\n },\n stop: (editor) => {\n // Transform token to DC\n Mautic.grapesConvertDynamicContentTokenToSlot(editor);\n },\n });\n};\n","export default (editor, opts = {}) => {\n const $ = editor.$;\n const pm = editor.Panels;\n\n // Add function within builder to edit source code\n if (opts.sourceEdit) {\n pm.addButton('options', [\n {\n id: 'code-edit',\n className: 'fa fa-edit',\n command: 'preset-mautic:code-edit',\n attributes: {\n title: opts.sourceEditModalTitle,\n },\n },\n ]);\n }\n\n // Disable Import code button\n if (!opts.showImportButton) {\n let mjmlImportBtn = pm.getButton('options', 'mjml-import');\n let htmlImportBtn = pm.getButton('options', 'gjs-open-import-template');\n let pageImportBtn = pm.getButton('options', 'gjs-open-import-webpage');\n\n // MJML import\n if (mjmlImportBtn !== null) {\n pm.removeButton('options', 'mjml-import');\n }\n\n // Newsletter import\n if (htmlImportBtn !== null) {\n pm.removeButton('options', 'gjs-open-import-template');\n }\n\n // Webpage import\n if (pageImportBtn !== null) {\n pm.removeButton('options', 'gjs-open-import-webpage');\n }\n }\n\n // Move Undo & Redo inside Commands Panel\n let undo = pm.getButton('options', 'undo');\n let redo = pm.getButton('options', 'redo');\n\n if (undo !== null) {\n pm.removeButton('options', 'undo');\n pm.addButton('commands', [\n {\n id: 'undo',\n className: 'fa fa-undo',\n attributes: { title: 'Undo' },\n command: function () {\n editor.runCommand('core:undo');\n },\n },\n ]);\n }\n\n if (redo !== null) {\n pm.removeButton('options', 'redo');\n pm.addButton('commands', [\n {\n id: 'redo',\n className: 'fa fa-repeat',\n attributes: { title: 'Redo' },\n command: function () {\n editor.runCommand('core:redo');\n },\n },\n ]);\n }\n\n // Remove preview button\n let preview = pm.getButton('options', 'preview');\n\n if (preview !== null) {\n pm.removeButton('options', 'preview');\n }\n\n // Remove clear button\n let clear = pm.getButton('options', 'canvas-clear');\n\n if (clear !== null) {\n pm.removeButton('options', 'canvas-clear');\n }\n\n // Remove toggle images button\n let toggleImages = pm.getButton('options', 'gjs-toggle-images');\n\n if (toggleImages !== null) {\n pm.removeButton('options', 'gjs-toggle-images');\n }\n\n // Do stuff on load\n editor.on('load', function () {\n // Hide Layers Manager\n if (!opts.showLayersManager) {\n let openLayersBtn = pm.getButton('views', 'open-layers');\n\n if (openLayersBtn !== null) {\n openLayersBtn.set('attributes', {\n style: 'display:none;',\n });\n }\n }\n\n // Activate by default View Components button\n let viewComponents = pm.getButton('options', 'sw-visibility');\n viewComponents && viewComponents.set('active', 1);\n\n // Load and show settings and style manager\n let openTmBtn = pm.getButton('views', 'open-tm');\n openTmBtn && openTmBtn.set('active', 1);\n let openSm = pm.getButton('views', 'open-sm');\n openSm && openSm.set('active', 1);\n\n pm.removeButton('views', 'open-tm');\n\n // Add Settings Sector\n let traitsSector = $(\n '
' +\n '
Settings
' +\n '
'\n );\n let traitsProps = traitsSector.find('.gjs-sm-properties');\n\n traitsProps.append($('.gjs-trt-traits'));\n $('.gjs-sm-sectors').before(traitsSector);\n traitsSector.find('.gjs-sm-title').on('click', function () {\n let traitStyle = traitsProps.get(0).style;\n let hidden = traitStyle.display === 'none';\n\n if (hidden) {\n traitStyle.display = 'block';\n } else {\n traitStyle.display = 'none';\n }\n });\n\n // Open settings\n traitsProps.get(0).style.display = 'block';\n\n // Open block manager\n let openBlocksBtn = editor.Panels.getButton('views', 'open-blocks');\n openBlocksBtn && openBlocksBtn.set('active', 1);\n });\n};\n","export default (editor, opts = {}) => {\n const bm = editor.BlockManager;\n const cfg = editor.getConfig();\n\n const blocks = bm.getAll();\n // Add Dynamic Content block only for newsletter\n if ('grapesjsmjml' in cfg.pluginsOpts) {\n // Dynamic Content MJML block\n } else if ('grapesjsnewsletter' in cfg.pluginsOpts) {\n bm.add('dynamic-content', {\n label: opts.dynamicContentBlockLabel,\n activate: true,\n select: true,\n attributes: { class: 'fa fa-tag' },\n content: {\n type: 'dynamic-content',\n content: '{dynamiccontent=\"Dynamic Content\"}',\n style: { padding: '10px' },\n activeOnRender: 1,\n },\n });\n }\n\n // Add icon to mj-hero\n if (typeof bm.get('mj-hero') !== 'undefined') {\n bm.get('mj-hero').set({\n attributes: { class: 'gjs-fonts gjs-f-hero' },\n });\n }\n\n // Delete mj-wrapper\n if (typeof bm.get('mj-wrapper') !== 'undefined') {\n bm.remove('mj-wrapper');\n }\n\n // All block inside Blocks category\n blocks.forEach((block) => {\n block.set({\n category: opts.categoryBlockLabel,\n });\n });\n\n /*\n * Custom block inside Sections category\n */\n\n // MJML columns\n if (typeof bm.get('mj-1-column') !== 'undefined') {\n bm.get('mj-1-column').set({\n category: opts.categorySectionLabel,\n });\n }\n\n if (typeof bm.get('mj-2-columns') !== 'undefined') {\n bm.get('mj-2-columns').set({\n category: opts.categorySectionLabel,\n });\n }\n\n if (typeof bm.get('mj-3-columns') !== 'undefined') {\n bm.get('mj-3-columns').set({\n category: opts.categorySectionLabel,\n });\n }\n\n // Newsletter columns\n if (typeof bm.get('sect100') !== 'undefined') {\n bm.get('sect100').set({\n category: opts.categorySectionLabel,\n });\n }\n\n if (typeof bm.get('sect50') !== 'undefined') {\n bm.get('sect50').set({\n category: opts.categorySectionLabel,\n });\n }\n\n if (typeof bm.get('sect30') !== 'undefined') {\n bm.get('sect30').set({\n category: opts.categorySectionLabel,\n });\n }\n\n if (typeof bm.get('sect37') !== 'undefined') {\n bm.get('sect37').set({\n category: opts.categorySectionLabel,\n });\n }\n\n // Webpage columns\n if (typeof bm.get('column1') !== 'undefined') {\n bm.get('column1').set({\n category: opts.categorySectionLabel,\n });\n }\n\n if (typeof bm.get('column2') !== 'undefined') {\n bm.get('column2').set({\n category: opts.categorySectionLabel,\n });\n }\n\n if (typeof bm.get('column3') !== 'undefined') {\n bm.get('column3').set({\n category: opts.categorySectionLabel,\n });\n }\n\n if (typeof bm.get('column3-7') !== 'undefined') {\n bm.get('column3-7').set({\n category: opts.categorySectionLabel,\n });\n }\n};\n","import loadComponents from './components';\nimport loadCommands from './commands';\nimport loadButtons from './buttons';\nimport loadBlocks from './blocks';\n\nexport default (editor, opts = {}) => {\n const $ = mQuery;\n const am = editor.AssetManager;\n\n const config = {\n sourceEdit: 1,\n sourceEditBtnLabel: 'Edit',\n sourceCancelBtnLabel: 'Cancel',\n sourceEditModalTitle: 'Edit code',\n deleteAssetConfirmText: 'Are you sure?',\n showLayersManager: 0,\n showImportButton: 0,\n replaceRteWithFroala: true,\n categorySectionLabel: 'Sections',\n categoryBlockLabel: 'Blocks',\n dynamicContentBlockLabel: 'Dynamic Content',\n dynamicContentBtnLabel: 'Save',\n dynamicContentModalTitle: 'Edit Dynamic Content',\n dynamicContentFroalaButtons: [\n 'undo',\n 'redo',\n '|',\n 'bold',\n 'italic',\n 'underline',\n 'fontSize',\n 'color',\n 'align',\n 'formatOL',\n 'formatUL',\n 'quote',\n 'clearFormatting',\n 'token',\n 'insertLink',\n 'insertImage',\n 'html',\n ],\n ...opts,\n };\n\n // Extend the original `image` and add a confirm dialog before removing it\n am.addType('image', {\n // As you adding on top of an already defined type you can avoid indicating\n // `am.getType('image').view.extend({...` the editor will do it by default\n // but you can eventually extend some other type\n view: {\n // If you want to see more methods to extend check out\n // https://github.com/artf/grapesjs/blob/dev/src/asset_manager/view/AssetImageView.js\n onRemove(e) {\n e.stopImmediatePropagation();\n const model = this.model;\n\n if (confirm(config.deleteAssetConfirmText)) {\n model.collection.remove(model);\n }\n },\n },\n });\n\n if (config.replaceRteWithFroala && typeof $.FroalaEditor !== 'undefined') {\n // Hiding other toolbars already created\n let rteToolbar = editor.RichTextEditor.getToolbarEl();\n [].forEach.call(rteToolbar.children, (child) => {\n child.style.display = 'none';\n });\n\n editor.setCustomRte({\n enable: function (el, rte) {\n rte = $(el).froalaEditor({\n enter: $.FroalaEditor.ENTER_BR,\n pastePlain: true,\n\n htmlAllowedTags: [\n 'a',\n 'abbr',\n 'address',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n 'base',\n 'bdi',\n 'bdo',\n 'blockquote',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'datalist',\n 'dd',\n 'del',\n 'details',\n 'dfn',\n 'dialog',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'embed',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'header',\n 'hgroup',\n 'hr',\n 'i',\n 'iframe',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'keygen',\n 'label',\n 'legend',\n 'li',\n 'link',\n 'main',\n 'map',\n 'mark',\n 'menu',\n 'menuitem',\n 'meter',\n 'nav',\n 'noscript',\n 'object',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n 'param',\n 'pre',\n 'progress',\n 'queue',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n 'script',\n 'style',\n 'section',\n 'select',\n 'small',\n 'source',\n 'span',\n 'strike',\n 'strong',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'title',\n 'tr',\n 'track',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n 'center',\n ],\n htmlAllowedAttrs: [\n 'data-atwho-at-query',\n 'data-section',\n 'data-section-wrapper',\n 'accept',\n 'accept-charset',\n 'accesskey',\n 'action',\n 'align',\n 'allowfullscreen',\n 'alt',\n 'async',\n 'autocomplete',\n 'autofocus',\n 'autoplay',\n 'autosave',\n 'background',\n 'bgcolor',\n 'border',\n 'charset',\n 'cellpadding',\n 'cellspacing',\n 'checked',\n 'cite',\n 'class',\n 'color',\n 'cols',\n 'colspan',\n 'content',\n 'contenteditable',\n 'contextmenu',\n 'controls',\n 'coords',\n 'data',\n 'data-.*',\n 'datetime',\n 'default',\n 'defer',\n 'dir',\n 'dirname',\n 'disabled',\n 'download',\n 'draggable',\n 'dropzone',\n 'enctype',\n 'for',\n 'form',\n 'formaction',\n 'frameborder',\n 'headers',\n 'height',\n 'hidden',\n 'high',\n 'href',\n 'hreflang',\n 'http-equiv',\n 'icon',\n 'id',\n 'ismap',\n 'itemprop',\n 'keytype',\n 'kind',\n 'label',\n 'lang',\n 'language',\n 'list',\n 'loop',\n 'low',\n 'max',\n 'maxlength',\n 'media',\n 'method',\n 'min',\n 'mozallowfullscreen',\n 'multiple',\n 'name',\n 'novalidate',\n 'open',\n 'optimum',\n 'pattern',\n 'ping',\n 'placeholder',\n 'poster',\n 'preload',\n 'pubdate',\n 'radiogroup',\n 'readonly',\n 'rel',\n 'required',\n 'reversed',\n 'rows',\n 'rowspan',\n 'sandbox',\n 'scope',\n 'scoped',\n 'scrolling',\n 'seamless',\n 'selected',\n 'shape',\n 'size',\n 'sizes',\n 'span',\n 'src',\n 'srcdoc',\n 'srclang',\n 'srcset',\n 'start',\n 'step',\n 'summary',\n 'spellcheck',\n 'style',\n 'tabindex',\n 'target',\n 'title',\n 'type',\n 'translate',\n 'usemap',\n 'value',\n 'valign',\n 'webkitallowfullscreen',\n 'width',\n 'wrap',\n ],\n\n toolbarButtons: [\n 'bold',\n 'italic',\n 'underline',\n 'strikeThrough',\n 'quote',\n 'clearFormatting',\n '-',\n 'formatOL',\n 'formatUL',\n 'indent',\n 'outdent',\n 'token',\n 'insertLink',\n ],\n\n toolbarContainer: editor.RichTextEditor.getToolbarEl(),\n linkEditButtons: ['linkOpen', 'linkRemove'],\n });\n\n $(el).on('froalaEditor.popups.show.link.edit', function (e, editor) {\n // Get the link DOM object of the current selection.\n let currentLink = $(el).froalaEditor('link.get');\n\n // Get popup link.edit\n let popupLink = $(el).froalaEditor('popups.get', 'link.edit');\n\n if (typeof currentLink !== 'undefined') {\n let top = currentLink.getBoundingClientRect().top;\n let height = $(currentLink).outerHeight();\n\n // Set position of link popup\n popupLink.css('top', parseInt(top) + parseInt(height) + 35);\n }\n });\n\n return rte;\n },\n disable: function (el, rte) {\n // Remove events and destroy rte\n $(el).off('froalaEditor.popups.show.link.edit');\n $(el).froalaEditor('destroy');\n },\n });\n }\n\n // Load other parts\n loadComponents(editor, config);\n loadCommands(editor, config);\n loadButtons(editor, config);\n loadBlocks(editor, config);\n};\n","import grapesjs from 'grapesjs';\nimport grapesjsmjml from 'grapesjs-mjml';\nimport grapesjsnewsletter from 'grapesjs-preset-newsletter';\nimport grapesjswebpage from 'grapesjs-preset-webpage';\nimport grapesjspostcss from 'grapesjs-parser-postcss';\nimport grapesjsmautic from 'grapesjs-preset-mautic/src';\n\nexport default class BuilderService {\n presetMauticConf;\n\n editor;\n\n // components that are on the canvas\n canvasContent;\n\n assets;\n\n uploadPath;\n\n deletePath;\n\n constructor(content, assets, uploadPath, deletePath) {\n if (!content) {\n throw Error('No HTML or MJML content found');\n }\n if (!uploadPath) {\n throw Error('No uploadPath found');\n }\n if (!deletePath) {\n throw Error('No deletePath found');\n }\n if (!assets || !assets[0]) {\n console.warn('no assets');\n }\n this.canvasContent = content;\n this.assets = assets;\n this.uploadPath = uploadPath;\n this.deletePath = deletePath;\n }\n\n /**\n * Initialize GrapesJsBuilder\n *\n * @param object\n */\n setListeners() {\n if (!this.editor) {\n throw Error('No editor found');\n }\n\n this.editor.on('run:mautic-editor-email-mjml-close:before', () => {\n mQuery('textarea.builder-html').val(this.canvasContent);\n });\n\n this.editor.on('load', () => {\n const um = this.editor.UndoManager;\n\n this.constructor.grapesConvertDynamicContentTokenToSlot(this.editor);\n\n // Clear stack of undo/redo\n um.clear();\n });\n\n this.editor.on('component:add', (component) => {\n const type = component.get('type');\n\n // Create dynamic-content on Mautic side\n if (type === 'dynamic-content') {\n this.constructor.manageDynamicContentTokenToSlot(component);\n }\n });\n\n this.editor.on('component:remove', (component) => {\n const type = component.get('type');\n\n // Delete dynamic-content on Mautic side\n if (type === 'dynamic-content') {\n this.deleteDynamicContentItem(component);\n }\n });\n\n const keymaps = this.editor.Keymaps;\n let allKeymaps;\n\n this.editor.on('modal:open', () => {\n // Save all keyboard shortcuts\n allKeymaps = { ...keymaps.getAll() };\n\n // Remove keyboard shortcuts to prevent launch behind popup\n keymaps.removeAll();\n });\n\n this.editor.on('modal:close', () => {\n const commands = this.editor.Commands;\n const cmdCodeEdit = 'preset-mautic:code-edit';\n const cmdDynamicContent = 'preset-mautic:dynamic-content';\n\n // Launch preset-mautic:code-edit command stop\n if (commands.isActive(cmdCodeEdit)) {\n commands.stop(cmdCodeEdit, { editor: this.editor });\n }\n\n // Launch preset-mautic:dynamic-content command stop\n if (commands.isActive(cmdDynamicContent)) {\n commands.stop(cmdDynamicContent, { editor: this.editor });\n }\n\n // ReMap keyboard shortcuts on modal close\n Object.keys(allKeymaps).map((objectKey) => {\n const shortcut = allKeymaps[objectKey];\n\n keymaps.add(shortcut.id, shortcut.keys, shortcut.handler);\n return keymaps;\n });\n\n const modalContent = mQuery('#dynamic-content-popup');\n\n // On modal close -> move editor within Mautic\n if (modalContent) {\n const dynamicContentContainer = mQuery('#dynamicContentContainer');\n const content = mQuery(modalContent).contents().first();\n\n dynamicContentContainer.append(content.detach());\n }\n });\n\n this.editor.on('asset:remove', (response) => {\n // Delete file on server\n mQuery.ajax({\n url: this.deletePath,\n data: { filename: response.getFilename() },\n });\n });\n }\n\n initGrapesJS(object) {\n // disable mautic global shortcuts\n Mousetrap.reset();\n\n if (object === 'page') {\n this.editor = this.initPage();\n } else if (object === 'emailform') {\n if (this.canvasContent && this.canvasContent.indexOf('') !== -1) {\n this.editor = this.initEmailMjml();\n } else {\n this.editor = this.initEmailHtml();\n }\n } else {\n throw Error(`not supported builder type: ${object}`);\n }\n\n this.addMauticCommands();\n this.setListeners();\n }\n\n setPresetMauticConf() {\n this.presetMauticConf = {\n sourceEditBtnLabel: Mautic.translate('grapesjsbuilder.sourceEditBtnLabel'),\n sourceCancelBtnLabel: Mautic.translate('grapesjsbuilder.sourceCancelBtnLabel'),\n sourceEditModalTitle: Mautic.translate('grapesjsbuilder.sourceEditModalTitle'),\n deleteAssetConfirmText: Mautic.translate('grapesjsbuilder.deleteAssetConfirmText'),\n categorySectionLabel: Mautic.translate('grapesjsbuilder.categorySectionLabel'),\n categoryBlockLabel: Mautic.translate('grapesjsbuilder.categoryBlockLabel'),\n dynamicContentBlockLabel: Mautic.translate('grapesjsbuilder.dynamicContentBlockLabel'),\n dynamicContentBtnLabel: Mautic.translate('grapesjsbuilder.dynamicContentBtnLabel'),\n dynamicContentModalTitle: Mautic.translate('grapesjsbuilder.dynamicContentModalTitle'),\n };\n }\n\n initPage() {\n // Launch GrapesJS with body part\n this.editor = grapesjs.init({\n clearOnRender: true,\n container: '.builder-panel',\n components: this.canvasContent,\n height: '100%',\n storageManager: false, // https://grapesjs.com/docs/modules/Storage.html#basic-configuration\n assetManager: this.getAssetManagerConf(),\n styleManager: {\n clearProperties: true, // Temp fix https://github.com/artf/grapesjs-preset-webpage/issues/27\n },\n plugins: [grapesjswebpage, grapesjspostcss, grapesjsmautic],\n pluginsOpts: {\n [grapesjswebpage]: {\n formsOpts: false,\n },\n grapesjsmautic: this.presetMauticConf,\n },\n });\n\n // Customize GrapesJS -> add close button with save for Mautic\n this.getCloseButton('mautic-editor-page-html-close');\n return this.editor;\n }\n\n initEmailMjml() {\n // EmailBuilder -> MJML\n this.editor = grapesjs.init({\n clearOnRender: true,\n container: '.builder-panel',\n components: this.canvasContent,\n height: '100%',\n storageManager: false,\n assetManager: this.getAssetManagerConf(),\n\n plugins: [grapesjsmjml, grapesjspostcss, grapesjsmautic],\n pluginsOpts: {\n grapesjsmjml: {},\n grapesjsmautic: this.presetMauticConf,\n },\n });\n\n this.editor.BlockManager.get('mj-button').set({\n content: 'Button',\n });\n\n this.getCloseButton('mautic-editor-email-mjml-close');\n return this.editor;\n }\n\n initEmailHtml() {\n // Launch GrapesJS with body part\n this.editor = grapesjs.init({\n clearOnRender: true,\n container: '.builder-panel',\n components: this.canvasContent,\n height: '100%',\n storageManager: false,\n assetManager: this.getAssetManagerConf(),\n\n plugins: [grapesjsnewsletter, grapesjspostcss, grapesjsmautic],\n pluginsOpts: {\n grapesjsnewsletter: {},\n grapesjsmautic: this.presetMauticConf,\n },\n });\n\n // add a Mautic custom block Button\n this.editor.BlockManager.get('button').set({\n content:\n '\\n' +\n 'Button\\n' +\n '',\n });\n\n // Customize GrapesJS -> add close button with save for Mautic\n this.getCloseButton('mautic-editor-email-html-close');\n return this.editor;\n }\n\n /**\n * Convert dynamic content slots to tokens\n * Used in grapesjs-preset-mautic\n *\n * @param editor\n */\n static grapesConvertDynamicContentSlotsToTokens(editor) {\n const dc = editor.DomComponents;\n\n const dynamicContents = dc.getWrapper().find('[data-slot=\"dynamicContent\"]');\n\n if (dynamicContents.length) {\n dynamicContents.forEach((dynamicContent) => {\n const attributes = dynamicContent.getAttributes();\n const decId = attributes['data-param-dec-id'];\n\n // If it's not a token -> convert to token\n if (decId !== '') {\n const dynConId = `#emailform_dynamicContent_${attributes['data-param-dec-id']}`;\n\n const dynConTarget = mQuery(dynConId);\n const dynConName = dynConTarget.find(`${dynConId}_tokenName`).val();\n const dynConToken = `{dynamiccontent=\"${dynConName}\"}`;\n\n // Clear id because it's reloaded by Mautic and this prevent slot to be destroyed by GrapesJs destroy event on close.\n dynamicContent.addAttributes({ 'data-param-dec-id': '' });\n dynamicContent.set('content', dynConToken);\n }\n });\n }\n }\n\n /**\n * Add Mautic specific commands\n */\n addMauticCommands() {\n if (!this.editor) {\n throw Error('No editor found');\n }\n const parser = new DOMParser();\n const fullHtml = parser.parseFromString(this.canvasContent, 'text/html');\n const commands = this.editor.Commands;\n\n commands.add('mautic-editor-page-html-close', (editor) => {\n if (!editor) {\n throw new Error('no page-html editor');\n }\n this.constructor.grapesConvertDynamicContentSlotsToTokens(editor);\n\n // Update textarea for save (part that is different from other modes)\n fullHtml.body.innerHTML = `${editor.getHtml()}`;\n mQuery('textarea.builder-html').val(fullHtml.documentElement.outerHTML);\n\n // Reset HTML\n BuilderService.resetHtml(editor);\n });\n\n commands.add('mautic-editor-email-html-close', (editor) => {\n if (!editor) {\n throw new Error('no email-html editor');\n }\n this.constructor.grapesConvertDynamicContentSlotsToTokens(editor);\n\n // Update textarea for save\n fullHtml.body.innerHTML = editor.runCommand('gjs-get-inlined-html');\n mQuery('textarea.builder-html').val(fullHtml.documentElement.outerHTML);\n\n // Reset HTML\n BuilderService.resetHtml(editor);\n });\n\n commands.add('mautic-editor-email-mjml-close', (editor) => {\n if (!editor) {\n throw new Error('no email-mjml editor');\n }\n this.constructor.grapesConvertDynamicContentSlotsToTokens(editor);\n\n let code = '';\n\n // Try catch for mjml parser error\n try {\n code = this.editor.runCommand('mjml-get-code');\n } catch (error) {\n console.log(error.message);\n alert('Errors inside your template. Template will not be saved.');\n }\n\n // Update textarea for save\n if (!code.length) {\n mQuery('textarea.builder-html').val(code.html);\n mQuery('textarea.builder-mjml').val(editor.getHtml());\n }\n\n // Reset HTML\n BuilderService.resetHtml(editor);\n });\n }\n\n static manageDynamicContentTokenToSlot(component) {\n const regex = RegExp(/\\{dynamiccontent=\"(.*)\"\\}/, 'g');\n\n const content = component.get('content');\n const regexEx = regex.exec(content);\n\n // abort if component does not contain a dynamic content element\n if (regexEx === null) {\n return null;\n }\n\n const dynContenName = regexEx[1];\n const dynContentTabA = mQuery('#dynamicContentTabs a').filter(\n () => mQuery(this).text().trim() === dynContenName\n );\n\n if (typeof dynContentTabA !== 'undefined' && dynContentTabA.length) {\n // If dynamic content item exists -> fill\n const dynContentTarget = dynContentTabA.attr('href');\n let dynConContent = '';\n\n if (mQuery(dynContentTarget).html()) {\n const dynConContainer = mQuery(dynContentTarget).find(`${dynContentTarget}_content`);\n\n if (dynConContainer.hasClass('editor')) {\n dynConContent = dynConContainer.froalaEditor('html.get');\n } else {\n dynConContent = dynConContainer.html();\n }\n }\n\n if (dynConContent === '') {\n dynConContent = dynContentTabA.text();\n }\n\n component.addAttributes({\n 'data-param-dec-id': parseInt(dynContentTarget.replace(/[^0-9]/g, ''), 10),\n });\n component.set('content', dynConContent);\n } else {\n // If dynamic content item doesn't exist -> create\n const dynConTarget = Mautic.createNewDynamicContentItem(mQuery);\n const dynConTab = mQuery('#dynamicContentTabs').find(`a[href=\"${dynConTarget}\"]`);\n\n component.addAttributes({\n 'data-param-dec-id': parseInt(dynConTarget.replace(/[^0-9]/g, ''), 10),\n });\n component.set('content', dynConTab.text());\n }\n return true;\n }\n\n /**\n * Convert dynamic content tokens to slot and load content\n * Used in grapesjs-preset-mautic\n */\n static grapesConvertDynamicContentTokenToSlot(editor) {\n const dc = editor.DomComponents;\n\n const dynamicContents = dc.getWrapper().find('[data-slot=\"dynamicContent\"]');\n\n if (dynamicContents.length) {\n dynamicContents.forEach((dynamicContent) => {\n Mautic.manageDynamicContentTokenToSlot(dynamicContent);\n });\n }\n }\n\n static resetHtml(editor) {\n mQuery('.builder').removeClass('builder-active').addClass('hide');\n mQuery('html').css('font-size', '');\n mQuery('body').css('overflow-y', '');\n\n // Destroy GrapesJS\n // workingn workaround: throws typeError: Cannot read property 'trigger'\n // since editior is destroyed, command can not be stopped anymore\n mQuery('.builder-panel').css('display', 'none');\n setTimeout(() => editor.destroy(), 1000);\n // editor.destroy();\n }\n\n /**\n * Add close button with save for Mautic\n */\n getCloseButton(command) {\n if (!command) {\n throw new Error('no close button command');\n }\n\n this.editor.Panels.addButton('views', [\n {\n id: 'close',\n className: 'fa fa-times-circle',\n attributes: { title: 'Close' },\n command,\n },\n ]);\n }\n\n /**\n * Delete DC on Mautic side\n *\n * @param component\n */\n static deleteDynamicContentItem(component) {\n const attributes = component.getAttributes();\n\n // Only delete if we click on trash, not when GrapesJs is destroy\n if (attributes['data-param-dec-id'] !== '') {\n const dynConId = `#emailform_dynamicContent_${attributes['data-param-dec-id']}`;\n const dynConTarget = mQuery(dynConId);\n\n if (dynConTarget) {\n dynConTarget.find('a.remove-item:first').click();\n // remove vertical tab in outside form\n const dynCon = mQuery('.dynamicContentFilterContainer').find(`a[href=${dynConId}]`);\n if (dynCon && dynCon.parent()) {\n dynCon.parent().remove();\n }\n }\n }\n }\n\n /**\n * Manage button loading indicator\n *\n * @param activate - true or false\n */\n static setupButtonLoadingIndicator(activate) {\n const builderButton = mQuery('.btn-builder');\n const saveButton = mQuery('.btn-save');\n const applyButton = mQuery('.btn-apply');\n\n if (activate) {\n Mautic.activateButtonLoadingIndicator(builderButton);\n Mautic.activateButtonLoadingIndicator(saveButton);\n Mautic.activateButtonLoadingIndicator(applyButton);\n } else {\n Mautic.removeButtonLoadingIndicator(builderButton);\n Mautic.removeButtonLoadingIndicator(saveButton);\n Mautic.removeButtonLoadingIndicator(applyButton);\n }\n }\n\n /**\n * Configure the Asset Manager for all modes\n * @link https://grapesjs.com/docs/modules/Assets.html#configuration\n */\n getAssetManagerConf() {\n return {\n assets: this.assets,\n noAssets: Mautic.translate('grapesjsbuilder.assetManager.noAssets'),\n upload: this.uploadPath,\n uploadName: 'files',\n multiUpload: 1,\n embedAsBase64: false,\n openAssetsOnDrop: 1,\n autoAdd: 1,\n headers: { 'X-CSRF-Token': mauticAjaxCsrf }, // global variable\n };\n }\n\n /**\n * Generate assets list from GrapesJs\n */\n getAssetsList() {\n const assetManager = this.editor.AssetManager;\n const assets = assetManager.getAll();\n const assetsList = [];\n\n assets.forEach((asset) => {\n if (asset.get('type') === 'image') {\n assetsList.push({\n src: asset.get('src'),\n width: asset.get('width'),\n height: asset.get('height'),\n });\n } else {\n assetsList.push(asset.get('src'));\n }\n });\n\n return assetsList;\n }\n}\n","import BuilderService from './builder.service';\n// import builder from './builder.service';\n\n/**\n * Launch builder\n *\n * @param formName\n * @param actionName\n */\nfunction launchBuilderGrapesjs(formName) {\n // Parse HTML template\n const parser = new DOMParser();\n const textareaHtml = mQuery('textarea.builder-html');\n const textareaAssets = mQuery('textarea#grapesjsbuilder_assets');\n const fullHtml = parser.parseFromString(textareaHtml.val(), 'text/html');\n\n const canvasContent = fullHtml.body.innerHTML\n ? fullHtml.body.innerHTML\n : mQuery('textarea.builder-mjml').val();\n\n const assets = textareaAssets.val() ? JSON.parse(textareaAssets.val()) : [];\n\n const builder = new BuilderService(\n canvasContent,\n assets,\n textareaAssets.data('upload'),\n textareaAssets.data('delete')\n );\n\n Mautic.showChangeThemeWarning = true;\n\n // Prepare HTML\n mQuery('html').css('font-size', '100%');\n mQuery('body').css('overflow-y', 'hidden');\n mQuery('.builder-panel').css('padding', 0);\n mQuery('.builder-panel').css('display', 'block');\n mQuery('.builder').addClass('builder-active').removeClass('hide');\n\n // Initialize GrapesJS\n builder.initGrapesJS(formName);\n}\n\n/**\n * Set theme's HTML\n *\n * @param theme\n */\nfunction setThemeHtml(theme) {\n BuilderService.setupButtonLoadingIndicator(true);\n // Load template and fill field\n mQuery.ajax({\n url: mQuery('#builder_url').val(),\n data: `template=${theme}`,\n dataType: 'json',\n success(response) {\n const textareaHtml = mQuery('textarea.builder-html');\n const textareaMjml = mQuery('textarea.builder-mjml');\n\n textareaHtml.val(response.templateHtml);\n\n if (typeof textareaMjml !== 'undefined') {\n textareaMjml.val(response.templateMjml);\n }\n\n // If MJML template, generate HTML before save\n // if (!textareaHtml.val().length && textareaMjml.val().length) {\n // builder.mjmlToHtml(textareaMjml, textareaHtml);\n // }\n // }\n },\n error(request, textStatus) {\n console.log(`setThemeHtml - Request failed: ${textStatus}`);\n },\n complete() {\n BuilderService.setupButtonLoadingIndicator(false);\n },\n });\n}\n\n/**\n * Initialize original Mautic theme selection with grapejs specific modifications\n */\nfunction initSelectThemeGrapesjs(parentInitSelectTheme) {\n function childInitSelectTheme(themeField) {\n const builderUrl = mQuery('#builder_url');\n let url;\n\n // Replace Mautic URL by plugin URL\n if (builderUrl.length) {\n if (builderUrl.val().indexOf('pages') !== -1) {\n url = builderUrl.val().replace('s/pages/builder', 's/grapesjsbuilder/page');\n } else {\n url = builderUrl.val().replace('s/emails/builder', 's/grapesjsbuilder/email');\n }\n\n builderUrl.val(url);\n }\n\n // Launch original Mautic.initSelectTheme function\n parentInitSelectTheme(themeField);\n }\n return childInitSelectTheme;\n}\n\nMautic.grapesConvertDynamicContentTokenToSlot =\n BuilderService.grapesConvertDynamicContentTokenToSlot;\nMautic.grapesConvertDynamicContentSlotsToTokens =\n BuilderService.grapesConvertDynamicContentSlotsToTokens;\nMautic.manageDynamicContentTokenToSlot = BuilderService.manageDynamicContentTokenToSlot;\nMautic.launchBuilder = launchBuilderGrapesjs;\nMautic.initSelectTheme = initSelectThemeGrapesjs(Mautic.initSelectTheme);\nMautic.setThemeHtml = setThemeHtml;\n"]} \ No newline at end of file diff --git a/Assets/library/js/grapes.min.js b/Assets/library/js/grapes.min.js deleted file mode 100644 index 082669ef927..00000000000 --- a/Assets/library/js/grapes.min.js +++ /dev/null @@ -1,13 +0,0 @@ -/*! grapesjs - 0.15.10 */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.grapesjs=e():t.grapesjs=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=90)}([function(t,e,n){(function(t,n){var r;!function(){var i="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||this||{},o=i._,a=Array.prototype,s=Object.prototype,l="undefined"!=typeof Symbol?Symbol.prototype:null,c=a.push,u=a.slice,h=s.toString,d=s.hasOwnProperty,f=Array.isArray,p=Object.keys,g=Object.create,v=function(){},m=function(t){return t instanceof m?t:this instanceof m?void(this._wrapped=t):new m(t)};e.nodeType?i._=m:(!n.nodeType&&n.exports&&(e=n.exports=m),e._=m),m.VERSION="1.9.1";var y,b=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},w=function(t,e,n){return m.iteratee!==y?m.iteratee(t,e):null==t?m.identity:m.isFunction(t)?b(t,e,n):m.isObject(t)&&!m.isArray(t)?m.matcher(t):m.property(t)};m.iteratee=y=function(t,e){return w(t,e,1/0)};var x=function(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),i=0;i=0&&e<=T};m.each=m.forEach=function(t,e,n){var r,i;if(e=b(e,n),j(t))for(r=0,i=t.length;r0?0:a-1;for(i||(r=e[o?o[s]:s],s+=t);s>=0&&s=3;return e(t,b(n,i,4),r,o)}};m.reduce=m.foldl=m.inject=E(1),m.reduceRight=m.foldr=E(-1),m.find=m.detect=function(t,e,n){var r=(j(t)?m.findIndex:m.findKey)(t,e,n);if(void 0!==r&&-1!==r)return t[r]},m.filter=m.select=function(t,e,n){var r=[];return e=w(e,n),m.each(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r},m.reject=function(t,e,n){return m.filter(t,m.negate(w(e)),n)},m.every=m.all=function(t,e,n){e=w(e,n);for(var r=!j(t)&&m.keys(t),i=(r||t).length,o=0;o=0},m.invoke=x((function(t,e,n){var r,i;return m.isFunction(e)?i=e:m.isArray(e)&&(r=e.slice(0,-1),e=e[e.length-1]),m.map(t,(function(t){var o=i;if(!o){if(r&&r.length&&(t=k(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)}))})),m.pluck=function(t,e){return m.map(t,m.property(e))},m.where=function(t,e){return m.filter(t,m.matcher(e))},m.findWhere=function(t,e){return m.find(t,m.matcher(e))},m.max=function(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,l=(t=j(t)?t:m.values(t)).length;so&&(o=r);else e=w(e,n),m.each(t,(function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)}));return o},m.min=function(t,e,n){var r,i,o=1/0,a=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,l=(t=j(t)?t:m.values(t)).length;sr||void 0===n)return 1;if(n0?0:i-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(u.call(r,a,s),m.isNaN))>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&oe?(r&&(clearTimeout(r),r=null),s=c,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(l,u)),a};return c.cancel=function(){clearTimeout(r),s=0,r=i=o=null},c},m.debounce=function(t,e,n){var r,i,o=function(e,n){r=null,n&&(i=t.apply(e,n))},a=x((function(a){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(o,e),s&&(i=t.apply(this,a))}else r=m.delay(o,e,this,a);return i}));return a.cancel=function(){clearTimeout(r),r=null},a},m.wrap=function(t,e){return m.partial(e,t)},m.negate=function(t){return function(){return!t.apply(this,arguments)}},m.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},m.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},m.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},m.once=m.partial(m.before,2),m.restArguments=x;var F=!{toString:null}.propertyIsEnumerable("toString"),_=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],R=function(t,e){var n=_.length,r=t.constructor,i=m.isFunction(r)&&r.prototype||s,o="constructor";for(S(t,o)&&!m.contains(e,o)&&e.push(o);n--;)(o=_[n])in t&&t[o]!==i[o]&&!m.contains(e,o)&&e.push(o)};m.keys=function(t){if(!m.isObject(t))return[];if(p)return p(t);var e=[];for(var n in t)S(t,n)&&e.push(n);return F&&R(t,e),e},m.allKeys=function(t){if(!m.isObject(t))return[];var e=[];for(var n in t)e.push(n);return F&&R(t,e),e},m.values=function(t){for(var e=m.keys(t),n=e.length,r=Array(n),i=0;i1&&(r=b(r,e[1])),e=m.allKeys(t)):(r=$,e=A(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i1&&(n=e[1])):(e=m.map(A(e,!1,!1),String),r=function(t,n){return!m.contains(e,n)}),m.pick(t,r,n)})),m.defaults=V(m.allKeys,!0),m.create=function(t,e){var n=C(t);return e&&m.extendOwn(n,e),n},m.clone=function(t){return m.isObject(t)?m.isArray(t)?t.slice():m.extend({},t):t},m.tap=function(t,e){return e(t),t},m.isMatch=function(t,e){var n=m.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o":">",'"':""","'":"'","`":"`"},U=m.invert(W),q=function(t){var e=function(e){return t[e]},n="(?:"+m.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};m.escape=q(W),m.unescape=q(U),m.result=function(t,e,n){m.isArray(e)||(e=[e]);var r=e.length;if(!r)return m.isFunction(n)?n.call(t):n;for(var i=0;i/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,Y={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},X=/\\|'|\r|\n|\u2028|\u2029/g,J=function(t){return"\\"+Y[t]};m.template=function(t,e,n){!e&&n&&(e=n),e=m.defaults({},e,m.templateSettings);var r,i=RegExp([(e.escape||K).source,(e.interpolate||K).source,(e.evaluate||K).source].join("|")+"|$","g"),o=0,a="__p+='";t.replace(i,(function(e,n,r,i,s){return a+=t.slice(o,s).replace(X,J),o=s+e.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),e})),a+="';\n",e.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(e.variable||"obj","_",a)}catch(t){throw t.source=a,t}var s=function(t){return r.call(this,t,m)},l=e.variable||"obj";return s.source="function("+l+"){\n"+a+"}",s},m.chain=function(t){var e=m(t);return e._chain=!0,e};var Z=function(t,e){return t._chain?m(e).chain():e};m.mixin=function(t){return m.each(m.functions(t),(function(e){var n=m[e]=t[e];m.prototype[e]=function(){var t=[this._wrapped];return c.apply(t,arguments),Z(this,n.apply(m,t))}})),m},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],(function(t){var e=a[t];m.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],Z(this,n)}})),m.each(["concat","join","slice"],(function(t){var e=a[t];m.prototype[t]=function(){return Z(this,e.apply(this._wrapped,arguments))}})),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return m}.apply(e,[]))||(n.exports=r)}()}).call(this,n(23),n(67)(t))},function(t,e,n){(function(r){var i,o,a;a="object"==typeof self&&self.self===self&&self||"object"==typeof r&&r.global===r&&r,i=[n(0),n(21),e],void 0===(o=function(t,e,n){a.Backbone=function(t,e,n,r){var i=t.Backbone,o=Array.prototype.slice;e.VERSION="1.3.3",e.$=r,e.noConflict=function(){return t.Backbone=i,this},e.emulateHTTP=!1,e.emulateJSON=!1;var a=function(t,e,r){n.each(e,(function(e,i){n[i]&&(t.prototype[i]=function(t,e,r){switch(t){case 1:return function(){return n[e](this[r])};case 2:return function(t){return n[e](this[r],t)};case 3:return function(t,i){return n[e](this[r],s(t,this),i)};case 4:return function(t,i,o){return n[e](this[r],s(t,this),i,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[r]),n[e].apply(n,t)}}}(e,i,r))}))},s=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?l(t):n.isString(t)?function(e){return e.get(t)}:t},l=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},c=e.Events={},u=/\s+/,h=function(t,e,r,i,o){var a,s=0;if(r&&"object"==typeof r){void 0!==i&&"context"in o&&void 0===o.context&&(o.context=i);for(a=n.keys(r);sthis.length&&(i=this.length),i<0&&(i+=this.length+1);var o,a,s=[],l=[],c=[],u=[],h={},d=e.add,f=e.merge,p=e.remove,g=!1,v=this.comparator&&null==i&&!1!==e.sort,m=n.isString(this.comparator)?this.comparator:null;for(a=0;a7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(N,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash="#"+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),A.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,(function(e){if(e.route.test(t))return e.callback(t),!0})))},navigate:function(t,e){if(!A.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;""!==t&&"?"!==t.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+t;if(t=this.decodeFragment(t.replace(I,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;e.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else t.hash="#"+e}}),e.history=new A,y.extend=b.extend=P.extend=O.extend=A.extend=function(t,e){var r,i=this;return r=t&&n.has(t,"constructor")?t.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,e),r.prototype=n.create(i.prototype,t),r.prototype.constructor=r,r.__super__=i.prototype,r};var F=function(){throw new Error('A "url" property or function must be specified')},_=function(t,e){var n=e.error;e.error=function(r){n&&n.call(e.context,t,r,e),t.trigger("error",t,r,e)}};return e}(a,n,t,e)}.apply(e,i))||(t.exports=o)}).call(this,n(23))},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){"use strict";n.d(e,"n",(function(){return b})),n.d(e,"s",(function(){return u})),n.d(e,"r",(function(){return h})),n.d(e,"j",(function(){return v})),n.d(e,"p",(function(){return s})),n.d(e,"g",(function(){return w})),n.d(e,"d",(function(){return x})),n.d(e,"b",(function(){return p})),n.d(e,"o",(function(){return y})),n.d(e,"f",(function(){return S})),n.d(e,"l",(function(){return k})),n.d(e,"e",(function(){return m})),n.d(e,"t",(function(){return c})),n.d(e,"q",(function(){return g})),n.d(e,"h",(function(){return C})),n.d(e,"i",(function(){return d})),n.d(e,"c",(function(){return T})),n.d(e,"a",(function(){return l})),n.d(e,"k",(function(){return P})),n.d(e,"m",(function(){return j}));var r=n(7),i=n.n(r),o=n(0),a=window.Element.prototype,s=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.msMatchesSelector,l=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(o.isArray)(e)?i()(e):[e];if(r.length){var a=r.shift();if(!n.unique||!document.querySelector('link[href="'.concat(a,'"]'))){var s=document,l=s.head,c=document.createElement("link");c.href=a,c.rel="stylesheet",n.prepand?l.insertBefore(c,l.firstChild):l.appendChild(c)}t(r)}},c=function(t,e){var n={},r=Object(o.keys)(e);for(var i in t)if(t.hasOwnProperty(i)){var a=t[i],s=e[i];r.indexOf(i)>=0?a!==s&&(n[i]=s):n[i]=null}for(var l in e)e.hasOwnProperty(l)&&Object(o.isUndefined)(t[l])&&(n[l]=e[l]);return n},u=function(t,e,n){e=e.split(/\s+/),t=t instanceof Array?t:[t];for(var r=function(r){t.forEach((function(t){return t.addEventListener(e[r],n)}))},i=0;i1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0;if(isNaN(t))return n;if(t=parseFloat(t),Math.floor(t)!==t){var i=e.toString().split(".")[1];r=i?i.length:0}return r?parseFloat(t.toFixed(r)):t},v=function(t){return"draggable"in document.createElement("i")&&(t?t.get("Config").nativeDnD:1)},m=function(t){return Object(o.isElement)(t)||y(t)?t:t&&t.getEl?t.getEl():void 0},y=function(t){return t&&3===t.nodeType},b=function(t){return t&&!y(t)&&!function(t){return t&&8===t.nodeType}(t)},w=function(t,e){var n=t;return Object(o.isElement)(t)&&(n=e(t).data("model")),n},x=function(t){var e,n={top:0,left:0,width:0,height:0};if(!t)return n;if(y(t)){var r=document.createRange();r.selectNode(t),e=r.getBoundingClientRect(),r.detach()}return e||(t.getBoundingClientRect?t.getBoundingClientRect():n)},C=function(t){return t.touches&&t.touches[0]?t.touches[0]:t},O=function(t){return t.which||t.keyCode},S=function(t){return String.fromCharCode(O(t))},k=function(t){return 27===O(t)},T=function(t){return t.charAt(0).toUpperCase()+t.substring(1)},P=function(t){return t&&t.toHTML},j=function(t){return t&&t.toCSS}},function(t,e,n){"use strict";n.r(e);var r=n(6),i=n.n(r),o=n(2),a=n.n(o),s=n(0),l=n(3),c=n(20),u=n(1),h=n.n(u),d=n(18),f=n(8),p=n(9);function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function v(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n=this.target,r=this.get("name");if(!Object(s.isUndefined)(t)){var i=t;if("false"===t?i=!1:"true"===t&&(i=!0),this.get("changeProp"))n.set(r,i,e);else{var o=v({},n.get("attributes"));o[r]=i,n.set("attributes",o,e)}}},setValueFromInput:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={value:t};this.set(r,v({},n,{avoidStore:1})),e&&(this.set("value","",n),this.set(r,n))},getInitValue:function(){var t,e=this.target,n=this.get("name");if(e){var r=e.get("attributes");t=this.get("changeProp")?e.get(n):r[n]}return t||this.get("value")||this.get("default")}}),y=h.a.Collection.extend({model:m,initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.em=e.em||"",this.listenTo(this,"add",this.handleAdd),this.listenTo(this,"reset",this.handleReset)},handleReset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.previousModels,r=void 0===n?[]:n;r.forEach((function(t){return t.trigger("remove")}))},handleAdd:function(t){var e=this.target;e&&(t.target=e)},setTarget:function(t){this.target=t},add:function(t,e){var n=this.em;if(Object(s.isString)(t)||Object(s.isArray)(t)){var r=n&&n.get&&n.get("TraitManager"),i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{build:function(e){var n=[];"string"==typeof e&&(e=[e]);for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.em,i=this.parent(),o=i&&i.attributes;if(o&&o.propagate){var a={},l=o.propagate;l.forEach((function(t){return a[t]=i.get(t)})),a.propagate=l,a=w({},a,{},e),this.set(a)}var c=this.get("propagate");c&&this.set("propagate",Object(s.isArray)(c)?c:[c]),n&&n.config&&n.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),n.em=r,this.opt=n,this.em=r,this.config=n.config||{},this.set("attributes",w({},this.defaults.attributes||{},{},this.get("attributes")||{})),this.ccid=C.createId(this),this.initClasses(),this.initTraits(),this.initComponents(),this.initToolbar(),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:tagName",this.tagUpdated),this.listenTo(this,"change:attributes",this.attrUpdated),this.listenTo(this,"change:attributes:id",this._idUpdated),this.set("status",""),["classes","traits","components"].forEach((function(e){var n="add remove ".concat("components"!==e?"change":"");t.listenTo(t.get(e),n.trim(),(function(){for(var n=arguments.length,r=new Array(n),i=0;i2&&void 0!==arguments[2]?arguments[2]:{},i=this.get("attributes"),o=i.class;o&&this.setClass(o),delete i.class;var a=i.style;a&&this.setStyle(a),delete i.style;var c=w({},this.previous("attributes")),u=Object(l.t)(c,this.get("attributes"));Object(s.keys)(u).forEach((function(t){return n.trigger("change:attributes:".concat(t),n,u[t],r)}))},setAttributes:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.set("attributes",w({},t),e),this},addAttributes:function(t){var e=w({},this.getAttributes(),{},t);return this.setAttributes(e),this},getStyle:function(){var t=this.em;if(t&&t.getConfig("avoidInlineStyle")){var e=t.get("state"),n=t.get("CssComposer").getIdRule(this.getId(),{state:e});if(this.rule=n,n)return n.getStyle()}return c.a.getStyle.call(this)},setStyle:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em,i=this.opt;if(r&&r.getConfig("avoidInlineStyle")&&!i.temporary){var o=this.get("style")||{};e=w({},e=Object(s.isString)(e)?this.parseStyle(e):e,{},o);var a=r.get("state"),u=r.get("CssComposer"),h=this.getStyle();this.rule=u.setIdRule(this.getId(),e,w({},n,{state:a}));var d=Object(l.t)(h,e);this.set("style",{},{silent:1}),Object(s.keys)(d).forEach((function(e){return t.trigger("change:style:".concat(e))}))}else e=c.a.setStyle.apply(this,arguments);return e},getAttributes:function(){var t,e=this.em,n=[],r=w({},this.get("attributes")),i=e&&e.get("SelectorManager"),o=this.getId();(this.get("classes").forEach((function(t){return n.push(Object(s.isString)(t)?t:t.get("name"))})),n.length&&(r.class=n.join(" ")),Object(s.has)(r,"id"))||(!function(t){return t&&t.getConfig("avoidInlineStyle")}(e)?Object(s.isEmpty)(this.getStyle())||(t=1):t=i&&i.get(o,i.Selector.TYPE_ID),t&&(r.id=this.getId()));return r},addClass:function(t){var e=this.em.get("SelectorManager").addClass(t);return this.get("classes").add(e)},setClass:function(t){return this.get("classes").reset(),this.addClass(t)},removeClass:function(t){var e=[];t=Object(s.isArray)(t)?t:[t];var n=this.get("classes"),r=f.a.TYPE_CLASS;return t.forEach((function(t){t.split(" ").forEach((function(t){var i=n.where({name:t,type:r})[0];i&&e.push(n.remove(i))}))})),e},getClasses:function(){var t=this.getAttributes().class;return t?t.split(" "):[]},initClasses:function(){var t=[this,"change:classes",this.initClasses],e=this.get("classes")||[],n=Object(s.isString)(e)?e.split(" "):e;this.stopListening.apply(this,t);var r=this.normalizeClasses(n),i=new p.a([]);return this.set("classes",i),i.add(r),this.listenTo.apply(this,t),this},initComponents:function(){var t=[this,"change:components",this.initComponents];this.stopListening.apply(this,t);var e=new d.a(null,this.opt);e.parent=this;var n=this.get("components"),r=!this.opt.avoidChildren;return this.set("components",e),r&&e.add(Object(s.isFunction)(n)?n(this):n),this.listenTo.apply(this,t),this},initTraits:function(t){var e=this.em,n=[this,"change:traits",this.initTraits];this.stopListening.apply(this,n),this.loadTraits();var r=w({},this.get("attributes")),i=this.get("traits");return i.each((function(t){if(!t.get("changeProp")){var e=t.get("name"),n=t.getInitValue();e&&n&&(r[e]=n)}})),i.length&&this.set("attributes",r),this.listenTo.apply(this,n),t&&e&&e.trigger("component:toggled"),this},append:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.components().add(t,e);return Object(s.isArray)(n)?n:[n]},components:function(t){var e=this.get("components");return Object(s.isUndefined)(t)?e:(e.reset(),t&&this.append(t))},parent:function(){var t=this.collection;return t&&t.parent},scriptUpdated:function(){this.set("scriptUpdated",1)},initToolbar:function(){var t=this.em,e=t&&t.getConfig("stylePrefix")||"";if(!this.get("toolbar")){var n=[];this.collection&&n.push({attributes:{class:"fa fa-arrow-up"},command:function(t){return t.runCommand("core:component-exit",{force:1})}}),this.get("draggable")&&n.push({attributes:{class:"fa fa-arrows ".concat(e,"no-touch-actions"),draggable:!0},command:"tlb-move"}),this.get("copyable")&&n.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),this.get("removable")&&n.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),this.set("toolbar",n)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t=t||this.get("traits"),!((t=Object(s.isFunction)(t)?t(this):t)instanceof y)){var n=new y([],this.opt);n.setTarget(this),t.length&&(t.forEach((function(t){return t.attributes&&delete t.attributes.value})),n.add(t)),this.set("traits",n,e)}return this},getTrait:function(t){return this.get("traits").filter((function(e){return e.get("id")===t||e.get("name")===t}))[0]},updateTrait:function(t,e){var n=this.em,r=this.getTrait(t);return r&&r.set(e),n&&n.trigger("component:toggled"),this},getTraitIndex:function(t){var e=this.getTrait(t);return e?this.get("traits").indexOf(e):e},removeTrait:function(t){var e=this,n=this.em,r=(Object(s.isArray)(t)?t:[t]).map((function(t){return e.getTrait(t)})),i=this.get("traits").remove(r);return n&&n.trigger("component:toggled"),i},addTrait:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.em,r=this.get("traits").add(t,e);return n&&n.trigger("component:toggled"),r},normalizeClasses:function(t){var e=[],n=this.em;if(n){var r=n.get("SelectorManager");if(r)return t.forEach((function(t){var n="";n="string"==typeof t?t:t.name;var i=r.add(n);e.push(i)})),e}},clone:function(){var t=this.em,e=this.getStyle(),n=w({},this.attributes),r=w({},this.opt);n.attributes=w({},n.attributes),delete n.attributes.id,n.components=[],n.classes=[],n.traits=[],this.get("components").each((function(t,e){n.components[e]=t.clone()})),this.get("traits").each((function(t,e){n.traits[e]=t.clone()})),this.get("classes").each((function(t,e){n.classes[e]=t.get("name")})),n.status="",n.view="",r.collection=null,t&&t.getConfig("avoidInlineStyle")&&!Object(s.isEmpty)(e)&&(n.style=e);var i=new this.constructor(n,r);return t&&t.trigger("component:clone",i),this.trigger("component:clone",i),i},getName:function(){var t=this.em,e=this.attributes,n=e.type,r=e.tagName,i=this.get("custom-name"),o=this.get("name"),a=r;a="div"==a?"box":a;var s=n||a;s=s.charAt(0).toUpperCase()+s.slice(1);var l=t&&(t.t("".concat("domComponents.names.").concat(n))||t.t("".concat("domComponents.names.").concat(r)));return i||l||o||s},getIcon:function(){var t=this.get("icon");return t?t+" ":""},toHTML:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this,n=[],r=t.tag,i=r||e.get("tagName"),o=e.get("void"),a=t.attributes,l=this.getAttrToHTML();for(var c in delete t.tag,a&&(Object(s.isFunction)(a)?l=a(e,l)||{}:Object(s.isObject)(a)&&(l=a)),l){var u=l[c],h=Object(s.isString)(u)?u.replace(/"/g,"""):u;Object(s.isUndefined)(h)||(Object(s.isBoolean)(h)?h&&n.push(c):n.push("".concat(c,'="').concat(h,'"')))}var d=n.length?" ".concat(n.join(" ")):"",f="<".concat(i).concat(d).concat(o?"/":"",">").concat(e.get("content"));return e.get("components").each((function(e){return f+=e.toHTML(t)})),!o&&(f+="")),f},getAttrToHTML:function(){var t=this.getAttributes();return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=new Array(t),n=0;n1?r-1:0),o=1;o0&&void 0!==arguments[0]&&arguments[0];var t=this.em,e=this.getId();if(e){var n=C.createId(this);this.setId(n);var r=t&&t.get("CssComposer").getIdRule(e),i=r&&r.get("selectors").at(0);return i&&i.set("name",n),this}},_getStyleRule:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.id,n=this.em,r=e||this.getId();return n&&n.get("CssComposer").getIdRule(r)},_getStyleSelector:function(t){var e=this._getStyleRule(t);return e&&e.get("selectors").at(0)},_idUpdated:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.idUpdate){var r=this.ccid,i=this.get("attributes")||{},o=i.id,a=(this.previous("attributes")||{}).id||r,s=C.getList(this);if(s[o])return this.setId(a,{idUpdate:1});delete s[a],s[o]=this,this.ccid=o;var l=this._getStyleSelector({id:a});l&&l.set({name:o,label:o})}}},{isComponent:function(t){return{tagName:t.tagName?t.tagName.toLowerCase():""}},createId:function(t){var e,n=C.getList(t),r=t.get("attributes").id;return r?(e=C.getIncrementId(r,n),t.setId(e)):e=C.getNewId(n),n[e]=t,e},getNewId:function(t){for(var e=Object.keys(t).length.toString().length+2,n=(Math.random()+1.1).toString(36).slice(-e),r="i".concat(n);t[r];)r=C.getNewId(t);return r},getIncrementId:function(t,e){for(var n=1,r=t;e[r];)n++,r="".concat(t,"-").concat(n);return r},getList:function(t){var e=t.opt&&t.opt.domc;return e?e.componentsById:{}},checkId:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object(s.isArray)(t)?t:[t];r.forEach((function(t){var r=t.attributes,i=void 0===r?{}:r,o=t.components,a=i.id;if(a&&n[a]){var l=C.getIncrementId(a,n);i.id=l,Object(s.isArray)(e)&&e.forEach((function(t){var e=t.selectors;e.forEach((function(t,n){t==="#".concat(a)&&(e[n]="#".concat(l))}))}))}o&&C.checkId(o,e,n)}))}});e.default=C},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(1),a=n.n(o),s=n(0),l=n(18),c=n(30),u=n(9),h=n(11);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=t.config||{},r=n.em,i=e.opt||{},o=this.$el,a=n.draggableComponents;this.opts=t,this.modelOpt=i,this.config=n,this.em=r||"",this.pfx=n.stylePrefix||"",this.ppfx=n.pStylePrefix||"",this.attr=e.get("attributes"),this.classe=this.attr.class||[],this.listenTo(e,"change:style",this.updateStyle),this.listenTo(e,"change:attributes",this.renderAttributes),this.listenTo(e,"change:highlightable",this.updateHighlight),this.listenTo(e,"change:status",this.updateStatus),this.listenTo(e,"change:script",this.reset),this.listenTo(e,"change:content",this.updateContent),this.listenTo(e,"change",this.handleChange),this.listenTo(e,"active",this.onActive),this.listenTo(e,"disable",this.onDisable),o.data("model",e),e.view=this,this.initClasses(),this.initComponents({avoidRender:1}),this.events=f({},this.events,{},a&&{dragstart:"handleDragStart"}),this.delegateEvents(),!i.temporary&&this.init(this._clbObj())},_clbObj:function(){var t=this.em,e=this.model,n=this.el;return{editor:t&&t.getEditor(),model:e,el:n}},init:function(){},removed:function(){},onActive:function(){},onDisable:function(){},remove:function(){return a.a.View.prototype.remove.apply(this,arguments),this.removed(this._clbObj()),this},handleDragStart:function(t){t.preventDefault(),t.stopPropagation(),this.em.get("Commands").run("tlb-move",{target:this.model,event:t})},initClasses:function(){var t=this.model,e=t.get("classes");e instanceof u.a&&(this.stopListening(t,"change:classes",this.initClasses),this.listenTo(t,"change:classes",this.initClasses),this.listenTo(e,"add remove change",this.updateClasses),e.length&&this.importClasses())},initComponents:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=this.$el,r=this.childrenView,i="change:components",o=e.get("components"),a=[e,i,this.initComponents];o instanceof l.a&&(n.data("collection",o),r&&r.remove(),this.stopListening.apply(this,a),!t.avoidRender&&this.renderChildren(),this.listenTo.apply(this,a))},handleChange:function(){var t=this.model;for(var e in t.emitUpdate(),t.changed)t.emitUpdate(e)},importClasses:function(){var t=this.config.em.get("SelectorManager");t&&this.model.get("classes").each((function(e){t.add(e.get("name"))}))},updateStatus:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(this.em,this.el),n=this.model.get("status"),r=this.pfx,i=this.ppfx,o="".concat(r,"selected"),a="".concat(o,"-parent"),s="".concat(i,"freezed"),l="".concat(i,"hovered"),c=[o,a,s,l];this.$el.removeClass(c.join(" "));var u=e.getAttribute("class")||"",h="";switch(n){case"selected":h="".concat(u," ").concat(o);break;case"selected-parent":h="".concat(u," ").concat(a);break;case"freezed":h="".concat(u," ").concat(s);break;case"freezed-selected":h="".concat(u," ").concat(s," ").concat(o);break;case"hovered":h=t.avoidHover?"":"".concat(u," ").concat(l)}(h=h.trim())&&e.setAttribute("class",h)},updateHighlight:function(){var t=this.model.get("highlightable");this.setAttribute("data-highlightable",t?1:"")},updateStyle:function(){var t=this.em,e=this.model;if(t&&t.getConfig("avoidInlineStyle")){this.el.id=e.getId();var n=e.getStyle();!Object(s.isEmpty)(n)&&e.setStyle(n)}else this.setAttribute("style",e.styleToString())},updateClasses:function(){var t=this.model.get("classes").pluck("name").join(" ");this.setAttribute("class",t),this.updateStatus()},setAttribute:function(t,e){var n=this.$el;e?n.attr(t,e):n.removeAttr(t)},getClasses:function(){return this.model.getClasses().join(" ")},updateAttributes:function(){var t=[],e=this.model,n=this.$el,r=this.el,i=this.config,o=e.attributes,a=o.highlightable,l=o.textable,c=f({"data-gjs-type":o.type||"default"},i.draggableComponents?{draggable:!0}:{},{},a?{"data-highlightable":1}:{},{},l?{contenteditable:"false","data-gjs-textable":"true"}:{});Object(s.each)(r.attributes,(function(e){return t.push(e.nodeName)})),t.forEach((function(t){return n.removeAttr(t)}));var u=f({},c,{},e.getAttributes());Object(s.keys)(u).forEach((function(t){return!1===u[t]&&delete u[t]})),n.attr(u),this.updateStyle()},updateContent:function(){this.getChildrenContainer().innerHTML=this.model.get("content")},prevDef:function(t){t.preventDefault()},updateScript:function(){var t=this.model,e=this.em;t.get("script")&&e&&e.get("Canvas").getCanvasView().updateScript(this)},getChildrenContainer:function(){var t=this.el;return"function"==typeof this.getChildrenSelector?t=this.el.querySelector(this.getChildrenSelector()):this.getTemplate,t},reset:function(){var t=this.el,e=this.model,n=e.components();this.el="",this._ensureElement(),this.$el.data({model:e,collection:n}),Object(h.d)(t,this.el),this.render()},renderChildren:function(){this.updateContent();var t=this.getChildrenContainer(),e=new c.a({collection:this.model.get("components"),config:this.config,componentTypes:this.opts.componentTypes});e.render(t),this.childrenView=e;for(var n=Array.prototype.slice.call(e.el.childNodes),r=0,i=n.length;r1&&void 0!==arguments[1]?arguments[1]:{},n=e.config,r=void 0===n?{}:n,o=this.get("name"),a=this.get("label");o?a||this.set("label",o):this.set("name",a);var s=this.get("name"),l=r.escapeName,c=l?l(s):i.escapeName(s);this.set("name",c)},getFullName:function(){var t="";switch(this.get("type")){case 1:t=".";break;case 2:t="#"}return t+this.get("name")}},{TYPE_CLASS:1,TYPE_ID:2,escapeName:function(t){return"".concat(t).trim().replace(/([^a-z0-9\w-\:]+)/gi,"-")}});e.a=i},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n.n(i),a=n(8);e.a=o.a.Collection.extend({model:a.a,modelId:function(t){return"".concat(t.name,"_").concat(t.type||a.a.TYPE_CLASS)},getStyleable:function(){return Object(r.filter)(this.models,(function(t){return t.get("active")&&!t.get("private")}))},getValid:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.noDisabled;return Object(r.filter)(this.models,(function(t){return!t.get("private")})).filter((function(t){return e?t.get("active"):1}))},getFullString:function(t){var e=[];return(t||this).forEach((function(t){return e.push(t.getFullName())})),e.join("").trim()}})},function(t,e,n){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),h=/Opera\//.test(t),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),p=/PhantomJS/.test(t),g=!o&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),v=/Android/.test(t),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=g||/Mac/.test(e),b=/\bCrOS\b/.test(t),w=/win/i.test(e),x=h&&t.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(h=!1,l=!0);var C=y&&(c||h&&(null==x||x<12.11)),O=n||a&&s>=9;function S(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var k,T=function(t,e){var n=t.className,r=S(e).exec(n);if(r){var i=n.slice(r.index+r[0].length);t.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function P(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function j(t,e){return P(t).appendChild(e)}function E(t,e,n,r){var i=document.createElement(t);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return a+(e-o);a+=s-o,a+=n-a%n,o=s+1}}g?I=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:a&&(I=function(t){try{t.select()}catch(t){}});var V=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};function H(t,e){for(var n=0;n=e)return r+Math.min(a,e-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=e)return r}}var G=[""];function K(t){for(;G.length<=t;)G.push(Y(G)+" ");return G[t]}function Y(t){return t[t.length-1]}function X(t,e){for(var n=[],r=0;r"€"&&(t.toUpperCase()!=t.toLowerCase()||Q.test(t))}function et(t,e){return e?!!(e.source.indexOf("\\w")>-1&&tt(t))||e.test(t):tt(t)}function nt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var rt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function it(t){return t.charCodeAt(0)>=768&&rt.test(t)}function ot(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var i=(e+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+r}}var st=null;function lt(t,e,n){var r;st=null;for(var i=0;ie)return i;o.to==e&&(o.from!=o.to&&"before"==n?r=i:st=i),o.from==e&&(o.from!=o.to&&"before"!=n?r=i:st=i)}return null!=r?r:st}var ct=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,a=/[1n]/;function s(t,e,n){this.level=t,this.from=e,this.to=n}return function(l,c){var u="ltr"==c?"L":"R";if(0==l.length||"ltr"==c&&!n.test(l))return!1;for(var h,d=l.length,f=[],p=0;p-1&&(r[e]=i.slice(0,o).concat(i.slice(o+1)))}}}function gt(t,e){var n=ft(t,e);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function bt(t){t.prototype.on=function(t,e){dt(this,t,e)},t.prototype.off=function(t,e){pt(this,t,e)}}function wt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function xt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ct(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ot(t){wt(t),xt(t)}function St(t){return t.target||t.srcElement}function kt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var Tt,Pt,jt=function(){if(a&&s<9)return!1;var t=E("div");return"draggable"in t||"dragDrop"in t}();function Et(t){if(null==Tt){var e=E("span","​");j(t,E("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Tt=e.offsetWidth<=1&&e.offsetHeight>2&&!(a&&s<8))}var n=Tt?E("span","​"):E("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Mt(t){if(null!=Pt)return Pt;var e=j(t,document.createTextNode("AخA")),n=k(e,0,1).getBoundingClientRect(),r=k(e,1,2).getBoundingClientRect();return P(t),!(!n||n.left==n.right)&&(Pt=r.right-n.right<3)}var Dt,At=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],r=t.length;e<=r;){var i=t.indexOf("\n",e);-1==i&&(i=t.length);var o=t.slice(e,"\r"==t.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),e+=a+1):(n.push(o),e=i+1)}return n}:function(t){return t.split(/\r\n?|\n/)},Lt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Nt="oncopy"in(Dt=E("div"))||(Dt.setAttribute("oncopy","return;"),"function"==typeof Dt.oncopy),It=null,Ft={},_t={};function Rt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Ft[t]=e}function Vt(t){if("string"==typeof t&&_t.hasOwnProperty(t))t=_t[t];else if(t&&"string"==typeof t.name&&_t.hasOwnProperty(t.name)){var e=_t[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Vt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Vt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Ht(t,e){e=Vt(e);var n=Ft[e.name];if(!n)return Ht(t,"text/plain");var r=n(t,e);if(zt.hasOwnProperty(e.name)){var i=zt[e.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)r[a]=e.modeProps[a];return r}var zt={};function $t(t,e){_(e,zt.hasOwnProperty(t)?zt[t]:zt[t]={})}function Bt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var i=e[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Wt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Ut(t,e,n){return!t.startState||t.startState(e,n)}var qt=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Gt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(e=t.first&&en?ee(n,Gt(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?ee(t.line,e):n<0?ee(t.line,0):t}(e,Gt(t,e.line).text.length)}function ce(t,e){for(var n=[],r=0;r=this.string.length},qt.prototype.sol=function(){return this.pos==this.lineStart},qt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qt.prototype.next=function(){if(this.pose},qt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},qt.prototype.skipToEnd=function(){this.pos=this.string.length},qt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},qt.prototype.backUp=function(t){this.pos-=t},qt.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var i=function(t){return n?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},qt.prototype.current=function(){return this.string.slice(this.start,this.pos)},qt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},qt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},qt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ue=function(t,e){this.state=t,this.lookAhead=e},he=function(t,e,n,r){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function de(t,e,n,r){var i=[t.state.modeGen],o={};xe(t,e.text,t.doc.mode,n,(function(t,e){return i.push(t,e)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=t.state.overlays[r],l=1,c=0;n.state=!0,xe(t,e.text,s.mode,n,(function(t,e){for(var n=l;ct&&i.splice(l,1,t,i[l+1],r),l+=2,c=Math.min(t,r)}if(e)if(s.opaque)i.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&Bt(t.doc.mode,r.state),o=de(t,e,r);i&&(r.state=i),e.stateAfter=r.save(!i),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function pe(t,e,n){var r=t.doc,i=t.display;if(!r.mode.startState)return new he(r,!0,e);var o=function(t,e,n){for(var r,i,o=t.doc,a=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>a;--s){if(s<=o.first)return o.first;var l=Gt(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ue?c.lookAhead:0)<=o.modeFrontier))return s;var u=R(l.text,null,t.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(t,e,n),a=o>r.first&&Gt(r,o-1).stateAfter,s=a?he.fromSaved(r,a,o):new he(r,Ut(r.mode),o);return r.iter(o,e,(function(n){ge(t,n.text,s);var r=s.line;n.stateAfter=r==e-1||r%5==0||r>=i.viewFrom&&re.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}he.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},he.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},he.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},he.fromSaved=function(t,e,n){return e instanceof ue?new he(t,Bt(t.mode,e.state),n,e.lookAhead):new he(t,Bt(t.mode,e),n)},he.prototype.save=function(t){var e=!1!==t?Bt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ue(e,this.maxLookAhead):e};var ye=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function be(t,e,n,r){var i,o,a=t.doc,s=a.mode,l=Gt(a,(e=le(a,e)).line),c=pe(t,e.line,n),u=new qt(l.text,t.options.tabSize,c);for(r&&(o=[]);(r||u.post.options.maxHighlightLength?(s=!1,a&&ge(t,e,r,h.pos),h.pos=e.length,l=null):l=we(me(n,h,r.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c=e:o.to>e);(r||(r=[])).push(new Se(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(t,e,n){var r;if(t)for(var i=0;i=e:o.to>e)||o.from==e&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from0&&s)for(var b=0;be)&&(!n||Le(n,o.marker)<0)&&(n=o.marker)}return n}function Re(t,e,n,r,i){var o=Gt(t,e),a=Oe&&o.markedSpans;if(a)for(var s=0;s=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ne(c.to,n)>=0:ne(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ne(c.from,r)<=0:ne(c.from,r)<0)))return!0}}}function Ve(t){for(var e;e=Ie(t);)t=e.find(-1,!0).line;return t}function He(t,e){var n=Gt(t,e),r=Ve(n);return n==r?e:Jt(r)}function ze(t,e){if(e>t.lastLine())return e;var n,r=Gt(t,e);if(!$e(t,r))return e;for(;n=Fe(r);)r=n.find(1,!0).line;return Jt(r)+1}function $e(t,e){var n=Oe&&e.markedSpans;if(n)for(var r=void 0,i=0;ie.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var Ge=function(t,e,n){this.text=t,Me(this,e),this.height=n?n(this):1};function Ke(t){t.parent=null,Ee(t)}Ge.prototype.lineNo=function(){return Jt(this)},bt(Ge);var Ye={},Xe={};function Je(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?Xe:Ye;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Ze(t,e){var n=M("span",null,null,l?"padding-right: .1px":null),r={pre:M("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var o=i?e.rest[i-1]:e.line,a=void 0;r.pos=0,r.addToken=tn,Mt(t.display.measure)&&(a=ut(o,t.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],rn(o,r,fe(t,o,e!=t.display.externalMeasured&&Jt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=N(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=N(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Et(t.display.measure))),0==i?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return gt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=N(r.pre.className,r.textClass||"")),r}function Qe(t){var e=E("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function tn(t,e,n,r,i,o,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,r="",i=0;ic&&h.from<=c);d++);if(h.to>=u)return t(n,r,i,o,a,s,l);t(n,r.slice(0,h.to-c),i,o,null,s,l),o=null,r=r.slice(h.to-c),c=h.to}}}function nn(t,e,n,r){var i=!r&&n.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!r&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function rn(t,e,n){var r=t.markedSpans,i=t.text,o=0;if(r)for(var a,s,l,c,u,h,d,f=i.length,p=0,g=1,v="",m=0;;){if(m==p){l=c=u=s="",d=null,h=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,c=""),C.className&&(l+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(u+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var O in C.attributes)(d||(d={}))[O]=C.attributes[O];C.collapsed&&(!h||Le(h.marker,C)<0)&&(h=x)}else x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S=f)break;for(var T=Math.min(f,m);;){if(v){var P=p+v.length;if(!h){var j=P>T?v.slice(0,T-p):v;e.addToken(e,j,a?a+l:l,u,p+j.length==m?c:"",s,d)}if(P>=T){v=v.slice(T-p),p=T;break}p=P,u=""}v=i.slice(o,o=n[g++]),a=Je(n[g++],e.cm.options)}}else for(var E=1;En)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function Dn(t,e,n,r){return Nn(t,Ln(t,e),n,r)}function An(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&e2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,r){var i,o=_n(e.map,n,r),l=o.node,c=o.start,u=o.end,h=o.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&it(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,i))}else{var f;c>0&&(h=r="right"),i=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+or(t.display),top:p.top,bottom:p.bottom}:Fn}for(var g=i.top-e.rect.top,v=i.bottom-e.rect.top,m=(g+v)/2,y=e.view.measure.heights,b=0;be)&&(i=(o=l-s)-1,e>=l&&(a="right")),null!=i){if(r=t[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c=0&&(n=t[i]).left==n.right;i--);return n}function Vn(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(t,e,n){return a(n?t-1:t,1==s[e].level!=n)}var h=lt(s,l,c),d=st,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function Yn(t,e){var n=0;e=le(t.doc,e),t.options.lineWrapping||(n=or(t.display)*e.ch);var r=Gt(t.doc,e.line),i=We(r)+Sn(t.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Xn(t,e,n,r,i){var o=ee(t,e,n);return o.xRel=i,r&&(o.outside=r),o}function Jn(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return Xn(r.first,0,null,-1,-1);var i=Zt(r,n),o=r.first+r.size-1;if(i>o)return Xn(r.first+r.size-1,Gt(r,o).text.length,null,1,1);e<0&&(e=0);for(var a=Gt(r,i);;){var s=er(t,a,i,e,n),l=_e(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=Gt(r,i=c.line)}}function Zn(t,e,n,r){r-=Wn(e);var i=e.text.length,o=at((function(e){return Nn(t,n,e-1).bottom<=r}),i,0);return{begin:o,end:i=at((function(e){return Nn(t,n,e).top>r}),o,i)}}function Qn(t,e,n,r){return n||(n=Ln(t,e)),Zn(t,e,n,Un(t,e,Nn(t,n,r),"line").top)}function tr(t,e,n,r){return!(t.bottom<=n)&&(t.top>n||(r?t.left:t.right)>e)}function er(t,e,n,r,i){i-=We(e);var o=Ln(t,e),a=Wn(e),s=0,l=e.text.length,c=!0,u=ut(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?rr:nr)(t,e,n,o,u,r,i);s=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,g=null,v=at((function(e){var n=Nn(t,o,e);return n.top+=a,n.bottom+=a,!!tr(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=e,g=n),!0)}),s,l),m=!1;if(g){var y=r-g.left=w.bottom?1:0}return Xn(n,v=ot(e.text,v,1),f,m,r-d)}function nr(t,e,n,r,i,o,a){var s=at((function(s){var l=i[s],c=1!=l.level;return tr(Kn(t,ee(n,c?l.to:l.from,c?"before":"after"),"line",e,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Kn(t,ee(n,c?l.from:l.to,c?"after":"before"),"line",e,r);tr(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function rr(t,e,n,r,i,o,a){var s=Zn(t,e,r,a),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=Nn(t,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=pg)&&(u=f,h=g)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function ir(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==In){In=E("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)In.appendChild(document.createTextNode("x")),In.appendChild(E("br"));In.appendChild(document.createTextNode("x"))}j(t.measure,In);var n=In.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),P(t.measure),n||1}function or(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=E("span","xxxxxxxxxx"),n=E("pre",[e],"CodeMirror-line-like");j(t.measure,n);var r=e.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(t.cachedCharWidth=i),i||10}function ar(t){for(var e=t.display,n={},r={},i=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=t.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:sr(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function sr(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function lr(t){var e=ir(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/or(t.display)-3);return function(i){if($e(t.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;re)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)Oe&&He(t.doc,e)i.viewFrom?pr(t):(i.viewFrom+=r,i.viewTo+=r);else if(e<=i.viewFrom&&n>=i.viewTo)pr(t);else if(e<=i.viewFrom){var o=gr(t,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):pr(t)}else if(n>=i.viewTo){var a=gr(t,e,e,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):pr(t)}else{var s=gr(t,e,e,-1),l=gr(t,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(an(t,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):pr(t)}var c=i.externalMeasured;c&&(n=i.lineN&&e=r.viewTo)){var o=r.view[hr(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==H(a,n)&&a.push(n)}}}function pr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function gr(t,e,n,r){var i,o=hr(t,e),a=t.display.view;if(!Oe||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var s=t.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-e,o++}else i=s-e;e+=i,n+=i}for(;He(t.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function vr(t){for(var e=t.display.view,n=0,r=0;r=t.display.viewTo||s.to().linee||e==n&&a.to==e)&&(r(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(e,n,"ltr")}(g,n||0,null==r?d:r,(function(t,e,i,h){var v="ltr"==i,m=f(t,v?"left":"right"),y=f(e-1,v?"right":"left"),b=null==n&&0==t,w=null==r&&e==d,x=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var O=(c?w:b)&&C,S=(c?b:w)&&x?s:(v?m:y).left,k=O?l:(v?y:m).right;u(S,m.top,k-S,m.bottom)}else{var T,P,j,E;v?(T=c&&b&&x?s:m.left,P=c?l:p(t,i,"before"),j=c?s:p(e,i,"after"),E=c&&w&&C?l:y.right):(T=c?p(t,i,"before"):s,P=!c&&b&&x?l:m.right,j=!c&&w&&C?s:y.left,E=c?p(e,i,"after"):l),u(T,m.top,P-T,m.bottom),m.bottom0?e.blinker=setInterval((function(){return e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Or(t){t.state.focused||(t.display.input.focus(),kr(t))}function Sr(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Tr(t))}),100)}function kr(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(gt(t,"focus",t,e),t.state.focused=!0,L(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Cr(t))}function Tr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(gt(t,"blur",t,e),t.state.focused=!1,T(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function Pr(t){for(var e=t.display,n=e.lineDiv.offsetTop,r=0;r.005||d<-.005)&&(Xt(i.line,l),jr(i.line),i.rest))for(var f=0;ft.display.sizerWidth){var p=Math.ceil(c/or(t.display));p>t.display.maxLineLength&&(t.display.maxLineLength=p,t.display.maxLine=i.line,t.display.maxLineChanged=!0)}}}}function jr(t){if(t.widgets)for(var e=0;e=a&&(o=Zt(e,We(Gt(e,l))-t.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Mr(t,e){var n=t.display,r=ir(t.display);e.top<0&&(e.top=0);var i=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=En(t),a={};e.bottom-e.top>o&&(e.bottom=e.top+o);var s=t.doc.height+kn(n),l=e.tops-r;if(e.topi+o){var u=Math.min(e.top,(c?s:e.bottom)-o);u!=i&&(a.scrollTop=u)}var h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft,d=jn(t)-(t.options.fixedGutter?n.gutters.offsetWidth:0),f=e.right-e.left>d;return f&&(e.right=e.left+d),e.left<10?a.scrollLeft=0:e.leftd+h-3&&(a.scrollLeft=e.right+(f?0:10)-d),a}function Dr(t,e){null!=e&&(Nr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Ar(t){Nr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Lr(t,e,n){null==e&&null==n||Nr(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Nr(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Ir(t,Yn(t,e.from),Yn(t,e.to),e.margin))}function Ir(t,e,n,r){var i=Mr(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-r,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+r});Lr(t,i.scrollLeft,i.scrollTop)}function Fr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||li(t,{top:e}),_r(t,e,!0),n&&li(t),ri(t,100))}function _r(t,e,n){e=Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Rr(t,e,n,r){e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,hi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Vr(t){var e=t.display,n=e.gutters.offsetWidth,r=Math.round(t.doc.height+kn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Pn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var Hr=function(t,e,n){this.cm=n;var r=this.vert=E("div",[E("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=E("div",[E("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,t(r),t(i),dt(r,"scroll",(function(){r.clientHeight&&e(r.scrollTop,"vertical")})),dt(i,"scroll",(function(){i.clientWidth&&e(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Hr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var i=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:e?r:0}},Hr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Hr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Hr.prototype.zeroWidthHack=function(){var t=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new V,this.disableVert=new V},Hr.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,(function r(){var i=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,r)}))},Hr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var zr=function(){};function $r(t,e){e||(e=Vr(t));var n=t.display.barWidth,r=t.display.barHeight;Br(t,e);for(var i=0;i<4&&n!=t.display.barWidth||r!=t.display.barHeight;i++)n!=t.display.barWidth&&t.options.lineWrapping&&Pr(t),Br(t,Vr(t)),n=t.display.barWidth,r=t.display.barHeight}function Br(t,e){var n=t.display,r=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}zr.prototype.update=function(){return{bottom:0,right:0}},zr.prototype.setScrollLeft=function(){},zr.prototype.setScrollTop=function(){},zr.prototype.clear=function(){};var Wr={native:Hr,null:zr};function Ur(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&T(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Wr[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),dt(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,n){"horizontal"==n?Rr(t,e):Fr(t,e)}),t),t.display.scrollbars.addClass&&L(t.display.wrapper,t.display.scrollbars.addClass)}var qr=0;function Gr(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++qr},e=t.curOp,sn?sn.ops.push(e):e.ownsGroup=sn={ops:[e],delayedCallbacks:[]}}function Kr(t){var e=t.curOp;e&&function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new oi(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Xr(t){var e=t.cm,n=e.display;t.updatedDisplay&&Pr(e),t.barMeasure=Vr(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Dn(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Pn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-jn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Jr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=E("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Sn(t.display))+"px;\n height: "+(e.bottom-e.top+Pn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(i),t.display.lineSpace.removeChild(o)}}}(e,function(t,e,n,r){var i;null==r&&(r=0),t.options.lineWrapping||e!=n||(n="before"==(e=e.ch?ee(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?ee(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var a=!1,s=Kn(t,e),l=n&&n!=e?Kn(t,n):s,c=Mr(t,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Fr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Rr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(a=!0)),!a)break}return i}(e,le(r,t.scrollToPos.from),le(r,t.scrollToPos.to),t.scrollToPos.margin));var i=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(i)for(var a=0;a=t.display.viewTo)){var n=+new Date+t.options.workTime,r=pe(t,e.highlightFrontier),i=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(o){if(r.line>=t.display.viewFrom){var a=o.styles,s=o.text.length>t.options.maxHighlightLength?Bt(e.mode,r.state):null,l=de(t,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&dn)return ri(t,t.options.workDelay),!0})),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),i.length&&Qr(t,(function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==vr(t))return!1;di(t)&&(pr(t),e.dims=ar(t));var i=r.first+r.size,o=Math.max(e.visible.from-t.options.viewportMargin,r.first),a=Math.min(i,e.visible.to+t.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Oe&&(o=He(t.doc,o),a=ze(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var r=t.display;0==r.view.length||e>=r.viewTo||n<=r.viewFrom?(r.view=an(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=an(t,e,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,hr(t,n)))),r.viewTo=n}(t,o,a),n.viewOffset=We(Gt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=vr(t);if(!s&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=A();if(!e||!D(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(t.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(t);return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var r=t.display,i=t.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(e){var n=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=r.view,u=r.viewFrom,h=0;h-1&&(f=!1),hn(t,d,u,n)),f&&(P(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(te(t.options,u)))),a=d.node.nextSibling}else{var p=yn(t,d,u,n);o.insertBefore(p,a)}u+=d.size}for(;a;)a=s(a)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=A()&&(t.activeElt.focus(),t.anchorNode&&D(document.body,t.anchorNode)&&D(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),P(n.cursorDiv),P(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,ri(t,400)),n.updateLineNumbers=null,!0}function si(t,e){for(var n=e.viewport,r=!0;(r&&t.options.lineWrapping&&e.oldDisplayWidth!=jn(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+kn(t.display)-En(t),n.top)}),e.visible=Er(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&ai(t,e);r=!1){Pr(t);var i=Vr(t);mr(t),$r(t,i),ui(t,i),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function li(t,e){var n=new oi(t,e);if(ai(t,n)){Pr(t),si(t,n);var r=Vr(t);mr(t),$r(t,r),ui(t,r),n.finish()}}function ci(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function ui(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Pn(t)+"px"}function hi(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=sr(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&l)t:for(var d=e.target,f=a.view;d!=s;d=d.parentNode)for(var p=0;p=0&&ne(t,r.to())<=0)return n}return-1};var Oi=function(t,e){this.anchor=t,this.head=e};function Si(t,e,n){var r=t&&t.options.selectionsMayTouch,i=e[n];e.sort((function(t,e){return ne(t.from(),e.from())})),n=H(e,i);for(var o=1;o0:l>=0){var c=ae(s.from(),a.from()),u=oe(s.to(),a.to()),h=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,e.splice(--o,2,new Oi(h?u:c,h?c:u))}}return new Ci(e,n)}function ki(t,e){return new Ci([new Oi(t,e||t)],0)}function Ti(t){return t.text?ee(t.from.line+t.text.length-1,Y(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Pi(t,e){if(ne(t,e.from)<0)return t;if(ne(t,e.to)<=0)return Ti(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=Ti(e).ch-e.to.ch),ee(n,r)}function ji(t,e){for(var n=[],r=0;r1&&t.remove(s.line+1,p-1),t.insert(s.line+1,m)}cn(t,"change",t,e)}function Ni(t,e,n){!function t(r,i,o){if(r.linked)for(var a=0;as-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(Vi(t.done),Y(t.done)):t.done.length&&!Y(t.done).ranges?Y(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),Y(t.done)):void 0}(i,i.lastOp==r)))a=Y(o.changes),0==ne(e.from,e.to)&&0==ne(e.from,a.to)?a.to=Ti(e):o.changes.push(Ri(t,e));else{var l=Y(i.done);for(l&&l.ranges||$i(t.sel,i.done),o={changes:[Ri(t,e)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,a||gt(t,"historyAdded")}function zi(t,e,n,r){var i=t.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(t,e,n,r){var i=e.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,Y(i.done),e))?i.done[i.done.length-1]=e:$i(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Vi(i.undone)}function $i(t,e){var n=Y(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Bi(t,e,n,r){var i=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),(function(n){n.markedSpans&&((i||(i=e["spans_"+t.id]={}))[o]=n.markedSpans),++o}))}function Wi(t){if(!t)return null;for(var e,n=0;n-1&&(Y(s)[h]=c[h],delete c[h])}}}return r}function Gi(t,e,n,r){if(r){var i=t.anchor;if(n){var o=ne(e,i)<0;o!=ne(n,i)<0?(i=e,e=n):o!=ne(e,n)<0&&(e=n)}return new Oi(i,e)}return new Oi(n||e,e)}function Ki(t,e,n,r,i){null==i&&(i=t.cm&&(t.cm.display.shift||t.extend)),Qi(t,new Ci([Gi(t.sel.primary(),e,n,i)],0),r)}function Yi(t,e,n){for(var r=[],i=t.cm&&(t.cm.display.shift||t.extend),o=0;o=e.ch:s.to>e.ch))){if(i&&(gt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var h=l.find(r<0?1:-1),d=void 0;if((r<0?u:c)&&(h=ao(t,h,-r,h&&h.line==e.line?o:null)),h&&h.line==e.line&&(d=ne(h,n))&&(r<0?d<0:d>0))return io(t,h,e,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=ao(t,f,r,f.line==e.line?o:null)),f?io(t,f,e,r,i):null}}return e}function oo(t,e,n,r,i){var o=r||1,a=io(t,e,n,o,i)||!i&&io(t,e,n,o,!0)||io(t,e,n,-o,i)||!i&&io(t,e,n,-o,!0);return a||(t.cantEdit=!0,ee(t.first,0))}function ao(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?le(t,ee(e.line-1)):null:n>0&&e.ch==(r||Gt(t,e.line)).text.length?e.line0)){var u=[l,1],h=ne(c.from,s.from),d=ne(c.to,s.to);(h<0||!a.inclusiveLeft&&!h)&&u.push({from:c.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(t,e.from,e.to);if(r)for(var i=r.length-1;i>=0;--i)uo(t,{from:r[i].from,to:r[i].to,text:i?[""]:e.text,origin:e.origin});else uo(t,e)}}function uo(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ne(e.from,e.to)){var n=ji(t,e);Hi(t,e,n,t.cm?t.cm.curOp.id:NaN),po(t,e,n,Pe(t,e));var r=[];Ni(t,(function(t,n){n||-1!=H(r,t.history)||(yo(t.history,e),r.push(t.history)),po(t,e,null,Pe(t,e))}))}}function ho(t,e,n){var r=t.cm&&t.cm.state.suppressEdits;if(!r||n){for(var i,o=t.history,a=t.sel,s="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c=0;--f){var p=d(f);if(p)return p.v}}}}function fo(t,e){if(0!=e&&(t.first+=e,t.sel=new Ci(X(t.sel.ranges,(function(t){return new Oi(ee(t.anchor.line+e,t.anchor.ch),ee(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){dr(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,r=n.viewFrom;rt.lastLine())){if(e.from.lineo&&(e={from:e.from,to:ee(o,Gt(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Kt(t,e.from,e.to),n||(n=ji(t,e)),t.cm?function(t,e,n){var r=t.doc,i=t.display,o=e.from,a=e.to,s=!1,l=o.line;t.options.lineWrapping||(l=Jt(Ve(Gt(r,o.line))),r.iter(l,a.line+1,(function(t){if(t==i.maxLine)return s=!0,!0}))),r.sel.contains(e.from,e.to)>-1&&mt(t),Li(r,e,n,lr(t)),t.options.lineWrapping||(r.iter(l,o.line+e.text.length,(function(t){var e=Ue(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,s=!1)})),s&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;r--){var i=Gt(t,r).stateAfter;if(i&&(!(i instanceof ue)||r+i.lookAhead1||!(this.children[0]instanceof wo))){var s=[];this.collapse(s),this.children=[new wo(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var a=i.lines.length%25+25,s=a;s10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=M("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Re(t,e.line,e,n,o)||e.line!=n.line&&Re(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Oe=!0}o.addToHistory&&Hi(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,n.line+1,(function(t){c&&o.collapsed&&!c.options.lineWrapping&&Ve(t)==c.display.maxLine&&(s=!0),o.collapsed&&l!=e.line&&Xt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new Se(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&t.iter(e.line,n.line+1,(function(e){$e(t,e)&&Xt(e,0)})),o.clearOnEnter&&dt(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Ce=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++So,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)dr(c,e.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=e.line;u<=n.line;u++)fr(c,u,"text");o.atomic&&no(c.doc),cn(c,"markerAdded",c,o)}return o}ko.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Gr(t),yt(this,"clear")){var n=this.find();n&&cn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;ot.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&dr(t,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&no(t.doc)),t&&cn(t,"markerCleared",t,this,r,i),e&&Kr(t),this.parent&&this.parent.clear()}},ko.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i=0;l--)co(this,r[l]);s?Zi(this,s):this.cm&&Ar(this.cm)})),undo:ni((function(){ho(this,"undo")})),redo:ni((function(){ho(this,"redo")})),undoSelection:ni((function(){ho(this,"undo",!0)})),redoSelection:ni((function(){ho(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,r=0;r=t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(t,e,n){t=le(this,t),e=le(this,e);var r=[],i=t.line;return this.iter(t.line,e.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=t.line||null!=l.from&&i==e.line&&l.from>=e.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var r=0;rt)return e=t,!0;t-=o,++n})),le(this,ee(n,e))},indexFromPos:function(t){var e=(t=le(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var u=t.dataTransfer.getData("Text");if(u){var h;if(e.state.draggingText&&!e.state.draggingText.copy&&(h=e.listSelections()),to(e.doc,ki(n,n)),h)for(var d=0;d=0;e--)go(t.doc,"",r[e].from,r[e].to,"+delete");Ar(t)}))}function Zo(t,e,n){var r=ot(t.text,e+n,n);return r<0||r>t.text.length?null:r}function Qo(t,e,n){var r=Zo(t,e.ch,n);return null==r?null:new ee(e.line,r,n<0?"after":"before")}function ta(t,e,n,r,i){if(t){var o=ut(n,e.doc.direction);if(o){var a,s=i<0?Y(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var c=Ln(e,n);a=i<0?n.text.length-1:0;var u=Nn(e,c,a).top;a=at((function(t){return Nn(e,c,t).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Zo(n,a,1))}else a=i<0?s.to:s.from;return new ee(r,a,l)}}return new ee(r,i<0?n.text.length:0,i<0?"before":"after")}Bo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Bo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Bo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Bo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Bo.default=y?Bo.macDefault:Bo.pcDefault;var ea={selectAll:so,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),B)},killLine:function(t){return Jo(t,(function(e){if(e.empty()){var n=Gt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)i=new ee(i.line,i.ch+1),t.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ee(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var a=Gt(t.doc,i.line-1).text;a&&(i=new ee(i.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),ee(i.line-1,a.length-1),i,"+transpose"))}n.push(new Oi(i,i))}t.setSelections(n)}))},newlineAndIndent:function(t){return Qr(t,(function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var r=0;r-1&&(ne((i=c.ranges[i]).from(),e)<0||e.xRel>0)&&(ne(i.to(),e)>0||e.xRel<0)?function(t,e,n,r){var i=t.display,o=!1,c=ti(t,(function(e){l&&(i.scroller.draggable=!1),t.state.draggingText=!1,pt(i.wrapper.ownerDocument,"mouseup",c),pt(i.wrapper.ownerDocument,"mousemove",u),pt(i.scroller,"dragstart",h),pt(i.scroller,"drop",c),o||(wt(e),r.addNew||Ki(t.doc,n,null,null,r.extend),l||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()}),20):i.input.focus())})),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return o=!0};l&&(i.scroller.draggable=!0),t.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),dt(i.wrapper.ownerDocument,"mouseup",c),dt(i.wrapper.ownerDocument,"mousemove",u),dt(i.scroller,"dragstart",h),dt(i.scroller,"drop",c),Sr(t),setTimeout((function(){return i.input.focus()}),20)}(t,r,e,o):function(t,e,n,r){var i=t.display,o=t.doc;wt(e);var a,s,l=o.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new Oi(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new Oi(n,n)),n=ur(t,e,!0,!0),s=-1;else{var u=ma(t,n,r.unit);a=r.extend?Gi(a,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,Qi(o,Si(t,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Qi(o,Si(t,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Xi(o,s,a,W):(s=0,Qi(o,new Ci([a],0),W),l=o.sel);var h=n;function d(e){if(0!=ne(h,e))if(h=e,"rectangle"==r.unit){for(var i=[],c=t.options.tabSize,u=R(Gt(o,n.line).text,n.ch,c),d=R(Gt(o,e.line).text,e.ch,c),f=Math.min(u,d),p=Math.max(u,d),g=Math.min(n.line,e.line),v=Math.min(t.lastLine(),Math.max(n.line,e.line));g<=v;g++){var m=Gt(o,g).text,y=q(m,f,c);f==p?i.push(new Oi(ee(g,y),ee(g,y))):m.length>y&&i.push(new Oi(ee(g,y),ee(g,q(m,p,c))))}i.length||i.push(new Oi(n,n)),Qi(o,Si(t,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,w=a,x=ma(t,e,r.unit),C=w.anchor;ne(x.anchor,C)>0?(b=x.head,C=ae(w.from(),x.anchor)):(b=x.anchor,C=oe(w.to(),x.head));var O=l.ranges.slice(0);O[s]=function(t,e){var n=e.anchor,r=e.head,i=Gt(t.doc,n.line);if(0==ne(n,r)&&n.sticky==r.sticky)return e;var o=ut(i);if(!o)return e;var a=lt(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return e;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return e;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=lt(o,r.ch,r.sticky),h=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=o[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,g=f?"after":"before";return n.ch==p&&n.sticky==g?e:new Oi(new ee(n.line,p,g),r)}(t,new Oi(le(o,C),b)),Qi(o,Si(t,O,s),W)}}var f=i.wrapper.getBoundingClientRect(),p=0;function g(e){t.state.selectingText=!1,p=1/0,e&&(wt(e),i.input.focus()),pt(i.wrapper.ownerDocument,"mousemove",v),pt(i.wrapper.ownerDocument,"mouseup",m),o.history.lastSelOrigin=null}var v=ti(t,(function(e){0!==e.buttons&&kt(e)?function e(n){var a=++p,s=ur(t,n,!0,"rectangle"==r.unit);if(s)if(0!=ne(s,h)){t.curOp.focus=A(),d(s);var l=Er(i,o);(s.line>=l.to||s.linef.bottom?20:0;c&&setTimeout(ti(t,(function(){p==a&&(i.scroller.scrollTop+=c,e(n))})),50)}}(e):g(e)})),m=ti(t,g);t.state.selectingText=m,dt(i.wrapper.ownerDocument,"mousemove",v),dt(i.wrapper.ownerDocument,"mouseup",m)}(t,r,e,o)}(e,r,o,t):St(t)==n.scroller&&wt(t):2==i?(r&&Ki(e.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(O?e.display.input.onContextMenu(t):Sr(e)))}}function ma(t,e,n){if("char"==n)return new Oi(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Oi(ee(e.line,0),le(t.doc,ee(e.line+1,0)));var r=n(t,e);return new Oi(r.from,r.to)}function ya(t,e,n,r){var i,o;if(e.touches)i=e.touches[0].clientX,o=e.touches[0].clientY;else try{i=e.clientX,o=e.clientY}catch(e){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&wt(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!yt(t,n))return Ct(e);o-=s.top-a.viewOffset;for(var l=0;l=i)return gt(t,n,t,Zt(t.doc,o),t.display.gutterSpecs[l].className,e),Ct(e)}}function ba(t,e){return ya(t,e,"gutterClick",!0)}function wa(t,e){On(t.display,e)||function(t,e){return!!yt(t,"gutterContextMenu")&&ya(t,e,"gutterContextMenu",!1)}(t,e)||vt(t,e,"contextmenu")||O||t.display.input.onContextMenu(e)}function xa(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),zn(t)}ga.prototype.compare=function(t,e,n){return this.time+400>t&&0==ne(e,this.pos)&&n==this.button};var Ca={toString:function(){return"CodeMirror.Init"}},Oa={},Sa={};function ka(t,e,n){if(!e!=!(n&&n!=Ca)){var r=t.display.dragFunctions,i=e?dt:pt;i(t.display.scroller,"dragstart",r.start),i(t.display.scroller,"dragenter",r.enter),i(t.display.scroller,"dragover",r.over),i(t.display.scroller,"dragleave",r.leave),i(t.display.scroller,"drop",r.drop)}}function Ta(t){t.options.lineWrapping?(L(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(T(t.display.wrapper,"CodeMirror-wrap"),qe(t)),cr(t),dr(t),zn(t),setTimeout((function(){return $r(t)}),100)}function Pa(t,e){var n=this;if(!(this instanceof Pa))return new Pa(t,e);this.options=e=e?_(e):{},_(Oa,e,!1);var r=e.value;"string"==typeof r?r=new Do(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var i=new Pa.inputStyles[e.inputStyle](this),o=this.display=new vi(t,r,i,e);for(var c in o.wrapper.CodeMirror=this,xa(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ur(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new V,keySeq:null,specialChars:null},e.autofocus&&!m&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(t){var e=t.display;dt(e.scroller,"mousedown",ti(t,va)),dt(e.scroller,"dblclick",a&&s<11?ti(t,(function(e){if(!vt(t,e)){var n=ur(t,e);if(n&&!ba(t,e)&&!On(t.display,e)){wt(e);var r=t.findWordAt(n);Ki(t.doc,r.anchor,r.head)}}})):function(e){return vt(t,e)||wt(e)}),dt(e.scroller,"contextmenu",(function(e){return wa(t,e)}));var n,r={end:0};function i(){e.activeTouch&&(n=setTimeout((function(){return e.activeTouch=null}),1e3),(r=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,r=e.top-t.top;return n*n+r*r>400}dt(e.scroller,"touchstart",(function(i){if(!vt(t,i)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(i)&&!ba(t,i)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(e.activeTouch.left=i.touches[0].pageX,e.activeTouch.top=i.touches[0].pageY)}})),dt(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),dt(e.scroller,"touchend",(function(n){var r=e.activeTouch;if(r&&!On(e,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=t.coordsChar(e.activeTouch,"page");a=!r.prev||o(r,r.prev)?new Oi(s,s):!r.prev.prev||o(r,r.prev.prev)?t.findWordAt(s):new Oi(ee(s.line,0),le(t.doc,ee(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),wt(n)}i()})),dt(e.scroller,"touchcancel",i),dt(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Fr(t,e.scroller.scrollTop),Rr(t,e.scroller.scrollLeft,!0),gt(t,"scroll",t))})),dt(e.scroller,"mousewheel",(function(e){return xi(t,e)})),dt(e.scroller,"DOMMouseScroll",(function(e){return xi(t,e)})),dt(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){vt(t,e)||Ot(e)},over:function(e){vt(t,e)||(function(t,e){var n=ur(t,e);if(n){var r=document.createDocumentFragment();br(t,n,r),t.display.dragCursor||(t.display.dragCursor=E("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),j(t.display.dragCursor,r)}}(t,e),Ot(e))},start:function(e){return function(t,e){if(a&&(!t.state.draggingText||+new Date-Ao<100))Ot(e);else if(!vt(t,e)&&!On(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!d)){var n=E("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(t,e)},drop:ti(t,Lo),leave:function(e){vt(t,e)||No(t)}};var l=e.input.getField();dt(l,"keyup",(function(e){return ha.call(t,e)})),dt(l,"keydown",ti(t,ua)),dt(l,"keypress",ti(t,da)),dt(l,"focus",(function(e){return kr(t,e)})),dt(l,"blur",(function(e){return Tr(t,e)}))}(this),_o(),Gr(this),this.curOp.forceUpdate=!0,Ii(this,r),e.autofocus&&!m||this.hasFocus()?setTimeout(F(kr,this),20):Tr(this),Sa)Sa.hasOwnProperty(c)&&Sa[c](n,e[c],Ca);di(this),e.finishInit&&e.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?R(Gt(o,e-1).text,null,a):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)d+=a,h+="\t";if(da,l=At(e),c=null;if(s&&r.ranges.length>1)if(Ma&&Ma.text.join("\n")==e){if(r.ranges.length%Ma.text.length==0){c=[];for(var u=0;u=0;d--){var f=r.ranges[d],p=f.from(),g=f.to();f.empty()&&(n&&n>0?p=ee(p.line,p.ch-n):t.state.overwrite&&!s?g=ee(g.line,Math.min(Gt(o,g.line).text.length,g.ch+Y(l).length)):s&&Ma&&Ma.lineWise&&Ma.text.join("\n")==e&&(p=g=ee(p.line,0)));var v={from:p,to:g,text:c?c[d%c.length]:l,origin:i||(s?"paste":t.state.cutIncoming>a?"cut":"+input")};co(t.doc,v),cn(t,"inputRead",t,v)}e&&!s&&Na(t,e),Ar(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function La(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Qr(e,(function(){return Aa(e,n,0,null,"paste")})),!0}function Na(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=t.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Ea(t,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Gt(t.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ea(t,i.head.line,"smart"));a&&cn(t,"electricInput",t,i.head.line)}}}function Ia(t){for(var e=[],n=[],r=0;r=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=lt(i,n.ch,n.sticky),a=i[o];if("ltr"==t.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&d>=u.begin)){var f=h?"before":"after";return new ee(n.line,d,f)}}var p=function(t,e,r){for(var o=function(t,e){return e?new ee(n.line,l(t,1),"before"):new ee(n.line,t,"after")};t>=0&&t0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==v||r>0&&v==e.text.length||!(g=p(r>0?0:i.length-1,r,c(v)))?null:g}(t.cm,s,e,n):Qo(s,e,n))){if(r||(a=e.line+n)=t.first+t.size||(e=new ee(a,e.ch,e.sticky),!(s=Gt(t,a))))return!1;e=ta(i,t.cm,s,e.line,n)}else e=o;return!0}if("char"==r)l();else if("column"==r)l(!0);else if("word"==r||"group"==r)for(var c=null,u="group"==r,h=t.cm&&t.cm.getHelper(e,"wordChars"),d=!0;!(n<0)||l(!d);d=!1){var f=s.text.charAt(e.ch)||"\n",p=et(f,h)?"w":u&&"\n"==f?"n":!u||/\s/.test(f)?null:"p";if(!u||d||p||(p="s"),c&&c!=p){n<0&&(n=1,l(),e.sticky="after");break}if(p&&(c=p),n>0&&!l(!d))break}var g=oo(t,e,o,a,!0);return re(o,g)&&(g.hitSide=!0),g}function Va(t,e,n,r){var i,o,a=t.doc,s=e.left;if("page"==r){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*ir(t.display),3);i=(n>0?e.bottom:e.top)+n*c}else"line"==r&&(i=n>0?e.bottom+3:e.top-3);for(;(o=Jn(t,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ha=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new V,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function za(t,e){var n=An(t,e.line);if(!n||n.hidden)return null;var r=Gt(t.doc,e.line),i=Mn(n,r,e.line),o=ut(r,t.doc.direction),a="left";o&&(a=lt(o,e.ch)%2?"right":"left");var s=_n(i.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function $a(t,e){return e&&(t.bad=!0),t}function Ba(t,e,n){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[n]))return $a(t.clipPos(ee(t.display.viewTo-1)),!0);e=null,n=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var i=0;i=e.display.viewTo||o.line=e.display.viewFrom&&za(e,i)||{node:l[0].measure.map[2],offset:0},u=o.liner.firstLine()&&(a=ee(a.line-1,Gt(r.doc,a.line-1).length)),s.ch==Gt(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(t=hr(r,a.line))?(e=Jt(i.view[0].line),n=i.view[0].node):(e=Jt(i.view[t].line),n=i.view[t-1].node.nextSibling);var l,c,u=hr(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=Jt(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(function(t,e,n,r,i){var o="",a=!1,s=t.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(t){t&&(c(),o+=t)}function h(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var o,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(ee(r,0),ee(i+1,0),(v=+d,function(t){return t.id==v}));return void(f.length&&(o=f[0].find(0))&&u(Kt(t.doc,o.from,o.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;p&&c();for(var g=0;g1&&d.length>1;)if(Y(h)==Y(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),e++}for(var f=0,p=0,g=h[0],v=d[0],m=Math.min(g.length,v.length);fa.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var x=ee(e,f),C=ee(l,d.length?Y(d).length-p:0);return h.length>1||h[0]||ne(x,C)?(go(r.doc,h,x,C,"+input"),!0):void 0},Ha.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ha.prototype.reset=function(){this.forceCompositionEnd()},Ha.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ha.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Ha.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return dr(t.cm)}))},Ha.prototype.setUneditable=function(t){t.contentEditable="false"},Ha.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||ti(this.cm,Aa)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ha.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ha.prototype.onContextMenu=function(){},Ha.prototype.resetPosition=function(){},Ha.prototype.needsContentAttribute=!0;var Ua=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new V,this.hasSelection=!1,this.composing=null};Ua.prototype.init=function(t){var e=this,n=this,r=this.cm;this.createField(t);var i=this.textarea;function o(t){if(!vt(r,t)){if(r.somethingSelected())Da({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ia(r);Da({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,B):(n.prevInput="",i.value=e.text.join("\n"),I(i))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(i.style.width="0px"),dt(i,"input",(function(){a&&s>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),dt(i,"paste",(function(t){vt(r,t)||La(t,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),dt(i,"cut",o),dt(i,"copy",o),dt(t.scroller,"paste",(function(e){if(!On(t,e)&&!vt(r,e)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=e.clipboardData,i.dispatchEvent(o)}})),dt(t.lineSpace,"selectstart",(function(e){On(t,e)||wt(e)})),dt(i,"compositionstart",(function(){var t=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}})),dt(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ua.prototype.createField=function(t){this.wrapper=_a(),this.textarea=this.wrapper.firstChild},Ua.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,r=yr(t);if(t.options.moveInputWithCursor){var i=Kn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Ua.prototype.showSelection=function(t){var e=this.cm.display;j(e.cursorDiv,t.cursors),j(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ua.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&I(this.textarea),a&&s>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Ua.prototype.getField=function(){return this.textarea},Ua.prototype.supportsTouch=function(){return!1},Ua.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||A()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ua.prototype.blur=function(){this.textarea.blur()},Ua.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ua.prototype.receivedFocus=function(){this.slowPoll()},Ua.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Ua.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}))},Ua.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||Lt(n)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=n.value;if(i==r&&!e.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=i,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ua.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ua.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ua.prototype.onContextMenu=function(t){var e=this,n=e.cm,r=n.display,i=e.textarea;e.contextMenuPending&&e.contextMenuPending();var o=ur(n,t),c=r.scroller.scrollTop;if(o&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ti(n,Qi)(n.doc,ki(o),B);var u,d=i.style.cssText,f=e.wrapper.style.cssText,p=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-p.top-5)+"px; left: "+(t.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=e.prevInput=" "),e.contextMenuPending=m,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&v(),O){Ot(t);var g=function(){pt(window,"mouseup",g),setTimeout(m,20)};dt(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var t=n.somethingSelected(),o="​"+(t?i.value:"");i.value="⇚",i.value=o,e.prevInput=t?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function m(){if(e.contextMenuPending==m&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,i.style.cssText=d,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&v();var t=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==e.prevInput?ti(n,so)(n):t++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Ua.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Ua.prototype.setUneditable=function(){},Ua.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,r,i,o){t.defaults[n]=r,i&&(e[n]=o?function(t,e,n){n!=Ca&&i(t,e,n)}:i)}t.defineOption=n,t.Init=Ca,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,Mi(t)}),!0),n("indentUnit",2,Mi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){Di(t),zn(t),dr(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],r=t.doc.first;t.doc.iter((function(t){for(var i=0;;){var o=t.text.indexOf(e,i);if(-1==o)break;i=o+e.length,n.push(ee(r,o))}r++}));for(var i=n.length-1;i>=0;i--)go(t.doc,e,n[i],ee(n[i].line,n[i].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Ca&&t.refresh()})),n("specialCharPlaceholder",Qe,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",m?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),n("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){xa(t),gi(t)}),!0),n("keyMap","default",(function(t,e,n){var r=Xo(e),i=n!=Ca&&Xo(n);i&&i.detach&&i.detach(t,r),r.attach&&r.attach(t,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ta,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=fi(e,t.options.lineNumbers),gi(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?sr(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return $r(t)}),!0),n("scrollbarStyle","native",(function(t){Ur(t),$r(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=fi(t.options.gutters,e),gi(t)}),!0),n("firstLineNumber",1,gi,!0),n("lineNumberFormatter",(function(t){return t}),gi,!0),n("showCursorWhenSelecting",!1,mr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(Tr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,ka),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,mr,!0),n("singleCursorHeightPerLine",!0,mr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Di,!0),n("addModeClass",!1,Di,!0),n("pollInterval",100),n("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),n("historyEventDelay",1250),n("viewportMargin",10,(function(t){return t.refresh()}),!0),n("maxHighlightLength",1e4,Di,!0),n("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),n("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),n("autofocus",null),n("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),n("phrases",null)}(Pa),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var r=this.options,i=r[t];r[t]==n&&"mode"!=t||(r[t]=n,e.hasOwnProperty(t)&&ti(this,e[t])(this,n,i),gt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Xo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;nn&&(Ea(this,i.head.line,t,!0),n=i.head.line,r==this.doc.sel.primIndex&&Ar(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&Xi(this.doc,r,new Oi(o,c[r].to()),B)}}})),getTokenAt:function(t,e){return be(this,t,e)},getLineTokens:function(t,e){return be(this,ee(t),e,!0)},getTokenTypeAt:function(t){t=le(this.doc,t);var e,n=fe(this,Gt(this.doc,t.line)),r=0,i=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(t=o,i=!0),r=Gt(this.doc,t)}else r=t;return Un(this,r,{top:0,left:0},e||"page",n||i).top+(i?this.doc.height-We(r):0)},defaultTextHeight:function(){return ir(this.display)},defaultCharWidth:function(){return or(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,r,i){var o,a,s,l=this.display,c=(t=Kn(this,le(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==r)c=t.top;else if("above"==r||"near"==r){var h=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>h)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=h&&(c=t.bottom),u+e.offsetWidth>d&&(u=d-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==i?(u=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),n&&(o=this,a={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(s=Mr(o,a)).scrollTop&&Fr(o,s.scrollTop),null!=s.scrollLeft&&Rr(o,s.scrollLeft))},triggerOnKeyDown:ei(ua),triggerOnKeyPress:ei(da),triggerOnKeyUp:ha,triggerOnMouseDown:ei(va),execCommand:function(t){if(ea.hasOwnProperty(t))return ea[t].call(null,this)},triggerElectric:ei((function(t){Na(this,t)})),findPosH:function(t,e,n,r){var i=1;e<0&&(i=-1,e=-e);for(var o=le(this.doc,t),a=0;a0&&a(e.charAt(n-1));)--n;for(;r.5)&&cr(this),gt(this,"refresh",this)})),swapDoc:ei((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Ii(this,t),zn(this),this.display.input.reset(),Lr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,cn(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},bt(t),t.registerHelper=function(e,r,i){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][r]=i},t.registerGlobalHelper=function(e,r,i,o){t.registerHelper(e,r,o),n[e]._global.push({pred:i,val:o})}}(Pa);var qa="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Do.prototype)Do.prototype.hasOwnProperty(Ga)&&H(qa,Ga)<0&&(Pa.prototype[Ga]=function(t){return function(){return t.apply(this.doc,arguments)}}(Do.prototype[Ga]));return bt(Do),Pa.inputStyles={textarea:Ua,contenteditable:Ha},Pa.defineMode=function(t){Pa.defaults.mode||"null"==t||(Pa.defaults.mode=t),Rt.apply(this,arguments)},Pa.defineMIME=function(t,e){_t[t]=e},Pa.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Pa.defineMIME("text/plain","null"),Pa.defineExtension=function(t,e){Pa.prototype[t]=e},Pa.defineDocExtension=function(t,e){Do.prototype[t]=e},Pa.fromTextArea=function(t,e){if((e=e?_(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=A();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function r(){t.value=s.getValue()}var i;if(t.form&&(dt(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(t){}}e.finishInit=function(n){n.save=r,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,r(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(pt(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=i))}},t.style.display="none";var s=Pa((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return s},function(t){t.off=pt,t.on=dt,t.wheelEventPixels=wi,t.Doc=Do,t.splitLines=At,t.countColumn=R,t.findColumn=q,t.isWordChar=tt,t.Pass=$,t.signal=gt,t.Line=Ge,t.changeEnd=Ti,t.scrollbarModel=Wr,t.Pos=ee,t.cmpPos=ne,t.modes=Ft,t.mimeModes=_t,t.resolveMode=Vt,t.getMode=Ht,t.modeExtensions=zt,t.extendMode=$t,t.copyState=Bt,t.startState=Ut,t.innerMode=Wt,t.commands=ea,t.keyMap=Bo,t.keyName=Yo,t.isModifierKey=Go,t.lookupKey=qo,t.normalizeKeyMap=Uo,t.StringStream=qt,t.SharedTextMarker=Po,t.TextMarker=ko,t.LineWidget=Co,t.e_preventDefault=wt,t.e_stopPropagation=xt,t.e_stop=Ot,t.addClass=L,t.contains=D,t.rmClass=T,t.keyNames=Vo}(Pa),Pa.version="5.49.2",Pa}()},function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"d",(function(){return o})),n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return s}));var r=n(0),i=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},o=function(t,e){t.parentNode.replaceChild(e,t)},a=function(t,e,n){var i=t.childNodes,o=i.length,a=Object(r.isUndefined)(n)?o:n;a>=o?t.appendChild(e):t.insertBefore(e,i[a])},s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Array.isArray(e)?e:[e];n.forEach((function(e){var n=e.tag||"div",i=e.attributes||{},o=document.createElement(n);Object(r.each)(i,(function(t,e){o.setAttribute(e,t)})),t.appendChild(o)}))}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(6),a=n.n(o),s=n(1),l=n.n(s),c=n(0),u=n(3),h=n(29);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var f=l.a.View.extend({events:function(){return this.model.get("events")||{mousedown:"handleClick"}},attributes:function(){return this.model.get("attributes")},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.config,n=void 0===e?{}:e;this.em=n.em,this.editor=n.editor},handleClick:function(t){t.preventDefault(),t.stopPropagation();var e=this.editor,n=this.em,r=e.Canvas.getFrameEl().getBoundingClientRect(),o=r.left,a=r.top,s=function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};this.config={editor:t.editor||"",em:t.em},this.listenTo(this.collection,"reset",this.render)}}),g=l.a.Model.extend({defaults:{command:"",attributes:{}}}),v=l.a.Collection.extend({model:g});function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var y,b=l.a.$;e.default={init:function(t){Object(c.bindAll)(this,"onHover","onOut","onClick","onFrameScroll")},enable:function(){this.frameOff=this.canvasOff=this.adjScroll=null,this.startSelectComponent();var t=this.config.em;y=1,t.on("component:update",this.updateAttached,this),t.on("change:canvasOffset",this.updateAttached,this)},startSelectComponent:function(){this.toggleSelectComponent(1)},stopSelectComponent:function(){this.toggleSelectComponent()},toggleSelectComponent:function(t){var e=this.em,n=t?"on":"off",r={on:u.s,off:u.r},i=this.getCanvasBody(),o=this.getContentWindow();r[n](i,"mouseover",this.onHover),r[n](i,"mouseout",this.onOut),r[n](i,"click touchend",this.onClick),r[n](o,"scroll resize",this.onFrameScroll),e[n]("component:toggled",this.onSelect,this),e[n]("change:componentHovered",this.onHovered,this)},onHover:function(t){t.stopPropagation();var e=t.target,n=b(e),r=n.data("model");if(!r)for(var i=n.parent();!r&&i.length>0;)r=i.data("model"),i=i.parent();if(this.adjScroll||(this.adjScroll=1,this.updateAttached()),r&&!r.get("hoverable")){for(var o=r&&r.parent();o&&!o.get("hoverable");)o=o.parent();r=o}this.em.setHovered(r,{forceChange:1})},onHovered:function(t,e){var n=e&&e.getEl();if(n){var r=this.getElementPos(n);this.updateBadge(n,r),this.updateHighlighter(n,r),this.showElementOffset(n,r)}},onOut:function(t){t&&t.stopPropagation(),this.hideBadge(),this.hideHighlighter(),this.hideElementOffset()},showElementOffset:function(t,e){var n=b(t).data("model");n&&"selected"==n.get("status")||!y||this.editor.runCommand("show-offset",{el:t,elPos:e,force:1})},hideElementOffset:function(t,e){var n=this.editor;n&&n.stopCommand("show-offset")},showFixedElementOffset:function(t,e){this.editor.runCommand("show-offset",{el:t,elPos:e,state:"Fixed"})},hideFixedElementOffset:function(t,e){this.editor&&this.editor.stopCommand("show-offset",{state:"Fixed"})},hideHighlighter:function(){this.canvas.getHighlighter().style.display="none"},onClick:function(t){var e=this.em;if(t.stopPropagation(),t.preventDefault(),e.get("_cmpDrag"))return e.set("_cmpDrag");var n=b(t.target),r=n.data("model");if(!r)for(var i=n.parent();!r&&i.length>0;)r=i.data("model"),i=i.parent();if(r)if(r.get("selectable"))this.select(r,t);else{for(var o=r.parent();o&&!o.get("selectable");)o=o.parent();this.select(o,t)}},select:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){var n=e.ctrlKey||e.metaKey,r=e.shiftKey,i=this.editor,o=i.getConfig("multipleSelection"),a=this.em;if(n&&o)i.selectToggle(t);else if(r&&o){a.clearSelection(i.Canvas.getWindow());var s,l,u=t.collection,h=u.indexOf(t);i.getSelectedAll();if(i.getSelectedAll().forEach((function(t){var e=t.collection,n=e.indexOf(t);e===u&&(nh&&(l=Object(c.isUndefined)(l)?n:Math.min(l,n)))})),!Object(c.isUndefined)(s))for(;s!==h;)i.selectAdd(u.at(s)),s++;if(!Object(c.isUndefined)(l))for(;l!==h;)i.selectAdd(u.at(l)),l--;i.selectAdd(t)}else i.select(t);this.initResize(t)}},updateBadge:function(t,e){var n=b(t),r=this.canvas.getConfig(),i=r.pStylePrefix||"",o=r.customBadgeLabel;this.cacheEl=t;var a=n.data("model");if(a&&a.get("badgable")){var s=this.getBadge(),l=a.getIcon(),c="".concat(i,"badge"),u="".concat(l?'
').concat(l,"
"):"",'\n
').concat(a.getName(),"
");u=o?o(a):u,s.innerHTML=u;var h=s.style;h.display="block";var d=this.getCanvasPosition();if(d){var f=d.top,p=d.left,g=e.top-(s?s.offsetHeight:0),v=s?s.offsetWidth:0,m=g1&&void 0!==arguments[1]?arguments[1]:{},i=r.el,o=r.config,a=r.resizer,s=o.keyHeight,l=o.keyWidth,c=o.currentUnit,d=o.keepAutoHeight,f=o.keepAutoWidth;g("add",0,r),e=n.get("StyleManager").getModelToStyle(h);var p=getComputedStyle(i),v=e.getStyle(),m=v[l];o.autoWidth=f&&"auto"===m,isNaN(parseFloat(m))&&(m=p[l]);var b=v[s];o.autoHeight=d&&"auto"===b,isNaN(parseFloat(b))&&(b=p[s]),a.startDim.w=parseFloat(m),a.startDim.h=parseFloat(b),y=0,c&&(o.unitHeight=Object(u.i)(b),o.unitWidth=Object(u.i)(m))},onMove:function(){o.trigger("change:canvasOffset")},onEnd:function(t,e){g("remove",0,e),o.trigger("change:canvasOffset"),y=1},updateTarget:function(t,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var a=o.store,s=o.selectedHandler,l=o.config,c=l.keyHeight,u=l.keyWidth,h=l.autoHeight,d=l.autoWidth,f=l.unitWidth,p=l.unitHeight,g=["tc","bc"].indexOf(s)>=0,v=["cl","cr"].indexOf(s)>=0,m=e.getStyle();if(!g){var y=r.getBody().offsetWidth,b=i.w=a.height)&&(o.top=o.elementTop+o.elementHeight);var s=o.elementLeft+o.elementWidth,l=s-o.targetWidth;s>o.canvasWidth&&(l-=s-o.canvasWidth),l=l<0?0:l,i.top="".concat(o.top).concat("px"),i.left="".concat(l).concat("px"),i.opacity=""}},getCanvasPosition:function(){return this.canvas.getCanvasView().getPosition()},clean:function(){this.selEl&&this.selEl.removeClass(this.hoverClass)},getBadge:function(){return this.canvas.getBadgeEl()},onFrameScroll:function(){var t=this.cacheEl;if(t){var e=this.getElementPos(t);this.updateBadge(t,e);var n=this.em.getSelected(),r=n&&n.getEl();r&&this.updateToolbarPos(r)}},updateAttached:function(){var t=this.resizer,e=this.em.getSelected(),n=e&&e.view;if(n){var r=n.el;this.updateToolbarPos(r),this.showFixedElementOffset(r),t&&t.updateContainer()}},getElementPos:function(t,e){return this.canvas.getCanvasView().getElementPos(t)},hideBadge:function(){this.getBadge().style.display="none"},cleanPrevious:function(t){t&&t.set({status:"",state:""})},getContentWindow:function(){return this.frameEl.contentWindow},run:function(t){this.editor=t&&t.get("Editor"),this.enable(),this.onSelect()},stop:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.em,i=this.editor;this.stopSelectComponent(),!n.preserveSelected&&r.setSelected(null),this.clean(),this.onOut(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",i&&i.stopCommand("resize"),r.off("component:update",this.updateAttached,this),r.off("change:canvasOffset",this.updateAttached,this)}}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n
')},inputClass:function(){return"".concat(this.ppfx,"field")},holderClass:function(){return"".concat(this.ppfx,"input-holder")},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.opts=t,this.ppfx=e,this.em=t.target||{},this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},setValue:function(t){var e=this.model,n=t||e.get("defaults"),r=this.getInputEl();r&&(r.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},handleChange:function(t){t.stopPropagation();var e=this.getInputEl().value;this.model.set({value:e},{fromInput:1}),this.elementUpdated()},getInputEl:function(){if(!this.inputEl){var t=this.model,e=t.get("placeholder")||t.get("defaults")||"";this.inputEl=o(''))}return this.inputEl.get(0)},render:function(){this.inputEl=null;var t=this.$el;return t.addClass(this.inputClass()),t.html(this.template()),t.find(".".concat(this.holderClass())).append(this.getInputEl()),this}})},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r),o=n(11);e.default=i.a.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{},this.properties=[];var e=this.collection;this.listenTo(e,"add",this.addTo),this.listenTo(e,"reset",this.render)},addTo:function(t,e,n){this.add(t,null,n)},add:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e||this.el,i=new t.typeView({model:t,name:t.get("name"),id:this.pfx+t.get("property"),target:this.target,propTarget:this.propTarget,onChange:this.onChange,onInputRender:this.onInputRender,config:this.config});"composite"!=t.get("type")&&(i.customValue=this.customValue),i.render();var a=i.el;this.properties.push(i),Object(o.a)(r,a,n.at)},render:function(){var t=this;this.properties=[];var e=document.createDocumentFragment();return this.collection.each((function(n){return t.add(n,e)})),this.$el.append(e),this.$el.attr("class","".concat(this.pfx,"properties")),this}})},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var r=n(2),i=n.n(r),o=n(13),a=n.n(o),s=n(14),l=n.n(s),c=n(0),u=n(3);function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return a()(this,t),this.opts={container:null,onStart:null,onDrag:null,onEnd:null,setPosition:null,getPosition:null,guidesStatic:null,guidesTarget:null,snapOffset:5,doc:0,scale:1},Object(c.bindAll)(this,"drag","stop","keyHandle","handleScroll"),this.setOptions(e),this.delta=f(),this}return l()(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opts=d({},this.opts,{},t)}},{key:"toggleDrag",value:function(t){var e=this.getDocumentEl(),n=this.getContainerEl(),r=this.getWindowEl(),i=t?"on":"off",o={on:u.s,off:u.r};o[i](n,"mousemove dragover",this.drag),o[i](e,"mouseup dragend touchend",this.stop),o[i](e,"keydown",this.keyHandle),o[i](r,"scroll",this.handleScroll)}},{key:"handleScroll",value:function(){var t=this.lastScroll,e=this.delta,n=this.getScrollInfo(),r={x:n.x-t.x,y:n.y-t.y};this.move(e.x+r.x,e.y+r.y),this.lastScrollDiff=r}},{key:"start",value:function(t){var e=this.opts,n=e.onStart;this.toggleDrag(1),this.startPointer=this.getPointerPos(t),this.guidesStatic=Object(c.result)(e,"guidesStatic")||[],this.guidesTarget=Object(c.result)(e,"guidesTarget")||[],Object(c.isFunction)(n)&&n(t,this),this.startPosition=this.getStartPosition(),this.lastScrollDiff=f(),this.globScrollDiff=f(),this.drag(t)}},{key:"drag",value:function(t){var e=this,n=this.opts,r=this.lastScrollDiff,i=this.globScrollDiff,o=n.onDrag,a=this.startPointer,s=this.getPointerPos(t),l={x:i.x+r.x,y:i.y+r.y};this.globScrollDiff=l;var u={x:s.x-a.x+l.x,y:s.y-a.y+l.y};this.lastScrollDiff=f();var h=this.lockedAxis;"x"===(h=t.shiftKey?!h&&this.detectAxisLock(u.x,u.y):null)?u.x=a.x:"y"===h&&(u.y=a.y);var p=function(r){["x","y"].forEach((function(t){return r[t]=r[t]*Object(c.result)(n,"scale")})),e.delta=r,e.move(r.x,r.y),Object(c.isFunction)(o)&&o(t,e)},g=d({},u);if(this.currentPointer=s,this.lockedAxis=h,this.lastScroll=this.getScrollInfo(),p(u),this.guidesTarget.length){var v=this.snapGuides(g),m=v.newDelta,y=v.trgX,b=v.trgY;(y||b)&&p(m)}0===t.which&&this.stop(t)}},{key:"snapGuides",value:function(t){var e=this,n=t,r=this.trgX,i=this.trgY;return this.guidesTarget.forEach((function(n){n.x&&e.trgX||n.y&&e.trgY||(n.active=0,e.guidesStatic.forEach((function(o){if(!(n.y&&o.x||n.x&&o.y)){var a=n.y&&o.y,s=a?"y":"x",l=n[s],u=o[s],h=t[s],d=a?i:r;if(e.isPointIn(l,u)&&Object(c.isUndefined)(d)){var f=h-(l-u);e.setGuideLock(n,f)}}})))})),r=this.trgX,i=this.trgY,["x","y"].forEach((function(r){var i=r.toUpperCase(),o=e["trg".concat(i)];o&&!e.isPointIn(t[r],o.lock)&&(e.setGuideLock(o,null),o=null),o&&!Object(c.isUndefined)(o.lock)&&(n[r]=o.lock)})),{newDelta:n,trgX:this.trgX,trgY:this.trgY}}},{key:"isPointIn",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.offset,i=r||this.opts.snapOffset;return t>=e&&t<=e+i||t<=e&&t>=e-i}},{key:"setGuideLock",value:function(t,e){var n=Object(c.isUndefined)(t.x)?"Y":"X",r="trg".concat(n);return null!==e?(t.active=1,t.lock=e,this[r]=t):(delete t.active,delete t.lock,delete this[r]),t}},{key:"stop",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.delta,r=e.cancel,i=r?0:n.x,o=r?0:n.y;this.toggleDrag(),this.lockedAxis=null,this.move(i,o,1);var a=this.opts.onEnd;Object(c.isFunction)(a)&&a(t,this,{cancelled:r})}},{key:"keyHandle",value:function(t){Object(u.l)(t)&&this.stop(t,{cancel:1})}},{key:"move",value:function(t,e,n){var r=this.el,i=this.opts,o=this.startPosition;if(o){var a=i.setPosition,s=o.x+t,l=o.y+e;this.position={x:s,y:l,end:n},Object(c.isFunction)(a)&&a(this.position),r&&(r.style.left="".concat(s,"px"),r.style.top="".concat(l,"px"))}}},{key:"getContainerEl",value:function(){var t=this.opts.container;return t?[t]:this.getDocumentEl()}},{key:"getWindowEl",value:function(){return this.getContainerEl().map((function(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow}))}},{key:"getDocumentEl",value:function(t){var e=this.opts.doc;if(t=t||this.el,!this.docs){var n=[document];t&&n.push(t.ownerDocument),e&&n.push(e),this.docs=n}return this.docs}},{key:"getPointerPos",value:function(t){var e=this.opts.getPointerPosition,n=Object(u.h)(t);return e?e(t):{x:n.clientX,y:n.clientY}}},{key:"getStartPosition",value:function(){var t=this.el,e=this.opts.getPosition,n=f();return Object(c.isFunction)(e)?n=e():t&&(n={x:parseFloat(t.style.left),y:parseFloat(t.style.top)}),n}},{key:"getScrollInfo",value:function(){var t=this.opts.doc,e=t&&t.body;return{y:e?e.scrollTop:0,x:e?e.scrollLeft:0}}},{key:"detectAxisLock",value:function(t,e){var n=t,r=e,i=Math.abs(n),o=Math.abs(r);return r>=i||r<=-i?"x":n>o||n<-o?"y":void 0}}]),t}()},function(t,e,n){"use strict";var r,i=n(6),o=n.n(i),a=n(2),s=n.n(a),l=n(1),c=n.n(l),u=n(0);function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};this.opt=e,this.listenTo(this,"add",this.onAdd),this.config=e.config,this.em=e.em;var n=this.em;this.model=function(t,r){var i,o=e.componentTypes;r.em=e.em,r.config=e.config,r.componentTypes=o,r.domc=e.domc;for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:{},i=this.em,o=i.get("CssComposer"),a=i.get("Parser").parseHtml(t);return r||(r=n(4).default),r.checkId(a.html,a.css,this.opt.domc.componentsById),a.css&&o&&!e.temporary&&o.addCollection(a.css,d({},e,{extend:1})),a.html},add:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(u.isString)(t)?t=this.parseString(t,n):Object(u.isArray)(t)&&t.forEach((function(r,i){Object(u.isString)(r)&&(t[i]=e.parseString(r,n))}));var r=Object(u.isArray)(t);return t=(r?t:[t]).filter((function(t){return t})).map((function(t){return e.processDef(t)})),t=r?t:t[0],c.a.Collection.prototype.add.apply(this,[t,n])},processDef:function(t){if(t.cid&&t.ccid)return t;var e=this.em,n=this.config,r=(void 0===n?{}:n).processor,i=t;if(r){var a=r(i=d({},i));a&&(Object(u.each)(i,(function(t,e){return delete i[e]})),Object(u.extend)(i,a))}if(i.$$typeof&&"object"==o()(i.props)){(i=d({},i)).props=d({},i.props);var s=e.get("DomComponents"),l=e.get("Parser").parserHtml;Object(u.each)(i,(function(t,e){Object(u.includes)(["props","type"],e)||delete i[e]}));var c=i.props,h=c.children;delete c.children,delete i.props;var f=l.splitPropsFromAttr(c);i.attributes=f.attrs,h&&(i.components=h),i.type?s.getType(i.type)||(i.tagName=i.type,delete i.type):i.type="textnode",Object(u.extend)(i,f.props)}return i},onAdd:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.em,i=t.getStyle(),o=r&&r.getConfig("avoidInlineStyle");if(!Object(u.isEmpty)(i)&&!o&&r&&r.get&&r.getConfig("forceClass")&&!n.temporary){var a=t.cid;r.get("CssComposer").setClassRule(a,i);t.setStyle({}),t.addClass(a)}}})},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r),o=i.a.$;e.default=i.a.View.extend({initialize:function(t){this.config=t||{},this.editorModel=this.em=this.config.em||{},this.pfx=this.config.stylePrefix,this.ppfx=this.config.pStylePrefix,this.hoverClass=this.pfx+"hover",this.badgeClass=this.pfx+"badge",this.plhClass=this.pfx+"placeholder",this.freezClass=this.ppfx+"freezed",this.canvas=this.em.get&&this.em.get("Canvas"),this.em.get&&this.setElement(this.getCanvas()),this.canvas&&(this.$canvas=this.$el,this.$wrapper=o(this.getCanvasWrapper()),this.frameEl=this.canvas.getFrameEl(),this.canvasTool=this.getCanvasTools(),this.bodyEl=this.getCanvasBody()),this.init(this.config)},onFrameScroll:function(t){},getCanvas:function(){return this.canvas.getElement()},getCanvasBody:function(){return this.canvas.getBody()},getCanvasWrapper:function(){return this.canvas.getWrapperEl()},getCanvasTools:function(){return this.canvas.getToolsEl()},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+t.ownerDocument.body.scrollTop,left:e.left+t.ownerDocument.body.scrollLeft}},init:function(t){},callRun:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id;if(t.trigger("run:".concat(n,":before"),e),!e||!e.abort){var r=e.sender||t,i=this.run(t,r,e);return t.trigger("run:".concat(n),i,e),t.trigger("run",n,i,e),i}t.trigger("abort:".concat(n),e)},callStop:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id,r=e.sender||t;t.trigger("stop:".concat(n,":before"),e);var i=this.stop(t,r,e);return t.trigger("stop:".concat(n),i,e),t.trigger("stop",n,i,e),i},stopCommand:function(){this.em.get("Commands").stop(this.id)},run:function(t,e){},stop:function(t,e){}})},function(t,e,n){"use strict";var r=n(2),i=n.n(r),o=n(0),a=n(3),s=n(26);function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(o.isString)(e)&&(e=u(e));var r=this.getStyle(),i=c({},e);this.set("style",i,n);var s=Object(a.t)(r,i);return Object(o.keys)(s).forEach((function(e){var n=t.em;t.trigger("change:style:".concat(e)),n&&(n.trigger("styleable:change",t,e),n.trigger("styleable:change:".concat(e),t,e))})),i},addStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"string"==typeof t?t={prop:e}:n=e||{},t=this.extendStyle(t),this.setStyle(t,n)},removeStyle:function(t){var e=this.getStyle();delete e[t],this.setStyle(e)},styleToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.getStyle();for(var r in n){var i=t.important,a=Object(o.isArray)(i)?i.indexOf(r)>=0:i,s="".concat(n[r]).concat(a?" !important":"");s&&e.push("".concat(r,":").concat(s,";"))}return e.join("")},getSelectors:function(){return this.get("selectors")||this.get("classes")},getSelectorsString:function(){return this.selectorsToString?this.selectorsToString():this.getSelectors().getFullString()}}},function(t,e,n){"use strict";var r,i; -/*! cash-dom 1.3.7, https://github.com/kenwheeler/cash @license MIT */void 0===(i="function"==typeof(r=function(){var t,e=document,n=window,r=Array.prototype,i=r.slice,o=r.filter,a=r.push,s=function(){},l=function(t){return"function"==typeof t&&t.call},c=function(t){return"string"==typeof t},u=/^#[\w-]*$/,h=/^\.[\w-]*$/,d=/<.+>/,f=/^\w+$/;function p(t,n){return n=n||e,h.test(t)?n.getElementsByClassName(t.slice(1)):f.test(t)?n.getElementsByTagName(t):n.querySelectorAll(t)}function g(n){if(!t){var r=(t=e.implementation.createHTMLDocument(null)).createElement("base");r.href=e.location.href,t.head.appendChild(r)}return t.body.innerHTML=n,t.body.childNodes}function v(t){"loading"!==e.readyState?setTimeout(t):e.addEventListener("DOMContentLoaded",t)}function m(t,r){if(!t)return this;if(t.cash&&t!==n)return t;var i,o=t,a=0;if(c(t))o=u.test(t)?e.getElementById(t.slice(1)):d.test(t)?g(t):p(t,r);else if(l(t))return v(t),this;if(!o)return this;if(o.nodeType||o===n)this[0]=o,this.length=1;else for(i=this.length=o.length;a=0&&o.splice(r,1)):(w(o,(function(n){t.removeEventListener(e,n)})),o=[]))}function z(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function $(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return function(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}(t);case"select-multiple":return function(t){var e=[];return w(t.options,(function(t){t.selected&&e.push(t.value)})),e.length?e:null}(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function B(t,e,n){var r=c(e);r||!e.length?w(t,r?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,r){return function(t,e,n){if(n){var r=t.childNodes[0];t.insertBefore(e,r)}else t.appendChild(e)}(t,0===r?e:e.cloneNode(!0),n)}):w(e,(function(e){return B(t,e,n)}))}y.prefixedProp=R,y.camelCase=_,b.extend({css:function(t,e){if(c(t))return t=R(t),arguments.length>1?this.each((function(n){return n.style[t]=e})):n.getComputedStyle(this[0])[t];for(var r in t)this.css(r,t[r]);return this}}),w(["Width","Height"],(function(t){var e=t.toLowerCase();b[e]=function(){return this[0].getBoundingClientRect()[e]},b["inner"+t]=function(){return this[0]["client"+t]},b["outer"+t]=function(e){return this[0]["offset"+t]+(e?V(this,"margin"+("Width"===t?"Left":"Top"))+V(this,"margin"+("Width"===t?"Right":"Bottom")):0)}})),b.extend({off:function(t,e){return this.each((function(n){return H(n,t,e)}))},on:function(t,e,n,r){var i;if(!c(t)){for(var o in t)this.on(o,e,t[o]);return this}return l(e)&&(n=e,e=null),"ready"===t?(v(n),this):(e&&(i=n,n=function(t){for(var n=t.target;!x(n,e);){if(n===this)return!1;n=n.parentNode}n&&i.call(n,t)}),this.each((function(e){var i=n;r&&(i=function(){n.apply(this,arguments),H(e,t,i)}),function(t,e,n){var r=P(t,"_cashEvents")||T(t,"_cashEvents",{});r[e]=r[e]||[],r[e].push(n),t.addEventListener(e,n)}(e,t,i)})))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:v,trigger:function(t,n){var r=e.createEvent("HTMLEvents");return r.data=n,r.initEvent(t,!0,!1),this.each((function(t){return t.dispatchEvent(r)}))}}),b.extend({serialize:function(){var t="";return w(this[0].elements||this,(function(e){if(!e.disabled&&"FIELDSET"!==e.tagName){var n=e.name;switch(e.type.toLowerCase()){case"file":case"reset":case"submit":case"button":break;case"select-multiple":var r=$(e);null!==r&&w(r,(function(e){t+=z(n,e)}));break;default:var i=$(e);null!==i&&(t+=z(n,i))}}})),t.substr(1)},val:function(t){return void 0===t?$(this[0]):this.each((function(e){return e.value=t}))}}),b.extend({after:function(t){return y(t).insertAfter(this),this},append:function(t){return B(this,t),this},appendTo:function(t){return B(y(t),this),this},before:function(t){return y(t).insertBefore(this),this},clone:function(){return y(this.map((function(t){return t.cloneNode(!0)})))},empty:function(){return this.html(""),this},html:function(t){if(void 0===t)return this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each((function(t){return t.innerHTML=e}))},insertAfter:function(t){var e=this;return y(t).each((function(t,n){var r=t.parentNode,i=t.nextSibling;e.each((function(t){r.insertBefore(0===n?t:t.cloneNode(!0),i)}))})),this},insertBefore:function(t){var e=this;return y(t).each((function(t,n){var r=t.parentNode;e.each((function(e){r.insertBefore(0===n?e:e.cloneNode(!0),t)}))})),this},prepend:function(t){return B(this,t,!0),this},prependTo:function(t){return B(y(t),this,!0),this},remove:function(){return this.each((function(t){return t.parentNode.removeChild(t)}))},text:function(t){return void 0===t?this[0].textContent:this.each((function(e){return e.textContent=t}))}});var W=e.documentElement;return b.extend({position:function(){var t=this[0];return{left:t.offsetLeft,top:t.offsetTop}},offset:function(){var t=this[0].getBoundingClientRect();return{top:t.top+n.pageYOffset-W.clientTop,left:t.left+n.pageXOffset-W.clientLeft}},offsetParent:function(){return y(this[0].offsetParent)}}),b.extend({children:function(t){var e=[];return this.each((function(t){a.apply(e,t.children)})),e=O(e),t?e.filter((function(e){return x(e,t)})):e},closest:function(t){return!t||this.length<1?y():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=C(t);return this.each((function(r){return!(e=n(r,t))})),e},find:function(t){if(!t||t.nodeType)return y(t&&this.has(t).length?t:null);var e=[];return this.each((function(n){a.apply(e,p(t,n))})),O(e)},has:function(t){var e=c(t)?function(e){return 0!==p(t,e).length}:function(e){return e.contains(t)};return this.filter(e)},next:function(){return y(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=C(t);return this.filter((function(n){return!e(n,t)}))},parent:function(){var t=[];return this.each((function(e){e&&e.parentNode&&t.push(e.parentNode)})),O(t)},parents:function(t){var n,r=[];return this.each((function(i){for(n=i;n&&n.parentNode&&n!==e.body.parentNode;)n=n.parentNode,(!t||t&&x(n,t))&&r.push(n)})),O(r)},prev:function(){return y(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter((function(t){return t!==e}))}}),y})?r.call(e,n,e,t):r)||(t.exports=i)},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(1),a=n.n(o),s=n(27),l=n(0),c=n(3);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.get("id")||"",r=this.get("name")||"";!this.get("property")&&this.set("property",(r||n).replace(/ /g,"-"));var i=this.get("property");!this.get("id")&&this.set("id",i),!r&&this.set("name",Object(c.c)(i).replace(/-/g," ")),d.callInit(this,t,e)},init:function(){},clearValue:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0},t),this},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parseValue(t);this.set(r,h({},n,{avoidStore:1})),e&&(this.set("value","",n),this.set(r,n))},setValueFromInput:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.setValue(t,e,h({},n,{fromInput:1}))},parseValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={value:t},r="!important";if(Object(l.isString)(t)&&-1!==t.indexOf(r)&&(n.value=t.replace(r,"").trim(),n.important=1),!this.get("functionName")&&!e.complete)return n;var i=[],o="".concat(n.value),a=o.indexOf("(")+1,s=o.lastIndexOf(")"),c=o.substring(0,a-1);if(c&&(n.functionName=c),i.push(a),s>=0&&i.push(s),n.value=String.prototype.substring.apply(o,i),e.numeric){var u=parseFloat(n.value);n.unit=n.value.replace(u,""),n.value=u}return n},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=Object(l.isUndefined)(t)?this.get("value"):t,r=!Object(l.isUndefined)(n);return e&&r&&(n="".concat(e,"(").concat(n,")")),r&&this.get("important")&&(n="".concat(n," !important")),n||""}},{callParentInit:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};t.prototype.initialize.apply(e,[n,h({},r,{skipInit:1})])},callInit:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!n.skipInit&&t.init(e,n)}}),f=d;function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var g=f.extend({defaults:function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f.callParentInit(f,this,t,e);var r=this.get("properties")||[],i=n(22).default;this.set("properties",new i(r)),this.listenTo(this,"change:value",this.updateValues),f.callInit(this,t,e)},clearValue:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.get("properties").each((function(t){return t.clearValue()})),f.prototype.clearValue.apply(this,arguments)},updateValues:function(){var t=this.getFullValue().split(this.getSplitSeparator());this.get("properties").each((function(e,n){var r=t.length;t[n]||t[n%r+(1!=r&&r%2?1:0)]}))},getSplitSeparator:function(){return new RegExp("".concat(this.get("separator"),"(?![^\\(]*\\))"))},getDefaultValue:function(t){var e=this.get("defaults");return e&&!t?e:(e="",this.get("properties").each((function(t,n){return e+="".concat(t.getDefaultValue()," ")})),e.trim())},getFullValue:function(){return this.get("detached")?"":this.get("properties").getFullValue()},getPropertyAt:function(t){return this.get("properties").at(t)}}),v=a.a.Model.extend({defaults:{index:"",value:"",values:{},active:!1,preview:!1,properties:[]},initialize:function(){var t=this,e=this.get("properties"),n=this.get("value");if(this.set("properties",e instanceof et?e:new et(e)),this.get("properties").forEach((function(e){var n=t.collection;e.parent=n&&n.property})),!n){var r="",i=this.get("values");for(var o in i)r+=" "+i[o];this.set("value",r.trim())}},getPropertyAt:function(t){return this.get("properties").at(t)},getPropertyValue:function(t){var e="";return this.get("properties").each((function(n){n.get("property")==t&&(e=n.getFullValue())})),e},getFullValue:function(){var t=[];return this.get("properties").each((function(e){return t.push(e.getFullValue())})),t.join(" ")}});function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function y(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};g.callParentInit(g,this,t,e);var n=this.get("layers"),r=new b(n);r.property=this,r.properties=this.get("properties"),this.set("layers",r),g.callInit(this,t,e)},getLayers:function(){return this.get("layers")},getCurrentLayer:function(){return this.getLayers().filter((function(t){return t.get("active")}))[0]},getFullValue:function(){return this.get("detached")?"":this.get("layers").getFullValue()},getLayersFromTarget:function(t){}});function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function O(t){for(var e=1;e\n ').concat(this.templateLabel(t),'\n \n
\n ').concat(this.templateInput(t),"\n
\n ")},templateLabel:function(t){var e=this.pfx,n=this.em,r=t.parent,i=t.attributes,o=i.icon,a=void 0===o?"":o,s=i.info,l=void 0===s?"":s,c=i.id,u=i.name,h=n&&n.t("styleManager.properties.".concat(c))||u;return'\n \n ').concat(h,"\n \n ").concat(r?"":'"),"\n ")},templateInput:function(t){return'\n
\n \n
\n ')},events:i()({change:"inputValueChanged"},"click [".concat("data-clear-style","]"),"clear"),initialize:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(l.bindAll)(this,"targetUpdated"),this.config=e.config||{};var n=this.config.em;this.em=n,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=e.target||{},this.propTarget=e.propTarget||{},this.onChange=e.onChange,this.onInputRender=e.onInputRender||{},this.customValue=e.customValue||{};var r=this.model;this.property=r.get("property"),this.input=null;var i=this.pfx;this.inputHolderId="#"+i+"input-holder",this.sector=r.collection&&r.collection.sector,r.view=this,r.get("value")||r.set("value",r.getDefaultValue()),n&&n.on("update:component:style:".concat(this.property),this.targetUpdated);var o=r.get("requires");o&&Object.keys(o).forEach((function(e){n&&n.on("component:styleUpdate:".concat(e),t.targetUpdated)})),this.listenTo(this.propTarget,"update styleManager:update",this.targetUpdated),this.listenTo(r,"destroy remove",this.remove),this.listenTo(r,"change:value",this.modelValueChanged),this.listenTo(r,"targetUpdated",this.targetUpdated),this.listenTo(r,"change:visible",this.updateVisibility),this.listenTo(r,"change:status",this.updateStatus);var a=this.init&&this.init.bind(this);a&&a()},updateStatus:function(){var t=this.model,e=t.get("status"),n=t.parent,r=this.pfx,i=this.ppfx,o=this.config,a="".concat(i,"four-color"),s="".concat(i,"color-warn"),l=this.$el.children(".".concat(r,"label")),c=this.getClearEl(),u=c?c.style:{};switch(l.removeClass("".concat(a," ").concat(s)),u.display="none",e){case"updated":!n&&l.addClass(a),o.clearProperties&&(u.display="inline");break;case"computed":l.addClass(s)}},clear:function(t){var e=this;t&&t.stopPropagation(),this.model.clearValue(),setTimeout((function(){return e.targetUpdated()}))},getClearEl:function(){return this.clearEl||(this.clearEl=this.el.querySelector("[".concat("data-clear-style","]"))),this.clearEl},getTarget:function(){return this.getTargetModel()},getTargets:function(){return this.propTarget.targets||[this.getTarget()]},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(t){t&&t.stopPropagation(),this.model.setValue(this.getInputValue(),1,{fromInput:1}),this.elementUpdated()},elementUpdated:function(){this.setStatus("updated")},setStatus:function(t){this.model.set("status",t);var e=this.model.parent;e&&t&&e.set("status",t)},emitUpdateTarget:Object(l.debounce)((function(){var t=this.config.em;t&&t.trigger("styleManager:update:target",this.getTarget())})),targetUpdated:function(){if(this.emitUpdateTarget(),this.checkVisibility()){var t=this.config,e=t.em,n=this.model,r=n.get("property"),i="",o="",a=this.getTargetValue({ignoreDefault:1}),s=n.getDefaultValue(),l=this.getComputedValue();a?(i=a,t.highlightChanged&&(o="updated")):l&&t.showComputed&&l!=s?(i=l,t.highlightComputed&&(o="computed")):(i=s,o=""),n.setValue(i,0,{fromTarget:1}),this.setStatus(o),e&&(e.trigger("styleManager:change",this,r,i),e.trigger("styleManager:change:".concat(r),this,i))}},checkVisibility:function(){var t=1;return this.config.hideNotStylable&&(this.isTargetStylable()&&this.isComponentStylable()?this.show():(this.hide(),t=0),this.sector&&this.sector.trigger("updateVisibility")),t},getTargetValue:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.model,r=this.getTargetModel(),i=this.customValue;if(!r)return t;if((t=r.getStyle()[n.get("property")])||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof i&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),a=i(this,o);a&&(t=a)}return t},getComputedValue:function(){var t=this.propTarget,e=t.computed||{},n=t.computedDefault||{},r=this.config.avoidComputed||[],i=this.model.get("property"),o=r.indexOf(i)<0,a=e[i],s=n[Object(c.b)(i)];return e&&o&&s!==a&&a},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.model,o=i.getFullValue();r.fromInput||this.setValue(o),this.getTargets().forEach((function(t){return n.__updateTarget(t,r)}))},__updateTarget:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,r=this.config.em,i=n.get("property"),o=n.getFullValue(),a=this.onChange;if(t&&this.isTargetStylable(t)&&this.isComponentStylable()){e.fromTarget||(a&&!e.fromParent?a(t,this,e):this.updateTargetStyle(o,null,O({},e,{target:t})));var s=r&&r.getSelected();r&&s&&(r.trigger("component:update",s),r.trigger("component:styleUpdate",s,i),r.trigger("component:styleUpdate:".concat(i),s))}},updateTargetStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e||this.model.get("property"),i=n.target||this.getTarget(),o=i.getStyle();t?o[r]=t:delete o[r],i.setStyle(o,n);var a=this.getHelperModel();a&&a.setStyle(o,n)},isTargetStylable:function(t){var e=t||this.getTarget(),n=this.model,r=n.get("id"),i=n.get("property"),o=n.get("toRequire"),a=e.get("unstylable"),s=e.get("stylable-require"),c=n.get("requires"),u=n.get("requiresParent"),h=this.sector?this.sector.collection:null,d=this.em?this.em.getSelected():null,f=e.get("stylable");if(Object(l.isArray)(f)&&(f=f.indexOf(i)>=0),Object(l.isArray)(a)&&(f=a.indexOf(i)<0),o&&(f=!t||s&&(s.indexOf(r)>=0||s.indexOf(i)>=0)),h&&c){var p=Object.keys(c);h.each((function(t){t.get("properties").each((function(t){if(Object(l.includes)(p,t.id)){var e=c[t.id];f=f&&Object(l.includes)(e,t.get("value"))}}))}))}if(u){var g=d&&d.parent(),v=g&&g.getEl();if(v){var m=window.getComputedStyle(v);Object(l.each)(u,(function(t,e){f=f&&m[e]&&Object(l.includes)(t,m[e])}))}else f=!1}return f},isComponentStylable:function(){var t=this.em,e=t&&t.getSelected();return!e||this.isTargetStylable(e)},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=this.model,n=Object(l.isUndefined)(t)?e.getDefaultValue():t,r=this.getInputEl();r&&(r.value=n)},getInputEl:function(){return this.input||(this.input=this.el.querySelector("input")),this.input},updateVisibility:function(){this.el.style.display=this.model.get("visible")?"block":"none"},show:function(){this.model.set("visible",1)},hide:function(){this.model.set("visible",0)},cleanValue:function(){this.setValue("")},clearCached:function(){this.clearEl=null,this.input=null,this.$input=null},render:function(){this.clearCached();var t=this.pfx,e=this.model,n=this.el,r=e.get("property"),i=e.get("full"),o="".concat(t,"property");n.innerHTML=this.template(e),n.className="".concat(o," ").concat(t).concat(e.get("type")," ").concat(o,"__").concat(r),n.className+=i?" ".concat(o,"--full"):"",this.updateStatus();var a=this.onRender&&this.onRender.bind(this);a&&a(),this.setValue(e.get("value"),{targetUpdate:1})}}),k=a.a.$,T=S.extend({templateInput:function(){var t=this.pfx;return'\n
\n \n
\n ')},inputValueChanged:function(){if(!this.model.get("detached")){for(var t=arguments.length,e=new Array(t),n=0;n'),this.input=this.$input.get(0)),this.props||(this.props=t.get("properties")),!this.$props)){this.props.each((function(e,n){e&&"composite"==e.get("type")&&(this.props.remove(e),console.warn("Nested composite types not yet allowed.")),e.parent=t}),this);var r=new(0,n(16).default)(this.getPropsConfig());this.$props=r.render().$el,this.properties=r.properties,this.$el.find("#".concat(this.pfx,"input-holder")).append(this.$props)}},getPropsConfig:function(t){var e=this,n=this.model,r={config:this.config,collection:this.props,target:this.target,propTarget:this.propTarget,onChange:function(t,e,r){n.set("value",n.getFullValue(),r)},customValue:function(t,n){return e.valueOnIndex(n,t)}};return n.get("detached")&&delete r.onChange,r},valueOnIndex:function(t,e){var n,r=this.getTargetValue({ignoreDefault:1});r?n=r.split(this.model.getSplitSeparator())[t]:n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return n},clearCached:function(){S.prototype.clearCached.apply(this,arguments),this.$input=null,this.props=null,this.$props=null}}),P=n(16),j=a.a.View.extend({events:{click:"active","click [data-close-layer]":"remove","mousedown [data-move-layer]":"initSorter","touchstart [data-move-layer]":"initSorter"},template:function(t){var e=this.pfx,n=this.ppfx,r=this.em,i="".concat(r&&r.t("styleManager.layer")," ").concat(t.get("index"));return'\n
\n \n
\n
').concat(i,'
\n
\n \t
\n
\n
\n ⨯\n
\n
\n
\n ')},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model;this.stackModel=t.stackModel||{},this.config=t.config||{},this.em=this.config.em,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.sorter=t.sorter||null,this.propsConfig=t.propsConfig||{},this.customPreview=t.onPreview,this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:active",this.updateVisibility),this.listenTo(e.get("properties"),"change",this.updatePreview),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data("model",e)},initSorter:function(t){this.sorter&&this.sorter.startSort(this.el)},remove:function(t){t&&t.stopPropagation&&t.stopPropagation();var e=this.model,n=e.collection,r=this.stackModel;a.a.View.prototype.remove.apply(this,arguments),n.contains(e)&&n.remove(e),r&&r.set&&(r.set({stackIndex:null},{silent:!0}),r.trigger("updateValue"))},onPreview:function(t){var e=t.split(" "),n=[];return this.model.get("properties").each((function(t,r){var i=e[r]||"";if(i&&"integer"==t.get("type")){var o=parseInt(i,10),a=i.replace(o,"");i=(o=(o=(o=isNaN(o)?0:o)>3?3:o)<-3?-3:o)+a}n.push(i)})),n.join(" ")},updatePreview:function(){var t=this.stackModel,e=this.customPreview,n=this.getPreviewEl(),r=this.model.getFullValue(),i=e?e(r):this.onPreview(r);i&&t&&n&&(n.style[t.get("property")]=i)},getPropertiesWrapper:function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector("[data-properties]")),this.propsWrapEl},getPreviewEl:function(){return this.previewEl||(this.previewEl=this.el.querySelector("[data-preview]")),this.previewEl},active:function(){var t=this.model,e=t.collection;e.active(e.indexOf(t))},updateVisibility:function(){var t=this.pfx,e=this.getPropertiesWrapper(),n=this.model.get("active");e.style.display=n?"":"none",this.$el[n?"addClass":"removeClass"]("".concat(t,"active"))},render:function(){var t=this.propsConfig,e=this.model,n=this.el,r=this.pfx,i=e.get("preview"),o=new P.default({collection:e.get("properties"),config:this.config,target:t.target,customValue:t.customValue,propTarget:t.propTarget,onChange:t.onChange}).render().el;return n.innerHTML=this.template(e),n.className="".concat(r,"layer").concat(i?"":" ".concat(r,"no-preview")),this.getPropertiesWrapper().appendChild(o),this.updateVisibility(),this.updatePreview(),this}}),E=a.a.View.extend({initialize:function(t){this.config=t.config||{},this.stackModel=t.stackModel,this.preview=t.preview,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.propsConfig=t.propsConfig;var e=this.pfx,n=this.ppfx,r=this.collection;this.className="".concat(e,"layers ").concat(n,"field"),this.listenTo(r,"add",this.addTo),this.listenTo(r,"deselectAll",this.deselectAll),this.listenTo(r,"reset",this.render);var i=this.config.em||"",o=i?i.get("Utils"):"";this.sorter=o?new o.Sorter({container:this.el,ignoreViewChildren:1,containerSel:".".concat(e,"layers"),itemSel:".".concat(e,"layer"),pfx:this.config.pStylePrefix}):"",r.view=this,this.$el.data("model",r),this.$el.data("collection",r)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var r=e||null,i=this.stackModel,o=this.config,a=this.sorter,s=this.propsConfig;void 0!==this.preview&&t.set("preview",this.preview);var l=new j({model:t,config:o,sorter:a,stackModel:i,propsConfig:s}).render().el;if(r)r.appendChild(l);else if(void 0!==n){var c="before";this.$el.children().length==n&&(n--,c="after"),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return l},deselectAll:function(){this.$el.find("."+this.pfx+"layer").removeClass(this.pfx+"active")},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each((function(e){this.addToCollection(e,t)}),this),this.$el.append(t),this.$el.attr("class",this.className),this.sorter&&(this.sorter.plh=null),this}}),M=T.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\n \n
\n
\n ')},init:function(){var t=this.model;this.pfx;t.set("stackIndex",null),this.events["click [data-add-layer]"]="addLayer",this.listenTo(t,"change:stackIndex",this.indexChanged),this.listenTo(t,"updateValue",this.inputValueChanged),this.delegateEvents()},clear:function(t){t&&t.stopPropagation(),this.model.get("layers").reset(),this.model.clearValue(),this.targetUpdated()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=new Array(t),n=0;n\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n \n ')},init:function(){var t=this.em;this.modal=t.get("Modal"),this.am=t.get("AssetManager"),this.events["click #"+this.pfx+"close"]="removeFile",this.events["click #"+this.pfx+"images"]="openAssetManager",this.delegateEvents()},onRender:function(){if(!this.$input){var t=this.model.getDefaultValue();this.$input=D(''))}this.$preview||(this.$preview=this.$el.find("#"+this.pfx+"preview-file")),this.$previewBox||(this.$previewBox=this.$el.find("#"+this.pfx+"preview-box")),this.setValue(this.componentValue,0)},clearCached:function(){S.prototype.clearCached.apply(this,arguments),this.$preview=null,this.$previewBox=null},setValue:function(t,e){S.prototype.setValue.apply(this,arguments),this.setPreviewView(t&&t!=this.model.getDefaultValue()),this.setPreview(t)},setPreviewView:function(t){var e=this.$previewBox;e&&e[t?"addClass":"removeClass"]("".concat(this.pfx,"show"))},spreadUrl:function(t){this.model.set("value",t),this.setPreviewView(1)},setPreview:function(t){var e=this.$preview;t=t&&t.indexOf("url(")<0?"url(".concat(t,")"):t,e&&e.css("background-image",t)},cleanValue:function(){this.setPreviewView(0),this.model.set({value:""},{silent:!0})},removeFile:function(){this.model.set("value",this.model.getDefaultValue());for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};e=_({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new I.a({target:this.target,model:this.model,ppfx:t}).render();this.el.querySelector(".".concat(t,"fields")).appendChild(e.el),this.$input=e.inputEl,this.$color=e.colorEl,this.input=this.$input.get(0),this.inputInst=e}}}),V=n(7),H=n.n(V);function z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var $=f.extend({defaults:function(){return function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:[];return this.set("options",t),this},addOption:function(t){if(t){var e=this.getOptions();this.setOptions([].concat(H()(e),[t]))}return this}});function B(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var W=$.extend({defaults:function(){return function(t){for(var e=1;e\n \n
\n
\n
\n \n ')},initialize:function(){for(var t=arguments.length,e=new Array(t),n=0;n").concat(e,"")}));var r=this.el.querySelector("#".concat(t,"input-holder"));r.innerHTML=""),this.input=r.firstChild}}})),q=S.extend({templateInput:function(){this.pfx;var t=this.ppfx;return'\n
\n
\n ')},onRender:function(){var t=this.pfx,e=this.ppfx,n="".concat(e,"radio-item-label"),r=this.model,i=r.get("property"),o=r.get("list")||r.get("options")||[];if(!this.input&&o&&o.length){var a="";o.forEach((function(r){var o=r.className?"".concat(r.className," ").concat(t,"icon ").concat(n):"",s="".concat(i,"-").concat(r.value),l=r.name||r.value,c=r.title?'title="'.concat(r.title,'"'):"";a+='\n
\n \n \n
\n ")}));var s=this.el.querySelector(".".concat(e,"field"));s.innerHTML='
').concat(a,"
"),this.input=s.firstChild}},getInputValue:function(){var t=this.getCheckedEl();return t?t.value:""},getCheckedEl:function(){var t=this.getInputEl();return t?t.querySelector("input:checked"):""},setValue:function(t){var e=this.model,n=t||e.get("value")||e.getDefaultValue(),r=this.getInputEl(),i=r?r.querySelector('[value="'.concat(n,'"]')):"";if(i)i.checked=!0;else{var o=this.getCheckedEl();o&&(o.checked=!1)}}}),G=n(28);function K(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var Y=f.extend({defaults:function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f.callParentInit(f,this,t,e);var n=this.get("unit"),r=this.get("units");this.input=new G.a({model:this}),r.length&&!n&&this.set("unit",r[0]),f.callInit(this,t,e)},clearValue:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0,unit:void 0},t),this},parseValue:function(t){var e=f.prototype.parseValue.apply(this,arguments),n=this.input.validateInputValue(e.value,{deepCheck:1}),r=n.value,i=n.unit;return e.value=r,e.unit=i,e},getFullValue:function(){var t=this.get("value"),e=this.get("unit");return t=Object(l.isUndefined)(t)?"":t,e=!Object(l.isUndefined)(e)&&t?e:"",t="".concat(t).concat(e),f.prototype.getFullValue.apply(this,[t])}});function X(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var J=Y.extend({defaults:function(t){for(var e=1;e\n \n \n ')},getSliderEl:function(){return this.slider||(this.slider=this.el.querySelector("input[type=range]")),this.slider},inputValueChanged:function(){var t=this.model,e=t.get("step");this.getInputEl().value=this.getSliderEl().value;var n=this.getInputValue()-e;t.set("value",n,{avoidStore:1}).set("value",n+e),this.elementUpdated()},inputValueChangedSoft:function(){this.getInputEl().value=this.getSliderEl().value,this.model.set("value",this.getInputValue(),{avoidStore:1}),this.elementUpdated()},setValue:function(t){var e=this.model.parseValue(t);this.getSliderEl().value=parseFloat(e.value),N.prototype.setValue.apply(this,arguments)},onRender:function(){N.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")},clearCached:function(){N.prototype.clearCached.apply(this,arguments),this.slider=null}});function tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var et=e.default=a.a.Collection.extend(s.a).extend({types:[{id:"stack",model:x,view:M,isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:g,view:T,isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:f,view:A,isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:f,view:R,isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:W,view:U,isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:$,view:q,isType:function(t){if(t&&"radio"==t.type)return t}},{id:"slider",model:J,view:Q,isType:function(t){if(t&&"slider"==t.type)return t}},{id:"integer",model:Y,view:N,isType:function(t){if(t&&"integer"==t.type)return t}},{id:"base",model:f,view:S,isType:function(t){return t.type="base",t}}],deepClone:function(){var t=this.clone();return t.reset(t.map((function(t){var e=t.clone();return e.typeView=t.typeView,e}))),t},parseValue:function(t){var e=this,n=[];return t.split(" ").forEach((function(t,r){var o=e.at(r);o&&n.push(function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},n={},r={};return Object(o.each)(e,(function(e,i){if(0===i.indexOf(t.modelAttrStart)){var a=i.replace("data-gjs-",""),s=e.length,l=e&&Object(o.isString)(e),c=l&&e.substr(0,1),u=l&&e.substr(s-1);e="false"!==(e="true"===e||e)&&e;try{e="{"==c&&"}"==u||"["==c&&"]"==u?JSON.parse(e):e}catch(t){}n[a]=e}else r[i]=e})),{props:n,attrs:r}},parseStyle:function(t){for(var e={},n=t.split(";"),r=0,i=n.length;r0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i&&i.type){var a=n.getBaseType();t=(r=n.getType(i.type))?r.model:a.model,e=r?r.view:a.view}else{var s=n.recognizeType(i);t=(r=s.type).model,e=r.view,i=s.attributes}var l=new t(i,o);return l.typeView=e,l};var r=this.init&&this.init.bind(this);r&&r()},recognizeType:function(t){for(var e=this.getTypes(),n=0;n\n \n
\n
\n
\n
\n ')},inputClass:function(){var t=this.ppfx;return this.opts.contClass||"".concat(t,"field ").concat(t,"field-integer")},initialize:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];s.a.prototype.initialize.apply(this,arguments),Object(o.bindAll)(this,"moveIncrement","upIncrement"),this.doc=document,this.listenTo(this.model,"change:unit",this.handleModelChange)},setValue:function(t,e){var n=e||{},r=this.validateInputValue(t,{deepCheck:1}),i={value:r.value};(r.unit||r.force)&&(i.unit=r.unit),this.model.set(i,n),n.silent&&this.handleModelChange()},handleChange:function(t){t.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()},handleUnitChange:function(t){t.stopPropagation();var e=this.getUnitEl().value;this.model.set("unit",e),this.elementUpdated()},elementUpdated:function(){this.model.trigger("el:change")},handleModelChange:function(){var t=this.model;this.getInputEl().value=t.get("value");var e=this.getUnitEl();e&&(e.value=t.get("unit")||"")},getUnitEl:function(){if(!this.unitEl){var t=this.model,e=t.get("units")||[];if(e.length){var n=[];e.forEach((function(e){var r=e==t.get("unit")?"selected":"";n.push(""))}));var r=document.createElement("div");r.innerHTML='"),this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=parseInt(t.get("value"),10);n=this.normalizeValue(n+e);var r=this.validateInputValue(n);t.set("value",r.value),this.elementUpdated()},downArrowClick:function(){var t=this.model,e=t.get("step"),n=parseInt(t.get("value"),10),r=this.normalizeValue(n-e),i=this.validateInputValue(r);t.set("value",i.value),this.elementUpdated()},downIncrement:function(t){t.preventDefault(),this.moved=0;var e=this.model.get("value");e=this.normalizeValue(e),this.current={y:t.pageY,val:e},Object(a.s)(this.doc,"mousemove",this.moveIncrement),Object(a.s)(this.doc,"mouseup",this.upIncrement)},moveIncrement:function(t){this.moved=1;var e=this.model,n=e.get("step"),r=this.current,i=this.normalizeValue(r.val+(r.y-t.pageY)*n);return this.prValue=this.validateInputValue(i).value,e.set("value",this.prValue,{avoidStore:1}),!1},upIncrement:function(){var t=this.model,e=t.get("step");if(Object(a.r)(this.doc,"mouseup",this.upIncrement),Object(a.r)(this.doc,"mousemove",this.moveIncrement),this.prValue&&this.moved){var n=this.prValue-e;t.set("value",n,{avoidStore:1}).set("value",n+e),this.elementUpdated()}},normalizeValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.model,r=n.get("step"),i=0;if(isNaN(t))return e;if(t=parseFloat(t),Math.floor(t)!==t){var o=r.toString().split(".")[1];i=o?o.length:0}return i?parseFloat(t.toFixed(i)):t},validateInputValue:function(t,e){var n=0,r=e||{},i=this.model,a=Object(o.isUndefined)(t)?"":t,s=i.get("units")||[],l=i.get("unit")||s.length&&s[0]||"",c=i.get("max"),u=i.get("min");if(r.deepCheck){var h=i.get("fixedValues")||[];if(a){var d=new RegExp("^"+h.join("|"),"g");if(h.length&&d.test(a))a=a.match(d)[0],l="",n=1;else{var f=a+"";a+="",a=parseFloat(a.replace(",",".")),a=isNaN(a)?"":a;var p=f.replace(a,"");Object(o.indexOf)(s,p)>=0&&(l=p)}}}return Object(o.isUndefined)(c)||""===c||(a=a>c?c:a),Object(o.isUndefined)(u)||""===u||(a=a2&&void 0!==arguments[2]?arguments[2]:{},i=this.config.em,o=t.view,a=t.opt.temporary,s=r.temporary;if(o){o.remove.apply(o);var l=o.childrenView,c=o.scriptContainer;if(l&&l.stopListening(),c&&c.remove(),t.components().forEach((function(t){return n.removeChildren(t,e,r)})),i&&!s){var u=t.getId(),h=i.get("DomComponents");delete h.componentsById[u];var d=i.get("CssComposer").getAll();if(d.remove(d.filter((function(t){return t.getSelectors().getFullString()==="#".concat(u)}))),!a){var f=i.get("Commands"),p=t.get("style-signature"),g={target:t};p&&f.run("core:component-style-clear",g),t.removed(),i.trigger("component:remove",t)}}}},addTo:function(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1];var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.config.em,r=this.collection.indexOf(t);if(this.addToCollection(t,null,r),n&&!e.temporary){var i=function t(e){n.trigger("component:add",e),e.components().forEach((function(e){return t(e)}))};i(t)}},addToCollection:function(t,e,r){this.compView||(this.compView=n(5).default);for(var i=this.config,a=e||null,s=this.opts.componentTypes,l=t.get("type"),c=this.compView,u=0;u'):"",'\n
\n
\n
\n \n ').concat(g?'').concat(g,""):"",'\n ').concat(p,'\n
\n
\n
\n
').concat(a||"",'
\n
\n \n
\n
')},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t,this.level=t.level,this.config=t.config,this.em=t.config.em,this.ppfx=this.em.get("Config").stylePrefix,this.sorter=t.sorter||"",this.pfx=this.config.stylePrefix,this.parentView=t.parentView;var e=this.pfx,n=this.ppfx,r=this.model,i=r.get("components"),o=r.get("type")||"default";r.set("open",!1),this.listenTo(i,"remove add reset",this.checkChildren),this.listenTo(r,"change:status",this.updateStatus),this.listenTo(r,"change:open",this.updateOpening),this.listenTo(r,"change:layerable",this.updateLayerable),this.listenTo(r,"change:style:display",this.updateVisibility),this.className="".concat(e,"layer ").concat(e,"layer__t-").concat(o," no-select ").concat(n,"two-color"),this.inputNameCls="".concat(n,"layer-name"),this.clsTitleC="".concat(e,"layer-title-c"),this.clsTitle="".concat(e,"layer-title"),this.clsCaret="".concat(e,"layer-caret"),this.clsCount="".concat(e,"layer-count"),this.clsMove="".concat(e,"layer-move"),this.clsChildren="".concat(e,"layer-children"),this.clsNoChild="".concat(e,"layer-no-chld"),this.clsEdit="".concat(this.inputNameCls,"--edit"),this.clsNoEdit="".concat(this.inputNameCls,"--no-edit"),this.$el.data("model",r),this.$el.data("collection",i),r.viewLayer=this},getVisibilityEl:function(){return this.eyeEl||(this.eyeEl=this.$el.children(".".concat(this.pfx,"layer-vis"))),this.eyeEl},updateVisibility:function(){var t=this.pfx,e=this.model,n="".concat(t,"layer-hidden"),r="none"==e.getStyle().display?"addClass":"removeClass";this.$el[r](n),this.getVisibilityEl()[r]("fa-eye-slash")},toggleVisibility:function(t){t&&t.stopPropagation();var e=this.model,n=e.getStyle();"none"==n.display?delete n.display:n.display="none",e.setStyle(n)},handleEdit:function(t){t&&t.stopPropagation();var e=this.em,n=this.$el,r=this.clsNoEdit,i=this.clsEdit,o=this.getInputName();o.contentEditable=!0,o.focus(),e&&e.setEditing(1),n.find(".".concat(this.inputNameCls)).removeClass(r).addClass(i)},handleEditEnd:function(t){t&&t.stopPropagation();var e=this.em,n=this.$el,r=this.clsNoEdit,i=this.clsEdit,o=this.getInputName(),a=o.textContent;o.scrollLeft=0,o.contentEditable=!1,this.model.set({"custom-name":a}),e&&e.setEditing(0),n.find(".".concat(this.inputNameCls)).addClass(r).removeClass(i)},getInputName:function(){return this.inputName||(this.inputName=this.el.querySelector(".".concat(this.inputNameCls))),this.inputName},updateOpening:function(){var t=this.opt.opened||{},e=this.model;e.get("open")?(this.$el.addClass("open"),this.getCaret().addClass("fa-chevron-down"),t[e.cid]=e):(this.$el.removeClass("open"),this.getCaret().removeClass("fa-chevron-down"),delete t[e.cid])},toggleOpening:function(t){t.stopPropagation(),this.model.get("components").length&&this.model.set("open",!this.model.get("open"))},handleSelect:function(t){t.stopPropagation();var e=this.em,n=this.config;if(e){var r=this.model;e.setSelected(r,{fromLayers:1});var i=n.scrollCanvas;i&&e.get("Canvas").scrollTo(r,i)}},handleHover:function(t){t.stopPropagation();var e=this.em,n=this.config,r=this.model;e&&n.showHover&&e.setHovered(r,{fromLayers:1})},startSort:function(t){t.stopPropagation();var e=this.sorter;t.button&&0!==t.button||e&&e.startSort(t.target)},freeze:function(){this.$el.addClass(this.pfx+"opac50"),this.model.set("open",0)},unfreeze:function(){this.$el.removeClass(this.pfx+"opac50")},updateStatus:function(t){l.default.prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover}])},isVisible:function(){var t=this.model.get("style").display;if(!t||"none"!=t)return 1},checkChildren:function(){var t=this.model,e=this.clsNoChild,n=this.countChildren(t),r=this.$el.children(".".concat(this.clsTitleC)).children(".".concat(this.clsTitle)),i=this.cnt;i||(i=this.$el.children("[data-count]").get(0),this.cnt=i),r[n?"removeClass":"addClass"](e),i&&(i.innerHTML=n||""),!n&&t.set("open",0)},countChildren:function(t){var e=0;return t.get("components").each((function(t){var n=this.opt.isCountable,r=this.config.hideTextnode;n&&!n(t,r)||e++}),this),e},getCaret:function(){if(!this.caret||!this.caret.length){this.pfx;this.caret=this.$el.children(".".concat(this.clsTitleC)).find(".".concat(this.clsCaret))}return this.caret},setRoot:function(t){t=Object(i.isString)(t)?this.em.getWrapper().find(t)[0]:t;var e=Object(o.g)(t,c);e&&(this.stopListening(),this.model=e,this.initialize(this.opt),this.render())},updateLayerable:function(){(this.parentView||this).render()},render:function(){var t=this.model,e=this.config,o=this.pfx,a=this.ppfx,s=this.opt.isCountable,l=s&&!s(t,e.hideTextnode),c=this.isVisible(),u=this.$el.empty(),h=this.level+1;Object(i.isUndefined)(r)&&(r=n(84).default);var d=new r({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parentView:this,parent:t,level:h}).render().$el;return this.config.showWrapper||1!==h?(u.html(this.template(t)),u.find(".".concat(this.clsChildren)).append(d)):u.append(d),t.get("draggable")&&this.config.sortable||u.children(".".concat(this.clsMove)).remove(),!c&&(this.className+=" ".concat(o,"hide")),l&&(this.className+=" ".concat(a,"hidden")),u.attr("class",this.className),this.updateOpening(),this.updateStatus(),this.updateVisibility(),this}})},function(t,e,n){"use strict";var r=n(2),i=n.n(r),o=n(1),a=n.n(o),s=n(0),l=n(6),c=n.n(l),u=n(15);function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var d=a.a.$;!function(t,e){var n={beforeShow:h,move:h,change:h,show:h,hide:h,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:!1,className:"",containerClassName:"",replacerClassName:"",showAlpha:!1,theme:"sp-light",palette:[["#ffffff","#000000","#ff0000","#ff8000","#ffff00","#008000","#0000ff","#4b0082","#9400d3"]],selectionPalette:[],disabled:!1,offset:null},r=[],i=!!/msie/i.exec(window.navigator.userAgent),o=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div").style;return e.cssText="background-color:rgba(0,0,0,.5)",t(e.backgroundColor,"rgba")||t(e.backgroundColor,"hsla")}(),a=["
","
","
","
"].join(""),s=function(){var t="";if(i)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();function l(e,n,r,i){for(var a=[],s=0;s')}else{a.push(t("
").append(t('').attr("title",i.noColorSelectedText)).html())}}return"
"+a.join("")+"
"}function u(c,u){var h,v,m,y,b=function(e,r){var i=t.extend({},n,e);return i.callbacks={move:f(i.move,r),change:f(i.change,r),show:f(i.show,r),hide:f(i.hide,r),beforeShow:f(i.beforeShow,r)},i}(u,c),w=b.flat,x=b.showSelectionPalette,C=b.localStorageKey,O=b.theme,S=b.callbacks,T=(h=Wt,v=10,function(){var t=this,e=arguments,n=function(){y=null,h.apply(t,e)};m&&clearTimeout(y),!m&&y||(y=setTimeout(n,v))}),P=!1,j=!1,E=0,M=0,D=0,A=0,L=0,N=0,I=0,F=0,_=0,R=0,V=1,H=[],z=[],$={},B=b.selectionPalette.slice(0),W=b.maxSelectionSize,U="sp-dragging",q=null,G=c.ownerDocument,K=(G.body,t(c)),Y=!1,X=t(s,G).addClass(O),J=X.find(".sp-picker-container"),Z=X.find(".sp-color"),Q=X.find(".sp-dragger"),tt=X.find(".sp-hue"),et=X.find(".sp-slider"),nt=X.find(".sp-alpha-inner"),rt=X.find(".sp-alpha"),it=X.find(".sp-alpha-handle"),ot=X.find(".sp-input"),at=X.find(".sp-palette"),st=X.find(".sp-initial"),lt=X.find(".sp-cancel"),ct=X.find(".sp-clear"),ut=X.find(".sp-choose"),ht=X.find(".sp-palette-toggle"),dt=K.is("input"),ft=dt&&"color"===K.attr("type")&&g(),pt=dt&&!w,gt=pt?t(a).addClass(O).addClass(b.className).addClass(b.replacerClassName):t([]),vt=pt?gt:K,mt=gt.find(".sp-preview-inner"),yt=b.color||dt&&K.val(),bt=!1,wt=b.preferredFormat,xt=!b.showButtons||b.clickoutFiresChange,Ct=!yt,Ot=b.allowEmpty&&!ft;function St(){if(b.showPaletteOnly&&(b.showPalette=!0),ht.text(b.showPaletteOnly?b.togglePaletteMoreText:b.togglePaletteLessText),b.palette){H=b.palette.slice(0),z=t.isArray(H[0])?H:[H],$={};for(var e=0;e1&&(delete window.localStorage[C],t.each(e,(function(t,e){Tt(e)})))}catch(t){}try{B=window.localStorage[C].split(";")}catch(t){}}}function Tt(e){if(x){var n=k(e).toRgbString();if(!$[n]&&-1===t.inArray(n,B))for(B.push(n);B.length>W;)B.shift();if(C&&window.localStorage)try{window.localStorage[C]=B.join(";")}catch(t){}}}function Pt(){var e=Vt(),n=t.map(z,(function(t,n){return l(t,e,"sp-palette-row sp-palette-row-"+n,b)}));kt(),B&&n.push(l(function(){var t=[];if(b.showPalette)for(var e=0;ed&&d>r?Math.abs(p.left+r-d):0),p.top-=Math.min(p.top,p.top+i>f&&f>i?Math.abs(i+o-0):0),p}(X,vt))),$t(),b.showPalette&&Pt(),K.trigger("reflow.spectrum"))}function Ut(){Ft(),Y=!0,K.attr("disabled",!0),vt.addClass("sp-disabled")}!function(){if(i&&X.find("*:not(input)").attr("unselectable","on"),St(),pt&&K.after(gt).hide(),Ot||ct.hide(),w)K.after(X).hide();else{var e="parent"===b.appendTo?K.parent():t(b.appendTo);1!==e.length&&(e=t("body")),e.append(X)}function n(e){return e.data&&e.data.ignore?(Rt(t(e.target).closest(".sp-thumb-el").data("color")),Ht()):(Rt(t(e.target).closest(".sp-thumb-el").data("color")),Ht(),Bt(!0),b.hideAfterPaletteSelect&&Ft()),!1}kt(),vt.bind("click.spectrum touchstart.spectrum",(function(e){Y||At(),e.stopPropagation(),t(e.target).is("input")||e.preventDefault()})),(K.is(":disabled")||!0===b.disabled)&&Ut(),X.click(d),ot.change(Dt),ot.bind("paste",(function(){setTimeout(Dt,1)})),ot.keydown((function(t){13==t.keyCode&&Dt()})),lt.text(b.cancelText),lt.bind("click.spectrum",(function(t){t.stopPropagation(),t.preventDefault(),_t(),Ft()})),ct.attr("title",b.clearText),ct.bind("click.spectrum",(function(t){t.stopPropagation(),t.preventDefault(),Ct=!0,Ht(),w&&Bt(!0)})),ut.text(b.chooseText),ut.bind("click.spectrum",(function(t){t.stopPropagation(),t.preventDefault(),i&&ot.is(":focus")&&ot.trigger("change"),ot.hasClass("sp-validation-error")||(Bt(!0),Ft())})),ht.text(b.showPaletteOnly?b.togglePaletteMoreText:b.togglePaletteLessText),ht.bind("click.spectrum",(function(t){t.stopPropagation(),t.preventDefault(),b.showPaletteOnly=!b.showPaletteOnly,b.showPaletteOnly||w||X.css("left","-="+(J.outerWidth(!0)+5)),St()})),p(rt,(function(t,e,n){V=t/L,Ct=!1,n.shiftKey&&(V=Math.round(10*V)/10),Ht()}),Et,Mt),p(tt,(function(t,e){F=parseFloat(e/A),Ct=!1,b.showAlpha||(V=1),Ht()}),Et,Mt),p(Z,(function(t,e,n){if(n.shiftKey){if(!q){var r=_*E,i=M-R*M,o=Math.abs(t-r)>Math.abs(e-i);q=o?"x":"y"}}else q=null;var a=!q||"y"===q;(!q||"x"===q)&&(_=parseFloat(t/E)),a&&(R=parseFloat((M-e)/M)),Ct=!1,b.showAlpha||(V=1),Ht()}),Et,Mt),yt?(Rt(yt),zt(),wt=b.preferredFormat||k(yt).format,Tt(yt)):zt(),w&&Lt();var r=i?"mousedown.spectrum":"click.spectrum touchstart.spectrum";at.delegate(".sp-thumb-el",r,n),st.delegate(".sp-thumb-el:nth-child(1)",r,{ignore:!0},n)}();var qt={show:Lt,hide:Ft,toggle:At,reflow:Wt,option:function(n,r){return n===e?t.extend({},b):r===e?b[n]:(b[n]=r,"preferredFormat"===n&&(wt=b.preferredFormat),void St())},enable:function(){Y=!1,K.attr("disabled",!1),vt.removeClass("sp-disabled")},disable:Ut,offset:function(t){b.offset=t,Wt()},set:function(t){Rt(t),Bt()},get:Vt,destroy:function(){K.show(),vt.unbind("click.spectrum touchstart.spectrum"),X.remove(),gt.remove(),r[qt.id]=null},container:X};return qt.id=r.push(qt)-1,qt}function h(){}function d(t){t.stopPropagation()}function f(t,e){var n=Array.prototype.slice,r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}function p(e,n,r,o){n=n||function(){},r=r||function(){},o=o||function(){};var a=document,s=!1,l={},c=0,u=0,h="ontouchstart"in window,d={};function f(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function p(t){if(s){if(i&&a.documentMode<9&&!t.button)return g();var r=t&&t.touches&&t.touches[0],o=r&&r.pageX||t.pageX,d=r&&r.pageY||t.pageY,p=Math.max(0,Math.min(o-l.left,u)),v=Math.max(0,Math.min(d-l.top,c));h&&f(t),n.apply(e,[p,v,t])}}function g(){s&&(t(a).unbind(d),t(a.body).removeClass("sp-dragging"),setTimeout((function(){o.apply(e,arguments)}),0)),s=!1}d.selectstart=f,d.dragstart=f,d["touchmove mousemove"]=p,d["touchend mouseup"]=g,t(e).bind("touchstart mousedown",(function(n){(n.which?3==n.which:2==n.button)||s||!1!==r.apply(e,arguments)&&(s=!0,c=t(e).height(),u=t(e).width(),l=t(e).offset(),t(a).bind(d),t(a.body).addClass("sp-dragging"),p(n),f(n))}))}function g(){return t.fn.spectrum.inputTypeColorSupport()}var v="spectrum.id";t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,o=Array.prototype.slice.call(arguments,1);return this.each((function(){var n=r[t(this).data(v)];if(n){var a=n[e];if(!a)throw new Error("Spectrum: no such method: '"+e+"'");"get"==e?i=n.get():"container"==e?i=n.container:"option"==e?i=n.option.apply(n,o):"destroy"==e?(n.destroy(),t(this).removeData(v)):a.apply(n,o)}})),i}return this.spectrum("destroy").each((function(){var n=u(this,t.extend({},e,t(this).data()));t(this).data(v,n.id)}))},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=p,t.fn.spectrum.defaults=n,t.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var n=t("")[0];e._cachedResult="color"===n.type&&""!==n.value}return e._cachedResult},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t("input[type=color]");e.length&&!g()&&e.spectrum({preferredFormat:"hex6"})};var m=/^[\s,#]+/,y=/\s+$/,b=0,w=Math,x=w.round,C=w.min,O=w.max,S=w.random,k=function t(e,n){if(n=n||{},(e=e||"")instanceof t)return e;if(!(this instanceof t))return new t(e,n);var r=function(t){var e={r:0,g:0,b:0},n=1,r=!1,i=!1;"string"==typeof t&&(t=function(t){t=t.replace(m,"").replace(y,"").toLowerCase();var e,n=!1;if(B[t])t=B[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=tt.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=tt.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=tt.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=tt.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=tt.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=tt.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=tt.hex8.exec(t))return{a:(r=e[1],K(r)/255),r:K(e[2]),g:K(e[3]),b:K(e[4]),format:n?"name":"hex8"};var r;if(e=tt.hex6.exec(t))return{r:K(e[1]),g:K(e[2]),b:K(e[3]),format:n?"name":"hex"};if(e=tt.hex3.exec(t))return{r:K(e[1]+""+e[1]),g:K(e[2]+""+e[2]),b:K(e[3]+""+e[3]),format:n?"name":"hex"};return!1}(t));"object"==c()(t)&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(o=t.r,a=t.g,s=t.b,e={r:255*q(o,255),g:255*q(a,255),b:255*q(s,255)},r=!0,i="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=X(t.s),t.v=X(t.v),e=function(t,e,n){t=6*q(t,360),e=q(e,100),n=q(n,100);var r=w.floor(t),i=t-r,o=n*(1-e),a=n*(1-i*e),s=n*(1-(1-i)*e),l=r%6;return{r:255*[n,a,o,o,s,n][l],g:255*[s,n,n,a,o,o][l],b:255*[o,o,s,n,n,a][l]}}(t.h,t.s,t.v),r=!0,i="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=X(t.s),t.l=X(t.l),e=function(t,e,n){var r,i,o;function a(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=q(t,360),e=q(e,100),n=q(n,100),0===e)r=i=o=n;else{var s=n<.5?n*(1+e):n+e-n*e,l=2*n-s;r=a(l,s,t+1/3),i=a(l,s,t),o=a(l,s,t-1/3)}return{r:255*r,g:255*i,b:255*o}}(t.h,t.s,t.l),r=!0,i="hsl"),t.hasOwnProperty("a")&&(n=t.a));var o,a,s;return n=U(n),{ok:r,format:t.format||i,r:C(255,O(e.r,0)),g:C(255,O(e.g,0)),b:C(255,O(e.b,0)),a:n}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=x(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=x(this._r)),this._g<1&&(this._g=x(this._g)),this._b<1&&(this._b=x(this._b)),this._ok=r.ok,this._tc_id=b++};function T(t,e,n){t=q(t,255),e=q(e,255),n=q(n,255);var r,i,o=O(t,e,n),a=C(t,e,n),s=(o+a)/2;if(o==a)r=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case t:r=(e-n)/l+(e>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(k(r));return o}function $(t,e){e=e||6;for(var n=k(t).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/e;e--;)a.push(k({h:r,s:i,v:o})),o=(o+s)%1;return a}k.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this._a=U(t),this._roundA=x(100*this._a)/100,this},toHsv:function(){var t=P(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=P(this._r,this._g,this._b),e=x(360*t.h),n=x(100*t.s),r=x(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+r+"%)":"hsva("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=T(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=T(this._r,this._g,this._b),e=x(360*t.h),n=x(100*t.s),r=x(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+r+"%)":"hsla("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return j(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return E(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:x(this._r),g:x(this._g),b:x(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+x(this._r)+", "+x(this._g)+", "+x(this._b)+")":"rgba("+x(this._r)+", "+x(this._g)+", "+x(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:x(100*q(this._r,255))+"%",g:x(100*q(this._g,255))+"%",b:x(100*q(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+x(100*q(this._r,255))+"%, "+x(100*q(this._g,255))+"%, "+x(100*q(this._b,255))+"%)":"rgba("+x(100*q(this._r,255))+"%, "+x(100*q(this._g,255))+"%, "+x(100*q(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(W[j(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+E(this._r,this._g,this._b,this._a),n=e,r=this._gradientType?"GradientType = 1, ":"";t&&(n=k(t).toHex8String());return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(N,arguments)},darken:function(){return this._applyModification(I,arguments)},desaturate:function(){return this._applyModification(M,arguments)},saturate:function(){return this._applyModification(D,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(F,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(z,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination($,arguments)},splitcomplement:function(){return this._applyCombination(H,arguments)},triad:function(){return this._applyCombination(R,arguments)},tetrad:function(){return this._applyCombination(V,arguments)}},k.fromRatio=function(t,e){if("object"==c()(t)){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]="a"===r?t[r]:X(t[r]));t=n}return k(t,e)},k.equals=function(t,e){return!(!t||!e)&&k(t).toRgbString()==k(e).toRgbString()},k.random=function(){return k.fromRatio({r:S(),g:S(),b:S()})},k.mix=function(t,e,n){n=0===n?0:n||50;var r,i=k(t).toRgb(),o=k(e).toRgb(),a=n/100,s=2*a-1,l=o.a-i.a,c=1-(r=((r=s*l==-1?s:(s+l)/(1+s*l))+1)/2),u={r:o.r*r+i.r*c,g:o.g*r+i.g*c,b:o.b*r+i.b*c,a:o.a*a+i.a*(1-a)};return k(u)},k.readability=function(t,e){var n=k(t),r=k(e),i=n.toRgb(),o=r.toRgb(),a=n.getBrightness(),s=r.getBrightness(),l=Math.max(i.r,o.r)-Math.min(i.r,o.r)+Math.max(i.g,o.g)-Math.min(i.g,o.g)+Math.max(i.b,o.b)-Math.min(i.b,o.b);return{brightness:Math.abs(a-s),color:l}},k.isReadable=function(t,e){var n=k.readability(t,e);return n.brightness>125&&n.color>500},k.mostReadable=function(t,e){for(var n=null,r=0,i=!1,o=0;o125&&a.color>500,l=a.brightness/125*3+a.color/500;(s&&!i||s&&i&&l>r||!s&&!i&&l>r)&&(i=s,r=l,n=k(e[o]))}return n};var B=k.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},W=k.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(B);function U(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function q(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=C(e,O(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),w.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function G(t){return C(1,O(0,t))}function K(t){return parseInt(t,16)}function Y(t){return 1==t.length?"0"+t:""+t}function X(t){return t<=1&&(t=100*t+"%"),t}var J,Z,Q,tt=(Z="[\\s|\\(]+("+(J="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+J+")[,|\\s]+("+J+")\\s*\\)?",Q="[\\s|\\(]+("+J+")[,|\\s]+("+J+")[,|\\s]+("+J+")[,|\\s]+("+J+")\\s*\\)?",{rgb:new RegExp("rgb"+Z),rgba:new RegExp("rgba"+Q),hsl:new RegExp("hsl"+Z),hsla:new RegExp("hsla"+Q),hsv:new RegExp("hsv"+Z),hsva:new RegExp("hsva"+Q),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});window.tinycolor=k,t((function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()}))}(d);e.a=u.a.extend({template:function(){var t=this.ppfx;return'\n
\n
\n
\n
\n
\n
\n ')},inputClass:function(){var t=this.ppfx;return"".concat(t,"field ").concat(t,"field-color")},holderClass:function(){return"".concat(this.ppfx,"input-holder")},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,r=n.get("defaults"),i=Object(s.isUndefined)(t)?Object(s.isUndefined)(r)?"":r:t,o=this.getInputEl(),a=this.getColorEl(),l="none"!=i?i:"";o.value=i,a.get(0).style.backgroundColor=l,e.fromTarget&&(a.spectrum("set",l),this.noneColor="none"==i)},getColorEl:function(){if(!this.colorEl){var t,e=this,n=this.ppfx,r=this.model,o=d('
')),a=o.get(0).style,s=this.em&&this.em.config?this.em.config.el:"",l=this.em&&this.em.getConfig&&this.em.getConfig("colorPicker")||{},c=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},u=0;this.$el.find("[data-colorp-c]").append(o),o.spectrum(function(t){for(var e=1;e1&&(o=m(t),t=[t[t.length-1]]),t=t[0],(t=l(t))in r||(r[t]=[]),r[t].push({shortcut:i[a],scope:e,method:n,key:i[a],mods:o})}for(n in a)p[n]=!1;function g(){return o||"all"}function v(t){var e;return""==(e=(t=t.replace(/\s/g,"")).split(","))[e.length-1]&&(e[e.length-2]+=","),e}function m(t){for(var e=t.slice(0,t.length-1),n=0;n0,i)(!i[o]&&u(n.mods,+o)>-1||i[o]&&-1==u(n.mods,+o))&&(l=!1);(0!=n.mods.length||i[16]||i[18]||i[17]||i[91])&&!l||!1===n.method(t,n)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}(t)})),y(document,"keyup",(function(t){var e,n=t.keyCode,r=u(c,n);if(r>=0&&c.splice(r,1),93!=n&&224!=n||(n=91),n in i)for(e in i[n]=!1,a)a[e]==n&&(p[e]=!1)})),y(window,"focus",(function(){for(n in i)i[n]=!1;for(n in a)p[n]=!1}));var b=e.key;e.key=p,e.key.setScope=function(t){o=t||"all"},e.key.getScope=g,e.key.deleteScope=function(t){var e,n,i;for(e in r)for(n=r[e],i=0;i1&&(c=m(i),t=i[i.length-1]),t=l(t),void 0===e&&(e=g()),!r[t])return;for(o=0;o*\/]/.test(n)?x(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?x(null,n):t.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(t.current().toLowerCase())&&(e.tokenize=S),x("variable callee","variable")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),x("number","unit")):t.match(/^-[\w\\\-]*/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):t.match(/^\w+-/)?x("meta","meta"):void 0}function O(t){return function(e,n){for(var r,i=!1;null!=(r=e.next());){if(r==t&&!i){")"==t&&e.backUp(1);break}i=!i&&"\\"==r}return(r==t||!i&&")"!=t)&&(n.tokenize=null),x("string","string")}}function S(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=O(")"),x(null,"(")}function k(t,e,n){this.type=t,this.indent=e,this.prev=n}function T(t,e,n,r){return t.context=new k(n,e.indentation()+(!1===r?0:a),t.context),n}function P(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function j(t,e,n){return D[n.context.type](t,e,n)}function E(t,e,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return j(t,e,n)}function M(t){var e=t.current().toLowerCase();o=m.hasOwnProperty(e)?"atom":v.hasOwnProperty(e)?"keyword":"variable"}var D={top:function(t,e,n){if("{"==t)return T(n,e,"block");if("}"==t&&n.context.prev)return P(n);if(w&&/@component/i.test(t))return T(n,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return T(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return T(n,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return T(n,e,"at");if("hash"==t)o="builtin";else if("word"==t)o="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return T(n,e,"interpolation");if(":"==t)return"pseudo";if(y&&"("==t)return T(n,e,"parens")}return n.context.type},block:function(t,e,n){if("word"==t){var r=e.current().toLowerCase();return d.hasOwnProperty(r)?(o="property","maybeprop"):f.hasOwnProperty(r)?(o="string-2","maybeprop"):y?(o=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==t?"block":y||"hash"!=t&&"qualifier"!=t?D.top(t,e,n):(o="error","block")},maybeprop:function(t,e,n){return":"==t?T(n,e,"prop"):j(t,e,n)},prop:function(t,e,n){if(";"==t)return P(n);if("{"==t&&y)return T(n,e,"propBlock");if("}"==t||"{"==t)return E(t,e,n);if("("==t)return T(n,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)M(e);else if("interpolation"==t)return T(n,e,"interpolation")}else o+=" error";return"prop"},propBlock:function(t,e,n){return"}"==t?P(n):"word"==t?(o="property","maybeprop"):n.context.type},parens:function(t,e,n){return"{"==t||"}"==t?E(t,e,n):")"==t?P(n):"("==t?T(n,e,"parens"):"interpolation"==t?T(n,e,"interpolation"):("word"==t&&M(e),"parens")},pseudo:function(t,e,n){return"meta"==t?"pseudo":"word"==t?(o="variable-3",n.context.type):j(t,e,n)},documentTypes:function(t,e,n){return"word"==t&&l.hasOwnProperty(e.current())?(o="tag",n.context.type):D.atBlock(t,e,n)},atBlock:function(t,e,n){if("("==t)return T(n,e,"atBlock_parens");if("}"==t||";"==t)return E(t,e,n);if("{"==t)return P(n)&&T(n,e,y?"block":"top");if("interpolation"==t)return T(n,e,"interpolation");if("word"==t){var r=e.current().toLowerCase();o="only"==r||"not"==r||"and"==r||"or"==r?"keyword":c.hasOwnProperty(r)?"attribute":u.hasOwnProperty(r)?"property":h.hasOwnProperty(r)?"keyword":d.hasOwnProperty(r)?"property":f.hasOwnProperty(r)?"string-2":m.hasOwnProperty(r)?"atom":v.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(t,e,n){return"}"==t?E(t,e,n):"{"==t?P(n)&&T(n,e,y?"block":"top",!1):("word"==t&&(o="error"),n.context.type)},atBlock_parens:function(t,e,n){return")"==t?P(n):"{"==t||"}"==t?E(t,e,n,2):D.atBlock(t,e,n)},restricted_atBlock_before:function(t,e,n){return"{"==t?T(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(o="variable","restricted_atBlock_before"):j(t,e,n)},restricted_atBlock:function(t,e,n){return"}"==t?(n.stateArg=null,P(n)):"word"==t?(o="@font-face"==n.stateArg&&!p.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!g.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(t,e,n){return"word"==t?(o="variable","keyframes"):"{"==t?T(n,e,"top"):j(t,e,n)},at:function(t,e,n){return";"==t?P(n):"{"==t||"}"==t?E(t,e,n):("word"==t?o="tag":"hash"==t&&(o="builtin"),"at")},interpolation:function(t,e,n){return"}"==t?P(n):"{"==t||";"==t?E(t,e,n):("word"==t?o="variable":"variable"!=t&&"("!=t&&")"!=t&&(o="error"),"interpolation")}};return{startState:function(t){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new k(r?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||C)(t,e);return n&&"object"==typeof n&&(i=n[1],n=n[0]),o=n,"comment"!=i&&(e.state=D[e.state](i,t,e)),o},indent:function(t,e){var n=t.context,r=e&&e.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-a)):i=(n=n.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],r=e(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=e(i),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=e(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],c=e(l),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],h=e(u),d=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=e(d),p=e(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],m=e(v),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=e(y),w=n.concat(i).concat(a).concat(l).concat(u).concat(d).concat(v).concat(y);function x(t,e){for(var n,r=!1;null!=(n=t.next());){if(r&&"/"==n){e.tokenize=null;break}r="*"==n}return["comment","comment"]}t.registerHelper("hintWords","css",w),t.defineMIME("text/css",{documentTypes:r,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:b,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=x,x(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:f,colorKeywords:m,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=x,x(t,e)):["operator","operator"]},":":function(t){return!!t.match(/\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:f,colorKeywords:m,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=x,x(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:o,mediaFeatures:s,propertyKeywords:h,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=x,x(t,e))}},name:"css",helperType:"gss"})}(n(10))},function(t,e,n){"use strict";n.r(e),e.default={run:function(t){t.DomComponents.clear(),t.CssComposer.clear()}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(3),o=n(17);e.default={run:function(t){Object(r.bindAll)(this,"onKeyUp","enableDragger","disableDragger"),this.editor=t,this.canvasModel=this.canvas.getCanvasView().model,this.toggleMove(1)},stop:function(t){this.toggleMove(),this.disableDragger()},onKeyUp:function(t){" "===Object(i.f)(t)&&this.editor.stopCommand(this.id)},enableDragger:function(t){this.toggleDragger(1,t)},disableDragger:function(t){this.toggleDragger(0,t)},toggleDragger:function(t,e){var n=this.canvasModel,r=this.em,i=this.dragger,a=t?"add":"remove";this.getCanvas().classList[a]("".concat(this.ppfx,"is__grabbing")),i||(i=new o.a({getPosition:function(){return{x:n.get("x"),y:n.get("y")}},setPosition:function(t){var e=t.x,r=t.y;n.set({x:e,y:r})},onStart:function(t,e){r.trigger("canvas:move:start",e)},onDrag:function(t,e){r.trigger("canvas:move",e)},onEnd:function(t,e){r.trigger("canvas:move:end",e)}}),this.dragger=i),t?i.start(e):i.stop()},toggleMove:function(t){var e=this.ppfx,n=t?"add":"remove",r=t?"on":"off",o={on:i.s,off:i.r},a=this.getCanvas(),s=["".concat(e,"is__grab")];!t&&s.push("".concat(e,"is__grabbing")),s.forEach((function(t){return a.classList[n](t)})),o[r](document,"keyup",this.onKeyUp),o[r](a,"mousedown",this.enableDragger),o[r](document,"mouseup",this.disableDragger)}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r),o=n(0);e.default={run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.component||t.getSelectedAll();return r=Object(o.isArray)(r)?i()(r):[r],t.select(null),r.forEach((function(t){if(t&&t.get("removable")){if(t){var e=t.collection;t.trigger("component:destroy"),e&&e.remove(t)}}else console.warn("The element is not removable",t)})),r}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(0),a=n(17);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{};Object(o.bindAll)(this,"setPosition","onStart","onDrag","onEnd","getPosition","getGuidesStatic","renderGuide","getGuidesTarget");var i=r.target,s=r.event,c=r.mode,u=r.dragger,h=void 0===u?{}:u,d=i.getEl(),f=l({doc:d.ownerDocument,onStart:this.onStart,onEnd:this.onEnd,onDrag:this.onDrag,getPosition:this.getPosition,setPosition:this.setPosition,guidesStatic:function(){return n.guidesStatic},guidesTarget:function(){return n.guidesTarget}},h);this.setupGuides(),this.opts=r,this.editor=t,this.em=t.getModel(),this.target=i,this.isTran="translate"==c,this.guidesContainer=this.getGuidesContainer(),this.guidesTarget=this.getGuidesTarget(),this.guidesStatic=this.getGuidesStatic(),window.guidesTarget=this.guidesTarget;var p=this.dragger;return p?p.setOptions(f):(p=new a.a(f),this.dragger=p),s&&p.start(s),this.toggleDrag(1),p},stop:function(){this.toggleDrag()},setupGuides:function(){(this.guides||[]).forEach((function(t){var e=t.guide;e&&e.parentNode.removeChild(e)})),this.guides=[]},getGuidesContainer:function(){var t=this,e=this.guidesEl;if(!e){var n=this.editor,r=this.em,i=this.opts,o=n.getConfig("stylePrefix"),a=document.createElement("div"),s=document.createElement("div"),l='
\n
\n
');(e=document.createElement("div")).className="".concat(o,"guides"),a.className="".concat(o,"guide-info ").concat(o,"guide-info__x"),s.className="".concat(o,"guide-info ").concat(o,"guide-info__y"),a.innerHTML=l,s.innerHTML=l,e.appendChild(a),e.appendChild(s),n.Canvas.getToolsEl().appendChild(e),this.guidesEl=e,this.elGuideInfoX=a,this.elGuideInfoY=s,this.elGuideInfoContentX=a.querySelector(".".concat(o,"guide-info__content")),this.elGuideInfoContentY=s.querySelector(".".concat(o,"guide-info__content")),r.on("canvas:update",(function(){t.updateGuides(),i.debug&&t.guides.forEach((function(e){return t.renderGuide(e)}))}))}return e},getGuidesStatic:function(){var t=this,e=[],n=this.target.getEl(),r=n.parentNode,i=void 0===r?{}:r;return Object(o.each)(i.children,(function(r){return e=e.concat(n!==r?t.getElementGuides(r):[])})),e.concat(this.getElementGuides(i))},getGuidesTarget:function(){return this.getElementGuides(this.target.getEl())},updateGuides:function(t){var e=this.editor;(t||this.guides).forEach((function(t){var n=t.origin,r=e.Canvas.getElementPos(n),i=r.top,o=r.height,a=r.left,s=r.width;switch(t.type){case"t":return t.y=i;case"b":return t.y=i+o;case"l":return t.x=a;case"r":return t.x=a+s;case"x":return t.x=a+s/2;case"y":return t.y=i+o/2}}))},getGuidePosUpdate:function(t,e){var n={},r=e.top,i=e.height,o=e.left,a=e.width;switch(t.type){case"t":n.y=r;break;case"b":n.y=r+i;break;case"l":n.x=o;break;case"r":n.x=o+a;break;case"x":n.x=o+a/2;break;case"y":n.y=r+i/2}return n},renderGuide:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.guide||document.createElement("div"),n=this.editor.Canvas,r=n.getRect(),i=r.topScroll,o=r.top,a=n.getCanvasView().getFrameOffset().top,s="px",l=t.active?2:1,c=e.children[0];return e.style="position: absolute; background-color: ".concat(t.active?"green":"red",";"),e.children.length||((c=document.createElement("div")).style="position: absolute; color: red; padding: 5px; top: 0; left: 0;",e.appendChild(c)),t.y?(e.style.width="100%",e.style.height="".concat(l).concat(s),e.style.top="".concat(t.y).concat(s),e.style.left=0):(e.style.width="".concat(l).concat(s),e.style.height="100%",e.style.left="".concat(t.x).concat(s),e.style.top="".concat(i-a+o).concat(s)),!t.guide&&this.guidesContainer.appendChild(e),e},getElementGuides:function(t){var e=this,n=this.editor,r=this.opts,i=n.Canvas.getElementPos(t),o=i.top,a=i.height,s=i.left,c=i.width,u=[{type:"t",y:o},{type:"b",y:o+a},{type:"l",x:s},{type:"r",x:s+c},{type:"x",x:s+c/2},{type:"y",y:o+a/2}].map((function(i){return l({},i,{origin:t,originRect:n.Canvas.getElementPos(t),guide:r.debug&&e.renderGuide(i)})}));return u.forEach((function(t){return e.guides.push(t)})),u},getTranslate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",n=0;return(t||"").split(" ").forEach((function(t){var r=t.trim(),i="translate".concat(e.toUpperCase(),"(");0===r.indexOf(i)&&(n=parseFloat(r.replace(i,"")))})),n},setTranslate:function(t,e,n){var r="translate".concat(e.toUpperCase(),"("),i="".concat(r).concat(n,")"),o=(t||"").split(" ").map((function(t){return 0===t.trim().indexOf(r)&&(t=i),t})).join(" ");return o.indexOf(r)<0&&(o+=" ".concat(i)),o},getPosition:function(){var t=this.target,e=this.isTran,n=t.getStyle(),r=n.left,i=n.top,o=n.transform,a=0,s=0;return e?(a=this.getTranslate(o),s=this.getTranslate(o,"y")):(a=parseFloat(r),s=parseFloat(i)),{x:a,y:s}},setPosition:function(t){var e=t.x,n=t.y,r=t.end,i=t.position,a=t.width,s=t.height,l=this.target,c=this.isTran,u=r?"":1,h="".concat(e).concat("px"),d="".concat(n).concat("px");if(c){var f=l.getStyle().transform||"";return f=this.setTranslate(f,"x",h),f=this.setTranslate(f,"y",d),l.addStyle({transform:f,en:u},{avoidStore:!r})}var p={position:i,width:a,height:s},g={left:h,top:d,en:u};Object(o.keys)(p).forEach((function(t){var e=p[t];e&&(g[t]=e)})),l.addStyle(g,{avoidStore:!r})},onStart:function(){var t=this.target,e=this.editor,n=this.isTran,r=this.opts.center,i=e.Canvas,o=t.getStyle();if(!n&&"absolute"!==o.position){var a=i.offset(t.getEl()),s=a.left,l=a.top,c=a.width,u=a.height;if(r){var h=i.getMouseRelativeCanvas(event);s=h.x,l=h.y}this.setPosition({x:s,y:l,width:"".concat(c,"px"),height:"".concat(u,"px"),position:"absolute"})}},onDrag:function(){var t=this,e=this.guidesTarget,n=this.opts,r=n.onDrag;this.updateGuides(e),n.debug&&e.forEach((function(e){return t.renderGuide(e)})),n.guidesInfo&&this.renderGuideInfo(e.filter((function(t){return t.active}))),r&&r.apply(void 0,arguments)},onEnd:function(){var t=this.editor,e=this.opts,n=this.id,r=e.onEnd;r&&r.apply(void 0,arguments),t.stopCommand(n),this.hideGuidesInfo()},hideGuidesInfo:function(){var t=this;["X","Y"].forEach((function(e){var n=t["elGuideInfo".concat(e)];n&&(n.style.display="none")}))},renderGuideInfo:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=this.guidesStatic,r=this.editor;this.hideGuidesInfo(),e.forEach((function(e){var i=e.origin,a=e.x,s=r.Canvas.getElementPos(i),l=Object(o.isUndefined)(a)?"y":"x",c="y"===l,u=s[c?"left":"top"],h=s.rect[c?"left":"top"],d=c?u+s.width:u+s.height,f=c?h+s.rect.width:h+s.rect.height,p=t["elGuideInfo".concat(l.toUpperCase())],g=t["elGuideInfoContent".concat(l.toUpperCase())],v=p.style,m=n.filter((function(t){return t[l]===e[l]})).map((function(t){var e=t.originRect,n=e.left,r=e.width,i=e.top,o=e.height,a=c?n+r:i+o;return{gap:a0})).sort((function(t,e){return t.gap-e.gap})).map((function(t){return t.guide}))[0];if(m){var y=m.originRect,b=y.left,w=y.width,x=y.top,C=y.height,O=y.rect,S=c?b2&&void 0!==arguments[2]?arguments[2]:{};if(t.Canvas.hasFocus()||n.force){var r=[];t.getSelectedAll().forEach((function(t){for(var e=t.parent();e&&!e.get("selectable");)e=e.parent();e&&r.push(e)})),r.length&&t.select(r)}}}},function(t,e,n){"use strict";n.r(e),e.default={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.collection,r=n.indexOf(t),i=n.at(r+1);e.push(i||t)})),e.length&&t.select(e)}}}},function(t,e,n){"use strict";n.r(e),e.default={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.collection,r=n.indexOf(t),i=n.at(r-1);e.push(i&&r-1>=0?i:t)})),e.length&&t.select(e)}}}},function(t,e,n){"use strict";n.r(e);var r=n(0);e.default={run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.target,o=t.DomComponents,a=i.get("type"),s=o.getWrapper().find('[data-gjs-type="'.concat(a,'"]')).length,l=[];if(!s){var c=t.CssComposer.getAll(),u=i.get("style-signature");u=Object(r.isArray)(u)?u:[u],c.forEach((function(t){var e=t.selectorsToString();u.forEach((function(n){n&&e.indexOf(n)>=0&&l.push(t)}))})),c.remove(l)}return l}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r);e.default={run:function(t){var e=t.getModel(),n=i()(t.getSelectedAll());n.length&&e.set("clipboard",n)}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(1),o=n.n(i),a=n(12),s=o.a.$;e.default=Object(r.extend)({},a.default,{init:function(t){Object(r.bindAll)(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=s(t.target);e.data("model").get("removable")&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),s(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=s(t.target);e.data("model").get("removable")&&(e.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html("Remove "+t.getName())}})},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r).a.$;e.default={run:function(t,e){var n=this;arguments.length>2&&void 0!==arguments[2]&&arguments[2];e&&e.set&&e.set("active",0);var r=t.getConfig(),o=t.Modal,a=r.stylePrefix;if(this.cm=t.CodeManager||null,!this.$editors){var s=this.buildEditor("htmlmixed","hopscotch","HTML"),l=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=s.el,this.cssEditor=l.el;var c=i('
'));c.append(s.$el).append(l.$el),this.$editors=c}o.open({title:r.textViewCode,content:this.$editors}).getModel().once("change:open",(function(){return t.stopCommand(n.id)})),this.htmlEditor.setContent(t.getHtml()),this.cssEditor.setContent(t.getCss())},stop:function(t){var e=t.Modal;e&&e.close()},buildEditor:function(t,e,n){var r=document.createElement("textarea");!this.codeMirror&&(this.codeMirror=this.cm.getViewer("CodeMirror"));var i=this.codeMirror.clone().set({label:n,codeName:t,theme:e,input:r}),o=new this.cm.EditorView({model:i,config:this.cm.getConfig()}).render().$el;return i.init(r),{el:i,$el:o}}}},function(t,e,n){"use strict";n.r(e);var r=n(0);e.default={isEnabled:function(){var t=document;return t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement?1:0},enable:function(t){var e="";return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?(e="webkit",t.webkitRequestFullscreen()):t.mozRequestFullScreen?(e="moz",t.mozRequestFullScreen()):t.msRequestFullscreen?t.msRequestFullscreen():console.warn("Fullscreen not supported"),e},disable:function(){var t=document;this.isEnabled()&&(t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen())},fsChanged:function(t,e){var n=(t||"")+"fullscreenchange";this.isEnabled()||(this.stop(null,this.sender),document.removeEventListener(n,this.fsChanged))},run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.sender=e;var i=n.target,o=Object(r.isElement)(i)?i:document.querySelector(i),a=this.enable(o||t.getContainer());this.fsChanged=this.fsChanged.bind(this,a),document.addEventListener(a+"fullscreenchange",this.fsChanged),t.trigger("change:canvasOffset")},stop:function(t,e){e&&e.set&&e.set("active",!1),this.disable(),t&&t.trigger("change:canvasOffset")}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(1),o=n.n(i),a=n(3),s=n(12),l=n(24),c=o.a.$;e.default=Object(r.extend)({},l.default,s.default,{init:function(t){s.default.init.apply(this,arguments),Object(r.bindAll)(this,"initSorter","rollback","onEndMove"),this.opt=t,this.hoverClass=this.ppfx+"highlighter-warning",this.badgeClass=this.ppfx+"badge-warning",this.noSelClass=this.ppfx+"no-select"},enable:function(){for(var t=arguments.length,e=new Array(t),n=0;n2&&void 0!==arguments[2]?arguments[2]:{},i=t.Modal,o=t.AssetManager,a=o.getConfig(),s=o.getContainer(),l=r.modalTitle||t.t("assetManager.modalTitle")||"",c=r.types,u=r.accept;if(o.setTarget(r.target),o.onClick(r.onClick),o.onDblClick(r.onDblClick),o.onSelect(r.onSelect),!this.rendered||c){var h=o.getAll().filter((function(t){return 1}));c&&c.length&&(h=h.filter((function(t){return-1!==c.indexOf(t.get("type"))}))),o.render(h),this.rendered=1}if(u){var d=s.querySelector("input#".concat(a.stylePrefix,"uploadFile"));d&&d.setAttribute("accept",u)}return i.open({title:l,content:s}).getModel().once("change:open",(function(){return t.stopCommand(n.id)})),this},stop:function(t){return t.Modal.close(),this}}},function(t,e,n){"use strict";n.r(e),e.default={run:function(t,e){var n=t.BlockManager,r=t.Panels;if(!this.blocks){n.render();var i="views-container",o=document.createElement("div"),a=r.getPanel(i)||r.addPanel({id:i});o.appendChild(n.getContainer()),a.set("appendContent",o).trigger("change:appendContent"),this.blocks=o}this.blocks.style.display="block"},stop:function(){var t=this.blocks;t&&(t.style.display="none")}}},function(t,e,n){"use strict";n.r(e);var r=n(1);n.n(r).a.$;e.default={run:function(t){var e=t.LayerManager,n=t.Panels;if(!this.layers){var r="views-container",i=document.createElement("div"),o=n.getPanel(r)||n.addPanel({id:r});i.appendChild(e.render()),o.set("appendContent",i).trigger("change:appendContent"),this.layers=i}this.layers.style.display="block"},stop:function(){var t=this.layers;t&&(t.style.display="none")}}},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r).a.$;e.default={run:function(t,e){if(this.sender=e,!this.$cn){var n=t.getConfig(),r=t.Panels;this.$cn=i("
"),this.$cn2=i("
"),this.$cn.append(this.$cn2);var o=t.DeviceManager;if(o&&n.showDevices)r.addPanel({id:"devices-c"}).set("appendContent",o.render()).trigger("change:appendContent");var a=t.SelectorManager;a&&this.$cn2.append(a.render([])),this.$cn2.append(t.StyleManager.render());var s=t.StyleManager.getConfig().stylePrefix;this.$header=i('
').concat(t.t("styleManager.empty"),"
")),this.$cn.append(this.$header),r.getPanel("views-container")?this.panel=r.getPanel("views-container"):this.panel=r.addPanel({id:"views-container"}),this.panel.set("appendContent",this.$cn).trigger("change:appendContent"),this.target=t.editor,this.listenTo(this.target,"component:toggled",this.toggleSm)}this.toggleSm()},toggleSm:function(){var t=this.target,e=this.sender;if(!e||!e.get||e.get("active")){var n=t.get("SelectorManager").getConfig().componentFirst,r=t.getSelectedAll().length;1===r||r>1&&n?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show())}},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r).a.$;e.default={run:function(t,e){this.sender=e;var n=t.getModel(),r=t.Config.stylePrefix,o=t.TraitManager;if(!this.$cn){var a=o.getTraitsViewer(),s=o.getConfig();this.$cn=i("
"),this.$cn2=i("
"),this.$cn.append(this.$cn2),this.$header=i("
").append('
').concat(n.t("traitManager.empty"),"
")),this.$cn.append(this.$header),this.$cn2.append('
').concat(n.t("traitManager.label"),"
")),this.$cn2.append(a.render().el);var l=t.Panels;(l.getPanel("views-container")?l.getPanel("views-container"):l.addPanel({id:"views-container"})).set("appendContent",this.$cn.get(0)).trigger("change:appendContent"),this.target=t.getModel(),this.listenTo(this.target,"component:toggled",this.toggleTm)}this.toggleTm()},toggleTm:function(){var t=this.sender;t&&t.get&&!t.get("active")||(1===this.target.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";n.r(e);var r=n(0);e.default={run:function(t){var e=t.getModel().get("clipboard"),n=t.getSelected();e&&n&&(t.getSelectedAll().forEach((function(n){if(n){var i,o=n.collection,a=o.indexOf(n)+1,s=e.filter((function(t){return t.get("copyable")}));i=Object(r.contains)(e,n)&&n.get("copyable")?o.add(n.clone(),{at:a}):o.add(s.map((function(t){return t.clone()})),{at:a}),(i=Object(r.isArray)(i)?i:[i]).forEach((function(e){return t.trigger("component:paste",e)}))}})),n.emitUpdate())}}},function(t,e,n){"use strict";n.r(e);var r=n(0);e.default={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanelsEl()),this.panels},tglPointers:function(t,e){var n=t.Canvas.getBody().querySelectorAll(".".concat(this.ppfx,"no-pointer"));Object(r.each)(n,(function(t){return t.style.pointerEvents=e?"":"all"}))},run:function(t,e){var n=this;this.sender=e,t.stopCommand("sw-visibility"),t.getModel().stopDefault();var r=this.getPanels(t),i=t.Canvas.getElement(),o=t.getEl(),a=t.Config.stylePrefix;if(!this.helper){var s=document.createElement("span");s.className="".concat(a,"off-prv fa fa-eye-slash"),o.appendChild(s),s.onclick=function(){return n.stopCommand()},this.helper=s}this.helper.style.display="inline-block",this.tglPointers(t),r.style.display="none";var l=i.style;l.width="100%",l.height="100%",l.top="0",l.left="0",l.padding="0",l.margin="0",t.refresh()},stop:function(t){var e=this.sender,n=void 0===e?{}:e;n.set&&n.set("active",0);var r=this.getPanels(t);t.runCommand("sw-visibility"),t.getModel().runDefault(),r.style.display="",t.Canvas.getElement().setAttribute("style",""),this.helper&&(this.helper.style.display="none"),t.refresh(),this.tglPointers(t,1)}}},function(t,e,n){"use strict";n.r(e),e.default={run:function(t,e,n){var r=n||{},i=r.el||"",o=t.Canvas,a=this.canvasResizer,s=r.options||{},l=o.getCanvasView();return s.appendTo=o.getResizerEl(),s.prefix=t.getConfig().stylePrefix,s.posFetcher=l.getElementPos.bind(l),s.mousePosFetcher=o.getMouseRelativePos,a&&!r.forceNew||(this.canvasResizer=t.Utils.Resizer.init(s),a=this.canvasResizer),a.setOptions(s),a.blur(),a.focus(i),a},stop:function(){var t=this.canvasResizer;t&&t.blur()}}},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r),o=n(3),a=i.a.$;e.default={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,n){var r=n||{},i=r.state||"",s=t.getConfig(),l=this.em.getZoomDecimal(),c=r.el||"";if(!s.showOffsets||Object(o.o)(c)||!s.showOffsetsSelected&&"Fixed"==i)t.stopCommand(this.id,n);else{var u=t.Canvas,h=r.elPos||u.getElementPos(c),d=window.getComputedStyle(c),f=this.ppfx,p=i+"State",g=u[this.getOffsetMethod(i)]();g.style.display="block";var v=this["marginT"+i],m=this["marginB"+i],y=this["marginL"+i],b=this["marginR"+i],w=this["padT"+i],x=this["padB"+i],C=this["padL"+i],O=this["padR"+i];if(!this[p]){var S=i.toLowerCase(),k=S+"margin-v",T=S+"padding-v",P=a('
')).get(0),j=a('
')).get(0),E=f+T+"-el",M="".concat(f+k+"-el"," ").concat(f+k),D="".concat(E," ").concat(f+T);v=a('
')).get(0),m=a('
')).get(0),y=a('
')).get(0),b=a('
')).get(0),w=a('
')).get(0),x=a('
')).get(0),C=a('
')).get(0),O=a('
')).get(0),this["marginT"+i]=v,this["marginB"+i]=m,this["marginL"+i]=y,this["marginR"+i]=b,this["padT"+i]=w,this["padB"+i]=x,this["padL"+i]=C,this["padR"+i]=O,P.appendChild(v),P.appendChild(m),P.appendChild(y),P.appendChild(b),j.appendChild(w),j.appendChild(x),j.appendChild(C),j.appendChild(O),g.appendChild(P),g.appendChild(j),this[p]="1"}var A=parseFloat(d.marginLeft.replace("px",""))*l,L=parseFloat(d.marginRight.replace("px",""))*l,N=parseFloat(d.marginTop.replace("px",""))*l,I=parseFloat(d.marginBottom.replace("px",""))*l,F=v.style,_=m.style,R=y.style,V=b.style,H=w.style,z=x.style,$=C.style,B=O.style,W=parseFloat(h.left),U=parseFloat(d.width)*l+"px";F.height=N+"px",F.width=U,F.top=h.top-N+"px",F.left=W+"px",_.height=I+"px",_.width=U,_.top=h.top+h.height+"px",_.left=W+"px";var q=h.height+N+I+"px",G=h.top-N+"px";R.height=q,R.width=A+"px",R.top=G,R.left=W-A+"px",V.height=q,V.width=L+"px",V.top=G,V.left=W+h.width+"px";var K=parseFloat(d.paddingTop)*l;H.height=K+"px",H.width=U,H.top=h.top+"px",H.left=W+"px";var Y=parseFloat(d.paddingBottom)*l;z.height=Y+"px",z.width=U,z.top=h.top+h.height-Y+"px",z.left=W+"px";var X=h.height-Y-K+"px",J=h.top+K+"px";$.height=X,$.width=parseFloat(d.paddingLeft)*l+"px",$.top=J,$.left=h.left+"px";var Z=parseFloat(d.paddingRight)*l;B.height=X,B.width=Z+"px",B.top=J,B.left=h.left+h.width-Z+"px"}},stop:function(t,e,n){var r=(n||{}).state||"",i=this.getOffsetMethod(r);t.Canvas[i]().style.display="none"}}},function(t,e,n){"use strict";n.r(e),e.default={run:function(t){t.Canvas.getBody().className=this.ppfx+"dashed"},stop:function(t){t.Canvas.getBody().className=""}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(0),a={stylePrefix:"sm-",sectors:[],appendTo:"",hideNotStylable:!0,highlightChanged:!0,highlightComputed:!0,showComputed:!0,clearProperties:0,avoidComputed:["width","height"]},s=n(1),l=n.n(s),c=n(22),u=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0,r=t.length;n\n \n <%= label %>\n
'),events:{"click [data-sector-title]":"toggle"},initialize:function(t){this.config=t.config||{},this.em=this.config.em,this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.caretR="fa-caret-right",this.caretD="fa-caret-down";var e=this.model;this.listenTo(e,"change:open",this.updateOpen),this.listenTo(e,"updateVisibility",this.updateVisibility),this.listenTo(e,"destroy remove",this.remove)},updateVisibility:function(){var t;this.model.get("properties").each((function(e){e.get("visible")&&(t=1)})),this.el.style.display=t?"block":"none"},updateOpen:function(){this.model.get("open")?this.show():this.hide()},show:function(){this.$el.addClass(this.pfx+"open"),this.getPropertiesEl().style.display="",this.$caret.removeClass(this.caretR).addClass(this.caretD)},hide:function(){this.$el.removeClass(this.pfx+"open"),this.getPropertiesEl().style.display="none",this.$caret.removeClass(this.caretD).addClass(this.caretR)},getPropertiesEl:function(){return this.$el.find(".".concat(this.pfx,"properties")).get(0)},toggle:function(t){var e=this.model.get("open")?0:1;this.model.set("open",e)},render:function(){var t=this.pfx,e=this.model,n=this.em,r=this.$el,i=e.attributes,o=i.id,a=i.name,s=n&&n.t("styleManager.sectors.".concat(o))||a;return r.html(this.template({pfx:t,label:s})),this.$caret=r.find("#".concat(t,"caret")),this.renderProperties(),r.attr("class","".concat(t,"sector ").concat(t,"sector__").concat(o," no-select")),this.updateOpen(),this},renderProperties:function(){var t=this.model.get("properties");if(t){var e=new g.default({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}});function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function y(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=t.config||{};this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.target=t.target||{},this.config=e;var n={};Object(o.extend)(n,l.a.Events);var r=document.body,i=document.createElement("el-".concat((new Date).getTime()));r.appendChild(i),n.computedDefault=y({},window.getComputedStyle(i)),r.removeChild(i),this.propTarget=n;var a=this.collection,s="component:toggled component:update:classes change:state change:device";this.listenTo(a,"add",this.addTo),this.listenTo(a,"reset",this.render),this.listenTo(this.target,s,this.targetUpdated)},addTo:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.addToCollection(t,null,n)},toggleStateCls:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;t.forEach((function(t){var n=t.getEl();n&&n.classList[e?"add":"remove"]("hc-state")}))},targetUpdated:function(t){var e=this.target,n=this.propTarget,r=e.getSelectedAll(),i=e.getSelected(),o=t&&t.toHTML?t:i;if(o&&this.toggleStateCls([o]),i){var a=e.get("Config").devicePreviewMode?"":e.get("state"),s=e.get("SelectorManager").getConfig().componentFirst,l=i.getEl();if(n.helper=null,n.targets=null,l&&Object(f.n)(l)){var c=a?":".concat(a):null;n.computed=window.getComputedStyle(l,c)}i=e.get("StyleManager").getModelToStyle(i),a&&(!function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.get("CssComposer"),i=r.getAll(),o=r.getClassRule("hc-state");o?(i.remove(o),i.add(o)):o=r.setClassRule("hc-state"),o.set("important",1),o.setStyle(t),n.helper=o}(i.getStyle()),this.toggleStateCls(r,1)),n.model=i,s&&(n.targets=r),n.trigger("update")}},setTarget:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.target,r=Object(o.isArray)(t)?t:[t],i=e.targetIsClass,a=e.stylable,s=[];r.forEach((function(t){var e=t;if(Object(o.isString)(t)){var r,l=n.get("CssComposer").getAll();i&&(r=l.filter((function(e){return e.get("selectors").getFullString()===t}))[0]),r||(r=l.filter((function(e){return e.get("selectorsAdd")===t}))[0]),r||(r=l.add({selectors:[],selectorsAdd:t})),a&&r.set({stylable:a}),e=r}s.push(e)}));var l=this.propTarget;return l.targets=s,l.trigger("update"),s},addToCollection:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.pfx,i=this.target,o=this.propTarget,a=this.config,s=this.el,l=e||s,c=new v({model:t,id:"".concat(r).concat(t.get("id")),name:t.get("name"),properties:t.get("properties"),target:i,propTarget:o,config:a}).render().el;return Object(p.a)(l,c,n.at),c},render:function(){var t=this,e=document.createDocumentFragment(),n=this.$el,r=this.pfx,i=this.ppfx;return n.empty(),this.collection.each((function(n){return t.addToCollection(n,e)})),n.append(e),n.addClass("".concat(r,"sectors ").concat(i,"one-bg ").concat(i,"two-color")),this}});function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function x(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{},i=this.getSector(t);return i||(n.id=t,i=e.add(n,r)),i},getSector:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.where({id:t})[0];return!r&&n.warn&&this._logNoSector(t),r},removeSector:function(t){return this.getSectors().remove(this.getSector(t,{warn:1}))},getSectors:function(){return e},addProperty:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getSector(t,{warn:1}),i=null;return r&&(i=r.get("properties").add(e,n)),i},getProperty:function(t,e){var n=this.getSector(t,{warn:1}),r=null;return n&&(r=1==(r=n.get("properties").where({property:e})).length?r[0]:r),r},removeProperty:function(t,e){var n=this.getProperties(t);return n&&n.remove(this.getProperty(t,e))},getProperties:function(t){var e=null,n=this.getSector(t,{warn:1});return n&&(e=n.get("properties")),e},getModelToStyle:function(t){var e=r.em,n=t.get("classes"),i=t.getId();if(e){var o,a=e.getConfig(),s=e.get("UndoManager"),l=e.get("CssComposer"),c=e.get("SelectorManager"),u=c?c.getConfig():{},h=a.devicePreviewMode?"":e.get("state"),d=n.getStyleable(),f=d.length,p={state:h};if(s.stop(),f&&!u.componentFirst){var g=e.getCurrentMedia();(o=l.get(d,h,g))||(o=l.add(d,h,g))}else a.avoidInlineStyle&&(!(o=l.getIdRule(i,p))&&(o=l.setIdRule(i,{},p)),t.is("wrapper")&&o.set("wrapper",1));o&&(t=o),s.start()}return t},addType:function(e,n){t.addType(e,n)},getType:function(e){return t.getType(e)},getTypes:function(){return t.getTypes()},createType:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.model,i=void 0===n?{}:n,o=e.view,a=void 0===o?{}:o,s=this.getType(t);if(s)return new s.view(x({model:new s.model(i),config:r},a))},setTarget:function(t,e){return n.setTarget(t,e)},getEmitter:function(){return n.propTarget},render:function(){return n.render().el},_logNoSector:function(t){var e=this.em;e&&e.logWarning("'".concat(t,"' sector not found"))}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o={stylePrefix:"",appendTo:"",sortable:1,hidable:1,hideTextnode:1,root:"",showWrapper:1,showHover:1,scrollCanvas:{behavior:"smooth",block:"nearest"},scrollLayers:{behavior:"auto",block:"nearest"},highlightHover:1},a=n(31),s=n(0);function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return(n=c({},o,{},e)).stylePrefix=e.pStylePrefix,t=n.em,this},getConfig:function(){return n},onLoad:function(){e=new a.a({level:0,config:n,opened:n.opened||{},model:t.get("DomComponents").getWrapper()}),t&&t.on("component:selected",this.componentChanged),this.componentChanged()},postRender:function(){var t=n.appendTo,e=n.root;(e&&this.setRoot(e),t)&&(Object(s.isElement)(t)?t:document.querySelector(t)).appendChild(this.render())},setRoot:function(t){return e.setRoot(t),this},getRoot:function(){return e.model},getAll:function(){return e},componentChanged:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!r.fromLayers){var i=t.get("opened"),o=t.getSelected(),a=n.scrollLayers,s=o&&o.collection?o.collection.parent:null;for(var l in i)i[l].set("open",0);for(;s;)s.set("open",1),i[s.cid]=s,s=s.collection?s.collection.parent:null;if(o&&a){var c=o.viewLayer&&o.viewLayer.el;c&&c.scrollIntoView(a)}}},render:function(){return e.render().el}}}},function(t,e,n){var r,i,o; -/*! - * Backbone.Undo.js v0.2 - * - * Copyright (c)2013 Oliver Sartun - * Released under the MIT License - * - * Documentation and full license available at - * https://github.com/osartun/Backbone.Undo.js - */i=[n(0),n(1)],void 0===(o="function"==typeof(r=function(t,e){var n=Array.prototype.slice;function r(t,e,n){return n.length<=4?t.call(e,n[0],n[1],n[2],n[3]):t.apply(e,n)}function i(t,e){return n.call(t,e)}function o(e,n){return null!=e&&(t.isArray(n)||(n=i(arguments,1)),t.all(n,(function(t){return t in e})))}var a,s,l=(a=!1,s=-1,function(){return a||(s++,a=!0,t.defer((function(){a=!1}))),s});function c(){this.registeredObjects=[],this.cidIndexes=[]}function u(e,n,r,i){for(var o,a=0,s=n.length;at.maximumStackLength&&(t.shift(),t.pointer--)}}}c.prototype={isRegistered:function(e){return e&&e.cid?this.registeredObjects[e.cid]:t.contains(this.registeredObjects,e)},register:function(t){return!this.isRegistered(t)&&(t&&t.cid?(this.registeredObjects[t.cid]=t,this.cidIndexes.push(t.cid)):this.registeredObjects.push(t),!0)},unregister:function(e){if(this.isRegistered(e)){if(e&&e.cid)delete this.registeredObjects[e.cid],this.cidIndexes.splice(t.indexOf(this.cidIndexes,e.cid),1);else{var n=t.indexOf(this.registeredObjects,e);this.registeredObjects.splice(n,1)}return!0}return!1},get:function(){return t.map(this.cidIndexes,(function(t){return this.registeredObjects[t]}),this).concat(this.registeredObjects)}};var p={add:{undo:function(t,e,n,r){t.remove(n,r)},redo:function(t,e,n,r){r.index&&(r.at=r.index),t.add(n,r)},on:function(e,n,r){return{object:n,before:void 0,after:e,options:t.clone(r)}}},remove:{undo:function(t,e,n,r){"index"in r&&(r.at=r.index),t.add(e,r)},redo:function(t,e,n,r){t.remove(e,r)},on:function(e,n,r){return{object:n,before:e,after:void 0,options:t.clone(r)}}},change:{undo:function(e,n,r,i){t.isEmpty(n)?t.each(t.keys(r),e.unset,e):(e.set(n),i&&i.unsetData&&i.unsetData.before&&i.unsetData.before.length&&t.each(i.unsetData.before,e.unset,e))},redo:function(e,n,r,i){t.isEmpty(r)?t.each(t.keys(n),e.unset,e):(e.set(r),i&&i.unsetData&&i.unsetData.after&&i.unsetData.after.length&&t.each(i.unsetData.after,e.unset,e))},on:function(e,n){var r=e.changedAttributes(),i=t.keys(r),o=t.pick(e.previousAttributes(),i),a=t.keys(o),s=(n||(n={})).unsetData={after:[],before:[]};return i.length!=a.length&&(i.length>a.length?t.each(i,(function(t){t in o||s.before.push(t)}),this):t.each(a,(function(t){t in r||s.after.push(t)}))),{object:e,before:o,after:r,options:t.clone(n)}}},reset:{undo:function(t,e,n){t.reset(e)},redo:function(t,e,n){t.reset(n)},on:function(e,n){return{object:e,before:n.previousModels,after:t.clone(e.models)}}}};function g(){}function v(e,n,r,i){if("object"==typeof n)return t.each(n,(function(t,n){2===e?v(e,t,r,i):v(e,n,t,r)}));switch(e){case 0:o(r,"undo","redo","on")&&t.all(t.pick(r,"undo","redo","on"),t.isFunction)&&(i[n]=r);break;case 1:i[n]&&t.isObject(r)&&(i[n]=t.extend({},i[n],r));break;case 2:delete i[n]}return this}g.prototype=p;var m=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){h("undo",this.attributes)},redo:function(t){h("redo",this.attributes)}}),y=e.Collection.extend({model:m,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(t){this.maximumStackLength=t}}),b=e.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(e){this.stack=new y,this.objectRegistry=new c,this.undoTypes=new g,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",(function(t,e){this.stack.setMaxLength(e)}),this),e&&e.track&&this.startTracking(),e&&e.register&&(t.isArray(e.register)||t.isArguments(e.register)?r(this.register,this,e.register):this.register(e.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")},_addToStack:function(t){f(this.stack,t,i(arguments,1),this.undoTypes)},register:function(){u("on",arguments,this._addToStack,this)},unregister:function(){u("off",arguments,this._addToStack,this)},unregisterAll:function(){r(this.unregister,this,this.objectRegistry.get())},undo:function(t){d("undo",this,this.stack,t)},undoAll:function(){d("undo",this,this.stack,!1,!0)},redo:function(t){d("redo",this,this.stack,t)},redoAll:function(){d("redo",this,this.stack,!1,!0)},isAvailable:function(t){var e=this.stack,n=e.length;switch(t){case"undo":return n>0&&e.pointer>-1;case"redo":return n>0&&e.pointer=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}},function(t,e,n){var r=n(81),i=n(82),o=n(83);t.exports=function(t,e){return r(t)||i(t,e)||o()}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:{};return e=h({},r,{},n),t=e.em,this.em=t,this},onLoad:function(){var t=e.defaults;for(var n in t){var r=t[n];this.add(n,r.keys,r.handler)}},add:function(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=this.em,l=a.get("Commands"),u=a.getEditor(),h=a.get("Canvas"),d={id:t,keys:e,handler:r},f=n[t];return f&&this.remove(t),n[t]=d,c()(e,(function(e,n){var c={event:e,h:n};if(r=Object(s.isString)(r)?l.get(r):r,o.prevent&&h.getCanvasView().preventDefault(e),!a.isEditing()&&!u.Canvas.isInputFocused()||o.force){"object"==i()(r)?r.run(u,0,c):r(u,0,c);var d=[t,n.shortcut,e];a.trigger.apply(a,["keymap:emit"].concat(d)),a.trigger.apply(a,["keymap:emit:".concat(t)].concat(d))}})),a.trigger("keymap:add",d),d},get:function(t){return n[t]},getAll:function(){return n},remove:function(t){var e=this.em,r=this.get(t);if(r)return delete n[t],c.a.unbind(r.keys),e&&e.trigger("keymap:remove",r),r},removeAll:function(){var t=this;return Object.keys(n).forEach((function(e){return t.remove(e)})),this}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(63),a=n.n(o);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};n=l({},o,{},i),t=n.em,this.em=t,(e=new a.a({track:!0,register:[]})).changeUndoType("change",{condition:!1}),e.changeUndoType("add",{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.avoidStore)return{object:e,before:void 0,after:t,options:l({},n)}}}),e.changeUndoType("remove",{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.avoidStore)return{object:e,before:t,after:void 0,options:l({},n)}}});var s={on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!r&&(r=t.previousAttributes()),!n.avoidStore){var i={object:t,before:r,after:t.toJSON()};return r=null,i}},undo:function(t,e,n,r){t.set(e)},redo:function(t,e,n,r){t.set(n)}},c=["style","attributes","content","src"];return c.forEach((function(t){return e.addUndoType("change:".concat(t),s)})),e.on("undo redo",(function(){return t.trigger("component:toggled change:canvasOffset")})),["undo","redo"].forEach((function(n){return e.on(n,(function(){return t.trigger(n)}))})),this},getConfig:function(){return n},add:function(t){return e.register(t),this},remove:function(t){return e.unregister(t),this},removeAll:function(){return e.unregisterAll(),this},start:function(){return e.startTracking(),this},stop:function(){return e.stopTracking(),this},undo:function(){return!t.isEditing()&&e.undo(1),this},undoAll:function(){return e.undoAll(),this},redo:function(){return!t.isEditing()&&e.redo(1),this},redoAll:function(){return e.redoAll(),this},hasUndo:function(){return e.isAvailable("undo")},hasRedo:function(){return e.isAvailable("redo")},getStack:function(){return e.stack},clear:function(){return e.clear(),this},getInstance:function(){return e}}}},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(74),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(23))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,l=1,c={},u=!1,h=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},r=function(t){o.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,r=function(t){var e=h.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(p,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n","i")}function o(t,e){for(var n in t)for(var r=e[n]||(e[n]=[]),i=t[n],o=i.length-1;o>=0;o--)r.unshift(i[o])}t.defineMode("htmlmixed",(function(n,a){var s=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:a.multilineTagIndentFactor,multilineTagIndentPastTag:a.multilineTagIndentPastTag}),l={},c=a&&a.tags,u=a&&a.scriptTypes;if(o(e,l),c&&o(c,l),u)for(var h=u.length-1;h>=0;h--)l.script.unshift(["type",u[h].matches,u[h].mode]);function d(e,o){var a,c=s.token(e,o.htmlState),u=/\btag\b/.test(c);if(u&&!/[<>\s\/]/.test(e.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&u&&/>$/.test(e.current())){var h=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var f=">"==e.current()&&function(t,e){for(var n=0;n-1?t.backUp(r.length-i):r.match(/<\/?$/)&&(t.backUp(r.length),t.match(e,!1)||t.match(r)),n}(t,v,e.localMode.token(t,e.localState))},o.localMode=p,o.localState=t.startState(p,s.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=e.current(),e.eol()&&(o.inTag+=" "));return c}return{startState:function(){return{token:d,inTag:null,localMode:null,localState:null,htmlState:t.startState(s)}},copyState:function(e){var n;return e.localState&&(n=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:n,htmlState:t.copyState(s,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,r){return!e.localMode||/^\s*<\//.test(n)?s.indent(e.htmlState,n,r):e.localMode.indent?e.localMode.indent(e.localState,n,r):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||s}}}}),"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")}(n(10),n(77),n(78),n(36))},function(t,e,n){!function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(r,i){var o,a,s=r.indentUnit,l={},c=i.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function h(t,e){function n(n){return e.tokenize=n,n(t,e)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(f("atom","]]>")):null:t.match("--")?n(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(function t(e){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=t(e+1),r.tokenize(n,r);if(">"==i){if(1==e){r.tokenize=h;break}return r.tokenize=t(e-1),r.tokenize(n,r)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(o=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==r?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function d(t,e){var n,r,i=t.next();if(">"==i||"/"==i&&t.eat(">"))return e.tokenize=h,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){e.tokenize=h,e.state=m,e.tagName=e.tagStart=null;var a=e.tokenize(t,e);return a?a+" tag error":"tag error"}return/[\'\"]/.test(i)?(e.tokenize=(n=i,(r=function(t,e){for(;!t.eol();)if(t.next()==n){e.tokenize=d;break}return"string"}).isInAttribute=!0,r),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t,e){return function(n,r){for(;!n.eol();){if(n.match(e)){r.tokenize=h;break}n.next()}return t}}function p(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function g(t){t.context&&(t.context=t.context.prev)}function v(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(e))return;g(t)}}function m(t,e,n){return"openTag"==t?(n.tagStart=e.column(),y):"closeTag"==t?b:m}function y(t,e,n){return"word"==t?(n.tagName=e.current(),a="tag",C):l.allowMissingTagName&&"endTag"==t?(a="tag bracket",C(t,0,n)):(a="error",y)}function b(t,e,n){if("word"==t){var r=e.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&g(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",w):(a="tag error",x)}return l.allowMissingTagName&&"endTag"==t?(a="tag bracket",w(t,0,n)):(a="error",x)}function w(t,e,n){return"endTag"!=t?(a="error",w):(g(n),m)}function x(t,e,n){return a="error",w(t,0,n)}function C(t,e,n){if("word"==t)return a="attribute",O;if("endTag"==t||"selfcloseTag"==t){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(r)?v(n,r):(v(n,r),n.context=new p(n,r,i==n.indented)),m}return a="error",C}function O(t,e,n){return"equals"==t?S:(l.allowMissing||(a="error"),C(t,0,n))}function S(t,e,n){return"string"==t?k:"word"==t&&l.allowUnquoted?(a="string",C):(a="error",C(t,0,n))}function k(t,e,n){return"string"==t?k:C(t,0,n)}return h.isInText=!0,{startState:function(t){var e={tokenize:h,state:m,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;o=null;var n=e.tokenize(t,e);return(n||o)&&"comment"!=n&&(a=null,e.state=e.state(o||n,t,e),a&&(n="error"==a?n+" error":a)),n},indent:function(e,n,r){var i=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(i&&i.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=h)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==S&&(t.state=C)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)n.tagName&&e.push(n.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(10))},function(t,e,n){!function(t){"use strict";t.defineMode("javascript",(function(e,n){var r,i,o=e.indentUnit,a=n.statementIndent,s=n.jsonld,l=n.json||s,c=n.typescript,u=n.wordCharacters||/[\w$\xa1-\uffff]/,h=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),r=t("keyword c"),i=t("keyword d"),o=t("operator"),a={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:r,void:r,throw:r,debugger:t("debugger"),var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:t("this"),class:t("class"),super:t("atom"),yield:r,export:t("export"),import:t("import"),extends:r,await:r}}(),d=/[+\-*&%=<>!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(t,e,n){return r=t,i=n,e}function g(t,e){var n,r=t.next();if('"'==r||"'"==r)return e.tokenize=(n=r,function(t,e){var r,i=!1;if(s&&"@"==t.peek()&&t.match(f))return e.tokenize=g,p("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(e.tokenize=g),p("string","string")}),e.tokenize(t,e);if("."==r&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return p("number","number");if("."==r&&t.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return p(r);if("="==r&&t.eat(">"))return p("=>","operator");if("0"==r&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return p("number","number");if(/\d/.test(r))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),p("number","number");if("/"==r)return t.eat("*")?(e.tokenize=v,v(t,e)):t.eat("/")?(t.skipToEnd(),p("comment","comment")):Kt(t,e,1)?(function(t){for(var e,n=!1,r=!1;null!=(e=t.next());){if(!n){if("/"==e&&!r)return;"["==e?r=!0:r&&"]"==e&&(r=!1)}n=!n&&"\\"==e}}(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),p("regexp","string-2")):(t.eat("="),p("operator","operator",t.current()));if("`"==r)return e.tokenize=m,m(t,e);if("#"==r)return t.skipToEnd(),p("error","error");if("<"==r&&t.match("!--")||"-"==r&&t.match("->"))return t.skipToEnd(),p("comment","comment");if(d.test(r))return">"==r&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=r&&"="!=r||t.eat("="):/[<>*+\-]/.test(r)&&(t.eat(r),">"==r&&t.eat(r))),p("operator","operator",t.current());if(u.test(r)){t.eatWhile(u);var i=t.current();if("."!=e.lastType){if(h.propertyIsEnumerable(i)){var o=h[i];return p(o.type,o.style,i)}if("async"==i&&t.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return p("async","keyword",i)}return p("variable","variable",i)}}function v(t,e){for(var n,r=!1;n=t.next();){if("/"==n&&r){e.tokenize=g;break}r="*"==n}return p("comment","comment")}function m(t,e){for(var n,r=!1;null!=(n=t.next());){if(!r&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=g;break}r=!r&&"\\"==n}return p("quasi","string-2",t.current())}var y="([{}])";function b(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=t.string.charAt(a),l=y.indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(u.test(s))o=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(t.string.charAt(a-1)==s&&"\\"!=t.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(e.fatArrowAt=a)}}var w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function x(t,e,n,r,i,o){this.indented=t,this.column=e,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function C(t,e){for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var r=t.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==e)return!0}var O={state:null,column:null,marked:null,cc:null};function S(){for(var t=arguments.length-1;t>=0;t--)O.cc.push(arguments[t])}function k(){return S.apply(null,arguments),!0}function T(t,e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}function P(t){var e=O.state;if(O.marked="def",e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var r=function t(e,n){if(n){if(n.block){var r=t(e,n.prev);return r?r==n.prev?n:new E(r,n.vars,!0):null}return T(e,n.vars)?n:new E(n.prev,new M(e,n.vars),!1)}return null}(t,e.context);if(null!=r)return void(e.context=r)}else if(!T(t,e.localVars))return void(e.localVars=new M(t,e.localVars));n.globalVars&&!T(t,e.globalVars)&&(e.globalVars=new M(t,e.globalVars))}function j(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function E(t,e,n){this.prev=t,this.vars=e,this.block=n}function M(t,e){this.name=t,this.next=e}var D=new M("this",new M("arguments",null));function A(){O.state.context=new E(O.state.context,O.state.localVars,!1),O.state.localVars=D}function L(){O.state.context=new E(O.state.context,O.state.localVars,!0),O.state.localVars=null}function N(){O.state.localVars=O.state.context.vars,O.state.context=O.state.context.prev}function I(t,e){var n=function(){var n=O.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new x(r,O.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function F(){var t=O.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function _(t){return function e(n){return n==t?k():";"==t||"}"==n||")"==n||"]"==n?S():k(e)}}function R(t,e){return"var"==t?k(I("vardef",e),bt,_(";"),F):"keyword a"==t?k(I("form"),$,R,F):"keyword b"==t?k(I("form"),R,F):"keyword d"==t?O.stream.match(/^\s*$/,!1)?k():k(I("stat"),W,_(";"),F):"debugger"==t?k(_(";")):"{"==t?k(I("}"),L,at,F,N):";"==t?k():"if"==t?("else"==O.state.lexical.info&&O.state.cc[O.state.cc.length-1]==F&&O.state.cc.pop()(),k(I("form"),$,R,F,kt)):"function"==t?k(Et):"for"==t?k(I("form"),Tt,R,F):"class"==t||c&&"interface"==e?(O.marked="keyword",k(I("form","class"==t?t:e),Nt,F)):"variable"==t?c&&"declare"==e?(O.marked="keyword",k(R)):c&&("module"==e||"enum"==e||"type"==e)&&O.stream.match(/^\s*\w/,!1)?(O.marked="keyword","enum"==e?k(qt):"type"==e?k(Dt,_("operator"),ht,_(";")):k(I("form"),wt,_("{"),I("}"),at,F,F)):c&&"namespace"==e?(O.marked="keyword",k(I("form"),H,R,F)):c&&"abstract"==e?(O.marked="keyword",k(R)):k(I("stat"),Q):"switch"==t?k(I("form"),$,_("{"),I("}","switch"),L,at,F,F,N):"case"==t?k(H,_(":")):"default"==t?k(_(":")):"catch"==t?k(I("form"),A,V,R,F,N):"export"==t?k(I("stat"),Rt,F):"import"==t?k(I("stat"),Ht,F):"async"==t?k(R):"@"==e?k(H,R):S(I("stat"),H,_(";"),F)}function V(t){if("("==t)return k(At,_(")"))}function H(t,e){return B(t,e,!1)}function z(t,e){return B(t,e,!0)}function $(t){return"("!=t?S():k(I(")"),H,_(")"),F)}function B(t,e,n){if(O.state.fatArrowAt==O.stream.start){var r=n?X:Y;if("("==t)return k(A,I(")"),it(At,")"),F,_("=>"),r,N);if("variable"==t)return S(A,wt,_("=>"),r,N)}var i=n?q:U;return w.hasOwnProperty(t)?k(i):"function"==t?k(Et,i):"class"==t||c&&"interface"==e?(O.marked="keyword",k(I("form"),Lt,F)):"keyword c"==t||"async"==t?k(n?z:H):"("==t?k(I(")"),W,_(")"),F,i):"operator"==t||"spread"==t?k(n?z:H):"["==t?k(I("]"),Ut,F,i):"{"==t?ot(et,"}",null,i):"quasi"==t?S(G,i):"new"==t?k(function(t){return function(e){return"."==e?k(t?Z:J):"variable"==e&&c?k(vt,t?q:U):S(t?z:H)}}(n)):"import"==t?k(H):k()}function W(t){return t.match(/[;\}\)\],]/)?S():S(H)}function U(t,e){return","==t?k(H):q(t,e,!1)}function q(t,e,n){var r=0==n?U:q,i=0==n?H:z;return"=>"==t?k(A,n?X:Y,N):"operator"==t?/\+\+|--/.test(e)||c&&"!"==e?k(r):c&&"<"==e&&O.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?k(I(">"),it(ht,">"),F,r):"?"==e?k(H,_(":"),i):k(i):"quasi"==t?S(G,r):";"!=t?"("==t?ot(z,")","call",r):"."==t?k(tt,r):"["==t?k(I("]"),W,_("]"),F,r):c&&"as"==e?(O.marked="keyword",k(ht,r)):"regexp"==t?(O.state.lastType=O.marked="operator",O.stream.backUp(O.stream.pos-O.stream.start-1),k(i)):void 0:void 0}function G(t,e){return"quasi"!=t?S():"${"!=e.slice(e.length-2)?k(G):k(H,K)}function K(t){if("}"==t)return O.marked="string-2",O.state.tokenize=m,k(G)}function Y(t){return b(O.stream,O.state),S("{"==t?R:H)}function X(t){return b(O.stream,O.state),S("{"==t?R:z)}function J(t,e){if("target"==e)return O.marked="keyword",k(U)}function Z(t,e){if("target"==e)return O.marked="keyword",k(q)}function Q(t){return":"==t?k(F,R):S(U,_(";"),F)}function tt(t){if("variable"==t)return O.marked="property",k()}function et(t,e){return"async"==t?(O.marked="property",k(et)):"variable"==t||"keyword"==O.style?(O.marked="property","get"==e||"set"==e?k(nt):(c&&O.state.fatArrowAt==O.stream.start&&(n=O.stream.match(/^\s*:\s*/,!1))&&(O.state.fatArrowAt=O.stream.pos+n[0].length),k(rt))):"number"==t||"string"==t?(O.marked=s?"property":O.style+" property",k(rt)):"jsonld-keyword"==t?k(rt):c&&j(e)?(O.marked="keyword",k(et)):"["==t?k(H,st,_("]"),rt):"spread"==t?k(z,rt):"*"==e?(O.marked="keyword",k(et)):":"==t?S(rt):void 0;var n}function nt(t){return"variable"!=t?S(rt):(O.marked="property",k(Et))}function rt(t){return":"==t?k(z):"("==t?S(Et):void 0}function it(t,e,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var a=O.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),k((function(n,r){return n==e||r==e?S():S(t)}),r)}return i==e||o==e?k():n&&n.indexOf(";")>-1?S(t):k(_(e))}return function(n,i){return n==e||i==e?k():S(t,r)}}function ot(t,e,n){for(var r=3;r"),ht):void 0}function dt(t){if("=>"==t)return k(ht)}function ft(t,e){return"variable"==t||"keyword"==O.style?(O.marked="property",k(ft)):"?"==e||"number"==t||"string"==t?k(ft):":"==t?k(ht):"["==t?k(_("variable"),lt,_("]"),ft):"("==t?S(Mt,ft):void 0}function pt(t,e){return"variable"==t&&O.stream.match(/^\s*[?:]/,!1)||"?"==e?k(pt):":"==t?k(ht):"spread"==t?k(pt):S(ht)}function gt(t,e){return"<"==e?k(I(">"),it(ht,">"),F,gt):"|"==e||"."==t||"&"==e?k(ht):"["==t?k(ht,_("]"),gt):"extends"==e||"implements"==e?(O.marked="keyword",k(ht)):"?"==e?k(ht,_(":"),ht):void 0}function vt(t,e){if("<"==e)return k(I(">"),it(ht,">"),F,gt)}function mt(){return S(ht,yt)}function yt(t,e){if("="==e)return k(ht)}function bt(t,e){return"enum"==e?(O.marked="keyword",k(qt)):S(wt,st,Ot,St)}function wt(t,e){return c&&j(e)?(O.marked="keyword",k(wt)):"variable"==t?(P(e),k()):"spread"==t?k(wt):"["==t?ot(Ct,"]"):"{"==t?ot(xt,"}"):void 0}function xt(t,e){return"variable"!=t||O.stream.match(/^\s*:/,!1)?("variable"==t&&(O.marked="property"),"spread"==t?k(wt):"}"==t?S():"["==t?k(H,_("]"),_(":"),xt):k(_(":"),wt,Ot)):(P(e),k(Ot))}function Ct(){return S(wt,Ot)}function Ot(t,e){if("="==e)return k(z)}function St(t){if(","==t)return k(bt)}function kt(t,e){if("keyword b"==t&&"else"==e)return k(I("form","else"),R,F)}function Tt(t,e){return"await"==e?k(Tt):"("==t?k(I(")"),Pt,F):void 0}function Pt(t){return"var"==t?k(bt,jt):"variable"==t?k(jt):S(jt)}function jt(t,e){return")"==t?k():";"==t?k(jt):"in"==e||"of"==e?(O.marked="keyword",k(H,jt)):S(H,jt)}function Et(t,e){return"*"==e?(O.marked="keyword",k(Et)):"variable"==t?(P(e),k(Et)):"("==t?k(A,I(")"),it(At,")"),F,ct,R,N):c&&"<"==e?k(I(">"),it(mt,">"),F,Et):void 0}function Mt(t,e){return"*"==e?(O.marked="keyword",k(Mt)):"variable"==t?(P(e),k(Mt)):"("==t?k(A,I(")"),it(At,")"),F,ct,N):c&&"<"==e?k(I(">"),it(mt,">"),F,Mt):void 0}function Dt(t,e){return"keyword"==t||"variable"==t?(O.marked="type",k(Dt)):"<"==e?k(I(">"),it(mt,">"),F):void 0}function At(t,e){return"@"==e&&k(H,At),"spread"==t?k(At):c&&j(e)?(O.marked="keyword",k(At)):c&&"this"==t?k(st,Ot):S(wt,st,Ot)}function Lt(t,e){return"variable"==t?Nt(t,e):It(t,e)}function Nt(t,e){if("variable"==t)return P(e),k(It)}function It(t,e){return"<"==e?k(I(">"),it(mt,">"),F,It):"extends"==e||"implements"==e||c&&","==t?("implements"==e&&(O.marked="keyword"),k(c?ht:H,It)):"{"==t?k(I("}"),Ft,F):void 0}function Ft(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||c&&j(e))&&O.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(O.marked="keyword",k(Ft)):"variable"==t||"keyword"==O.style?(O.marked="property",k(c?_t:Et,Ft)):"number"==t||"string"==t?k(c?_t:Et,Ft):"["==t?k(H,st,_("]"),c?_t:Et,Ft):"*"==e?(O.marked="keyword",k(Ft)):c&&"("==t?S(Mt,Ft):";"==t||","==t?k(Ft):"}"==t?k():"@"==e?k(H,Ft):void 0}function _t(t,e){if("?"==e)return k(_t);if(":"==t)return k(ht,Ot);if("="==e)return k(z);var n=O.state.lexical.prev;return S(n&&"interface"==n.info?Mt:Et)}function Rt(t,e){return"*"==e?(O.marked="keyword",k(Wt,_(";"))):"default"==e?(O.marked="keyword",k(H,_(";"))):"{"==t?k(it(Vt,"}"),Wt,_(";")):S(R)}function Vt(t,e){return"as"==e?(O.marked="keyword",k(_("variable"))):"variable"==t?S(z,Vt):void 0}function Ht(t){return"string"==t?k():"("==t?S(H):S(zt,$t,Wt)}function zt(t,e){return"{"==t?ot(zt,"}"):("variable"==t&&P(e),"*"==e&&(O.marked="keyword"),k(Bt))}function $t(t){if(","==t)return k(zt,$t)}function Bt(t,e){if("as"==e)return O.marked="keyword",k(zt)}function Wt(t,e){if("from"==e)return O.marked="keyword",k(H)}function Ut(t){return"]"==t?k():S(it(z,"]"))}function qt(){return S(I("form"),wt,_("{"),I("}"),it(Gt,"}"),F,F)}function Gt(){return S(wt,Ot)}function Kt(t,e,n){return e.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}return N.lex=!0,F.lex=!0,{startState:function(t){var e={tokenize:g,lastType:"sof",cc:[],lexical:new x((t||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new E(null,null,!1),indented:t||0};return n.globalVars&&"object"==typeof n.globalVars&&(e.globalVars=n.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),b(t,e)),e.tokenize!=v&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==r?n:(e.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",function(t,e,n,r,i){var o=t.cc;for(O.state=t,O.stream=i,O.marked=null,O.cc=o,O.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;)if((o.length?o.pop():l?H:R)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return O.marked?O.marked:"variable"==n&&C(t,r)?"variable-2":e}}(e,n,r,i,t))},indent:function(e,r){if(e.tokenize==v)return t.Pass;if(e.tokenize!=g)return 0;var i,s=r&&r.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(r))for(var c=e.cc.length-1;c>=0;--c){var u=e.cc[c];if(u==F)l=l.prev;else if(u!=kt)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=e.cc[e.cc.length-1])&&(i==U||i==q)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,f=s==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==h&&"{"==s?l.indented:"form"==h?l.indented+o:"stat"==h?l.indented+(function(t,e){return"operator"==t.lastType||","==t.lastType||d.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}(e,r)?a||o:0):"switch"!=l.info||f||0==n.doubleIndentSwitch?l.align?l.column+(f?0:1):l.indented+(f?0:o):l.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:Kt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=H&&e!=z||t.cc.pop()}}})),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(10))},function(t,e,n){!function(t){t.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e){return/^[;{}]$/.test(e)}}),t.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e,n,r){return this.jsonMode?/^[\[,{]$/.test(e)||/^}/.test(n):(";"!=e||!r.lexical||")"!=r.lexical.type)&&/^[;{}]$/.test(e)&&!/^;/.test(n)}});var e=/^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;t.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",newlineAfterToken:function(t,n,r,i){var o=!1;return"html"==this.configuration&&(o=!!i.context&&e.test(i.context.tagName)),!o&&("tag"==t&&/>$/.test(n)&&i.context||/^-1&&s>-1&&s>a&&(t=t.substr(0,a)+t.substring(a+o.commentStart.length,s)+t.substr(s+o.commentEnd.length)),i.replaceRange(t,n,r)}}))})),t.defineExtension("autoIndentRange",(function(t,e){var n=this;this.operation((function(){for(var r=t.line;r<=e.line;r++)n.indentLine(r,"smart")}))})),t.defineExtension("autoFormatRange",(function(e,n){var r=this,i=r.getMode(),o=r.getRange(e,n).split("\n"),a=t.copyState(i,r.getTokenAt(e).state),s=r.getOption("tabSize"),l="",c=0,u=0===e.ch;function h(){l+="\n",u=!0,++c}for(var d=0;d=0||(i[n]=t[n]);return i}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r),o=n(31);e.default=i.a.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent,this.parentView=t.parentView;var n=this.pfx,r=this.ppfx,i=this.parent,o=this.collection;this.listenTo(o,"add",this.addTo),this.listenTo(o,"reset resetNavigator",this.render),this.listenTo(o,"remove",this.removeChildren),this.className="".concat(n,"layers");var a=e.em;if(e.sortable&&!this.opt.sorter){var s=a.get("Utils");this.opt.sorter=new s.Sorter({container:e.sortContainer||this.el,containerSel:".".concat(this.className),itemSel:".".concat(n,"layer"),ignoreViewChildren:1,onEndMove:function(t,e){var n=e.getSourceModel();a.setSelected(n,{forceChange:1})},avoidSelectOnEnd:1,nested:1,ppfx:r,pfx:n})}this.sorter=this.opt.sorter||"",this.$el.data("collection",o),i&&this.$el.data("model",i)},removeChildren:function(t){var e=t.viewLayer;e&&e.remove.apply(e)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var r=this.level,i=this.parentView,a=e||null,s=new(0,o.a)({level:r,model:t,parentView:i,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}).render().el;if(a)a.appendChild(s);else if(void 0!==n){var l="before";this.$el.children().length==n&&(n--,l="after"),n<0?this.$el.append(s):this.$el.children().eq(n)[l](s)}else this.$el.append(s);return s},isCountable:function(t,e){var n=t.get("type"),r=t.get("tagName");return!(("textnode"==n||"br"==r)&&e||!t.get("layerable"))},render:function(){var t=this,e=document.createDocumentFragment(),n=this.el;return n.innerHTML="",this.collection.each((function(n){return t.addToCollection(n,e)})),n.appendChild(e),n.className=this.className,this}})},function(t,e,n){var r={"./CanvasClear":37,"./CanvasClear.js":37,"./CanvasMove":38,"./CanvasMove.js":38,"./CommandAbstract":19,"./CommandAbstract.js":19,"./ComponentDelete":39,"./ComponentDelete.js":39,"./ComponentDrag":40,"./ComponentDrag.js":40,"./ComponentEnter":41,"./ComponentEnter.js":41,"./ComponentExit":42,"./ComponentExit.js":42,"./ComponentNext":43,"./ComponentNext.js":43,"./ComponentPrev":44,"./ComponentPrev.js":44,"./ComponentStyleClear":45,"./ComponentStyleClear.js":45,"./CopyComponent":46,"./CopyComponent.js":46,"./DeleteComponent":47,"./DeleteComponent.js":47,"./ExportTemplate":48,"./ExportTemplate.js":48,"./Fullscreen":49,"./Fullscreen.js":49,"./MoveComponent":50,"./MoveComponent.js":50,"./OpenAssets":51,"./OpenAssets.js":51,"./OpenBlocks":52,"./OpenBlocks.js":52,"./OpenLayers":53,"./OpenLayers.js":53,"./OpenStyleManager":54,"./OpenStyleManager.js":54,"./OpenTraitManager":55,"./OpenTraitManager.js":55,"./PasteComponent":56,"./PasteComponent.js":56,"./Preview":57,"./Preview.js":57,"./Resize":58,"./Resize.js":58,"./SelectComponent":12,"./SelectComponent.js":12,"./SelectPosition":24,"./SelectPosition.js":24,"./ShowOffset":59,"./ShowOffset.js":59,"./SwitchVisibility":60,"./SwitchVisibility.js":60};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=85},function(t,e,n){"use strict";n.r(e);var r=n(6),i=n.n(r),o=n(2),a=n.n(o),s=n(1),l=n.n(s),c=n(0),u={stylePrefix:"comp-",wrapperId:"wrapper",wrapperName:"Body",wrapper:{removable:!1,copyable:!1,draggable:!1,components:[],traits:[],stylable:["background","background-color","background-image","background-repeat","background-attachment","background-position","background-size"]},components:[],draggableComponents:1,storeWrapper:0,processor:0,voidElements:["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]},h=n(4),d=n(18),f=n(5),p=n(30);function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var v=h.default.extend({defaults:function(t){for(var e=1;e\n \n '),fallback:"\n \n '),file:""}),initialize:function(t,e){h.default.prototype.initialize.apply(this,arguments);var n=this.get("attributes");n.src&&this.set("src",n.src)},initToolbar:function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},e=this.get(t.fallback?"fallback":"src")||"",n=e;return e&&"2&&void 0!==arguments[2]?arguments[2]:{};!n.fromDisable&&this.disableEditing()},onActive:function(t){if(!this.rteEnabled&&this.model.get("editable")){t&&t.stopPropagation&&t.stopPropagation();var e=this.rte;if(e)try{this.activeRte=e.enable(this,this.activeRte)}catch(t){console.error(t)}this.toggleEvents(1)}},onDisable:function(){this.disableEditing()},disableEditing:function(){var t=this.model,e=this.rte,n=this.activeRte,r=t.get("editable");if(e&&r){try{e.disable(this,n)}catch(t){console.error(t)}this.syncContent()}this.toggleEvents()},getContent:function(){var t=(this.rte||{}).activeRte;return t&&"function"==typeof t.getContent?t.getContent():this.getChildrenContainer().innerHTML},syncContent:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=this.rte,r=this.rteEnabled;if(r||t.force){var i=this.getContent(),o=e.components(),a=q({fromDisable:1},t);if(o.length&&o.reset(null,t),e.set("content","",a),n.customRte)e.set("content",i,a);else{var s=function e(n){var r=!!n.get("textable"),i=!["text","default",""].some((function(t){return n.is(t)}))||r;n.set(q({editable:i&&n.get("editable"),selectable:i,hoverable:i,removable:r,draggable:r,highlightable:0,copyable:r},!r&&{toolbar:""}),t),n.get("components").each((function(t){return e(t)}))};!t.silent&&e.trigger("change:content",e,"",a),o.add(i,t),o.each((function(t){return s(t)})),o.trigger("resetNavigator")}}},onInput:function(){var t=this.em;t&&t.trigger("change:canvasOffset")},disablePropagation:function(t){t.stopPropagation()},toggleEvents:function(t){var e=this.em,n={on:W.s,off:W.r},r=t?"on":"off";e.setEditing(t),this.rteEnabled=!!t;var i=[this.el.ownerDocument,document];if(n.off(i,"mousedown",this.disableEditing),n[r](i,"mousedown",this.disableEditing),e[r]("toolbar:run:before",this.disableEditing),this.$el.off("mousedown",this.disablePropagation),this.$el[r]("mousedown",this.disablePropagation),this.config.draggableComponents)for(var o=this.el;o;)o.draggable=!t,(o=o.parentNode)&&"BODY"==o.tagName&&(o=0)}}),Y=K.extend({render:function(){for(var t=arguments.length,e=new Array(t),n=0;n/g,">").replace(/"/g,""").replace(/'/g,"'")}},{isComponent:function(t){var e="";return 3===t.nodeType&&(e={type:"textnode",content:t.textContent}),e}});function ft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var pt=dt.extend({defaults:function(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{},o=e.components(),a=t.get("UndoManager"),s=t.handleUpdates.bind(t),l=this.handleChanges.bind(this),c=this.handleChangesColl.bind(this),u=this.handleRemoves.bind(this);a&&a.add(e),a&&o&&a.add(o);var h="change:style change:content change:attributes change:src";[[e,h,s],[e,"change:components",c],[o,"add",l],[o,"remove",u],[e.get("classes"),"add remove",s]].forEach((function(e){t.stopListening(e[0],e[1],e[2]),t.listenTo(e[0],e[1],e[2])})),!i.avoidStore&&s("","",i),o.each((function(t){return r.handleChanges(t,n,i)}))},handleChangesColl:function(e,n){var r=t.get("UndoManager");if(r&&n instanceof l.a.Collection){var i=this.handleChanges.bind(this),o=this.handleRemoves.bind(this);r.add(n),[[n,"add",i],[n,"remove",o]].forEach((function(e){t.stopListening(e[0],e[1],e[2]),t.listenTo(e[0],e[1],e[2])}))}},handleRemoves:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!r.avoidStore&&t.handleUpdates(e,n,r)},load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=this.em,n="";!t&&r.stm&&(t=r.em.getCacheLoad());var i=t,o=i.components,a=i.html;if(o)if(Object(c.isObject)(o)||Object(c.isArray)(o))n=o;else try{n=JSON.parse(o)}catch(t){e&&e.logError(t)}else a&&(n=a);var s=n&&n.constructor===Object;return(n&&n.length||s)&&(this.clear(),s?this.getWrapper().set(n):this.getComponents().add(n)),n},store:function(t){if(r.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=r.em.getHtml()),n.indexOf("components")>=0){this.em;var i=r.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(i)}return t||r.stm.store(e),e}},getComponent:function(){return e},getWrapper:function(){return this.getComponent()},getComponents:function(){return this.getWrapper().get("components")},addComponent:function(t){return this.getComponents().add(t)},render:function(){return n.render().el},clear:function(){return this.getComponents().map((function(t){return t})).forEach((function(t){return t.remove()})),this},setComponents:function(t){this.clear().addComponent(t)},addType:function(t,e){var n=this.em,r=e.model,a=void 0===r?{}:r,s=e.view,l=void 0===s?{}:s,u=e.isComponent,h=e.extend,d=e.extendView,f=e.extendFn,p=void 0===f?[]:f,g=e.extendFnView,v=void 0===g?[]:g,m=this.getType(t),y=this.getType(h),b=this.getType(d),w=y||(m||this.getType("default")),x=w.model,C=b?b.view:w.view,O=function(t,e,n){return t.reduce((function(t,r){var i=e[r],o=n.prototype[r];return i&&o&&(t[r]=function(){o.bind(this).apply(void 0,arguments),i.bind(this).apply(void 0,arguments)}),t}),{})};"object"===i()(a)&&(e.model=x.extend(bt({},a,{},O(p,a,x),{defaults:bt({},x.prototype.defaults,{},Object(c.result)(a,"defaults")||{})}),{isComponent:!m||y||u?u||function(){return 0}:x.isComponent})),"object"===i()(l)&&(e.view=C.extend(bt({},l,{},O(v,l,C)))),m?(m.model=e.model,m.view=e.view):(e.id=t,o.unshift(e));var S="component:type:".concat(m?"update":"add");return n&&n.trigger(S,m||e),this},getType:function(t){for(var e=o,n=0;n1&&void 0!==arguments[1]?arguments[1]:{};t&&(t.set({status:"selected"}),["component:selected","component:toggled"].forEach((function(r){return e.em.trigger(r,t,n)})))},selectRemove:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){this.em;t.set({status:"",state:""}),["component:deselected","component:toggled"].forEach((function(r){return e.em.trigger(r,t,n)}))}},componentHovered:function(){var t=r.em,e=t.get("componentHovered"),n=t.previous("componentHovered");n&&"hovered"==n.get("status")&&n.set({status:"",state:""}),e&&Object(c.isEmpty)(e.get("status"))&&e.set("status","hovered")}}}},function(t,e,n){"use strict";n.r(e);var r={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},credentials:"include",multiUpload:!0,autoAdd:1,customFetch:"",uploadFile:"",embedAsBase64:1,handleAdd:"",dropzone:0,openAssetsOnDrop:1,dropzoneContent:"",beforeUpload:null},i=n(1),o=n.n(i),a=n(2),s=n.n(a),l=o.a.Model.extend({idAttribute:"src",defaults:{type:"",src:""},getFilename:function(){return this.get("src").split("/").pop()},getExtension:function(){return this.getFilename().split(".").pop()}});function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var u=l.extend({defaults:function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};this.options=t,this.collection=t.collection;var e=t.config||{};this.config=e,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.em=e.em,this.className=this.pfx+"asset",this.listenTo(this.model,"destroy remove",this.remove),this.model.view=this;var n=this.init&&this.init.bind(this);n&&n(t)},template:function(){var t=this.pfx;return'\n
\n ').concat(this.getPreview(),'\n
\n
\n ').concat(this.getInfo(),'\n
\n
\n ⨯\n
\n ')},updateTarget:function(t){t&&t.set&&(t.set("attributes",Object(h.clone)(t.get("attributes"))),t.set("src",this.model.get("src")))},getPreview:function(){return""},getInfo:function(){return""},render:function(){var t=this.el;return t.innerHTML=this.template(this,this.model),t.className=this.className,this}}).extend({events:{"click [data-toggle=asset-remove]":"onRemove",click:"onClick",dblclick:"onDblClick"},getPreview:function(){var t=this.pfx,e=this.model.get("src");return'\n
\n
\n ')},getInfo:function(){var t=this.pfx,e=this.model,n=e.get("name"),r=e.get("width"),i=e.get("height"),o=e.get("unitDim"),a=r&&i?"".concat(r,"x").concat(i).concat(o):"";return n=n||e.getFilename(),'\n
').concat(n,'
\n
').concat(a,"
\n ")},init:function(t){var e=this.pfx;this.className+=" ".concat(e,"asset-image")},onClick:function(){var t=this.config.onClick,e=this.model;this.collection.trigger("deselectAll"),this.$el.addClass(this.pfx+"highlight"),Object(h.isFunction)(t)?t(e):this.updateTarget(this.collection.target)},onDblClick:function(){var t=this.em,e=this.model,n=this.config.onDblClick;Object(h.isFunction)(n)?n(e):(this.updateTarget(this.collection.target),t&&t.get("Modal").close());var r=this.collection.onSelect;Object(h.isFunction)(r)&&r(e)},onRemove:function(t){t.stopImmediatePropagation(),this.model.collection.remove(this.model)}}),f=n(27),p=o.a.Collection.extend(f.a).extend({types:[{id:"image",model:u,view:d,isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}]}),g=n(65),v=n.n(g),m=o.a.View.extend({events:{submit:"handleSubmit"},template:function(t){var e=t.pfx,n=t.ppfx,r=t.em;v()(t,["pfx","ppfx","em"]);return'\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n ')},initialize:function(t){this.options=t,this.config=t.config,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em;var e=this.collection;this.listenTo(e,"reset",this.renderAssets),this.listenTo(e,"add",this.addToAsset),this.listenTo(e,"remove",this.removedAsset),this.listenTo(e,"deselectAll",this.deselectAll)},handleSubmit:function(t){t.preventDefault();var e=this.getAddInput(),n=e.value.trim(),r=this.config.handleAdd;n&&(e.value="",this.getAssetsEl().scrollTop=0,r?r.bind(this)(n):this.options.globalCollection.add(n,{at:0}))},getAssetsEl:function(){return this.el.querySelector(".".concat(this.pfx,"assets"))},getAddInput:function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector(".".concat(this.pfx,"add-asset input"))),this.inputUrl},removedAsset:function(t){this.collection.length||this.toggleNoAssets()},addToAsset:function(t){1==this.collection.length&&this.toggleNoAssets(1),this.addAsset(t)},addAsset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e,r=this.collection,i=this.config,o=new t.typeView({model:t,collection:r,config:i}).render().el;if(n)n.appendChild(o);else{var a=this.getAssetsEl();a&&a.insertBefore(o,a.firstChild)}return o},toggleNoAssets:function(t){var e=this.$el.find(".".concat(this.pfx,"assets"));if(t)e.empty();else{var n=this.config.noAssets;n&&e.append(n)}},deselectAll:function(){var t=this.pfx;this.$el.find(".".concat(t,"highlight")).removeClass("".concat(t,"highlight"))},renderAssets:function(){var t=this,e=document.createDocumentFragment(),n=this.$el.find(".".concat(this.pfx,"assets"));n.empty(),this.toggleNoAssets(this.collection.length),this.collection.each((function(n){return t.addAsset(n,e)})),n.append(e)},render:function(){var t=this.options.fu.render().el;return this.$el.empty(),this.$el.append(t).append(this.template(this)),this.el.className="".concat(this.ppfx,"asset-manager"),this.renderAssets(),this.rendered=1,this}}),y=n(25),b=o.a.View.extend({template:Object(h.template)('\n
\n
<%= title %>
\n <%= multiUpload ? \'multiple\' : \'\' %>/>\n
\n
\n '),events:{},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t;var e=t.config||{};this.config=e,this.em=this.config.em,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.target=this.options.globalCollection||{},this.uploadId=this.pfx+"uploadFile",this.disabled=void 0!==e.disableUpload?e.disableUpload:!e.upload&&!e.embedAsBase64,this.multiUpload=void 0===e.multiUpload||e.multiUpload,this.events["change #"+this.uploadId]="uploadFile";var n=e.uploadFile;n?this.uploadFile=n.bind(this):!e.upload&&e.embedAsBase64&&(this.uploadFile=this.constructor.embedAsBase64),this.delegateEvents()},onUploadStart:function(){var t=this.config.em;t&&t.trigger("asset:upload:start")},onUploadEnd:function(t){var e=this.$el,n=this.config.em;n&&n.trigger("asset:upload:end",t);var r=e.find("input");r&&r.val("")},onUploadError:function(t){var e=this.config.em;console.error(t),this.onUploadEnd(t),e&&e.trigger("asset:upload:error",t)},onUploadResponse:function(t,e){var n,r=this.config.em,i=this.config,o=this.target;try{n="string"==typeof t?JSON.parse(t):t}catch(e){n=t}r&&r.trigger("asset:upload:response",n),i.autoAdd&&o&&o.add(n.data,{at:0}),this.onUploadEnd(t),e&&e(n)},uploadFile:function(t,e){var n=this,r=t.dataTransfer?t.dataTransfer.files:t.target.files,i=this.config,o=i.beforeUpload;if(!1!==(o&&o(r))){var a=new FormData,s=i.params,l=i.customFetch;for(var c in s)a.append(c,s[c]);if(this.multiUpload)for(var u=0;u').concat(r.dropzoneContent,"
")),h(),"draggable"in o&&[o,s].forEach((function(t){t.ondragover=d,t.ondragleave=f,t.ondrop=p}))},render:function(){var t=this.$el,e=this.pfx,n=this.em;return t.html(this.template({title:n&&n.t("assetManager.uploadTitle"),uploadId:this.uploadId,disabled:this.disabled,multiUpload:this.multiUpload,pfx:e})),this.initDrop(),t.attr("class",e+"file-uploader"),this}},{embedAsBase64:function(t,e){var n=this,r=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(FileReader){var o=[],a=/^(.+)\/(.+)$/,s=!0,l=!1,c=void 0;try{for(var u,h=function(){var t=u.value,e=new Promise((function(e,n){var r=new FileReader;r.addEventListener("load",(function(i){var o,s=t.name,l=a.exec(t.type);if("image"===(o=l?l[1]:t.type)){var c={src:r.result,name:s,type:o,height:0,width:0},u=new Image;u.addEventListener("error",(function(t){n(t)})),u.addEventListener("load",(function(){c.height=u.height,c.width=u.width,e(c)})),u.src=c.src}else e(o?{src:r.result,name:s,type:o}:r.result)})),r.addEventListener("error",(function(t){n(t)})),r.addEventListener("abort",(function(t){n("Aborted")})),r.readAsDataURL(t)}));o.push(e)},d=r[Symbol.iterator]();!(s=(u=d.next()).done);s=!0)h()}catch(t){l=!0,c=t}finally{try{s||null==d.return||d.return()}finally{if(l)throw c}}Promise.all(o).then((function(t){i.data=t,n.onUploadResponse(i,e)}),(function(t){n.onUploadError(t)}))}else this.onUploadError(new Error("Unsupported platform, FileReader is not defined"))}});e.default=function(){var t,e,n,i={};return{name:"AssetManager",storageKey:"assets",getConfig:function(){return i},init:function(o){var a=this;for(var s in i=o||{},r)s in i||(i[s]=r[s]);var l=i.pStylePrefix,c=i.em;l&&(i.stylePrefix=l+i.stylePrefix),t=new p([]);var u={collection:new p([]),globalCollection:t,config:i};return n=new b(u),u.fu=n,e=new m(u),t.listenTo(t,"add",(function(t){a.getAllVisible().add(t),c&&c.trigger("asset:add",t)})),t.listenTo(t,"remove",(function(t){a.getAllVisible().remove(t),c&&c.trigger("asset:remove",t)})),this},add:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return void 0===n.at&&(n.at=0),t.add(e,n)},get:function(e){return t.where({src:e})[0]},getAll:function(){return t},getAllVisible:function(){return e.collection},remove:function(t){var e=this.get(t);return this.getAll().remove(e),this},store:function(t){var e={},n=JSON.stringify(this.getAll().toJSON());return e[this.storageKey]=n,!t&&i.stm&&i.stm.store(e),e},load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.storageKey,n=t[e]||[];if("string"==typeof n)try{n=JSON.parse(t[e])}catch(t){}return n&&n.length&&this.getAll().reset(n),n},getContainer:function(){return e.el},getAssetsEl:function(){return e.el.querySelector("[data-el=assets]")},render:function(t){var n=t||this.getAll().models;return e.rendered||e.render(),e.collection.reset(n),this.getContainer()},addType:function(t,e){this.getAll().addType(t,e)},getType:function(t){return this.getAll().getType(t)},getTypes:function(){return this.getAll().getTypes()},AssetsView:function(){return e},FileUploader:function(){return n},onLoad:function(){this.getAll().reset(i.assets)},postRender:function(t){i.dropzone&&n.initDropzone(t)},setTarget:function(t){e.collection.target=t},onSelect:function(t){e.collection.onSelect=t},onClick:function(t){i.onClick=t},onDblClick:function(t){i.onDblClick=t}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(0),a={appendTo:"",appendOnClick:0,blocks:[]},s=n(1),l=n.n(s),c=l.a.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}}),u=l.a.Model.extend({defaults:{activate:0,select:0,resetId:0,label:"",media:"",content:"",category:"",attributes:{}},initialize:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t=this.get("category");if(t&&"string"==typeof t)new c({id:t,label:t})}}),h=l.a.Collection.extend({model:u}),d=l.a.Collection.extend({model:c}),f=n(3),p=l.a.View.extend({events:{click:"handleClick",mousedown:"startDrag",dragstart:"handleDragStart",drag:"handleDrag",dragend:"handleDragEnd"},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model;this.em=e.em,this.config=e,this.endDrag=this.endDrag.bind(this),this.ppfx=e.pStylePrefix||"",this.listenTo(n,"destroy remove",this.remove),this.listenTo(n,"change",this.render)},handleClick:function(){var t=this.config,e=this.model,n=this.em;if(t.appendOnClick){var r,i=t.getSorter(),o=e.get("content"),a=n.getSelected();if(i.setDropContent(o),a)if(i.validTarget(a.getEl(),o).valid)r=a;else{var s=a.parent();i.validTarget(s.getEl(),o).valid&&(r=s)}if(!r){var l=n.getWrapper();i.validTarget(l.getEl(),o).valid&&(r=l)}var c=r&&r.append(o)[0];c&&n.setSelected(c,{scroll:1})}},startDrag:function(t){var e=this.config,n=this.em;if(0===t.button&&e.getSorter&&!this.el.draggable){n.refreshCanvas();var r=e.getSorter();r.setDragHelper(this.el,t),r.setDropContent(this.model.get("content")),r.startSort(this.el),Object(f.s)(document,"mouseup",this.endDrag)}},handleDragStart:function(t){var e=this.em,n=this.model,r=n.get("content"),i=Object(o.isObject)(r)?JSON.stringify(r):r;e.set("dragResult"),t.dataTransfer.setData("text",i),e.set("dragContent",r),e.trigger("block:drag:start",n,t)},handleDrag:function(t){this.em.trigger("block:drag",this.model,t)},handleDragEnd:function(){var t=this.em,e=this.model,n=t.get("dragResult");if(n){var r=n.get&&n.get("activeOnRender");(e.get("activate")||r)&&(n.trigger("active"),n.set("activeOnRender",0)),e.get("select")&&t.setSelected(n),e.get("resetId")&&n.onAll((function(t){return t.resetId()}))}t.set({dragResult:null,dragContent:null}),t.trigger("block:drag:stop",n,e)},endDrag:function(t){Object(f.r)(document,"mouseup",this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.em,e=this.el,n=this.ppfx,r=this.model,i="".concat(n,"block"),o=t&&t.t("blockManager.labels.".concat(r.id))||r.get("label"),a=r.get("render"),s=r.get("media");e.className+=" ".concat(i," ").concat(n,"one-bg ").concat(n,"four-color-h"),e.innerHTML="\n ".concat(s?'
').concat(s,"
"):"",'\n
').concat(o,"
\n "),e.title=e.textContent.trim(),Object(f.j)(t)&&e.setAttribute("draggable",!0);var l=a&&a({el:e,model:r,className:i,prefix:n});return l&&(e.innerHTML=l),this}}),g=l.a.View.extend({template:Object(o.template)('\n
\n \n <%= label %>\n
\n
\n '),events:{},initialize:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config=t;var e=t.pStylePrefix||"";this.em=t.em,this.pfx=e,this.caretR="fa fa-caret-right",this.caretD="fa fa-caret-down",this.iconClass="".concat(e,"caret-icon"),this.activeClass="".concat(e,"open"),this.className="".concat(e,"block-category"),this.events["click .".concat(e,"title")]="toggle",this.listenTo(this.model,"change:open",this.updateVisibility),this.delegateEvents()},updateVisibility:function(){this.model.get("open")?this.open():this.close()},open:function(){this.el.className="".concat(this.className," ").concat(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretD),this.getBlocksEl().style.display=""},close:function(){this.el.className=this.className,this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretR),this.getBlocksEl().style.display="none"},toggle:function(){var t=this.model;t.set("open",!t.get("open"))},getIconEl:function(){return this.iconEl||(this.iconEl=this.el.querySelector("."+this.iconClass)),this.iconEl},getBlocksEl:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector("."+this.pfx+"blocks-c")),this.blocksEl},append:function(t){this.getBlocksEl().appendChild(t)},render:function(){var t=this.em,e=this.el,n=this.$el,r=this.model,i=t.t("blockManager.categories.".concat(r.id))||r.get("label");return e.innerHTML=this.template({pfx:this.pfx,label:i}),e.className=this.className,n.css({order:r.get("order")}),this.updateVisibility(),this}});function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function m(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};this.config=m({},this.config,{},t)},getSorter:function(){if(this.em){if(!this.sorter){var t=this.em.get("Utils"),e=this.canvas;this.sorter=new t.Sorter({container:e.getBody(),placer:e.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onStart:this.onDrag,onEndMove:this.onDrop,onMove:this.onMove,document:e.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1,em:this.em,canvasRelative:1})}return this.sorter}},onDrag:function(t){this.em.stopDefault(),this.em.trigger("block:drag:start",t)},onMove:function(t){this.em.trigger("block:drag:move",t)},onDrop:function(t){var e=this.em;e.runDefault(),t&&t.get&&(t.get("activeOnRender")&&(t.trigger("active"),t.set("activeOnRender",0)),e.trigger("block:drag:stop",t))},addTo:function(t){this.add(t)},add:function(t,e){var n=this.config,r=e||null,i=new p({model:t,attributes:t.get("attributes")},n).render().el,a=t.get("category");if(a&&this.categories&&!n.ignoreCategories){Object(o.isString)(a)?a={id:a,label:a}:Object(o.isObject)(a)&&!a.id&&(a.id=a.label);var s=this.categories.add(a),l=s.get("id"),c=this.renderedCategories[l],u=this.getCategoriesEl();return t.set("category",s),!c&&u&&(c=new g({model:s},this.config).render(),this.renderedCategories[l]=c,u.appendChild(c.el)),void(c&&c.append(i))}r?r.appendChild(i):this.append(i)},getCategoriesEl:function(){return this.catsEl||(this.catsEl=this.el.querySelector(".".concat(this.catsClass))),this.catsEl},getBlocksEl:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector(".".concat(this.noCatClass," .").concat(this.blockContClass))),this.blocksEl},append:function(t){var e=this.getBlocksEl();e&&e.appendChild(t)},render:function(){var t=this,e=this.ppfx,n=document.createDocumentFragment();this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n '),this.collection.each((function(e){return t.add(e,n)})),this.append(n);var r="".concat(this.blockContClass,"s ").concat(e,"one-bg ").concat(e,"two-color");return this.$el.addClass(r),this}});function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},o=t||this.getAll().models;return e.external?new y({collection:new h(o),categories:i},w({},r,{},e)).render().el:(n.rendered||(n.render(),n.rendered=1),n.updateConfig(e),n.collection.reset(o),this.getContainer())}}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i={stylePrefix:"trt-",appendTo:"",optionsTarget:[{value:!1},{value:"_blank"}]},o=n(29),a=n(2),s=n.n(a),l=n(66),c=n.n(l),u=n(1),h=n.n(u),d=n(3);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var p=h.a.$,g=h.a.View.extend({events:{},eventCapture:["change"],appendInput:1,attributes:function(){return this.model.get("attributes")},templateLabel:function(){var t=this.ppfx,e=this.getLabel();return'
').concat(e,"
")},templateInput:function(){var t=this.clsField;return'
')},initialize:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.config,r=void 0===n?{}:n,i=this.model,o=this.eventCapture,a=i.target,s=i.attributes.type;this.config=r,this.em=r.em,this.pfx=r.stylePrefix||"",this.ppfx=r.pStylePrefix||"",this.target=a;var l=this.ppfx;this.clsField="".concat(l,"field ").concat(l,"field-").concat(s),[["change:value",this.onValueChange],["remove",this.removeView]].forEach((function(e){var n=c()(e,2),r=n[0],o=n[1];i.off(r,o),t.listenTo(i,r,o)})),i.view=this,this.listenTo(i,"change:label",this.render),this.listenTo(i,"change:placeholder",this.rerender),o.forEach((function(e){return t.events[e]="onChange"})),this.delegateEvents(),this.init()},getClbOpts:function(){return{component:this.target,trait:this.model,elInput:this.getInputElem()}},removeView:function(){this.remove(),this.removed()},init:function(){},removed:function(){},onRender:function(){},onUpdate:function(){},onEvent:function(){},onChange:function(t){var e=this.getInputElem();e&&!Object(r.isUndefined)(e.value)&&this.model.set("value",e.value),this.onEvent(function(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{};if(n.fromTarget)this.setInputValue(t.get("value")),this.postUpdate();else{var r=this.getValueForTarget();t.setTargetValue(r,n)}},renderLabel:function(){var t=this.$el,e=this.target,n=this.getLabel(),r=this.templateLabel(e);this.createLabel&&(r=this.createLabel({label:n,component:e,trait:this})||""),t.find("[data-label]").append(r)},getLabel:function(){var t=this.em,e=this.model.attributes,n=e.label,r=e.name;return t.t("traitManager.traits.labels.".concat(r))||Object(d.c)(n||r).replace(/-/g," ")},getComponent:function(){return this.target},getInputEl:function(){if(!this.$input){var t=this.em,e=this.model,n=e,i=e.attributes.name,o=n.get("placeholder")||n.get("default")||"",a=n.get("type")||"text",s=n.get("min"),l=n.get("max"),c=this.getModelValue(),u=p('')),h=t.t("traitManager.traits.attributes.".concat(i))||{};u.attr(h),Object(r.isUndefined)(c)||(n.set({value:c},{silent:!0}),u.prop("value",c)),s&&u.prop("min",s),l&&u.prop("max",l),this.$input=u}return this.$input.get(0)},getInputElem:function(){var t=this.input,e=this.$input;return t||e&&e.get&&e.get(0)||this.getElInput()},getModelValue:function(){var t,e=this.model,n=this.target,i=e.get("name");if(e.get("changeProp"))t=n.get(i);else{var o=n.get("attributes");t=e.get("value")||o[i]}return Object(r.isUndefined)(t)?"":t},getElInput:function(){return this.elInput},renderField:function(){var t=this.$el,e=this.appendInput,n=this.model,i=t.find("[data-input]"),o=i[i.length-1],a=n.el;a||(a=this.createInput?this.createInput(this.getClbOpts()):this.getInputEl()),Object(r.isString)(a)?(o.innerHTML=a,this.elInput=o.firstChild):(e?o.appendChild(a):o.insertBefore(a,o.firstChild),this.elInput=a),n.el=this.elInput},hasLabel:function(){var t=this.model.attributes.label;return!this.noLabel&&!1!==t},rerender:function(){this.model.el=null,this.render()},postUpdate:function(){this.onUpdate(this.getClbOpts())},render:function(){var t=this.$el,e=this.pfx,n=this.ppfx,i=this.model.attributes.type,o=this.hasLabel&&this.hasLabel(),a="".concat(e,"trait");this.$input=null;var s='
\n ').concat(o?'
'):"",'\n
\n ').concat(this.templateInput?Object(r.isFunction)(this.templateInput)?this.templateInput(this.getClbOpts()):this.templateInput:"","\n
\n
");return t.empty().append(s),o&&this.renderLabel(),this.renderField(),this.el.className="".concat(a,"__wrp"),this.postUpdate(),this.onRender(this.getClbOpts()),this}}),v=h.a.$,m=g.extend({init:function(){this.listenTo(this.model,"change:options",this.rerender)},templateInput:function(){var t=this.ppfx,e=this.clsField;return'
\n
\n
\n
\n
\n
')},getInputEl:function(){if(!this.$input){var t=this.model,e=this.em,n=t.get("name"),i=t.get("options")||[],o="",this.$input=v(o);var a=t.getTargetValue();!Object(r.isUndefined)(a)&&this.$input.val(a)}return this.$input.get(0)}}),y=g.extend({appendInput:0,templateInput:function(){var t=this.ppfx,e=this.clsField;return'')},onChange:function(){var t=this.getInputElem().checked;this.model.set("value",this.getCheckedValue(t))},getCheckedValue:function(t){var e=t,n=this.model.attributes,i=n.valueTrue,o=n.valueFalse;return e&&!Object(r.isUndefined)(i)&&(e=i),e||Object(r.isUndefined)(o)||(e=o),e},getInputEl:function(){for(var t=!this.$input,e=arguments.length,n=new Array(e),i=0;i').concat(a,"")}}),S=o.a.extend({ns:"Traits",itemView:g,reuseView:1,itemsView:{text:g,number:w,select:m,checkbox:y,color:C,button:O},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.config||{};this.config=e,this.em=t.editor,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.className=this.pfx+"traits";var n="component:toggled";this.listenTo(this.em,n,this.updatedCollection),this.updatedCollection()},updatedCollection:function(){var t=this.ppfx,e=this.em.getSelected();this.el.className="".concat(this.className," ").concat(t,"one-bg ").concat(t,"two-color"),this.collection=e?e.get("traits"):[],this.render()}});e.default=function(){var t,e={};return{TraitsView:S,name:"TraitManager",getConfig:function(){return e},init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=n,Object(r.defaults)(e,i);var o=e.pStylePrefix;return o&&(e.stylePrefix="".concat(o).concat(e.stylePrefix)),t=new S({collection:[],editor:e.em,config:e}),this},postRender:function(){var t=this.getConfig().appendTo;t&&(Object(r.isElement)(t)?t:document.querySelector(t)).appendChild(this.render())},getTraitsViewer:function(){return t},addType:function(e,n){var r=t.itemView;t.itemsView[e]=r.extend(n)},getType:function(e){return t.itemsView[e]},render:function(){return t.render().el}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(21),a=n.n(o),s={stylePrefix:"gjs-",components:"",style:"",fromElement:0,noticeOnUnload:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",log:["warning","error"],baseCss:"\n * {\n box-sizing: border-box;\n }\n html, body, #wrapper {\n min-height: 100%;\n }\n body {\n margin: 0;\n height: 100%;\n background-color: #fff\n }\n #wrapper {\n overflow: auto;\n overflow-x: hidden;\n }\n\n * ::-webkit-scrollbar-track {\n background: rgba(0, 0, 0, 0.1)\n }\n\n * ::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2)\n }\n\n * ::-webkit-scrollbar {\n width: 10px\n }\n ",protectedCss:"* { box-sizing: border-box; } body {margin: 0;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:1,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",keepEmptyTextNodes:0,jsInHtml:!0,nativeDnD:1,multipleSelection:1,exportWrapper:0,wrapperIsBody:1,avoidInlineStyle:1,avoidDefaults:1,clearStyles:0,dragMode:0,cssIcons:"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css",el:"",i18n:{},undoManager:{},assetManager:{},canvas:{},layers:{},storageManager:{},richTextEditor:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{devices:[{id:"desktop",name:"Desktop",width:""},{id:"tablet",name:"Tablet",width:"768px",widthMedia:"992px"},{id:"mobileLandscape",name:"Mobile landscape",width:"568px",widthMedia:"768px"},{id:"mobilePortrait",name:"Mobile portrait",width:"320px",widthMedia:"480px"}]},styleManager:{sectors:[{name:"General",open:!1,buildProps:["float","display","position","top","right","left","bottom"]},{name:"Flex",open:!1,buildProps:["flex-direction","flex-wrap","justify-content","align-items","align-content","order","flex-basis","flex-grow","flex-shrink","align-self"]},{name:"Dimension",open:!1,buildProps:["width","height","max-width","min-height","margin","padding"]},{name:"Typography",open:!1,buildProps:["font-family","font-size","font-weight","letter-spacing","color","line-height","text-align","text-shadow"],properties:[{property:"text-align",list:[{value:"left",className:"fa fa-align-left"},{value:"center",className:"fa fa-align-center"},{value:"right",className:"fa fa-align-right"},{value:"justify",className:"fa fa-align-justify"}]}]},{name:"Decorations",open:!1,buildProps:["border-radius-c","background-color","border-radius","border","box-shadow","background"]},{name:"Extra",open:!1,buildProps:["transition","perspective","transform"]}]},blockManager:{},traitManager:{},textViewCode:"Code",keepUnusedStyles:0,multiFrames:0},l=n(0),c=n(1),u=n.n(c),h=n(3);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};this.config=e,this.set("Config",e),this.set("modules",[]),this.set("toLoad",[]),this.set("storables",[]),this.set("dmode",e.dragMode);var n=e.el,r=e.log,i=!0===r?Object(l.keys)(b):Object(l.isArray)(r)?r:[];n&&e.fromElement&&(this.config.components=n.innerHTML),this.attrsOrig=n?Object(l.toArray)(n.attributes).reduce((function(t,e){return t[e.nodeName]=e.nodeValue,t}),{}):"",v.forEach((function(e){return t.loadModule(e)})),this.on("change:componentHovered",this.componentHovered,this),this.on("change:changesCount",this.updateChanges,this),i.forEach((function(e){return t.listenLog(e)})),[{from:"change:selectedComponent",to:"component:toggled"}].forEach((function(e){var n=e.from,r=e.to;t.listenTo(t,n,(function(){for(var e=arguments.length,i=new Array(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach((function(t){t.onLoad()}));var r=function(){t.get("modules").forEach((function(e){return e.postLoad&&e.postLoad(t)})),e&&e()};n&&n.canAutoload()?this.load(r):r()},updateChanges:function(){var t=this,e=this.get("StorageManager"),n=this.get("changesCount");g&&clearTimeout(g),g=setTimeout((function(){return t.trigger("update")})),this.config.noticeOnUnload&&(window.onbeforeunload=n?function(t){return 1}:null),e.isAutosave()&&n>=e.getStepsBeforeSave()&&this.store()},loadModule:function(t){var e=this.config,n=new(t.default||t),r=n.name.charAt(0).toLowerCase()+n.name.slice(1),i=Object(l.isUndefined)(e[r])?e[n.name]:e[r],o=i||{},a=this.get("StorageManager");if(o.pStylePrefix=e.pStylePrefix||"",Object(l.isUndefined)(i)||i||(o._disable=1),n.storageKey&&n.store&&n.load&&a){o.stm=a;var s="domComponents"==r?"unshift":"push";this.get("storables")[s](n)}return o.em=this,n.init(f({},o)),!n.private&&this.set(n.name,n),n.onLoad&&this.get("toLoad").push(n),this.get("modules").push(n),this},init:function(t){this.set("Editor",t)},getEditor:function(){return this.get("Editor")},handleUpdates:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.temporary||(p&&clearInterval(p),p=setTimeout((function(){r.avoidStore||n.set("changesCount",n.get("changesCount")+1,r)}),0))},componentHovered:function(t,e,n){var r=this.previous("componentHovered");r&&this.trigger("component:unhovered",r,n),e&&this.trigger("component:hovered",e,n)},getSelected:function(){return this.get("selected").last()},getSelectedAll:function(){return this.get("selected").models},setSelected:function(t){var e,n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.scroll,o=Object(l.isArray)(t),a=o?t:[t],s=this.get("selected");o&&this.removeSelected(s.filter((function(t){return!Object(l.contains)(a,t)}))),a.forEach((function(t){var i=Object(h.g)(t,y);i&&!i.get("selectable")||(!o&&n.removeSelected(s.filter((function(t){return t!==i}))),n.addSelected(i,r),e=i)})),i&&e&&this.get("Canvas").scrollTo(e,i)},addSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(h.g)(t,y),i=Object(l.isArray)(r)?r:[r];i.forEach((function(t){if(!t||t.get("selectable")){var r=e.get("selected");n.forceChange&&r.remove(t,n),r.push(t,n)}}))},removeSelected:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.get("selected").remove(Object(h.g)(t,y),e)},toggleSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(h.g)(t,y),i=Object(l.isArray)(r)?r:[r];i.forEach((function(t){e.get("selected").contains(t)?e.removeSelected(t,n):e.addSelected(t,n)}))},setHovered:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(h.g)(t,y);n&&!n.get("hoverable")||(e.forceChange&&this.set("componentHovered",""),this.set("componentHovered",n,e))},setComponents:function(t){return this.get("DomComponents").setComponents(t)},getComponents:function(){var t=this.get("DomComponents"),e=this.get("CodeManager");if(t&&e){var n=t.getComponents();return e.getCode(n,"json")}},setStyle:function(t){for(var e=this.get("CssComposer").getAll(),n=0,r=e.length;n".concat(r,"<\/script>"):""},getCss:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.config,n=e.wrapperIsBody,r=t.avoidProtected,i=Object(l.isUndefined)(t.keepUnusedStyles)?e.keepUnusedStyles:t.keepUnusedStyles,o=this.get("CssComposer"),a=this.get("DomComponents").getComponent(),s=r?"":e.protectedCss;return s+this.get("CodeManager").getCode(a,"css",{cssc:o,wrapperIsBody:n,keepUnusedStyles:i})},getJs:function(){var t=this.get("DomComponents").getWrapper();return this.get("CodeManager").getCode(t,"js").trim()},store:function(t){var e=this,n=this.get("StorageManager"),r={};if(n)return this.get("storables").forEach((function(t){var e=t.store(1);for(var n in e)r[n]=e[n]})),n.store(r,(function(n){t&&t(n),e.set("changesCount",0),e.trigger("storage:store",r)})),r},load:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getCacheLoad(1,(function(n){t.get("storables").forEach((function(t){return t.load(n)})),e&&e(n)}))},getCacheLoad:function(t,e){var n=this;if(this.cacheLoad&&!t)return this.cacheLoad;var r=this.get("StorageManager"),i=[];if(!r)return{};this.get("storables").forEach((function(t){var e=t.storageKey;e=Object(l.isFunction)(e)?e():e,(Object(l.isArray)(e)?e:[e]).forEach((function(t){return i.push(t)}))})),r.load(i,(function(t){n.cacheLoad=t,e&&e(t),setTimeout((function(){return n.trigger("storage:load",t)}))}))},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.get("Commands").get(this.config.defaultCommand);e&&!this.defaultRunning&&(e.stop(this,this,t),e.run(this,this,t),this.defaultRunning=1)},stopDefault:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.get("Commands").get(this.config.defaultCommand);e&&(e.stop(this,this,t),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",null),this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},getCurrentMedia:function(){var t=this.config,e=this.getDeviceModel(),n=t.mediaCondition,r=t.devicePreviewMode,i=e&&e.get("widthMedia");return e&&i&&!r?"(".concat(n,": ").concat(i,")"):""},getWrapper:function(){return this.get("DomComponents").getWrapper()},getDirtyCount:function(){return this.get("changesCount")},getZoomDecimal:function(){return this.get("Canvas").getZoomDecimal()},setDragMode:function(t){return this.set("dmode",t)},t:function(){var t;return(t=this.get("I18n")).t.apply(t,arguments)},inAbsoluteMode:function(){return"absolute"===this.get("dmode")},destroyAll:function(){var t=this.attributes,e=t.DomComponents,n=t.CssComposer,r=t.UndoManager,i=t.Panels,o=t.Canvas,a=t.Keymaps,s=t.RichTextEditor;e.clear(),n.clear(),r.clear().removeAll(),i.getPanels().reset(),o.getCanvasView().remove(),a.removeAll(),s.destroy(),this.view.remove(),this.stopListening(),y(this.config.el).empty().attr(this.attrsOrig)},setEditing:function(t){return this.set("editing",t),this},isEditing:function(){return!!this.get("editing")},log:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.ns,r=e.level,i=void 0===r?"debug":r;if(this.trigger("log",t,e),i&&this.trigger("log:".concat(i),t,e),n){var o="log-".concat(n);this.trigger(o,t,e),i&&this.trigger("".concat(o,":").concat(i),t,e)}},logInfo:function(t,e){this.log(t,f({},e,{level:"info"}))},logWarning:function(t,e){this.log(t,f({},e,{level:"warning"}))},logError:function(t,e){this.log(t,f({},e,{level:"error"}))},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),Object(l.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}}),x=u.a.$,C=u.a.View.extend({initialize:function(){var t=this,e=this.model;e.view=this,this.conf=e.config,this.pn=e.get("Panels"),e.on("loaded",(function(){t.pn.active(),t.pn.disableButtons(),e.runDefault(),setTimeout((function(){return e.trigger("load",e.get("Editor"))}))}))},render:function(){var t=this.model,e=this.$el,n=this.conf,r=n.stylePrefix,i=x(n.el||"body ".concat(n.container));return Object(h.a)(n.cssIcons,{unique:1,prepand:1}),e.empty(),n.width&&i.css("width",n.width),n.height&&i.css("height",n.height),e.append(t.get("Canvas").render()),e.append(this.pn.render()),e.attr("class","".concat(r,"editor ").concat(r,"one-bg ").concat(r,"two-color")),i.addClass("".concat(r,"editor-cont")).empty().append(e),this}});function O(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function S(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=S({},s,{},t);e.pStylePrefix=e.stylePrefix;var n=new w(e),r=new C({model:n,config:e});return{$:a.a,editor:n,I18n:n.get("I18n"),DomComponents:n.get("DomComponents"),LayerManager:n.get("LayerManager"),CssComposer:n.get("CssComposer"),StorageManager:n.get("StorageManager"),AssetManager:n.get("AssetManager"),BlockManager:n.get("BlockManager"),TraitManager:n.get("TraitManager"),SelectorManager:n.get("SelectorManager"),CodeManager:n.get("CodeManager"),Commands:n.get("Commands"),Keymaps:n.get("Keymaps"),Modal:n.get("Modal"),Panels:n.get("Panels"),StyleManager:n.get("StyleManager"),Canvas:n.get("Canvas"),UndoManager:n.get("UndoManager"),DeviceManager:n.get("DeviceManager"),RichTextEditor:n.get("RichTextEditor"),Parser:n.get("Parser"),Utils:n.get("Utils"),Config:n.get("Config"),init:function(){return n.init(this),this},getConfig:function(t){return n.getConfig(t)},getHtml:function(t){return n.getHtml(t)},getCss:function(t){return n.getCss(t)},getJs:function(){return n.getJs()},getComponents:function(){return n.get("DomComponents").getComponents()},getWrapper:function(){return n.get("DomComponents").getWrapper()},setComponents:function(t){return n.setComponents(t),this},addComponents:function(t,e){return this.getWrapper().append(t,e)},getStyle:function(){return n.get("CssComposer").getAll()},setStyle:function(t){return n.setStyle(t),this},getSelected:function(){return n.getSelected()},getSelectedAll:function(){return n.getSelectedAll()},getSelectedToStyle:function(){var t=n.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t,e){return n.setSelected(t,e),this},selectAdd:function(t){return n.addSelected(t),this},selectRemove:function(t){return n.removeSelected(t),this},selectToggle:function(t){return n.toggleSelected(t),this},setDevice:function(t){return n.set("device",t),this},getDevice:function(){return n.get("device")},runCommand:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.get("Commands").run(t,e)},stopCommand:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.get("Commands").stop(t,e)},store:function(t){return n.store(t)},load:function(t){return n.load(t)},getContainer:function(){return e.el},getDirtyCount:function(){return n.getDirtyCount()},refresh:function(){n.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},setCustomParserCss:function(t){return this.Parser.getConfig().parserCss=t,this},setDragMode:function(t){return n.setDragMode(t),this},log:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.log(t,e),this},t:function(){return n.t.apply(n,arguments)},on:function(t,e){return n.on(t,e),this},once:function(t,e){return n.once(t,e),this},off:function(t,e){return n.off(t,e),this},trigger:function(t){return n.trigger.apply(n,arguments),this},destroy:function(){return n.destroyAll()},getEl:function(){return r.el},getModel:function(){return n},render:function(){var t=this;return n.on("loaded",(function(){t.UndoManager.clear(),n.get("modules").forEach((function(t){t.postRender&&t.postRender(r)}))})),r.render(),r.el}}},T={plugins:[]};function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function j(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=t.container;if(!e)throw new Error("'container' is required");(t=j({},D,{},t)).el=Object(l.isElement)(e)?e:document.querySelector(e);var n=new k(t).init();return t.plugins.forEach((function(e){var r=E.get(e),i=t.pluginsOpts[e]||{};if(!r){var o=window[e];r=o&&o.default?o.default:o}r?r(n,i):Object(l.isFunction)(e)?e(n,i):console.warn("Plugin ".concat(e," not found"))})),n.getModel().loadOnStart(),t.autorender&&n.render(),M.push(n),n}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i={stylePrefix:"cm-",inlineCss:!1},o=n(2),a=n.n(o),s=n(1),l=n.n(s);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n=t.get("components");return e.exportWrapper?t.toHTML(u({},e.wrapperIsBody&&{tag:"body"})):this.buildModels(n)},buildModels:function(t){var e="";return t.each((function(t){e+=t.toHTML()})),e}}),d=Number.MAX_VALUE,f=l.a.Model.extend({initialize:function(){this.compCls=[],this.ids=[]},buildFromModel:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="",i=this.em,o=i&&i.getConfig("avoidInlineStyle"),a=t.styleToString(),s=t.get("classes"),l=n.wrapperIsBody,c=t.get("wrapper");if(this.ids.push("#".concat(t.getId())),s.each((function(t){return e.compCls.push(t.getFullName())})),!o&&a){var u="#".concat(t.getId());r="".concat(u=l&&c?"body":u,"{").concat(a,"}")}var h=t.components();return h.each((function(t){return r+=e.buildFromModel(t,n)})),r},build:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.cssc,o=n.em||"";this.em=o,this.compCls=[],this.ids=[];var a=this.buildFromModel(t,n),s=Object(r.isUndefined)(n.clearStyles)&&o?o.getConfig("clearStyles"):n.clearStyles;if(i){var l=i.getAll(),c={},u=[];l.each((function(t){var r=t.getAtRule();if(r){var i=c[r];i?i.push(t):c[r]=[t]}else a+=e.buildFromRule(t,u,n)})),this.sortMediaObject(c).forEach((function(t){var r="",i=t.key;t.value.forEach((function(t){var o=e.buildFromRule(t,u,n);t.get("singleAtRule")?a+="".concat(i,"{").concat(o,"}"):r+=o})),r&&(a+="".concat(i,"{").concat(r,"}"))})),o&&s&&l.remove(u)}return a},buildFromRule:function(t,e){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="",a=t.selectorsToString({skipAdd:1}),s=t.get("selectorsAdd"),l=t.get("singleAtRule");if(t.get("selectors").each((function(t){var e=t.getFullName();(r.compCls.indexOf(e)>=0||r.ids.indexOf(e)>=0||i.keepUnusedStyles)&&(n=1)})),a&&n||s||l){var c=t.getDeclaration();c&&(o+=c)}else e.push(t);return o},getQueryLength:function(t){var e=/(-?\d*\.?\d+)\w{0,}/.exec(t);return e?parseFloat(e[1]):d},sortMediaObject:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[];return Object(r.each)(e,(function(t,e){return n.push({key:e,value:t})})),n.sort((function(e,n){var r=[e.key,n.key].every((function(t){return-1!==t.indexOf("min-width")})),i=r?e.key:n.key,o=r?n.key:e.key;return t.getQueryLength(i)-t.getQueryLength(o)}))}}),p=l.a.Model.extend({build:function(t){var e=t.toJSON();return this.beforeEach(e),Object(r.each)(e,(function(t,n){var r=e[n];if(r instanceof l.a.Model)e[n]=this.build(r);else if(r instanceof l.a.Collection){var i=r;e[n]=[],i.length&&i.each((function(t,r){e[n][r]=this.build(t)}),this)}}),this),e},beforeEach:function(t){delete t.status}}),g=l.a.Model.extend({mapModel:function(t){var e="",n=t.get("script-export")||t.get("script"),i=t.get("type"),o=t.get("components"),a=t.getId();if(n){var s=t.get("attributes");s=Object(r.extend)({},s,{id:a}),t.set("attributes",s,{silent:1});var l=t.getScriptString(n);if(t.get("scriptUpdated"))this.mapJs[i+"-"+a]={ids:[a],code:l};else{var c=this.mapJs[i];c?c.ids.push(a):this.mapJs[i]={ids:[a],code:l}}}return o.each((function(t){e+=this.mapModel(t)}),this),e},build:function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var r=this.mapJs[n],i="#"+r.ids.join(", #");e+="\n var items = document.querySelectorAll('".concat(i,"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){").concat(r.code,"}.bind(items[i]))();\n }")}return e}}),v=n(10),m=n.n(v);n(76),n(36),n(79);function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var b=l.a.Model.extend({defaults:{input:"",label:"",codeName:"",theme:"hopscotch",readOnly:!0,lineNumbers:!0},init:function(t){return Object(r.bindAll)(this,"onChange"),this.editor=m.a.fromTextArea(t,function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},r=this.editor;r&&(r.setValue(t),r.autoFormatRange&&(m.a.commands.selectAll(r),r.autoFormatRange(r.getCursor(!0),r.getCursor(!1)),m.a.commands.goDocStart(r)),!n.noRefresh&&setTimeout((function(){return e.refresh()})))}}),w=l.a.View.extend({template:Object(r.template)('\n
\n \t
<%= label %>
\n \t
\n
'),initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix},render:function(){var t=this.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"editor-c"),this.$el.find("#"+this.pfx+"code").append(this.model.get("input")),this}});e.default=function(){var t={},e={},n={},o={},a={};return{getConfig:function(){return t},config:t,EditorView:w,name:"CodeManager",init:function(e){for(var r in t=e||{},i)r in t||(t[r]=i[r]);var o=t.pStylePrefix;return o&&(t.stylePrefix=o+t.stylePrefix),n.html=new h,n.css=new f,n.json=new p,n.js=new g,a.CodeMirror=new b,this.loadDefaultGenerators().loadDefaultViewers(),this},addGenerator:function(t,n){return e[t]=n,this},getGenerator:function(t){return e[t]||null},getGenerators:function(){return e},addViewer:function(t,e){return o[t]=e,this},getViewer:function(t){return o[t]||null},getViewers:function(){return o},createViewer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object(r.isUndefined)(t.type)?"CodeMirror":t.type,n=this.getViewer(e)&&this.getViewer(e).clone(),i=document.createElement("div"),o=document.createElement("textarea");return i.appendChild(o),n.set(t),n.init(o),n.setElement(i),n},updateViewer:function(t,e){t.setContent(e)},getCode:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.em=t.em;var i=this.getGenerator(n);return i?i.build(e,r):""},loadDefaultGenerators:function(){for(var t in n)this.addGenerator(t,n[t]);return this},loadDefaultViewers:function(){for(var t in a)this.addViewer(t,a[t]);return this}}}},function(t,e,n){"use strict";n.r(e);var r="sw-visibility",i="export-template",o="open-layers",a="open-blocks",s="fullscreen",l="preview",c={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:r,className:"fa fa-square-o",command:r,context:r,attributes:{title:"View components"}},{id:l,className:"fa fa-eye",command:l,context:l,attributes:{title:"Preview"}},{id:s,className:"fa fa-arrows-alt",command:s,context:s,attributes:{title:"Fullscreen"}},{id:i,className:"fa fa-code",command:i,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:"open-sm",className:"fa fa-paint-brush",command:"open-sm",active:!0,togglable:0,attributes:{title:"Open Style Manager"}},{id:"open-tm",className:"fa fa-cog",command:"open-tm",togglable:0,attributes:{title:"Settings"}},{id:o,className:"fa fa-bars",command:o,togglable:0,attributes:{title:"Open Layer Manager"}},{id:a,className:"fa fa-th-large",command:a,togglable:0,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300},u=n(1),h=n.n(u),d=n(35),f=h.a.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[],attributes:{}},initialize:function(t){this.btn=this.get("buttons")||[],this.buttons=new d.default(this.btn),this.set("buttons",this.buttons)}}),p=h.a.Collection.extend({model:f}),g=n(2),v=n.n(g),m=n(0);function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function b(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=this.commands,r=this.$el,i=this.activeCls,o=t.fromCollection,a=e.get("context"),s=e.get("options"),l=e.get("command"),c={};n&&Object(m.isString)(l)?c=n.get(l)||{}:Object(m.isFunction)(l)?c=n.create({run:l}):null!==l&&Object(m.isObject)(l)&&(c=n.create(l)),e.get("active")?(!o&&e.collection.deactivateAll(a,e),e.set("active",!0,{silent:!0}).trigger("checkActive"),n.runCommand(c,b({},s,{sender:e})),c.noStop&&e.set("active",!1)):(r.removeClass(i),n.stopCommand(c,b({},s,{sender:e,force:1})))},updateDisable:function(){var t=this.disableCls,e=this.model.get("disable");this.$el[e?"addClass":"removeClass"](t)},checkActive:function(){var t=this.model,e=this.$el,n=this.activeCls;t.get("active")?e.addClass(n):e.removeClass(n)},clicked:function(t){this.model.get("bntsVis")||this.model.get("disable")||this.toogleActive()},toogleActive:function(){var t=this.model,e=t.attributes,n=e.active,r=e.togglable;if(!n||r){t.set("active",!n);this.em.get("Commands").get("select-comp");n?t.get("runDefaultCommand")&&this.em.runDefault():t.get("stopDefaultCommand")&&this.em.stopDefault()}},render:function(){var t=this.model.get("label"),e=this.$el;return e.empty(),this.updateAttributes(),t&&e.append(t),this.checkActive(),this.updateDisable(),this}}),x=h.a.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset remove",this.render),this.className=this.pfx+"buttons"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,r=new w({model:t,config:this.config,parentM:this.parentM}).render().el;return n?n.appendChild(r):this.$el.append(r),r},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each((function(e){this.addToCollection(e,t)}),this),this.$el.append(t),this.$el.attr("class",Object(m.result)(this,"className")),this}});function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var O=h.a.View.extend({initialize:function(t){var e=t.config||{},n=this.model;this.config=e,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.buttons=n.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+n.get("id"),this.listenTo(n,"change:appendContent",this.appendContent),this.listenTo(n,"change:content",this.updateContent),this.listenTo(n,"change:visible",this.toggleVisible),n.view=this},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},toggleVisible:function(){this.model.get("visible")?this.$el.removeClass("".concat(this.ppfx,"hidden")):this.$el.addClass("".concat(this.ppfx,"hidden"))},attributes:function(){return this.model.get("attributes")},initResize:function(){var t=this.config.em,e=t?t.get("Editor"):"",n=this.model.get("resizable");if(e&&n){var r,i,o,a=!0===n?[1,1,1,1]:n,s=a.length,l=0;2==s?(r=a[0],o=a[0],i=a[1],l=a[1]):4==s&&(r=a[0],i=a[1],o=a[2],l=a[3]);var c=e.Utils.Resizer.init(function(t){for(var e=1;e";if(n.stopDefault(),n.inAbsoluteMode()){var u=n.get("DomComponents").getWrapper(),h=u.append({})[0],d=n.get("Commands").run("core:component-drag",{event:t,guidesInfo:1,center:1,target:h,onEnd:function(t,n,i){if(!i.cancelled){var o=u.append(c)[0],a=h.getStyle(),s=a.left,l=a.top,d=a.position;o.setStyle({left:s,top:l,position:d}),e.handleDragEnd(o,r)}h.remove()}});i=function(e){return d.stop(t,{cancel:e})},o=function(t){return c=t}}else{var f=new a.Sorter({em:n,wmargin:1,nested:1,canvasRelative:1,direction:"a",container:l,placer:s.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:"gjs-",onEndMove:function(t){return e.handleDragEnd(t,r)},document:s.getFrameEl().contentDocument});f.setDropContent(c),f.startSort(),this.sorter=f,i=function(t){t&&(f.moved=0),f.endMove()},o=function(t){return f.setDropContent(t)}}this.dragStop=i,this.dragContent=o,n.trigger("canvas:dragenter",r,c)}}},{key:"handleDragEnd",value:function(t,e){if(t){var n=this.em;n.set("dragResult",t),n.trigger("canvas:drop",e,t)}}},{key:"handleDragOver",value:function(t){t.preventDefault(),this.em.trigger("canvas:dragover",t)}},{key:"handleDrop",value:function(t){t.preventDefault();var e=this.dragContent,n=t.dataTransfer,r=this.getContentByData(n).content;t.target.style.border="",r&&e&&e(r),this.endDrop(!r,t)}},{key:"getContentByData",value:function(t){var e=this.em,n=t.types,r=t.files||[],i=e.get("dragContent"),o=t.getData("text");if(r.length){o=[];for(var a=0;a=0)o=t.getData("text/html").replace(/<\/?meta[^>]*>/g,"");else if(Object(g.indexOf)(n,"text/uri-list")>=0)o={type:"link",attributes:{href:o},content:o};else if(Object(g.indexOf)(n,"text/json")>=0){var c=t.getData("text/json");c&&(o=JSON.parse(c))}var u={content:o};return e.trigger("canvas:dragdata",t,u),u}}]),t}(),m={stylePrefix:"cv-",scripts:[],styles:[],customBadgeLabel:"",autoscrollLimit:50,notTextable:["button","a","input[type=checkbox]","input[type=radio]"]},y=n(1),b=n.n(y),w=b.a.Model.extend({defaults:{wrapper:"",width:"",height:"",head:"",attributes:{}},initialize:function(){this.set("head",[])},getHead:function(){return s()(this.get("head"))},setHead:function(t){return this.set("head",s()(t))},addHeadItem:function(t){var e=this.getHead();e.push(t),this.setHead(e)},getHeadByAttr:function(t,e,n){return this.getHead().filter((function(r){return r.attributes&&r.attributes[t]==e&&(!n||n===r.tag)}))[0]},removeHeadByAttr:function(t,e,n){var r=this.getHead(),i=this.getHeadByAttr(t,e,n),o=r.indexOf(i);o>=0&&(r.splice(o,1),this.setHead(r))},addLink:function(t){!this.getHeadByAttr("href",t,"link")&&this.addHeadItem({tag:"link",attributes:{href:t,rel:"stylesheet"}})},removeLink:function(t){this.removeHeadByAttr("href",t,"link")},addScript:function(t){!this.getHeadByAttr("src",t,"script")&&this.addHeadItem({tag:"script",attributes:{src:t}})},removeScript:function(t){this.removeHeadByAttr("src",t,"script")}}),x=b.a.Model.extend({defaults:{frame:"",wrapper:"",rulers:!1,zoom:100,x:0,y:0},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.styles,n=void 0===e?[]:e,r=t.scripts,i=void 0===r?[]:r,o=new w;n.forEach((function(t){return o.addLink(t)})),i.forEach((function(t){return o.addScript(t)})),this.set("frame",o),this.listenTo(this,"change:zoom",this.onZoomChange)},onZoomChange:function(){this.get("zoom")<1&&this.set("zoom",1)}}),C=n(11),O="transitionend oTransitionEnd transitionend webkitTransitionEnd",S=b.a.View.extend({tagName:"iframe",attributes:{allowfullscreen:"allowfullscreen"},initialize:function(t){Object(g.bindAll)(this,"updateOffset"),this.config=t.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.listenTo(this.model,"change:head",this.updateHead),this.listenTo(this.em,"change:device",this.updateDim)},updateHead:function(){var t=this.getHead();Object(C.c)(t),Object(C.b)(t,this.model.getHead())},updateDim:function(){var t=this.em,e=this.el,n=this.$el,r=e.style,i=t.getDeviceModel(),o=r.width||"",a=r.height||"",s=i?i.get("width"):"",l=i?i.get("height"):"",c=o==s&&a==l;r.width=s,r.height=l,this.updateOffset(),t.stopDefault({preserveSelected:1}),c?this.updateOffset():n.on(O,this.updateOffset)},updateOffset:function(){var t=this.em,e=t.get("Canvas").getOffset();t.set("canvasOffset",e),t.runDefault({preserveSelected:1}),this.$el.off(O,this.updateOffset)},getDoc:function(){return this.$el.get(0).contentDocument},getHead:function(){return this.getDoc().querySelector("head")},getBody:function(){return this.getDoc().querySelector("body")},getWrapper:function(){return this.$el.contents().find("body > div")},render:function(){return this.$el.attr({class:this.ppfx+"frame"}),this}}),k=b.a.$,T=b.a.View.extend({events:{wheel:"onWheel"},template:function(){var t=this.pfx;return'\n
\n
\n ')},initialize:function(t){Object(g.bindAll)(this,"renderBody","onFrameScroll","clearOff","onKeyPress"),Object(u.s)(window,"scroll resize",this.clearOff);var e=this.model;this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"canvas",this.listenTo(this.em,"change:canvasOffset",this.clearOff),this.listenTo(e,"change:zoom change:x change:y",this.updateFrames),this.toggleListeners(1),this.frame=new S({model:this.model.get("frame"),config:this.config})},remove:function(){b.a.View.prototype.remove.apply(this,arguments),this.toggleListeners()},preventDefault:function(t){t&&(t.preventDefault(),t._parentEvent&&t._parentEvent.preventDefault())},toggleListeners:function(t){var e=t?"on":"off";({on:u.s,off:u.r})[e](document,"keypress",this.onKeyPress)},onKeyPress:function(t){var e=this.em;" "===Object(u.f)(t)&&1!==e.getZoomDecimal()&&(this.preventDefault(t),e.get("Editor").runCommand("core:canvas-move"))},onWheel:function(t){if((t.ctrlKey||t.metaKey)&&this.em.getConfig("multiFrames")){this.preventDefault(t);var e=this.model,n=Math.max(-1,Math.min(1,t.wheelDelta||-t.detail)),r=e.get("zoom");e.set("zoom",r+2*n)}},updateFrames:function(t){var e=this.em,n=this.model.attributes,i=n.x,o=n.y,a=this.getZoom(),s={preserveSelected:1},l=a?1/a:1;this.framesArea.style.transform="scale(".concat(a,") translate(").concat(i*l,"px, ").concat(o*l,"px)"),this.clearOff(),this.onFrameScroll(),e.stopDefault(s),e.trigger("canvas:update",t),r&&clearTimeout(r),r=setTimeout((function(){return e.runDefault(s)}))},getZoom:function(){return this.em.getZoomDecimal()},isElInViewport:function(t){var e=Object(u.d)(Object(u.e)(t)),n=this.getFrameOffset(),r=e.top,i=e.left;return r>=0&&i>=0&&r<=n.height&&i<=n.width},onFrameScroll:function(){var t=this.frame.el.contentDocument.body,e=this.getZoom();this.toolsEl.style.top="-"+t.scrollTop*e+"px",this.toolsEl.style.left="-"+t.scrollLeft*e+"px",this.em.trigger("canvasScroll")},renderScripts:function(){var t=this.frame,e=this;t.el.onload=function(){!function n(r){if(r.length>0){var i=document.createElement("script");i.type="text/javascript",i.src=r.shift(),i.onerror=i.onload=n.bind(null,r),t.el.contentDocument.head.appendChild(i)}else e.renderBody()}(e.config.scripts.slice(0))}},renderBody:function(){var t=this,e=this.config,n=(this.model,this.model.get("frame").get("wrapper")),r=e.em;if(n){var i=r.get("Canvas"),o=this.ppfx,a=k(i.getBody()),s=k(i.getDocument().head),l=r.get("CssComposer"),c=r.get("Config"),u="";e.styles.forEach((function(t){u+='')}));var h="\n ".concat(r.config.baseCss||"","\n\n .").concat(o,"dashed *[data-highlightable] {\n outline: 1px dashed rgba(170,170,170,0.7);\n outline-offset: -2px;\n }\n\n .").concat(o,"comp-selected {\n outline: 3px solid #3b97e3 !important;\n outline-offset: -3px;\n }\n\n .").concat(o,"comp-selected-parent {\n outline: 2px solid ").concat("#ffca6f"," !important\n }\n\n .").concat(o,"no-select {\n user-select: none;\n -webkit-user-select:none;\n -moz-user-select: none;\n }\n\n .").concat(o,"freezed {\n opacity: 0.5;\n pointer-events: none;\n }\n\n .").concat(o,"no-pointer {\n pointer-events: none;\n }\n\n .").concat(o,"plh-image {\n background: #f5f5f5;\n border: none;\n height: 100px;\n width: 100px;\n display: block;\n outline: 3px solid #ffca6f;\n cursor: pointer;\n outline-offset: -2px\n }\n\n .").concat(o,"grabbing {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n .").concat(o,"is__grabbing {\n overflow-x: hidden;\n }\n\n .").concat(o,"is__grabbing,\n .").concat(o,"is__grabbing * {\n cursor: grabbing !important;\n }\n\n ").concat(c.canvasCss||"","\n ").concat(c.protectedCss||"","\n ");u&&s.append(u),a.append(""),a.append(n.render()).append(l.render()),a.append(this.getJsContainer()),r.trigger("loaded"),this.frame.el.contentWindow.onscroll=this.onFrameScroll,this.frame.updateOffset(),a.on("click",(function(t){return t&&"A"==t.target.tagName&&t.preventDefault()})),a.on("submit",(function(t){return t&&t.preventDefault()}));document;var d=this.frame.el.contentDocument;[{event:"keydown keyup keypress",class:"KeyboardEvent"},{event:"wheel",class:"WheelEvent"}].forEach((function(e){return e.event.split(" ").forEach((function(n){d.addEventListener(n,(function(n){return t.el.dispatchEvent(function(t,e){var n;try{n=new window[e](t.type,t)}catch(t){(n=document.createEvent(e)).initEvent(t.type,!0,!0)}return n.keyCodeVal=t.keyCode,n._parentEvent=t,["keyCode","which"].forEach((function(t){Object.defineProperty(n,t,{get:function(){return this.keyCodeVal}})})),n}(n,e.class))}))}))}))}},offset:function(t){var e=Object(u.d)(t),n=t.ownerDocument.body;return{top:e.top+n.scrollTop,left:e.left+n.scrollLeft,width:e.width,height:e.height}},clearOff:function(){this.frmOff=null,this.cvsOff=null},getFrameOffset:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.frmOff&&!t||(this.frmOff=this.offset(this.frame.el)),this.frmOff},getCanvasOffset:function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},getElementPos:function(t,e){var n=this.getZoom(),r=e||{},i=this.getFrameOffset(),o=this.getCanvasOffset(),a=this.offset(t),s=r.avoidFrameOffset?0:i.top,l=r.avoidFrameOffset?0:i.left;return{top:a.top*n+s-o.top,left:a.left*n+l-o.left,height:a.height*n,width:a.width*n,zoom:n,rect:a}},getElementOffsets:function(t){var e=this;if(!t||Object(u.o)(t))return{};var n={},r=window.getComputedStyle(t);return["marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft"].forEach((function(t){n[t]=parseFloat(r[t])*e.getZoom()})),n},getPosition:function(){var t=this.frame.el.contentDocument;if(t){var e=t.body,n=this.getZoom(),r=this.getFrameOffset(),i=this.getCanvasOffset();return{top:r.top+e.scrollTop*n-i.top,left:r.left+e.scrollLeft*n-i.left,width:i.width,height:i.height}}},updateScript:function(t){var e=t.model,n=e.getId();t.scriptContainer||(t.scriptContainer=k('
')),this.getJsContainer().appendChild(t.scriptContainer.get(0))),t.el.id=n,t.scriptContainer.html("");var r=document.createElement("script");r.innerHTML="\n setTimeout(function() {\n var item = document.getElementById('".concat(n,"');\n if (!item) return;\n (function(){\n ").concat(e.getScriptString(),";\n }.bind(item))()\n }, 1);"),setTimeout((function(){return t.scriptContainer.get(0).appendChild(r)}),0)},getJsContainer:function(){return this.jsContainer||(this.jsContainer=k('
')).get(0)),this.jsContainer},render:function(){var t=this.el,e=this.$el,n=this.ppfx,r=this.model;this.wrapper=r.get("wrapper"),e.html(this.template());var i=e.find("[data-frames]");if(this.framesArea=i.get(0),this.wrapper&&"function"==typeof this.wrapper.render){r.get("frame").set("wrapper",this.wrapper),i.append(this.frame.render().el);var o=this.frame;0===this.config.scripts.length?o.el.onload=this.renderBody:this.renderScripts()}e.find("[data-tools]").append('\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n '));var a=t.querySelector("#".concat(n,"tools"));return this.hlEl=t.querySelector(".".concat(n,"highlighter")),this.badgeEl=t.querySelector(".".concat(n,"badge")),this.placerEl=t.querySelector(".".concat(n,"placeholder")),this.ghostEl=t.querySelector(".".concat(n,"ghost")),this.toolbarEl=t.querySelector(".".concat(n,"toolbar")),this.resizerEl=t.querySelector(".".concat(n,"resizer")),this.offsetEl=t.querySelector(".".concat(n,"offset-v")),this.fixedOffsetEl=t.querySelector(".".concat(n,"offset-fixed-v")),this.toolsEl=a,this.el.className=this.className,this}});function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function j(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};r=j({},m,{},e),this.em=r.em;var i=r.pStylePrefix;i&&(r.stylePrefix=i+r.stylePrefix),t=new x(e),n=new T({model:t,config:r});var o=r.em.get("DomComponents");return o&&this.setWrapper(o),this.startAutoscroll=this.startAutoscroll.bind(this),this.stopAutoscroll=this.stopAutoscroll.bind(this),this.autoscroll=this.autoscroll.bind(this),this.updateClientY=this.updateClientY.bind(this),this},getConfig:function(){return r},setWrapper:function(e){t.set("wrapper",e)},getElement:function(){return n.el},getFrame:function(){return t.get("frame")},getFrameEl:function(){return n.frame.el},getWindow:function(){return this.getFrameEl().contentWindow},getDocument:function(){return this.getFrameEl().contentDocument},getBody:function(){var t=this.getDocument();return t&&t.body},getWrapperEl:function(){var t=this.getBody();return t&&t.querySelector("#wrapper")},getToolsEl:function(){return n.toolsEl},getHighlighter:function(){return n.hlEl},getBadgeEl:function(){return n.badgeEl},getPlacerEl:function(){return n.placerEl},getGhostEl:function(){return n.ghostEl},getToolbarEl:function(){return n.toolbarEl},getResizerEl:function(){return n.resizerEl},getOffsetViewerEl:function(){return n.offsetEl},getFixedOffsetViewerEl:function(){return n.fixedOffsetEl},render:function(){return n.render().el},getOffset:function(){var t=this.offset(this.getFrameEl()),e=this.offset(this.getElement());return{top:t.top-e.top,left:t.left-e.left}},offset:function(t){return n.offset(t)},setCustomBadgeLabel:function(t){r.customBadgeLabel=t},getElementPos:function(t,e){return n.getElementPos(t,e)},getElementOffsets:function(t){return n.getElementOffsets(t)},getRect:function(){var t=n.getPosition(),e=t.top,r=t.left;return j({},n.getCanvasOffset(),{topScroll:e,leftScroll:r})},getTargetToElementDim:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i||{},a=n.getPosition();if(a){var s=o.elPos||n.getElementPos(e),l=i.toRight||0,c=o.targetHeight||t.offsetHeight,u=o.targetWidth||t.offsetWidth,h=o.event||null,d=s.top-c,f=s.left;f+=l?s.width:0;var p=(f=l?f-u:f)s.top+s.height?s.top+s.height:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:a.top,canvasLeft:a.left,canvasWidth:a.width,canvasHeight:a.height};return h&&r.em&&r.em.trigger(h,v),v}},getMouseRelativePos:function(t,e){var n=0,r=0,i=(e||{}).subWinOffset,o=t.target.ownerDocument,a=o.defaultView||o.parentWindow,s=a.frameElement,l=i?a.pageYOffset:0,c=i?a.pageXOffset:0;if(s){var u=s.getBoundingClientRect();n=u.top||0,r=u.left||0}return{y:t.clientY+n-l,x:t.clientX+r-c}},getMouseRelativeCanvas:function(t){var e=this.getZoomDecimal(),r=n.getPosition(),i=r.top,o=r.left;return{y:t.clientY*e+i,x:t.clientX*e+o}},hasFocus:function(){return this.getDocument().hasFocus()},isInputFocused:function(){var t=this.getDocument(),e=["body"].concat(s()(this.getConfig().notTextable)),n=t&&t.activeElement;return n&&!e.some((function(t){return n.matches(t)}))},scrollTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(u.e)(t),r=this.getCanvasView();if(n&&(!r.isElInViewport(n)||e.force)){var i="object"===o()(e)?e:{behavior:"smooth",block:"nearest"};n.scrollIntoView(i)}},startAutoscroll:function(){var t=this;this.dragging=1;var r=this.getScrollListeners();e=n.getFrameOffset(1),setTimeout((function(){Object(u.s)(r,"mousemove dragover",t.updateClientY),Object(u.s)(r,"mouseup",t.stopAutoscroll),E(t.autoscroll)}),0)},updateClientY:function(t){t.preventDefault(),this.lastClientY=Object(u.h)(t).clientY*this.getZoomDecimal()},autoscroll:function(){if(this.dragging){var t=this.getFrameEl().contentWindow,n=t.document.body.scrollTop,r=this.lastClientY,i=this.getConfig().autoscrollLimit,o=e.height-i;ro&&(n+=r-o),t.scrollTo(0,n),E(this.autoscroll)}},stopAutoscroll:function(){this.dragging=0;var t=this.getScrollListeners();Object(u.r)(t,"mousemove dragover",this.updateClientY),Object(u.r)(t,"mouseup",this.stopAutoscroll)},getScrollListeners:function(){return[this.getFrameEl().contentWindow]},postRender:function(){Object(u.j)(r.em)&&(this.droppable=new v(r.em))},setZoom:function(e){return t.set("zoom",parseFloat(e)),this},getZoom:function(){return parseFloat(t.get("zoom"))},getZoomDecimal:function(){return this.getZoom()/100},getZoomMultiplier:function(){var t=this.getZoomDecimal();return t?1/t:1},getFrameWrapperEl:function(){return n.frame.getWrapper()}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(0),a={stylePrefix:"css-",staticRules:"",rules:[]},s=n(1),l=n.n(s),c=n(20),u=n(9),h=l.a.Model.extend(c.a).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0,atRuleType:"",singleAtRule:0,important:0},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config=t||{};var n=e.em,r=this.config.selectors||[];if(this.em=n,n){var i=n.get("SelectorManager"),o=[];r.forEach((function(t){o.push(i.add(t))})),r=o}this.set("selectors",new u.a(r))},getAtRule:function(){var t=this.get("atRuleType"),e=this.get("mediaText"),n=t?"@".concat(t):e?"@media":"";return n+(e&&n?" ".concat(e):"")},selectorsToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.em,r=this.get("state"),i=this.get("wrapper"),o=this.get("selectorsAdd"),a=i&&n&&n.getConfig("wrapperIsBody"),s=a?"body":this.get("selectors").getFullString(),l=r?":".concat(r):"";return s&&e.push("".concat(s).concat(l)),o&&!t.skipAdd&&e.push(o),e.join(", ")},getDeclaration:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="",n=this.selectorsToString(),r=this.styleToString(t),i=this.get("singleAtRule");return(n||i)&&r&&(e=i?r:"".concat(n,"{").concat(r,"}")),e},toCSS:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="",n=this.getAtRule(),r=this.getDeclaration(t);return r&&(e=r),n&&e&&(e="".concat(n,"{").concat(e,"}")),e},toJSON:function(){for(var t=arguments.length,e=new Array(t),n=0;n3&&void 0!==arguments[3]?arguments[3]:{},i=e||"",a=n||"",s=r.selectorsAdd||"",l=r.atRuleType||"";t instanceof Array||t.models||(t=[t]);var c=Object(o.map)(t.models||t,(function(t){return t.get("name")})),u=Object(o.map)(this.get("selectors").models,(function(t){return t.get("name")})),h=!1;if(c.length!==u.length)return h;for(var d=0;d1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=this.editor.get("Parser").parseCss(t)),e.em=this.editor,l.a.Collection.prototype.add.apply(this,[t,e])}}),f=l.a.View.extend({tagName:"style",initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{};var e=this.model,n="change:style change:state change:mediaText";this.listenTo(e,n,this.render),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e.get("selectors"),"change",this.render)},render:function(){var t=this.model.get("important");return this.el.innerHTML=this.model.toCSS({important:t}),this}}),p=f.extend({_createElement:function(t){return document.createTextNode("")},render:function(){var t=this.model,e=t.get("important");return this.el.textContent=t.getDeclaration({important:e}),this}}),g=l.a.$,v=function(t,e){return"".concat(t).concat(e?"-".concat(parseFloat(e)):"")},m=l.a.View.extend({initialize:function(t){var e=t.config||{};this.atRules={},this.config=e,this.em=e.em,this.pfx=e.stylePrefix||"",this.className=this.pfx+"rules";var n=this.collection;this.listenTo(n,"add",this.addTo),this.listenTo(n,"reset",this.render)},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){if(this.renderStarted){var n,r,i=e||null,o={model:t,config:this.config};if("keyframes"===t.get("atRuleType")){var a=t.getAtRule(),s=this.atRules[a];if(!s){var l=document.createElement("style");s=document.createTextNode(""),l.appendChild(document.createTextNode("".concat(a,"{"))),l.appendChild(s),l.appendChild(document.createTextNode("}")),this.atRules[a]=s,n=l}r=new p(o),s.appendData(r.render().el.textContent)}else n=(r=new f(o)).render().el;var c=this.className,u=t.get("mediaText"),h=v(c),d=h;if(u&&(d=v(c,this.getMediaWidth(u))),n){var g,m=i||this.el;try{g=m.querySelector("#".concat(d))}catch(t){}g||(g=m.querySelector("#".concat(h))),g.appendChild(n)}return n}},getMediaWidth:function(t){return t&&t.replace("(".concat(this.em.getConfig("mediaCondition"),": "),"").replace(")","")},render:function(){var t=this;this.renderStarted=1,this.atRules={};var e=this.em,n=this.$el,r=this.className,i=this.collection,o=document.createDocumentFragment();n.empty();var a=e.get("DeviceManager").getAll().pluck("priority");return a.every((function(t){return t}))&&a.unshift(0),a.forEach((function(t){return g('
')).appendTo(o)})),i.each((function(e){return t.addToCollection(e,o)})),n.append(o),n.attr("class",r),this}}),y=n(8);function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},r="change:style",i=t.get("UndoManager");i&&i.add(e);var o=t.handleUpdates.bind(t);t.stopListening(e,r,o),t.listenTo(e,r,o),!n.avoidStore&&o("","",n)},load:function(t){var n=t||"";!n&&r.stm&&(n=r.em.getCacheLoad());var i=n.styles||"";if(n.styles)try{i=JSON.parse(n.styles)}catch(t){}else n.css&&(i=r.em.get("Parser").parseCss(n.css));return Object(o.isArray)(i)?i.length&&e.reset(i):i&&e.reset(i),i},store:function(t){if(r.stm){var n={},i=this.storageKey();return i.indexOf("css")>=0&&(n.css=r.em.getCss()),i.indexOf("styles")>=0&&(n.styles=JSON.stringify(e)),t||r.stm.store(n),n}},add:function(t,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=n||"",s=i||"",l=w({},o),c=this.get(t,a,s,l);return c&&c.config&&!c.config.singleAtRule?c:(l.state=a,l.mediaText=s,l.selectors="",(c=new h(l,r)).get("selectors").add(t),e.add(c),c)},get:function(t,n,r,i){var o=null;return e.each((function(e){o||e.compare(t,n,r,i)&&(o=e)})),o},getAll:function(){return e},clear:function(){return this.getAll().reset(),this},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],i=t instanceof Array?t:[t],o=0,a=i.length;o2&&void 0!==arguments[2]?arguments[2]:{},i=r.atRuleType,o=r.atRuleParams,a=t.get("Parser").parserCss.checkNode({selectors:e,style:n})[0],s=a.state,l=a.selectorsAdd,c=t.get("SelectorManager"),u=c.add(a.selectors),h=this.add(u,s,o,{selectorsAdd:l,atRule:i});return h.setStyle(n,r),h},getRule:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.get("SelectorManager"),i=t.get("Parser").parserCss.checkNode({selectors:e})[0],o=r.get(i.selectors),a=i.state,s=i.selectorsAdd,l=n.atRuleType,c=n.atRuleParams;return o&&this.get(o,a,c,{selectorsAdd:s,atRule:l})},setIdRule:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.state||"",o=r.mediaText||t.getCurrentMedia(),a=t.get("SelectorManager"),s=a.add({name:e,type:y.a.TYPE_ID}),l=this.add(s,i,o);return l.setStyle(n,r),l},getIdRule:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.state||"",i=n.mediaText||t.getCurrentMedia(),o=t.get("SelectorManager").get(e,y.a.TYPE_ID);return o&&this.get(o,r,i)},setClassRule:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.state||"",o=r.mediaText||t.getCurrentMedia(),a=t.get("SelectorManager"),s=a.add({name:e,type:y.a.TYPE_CLASS}),l=this.add(s,i,o);return l.setStyle(n,r),l},getClassRule:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.state||"",i=n.mediaText||t.getCurrentMedia(),o=t.get("SelectorManager").get(e,y.a.TYPE_CLASS);return o&&this.get(o,r,i)},render:function(){return n.render().el}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o={devices:[]},a=n(1),s=n.n(a),l=s.a.Model.extend({idAttribute:"name",defaults:{name:"",width:null,height:"",widthMedia:null,priority:null},initialize:function(){var t=this;null===this.get("widthMedia")&&this.set("widthMedia",this.get("width")),null===this.get("width")&&this.set("width",this.get("widthMedia")),!this.get("priority")&&this.set("priority",parseFloat(this.get("widthMedia"))||0);["width","height","widthMedia"].forEach((function(e){return t.checkUnit(e)}))},checkUnit:function(t){var e=this.get(t)||"";(parseFloat(e)||0).toString()===e.toString()&&this.set(t,"".concat(e,"px"))}}),c=s.a.Collection.extend({model:l,comparator:function(t,e){var n=Number.MAX_VALUE;return(e.get("priority")||n)-(t.get("priority")||n)},getSorted:function(){return this.sort()}}),u=n(0),h=s.a.View.extend({template:Object(u.template)('\n
<%= deviceLabel %>
\n
\n \n \n \n
\n
\n
\n
\n '),events:{change:"updateDevice"},initialize:function(t){this.config=t.config||{},this.em=this.config.em,this.ppfx=this.config.pStylePrefix||"",this.events["click ."+this.ppfx+"add-trasp"]=this.startAdd,this.listenTo(this.em,"change:device",this.updateSelect),this.delegateEvents()},startAdd:function(){},updateDevice:function(){var t=this.em;if(t){var e=this.devicesEl,n=e?e.val():"";t.set("device",n)}},updateSelect:function(){var t=this.em,e=this.devicesEl;if(t&&t.getDeviceModel&&e){var n=t.getDeviceModel(),r=n?n.get("name"):"";e.val(r)}},getOptions:function(){var t=this.collection,e=this.em,n="";return t.each((function(t){var r=t.attributes,i=r.name,o=r.id,a=e&&e.t&&e.t("deviceManager.devices.".concat(o))||i;n+='")})),n},render:function(){var t=this.em,e=this.ppfx,n=this.$el,r=this.el;return n.html(this.template({ppfx:e,deviceLabel:t&&t.t&&t.t("deviceManager.device")})),this.devicesEl=n.find(".".concat(e,"devices")),this.devicesEl.append(this.getOptions()),r.className="".concat(e,"devices-c"),this}});function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{},i=f({},r,{id:e,name:r.name||e,width:n});return t.add(i)},get:function(e){return t.get(e)},getAll:function(){return t},render:function(){return e.render().el}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o={stylePrefix:"mdl-",title:"",content:"",backdrop:!0},a=n(1),s=n.n(a),l=s.a.Model.extend({defaults:{title:"",content:"",open:!1}}),c=s.a.View.extend({template:function(t){var e=t.pfx,n=t.ppfx,r=t.content,i=t.title;return'
\n
\n
').concat(i,'
\n
\n
\n
\n
').concat(r,'
\n
\n
\n
\n ')},events:{click:"onClick","click [data-close-modal]":"hide"},initialize:function(t){var e=this.model,n=t.config||{},r=n.stylePrefix||"";this.config=n,this.pfx=r,this.ppfx=n.pStylePrefix||"",this.listenTo(e,"change:open",this.updateOpen),this.listenTo(e,"change:title",this.updateTitle),this.listenTo(e,"change:content",this.updateContent)},onClick:function(t){this.config.backdrop&&t.target===this.el&&this.hide()},getCollector:function(){return this.$collector||(this.$collector=this.$el.find("."+this.pfx+"collector")),this.$collector},getContent:function(){var t=this.pfx;return this.$content||(this.$content=this.$el.find(".".concat(t,"content #").concat(t,"c"))),this.$content},getTitle:function(){return this.$title||(this.$title=this.$el.find("."+this.pfx+"title")),this.$title.get(0)},updateContent:function(){var t=this.getContent(),e=t.children(),n=this.getCollector(),r=this.model.get("content");e.length&&n.append(e),t.empty().append(r)},updateTitle:function(){var t=this.getTitle();t&&(t.innerHTML=this.model.get("title"))},updateOpen:function(){this.el.style.display=this.model.get("open")?"":"none"},hide:function(){this.model.set("open",0)},show:function(){this.model.set("open",1)},render:function(){var t=this.$el,e=this.pfx,n=(this.ppfx,this.model.toJSON());return n.pfx=this.pfx,n.ppfx=this.ppfx,t.html(this.template(n)),t.attr("class","".concat(e,"container")),this.updateOpen(),this}});function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},a=(n=h({},o,{},i)).em;this.em=a;var s=n.pStylePrefix;return s&&(n.stylePrefix=s+n.stylePrefix),(t=new l(n)).on("change:open",(function(t,e){return r(e,a)})),e=new c({model:t,config:n}),this},postRender:function(t){var e=t.model.getConfig().el||t.el;this.render().appendTo(e)},open:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.title&&this.setTitle(t.title),t.content&&this.setContent(t.content),e.show(),this},close:function(){return e.hide(),this},onceClose:function(t){return this.em.once("modal:close",t),this},onceOpen:function(t){return this.em.once("modal:open",t),this},isOpen:function(){return!!t.get("open")},setTitle:function(e){return t.set("title",e),this},getTitle:function(){return t.get("title")},setContent:function(e){return t.set("content"," "),t.set("content",e),this},getContent:function(){return t.get("content")},getContentEl:function(){return e.getContent().get(0)},getModel:function(){return t},render:function(){return e.render().$el}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o={textTags:["br","b","i","u","a","ul","ol"],parserCss:null,parserHtml:null},a=n(0),s={4:"media",5:"font-face",6:"page",7:"keyframes",11:"counter-style",12:"supports",13:"document",14:"font-feature-values",15:"viewport"},l=Object(a.keys)(s),c=["5","6","11","15"],u=["font-face","page","counter-style","viewport"],h=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=[],n=[],r=t.split(","),i=0,o=r.length;i1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i=t.length,o=t[i-1],a=o?o.split(/:(.+)/):[],s=a[1],l=n.atRule,c=n.selectorsAdd,h=n.mediaText,d=u.indexOf(l)>=0;return d&&(r.singleAtRule=1),l&&(r.atRuleType=l),c&&(r.selectorsAdd=c),h&&(r.mediaText=h),s&&(t[i-1]=a[0],r.state=s,a.splice(a.length-1,1)),r.selectors=t,r.style=e,r},g=function(t){var e=document.createElement("style");e.innerHTML=t,document.head.appendChild(e);var n=e.sheet;return document.head.removeChild(e),function t(e){for(var n=[],r=e.cssRules||[],i=0,o=r.length;i=0;if(b)g=1,v=s[u],m=f(a);else if(l.indexOf(u)>=0){var w=t(a);m=f(a);for(var x=0,C=w.length;x0&&void 0!==arguments[0]?arguments[0]:{};return{parse:function(e){var n=this,r=[],i=t.parserCss,o=t.em,a=void 0===o?{}:o,s=a&&a.get&&a.get("Editor");return(i?i(e,s):g(e)).forEach((function(t){return r=r.concat(n.checkNode(t))})),r},checkNode:function(t){var e=t,n=e.selectors,r=e.style;if(Object(a.isString)(n)){var i=[],o=h(n),s=o.result,l=o.add.join(", "),c={atRule:t.atRule,mediaText:t.params};if(s.length?s.forEach((function(t){i.push(p(t,r,c))})):i.push(p([],r,c)),l)i[i.length-1].selectorsAdd=l;t=i}return t}}},m=n(26);function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function b(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return(n=b({},o,{},r)).Parser=this,t=new m.a(n),e=new v(n),this.em=n.em,this.parserCss=e,this.parserHtml=t,this},parseHtml:function(n){var r=this.em,i=this.compTypes;return t.compTypes=r?r.get("DomComponents").getTypes():i,t.parse(n,e)},parseCss:function(t){return e.parse(t)}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(0),a=n(3),s={stylePrefix:"clm-",appendTo:"",selectors:[],states:[{name:"hover"},{name:"active"},{name:"nth-of-type(2n)"}],escapeName:0,selectedName:0,iconAdd:'',iconSync:'',iconTagOn:'',iconTagOff:'',iconTagRemove:'',render:0,componentFirst:0},l=n(8),c=n(9),u=n(7),h=n.n(u),d=n(1),f=n.n(d),p=f.a.View.extend({template:function(){var t=this.pfx,e=this.model,n=this.config,r=e.get("label")||"";return'\n \n ').concat(r,'\n \n ').concat(n.iconTagRemove,"\n \n ")},events:{"click [data-tag-remove]":"removeTag","click [data-tag-status]":"changeStatus","dblclick [data-tag-name]":"startEditTag","focusout [data-tag-name]":"endEditTag"},initialize:function(t){var e=t.config||{};this.config=e,this.coll=t.coll||null,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.em=e.em,this.listenTo(this.model,"change:active",this.updateStatus)},getInputEl:function(){return this.inputEl||(this.inputEl=this.el.querySelector("[data-tag-name]")),this.inputEl},startEditTag:function(){var t=this.em,e=this.getInputEl();e.contentEditable=!0,e.focus(),t&&t.setEditing(1)},endEditTag:function(){var t=this.model,e=this.getInputEl(),n=e.textContent,r=this.em,i=r&&r.get("SelectorManager");if(e.contentEditable=!1,r&&r.setEditing(0),i){var o=i.escapeName(n);i.get(o)?e.innerText=t.get("label"):t.set({name:o,label:n})}},changeStatus:function(){var t=this.model;t.set("active",!t.get("active"))},removeTag:function(){var t=this.em,e=this.model;(t&&t.getSelectedAll()).forEach((function(t){!e.get("protected")&&t&&t.getSelectors().remove(e)}))},updateStatus:function(){var t=this.model,e=this.$el,n=this.config,r=n.iconTagOn,i=n.iconTagOff,o=e.find("[data-tag-status]");t.get("active")?(o.html(r),e.removeClass("opac50")):(o.html(i),e.addClass("opac50"))},render:function(){var t=this.pfx,e=this.ppfx;return this.$el.html(this.template()),this.$el.attr("class","".concat(t,"tag ").concat(e,"three-bg")),this.updateStatus(),this}}),g=f.a.View.extend({template:function(t){var e=t.labelInfo,n=t.labelStates,r=t.labelHead,i=t.iconSync,o=t.iconAdd,a=t.pfx,s=t.ppfx;return'\n
\n
').concat(r,'
\n
\n \n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n ').concat(o,'\n \n \n
\n
\n
').concat(e,':
\n
\n
\n
')},events:{"change [data-states]":"stateChanged","click [data-add]":"startNewTag","focusout [data-input]":"endNewTag","keyup [data-input]":"onInputKeyUp","click [data-sync-style]":"syncStyle"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.className=this.pfx+"tags",this.stateInputId=this.pfx+"states",this.stateInputC=this.pfx+"input-c",this.states=this.config.states||[];var e=this.config.em,n=this.getStyleEmitter(),r=this.collection;this.target=this.config.em,this.em=e;var i="component:toggled component:update:classes",o="component:update:classes change:state";this.listenTo(e,i,this.componentChanged),this.listenTo(n,"styleManager:update",this.componentChanged),this.listenTo(e,o,this.__handleStateChange),this.listenTo(e,"styleable:change change:device",this.checkSync),this.listenTo(r,"add",this.addNew),this.listenTo(r,"reset",this.renderClasses),this.listenTo(r,"remove",this.tagRemoved),this.delegateEvents()},syncStyle:function(){var t,e=this.em,n=this.getTarget(),r=e.get("CssComposer"),i=this.getCommonSelectors({opts:{noDisabled:1}}),o=e.get("state"),a=e.getCurrentMedia(),s=[],l=r.get(i,o,a)||r.add(i,o,a);this.getTargets().forEach((function(e){var n=r.getIdRule(e.getId(),{state:o,mediaText:a});t=n.getStyle(),n.setStyle({}),s.push(n)})),t&&l.addStyle(t),e.trigger("component:toggled"),e.trigger("component:sync-style",{component:n,selectors:i,mediaText:a,rule:l,ruleComponents:s,state:o})},getStyleEmitter:function(){var t=this.em,e=t&&t.get("StyleManager");return e&&e.getEmitter()||{}},tagRemoved:function(t){this.updateStateVis()},getStateOptions:function(){var t=this.states,e=this.em,n=[];return t.forEach((function(t){return n.push('"))})),n.join("")},addNew:function(t){this.addToClasses(t)},startNewTag:function(){this.$addBtn.css({display:"none"}),this.$input.show().focus()},endNewTag:function(){this.$addBtn.css({display:""}),this.$input.hide().val("")},onInputKeyUp:function(t){13===t.keyCode?this.addNewTag(this.$input.val()):27===t.keyCode&&this.endNewTag()},checkStates:function(){var t=this.em.getState(),e=this.getStates();e&&e.val(t)},componentChanged:Object(o.debounce)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.targets;this.updateSelection(e)})),updateSelection:function(t){var e=t||this.getTargets(),n=[];return(e=Object(o.isArray)(e)?e:[e])&&e.length&&(n=this.getCommonSelectors({targets:e}),this.checkSync({validSelectors:n})),this.collection.reset(n),this.updateStateVis(e),n},getCommonSelectors:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.targets,n=t.opts,r=void 0===n?{}:n,i=e||this.getTargets(),o=i.map((function(t){return t.getSelectors&&t.getSelectors().getValid(r)})).filter((function(t){return t}));return this._commonSelectors.apply(this,h()(o))},_commonSelectors:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r=0})):n.slice(1).reduce((function(e,n){return t._commonSelectors(e,n)}),n[0]):[]},checkSync:Object(o.debounce)((function(){var t,e=this.$btnSyncEl,n=this.config,r=this.collection,i=this.getTarget();if(i&&n.componentFirst&&r.length){var a=i.getStyle();t=!Object(o.isEmpty)(a)}e&&e[t?"show":"hide"]()})),getTarget:function(){return this.target.getSelected()},getTargets:function(){return this.target.getSelectedAll()},updateStateVis:function(t){var e=this.em,n=e&&e.getConfig("avoidInlineStyle"),r=this.collection.length||n?"":"none";this.getStatesC().css("display",r),this.updateSelector(t)},__handleStateChange:function(){this.updateSelector(this.getTargets())},updateSelector:function(t){var e=this,n=this.el.querySelector("[data-selected]"),r=[],i=t||this.getTargets();(i=Object(o.isArray)(i)?i:[i]).forEach((function(t){return r.push(e.__getName(t))})),n&&(n.innerHTML=r.join(", ")),this.checkStates()},__getName:function(t){var e,n=this.pfx,r=this.config,i=this.em,a=r.selectedName,s=r.componentFirst;if(Object(o.isString)(t))e='').concat(t,"");else{if(!t||!t.get)return;var l=t.getSelectors().getStyleable(),c=i.get("state"),u=t.getId?'').concat(t.getName(),'#').concat(t.getId(),""):"";e=(e=this.collection.getFullString(l))?'').concat(e,""):t.get("selectorsAdd")||u,e=s&&u?u:e,e+=c?':').concat(c,""):"",e=a?a({result:e,state:c,target:t}):e}return e&&'').concat(e,"")},stateChanged:function(t){var e=this.em,n=t.target.value;e.set("state",n)},addNewTag:function(t){var e=this,n=this.em;if(t.trim()){if(n){var r=n.get("SelectorManager").add({label:t});this.getTargets().forEach((function(t){t.getSelectors().add(r),e.collection.add(r),e.updateStateVis()}))}this.endNewTag()}},addToClasses:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e,r=this.getClasses(),i=new p({model:t,config:this.config,coll:this.collection}).render().el;return n?n.appendChild(i):r.append(i),i},renderClasses:function(){var t=this,e=document.createDocumentFragment(),n=this.getClasses();n.empty(),this.collection.each((function(n){return t.addToClasses(n,e)})),n.append(e)},getClasses:function(){return this.$el.find("[data-selectors]")},getStates:function(){if(!this.$states){var t=this.$el.find("[data-states]");this.$states=t[0]&&t}return this.$states},getStatesC:function(){return this.$statesC||(this.$statesC=this.$el.find("#"+this.stateInputC)),this.$statesC},render:function(){var t=this.em,e=this.pfx,n=this.ppfx,r=this.config,i=this.$el,o=this.el,a=r.render,s={iconSync:r.iconSync,iconAdd:r.iconAdd,labelHead:t.t("selectorManager.label"),labelStates:t.t("selectorManager.emptyState"),labelInfo:t.t("selectorManager.selected"),ppfx:n,pfx:e,el:o};i.html(this.template(s));var l=a&&a(s);l&&l!==o&&i.empty().append(l),this.$input=i.find("[data-input]"),this.$addBtn=i.find("[data-add]"),this.$classes=i.find("#"+e+"tags-c"),this.$btnSyncEl=i.find("[data-sync-style]"),this.$input.hide();var c=this.getStates();return c&&c.append(this.getStateOptions()),this.renderClasses(),i.attr("class","".concat(this.className," ").concat(n,"one-bg ").concat(n,"two-color")),this}});function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function m(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},r=(n=m({},s,{},t)).em,i=n.pStylePrefix;return this.em=r,i&&(n.stylePrefix=i+n.stylePrefix),this.selectorTags=new g({collection:new c.a([],{em:r,config:n}),config:n}),(e=new c.a(n.selectors)).on("add",(function(t){return r.trigger("selector:add",t)})),e.on("remove",(function(t){return r.trigger("selector:remove",t)})),e.on("change",(function(t){return r.trigger("selector:update",t,t.previousAttributes(),t.changedAttributes())})),r.on("change:state",(function(t,e){return r.trigger("selector:state",e)})),this},postRender:function(){var t=this.getConfig().appendTo;t&&(Object(o.isElement)(t)?t:document.querySelector(t)).appendChild(this.render([]))},select:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Array.isArray(t)?t:[t],r=this.em.get("StyleManager").setTarget(n,e),i=r.filter((function(t){return t})).map((function(t){return Object(a.k)(t)?t:Object(a.m)(t)&&!t.get("selectorsAdd")?t:t.getSelectorsString()}));return this.selectorTags.componentChanged({targets:i}),this},setState:function(t){return this.em.setState(t),this},getState:function(){return this.em.setState()},addSelector:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=m({},r);Object(o.isObject)(t)?i=t:i.name=t,y(i.name)?(i.name=i.name.substr(1),i.type=l.a.TYPE_ID):b(i.name)&&(i.name=i.name.substr(1)),i.label&&!i.name&&(i.name=this.escapeName(i.label));var a=i.name,s=a?this.get(a,i.type):e.where(i)[0];return s||e.add(i,{config:n})},getSelector:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.a.TYPE_CLASS;return y(t)?(t=t.substr(1),n=l.a.TYPE_ID):b(t)&&(t=t.substr(1)),e.where({name:t,type:n})[0]},add:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(o.isArray)(t)?t.map((function(t){return e.addSelector(t,n)})):this.addSelector(t,n)},addClass:function(t){var e=this,n=[];return Object(o.isString)(t)&&(t=t.trim().split(" ")),t.forEach((function(t){return n.push(e.addSelector(t))})),n},get:function(t,e){var n=this;if(Object(o.isArray)(t)){var r=[];return t.map((function(t){return n.getSelector(t)})).filter((function(t){return t})).forEach((function(t){return r.indexOf(t)<0&&r.push(t)})),r}return this.getSelector(t,e)},getAll:function(){return e},escapeName:function(t){var e=n.escapeName;return e?e(t):l.a.escapeName(t)},render:function(t){return t?(this.selectorTags=new g({collection:new c.a(t),config:n}),this.selectorTags.render().el):this.selectorTags.render().el}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o={id:"gjs-",autosave:1,autoload:1,type:"local",stepsBeforeSave:1,storeComponents:1,storeStyles:1,storeHtml:1,storeCss:1,checkLocal:1,params:{},headers:{},urlStore:"",urlLoad:"",beforeSend:function(t,e){},onComplete:function(t,e){},contentTypeJson:!0,credentials:"include",fetchOptions:""},a=n(1),s=n.n(a),l=s.a.Model.extend({defaults:{checkLocal:!0},store:function(t,e){for(var n in this.checkStorageEnvironment(),t)localStorage.setItem(n,t[n]);"function"==typeof e&&e()},load:function(t,e){this.checkStorageEnvironment();for(var n={},r=0,i=t.length;r1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.get("contentTypeJson"),l=this.get("headers")||{},c=this.get("params"),h="X-Requested-With",f="Content-Type",p=i.body||{};for(var g in c)p[g]=c[g];if(Object(u.isUndefined)(l[h])&&(l[h]="XMLHttpRequest"),Object(u.isUndefined)(l[f])&&s&&(l[f]="application/json; charset=utf-8"),s)n=JSON.stringify(p);else for(var v in n=new FormData,p)n.append(v,p[v]);"post"===(e={method:i.method||"post",credentials:this.get("credentials"),headers:l}).method&&(e.body=n);var m=this.get("fetchOptions")||{},y=Object(u.isFunction)(m)?m(e):e;this.onStart(),this.fetch(t,d({},e,{},y||{})).then((function(t){return 1==(t.status/200|0)?t.text():t.text().then((function(t){return Promise.reject(t)}))})).then((function(t){return r.onResponse(t,o)})).catch((function(t){return r.onError(t,a)}))}});function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return e=g({},o,{},n),t=e.em,e._disable&&(e.type=0),r.remote=new f(e),r.local=new l(e),e.currentStorage=e.type,this.loadDefaultProviders().setCurrent(e.type),this},getConfig:function(){return e},isAutosave:function(){return!!e.autosave},setAutosave:function(t){return e.autosave=!!t,this},getStepsBeforeSave:function(){return e.stepsBeforeSave},setStepsBeforeSave:function(t){return e.stepsBeforeSave=t,this},add:function(t,e){return n[t]=e,this},get:function(t){return n[t]||null},getStorages:function(){return n},getCurrent:function(){return e.currentStorage},setCurrent:function(t){return e.currentStorage=t,this},store:function(t,n){var r=this,i=this.get(this.getCurrent()),o={};for(var a in this.onStart("store",t),t)o[e.id+a]=t[a];return i?i.store(o,(function(t){n&&n(t),r.onEnd("store",t)}),(function(t){r.onError("store",t)})):null},load:function(t,n){var r=this,i=this.get(this.getCurrent()),o=[],a={};"string"==typeof t&&(t=[t]),this.onStart("load",t);for(var s=0,l=t.length;s1&&void 0!==arguments[1]?arguments[1]:{},r=n.target,i=n.avoidChildren,o=void 0===i?1:i,a=this.em,s=this.eV,l=t||s,c=this.dropModel,u=this.dropContent,f=function(t){return t&&r&&t.opt&&t.opt.avoidChildren&&e.isTextableActive(t,r)};if(u&&a){if(f(c)&&(c=null),!c){var p=a.get("DomComponents").getComponents(),g={avoidChildren:o,avoidStore:1,avoidUpdateStyle:1},v=p.add(u,h({},g,{temporary:1}));if(c=(c=p.remove(v,g))instanceof Array?c[0]:c,this.dropModel=c,f(c))return this.getSourceModel(l,{target:r,avoidChildren:0})}return c}return l&&d(l).data("model")},selectTargetModel:function(t){if(!(t instanceof s.a.Collection)){var e=this.targetModel;e&&e!==this.srcModel&&e.set("status",""),t&&t.set&&(t.set("status","selected-parent"),this.targetModel=t)}},onMove:function(t){var e=t,n=this.em,r=this.onMoveClb,i=this.plh;this.moved=1;var o=i.style.display;o&&"none"!==o||(i.style.display="block");var a=this.offset(this.el);this.elT=this.wmargin?Math.abs(a.top):a.top,this.elL=this.wmargin?Math.abs(a.left):a.left;var s=t.pageY-this.elT+this.el.scrollTop,c=t.pageX-this.elL+this.el.scrollLeft;if(this.canvasRelative&&n){var u=n.get("Canvas").getMouseRelativeCanvas(t);c=u.x,s=u.y}this.rX=c,this.rY=s,this.eventMove=t;var h=this.getSourceModel(),f=this.dimsFromTarget(t.target,c,s),p=this.target,g=p&&this.getTargetModel(p);if(this.selectTargetModel(g),g||(i.style.display="none"),p){this.lastDims=f;var v=this.findPosition(f,c,s);this.isTextableActive(h,g)?(this.activeTextModel=g,this.setContentEditable(g,!0),i.style.display="none",this.lastPos=v,this.updateTextViewCursorPosition(e)):(this.disableTextable(),this.activeTextModel=null,this.lastPos&&this.lastPos.index==v.index&&this.lastPos.method==v.method||(this.movePlaceholder(this.plh,f,v,this.prevTargetDim),this.$plh||(this.$plh=d(this.plh)),this.canvasRelative||(this.offTop&&this.$plh.css("top","+="+this.offTop+"px"),this.offLeft&&this.$plh.css("left","+="+this.offLeft+"px")),this.lastPos=v)),Object(l.isFunction)(r)&&r(t),n&&n.trigger("sorter:drag",{target:p,targetModel:g,sourceModel:h,dims:f,pos:v,x:c,y:s})}},isTextableActive:function(t,e){return t&&t.get&&t.get("textable")&&e&&e.is("text")},disableTextable:function(){var t=this.activeTextModel;t&&t.getView().disableEditing()},isInFlow:function(t,e){if(!t)return!1;e=e||document.body;var n=t;return n.offsetHeight,!!this.styleInFlow(n,e)},styleInFlow:function(t,e){if(!Object(c.o)(t)){var n=t.style||{},r=d(t),i=e&&d(e);if(!(n.overflow&&"visible"!==n.overflow||"none"!==r.css("float")||i&&"flex"==i.css("display")&&"column"!==i.css("flex-direction"))){switch(n.position){case"static":case"relative":case"":break;default:return}switch(t.tagName){case"TR":case"TBODY":case"THEAD":case"TFOOT":return!0}switch(r.css("display")){case"block":case"list-item":case"table":case"flex":return!0}}}},validTarget:function(t,e){var n=this.getTargetModel(t),r=this.getSourceModel(e,{target:n}),i={valid:!0,src:e=r&&r.view&&r.view.el,srcModel:r,trg:t=n&&n.view&&n.view.el,trgModel:n};if(!e||!t)return i.valid=!1,i;var o=r.get("draggable");o=o instanceof Array?o.join(", "):o,i.dragInfo=o,o=Object(l.isString)(o)?this.matches(t,o):o,i.draggable=o;var a=n.get("droppable");return a=(a=a instanceof s.a.Collection?1:a)instanceof Array?a.join(", "):a,i.dropInfo=a,a=Object(l.isString)(a)?this.matches(e,a):a,a=o&&this.isTextableActive(r,n)?1:a,i.droppable=a,a&&o||(i.valid=!1),i},dimsFromTarget:function(t,e,n){var r=this.em,i=[];if(!t)return i;if(this.matches(t,"".concat(this.itemSel,", ").concat(this.containerSel))||(t=this.closest(t,this.itemSel)),this.draggable instanceof Array&&(t=this.closest(t,this.draggable.join(","))),!t)return i;if(this.prevTarget&&this.prevTarget!=t&&(this.prevTarget=null),!this.prevTarget){this.targetP=this.closest(t,this.containerSel);var o=this.validTarget(t);if(r&&r.trigger("sorter:drag:validation",o),!o.valid&&this.targetP)return this.dimsFromTarget(this.targetP,e,n);this.prevTarget=t,this.prevTargetDim=this.getDim(t),this.cacheDimsP=this.getChildrenDim(this.targetP),this.cacheDims=this.getChildrenDim(t)}if(this.prevTarget==t&&(i=this.cacheDims),this.target=this.prevTarget,this.nearBorders(this.prevTargetDim,e,n)||!this.nested&&!this.cacheDims.length){var a=this.targetP;a&&this.validTarget(a).valid&&(i=this.cacheDimsP,this.target=a)}return this.lastPos=null,i},getTargetFromEl:function(t){var e,n=t,r=this.targetPrev,i=this.em,o=this.containerSel,a=this.itemSel;if(this.matches(n,"".concat(a,", ").concat(o))||(n=this.closest(n,a)),this.draggable instanceof Array&&(n=this.closest(n,this.draggable.join(","))),r&&r!=n&&(this.targetPrev=""),!this.targetPrev){e=this.closest(n,o);var s=this.validTarget(n);if(i&&i.trigger("sorter:drag:validation",s),!s.valid&&e)return this.getTargetFromEl(e);this.targetPrev=n}return this.nearElBorders(n)&&(e=this.closest(n,o))&&this.validTarget(e).valid&&(n=e),n},nearElBorders:function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument.body,r=this.getCurrentPos(),i=r.x,o=r.y,a=e.top+n.scrollTop,s=e.left+n.scrollLeft,l=e.width,c=e.height;if(oa+c-10||is+l-10)return 1},getCurrentPos:function(){var t=this.eventMove;return{x:t.pageX||0,y:t.pageY||0}},getDim:function(t){var e,n,r,i,o=this.em;if(this.canvasRelative&&o){var a=o.get("Canvas"),s=a.getElementPos(t),l=a.getElementOffsets(t);e=s.top-l.marginTop,n=s.left-l.marginLeft,r=s.height+l.marginTop+l.marginBottom,i=s.width+l.marginLeft+l.marginRight}else{var c=this.offset(t);e=this.relative?t.offsetTop:c.top-(this.wmargin?-1:1)*this.elT,n=this.relative?t.offsetLeft:c.left-(this.wmargin?-1:1)*this.elL,r=t.offsetHeight,i=t.offsetWidth}return[e,n,r,i]},getChildrenDim:function(t){var e=this,n=[];if(!t)return n;var r=this.getTargetModel(t);return r&&r.view&&!this.ignoreViewChildren&&(t=r.view.getChildrenContainer()),Object(l.each)(t.children,(function(r,i){var o=Object(c.g)(r,d),a=o&&o.index?o.index():i;if(Object(c.o)(r)||e.matches(r,e.itemSel)){var s=e.getDim(r),l=e.direction;l="v"==l||"h"!=l&&e.isInFlow(r,t),s.push(l,r,a),n.push(s)}})),n},nearBorders:function(t,e,n){var r=0,i=this.borderOffset,o=e||0,a=n||0,s=t[0],l=t[1],c=t[2],u=t[3];return(s+i>a||a>s+c-i||l+i>o||o>l+u-i)&&(r=1),!!r},findPosition:function(t,e,n){for(var r={index:0,indexEl:0,method:"before"},i=0,o=0,a=0,s=0,l=0,c=0,u=0,h=0,d=0,f=t.length;do||s&&c>=s||i&&a0&&void 0!==arguments[0]?arguments[0]:{};return g()(this,t),this.setOptions(e),Object(l.bindAll)(this,"handleKeyDown","handleMouseDown","move","stop"),this}return m()(t,[{key:"getConfig",value:function(){return this.opts}},{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opts=Object(l.defaults)(t,y),this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,r=this.container;for(r||((r=document.createElement("div")).className="".concat(e,"resizer-c"),n.appendChild(r),this.container=r);r.firstChild;)r.removeChild(r.firstChild);var i={};for(var o in["tl","tc","tr","cl","cr","bl","bc","br"].forEach((function(e){return i[e]=t[e]?function(t,e){var n=e.prefix||"",r=document.createElement("i");return r.className=n+"resizer-h "+n+"resizer-h-"+t,r.setAttribute("data-"+n+"handler",t),r}(e,t):""})),i){var a=i[o];a&&r.appendChild(a)}this.handlers=i,this.mousePosFetcher=t.mousePosFetcher,this.updateTarget=t.updateTarget,this.posFetcher=t.posFetcher,this.onStart=t.onStart,this.onMove=t.onMove,this.onEnd=t.onEnd}},{key:"toggleFrames",value:function(t){if(this.opts.silentFrames){var e=document.querySelectorAll("iframe");Object(l.each)(e,(function(e){return e.style.pointerEvents=t?"none":""}))}}},{key:"isHandler",value:function(t){var e=this.handlers;for(var n in e)if(e[n]===t)return!0;return!1}},{key:"getFocusedEl",value:function(){return this.el}},{key:"getDocumentEl",value:function(){return[this.el.ownerDocument,document]}},{key:"getElementPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.posFetcher||"";return n?n(t,e):b(t)}},{key:"focus",value:function(t){t&&t===this.el||(this.el=t,this.updateContainer({forceShow:1}),Object(c.s)(this.getDocumentEl(),"mousedown",this.handleMouseDown))}},{key:"blur",value:function(){this.container.style.display="none",this.el&&(Object(c.r)(this.getDocumentEl(),"mousedown",this.handleMouseDown),this.el=null)}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.el,n=this.opts||{},r="data-"+n.prefix+"handler",i=this.getElementPos(e,{target:"el"});this.handlerAttr=t.target.getAttribute(r),this.clickedHandler=t.target,this.startDim={t:i.top,l:i.left,w:i.width,h:i.height},this.rectDim={t:i.top,l:i.left,w:i.width,h:i.height},this.startPos={x:t.clientX,y:t.clientY};var o=this.getDocumentEl();Object(c.s)(o,"mousemove",this.move),Object(c.s)(o,"keydown",this.handleKeyDown),Object(c.s)(o,"mouseup",this.stop),Object(l.isFunction)(this.onStart)&&this.onStart(t,{docs:o,config:n,el:e,resizer:this}),this.toggleFrames(1),this.move(t)}}},{key:"move",value:function(t){var e=this.onMove,n=this.mousePosFetcher,r=n?n(t):{x:t.clientX,y:t.clientY};this.currentPos=r,this.delta={x:r.x-this.startPos.x,y:r.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),e&&e(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.opts,n=this.getDocumentEl();Object(c.r)(n,"mousemove",this.move),Object(c.r)(n,"keydown",this.handleKeyDown),Object(c.r)(n,"mouseup",this.stop),this.updateRect(1),this.toggleFrames(),Object(l.isFunction)(this.onEnd)&&this.onEnd(t,{docs:n,config:e})}},{key:"updateRect",value:function(t){var e=this.el,n=this.opts,r=this.rectDim,i=this.updateTarget,o=this.getSelectedHandler(),a=n.unitHeight,s=n.unitWidth,c=n.keyWidth,u=n.keyHeight;if(Object(l.isFunction)(i))i(e,r,{store:t,selectedHandler:o,resizer:this,config:n});else{var h=e.style;h[c]=r.w+s,h[u]=r.h+a}this.updateContainer()}},{key:"updateContainer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.opts,n=this.container,r=this.el,i=n.style;if(!e.avoidContainerUpdate&&r){var o=["left","top","width","height"],a=this.getElementPos(r,{target:"container"});o.forEach((function(t){return i[t]="".concat(a[t],"px")})),t.forceShow&&(i.display="block")}}},{key:"getSelectedHandler",value:function(){var t=this.handlers;if(this.selectedHandler)for(var e in t)if(t[e]===this.selectedHandler)return e}},{key:"handleKeyDown",value:function(t){27===t.keyCode&&(this.rectDim=this.startDim,this.stop(t))}},{key:"handleMouseDown",value:function(t){var e=t.target;this.isHandler(e)?(this.selectedHandler=e,this.start(t)):e!==this.el&&(this.selectedHandler="",this.blur())}},{key:"calc",value:function(t){var e,n=this.opts||{},r=n.step,i=this.startDim,o=n.minDim,a=n.maxDim,s=t.delta.x,l=t.delta.y,u=i.w,h=i.h,d={t:0,l:0,w:u,h:h};if(t){var f=t.handlerAttr;~f.indexOf("r")&&(e=Object(c.q)(u+s*r,r),e=Math.max(o,e),a&&(e=Math.min(a,e)),d.w=e),~f.indexOf("b")&&(e=Object(c.q)(h+l*r,r),e=Math.max(o,e),a&&(e=Math.min(a,e)),d.h=e),~f.indexOf("l")&&(e=Object(c.q)(u-s*r,r),e=Math.max(o,e),a&&(e=Math.min(a,e)),d.w=e),~f.indexOf("t")&&(e=Object(c.q)(h-l*r,r),e=Math.max(o,e),a&&(e=Math.min(a,e)),d.h=e);var p=n.ratioDefault?!t.keys.shift:t.keys.shift;if(f.indexOf("c")<0&&p){var g=i.w/i.h;d.w/d.h>g?d.h=Math.round(d.w/g):d.w=Math.round(d.h*g)}return~f.indexOf("l")&&(d.l=i.w-d.w),~f.indexOf("t")&&(d.t=i.h-d.h),d}}}]),t}(),x={init:function(t){return new w(t)}};e.default=function(){return{name:"Utils",init:function(){return this},Sorter:f,Resizer:x,Dragger:r.a}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r),o=n(2),a=n.n(o),s=n(13),l=n.n(s),c=n(14),u=n.n(c),h=n(3);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;eB",attributes:{title:"Bold"},result:function(t){return t.exec("bold")}},italic:{name:"italic",icon:"I",attributes:{title:"Italic"},result:function(t){return t.exec("italic")}},underline:{name:"underline",icon:"U",attributes:{title:"Underline"},result:function(t){return t.exec("underline")}},strikethrough:{name:"strikethrough",icon:"S",attributes:{title:"Strike-through"},result:function(t){return t.exec("strikeThrough")}},link:{icon:'',name:"link",attributes:{style:"font-size:1.4rem;padding:0 4px 2px;",title:"Link"},state:function(t,e){return t&&t.selection()&&y(t)?g:v},result:function(t){y(t)?t.exec("unlink"):t.insertHTML(''.concat(t.selection(),""))}}},w=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l()(this,t);var r=n.el;if(r[p])return r[p];r[p]=this,this.setEl(r),this.updateActiveActions=this.updateActiveActions.bind(this);var i=n.actions||[];i.forEach((function(t,e){"string"==typeof t?t=b[t]:b[t.name]&&(t=f({},b[t.name],{},t)),i[e]=t}));var o=i.length?i:Object.keys(b).map((function(t){return b[t]}));n.classes=f({},{actionbar:"actionbar",button:"action",active:"active",disabled:"disabled",inactive:"inactive"},{},n.classes);var a=n.classes,s=n.actionbar;if(this.actionbar=s,this.settings=n,this.classes=a,this.actions=o,!s){var c=n.actionbarContainer;(s=document.createElement("div")).className=a.actionbar,c.appendChild(s),this.actionbar=s,o.forEach((function(t){return e.addAction(t)}))}return n.styleWithCSS&&this.exec("styleWithCSS"),this.syncActions(),this}return u()(t,[{key:"destroy",value:function(){this.el=0,this.doc=0,this.actionbar=0,this.settings={},this.classes={},this.actions=[]}},{key:"setEl",value:function(t){this.el=t,this.doc=t.ownerDocument}},{key:"updateActiveActions",value:function(){var t=this;this.getActions().forEach((function(e){var n=e.btn,r=e.update,i=f({},t.classes),o=i.active,a=i.inactive,s=i.disabled,l=e.state,c=e.name,u=t.doc;if(n.className=n.className.replace(o,"").trim(),n.className=n.className.replace(a,"").trim(),n.className=n.className.replace(s,"").trim(),l)switch(l(t,u)){case g:n.className+=" ".concat(o);break;case v:n.className+=" ".concat(a);break;case m:n.className+=" ".concat(s)}else u.queryCommandSupported(c)&&u.queryCommandState(c)&&(n.className+=" ".concat(o));r&&r(t,e)}))}},{key:"enable",value:function(){return this.enabled?this:(this.actionbarEl().style.display="",this.el.contentEditable=!0,Object(h.s)(this.el,"mouseup keyup",this.updateActiveActions),this.syncActions(),this.updateActiveActions(),this.el.focus(),this.enabled=1,this)}},{key:"disable",value:function(){return this.actionbarEl().style.display="none",this.el.contentEditable=!1,Object(h.r)(this.el,"mouseup keyup",this.updateActiveActions),this.enabled=0,this}},{key:"syncActions",value:function(){var t=this;this.getActions().forEach((function(e){if(t.settings.actionbar&&(!e.state||e.state&&e.state(t,t.doc)>=0)){var n=e.event||"click";e.btn["on".concat(n)]=function(n){e.result(t,e),t.updateActiveActions()}}}))}},{key:"addAction",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sync,r=document.createElement("span"),i=t.icon,o=t.attributes||{};for(var a in r.className=this.classes.button,t.btn=r,o)r.setAttribute(a,o[a]);"string"==typeof i?r.innerHTML=i:r.appendChild(i),this.actionbarEl().appendChild(r),n&&(this.actions.push(t),this.syncActions())}},{key:"getActions",value:function(){return this.actions}},{key:"selection",value:function(){return this.doc.getSelection()}},{key:"exec",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.doc.execCommand(t,!1,e)}},{key:"actionbarEl",value:function(){return this.actionbar}},{key:"insertHTML",value:function(t){var e=this.doc,n=e.getSelection();if(n&&n.rangeCount){var r=e.createElement("div"),i=n.getRangeAt(0);i.deleteContents(),r.innerHTML=t,Array.prototype.slice.call(r.childNodes).forEach((function(t){i.insertNode(t),t})),n.removeAllRanges(),n.addRange(i),this.el.focus()}}}]),t}(),x={stylePrefix:"rte-",adjustToolbar:1,actions:["bold","italic","underline","strikethrough","link"]};function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function O(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},i=(r=O({},x,{},e)).pStylePrefix;return i&&(r.stylePrefix=i+r.stylePrefix),this.pfx=r.stylePrefix,r.actions||[],(t=document.createElement("div")).className="".concat(i,"rte-toolbar ").concat(i,"one-bg"),n=this.initRte(document.createElement("div")),Object(h.s)(t,"mousedown",(function(t){return t.stopPropagation()})),this},destroy:function(){var e=this.customRte;n&&n.destroy(),e&&e.destroy&&e.destroy(),t=0,n=0,this.actionbar=0,this.actions=0},postRender:function(e){var n=e.model.get("Canvas");t.style.pointerEvents="all",o(),n.getToolsEl().appendChild(t)},initRte:function(e){var o=this.pfx,a=t,s=this.actionbar,l=this.actions||i()(r.actions),c={actionbar:"".concat(o,"actionbar"),button:"".concat(o,"action"),active:"".concat(o,"active"),inactive:"".concat(o,"inactive"),disabled:"".concat(o,"disabled")},u=new w({el:e,classes:c,actions:l,actionbar:s,actionbarContainer:a});return n&&n.setEl(e),u.actionbar&&(this.actionbar=u.actionbar),u.actions&&(this.actions=u.actions),u},add:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.name=t,n.addAction(e,{sync:1})},get:function(t){var e;return n.getActions().forEach((function(n){n.name==t&&(e=n)})),e},getAll:function(){return n.getActions()},remove:function(t){var e=this.getAll(),n=this.get(t);if(n){var r=n.btn,i=e.indexOf(n);r.parentNode.removeChild(r),e.splice(i,1)}return n},getToolbarEl:function(){return t},updatePosition:function(){var n=r.em.get("Canvas"),i=n.getTargetToElementDim(t,e,{event:"rteToolbarPosUpdate"});if(i){if(r.adjustToolbar){var o=n.getCanvasView().getFrameOffset();i.top<=i.canvasTop&&!(i.elementHeight+i.targetHeight>=o.height)&&(i.top=i.elementTop+i.elementHeight)}var a=t.style;a.top=i.top+"px",a.left=i.left+"px"}},enable:function(n,i){e=n.el;var o=r.em,a=n.getChildrenContainer(),s=this.customRte;if(t.style.display="",i=s?s.enable(a,i):this.initRte(a).enable(),o){setTimeout(this.updatePosition.bind(this),0);var l="change:canvasOffset canvasScroll";o.off(l,this.updatePosition,this),o.on(l,this.updatePosition,this),o.trigger("rte:enable",n,i)}return i},disable:function(t,e){var n=r.em,i=this.customRte,a=t.getChildrenContainer();i?i.disable(a,e):e&&e.disable(),o(),n&&n.trigger("rte:disable",t,e)}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(6),a=n.n(o),s=n(0),l={placeholder:"eg. Text here"},c={locale:"en",localeFallback:"en",detectLocale:1,debug:0,messages:{en:{assetManager:{addButton:"Add image",inputPlh:"http://path/to/the/image.jpg",modalTitle:"Select Image",uploadTitle:"Drop files here or click to upload"},blockManager:{labels:{},categories:{}},domComponents:{names:{"":"Box",wrapper:"Body",text:"Text",comment:"Comment",image:"Image",video:"Video",label:"Label",link:"Link",map:"Map",tfoot:"Table foot",tbody:"Table body",thead:"Table head",table:"Table",row:"Table row",cell:"Table cell"}},deviceManager:{device:"Device",devices:{desktop:"Desktop",tablet:"Tablet",mobileLandscape:"Mobile Landscape",mobilePortrait:"Mobile Portrait"}},panels:{buttons:{titles:{preview:"Preview",fullscreen:"Fullscreen","sw-visibility":"View components","export-template":"View code","open-sm":"Open Style Manager","open-tm":"Settings","open-layers":"Open Layer Manager","open-blocks":"Open Blocks"}}},selectorManager:{label:"Classes",selected:"Selected",emptyState:"- State -",states:{hover:"Hover",active:"Click","nth-of-type(2n)":"Even/Odd"}},styleManager:{empty:"Select an element before using Style Manager",layer:"Layer",fileButton:"Images",sectors:{general:"General",layout:"Layout",typography:"Typography",decorations:"Decorations",extra:"Extra",flex:"Flex",dimension:"Dimension"},properties:{}},traitManager:{empty:"Select an element before using Trait Manager",label:"Component settings",traits:{labels:{},attributes:{id:l,alt:l,title:l,href:{placeholder:"eg. https://google.com"}},options:{target:{false:"This window",_blank:"New window"}}}}}}};function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return this.config=h({},c,{},t,{messages:h({},c.messages,{},t.messages||{})}),this.config.detectLocale&&(this.config.locale=this._localLang()),this.em=t.em,this},getConfig:function(){return this.config},setLocale:function(t){var e=this.em,n=this.config,r={value:t,valuePrev:n.locale};return e&&e.trigger("i18n:locale",r),n.locale=t,this},getLocale:function(){return this.config.locale},getMessages:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.config.messages;return t&&!n[t]&&this._debug("'".concat(t,"' i18n lang not found"),e),t?n[t]:n},setMessages:function(t){var e=this.em;return this.config.messages=t,e&&e.trigger("i18n:update",t),this},addMessages:function(t){var e=this.em,n=this.config.messages;return e&&e.trigger("i18n:add",t),this.setMessages(function t(){for(var e=h({},arguments.length<=0?void 0:arguments[0]),n=1;n1&&void 0!==arguments[1]?arguments[1]:{},n=this.config,r=e.params||{},i=e.l||this.getLocale(),o=e.lFlb||n.localeFallback,a=this._getMsg(t,i,e);return a||(a=this._getMsg(t,o,e)),!a&&this._debug("'".concat(t,"' i18n key not found in '").concat(i,"' lang"),e),a=a&&Object(s.isString)(a)?this._addParams(a,r):a},_localLang:function(){var t=window.navigator||{},e=t.language||t.userLanguage;return e?e.split("-")[0]:"en"},_addParams:function(t,e){var n=new RegExp("{([\\w\\d-]*)}","g");return t.replace(n,(function(t,n){return e[n]||""})).trim()},_getMsg:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getMessages(e,n);if(r){var i=r[t];return!i&&t.indexOf(".")>0&&(i=t.split(".").reduce((function(t,e){if(!Object(s.isUndefined)(t))return t[e]}),r)),i}},_debug:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.em,r=this.config;(e.debug||r.debug)&&n&&n.logWarning(t)}}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r),o=n(2),a=n.n(o),s=n(0),l=n(19),c={stylePrefix:"com-",defaults:[],strict:1};function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};e=h({},c,{},r),t=e.em;var a=e.pStylePrefix;for(var l in a&&(e.stylePrefix=a+e.stylePrefix),e.defaults){var d=e.defaults[l];d.id&&this.add(d.id,d)}return o["tlb-delete"]={run:function(t){return t.runCommand("core:component-delete")}},o["tlb-clone"]={run:function(t){t.runCommand("core:copy"),t.runCommand("core:paste")}},o["tlb-move"]={run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.getModel(),o=n&&n.event,a=n.target,l=a||t.getSelected(),c=a?[a]:i()(t.getSelectedAll()),u=o&&"dragstart"==o.type,h={preserveSelected:1},d=["absolute","translate"],f=function(){return r.stopDefault(h)};if(c.forEach((function(t){return t.trigger("disable")})),r.set("_cmpDrag",1),l&&l.get("draggable")){var p=l.get("dmode")||r.get("dmode");u?setTimeout(f,0):f();var g=function(e,n){r.runDefault(h),c.forEach((function(t){return t.set("status","selected")})),t.select(c),l.emitUpdate()};if(Object(s.includes)(d,p))t.runCommand("core:component-drag",{guidesInfo:1,mode:p,target:l,onEnd:g,event:o});else{u&&o.dataTransfer.setDragImage(l.view.el,0,0);var v=t.Commands.get("move-comp");v.onEndMoveFromModel=g,v.initSorterFromModels(c)}c.forEach((function(t){return t.set("status","freezed-selected")}))}else console.warn("The element is not draggable")}},o["core:undo"]=function(t){return t.UndoManager.undo()},o["core:redo"]=function(t){return t.UndoManager.redo()},u.forEach((function(e){var r=e[2],i=n(85)("./".concat(e[1])).default,a="core:".concat(e[0]);o[a]=i,r&&(o[r]=i,["run","stop"].forEach((function(e){t.on("".concat(e,":").concat(r),(function(){for(var n,r=arguments.length,i=new Array(r),o=0;o1&&void 0!==arguments[1]?arguments[1]:{},n=this.get(t);if(n){var r=h({},n.constructor.prototype,{},e);this.add(t,r);var i=u.filter((function(e){return"core:".concat(e[0])===t&&e[2]}))[0];i&&this.add(i[2],r)}return this},has:function(t){return!!r[t]},getAll:function(){return r},run:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.runCommand(this.get(t),e)},stop:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.stopCommand(this.get(t),e)},isActive:function(t){return this.getActive().hasOwnProperty(t)},getActive:function(){return a},loadDefaultCommands:function(){for(var t in o)this.add(t,o[t]);return this},runCommand:function(n){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n&&n.run){var o=n.id,s=t.get("Editor");this.isActive(o)&&!i.force&&e.strict||(r=n.callRun(s,i),o&&n.stop&&!n.noStop&&!i.abort&&(a[o]=r))}return r},stopCommand:function(n){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n&&n.run){var o=n.id,s=t.get("Editor");(this.isActive(o)||i.force||!e.strict)&&(o&&delete a[o],r=n.callStop(s,i))}return r},create:function(t){return t.stop||(t.noStop=1),new(l.default.extend(t))(e)}}}}]).default})); -//# sourceMappingURL=grapes.min.js.map diff --git a/Assets/library/js/grapes.min.js.map b/Assets/library/js/grapes.min.js.map deleted file mode 100644 index b124b00fed5..00000000000 --- a/Assets/library/js/grapes.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://grapesjs/webpack/universalModuleDefinition","webpack://grapesjs/webpack/bootstrap","webpack://grapesjs/./node_modules/underscore/underscore.js","webpack://grapesjs/./node_modules/backbone/backbone.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://grapesjs/./src/utils/mixins.js","webpack://grapesjs/./src/trait_manager/model/Trait.js","webpack://grapesjs/./src/trait_manager/model/Traits.js","webpack://grapesjs/./src/trait_manager/model/TraitFactory.js","webpack://grapesjs/./src/dom_components/model/Component.js","webpack://grapesjs/./src/dom_components/view/ComponentView.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/typeof.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://grapesjs/./src/selector_manager/model/Selector.js","webpack://grapesjs/./src/selector_manager/model/Selectors.js","webpack://grapesjs/./node_modules/codemirror/lib/codemirror.js","webpack://grapesjs/./src/utils/dom.js","webpack://grapesjs/./src/dom_components/view/ToolbarButtonView.js","webpack://grapesjs/./src/dom_components/view/ToolbarView.js","webpack://grapesjs/./src/dom_components/model/ToolbarButton.js","webpack://grapesjs/./src/dom_components/model/Toolbar.js","webpack://grapesjs/./src/commands/view/SelectComponent.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/createClass.js","webpack://grapesjs/./src/domain_abstract/ui/Input.js","webpack://grapesjs/./src/style_manager/view/PropertiesView.js","webpack://grapesjs/./src/utils/Dragger.js","webpack://grapesjs/./src/dom_components/model/Components.js","webpack://grapesjs/./src/commands/view/CommandAbstract.js","webpack://grapesjs/./src/domain_abstract/model/Styleable.js","webpack://grapesjs/./node_modules/cash-dom/dist/cash.js","webpack://grapesjs/./src/style_manager/model/Property.js","webpack://grapesjs/./src/style_manager/model/PropertyComposite.js","webpack://grapesjs/./src/style_manager/model/Layer.js","webpack://grapesjs/./src/style_manager/model/Layers.js","webpack://grapesjs/./src/style_manager/model/PropertyStack.js","webpack://grapesjs/./src/style_manager/view/PropertyView.js","webpack://grapesjs/./src/style_manager/view/PropertyCompositeView.js","webpack://grapesjs/./src/style_manager/view/LayerView.js","webpack://grapesjs/./src/style_manager/view/LayersView.js","webpack://grapesjs/./src/style_manager/view/PropertyStackView.js","webpack://grapesjs/./src/style_manager/view/PropertyFileView.js","webpack://grapesjs/./src/style_manager/view/PropertyIntegerView.js","webpack://grapesjs/./src/style_manager/view/PropertyColorView.js","webpack://grapesjs/./src/style_manager/model/PropertyRadio.js","webpack://grapesjs/./src/style_manager/model/PropertySelect.js","webpack://grapesjs/./src/style_manager/view/PropertySelectView.js","webpack://grapesjs/./src/style_manager/view/PropertyRadioView.js","webpack://grapesjs/./src/style_manager/model/PropertyInteger.js","webpack://grapesjs/./src/style_manager/model/PropertySlider.js","webpack://grapesjs/./src/style_manager/view/PropertySliderView.js","webpack://grapesjs/./src/style_manager/model/Properties.js","webpack://grapesjs/(webpack)/buildin/global.js","webpack://grapesjs/./src/commands/view/SelectPosition.js","webpack://grapesjs/./src/utils/fetch.js","webpack://grapesjs/./src/parser/model/ParserHtml.js","webpack://grapesjs/./src/domain_abstract/model/TypeableCollection.js","webpack://grapesjs/./src/domain_abstract/ui/InputNumber.js","webpack://grapesjs/./src/domain_abstract/view/DomainViews.js","webpack://grapesjs/./src/dom_components/view/ComponentsView.js","webpack://grapesjs/./src/navigator/view/ItemView.js","webpack://grapesjs/./src/domain_abstract/ui/InputColor.js","webpack://grapesjs/./src/utils/ColorPicker.js","webpack://grapesjs/./node_modules/keymaster/keymaster.js","webpack://grapesjs/./node_modules/promise-polyfill/src/index.js","webpack://grapesjs/./src/panels/model/Button.js","webpack://grapesjs/./src/panels/model/Buttons.js","webpack://grapesjs/./node_modules/codemirror/mode/css/css.js","webpack://grapesjs/./src/commands/view/CanvasClear.js","webpack://grapesjs/./src/commands/view/CanvasMove.js","webpack://grapesjs/./src/commands/view/ComponentDelete.js","webpack://grapesjs/./src/commands/view/ComponentDrag.js","webpack://grapesjs/./src/commands/view/ComponentEnter.js","webpack://grapesjs/./src/commands/view/ComponentExit.js","webpack://grapesjs/./src/commands/view/ComponentNext.js","webpack://grapesjs/./src/commands/view/ComponentPrev.js","webpack://grapesjs/./src/commands/view/ComponentStyleClear.js","webpack://grapesjs/./src/commands/view/CopyComponent.js","webpack://grapesjs/./src/commands/view/DeleteComponent.js","webpack://grapesjs/./src/commands/view/ExportTemplate.js","webpack://grapesjs/./src/commands/view/Fullscreen.js","webpack://grapesjs/./src/commands/view/MoveComponent.js","webpack://grapesjs/./src/commands/view/OpenAssets.js","webpack://grapesjs/./src/commands/view/OpenBlocks.js","webpack://grapesjs/./src/commands/view/OpenLayers.js","webpack://grapesjs/./src/commands/view/OpenStyleManager.js","webpack://grapesjs/./src/commands/view/OpenTraitManager.js","webpack://grapesjs/./src/commands/view/PasteComponent.js","webpack://grapesjs/./src/commands/view/Preview.js","webpack://grapesjs/./src/commands/view/Resize.js","webpack://grapesjs/./src/commands/view/ShowOffset.js","webpack://grapesjs/./src/commands/view/SwitchVisibility.js","webpack://grapesjs/./src/style_manager/config/config.js","webpack://grapesjs/./src/style_manager/model/PropertyFactory.js","webpack://grapesjs/./src/style_manager/model/Sector.js","webpack://grapesjs/./src/style_manager/model/Sectors.js","webpack://grapesjs/./src/style_manager/view/SectorView.js","webpack://grapesjs/./src/style_manager/view/SectorsView.js","webpack://grapesjs/./src/style_manager/index.js","webpack://grapesjs/./src/navigator/config/config.js","webpack://grapesjs/./src/navigator/index.js","webpack://grapesjs/./node_modules/backbone-undo/Backbone.Undo.js","webpack://grapesjs/./node_modules/promise-polyfill/src/finally.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/objectWithoutProperties.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://grapesjs/(webpack)/buildin/module.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://grapesjs/./src/keymaps/index.js","webpack://grapesjs/./src/undo_manager/index.js","webpack://grapesjs/./node_modules/timers-browserify/main.js","webpack://grapesjs/./node_modules/setimmediate/setImmediate.js","webpack://grapesjs/./node_modules/process/browser.js","webpack://grapesjs/./node_modules/codemirror/mode/htmlmixed/htmlmixed.js","webpack://grapesjs/./node_modules/codemirror/mode/xml/xml.js","webpack://grapesjs/./node_modules/codemirror/mode/javascript/javascript.js","webpack://grapesjs/./node_modules/codemirror-formatting/formatting.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://grapesjs/./src/navigator/view/ItemsView.js","webpack://grapesjs/./src/commands/view sync ^\\.\\/.*$","webpack://grapesjs/./src/dom_components/config/config.js","webpack://grapesjs/./src/dom_components/model/ComponentTableCell.js","webpack://grapesjs/./src/dom_components/view/ComponentTableCellView.js","webpack://grapesjs/./src/dom_components/model/ComponentTableRow.js","webpack://grapesjs/./src/dom_components/view/ComponentTableRowView.js","webpack://grapesjs/./src/dom_components/model/ComponentTable.js","webpack://grapesjs/./src/dom_components/view/ComponentTableView.js","webpack://grapesjs/./src/dom_components/model/ComponentTableBody.js","webpack://grapesjs/./src/dom_components/model/ComponentTableHead.js","webpack://grapesjs/./src/dom_components/view/ComponentTableHeadView.js","webpack://grapesjs/./src/dom_components/view/ComponentTableBodyView.js","webpack://grapesjs/./src/dom_components/model/ComponentTableFoot.js","webpack://grapesjs/./src/dom_components/view/ComponentTableFootView.js","webpack://grapesjs/./src/dom_components/model/ComponentImage.js","webpack://grapesjs/./src/dom_components/model/ComponentMap.js","webpack://grapesjs/./src/dom_components/view/ComponentImageView.js","webpack://grapesjs/./src/dom_components/view/ComponentMapView.js","webpack://grapesjs/./src/dom_components/model/ComponentText.js","webpack://grapesjs/./src/dom_components/model/ComponentLink.js","webpack://grapesjs/./src/dom_components/view/ComponentTextView.js","webpack://grapesjs/./src/dom_components/view/ComponentLinkView.js","webpack://grapesjs/./src/dom_components/model/ComponentLabel.js","webpack://grapesjs/./src/dom_components/view/ComponentLabelView.js","webpack://grapesjs/./src/dom_components/model/ComponentVideo.js","webpack://grapesjs/./src/dom_components/view/ComponentVideoView.js","webpack://grapesjs/./src/dom_components/model/ComponentScript.js","webpack://grapesjs/./src/dom_components/view/ComponentScriptView.js","webpack://grapesjs/./src/dom_components/model/ComponentSvg.js","webpack://grapesjs/./src/dom_components/view/ComponentSvgView.js","webpack://grapesjs/./src/dom_components/model/ComponentTextNode.js","webpack://grapesjs/./src/dom_components/model/ComponentComment.js","webpack://grapesjs/./src/dom_components/view/ComponentTextNodeView.js","webpack://grapesjs/./src/dom_components/view/ComponentCommentView.js","webpack://grapesjs/./src/dom_components/model/ComponentWrapper.js","webpack://grapesjs/./src/dom_components/index.js","webpack://grapesjs/./src/asset_manager/config/config.js","webpack://grapesjs/./src/asset_manager/model/Asset.js","webpack://grapesjs/./src/asset_manager/model/AssetImage.js","webpack://grapesjs/./src/asset_manager/view/AssetImageView.js","webpack://grapesjs/./src/asset_manager/view/AssetView.js","webpack://grapesjs/./src/asset_manager/model/Assets.js","webpack://grapesjs/./src/asset_manager/view/AssetsView.js","webpack://grapesjs/./src/asset_manager/view/FileUploader.js","webpack://grapesjs/./src/asset_manager/index.js","webpack://grapesjs/./src/block_manager/config/config.js","webpack://grapesjs/./src/block_manager/model/Category.js","webpack://grapesjs/./src/block_manager/model/Block.js","webpack://grapesjs/./src/block_manager/model/Blocks.js","webpack://grapesjs/./src/block_manager/model/Categories.js","webpack://grapesjs/./src/block_manager/view/BlockView.js","webpack://grapesjs/./src/block_manager/view/CategoryView.js","webpack://grapesjs/./src/block_manager/view/BlocksView.js","webpack://grapesjs/./src/block_manager/index.js","webpack://grapesjs/./src/trait_manager/config/config.js","webpack://grapesjs/./src/trait_manager/view/TraitView.js","webpack://grapesjs/./src/trait_manager/view/TraitSelectView.js","webpack://grapesjs/./src/trait_manager/view/TraitCheckboxView.js","webpack://grapesjs/./src/trait_manager/view/TraitNumberView.js","webpack://grapesjs/./src/trait_manager/view/TraitColorView.js","webpack://grapesjs/./src/trait_manager/view/TraitButtonView.js","webpack://grapesjs/./src/trait_manager/view/TraitsView.js","webpack://grapesjs/./src/trait_manager/index.js","webpack://grapesjs/./src/editor/config/config.js","webpack://grapesjs/./src/editor/model/Editor.js","webpack://grapesjs/./src/utils/extender.js","webpack://grapesjs/./src/editor/view/EditorView.js","webpack://grapesjs/./src/editor/index.js","webpack://grapesjs/./src/plugin_manager/config/config.js","webpack://grapesjs/./src/utils/polyfills.js","webpack://grapesjs/./src/index.js","webpack://grapesjs/./src/plugin_manager/index.js","webpack://grapesjs/./src/code_manager/config/config.js","webpack://grapesjs/./src/code_manager/model/HtmlGenerator.js","webpack://grapesjs/./src/code_manager/model/CssGenerator.js","webpack://grapesjs/./src/code_manager/model/JsonGenerator.js","webpack://grapesjs/./src/code_manager/model/JsGenerator.js","webpack://grapesjs/./src/code_manager/model/CodeMirrorEditor.js","webpack://grapesjs/./src/code_manager/view/EditorView.js","webpack://grapesjs/./src/code_manager/index.js","webpack://grapesjs/./src/panels/config/config.js","webpack://grapesjs/./src/panels/model/Panel.js","webpack://grapesjs/./src/panels/model/Panels.js","webpack://grapesjs/./src/panels/view/ButtonView.js","webpack://grapesjs/./src/panels/view/ButtonsView.js","webpack://grapesjs/./src/panels/view/PanelView.js","webpack://grapesjs/./src/panels/view/PanelsView.js","webpack://grapesjs/./src/panels/index.js","webpack://grapesjs/./src/canvas/view/CanvasView.js","webpack://grapesjs/./src/utils/Droppable.js","webpack://grapesjs/./src/canvas/config/config.js","webpack://grapesjs/./src/canvas/model/Frame.js","webpack://grapesjs/./src/canvas/model/Canvas.js","webpack://grapesjs/./src/canvas/view/FrameView.js","webpack://grapesjs/./src/canvas/index.js","webpack://grapesjs/./src/css_composer/config/config.js","webpack://grapesjs/./src/css_composer/model/CssRule.js","webpack://grapesjs/./src/css_composer/model/CssRules.js","webpack://grapesjs/./src/css_composer/view/CssRuleView.js","webpack://grapesjs/./src/css_composer/view/CssGroupRuleView.js","webpack://grapesjs/./src/css_composer/view/CssRulesView.js","webpack://grapesjs/./src/css_composer/index.js","webpack://grapesjs/./src/device_manager/config/config.js","webpack://grapesjs/./src/device_manager/model/Device.js","webpack://grapesjs/./src/device_manager/model/Devices.js","webpack://grapesjs/./src/device_manager/view/DevicesView.js","webpack://grapesjs/./src/device_manager/index.js","webpack://grapesjs/./src/modal_dialog/config/config.js","webpack://grapesjs/./src/modal_dialog/model/Modal.js","webpack://grapesjs/./src/modal_dialog/view/ModalView.js","webpack://grapesjs/./src/modal_dialog/index.js","webpack://grapesjs/./src/parser/config/config.js","webpack://grapesjs/./src/parser/model/BrowserParserCss.js","webpack://grapesjs/./src/parser/model/ParserCss.js","webpack://grapesjs/./src/parser/index.js","webpack://grapesjs/./src/selector_manager/config/config.js","webpack://grapesjs/./src/selector_manager/view/ClassTagView.js","webpack://grapesjs/./src/selector_manager/view/ClassTagsView.js","webpack://grapesjs/./src/selector_manager/index.js","webpack://grapesjs/./src/storage_manager/config/config.js","webpack://grapesjs/./src/storage_manager/model/LocalStorage.js","webpack://grapesjs/./src/storage_manager/model/RemoteStorage.js","webpack://grapesjs/./src/storage_manager/index.js","webpack://grapesjs/./src/utils/Sorter.js","webpack://grapesjs/./src/utils/Resizer.js","webpack://grapesjs/./src/utils/index.js","webpack://grapesjs/./src/rich_text_editor/model/RichTextEditor.js","webpack://grapesjs/./src/rich_text_editor/config/config.js","webpack://grapesjs/./src/rich_text_editor/index.js","webpack://grapesjs/./src/i18n/locale/en.js","webpack://grapesjs/./src/i18n/config.js","webpack://grapesjs/./src/i18n/index.js","webpack://grapesjs/./src/commands/config/config.js","webpack://grapesjs/./src/commands/index.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","self","global","this","previousUnderscore","_","ArrayProto","Array","ObjProto","SymbolProto","push","slice","toString","nativeIsArray","isArray","nativeKeys","keys","nativeCreate","Ctor","obj","_wrapped","nodeType","VERSION","builtinIteratee","optimizeCb","func","context","argCount","index","collection","accumulator","apply","arguments","cb","iteratee","identity","isFunction","isObject","matcher","Infinity","restArguments","startIndex","length","Math","max","rest","args","baseCreate","result","shallowProperty","has","path","deepGet","MAX_ARRAY_INDEX","pow","getLength","isArrayLike","each","forEach","map","collect","results","currentKey","createReduce","dir","reducer","memo","initial","reduce","foldl","inject","reduceRight","foldr","find","detect","predicate","findIndex","findKey","filter","select","list","reject","negate","every","all","some","any","contains","includes","include","item","fromIndex","guard","values","indexOf","invoke","contextPath","method","pluck","where","attrs","findWhere","computed","lastComputed","v","min","shuffle","sample","random","clone","last","rand","temp","sortBy","criteria","sort","left","right","a","b","group","behavior","partition","groupBy","indexBy","countBy","reStrSymbol","toArray","isString","match","size","pass","first","head","take","array","tail","drop","compact","Boolean","flatten","input","shallow","strict","output","idx","isArguments","j","len","without","otherArrays","difference","uniq","unique","isSorted","isBoolean","seen","union","arrays","intersection","argsLength","unzip","zip","createPredicateIndexFinder","findLastIndex","sortedIndex","low","high","mid","floor","createIndexFinder","predicateFind","isNaN","lastIndexOf","range","start","stop","step","ceil","chunk","count","executeBound","sourceFunc","boundFunc","callingContext","TypeError","bound","callArgs","concat","partial","boundArgs","placeholder","position","bindAll","Error","memoize","hasher","cache","address","delay","wait","setTimeout","defer","throttle","options","timeout","previous","later","leading","now","throttled","remaining","clearTimeout","trailing","cancel","debounce","immediate","debounced","callNow","wrap","wrapper","compose","after","times","before","once","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","collectNonEnumProps","nonEnumIdx","constructor","proto","prop","allKeys","mapObject","pairs","invert","functions","methods","names","createAssigner","keysFunc","defaults","source","extend","extendOwn","assign","eq","deepEq","keyInObj","pick","omit","String","props","tap","interceptor","isMatch","aStack","bStack","type","className","valueOf","areArrays","aCtor","bCtor","pop","isEqual","isEmpty","isElement","nodelist","document","childNodes","Int8Array","isFinite","isSymbol","parseFloat","isNumber","isNull","isUndefined","noConflict","constant","noop","propertyOf","matches","accum","Date","getTime","escapeMap","unescapeMap","createEscaper","escaper","join","testRegexp","RegExp","replaceRegexp","string","test","replace","escape","unescape","fallback","idCounter","uniqueId","prefix","id","templateSettings","evaluate","interpolate","noMatch","escapes","escapeRegExp","escapeChar","template","text","settings","oldSettings","render","offset","variable","Function","e","data","argument","chain","instance","_chain","chainResult","mixin","toJSON","$","Backbone","previousBackbone","emulateHTTP","emulateJSON","addUnderscoreMethods","Class","attribute","defaultVal","unshift","addMethod","_isModel","modelMatcher","model","attributes","Events","eventSplitter","eventsApi","events","callback","opts","split","on","internalOn","listening","_events","onApi","ctx","_listeners","listenTo","_listenId","listeningTo","_listeningTo","thisId","objId","handlers","off","offApi","listeners","stopListening","ids","handler","_callback","onceMap","listenToOnce","offer","trigger","triggerApi","objEvents","allEvents","triggerEvents","ev","a1","a2","a3","unbind","Model","cid","cidPrefix","parse","set","changed","initialize","validationError","idAttribute","sync","attr","val","_validate","unset","silent","changes","changing","_changing","_previousAttributes","current","prev","_pending","clear","hasChanged","changedAttributes","diff","old","previousAttributes","fetch","success","resp","serverAttrs","wrapError","save","validate","isNew","patch","xhr","destroy","url","base","urlError","encodeURIComponent","isValid","error","Collection","models","comparator","_reset","reset","setOptions","add","remove","merge","addOptions","splice","insert","at","singular","removed","_removeModels","added","merged","toAdd","toMerge","toRemove","modelMap","sortable","sortAttr","existing","_prepareModel","_addReference","orderChanged","_removeReference","previousModels","shift","_byId","modelId","callbackOpts","_onModelEvent","event","prevId","View","viewOptions","_ensureElement","delegateEventSplitter","tagName","selector","$el","_removeElement","setElement","element","undelegateEvents","_setElement","delegateEvents","el","delegate","eventName","listener","undelegate","_createElement","createElement","_setAttributes","methodMap","params","dataType","contentType","JSON","stringify","_method","beforeSend","setRequestHeader","processData","textStatus","errorThrown","ajax","Router","routes","_bindRoutes","optionalParam","namedParam","splatParam","route","isRegExp","_routeToRegExp","router","history","fragment","_extractParameters","execute","navigate","optional","exec","param","decodeURIComponent","History","checkUrl","location","routeStripper","rootStripper","pathStripper","started","interval","atRoot","pathname","getSearch","matchRoot","decodeFragment","decodeURI","href","getHash","getPath","charAt","getFragment","_usePushState","_wantsHashChange","hashChange","_hasHashChange","documentMode","_useHashChange","_wantsPushState","pushState","_hasPushState","rootPath","iframe","src","style","display","tabIndex","body","iWindow","insertBefore","firstChild","contentWindow","open","close","hash","addEventListener","attachEvent","_checkUrlInterval","setInterval","loadUrl","removeEventListener","detachEvent","removeChild","clearInterval","title","_updateHash","protoProps","staticProps","child","parent","__super__","configurable","writable","elProt","Element","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","appendStyles","styles","stls","querySelector","link","rel","prepand","appendChild","shallowDiff","objOrig","objNew","keysNew","origValue","newValue","fn","elem","getUnitFromValue","upFirst","toUpperCase","toLowerCase","camelCase","normalizeFloat","valueDef","stepDecimals","side","toFixed","hasDnd","em","nativeDnD","getElement","isTextNode","getEl","isTaggableNode","isCommentNode","getModel","getElRect","rectText","def","top","width","height","createRange","selectNode","getBoundingClientRect","detach","getPointerEvent","touches","getKeyCode","which","keyCode","getKeyChar","fromCharCode","isEscKey","capitalize","str","substring","isComponent","toHTML","isRule","toCSS","label","unit","target","default","changeProp","targetEvent","targetUpdated","getTargetValue","fromTarget","getAttributes","setTargetValue","valueToSet","setValueFromInput","final","toSet","avoidStore","getInitValue","Trait","coll","handleAdd","handleReset","setTarget","opt","tm","tf","config","build","objs","optionsTarget","TraitFactory","getConfig","Component","Styleable","removable","draggable","droppable","badgable","stylable","unstylable","highlightable","copyable","resizable","editable","layerable","selectable","hoverable","void","state","status","content","icon","classes","script","traits","propagate","dmode","toolbar","init","updated","parentAttr","newAttr","toPropagate","voidElements","ccid","createId","initClasses","initTraits","initComponents","initToolbar","scriptUpdated","tagUpdated","attrUpdated","_idUpdated","trim","emitUpdate","temporary","is","setDragMode","query","view","$els","findType","components","closest","replaceWith","class","setClass","setStyle","attrPrev","pr","setAttributes","addAttributes","newAttrs","getStyle","rule","getIdRule","getId","parseStyle","cc","propOrig","setIdRule","hasStyle","sm","cls","avoidInline","Selector","TYPE_ID","addClass","removeClass","selectors","TYPE_CLASS","classe","getClasses","classStr","toListen","clsArr","normalizeClasses","Selectors","comps","Components","addChild","avoidChildren","loadTraits","trait","append","ppfx","tb","command","ed","runCommand","force","Traits","trt","tr","getTrait","updateTrait","getTraitIndex","removeTrait","addTrait","arr","res","clm","md","cloned","getName","customName","cName","tag","i18nStr","getIcon","customTag","sTag","customAttr","getAttrToHTML","attrString","code","comp","setId","getView","getScriptString","scr","scrStr","tagVarStart","tagVarEnd","reg","onAll","clb","resetId","oldId","newId","_getStyleRule","idS","_getStyleSelector","idUpdate","idPrev","getList","nextId","getIncrementId","getNewId","ilen","uid","counter","domc","componentsById","checkId","sel","modelOpt","draggableComponents","pfx","stylePrefix","pStylePrefix","updateStyle","renderAttributes","updateHighlight","updateStatus","updateContent","handleChange","onActive","onDisable","avoidRender","dragstart","_clbObj","editor","getEditor","handleDragStart","preventDefault","stopPropagation","run","updateClasses","importClasses","childrenView","renderChildren","selectedCls","selectedParentCls","freezedCls","hoveredCls","actualCls","getAttribute","avoidHover","setAttribute","hl","styleToString","removeAttr","updateAttributes","textable","defaultAttr","contenteditable","nodeName","getChildrenContainer","innerHTML","prevDef","updateScript","getCanvasView","container","getChildrenSelector","getTemplate","ComponentsView","componentTypes","postRender","onRender","_typeof2","iterator","_typeof","arrayWithoutHoles","iterableToArray","nonIterableSpread","active","private","protected","namePreEsc","escapeName","nameEsc","getFullName","getStyleable","getValid","noDisabled","getFullString","userAgent","navigator","platform","gecko","ie_upto10","ie_11up","edge","ie","ie_version","webkit","qtwebkit","chrome","presto","safari","vendor","mac_geMountainLion","phantom","ios","android","mobile","mac","chromeOS","windows","presto_version","Number","flipCtrlCmd","captureRightClick","classTest","rmClass","node","removeChildren","removeChildrenAndAdd","elt","cssText","createTextNode","eltP","parentNode","host","activeElt","activeElement","shadowRoot","joinClasses","as","end","endNode","setEnd","setStart","createTextRange","moveToElementText","collapse","moveEnd","moveStart","selectInput","f","copyObj","overwrite","countColumn","tabSize","startValue","search","nextTab","selectionStart","selectionEnd","_e","Delayed","time","onTimeout","ms","scrollerGap","Pass","sel_dontScroll","scroll","sel_mouse","origin","sel_move","findColumn","goal","pos","col","skipped","spaceStrs","spaceStr","lst","out","nothing","createObj","inst","nonASCIISingleCaseWordChar","isWordCharBasic","ch","isWordChar","helper","extendingChars","isExtendingChar","charCodeAt","skipExtendingChars","findFirst","pred","from","to","midF","bidiOther","getBidiPartAt","order","sticky","found","cur","bidiOrdering","lowTypes","arabicTypes","bidiRE","isNeutral","isStrong","countsAsLeft","countsAsNum","BidiSpan","level","direction","outerType","types","i$1","i$2","type$1","i$3","prev$1","type$2","i$4","type$3","i$5","cur$1","type$4","i$6","end$1","replace$1","j$1","i$7","j$2","nstart","reverse","getOrder","line","noHandlers","emitter","map$$1","_handlers","getHandlers","signal","signalDOMEvent","cm","override","defaultPrevented","e_defaultPrevented","codemirrorIgnore","signalCursorActivity","cursorActivity","curOp","cursorActivityHandlers","hasHandler","eventMixin","ctor","e_preventDefault","returnValue","e_stopPropagation","cancelBubble","e_stop","e_target","srcElement","e_button","button","ctrlKey","zwspSupported","badBidiRects","dragAndDrop","div","zeroWidthElement","measure","offsetHeight","offsetWidth","hasBadBidiRects","txt","r0","r1","splitLinesAuto","nl","rt","hasSelection","getSelection","te","range$$1","ownerDocument","selection","parentElement","compareEndPoints","hasCopyEvent","oncopy","badZoomedRects","modes","mimeModes","defineMode","dependencies","resolveMode","spec","getMode","mfactory","modeObj","modeExtensions","exts","helperType","modeProps","prop$1","extendMode","properties","copyState","nstate","innerMode","info","startState","StringStream","lineOracle","lastColumnPos","lastColumnValue","lineStart","getLine","doc","lines","children","sz","chunkSize","getBetween","iter","getLines","updateLineHeight","lineNo","no","lineAtHeight","h","outer","lh","isLine","lineNumberFor","lineNumberFormatter","firstLineNumber","Pos","cmp","equalCursorPos","copyPos","x","maxPos","minPos","clipLine","clipPos","linelen","clipToLen","clipPosArray","eol","sol","peek","undefined","next","eat","eatWhile","eatSpace","skipToEnd","skipTo","backUp","column","indentation","pattern","consume","caseInsensitive","cased","substr","hideFirstChars","inner","lookAhead","oracle","baseToken","SavedContext","Context","maxLookAhead","baseTokens","baseTokenPos","highlightLine","forceToEnd","st","modeGen","lineClasses","runMode","loop","overlay","overlays","i_end","opaque","bgClass","textClass","getLineStyles","updateFrontier","getContextBefore","resetState","maxHighlightLength","stateAfter","styleClasses","highlightFrontier","modeFrontier","precise","minindent","minline","lim","indented","findStartLine","saved","fromSaved","processLine","viewFrom","viewTo","nextLine","startAt","stream","callBlankLine","readToken","blankLine","token","copy","Token","takeToken","asArray","tokens","extractLineClasses","lineClass","flattenSpans","curStart","curStyle","addModeClass","mName","sawReadOnlySpans","sawCollapsedSpans","MarkedSpan","marker","getMarkedSpanFor","spans","span","removeMarkedSpan","stretchSpansOverChange","change","full","oldFirst","markedSpans","oldLast","startCh","endCh","isInsert","nw","inclusiveLeft","insertLeft","endsAfter","inclusiveRight","markedSpansBefore","startsBefore","markedSpansAfter","sameLine","span$1","clearEmptySpans","newMarkers","gapMarkers","gap","clearWhenEmpty","detachMarkedSpans","detachLine","attachMarkedSpans","attachLine","extraLeft","extraRight","compareCollapsedMarkers","lenDiff","aPos","bPos","fromCmp","toCmp","collapsedSpanAtSide","sps","sp","collapsed","collapsedSpanAtStart","collapsedSpanAtEnd","collapsedSpanAround","conflictingCollapsedRange","lineNo$$1","visualLine","visualLineNo","lineN","vis","visualLineEndNo","lastLine","lineIsHidden","widgetNode","lineIsHiddenInner","heightAtLine","lineObj","lineLength","found$1","findMaxLine","maxLine","maxLineLength","maxLineChanged","Line","estimateHeight","cleanUpLine","styleToClassCache","styleToClassCacheWithMode","interpretTokenStyle","buildLineContent","lineView","builder","pre","trailingSpace","splitSpaces","getOption","addToken","buildToken","buildTokenBadBidi","insertLineContent","externalMeasured","maps","caches","lastChild","defaultSpecialCharPlaceholder","startStyle","endStyle","css","displayText","trailingBefore","spaceBefore","special","specialChars","mustWrap","createDocumentFragment","lastIndex","txt$1","tabWidth","specialCharPlaceholder","fullStyle","part","buildCollapsedSpan","ignoreWidget","widget","needsContentAttribute","setUneditable","allText","spanStyle","spanEndStyle","spanStartStyle","nextChange","foundBookmarks","endStyles","upto","tokenText","LineView","visualLineContinued","hidden","buildViewArray","nextPos","operationGroup","orphanDelayedCallbacks","signalLater","delayedCallbacks","fireOrphanDelayed","delayed","updateLineForChanges","dims","updateLineText","updateLineGutter","updateLineClasses","updateLineWidgets","ensureLineWrapped","replaceChild","zIndex","getLineContent","ext","built","background","updateLineBackground","wrapClass","gutter","gutterBackground","gutterClass","fixedGutter","fixedPos","gutterTotalWidth","markers","gutterMarkers","lineNumbers","wrap$1","gutterWrap","lineNumber","gutterLeft","k","gutterSpecs","gutterWidth","alignable","nextSibling","insertLineWidgets","buildLineElement","insertLineWidgetsFor","allowAbove","widgets","ws","handleMouseEvents","positionLineWidget","above","noHScroll","wrapperWidth","coverGutter","paddingLeft","marginLeft","widgetHeight","parentStyle","gutters","clientWidth","eventInWidget","sizer","mover","paddingTop","lineSpace","offsetTop","paddingVert","paddingH","cachedPaddingH","getComputedStyle","currentStyle","parseInt","paddingRight","scrollGap","nativeBarWidth","displayWidth","scroller","barWidth","displayHeight","clientHeight","barHeight","mapFromLineView","measureChar","bias","measureCharPrepared","prepareMeasureForLine","findViewForLine","findViewIndex","getDimensions","forceUpdate","lineMeasure","updateExternalMeasurement","rect","hasHeights","prepared","varHeight","wrapping","lineWrapping","curWidth","heights","rects","getClientRects","abs","bottom","ensureLineHeights","place","nodeAndOffsetInLineMap","coverStart","coverEnd","getUsefulRect","screen","logicalXDPI","deviceXDPI","normal","fromRange","hasBadZoomedRects","scaleX","scaleY","logicalYDPI","deviceYDPI","maybeUpdateRectForZooming","rSpan","charWidth","nullRect","rtop","rbot","bot","bogus","singleCursorHeightPerLine","rbottom","measureCharInner","measureText","mStart","mEnd","clearLineMeasurementCacheFor","clearLineMeasurementCache","externalMeasure","clearCaches","cachedCharWidth","cachedTextHeight","lineNumChars","pageScrollX","pageXOffset","documentElement","scrollLeft","pageScrollY","marginTop","pageYOffset","scrollTop","widgetTopHeight","intoCoordSystem","includeWidgets","yOff","viewOffset","lOff","xOff","fromCoordSystem","coords","localBox","lineSpaceBox","charCoords","cursorCoords","preparedMeasure","getBidi","partPos","other","estimateCoords","PosWithInfo","outside","xRel","coordsChar","y","coordsCharInner","rangeEnd","wrappedLineExtent","begin","wrappedLineExtentChar","boxIsAfter","box","widgetHeight$$1","ltr","coordsBidiPartWrapped","coordsBidiPart","baseX","chAround","boxAround","atLeft","atStart","_lineNo","ref","closestDist","endX","dist","textHeight","anchor","clientLeft","offsetLeft","compensateForHScroll","th","perLine","widgetsHeight","estimateLineHeights","est","estHeight","posFromMouse","liberal","forRect","space","clientX","clientY","colDiff","round","regChange","lendiff","updateLineNumbers","viewChanged","resetView","cut","viewCuttingPoint","cut$1","cutTop","cutBot","regLineChange","oldN","newN","countDirtyView","dirty","updateSelection","showSelection","prepareSelection","primary","curFragment","cursors","selFragment","ranges","primIndex","empty","showCursorWhenSelecting","drawSelectionCursor","drawSelectionRange","cursor","cursorHeight","otherCursor","cmpCoords","padding","leftSide","rightSide","sizerWidth","docLTR","drawForLine","fromArg","toArg","lineLen","wrapX","extent","iterateBidiSections","fromPos","toPos","openStart","openEnd","openRight","topLeft","topRight","botLeft","botRight","sFrom","sTo","fromLine","toLine","singleVLine","leftEnd","rightStart","restartBlink","focused","blinker","cursorDiv","visibility","cursorBlinkRate","ensureFocus","focus","onFocus","delayBlurEvent","delayingBlurEvent","onBlur","readOnly","selForContextMenu","receivedFocus","updateHeightsInViewport","prevBottom","lineDiv","updateWidgetHeight","chWidth","w","visibleLines","viewport","ensure","ensureFrom","ensureTo","calculateScrollPos","snapMargin","screentop","docBottom","atTop","atBottom","newTop","screenleft","screenw","tooWide","addToScrollTop","resolveScrollToPos","ensureCursorVisible","getCursor","scrollToPos","margin","cursorScrollMargin","scrollToCoords","scrollToCoordsRange","sPos","updateScrollTop","updateDisplaySimple","setScrollTop","startWorker","forceScroll","scrollHeight","scrollbars","setScrollLeft","isScroller","scrollWidth","alignHorizontally","measureForScrollbars","gutterW","docH","viewHeight","viewWidth","barLeft","docHeight","NativeScrollbars","vert","horiz","checkedZeroWidth","minHeight","minWidth","update","needsH","needsV","sWidth","totalHeight","totalWidth","zeroWidthHack","disableHoriz","enableZeroWidthBar","disableVert","pointerEvents","bar","maybeDisable","elementFromPoint","NullScrollbars","updateScrollbars","startWidth","startHeight","updateScrollbarsInner","sizes","paddingBottom","heightForcer","borderBottom","scrollbarFiller","coverGutterNextToScrollbar","gutterFiller","scrollbarModel","initScrollbars","scrollbarStyle","axis","nextOpId","startOperation","op","updateInput","typing","changeObjs","cursorActivityCalled","selectionChanged","updateMaxLine","ops","ownsGroup","endOperation","endCb","callbacks","fireCallbacksForOps","finishOperation","endOperation_R1","updatedDisplay","mustUpdate","updateDisplayIfNeeded","endOperation_R2","endOperation_W2","endOperation_finish","endOperations","scrollbarsClipped","marginBottom","borderRightWidth","maybeClipScrollbars","DisplayUpdate","barMeasure","adjustWidthTo","maxScrollLeft","preparedSelection","takeFocus","setDocumentHeight","postUpdateDisplay","wheelStartX","wheelStartY","doScroll","innerHeight","scrollNode","scrollIntoView","maybeScrollWindow","limit","endCoords","scrollPos","startTop","startLeft","scrollPosIntoView","maybeHiddenMarkers","unhidden","maybeUnhiddenMarkers","finish","runInOp","operation","methodOp","docMethodOp","highlight","highlightWorker","workTime","changedLines","oldStyles","highlighted","oldCls","newCls","ischange","workDelay","visible","editorIsHidden","wrapperHeight","oldDisplayWidth","renderedView","maybeUpdateLineNumberWidth","viewportMargin","different","lastWrapHeight","lastWrapWidth","adjustView","toUpdate","selSnapshot","hasFocus","anchorNode","anchorOffset","focusNode","focusOffset","selectionSnapshot","updateNumbersFrom","rm","currentWheelTarget","updateNumber","patchDisplay","snapshot","removeAllRanges","addRange","restoreSelection","selectionDiv","reportedViewFrom","reportedViewTo","updateGutterSpace","alignWidgets","align","innerW","lineGutter","lineNumInnerWidth","lineNumWidth","getGutters","sawLineNumbers","renderGutters","specs","gElt","updateGutters","Display","wheelDX","wheelDY","activeTouch","wheelSamples","wheelPixelsPerUnit","wheelEventDelta","dx","wheelDeltaX","dy","wheelDeltaY","detail","HORIZONTAL_AXIS","VERTICAL_AXIS","wheelDelta","wheelEventPixels","delta","onScrollWheel","canScrollX","canScrollY","pixels","movedX","movedY","Selection","equals","here","there","deepCopy","Range","somethingSelected","normalizeSelection","mayTouch","selectionsMayTouch","prim","inv","simpleSelection","changeEnd","adjustForChange","computeSelAfterChange","offsetPos","loadMode","modeOption","resetModeState","isWholeLineUpdate","wholeLineUpdateBefore","updateDoc","estimateHeight$$1","spansFor","updateLine","linesFor","firstLine","lastText","lastSpans","nlines","added$1","added$2","linkedDocs","sharedHistOnly","skip","sharedHist","linked","shared","attachDoc","setDirectionClass","startGen","done","undone","undoDepth","lastModTime","lastSelTime","lastOp","lastSelOp","lastOrigin","lastSelOrigin","generation","maxGeneration","historyChangeFromChange","histChange","attachLocalSpans","clearSelectionEvents","addChangeToHistory","selAfter","opId","hist","historyEventDelay","lastChangeEvent","pushSelectionToHistory","addSelectionToHistory","selectionEventCanBeMerged","clearRedo","dest","removeClearedSpans","explicitlyCleared","mergeOldSpans","getOldSpans","stretched","oldCur","stretchCur","copyHistoryArray","newGroup","instantiateSel","newChanges","extendRange","posBefore","extendSelection","setSelection","extendSelections","heads","replaceOneSelection","setSimpleSelection","setSelectionReplaceHistory","setSelectionNoUndo","NaN","filterSelectionChange","setSelectionInner","skipAtomicInSelection","reCheckSelection","mayClear","newAnchor","skipAtomic","newHead","skipAtomicInner","oldPos","preventCursorLeft","selectLeft","preventCursorRight","selectRight","atomic","near","movePos","far","cantEdit","selectAll","filterChange","canceled","makeChange","ignoreReadOnly","suppressEdits","mark","parts","mk","newParts","dfrom","dto","removeReadOnlyRanges","makeChangeInner","makeChangeSingleDoc","rebased","rebaseHist","makeChangeFromHistory","allowSelectionOnly","suppress","antiChanges","returned","shiftDoc","distance","recomputeMaxLength","checkWidthStart","retreatFrontier","changesHandler","changeHandler","makeChangeSingleDocInEditor","replaceRange","splitLines","rebaseHistSelSingle","rebaseHistArray","sub","ok","copied","changeLine","handle","changeType","LeafChunk","BranchChunk","removeInner","insertInner","iterN","oldHeight","leaf","maybeSpill","me","sibling","myIndex","used","LineWidget","adjustScrollWhenAboveVisible","this$1","oldH","nextMarkerId","TextMarker","markText","cloneNode","isParent","SharedTextMarker","markTextShared","replacedWith","addToHistory","curLine","addMarkedSpan","clearOnEnter","clearHistory","withOp","visual","dHeight","findSharedMarkers","findMarks","detachSharedMarkers","subMarker","nextDocId","Doc","lineSep","cleanGeneration","getValue","lineSeparator","setValue","getRange","getLineHandle","getLineNumber","getLineHandleVisualStart","lineCount","listSelections","setCursor","extendSelectionsBy","setSelections","addSelection","getSelections","replaceSelection","dup","replaceSelections","newSel","hint","oldPrev","newPrev","computeReplacedSel","undo","redo","undoSelection","redoSelection","setExtending","getExtending","historySize","markClean","changeGeneration","forceSplit","isClean","gen","getHistory","setHistory","histData","setGutterMarker","gutterID","clearGutter","lineInfo","addLineClass","removeLineClass","addLineWidget","insertAt","aboveVisible","removeLineWidget","setBookmark","realOpts","findMarksAt","getAllMarks","posFromIndex","sepSize","indexFromPos","copyHistory","linkedDoc","mFrom","mTo","subMark","copySharedMarkers","unlinkDoc","CodeMirror","splitIds","iterLinkedDocs","setDirection","eachLine","lastDrop","onDrop","clearDragCursor","files","dataTransfer","isReadOnly","FileReader","File","read","loadFile","file","allowDropFileTypes","reader","onload","readAsText","draggingText","text$1","getData","selected","dragCursor","forEachCodeMirror","getElementsByClassName","byClass","editors","globalsRegistered","ensureGlobalHandlers","resizeTimer","onResize","setSize","keyNames","3","8","9","13","16","17","18","19","20","27","32","33","34","35","36","37","38","39","40","44","45","46","59","61","91","92","93","106","107","109","110","111","145","173","186","187","188","189","190","191","192","219","220","221","222","63232","63233","63234","63235","63272","63273","63275","63276","63277","63302","keyMap","normalizeKeyName","alt","ctrl","cmd","mod","normalizeKeyMap","keymap","keyname","lookupKey","getKeyMap","fallthrough","isModifierKey","addModifierNames","noShift","altKey","metaKey","shiftKey","keyName","altGraphKey","deleteNearSelection","compute","kill","toKill","replaced","moveCharLogically","moveLogically","endOfLine","visually","prep","targetTop","basic","pcDefault","emacsy","macDefault","commands","singleSelection","killLine","deleteLine","delLineLeft","delWrappedLineLeft","delWrappedLineRight","rightPos","goDocStart","goDocEnd","goLineStart","goLineStartSmart","lineStartSmart","goLineEnd","visualLineEnd","lineEnd","goLineRight","goLineLeft","goLineLeftSmart","goLineUp","moveV","goLineDown","goPageUp","goPageDown","goCharLeft","moveH","goCharRight","goColumnLeft","goColumnRight","goWordLeft","goGroupRight","goGroupLeft","goWordRight","delCharBefore","deleteH","delCharAfter","delWordBefore","delWordAfter","delGroupBefore","delGroupAfter","indentAuto","indentSelection","indentMore","indentLess","insertTab","insertSoftTab","spaces","defaultTab","execCommand","transposeChars","newlineAndIndent","sels","indentLine","openLine","toggleOverwrite","firstNonWS","inWS","doHandleBinding","dropShift","ensurePolled","prevShift","stopSeq","dispatchKey","seq","keySeq","dispatchKeyInner","keyMaps","extraKeys","lookupKeyForEditor","handleKeyBinding","motion","lastStoppedKey","onKeyDown","handled","up","showCrossHair","onKeyUp","onKeyPress","charCode","handleCharBinding","lastClick","lastDoubleClick","PastClick","onMouseDown","supportsTouch","clickInGutter","repeat","compare","clickRepeat","selectingText","handleMappedButton","contained","option","addNew","moveOnDrag","configureMouse","dragDrop","moved","dragEnd","mouseMove","dragStart","e2","leftButtonStartDrag","ourRange","ourIndex","startSel","rangeForUnit","lastPos","extendTo","startCol","posCol","leftPos","oldRange","ranges$1","anchorLine","boundary","headIndex","usePart","bidiSimplify","editorSize","move","buttons","curCount","leftButtonSelect","leftButtonDown","onContextMenu","findWordAt","gutterEvent","prevent","mX","mY","lineBox","g","contextMenuInGutter","themeChanged","theme","Init","optionHandlers","dragDropChanged","funcs","dragFunctions","toggle","enter","over","leave","wrappingChanged","inputStyles","inputStyle","pasteIncoming","cutIncoming","autofocus","word","touchFinished","prevTouch","finishTouch","farAway","touch","radiusX","radiusY","isMouseLikeTouchEvent","pageX","pageY","frag","onDragOver","setData","effectAllowed","setDragImage","img","_top","onDragStart","inp","getField","registerEventHandlers","finishInit","initHooks","textRendering","how","aggressive","indent","curSpace","curSpaceString","indentUnit","indentString","indentWithTabs","pos$1","defineInitHook","lastCopied","setLastCopied","newLastCopied","applyTextInput","inserted","deleted","recent","paste","textLines","multiPaste","pasteLinesPerSelection","lineWise","changeEvent","triggerElectric","handlePaste","pasted","clipboardData","disableInput","electricChars","smartIndent","getModeAt","electricInput","copyableRanges","lineRange","disableBrowserMagic","field","spellcheck","autocorrect","autocapitalize","hiddenTextarea","border","findPosH","origDir","moveOnce","boundToLine","bidi","mv","getWrappedLineExtent","moveInStorageOrder","searchInVisualLine","getRes","nextCh","moveVisually","sawType","getHelper","hitSide","findPosV","pageSize","moveAmount","ContentEditableInput","lastAnchorNode","lastAnchorOffset","lastFocusNode","lastFocusOffset","polling","composing","gracePeriod","readDOMTimeout","posToDOM","badPos","bad","domToPos","lineNode","locateNodeInLineView","textNode","topNode","nodeValue","curNode","textContent","previousSibling","dist$1","onCopyCut","lineWiseCopyCut","clearData","kludge","hadFocus","showPrimarySelection","updateFromDOM","readFromDOMSoon","forceCompositionEnd","showMultipleSelections","curAnchor","curFocus","rng","rangeCount","getRangeAt","startGracePeriod","rememberSelection","selectionInEditor","commonAncestorContainer","blur","pollSelection","pollInterval","poll","scan","isInGutter","triggerOnKeyDown","pollContent","fromNode","toNode","toIndex","newText","closing","extraLinebreak","addText","walk","cmText","markerID","isBlock","domTextBetween","oldText","cutFront","cutEnd","oldTop","maxCutFront","newBot","oldBot","maxCutEnd","chFrom","chTo","contentEditable","readOnlyChanged","resetPosition","TextareaInput","prevInput","pollingFast","createField","textarea","prepareCopyCut","fastPoll","dispatchEvent","Event","_display","moveInputWithCursor","headPos","wrapOff","lineOff","teTop","teLeft","drawn","contextMenuPending","slowPoll","missed","same","resetSelectionOnContextMenu","oldScrollY","oldCSS","oldWrapperCSS","wrapperBox","offsetParent","scrollY","scrollTo","rehide","detectingSelectAll","prepareSelectAllHack","mouseup","extval","disabled","deflt","notOnInit","defineOption","newBreaks","refresh","getInputField","attach","integer","defineOptions","helpers","setOption","getDoc","addKeyMap","removeKeyMap","addOverlay","score","priority","insertSorted","modeSpec","removeOverlay","newRanges","getTokenAt","getLineTokens","getTokenTypeAt","getHelpers","help","_global","getStateAfter","defaultTextHeight","defaultCharWidth","getViewport","addWidget","vspace","hspace","triggerOnKeyPress","triggerOnKeyUp","triggerOnMouseDown","amount","rtlMoveVisually","goalColumn","goals","startChar","check","getScrollInfo","scrollToRange","interpret","swapDoc","phrase","phraseText","phrases","getWrapperElement","getScrollerElement","getGutterElement","registerHelper","registerGlobalHelper","addEditorMethods","dontDelegate","defineMIME","mime","defineExtension","defineDocExtension","fromTextArea","tabindex","realSubmit","form","leaveSubmitMethodAlone","submit","wrappedSubmit","getTextArea","toTextArea","cmpPos","addLegacyProps","version","oldEl","newEl","appendAtIndex","total","appendVNodes","vNodes","vNodesArr","vnode","mousedown","handleClick","Canvas","getFrameEl","calibrated","DomainViews","itemView","ToolbarButtonView","ToolbarButton","showOffsets","enable","frameOff","canvasOff","adjScroll","startSelectComponent","updateAttached","toggleSelectComponent","stopSelectComponent","getCanvasBody","win","getContentWindow","onHover","onOut","onClick","onFrameScroll","onSelect","onHovered","trg","setHovered","forceChange","component","getElementPos","updateBadge","updateHighlighter","showElementOffset","hideBadge","hideHighlighter","hideElementOffset","elPos","stopCommand","showFixedElementOffset","hideFixedElementOffset","canvas","getHighlighter","multiple","selectToggle","clearSelection","getWindow","getSelectedAll","selColl","selIndex","selectAdd","initResize","customeLabel","customBadgeLabel","cacheEl","badge","getBadge","clsBadge","badgeLabel","bStyle","canvasPos","getCanvasPosition","canvasTop","canvasLeft","posTop","badgeW","hlStyle","getSelected","updateToolbar","modelToStyle","resizeClass","toggleBodyClass","docs","onStart","resizer","keyHeight","keyWidth","currentUnit","keepAutoHeight","keepAutoWidth","getModelToStyle","computedStyle","modelStyle","currentWidth","autoWidth","currentHeight","autoHeight","startDim","unitHeight","unitWidth","onMove","onEnd","updateTarget","store","selectedHandler","onlyHeight","onlyWidth","bodyw","getBody","updateEvent","toolbarEl","getToolbarEl","toolbarStyle","showToolbar","opacity","Toolbar","toolbarView","ToolbarView","updateToolbarPos","getTargetToElementDim","frameOffset","getFrameOffset","elementHeight","targetHeight","elementTop","elRight","elementLeft","elementWidth","targetWidth","canvasWidth","getPosition","clean","selEl","hoverClass","getBadgeEl","viewEl","updateContainer","cleanPrevious","frameEl","sender","preserveSelected","setSelected","Constructor","_defineProperties","descriptor","holderClass","inputClass","handleModelChange","elementUpdated","getInputEl","fromInput","inputEl","plh","html","propTarget","onChange","onInputRender","customValue","addTo","appendTo","typeView","rendered","resetPos","Dragger","onDrag","setPosition","guidesStatic","guidesTarget","snapOffset","scale","getDocumentEl","getContainerEl","getWindowEl","drag","keyHandle","handleScroll","lastScroll","actualScroll","scrollDiff","lastScrollDiff","toggleDrag","startPointer","getPointerPos","startPosition","getStartPosition","globScrollDiff","currentPos","glDiff","lockedAxis","detectAxisLock","moveDelta","co","deltaPre","currentPointer","snapGuides","newDelta","trgX","trgY","stat","isY","axs","trgPoint","statPoint","deltaPoint","trgGuide","isPointIn","trgValue","setGuideLock","lock","ofst","guide","trgName","cancelled","xPos","yPos","defaultView","parentWindow","getPos","getPointerPosition","pEv","relX","relY","absX","absY","onAdd","df","it","logWarning","parseString","cssc","parsed","parseHtml","require","addCollection","isMult","processDef","mdl","processor","modelPr","$$typeof","parserHtml","splitPropsFromAttr","getType","setClassRule","editorModel","badgeClass","plhClass","freezClass","getCanvas","$canvas","$wrapper","getCanvasWrapper","canvasTool","getCanvasTools","bodyEl","getWrapperEl","getToolsEl","callRun","abort","callStop","ParserHtml","extendStyle","propNew","addStyle","removeStyle","imp","important","getSelectors","getSelectorsString","selectorsToString","idMatch","classMatch","htmlMatch","singlet","getElementsByTagName","querySelectorAll","parseHTML","implementation","createHTMLDocument","onReady","readyState","cash","elems","getElementById","oMatchesSelector","getCompareFunction","second","isNumeric","getDataCache","dataset","removeData","notWhiteMatch","hasClass","classList","removeAttribute","removeProp","toggleClass","camelRegex","whiteSpace","letter","getPrefixedProp","ucProp","removeEvent","eventCache","encode","selectedIndex","getSelectSingle_","getSelectMultiple_","insertContent","prepend","insertAdjacentHTML","insertElement","prefixedProp","lower","margins","runOnce","originalCallback","finalCallback","registerEvent","one","ready","evt","createEvent","initEvent","serialize","elements","insertAfter","outerHTML","_this","_this2","prependTo","docEl","clientTop","nextElementSibling","not","parents","previousElementSibling","siblings","Property","functionName","fixedValues","toRequire","requires","requiresParent","callInit","clearValue","complete","parseValue","valueStr","numeric","num","getDefaultValue","getFullValue","hasValue","callParentInit","skipInit","detached","separator","Properties","updateValues","getSplitSeparator","defaultProps","getPropertyAt","preview","getPropertyValue","Layer","onReset","noIncrement","getSeparator","getLayersFromValue","layers","cleaned","layerValue","getLayersFromStyle","styleObj","propModel","layer","propertyObj","layerProprs","propertyName","getPropertyValues","layerSeparator","layersColl","Layers","getLayers","getCurrentLayer","getLayersFromTarget","templateLabel","templateInput","inputHolderId","sector","modelValueChanged","updateVisibility","updatedCls","computedCls","labelEl","clearStyleEl","getClearEl","clearStyle","clearProperties","clearEl","getTarget","getTargetModel","getTargets","targets","getHelperModel","inputValueChanged","getInputValue","setStatus","emitUpdateTarget","checkVisibility","targetValue","ignoreDefault","defaultValue","computedValue","getComputedValue","highlightChanged","showComputed","highlightComputed","hideNotStylable","isTargetStylable","isComponentStylable","show","hide","customFetchValue","ignoreCustomValue","computedDef","computedDefault","avoid","avoidComputed","notToSkip","__updateTarget","fromParent","updateTargetStyle","stylableReq","sectors","parentEl","setRawValue","cleanValue","clearCached","$input","targetUpdate","PropertyView","propView","$props","console","warn","propsView","PropertiesView","getPropsConfig","that","mIndex","valueOnIndex","click","stackModel","sorter","propsConfig","customPreview","onPreview","updatePreview","initSorter","startSort","stackIndex","valueInt","previewEl","getPreviewEl","getPropertiesWrapper","propsWrapEl","wrapEl","deselectAll","utils","Sorter","ignoreViewChildren","containerSel","itemSel","addToCollection","fragmentEl","LayerView","PropertyCompositeView","indexChanged","refreshLayers","addLayer","deepClone","getLayerValues","layersObj","fieldEl","subModel","subProp","LayersView","modal","am","$preview","$previewBox","componentValue","setPreviewView","setPreview","pv","spreadUrl","removeFile","openAssetManager","accept","onDblClick","asset","inputInst","unitEl","$unit","PropertyIntegerView","InputColor","$color","colorEl","onOptionChange","getOptions","addOption","updateOptions","optionsStr","styleAttr","inputH","itemCls","inputStr","cl","labelTxt","titleAttr","inputHld","inputChk","getCheckedEl","inputIn","checked","units","InputNumber","validateInputValue","deepCheck","showInput","getSliderEl","slider","inputValueChangedSoft","TypeableCollection","PropertyStack","PropertyStackView","isType","PropertyComposite","PropertyFileView","PropertyColorView","PropertySelect","PropertySelectView","PropertyRadio","PropertyRadioView","PropertySlider","PropertySliderView","PropertyInteger","startSelectPosition","isPointed","placer","getPlacerEl","wmargin","nested","canvasRelative","getZoomDecimal","getOffsetDim","stopSelectPosition","posTargetCollection","posIndex","posMethod","cDim","endMove","posIsLastEl","posTargetEl","outsideElem","posTargetModel","nearFloat","isLast","Promise","rej","req","XMLHttpRequest","withCredentials","credentials","headers","statusText","resolve","responseText","onerror","upload","onProgress","onprogress","send","compTypes","modelAttrStart","modelAttr","valueLen","valStr","firstChar","lastChar","decls","decl","parseClass","parseNode","nodes","attrsLen","nodePrev","nodeChild","ct","compType","keepEmptyTextNodes","allTxt","foundTextNode","ci","cType","textTags","parserCss","scripts","allowScripts","styleStr","baseType","getBaseType","typeFound","recognizeType","getTypes","addType","definition","ModelInst","ViewInst","Input","contClass","valid","validObj","handleUnitChange","getUnitEl","upArrowClick","normalizeValue","downArrowClick","downIncrement","moveIncrement","upIncrement","prValue","defValue","fixed","regFixed","valCopy","uN","itemsView","itemType","itemViewNotFound","reuseView","typeField","resetChildren","tempComp","tempRemove","scriptContainer","allRules","getAll","hasSign","optStyle","triggerAdd","compView","dt","viewObject","ItemsView","clsNoEdit","hidable","countChildren","clsNoChild","clsTitle","clsTitleC","clsCaret","clsInput","inputNameCls","gut","clsBase","isVisible","clsCount","clsMove","clsChildren","parentView","checkChildren","updateOpening","updateLayerable","clsEdit","viewLayer","getVisibilityEl","eyeEl","hClass","toggleVisibility","handleEdit","getInputName","setEditing","handleEditEnd","inputName","opened","getCaret","toggleOpening","handleSelect","fromLayers","scrollCanvas","handleHover","showHover","freeze","unfreeze","ComponentView","highlightHover","cnt","isCountable","hideTextnode","caret","setRoot","getWrapper","showWrapper","defaultOpts","beforeShow","color","flat","allowEmpty","showButtons","clickoutFiresChange","showInitial","showPalette","showPaletteOnly","hideAfterPaletteSelect","togglePaletteOnly","showSelectionPalette","localStorageKey","maxSelectionSize","cancelText","chooseText","togglePaletteMoreText","togglePaletteLessText","clearText","noColorSelectedText","preferredFormat","containerClassName","replacerClassName","showAlpha","palette","selectionPalette","spectrums","IE","rgbaSupport","backgroundColor","replaceInput","markup","gradientFix","paletteTemplate","tiny","tinycolor","toHsl","formattedString","swatchStyle","toRgbString","toFilter","spectrum","callbackContext","instanceOptions","resize","reflow","throttler","isDragging","dragWidth","dragHeight","dragHelperHeight","slideHeight","alphaWidth","alphaSlideHelperWidth","slideHelperHeight","currentHue","currentSaturation","currentValue","currentAlpha","paletteArray","paletteLookup","draggingClass","shiftMovementDirection","boundElement","pickerContainer","dragger","dragHelper","slideHelper","alphaSliderInner","alphaSlider","alphaSlideHelper","textInput","paletteContainer","initialColorContainer","cancelButton","clearButton","chooseButton","toggleButton","isInput","isInputTypeColor","inputTypeColorSupport","shouldReplace","replacer","offsetElement","previewElement","initialColor","colorOnShow","currentPreferredFormat","applyOptions","rgb","updateSelectionPaletteFromStorage","localStorage","oldPalette","addColorToSelectionPalette","inArray","drawPalette","currentColor","getUniqueSelectionPalette","drawInitial","dragStop","setFromTextInput","updateOriginalInput","isDefaultPrevented","hideAll","$doc","onkeydown","clickout","updateUI","revert","ignoreFormatChange","newColor","newHsv","toHsv","getFormat","fromRatio","format","updateHelperLocations","flatColor","toHexString","realColor","displayColor","realHex","realRgb","alpha","toRgb","realAlpha","gradient","gradientType","dragX","dragY","alphaX","slideY","fireCallback","picker","dpWidth","outerWidth","dpHeight","outerHeight","inputHeight","docElem","cW","cH","scL","scT","getOffset","disable","paletteElementClick","ignore","keydown","oldDragX","oldDragY","furtherFromX","paletteEvent","spect","optionName","optionValue","coord","onmove","onstart","onstop","dragging","maxHeight","maxWidth","hasTouch","duringDragEvents","t0","dataID","extra","load","loadOpts","_cachedResult","colorInput","localization","palettes","processNativeColorInputs","colorInputs","trimLeft","trimRight","tinyCounter","math","mathRound","mathMin","mathMax","mathRandom","named","matchers","rgba","hsl","hsla","hsv","hsva","hex8","parseIntFromHex","hex6","hex3","stringInputToObject","bound01","convertToPercentage","q","hsvToRgb","hue2rgb","hslToRgb","boundAlpha","inputToRGB","_originalInput","_r","_g","_b","_a","_roundA","_format","_gradientType","_ok","_tc_id","rgbToHsl","rgbToHsv","rgbToHex","allow3Char","hex","pad2","rgbaToHex","desaturate","clamp01","saturate","greyscale","lighten","brighten","darken","spin","hue","complement","triad","tetrad","splitcomplement","analogous","slices","ret","monochromatic","modification","isDark","getBrightness","isLight","getOriginalInput","getAlpha","setAlpha","toHsvString","toHslString","toHex","toHex8","toHex8String","toPercentageRgb","toPercentageRgbString","toName","hexNames","secondColor","hex8String","secondHex8String","formatSet","hasAlpha","_applyModification","_applyCombination","color1","color2","mix","w1","rgb1","rgb2","w2","readability","c1","c2","brightnessA","brightnessB","colorDiff","brightness","isReadable","mostReadable","baseColor","colorList","bestColor","bestScore","bestIsReadable","readable","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","burntsienna","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","flipped","flip","isOnePointZero","processPercent","isPercentage","CSS_UNIT","PERMISSIVE_MATCH3","PERMISSIVE_MATCH4","ColorPicker","getColorEl","valueClr","noneColor","previousColor","cpStyle","elToAppend","colorPickerConfig","getColor","_mods","_scope","_MODIFIERS","control","_MAP","backspace","tab","esc","down","del","home","pageup","pagedown","'","_downKeys","compareArray","modifierMap","updateModifierKey","assignKey","scope","mods","getKeys","getMods","shortcut","getScope","mi","addEvent","modifiersMatch","dispatch","previousKey","setScope","deleteScope","isPressed","getPressedKeyCodes","multipleKeys","setTimeoutFunc","_state","_handled","_value","_deferreds","doResolve","deferred","_immediateFn","onFulfilled","onRejected","promise","then","finale","thisArg","_unhandledRejectionFn","Handler","reason","ex","prom","promiseFinally","race","setImmediate","err","togglable","runDefaultCommand","stopDefaultCommand","Buttons","Button","deactivateAllExceptOne","except","deactivateAll","fromCollection","disableAllButtons","disableAllButtonsExceptOne","keySet","parserConfig","inline","propertyKeywords","tokenHooks","documentTypes","mediaTypes","mediaFeatures","mediaValueKeywords","nonStandardPropertyKeywords","fontProperties","counterDescriptors","colorKeywords","valueKeywords","allowNested","lineComment","supportsAtComponent","tp","tokenBase","tokenize","tokenString","tokenParenthesized","quote","escaped","pushContext","popContext","states","popAndPass","wordAsValue","stateArg","_stream","atBlock","textAfter","cx","blockCommentStart","blockCommentEnd","blockCommentContinue","fold","documentTypes_","mediaTypes_","mediaFeatures_","mediaValueKeywords_","propertyKeywords_","nonStandardPropertyKeywords_","colorKeywords_","valueKeywords_","allWords","tokenCComment","maybeEnd","DomComponents","CssComposer","canvasModel","toggleMove","disableDragger","enableDragger","toggleDragger","methodCls","methodEv","methodsEv","setupGuides","isTran","guidesContainer","getGuidesContainer","getGuidesTarget","getGuidesStatic","drg","guides","guidesEl","elInfoX","elInfoY","guideContent","elGuideInfoX","elGuideInfoY","elGuideInfoContentX","elGuideInfoContentY","updateGuides","debug","renderGuide","getElementGuides","getGuidePosUpdate","getRect","topScroll","frameTop","un","guideSize","numEl","originRect","getTranslate","transform","itemStr","setTranslate","en","adds","center","getMouseRelativeCanvas","guidesInfo","renderGuideInfo","hideGuidesInfo","rectOrigin","origEdge1","origEdge1Raw","origEdge2","origEdge2Raw","elGuideInfo","elGuideInfoCnt","guideInfoStyle","statEdge2","isEdge1","statEdge1","statEdge1Raw","statEdge2Raw","pos2","sizeRaw","toSelect","snd","dc","rules","toClear","SelectComponent","mouseover","startDelete","mouseout","stopDelete","onDelete","$this","attachBadge","removeBadge","updateBadgeLabel","Modal","CodeManager","$editors","oHtmlEd","buildEditor","oCsslEd","htmlEditor","cssEditor","textViewCode","setContent","getHtml","getCss","codeName","codeMirror","getViewer","EditorView","isEnabled","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen","exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen","fsChanged","targetEl","getContainer","SelectPosition","noSelClass","getHighlighterEl","wp","toggleClipboard","contentDocument","onEndMove","rollback","initSorterFromModel","onEndMoveFromModel","initSorterFromModels","lastModel","toMove","$badge","$hl","AssetManager","amContainer","modalTitle","assets","uploadEl","bm","BlockManager","pn","Panels","blocks","panels","getPanel","addPanel","lm","LayerManager","$cn","$cn2","dvm","DeviceManager","showDevices","SelectorManager","StyleManager","$header","panel","toggleSm","componentFirst","selectedAll","Config","TraitManager","tmView","getTraitsViewer","confTm","toggleTm","clp","cop","getPanels","getPanelsEl","tglPointers","elP","stopDefault","editorEl","onclick","canvasS","runDefault","canvasResizer","canvasView","getResizerEl","posFetcher","mousePosFetcher","getMouseRelativePos","forceNew","Utils","Resizer","getOffsetMethod","zoom","showOffsetsSelected","stateVar","offsetViewer","marginT","marginB","marginL","marginR","padT","padB","padL","padR","stateLow","marginName","paddingName","marginV","paddingV","paddingEls","fullMargName","fullPadName","marginLeftSt","marginRightSt","marginRight","marginTopSt","marginBottomSt","mtStyle","mbStyle","mlStyle","mrStyle","ptStyle","pbStyle","plStyle","prStyle","posLeft","widthEl","marginSideH","marginSideT","padTop","padBot","padSideH","padSideT","padRight","ss","fonts","font","buildProps","extendBuilded","builded","buildProperties","extendProperties","propsModel","moProps","pLen","mProps","isolated","mProp","mPProps","buildP","propFactory","PropertyFactory","Sector","caretR","caretD","updateOpen","getPropertiesEl","$caret","renderProperties","dummy","toggleStateCls","pt","mdToClear","devicePreviewMode","stateStr","helperRule","getClassRule","appendStateRule","trgs","targetIsClass","selectorsAdd","SectorView","SectView","Sectors","SectorsView","onLoad","elTo","addSector","getSector","_logNoSector","removeSector","getSectors","addProperty","sectorId","getProperty","removeProperty","getProperties","um","cssC","smConf","hasClasses","deviceW","getCurrentMedia","avoidInlineStyle","createType","getEmitter","block","scrollLayers","ItemView","componentChanged","getRoot","core_slice","hasKeys","callstackWasIndexed","magicFusionIndex","getMagicFusionIndex","ObjectRegistry","registeredObjects","cidIndexes","onoff","objects","objectRegistry","register","unregister","actionUndoRedo","action","undoTypes","managerUndoRedo","manager","stack","magic","everything","isCurrentlyUndoRedoing","pointer","actions","isUndo","addToStack","track","undoTypesType","condition","validateUndoActionCreation","maximumStackLength","isRegistered","UndoTypes","unsetData","afterAttributes","keysAfter","keysPrevious","OwnedUndoTypes","manipulateUndoType","manipType","undoType","fns","undoTypesInstance","Action","UndoStack","setMaxLength","UndoManager","startTracking","stopTracking","isTracking","_addToStack","unregisterAll","undoAll","redoAll","isAvailable","undoManager","addUndoType","changeUndoType","removeUndoType","defaultAttributes","finallyConstructor","objectWithoutPropertiesLoose","excluded","getOwnPropertySymbols","sourceSymbolKeys","arrayWithHoles","iterableToArrayLimit","nonIterableRest","webpackPolyfill","deprecate","paths","arr2","keymaps","configDef","keymaster","defKeys","pk","isEditing","isInputFocused","removeAll","beforeCache","customUndoType","bf","af","entity","hasUndo","hasRedo","getStack","getInstance","Timeout","clearFn","_id","_clearFn","unref","enroll","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","_onTimeout","clearImmediate","registerImmediate","channel","messagePrefix","onGlobalMessage","nextHandle","tasksByHandle","currentlyRunningATask","attachTo","getPrototypeOf","process","nextTick","runIfPresent","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","canUsePostMessage","MessageChannel","port1","port2","onreadystatechange","task","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","runClearTimeout","Item","browser","env","argv","versions","addListener","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","binding","cwd","chdir","umask","defaultTags","attrRegexpCache","getAttrValue","regexp","getAttrRegexp","getTagRegexp","anchored","addTags","htmlMode","multilineTagIndentFactor","multilineTagIndentPastTag","tags","configTags","configScript","scriptTypes","htmlState","inTag","tagInfo","tagText","findMatchingMode","endTagA","endTag","localState","localMode","pat","maybeBackup","local","htmlConfig","autoSelfClosers","implicitlyClosed","contextGrabbers","doNotIndent","allowUnquoted","allowMissing","caseFold","xmlConfig","allowMissingTagName","editorConf","config_","inText","parser","inBlock","doctype","depth","closure","baseState","tagStart","isInAttribute","stringStartCol","terminator","startOfLine","noIndent","maybePopContext","nextTagName","parentTagName","tagNameState","closeTagNameState","attrState","matchClosing","closeState","closeStateErr","attrEqState","attrValueState","attrContinuedState","isInText","baseIndent","fullLine","alignCDATA","tagAfter","grabbers","configuration","skipAttribute","xmlCurrentTag","xmlCurrentContext","statementIndent","jsonldMode","jsonld","jsonMode","json","isTS","typescript","wordRE","wordCharacters","keywords","kw","A","B","C","D","operator","atom","isOperatorChar","isJsonldKeyword","cont","tokenComment","expressionAllowed","inSet","readRegexp","tokenQuasi","lexical","lastType","brackets","findFatArrow","fatArrowAt","arrow","sawSomething","bracket","atomicTypes","JSLexical","inScope","varname","localVars","vars","marked","inList","newContext","registerVarScoped","Var","globalVars","isModifier","defaultVars","pushcontext","pushblockcontext","popcontext","pushlex","lex","poplex","expect","wanted","exp","statement","vardef","parenExpr","maybeexpression","maybeelse","functiondef","forspec","enumdef","typename","typeexpr","expression","maybelabel","maybeCatchBinding","afterExport","afterImport","funarg","expressionInner","expressionNoComma","noComma","arrowBodyNoComma","arrowBody","commasep","maybeop","maybeoperatorNoComma","maybeoperatorComma","classExpression","arrayLiteral","contCommasep","objprop","quasi","targetNoComma","maybeTypeArgs","maybeTarget","expr","continueQuasi","getterSetter","afterprop","maybetype","what","sep","proceed","maybetypeOrIn","mayberettype","isKW","afterType","typeprop","typearg","maybeReturnType","functiondecl","typeparam","maybeTypeDefault","maybeAssign","vardefCont","eltpattern","proppattern","_type","forspec1","forspec2","classNameAfter","classBody","classfield","maybeFrom","exportField","importSpec","maybeMoreImports","maybeAs","enummember","basecolumn","parseJS","isContinuedStatement","doubleIndentSwitch","closeBrackets","skipExpression","commentStart","commentEnd","newlineAfterToken","inlineElements","isComment","curMode","selText","endIndex","cmInstance","atSol","newline","sourceKeys","_arr","_n","_d","_s","_i","sortContainer","created","srcModel","getSourceModel","avoidSelectOnEnd","webpackContext","webpackContextResolve","wrapperId","wrapperName","storeWrapper","cells","columns","rows","rowsToAdd","columnsToAdd","ComponentTableBody","svgAttrs","ratioDefault","cmdName","hasButtonBool","getSrcResult","btoa","isDefaultSrc","parseUri","uri","qrs","pair","hostname","protocol","port","mapUrl","mapType","frameborder","OComponent","parseFromSrc","updateSrc","getMapUrl","addr","qr","z","dblclick","classEmpty","fetchFile","FileUploader","uploadFile","srcExists","onError","noDrag","getIframe","ifrm","frameBorder","onmousedown","compProt","disableEditing","updateContentText","syncContent","rte","fromDisable","rteEnabled","activeRte","toggleEvents","getContent","contentOpt","customRte","onInput","disablePropagation","mixins","elDocs","ComponentLinkView","yt","vi","ytnc","videoId","provider","ytUrl","ytncUrl","viUrl","poster","muted","autoplay","controls","modestbranding","sources","allowfullscreen","prov","getYoutubeTraits","getVimeoTraits","getSourceTraits","updateTraits","getYoutubeSrc","getYoutubeNoCookieSrc","getVimeoSrc","getProviderTrait","getAutoplayTrait","getLoopTrait","getControlsTrait","isYtProv","isYtncProv","isViProv","isExtProv","OComponentView","updateVideo","updateProvider","renderByProvider","videoEl","renderYoutube","renderYoutubeNoCookie","renderVimeo","renderSource","initVideoEl","scriptCount","svar","svarNext","SVGElement","createElementNS","createComment","componentView","ComponentTableCell","ComponentTableCellView","ComponentTableRow","ComponentTableRowView","ComponentTable","ComponentTableView","ComponentTableHead","ComponentTableHeadView","ComponentTableBodyView","ComponentTableFoot","ComponentTableFootView","ComponentMap","ComponentMapView","ComponentLink","ComponentLabel","ComponentLabelView","ComponentVideo","ComponentVideoView","ComponentImage","ComponentImageView","ComponentScript","ComponentScriptView","ComponentSvg","ComponentSvgView","ComponentComment","ComponentCommentView","ComponentTextNode","ComponentTextNodeView","ComponentText","ComponentTextView","ComponentWrapper","storageKey","smc","stm","storeHtml","storeComponents","componentHovered","selectRemove","setComponents","postLoad","handleChanges","handleUpdates","handleChangesColl","handleRemoves","evn","els","getCacheLoad","logError","isObj","getComponents","noStore","toStore","getComponent","addComponent","extendView","extendFn","extendFnView","extendType","extendViewType","typeToExtend","modelToExt","viewToExt","getExtendedObj","srcToExt","parentFn","removeType","noAssets","uploadName","multiUpload","autoAdd","customFetch","embedAsBase64","dropzone","openAssetsOnDrop","dropzoneContent","beforeUpload","getFilename","getExtension","Asset","unitDim","AssetView","getPreview","getInfo","dim","onRemove","stopImmediatePropagation","AssetImage","AssetImageView","renderAssets","addToAsset","removedAsset","handleSubmit","getAddInput","getAssetsEl","globalCollection","inputUrl","toggleNoAssets","addAsset","assetsEl","fuRendered","fu","uploadId","disableUpload","onUploadStart","onUploadEnd","onUploadError","onUploadResponse","FormData","fetchOpts","catch","initDrop","uploadForm","ondragover","ondragleave","ondrop","initDropzone","addedCls","edEl","dropzoneCls","cleanEditorElCls","onDragLeave","response","promises","mimeTypeMatcher","image","Image","readAsDataURL","Assets","FileUpload","AssetsView","getAllVisible","toRender","editorView","appendOnClick","activate","media","category","Category","Block","dragend","endDrag","getSorter","setDropContent","validTarget","startDrag","refreshCanvas","setDragHelper","handleDrag","handleDragEnd","oldActive","dragResult","dragContent","iconClass","activeClass","getIconEl","getBlocksEl","iconEl","blocksEl","categories","renderedCategories","noCatClass","blockContClass","catsClass","tac","grabbingCls","updateConfig","BlockView","ignoreCategories","catModel","catId","catView","getCategoriesEl","CategoryView","catsEl","blocksVisible","blocksView","Blocks","BlockCategories","BlocksView","getCategories","external","eventCapture","appendInput","getLabel","clsField","onValueChange","removeView","rerender","getClbOpts","elInput","getInputElem","onUpdate","onEvent","getValueForTarget","setInputValue","postUpdate","renderLabel","tpl","createLabel","getModelValue","i18nAttr","getElInput","renderField","inputs","createInput","hasLabel","noLabel","tmpl","TraitView","propName","resultName","getCheckedValue","valueTrue","valueFalse","toInit","inputNumber","labelButton","number","TraitNumberView","TraitSelectView","checkbox","TraitCheckboxView","TraitColorView","TraitButtonView","updatedCollection","TraitsViewer","TraitsView","fromElement","noticeOnUnload","forceClass","log","baseCss","protectedCss","canvasCss","defaultCommand","mediaCondition","jsInHtml","multipleSelection","exportWrapper","wrapperIsBody","avoidDefaults","clearStyles","dragMode","cssIcons","i18n","assetManager","storageManager","richTextEditor","domComponents","codeManager","cssComposer","selectorManager","deviceManager","devices","widthMedia","styleManager","blockManager","traitManager","keepUnusedStyles","multiFrames","timedInterval","updateItr","deps","ViewProt","eventNsMap","vid","eventMap","getEvents","getNamespaces","namespaces","bval","baseVal","Window","items","ar","Extender","logs","warning","editing","clipboard","previousModel","changesCount","storables","toLoad","device","toLog","attrsOrig","loadModule","updateChanges","listenLog","eventFrom","eventTo","loadOnStart","canAutoload","onbeforeunload","isAutosave","getStepsBeforeSave","moduleName","Mod","cfgParent","cfg","_disable","mth","removeSelected","addSelected","toggleSelected","wrp","getCode","setState","getState","js","getJs","avoidProt","avoidProtected","protCss","cacheLoad","getDeviceModel","defaultRunning","getDirtyCount","inAbsoluteMode","destroyAll","Keymaps","RichTextEditor","msg","logNs","logInfo","conf","disableButtons","contEl","EditorModel","I18n","StorageManager","Commands","Parser","addComponents","getSelectedToStyle","setDevice","getDevice","setCustomRte","setCustomParserCss","plugins","agent","isIE","originalCreateHTMLDocument","DOMImplementation","polyfills","plugin","defaultConfig","autorender","pluginsOpts","Editor","pluginId","plgOptions","wplg","inlineCss","buildModels","maxValue","MAX_VALUE","compCls","buildFromModel","isWrapper","atRules","dump","atRule","getAtRule","mRules","buildFromRule","sortMediaObject","rulesStr","ruleStr","selectorStrNoAdd","skipAdd","singleAtRule","getDeclaration","getQueryLength","mediaQuery","itemsArr","isMobFirst","mquery","beforeEach","mapModel","mapJs","autoFormatRange","noRefresh","generators","defGenerators","viewers","defViewers","gHtml","gCss","gJson","gJs","eCM","loadDefaultGenerators","loadDefaultViewers","addGenerator","generator","getGenerator","getGenerators","addViewer","viewer","getViewers","createViewer","txtarea","updateViewer","genId","swv","expt","ola","obl","ful","prv","delayBtnsShow","btn","Panel","activeCls","disableCls","btnsVisCls","updateActive","checkActive","updateBtnsVis","updateClassName","updateDisable","attrCls","$buttons","commandName","noStop","clicked","toogleActive","parentM","ButtonView","appendContent","toggleVisible","tc","cr","bc","resz","resLen","tl","bl","br","silentFrames","avoidContainerUpdate","forContainer","styleWidth","styleHeight","ButtonsView","PanelView","PanelsViewObj","PanelsView","removePanel","addButton","panelId","removeButton","getButton","timerZoom","Droppable","handleDragEnter","handleDragOver","handleDrop","handleDragLeave","updateCounter","endDrop","getContentByData","autoscrollLimit","notTextable","getHead","setHead","addHeadItem","getHeadByAttr","removeHeadByAttr","addLink","removeLink","addScript","removeScript","frame","rulers","Frame","onZoomChange","motionsEv","updateHead","updateDim","headEl","currW","currH","newW","newH","noChanges","updateOffset","contents","wheel","clearOff","updateFrames","toggleListeners","FrameView","_parentEvent","onWheel","getZoom","defOpts","mpl","framesArea","isElInViewport","frameRect","rTop","rLeft","toolsEl","renderScripts","appendScript","renderBody","getDocument","externalStyles","frameCss","getJsContainer","onscroll","fdoc","oEvent","keyCodeVal","createCustomEvent","docBody","frmOff","cvsOff","getCanvasOffset","eo","frmTop","avoidFrameOffset","frmLeft","getElementOffsets","bEl","fo","jsContainer","$frames","hlEl","badgeEl","placerEl","ghostEl","resizerEl","offsetEl","fixedOffsetEl","requestAnimationFrame","CanvasView","setWrapper","startAutoscroll","stopAutoscroll","autoscroll","updateClientY","getFrame","getGhostEl","getOffsetViewerEl","getFixedOffsetViewerEl","setCustomBadgeLabel","leftScroll","toRight","eventToTrigger","elTop","elLeft","topPos","canvasHeight","addTop","addLeft","subWinOffset","frameElement","yOffset","xOffset","toIgnore","cv","getScrollListeners","lastClientY","frameWindow","nextTop","limitTop","limitBottom","setZoom","getZoomMultiplier","getFrameWrapperEl","staticRules","mediaText","atRuleType","slct","typeStr","addSelector","isBody","ruleProps","wd","re","CssRule","parseCss","toTrack","CssRuleView","getBlockId","renderStarted","atRuleEl","styleEl","CssGroupRuleView","appendData","clsName","defaultBlockId","blockId","getMediaWidth","contRules","prs","rulesView","storeCss","storeStyles","elStyle","CssRules","CssRulesView","sl","newSels","le","selec","modelExists","avoidUpdateStyle","styleUpdate","setRule","atRuleParams","checkNode","getRule","checkUnit","Device","getSorted","startAdd","updateSelect","updateDevice","devEl","devicesEl","deviceLabel","Devices","dv","DevicesView","backdrop","updateTitle","getCollector","$collector","$content","getTitle","$title","triggerEvent","ModalM","enb","ModalView","setTitle","onceClose","onceOpen","isOpen","getContentEl","4","5","6","7","11","12","14","15","atRuleKeys","singleAtRules","singleAtRulesNames","parseSelector","stl","propValue","getPropertyPriority","parseCondition","conditionText","selectorText","createNode","selLen","lastClass","stateArr","sheet","cssRules","keyText","isSingleAtRule","subRules","lens","subRule","selsParsed","selsAdd","lastRule","len3","selsAddStr","BrowserCssParser","classSets","classSet","pHtml","pCss","selectedName","iconAdd","iconSync","iconTagOn","iconTagOff","iconTagRemove","startEditTag","endEditTag","innerText","changeStatus","removeTag","$chk","labelInfo","labelStates","labelHead","stateInputId","stateInputC","getStyleEmitter","toList","toListCls","__handleStateChange","checkSync","renderClasses","tagRemoved","syncStyle","getCommonSelectors","ruleComponents","ruleComponent","updateStateVis","getStateOptions","addToClasses","startNewTag","$addBtn","endNewTag","onInputKeyUp","addNewTag","checkStates","statesEl","getStates","validSelectors","_commonSelectors","acc","$btnSyncEl","getStatesC","updateSelector","elSel","__getName","idRes","stateChanged","ClassTagView","$states","$statesC","tmpOpts","renderRes","$classes","isId","isClass","selectorTags","ClassTagsView","cname","getSelector","autosave","autoload","stepsBeforeSave","checkLocal","urlStore","urlLoad","jqXHR","onComplete","contentTypeJson","fetchOptions","checkStorageEnvironment","setItem","getItem","removeItem","clbErr","onResponse","request","typeJson","reqHead","typeHead","bodyObj","bodyKey","addOpts","storages","defaultStorages","remote","RemoteStorage","LocalStorage","currentStorage","loadDefaultProviders","setCurrent","setAutosave","setStepsBeforeSave","storage","getStorages","getCurrent","keysF","itemKey","itemKeyR","getCurrentStorage","elT","elL","borderOffset","freezeClass","onMoveClb","relative","ignoreModels","offTop","offLeft","$document","dropContent","selectOnEnd","activeTextModel","getScale","getDocuments","canvasDoc","dropModel","updateTextViewCursorPosition","targetDoc","caretRangeFromPoint","poiner","rangeParent","rangeOffset","setContentEditable","toggleSortCursor","clonedEl","moveDragHelper","posY","posX","dragHelperStyle","useBody","createPlaceholder","ins","contSel","eV","isTextable","isTextableActive","tempModel","selectTargetModel","targetModel","dsp","eO","rY","rX","mousePos","eventMove","sourceModel","dimsFromTarget","lastDims","findPosition","disableTextable","movePlaceholder","prevTargetDim","$plh","isInFlow","styleInFlow","$parent","overflow","trgModel","dragInfo","dropInfo","prevTarget","targetP","validResult","getDim","cacheDimsP","getChildrenDim","cacheDims","nearBorders","targetParent","getTargetFromEl","targetPrev","nearElBorders","getCurrentPos","elOffsets","elIndex","indexEl","leftLimit","xLimit","dimRight","yLimit","xCenter","yCenter","dimDown","trgDim","elDim","borderColor","borderWidth","brd","marg","brdCol","margI","dst","srcEl","modelToDrop","modelTemp","warns","targetCollection","viewActive","modelEl","insertHTML","minDim","maxDim","getBoundingRect","setup","hdl","createHandler","frames","forceShow","handleMouseDown","attrName","handlerAttr","clickedHandler","rectDim","startPos","handleKeyDown","toggleFrames","mouseFetch","calc","updateRect","getSelectedHandler","rectEl","isHandler","deltaX","deltaY","startW","startH","ratioActive","ratio","RTE_KEY","btnState","isValidAnchor","defActions","bold","italic","underline","strikethrough","setEl","updateActiveActions","settAct","actionbar","inactive","actionbarCont","actionbarContainer","addAction","styleWithCSS","syncActions","getActions","queryCommandSupported","queryCommandState","enabled","actionbarEl","deleteContents","nd","insertNode","adjustToolbar","lastEl","globalRte","hideToolbar","initRte","updatePosition","traitInputAttr","locale","localeFallback","detectLocale","messages","inputPlh","uploadTitle","labels","comment","video","tfoot","tbody","thead","table","row","cell","desktop","tablet","mobileLandscape","mobilePortrait","titles","fullscreen","emptyState","hover","fileButton","general","layout","typography","decorations","flex","dimension","false","_blank","_localLang","setLocale","evObj","valuePrev","getLocale","getMessages","lang","_debug","setMessages","addMessages","deepAssign","targValue","srcValue","localeFlb","lFlb","_getMsg","_addParams","nav","language","userLanguage","msgSet","defaultCommands","commandsDef","CommandAbstract","selAll","nativeDrag","defComOptions","hideTlb","cmdMove","oldCmd","loadDefaultCommands","cmdObj","isActive","getActive"],"mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAkB,SAAID,IAEtBD,EAAe,SAAIC,IARrB,CASGK,QAAQ,WACX,O,YCTE,I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bC,qBAAqB,EACrBC,aAAa,EACbC,aAAa,EACbC,iBAAiB,EACjBC,wBAAwB,EACxBC,mBAAmB,EACnBC,sBAAsB,EACtBC,iBAAiB,EACjBhjB,SAAU,OACVijB,iBAAkB,EAClBC,WAAY,SACZC,WAAY,SACZC,sBAAuB,OACvBC,sBAAuB,OACvBC,UAAW,wBACXC,oBAAqB,oBACrBC,iBAAiB,EACjBpjG,UAAW,GACXqjG,mBAAoB,GACpBC,kBAAmB,GACnBC,WAAW,EACXn/B,MAAO,WACPo/B,QAAS,CACP,CACE,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,YAGJC,iBAAkB,GAClBryB,UAAU,EACV3tE,OAAQ,MAEVigG,EAAY,GACZC,IAAO,QAAQ1zF,KAAKziB,OAAO26B,UAAUD,WACrC07E,EAAe,WACb,SAAS1uG,EAASyiB,EAAKshB,GACrB,UAAW,GAAKthB,GAAKliB,QAAQwjC,GAG/B,IACI9mB,EADOzR,SAASwN,cAAc,OACjBiE,MAEjB,OADAA,EAAMgY,QAAU,kCAEdj1B,EAASid,EAAM0xF,gBAAiB,SAChC3uG,EAASid,EAAM0xF,gBAAiB,QAVrB,GAafC,EAAe,CACb,4BACA,qEACA,mCACA,UACA/hG,KAAK,IACPgiG,EAAU,WAGR,IAAIC,EAAc,GAClB,GAAIL,EACF,IAAK,IAAI/1G,EAAI,EAAGA,GAAK,EAAGA,IACtBo2G,GAAe,kBAAoBp2G,EAAI,WAI3C,MAAO,CACL,uCACA,qCACA,gDACA,kDACA,4DACA,SACA,SACA,oCACA,6BACA,8BACA,6BACA,yBACA,uBACA,uBACA,iCACA,SACA,SACA,SACA,0CACA,SACA,uBACA,gCACAo2G,EACA,SACA,SACA,oGACA,SACA,yCACA,6DACA,SACA,gDACA,0CACA,qCACA,oDACA,SACA,SACA,UACAjiG,KAAK,IAhDC,GAmDZ,SAASkiG,EAAgBv0G,EAAGuyG,EAAOjiG,EAAWyF,GAE5C,IADA,IAAI65E,EAAO,GACF1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9S,MAUTowB,WAhSK,SAgSMF,GAAuB,IAC5BrtB,EADc4J,EAAc,uDAAJ,GAG5B,GAAIyjB,GAAWA,EAAQgF,IAAK,CAC1B,IAAMpiB,EAAKod,EAAQpd,GACb+hB,EAAS3O,EAAGvnB,IAAI,UAEjBqB,KAAKslL,SAASxyK,KAAOrG,EAAQ4jB,OAAUlyB,EAAEyK,SAC5C/F,EAASqtB,EAAQ8lE,QAAQnhE,EAAQpoB,GAC7BqG,GAAMod,EAAQrlB,OAASqlB,EAAQ2wI,SAAWp0J,EAAQwpF,QACpDx+D,EAAO3kB,GAAMjQ,IAKnB,OAAOA,GAUTkmF,YAzTK,SAyTO74D,GAAuB,IAC7BrtB,EADe4J,EAAc,uDAAJ,GAG7B,GAAIyjB,GAAWA,EAAQgF,IAAK,CAC1B,IAAMpiB,EAAKod,EAAQpd,GACb+hB,EAAS3O,EAAGvnB,IAAI,WAElBqB,KAAKslL,SAASxyK,IAAOrG,EAAQ4jB,QAAUlyB,EAAEyK,UACvCkK,UAAW2kB,EAAO3kB,GACtBjQ,EAASqtB,EAAQgmE,SAASrhE,EAAQpoB,IAItC,OAAO5J,GASTzD,OA/UK,SA+UE8wB,GAGL,OAFKA,EAAQrlB,OAAMqlB,EAAQ2wI,OAAS,GAE7B,IADKgkB,UAAgB31K,OAAOghB,GAC5B,CAAQ/xB,S","file":"dist/grapes.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"grapesjs\"] = factory();\n\telse\n\t\troot[\"grapesjs\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 90);\n","// Underscore.js 1.9.1\n// http://underscorejs.org\n// (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n // Baseline setup\n // --------------\n\n // Establish the root object, `window` (`self`) in the browser, `global`\n // on the server, or `this` in some virtual machines. We use `self`\n // instead of `window` for `WebWorker` support.\n var root = typeof self == 'object' && self.self === self && self ||\n typeof global == 'object' && global.global === global && global ||\n this ||\n {};\n\n // Save the previous value of the `_` variable.\n var previousUnderscore = root._;\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype;\n var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\n\n // Create quick reference variables for speed access to core prototypes.\n var push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // All **ECMAScript 5** native function implementations that we hope to use\n // are declared here.\n var nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeCreate = Object.create;\n\n // Naked function reference for surrogate-prototype-swapping.\n var Ctor = function(){};\n\n // Create a safe reference to the Underscore object for use below.\n var _ = function(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n };\n\n // Export the Underscore object for **Node.js**, with\n // backwards-compatibility for their old module API. If we're in\n // the browser, add `_` as a global object.\n // (`nodeType` is checked to ensure that `module`\n // and `exports` are not HTML elements.)\n if (typeof exports != 'undefined' && !exports.nodeType) {\n if (typeof module != 'undefined' && !module.nodeType && module.exports) {\n exports = module.exports = _;\n }\n exports._ = _;\n } else {\n root._ = _;\n }\n\n // Current version.\n _.VERSION = '1.9.1';\n\n // Internal function that returns an efficient (for current engines) version\n // of the passed-in callback, to be repeatedly applied in other Underscore\n // functions.\n var optimizeCb = function(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n // The 2-argument case is omitted because we’re not using it.\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n };\n\n var builtinIteratee;\n\n // An internal function to generate callbacks that can be applied to each\n // element in a collection, returning the desired result — either `identity`,\n // an arbitrary callback, a property matcher, or a property accessor.\n var cb = function(value, context, argCount) {\n if (_.iteratee !== builtinIteratee) return _.iteratee(value, context);\n if (value == null) return _.identity;\n if (_.isFunction(value)) return optimizeCb(value, context, argCount);\n if (_.isObject(value) && !_.isArray(value)) return _.matcher(value);\n return _.property(value);\n };\n\n // External wrapper for our callback generator. Users may customize\n // `_.iteratee` if they want additional predicate/iteratee shorthand styles.\n // This abstraction hides the internal-only argCount argument.\n _.iteratee = builtinIteratee = function(value, context) {\n return cb(value, context, Infinity);\n };\n\n // Some functions take a variable number of arguments, or a few expected\n // arguments at the beginning and then a variable number of values to operate\n // on. This helper accumulates all remaining arguments past the function’s\n // argument length (or an explicit `startIndex`), into an array that becomes\n // the last argument. Similar to ES6’s \"rest parameter\".\n var restArguments = function(func, startIndex) {\n startIndex = startIndex == null ? func.length - 1 : +startIndex;\n return function() {\n var length = Math.max(arguments.length - startIndex, 0),\n rest = Array(length),\n index = 0;\n for (; index < length; index++) {\n rest[index] = arguments[index + startIndex];\n }\n switch (startIndex) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, arguments[0], rest);\n case 2: return func.call(this, arguments[0], arguments[1], rest);\n }\n var args = Array(startIndex + 1);\n for (index = 0; index < startIndex; index++) {\n args[index] = arguments[index];\n }\n args[startIndex] = rest;\n return func.apply(this, args);\n };\n };\n\n // An internal function for creating a new object that inherits from another.\n var baseCreate = function(prototype) {\n if (!_.isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n };\n\n var shallowProperty = function(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n };\n\n var has = function(obj, path) {\n return obj != null && hasOwnProperty.call(obj, path);\n }\n\n var deepGet = function(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n };\n\n // Helper for collection methods to determine whether a collection\n // should be iterated as an array or as an object.\n // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n var getLength = shallowProperty('length');\n var isArrayLike = function(collection) {\n var length = getLength(collection);\n return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;\n };\n\n // Collection Functions\n // --------------------\n\n // The cornerstone, an `each` implementation, aka `forEach`.\n // Handles raw objects in addition to array-likes. Treats all\n // sparse array-likes as if they were dense.\n _.each = _.forEach = function(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var keys = _.keys(obj);\n for (i = 0, length = keys.length; i < length; i++) {\n iteratee(obj[keys[i]], keys[i], obj);\n }\n }\n return obj;\n };\n\n // Return the results of applying the iteratee to each element.\n _.map = _.collect = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Create a reducing function iterating left or right.\n var createReduce = function(dir) {\n // Wrap code that reassigns argument variables in a separate function than\n // the one that accesses `arguments.length` to avoid a perf hit. (#1991)\n var reducer = function(obj, iteratee, memo, initial) {\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n if (!initial) {\n memo = obj[keys ? keys[index] : index];\n index += dir;\n }\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = keys ? keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n };\n\n return function(obj, iteratee, memo, context) {\n var initial = arguments.length >= 3;\n return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);\n };\n };\n\n // **Reduce** builds up a single result from a list of values, aka `inject`,\n // or `foldl`.\n _.reduce = _.foldl = _.inject = createReduce(1);\n\n // The right-associative version of reduce, also known as `foldr`.\n _.reduceRight = _.foldr = createReduce(-1);\n\n // Return the first value which passes a truth test. Aliased as `detect`.\n _.find = _.detect = function(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? _.findIndex : _.findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n };\n\n // Return all the elements that pass a truth test.\n // Aliased as `select`.\n _.filter = _.select = function(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n _.each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n };\n\n // Return all the elements for which a truth test fails.\n _.reject = function(obj, predicate, context) {\n return _.filter(obj, _.negate(cb(predicate)), context);\n };\n\n // Determine whether all of the elements match a truth test.\n // Aliased as `all`.\n _.every = _.all = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n };\n\n // Determine if at least one element in the object matches a truth test.\n // Aliased as `any`.\n _.some = _.any = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n };\n\n // Determine if the array or object contains a given item (using `===`).\n // Aliased as `includes` and `include`.\n _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return _.indexOf(obj, item, fromIndex) >= 0;\n };\n\n // Invoke a method (with arguments) on every item in a collection.\n _.invoke = restArguments(function(obj, path, args) {\n var contextPath, func;\n if (_.isFunction(path)) {\n func = path;\n } else if (_.isArray(path)) {\n contextPath = path.slice(0, -1);\n path = path[path.length - 1];\n }\n return _.map(obj, function(context) {\n var method = func;\n if (!method) {\n if (contextPath && contextPath.length) {\n context = deepGet(context, contextPath);\n }\n if (context == null) return void 0;\n method = context[path];\n }\n return method == null ? method : method.apply(context, args);\n });\n });\n\n // Convenience version of a common use case of `map`: fetching a property.\n _.pluck = function(obj, key) {\n return _.map(obj, _.property(key));\n };\n\n // Convenience version of a common use case of `filter`: selecting only objects\n // containing specific `key:value` pairs.\n _.where = function(obj, attrs) {\n return _.filter(obj, _.matcher(attrs));\n };\n\n // Convenience version of a common use case of `find`: getting the first object\n // containing specific `key:value` pairs.\n _.findWhere = function(obj, attrs) {\n return _.find(obj, _.matcher(attrs));\n };\n\n // Return the maximum element (or element-based computation).\n _.max = function(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Return the minimum element (or element-based computation).\n _.min = function(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed < lastComputed || computed === Infinity && result === Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Shuffle a collection.\n _.shuffle = function(obj) {\n return _.sample(obj, Infinity);\n };\n\n // Sample **n** random values from a collection using the modern version of the\n // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n // If **n** is not specified, returns a single random element.\n // The internal `guard` argument allows it to work with `map`.\n _.sample = function(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n return obj[_.random(obj.length - 1)];\n }\n var sample = isArrayLike(obj) ? _.clone(obj) : _.values(obj);\n var length = getLength(sample);\n n = Math.max(Math.min(n, length), 0);\n var last = length - 1;\n for (var index = 0; index < n; index++) {\n var rand = _.random(index, last);\n var temp = sample[index];\n sample[index] = sample[rand];\n sample[rand] = temp;\n }\n return sample.slice(0, n);\n };\n\n // Sort the object's values by a criterion produced by an iteratee.\n _.sortBy = function(obj, iteratee, context) {\n var index = 0;\n iteratee = cb(iteratee, context);\n return _.pluck(_.map(obj, function(value, key, list) {\n return {\n value: value,\n index: index++,\n criteria: iteratee(value, key, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n };\n\n // An internal function used for aggregate \"group by\" operations.\n var group = function(behavior, partition) {\n return function(obj, iteratee, context) {\n var result = partition ? [[], []] : {};\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n };\n\n // Groups the object's values by a criterion. Pass either a string attribute\n // to group by, or a function that returns the criterion.\n _.groupBy = group(function(result, value, key) {\n if (has(result, key)) result[key].push(value); else result[key] = [value];\n });\n\n // Indexes the object's values by a criterion, similar to `groupBy`, but for\n // when you know that your index values will be unique.\n _.indexBy = group(function(result, value, key) {\n result[key] = value;\n });\n\n // Counts instances of an object that group by a certain criterion. Pass\n // either a string attribute to count by, or a function that returns the\n // criterion.\n _.countBy = group(function(result, value, key) {\n if (has(result, key)) result[key]++; else result[key] = 1;\n });\n\n var reStrSymbol = /[^\\ud800-\\udfff]|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff]/g;\n // Safely create a real, live array from anything iterable.\n _.toArray = function(obj) {\n if (!obj) return [];\n if (_.isArray(obj)) return slice.call(obj);\n if (_.isString(obj)) {\n // Keep surrogate pair characters together\n return obj.match(reStrSymbol);\n }\n if (isArrayLike(obj)) return _.map(obj, _.identity);\n return _.values(obj);\n };\n\n // Return the number of elements in an object.\n _.size = function(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : _.keys(obj).length;\n };\n\n // Split a collection into two arrays: one whose elements all satisfy the given\n // predicate, and one whose elements all do not satisfy the predicate.\n _.partition = group(function(result, value, pass) {\n result[pass ? 0 : 1].push(value);\n }, true);\n\n // Array Functions\n // ---------------\n\n // Get the first element of an array. Passing **n** will return the first N\n // values in the array. Aliased as `head` and `take`. The **guard** check\n // allows it to work with `_.map`.\n _.first = _.head = _.take = function(array, n, guard) {\n if (array == null || array.length < 1) return n == null ? void 0 : [];\n if (n == null || guard) return array[0];\n return _.initial(array, array.length - n);\n };\n\n // Returns everything but the last entry of the array. Especially useful on\n // the arguments object. Passing **n** will return all the values in\n // the array, excluding the last N.\n _.initial = function(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n };\n\n // Get the last element of an array. Passing **n** will return the last N\n // values in the array.\n _.last = function(array, n, guard) {\n if (array == null || array.length < 1) return n == null ? void 0 : [];\n if (n == null || guard) return array[array.length - 1];\n return _.rest(array, Math.max(0, array.length - n));\n };\n\n // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n // Especially useful on the arguments object. Passing an **n** will return\n // the rest N values in the array.\n _.rest = _.tail = _.drop = function(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n };\n\n // Trim out all falsy values from an array.\n _.compact = function(array) {\n return _.filter(array, Boolean);\n };\n\n // Internal implementation of a recursive `flatten` function.\n var flatten = function(input, shallow, strict, output) {\n output = output || [];\n var idx = output.length;\n for (var i = 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {\n // Flatten current level of array or arguments object.\n if (shallow) {\n var j = 0, len = value.length;\n while (j < len) output[idx++] = value[j++];\n } else {\n flatten(value, shallow, strict, output);\n idx = output.length;\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n };\n\n // Flatten out an array, either recursively (by default), or just one level.\n _.flatten = function(array, shallow) {\n return flatten(array, shallow, false);\n };\n\n // Return a version of the array that does not contain the specified value(s).\n _.without = restArguments(function(array, otherArrays) {\n return _.difference(array, otherArrays);\n });\n\n // Produce a duplicate-free version of the array. If the array has already\n // been sorted, you have the option of using a faster algorithm.\n // The faster algorithm will not work with an iteratee if the iteratee\n // is not a one-to-one function, so providing an iteratee will disable\n // the faster algorithm.\n // Aliased as `unique`.\n _.uniq = _.unique = function(array, isSorted, iteratee, context) {\n if (!_.isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted && !iteratee) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!_.contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!_.contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n };\n\n // Produce an array that contains the union: each distinct element from all of\n // the passed-in arrays.\n _.union = restArguments(function(arrays) {\n return _.uniq(flatten(arrays, true, true));\n });\n\n // Produce an array that contains every item shared between all the\n // passed-in arrays.\n _.intersection = function(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (_.contains(result, item)) continue;\n var j;\n for (j = 1; j < argsLength; j++) {\n if (!_.contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n };\n\n // Take the difference between one array and a number of other arrays.\n // Only the elements present in just the first array will remain.\n _.difference = restArguments(function(array, rest) {\n rest = flatten(rest, true, true);\n return _.filter(array, function(value){\n return !_.contains(rest, value);\n });\n });\n\n // Complement of _.zip. Unzip accepts an array of arrays and groups\n // each array's elements on shared indices.\n _.unzip = function(array) {\n var length = array && _.max(array, getLength).length || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = _.pluck(array, index);\n }\n return result;\n };\n\n // Zip together multiple lists into a single array -- elements that share\n // an index go together.\n _.zip = restArguments(_.unzip);\n\n // Converts lists into objects. Pass either a single array of `[key, value]`\n // pairs, or two parallel arrays of the same length -- one of keys, and one of\n // the corresponding values. Passing by pairs is the reverse of _.pairs.\n _.object = function(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n };\n\n // Generator function to create the findIndex and findLastIndex functions.\n var createPredicateIndexFinder = function(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n };\n\n // Returns the first index on an array-like that passes a predicate test.\n _.findIndex = createPredicateIndexFinder(1);\n _.findLastIndex = createPredicateIndexFinder(-1);\n\n // Use a comparator function to figure out the smallest index at which\n // an object should be inserted so as to maintain order. Uses binary search.\n _.sortedIndex = function(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n };\n\n // Generator function to create the indexOf and lastIndexOf functions.\n var createIndexFinder = function(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), _.isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n };\n\n // Return the position of the first occurrence of an item in an array,\n // or -1 if the item is not included in the array.\n // If the array is large and already in sort order, pass `true`\n // for **isSorted** to use binary search.\n _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);\n _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);\n\n // Generate an integer Array containing an arithmetic progression. A port of\n // the native Python `range()` function. See\n // [the Python documentation](http://docs.python.org/library/functions.html#range).\n _.range = function(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n if (!step) {\n step = stop < start ? -1 : 1;\n }\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n };\n\n // Chunk a single array into multiple arrays, each containing `count` or fewer\n // items.\n _.chunk = function(array, count) {\n if (count == null || count < 1) return [];\n var result = [];\n var i = 0, length = array.length;\n while (i < length) {\n result.push(slice.call(array, i, i += count));\n }\n return result;\n };\n\n // Function (ahem) Functions\n // ------------------\n\n // Determines whether to execute a function as a constructor\n // or a normal function with the provided arguments.\n var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (_.isObject(result)) return result;\n return self;\n };\n\n // Create a function bound to a given object (assigning `this`, and arguments,\n // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n // available.\n _.bind = restArguments(function(func, context, args) {\n if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');\n var bound = restArguments(function(callArgs) {\n return executeBound(func, bound, context, this, args.concat(callArgs));\n });\n return bound;\n });\n\n // Partially apply a function by creating a version that has had some of its\n // arguments pre-filled, without changing its dynamic `this` context. _ acts\n // as a placeholder by default, allowing any combination of arguments to be\n // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.\n _.partial = restArguments(function(func, boundArgs) {\n var placeholder = _.partial.placeholder;\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n });\n\n _.partial.placeholder = _;\n\n // Bind a number of an object's methods to that object. Remaining arguments\n // are the method names to be bound. Useful for ensuring that all callbacks\n // defined on an object belong to it.\n _.bindAll = restArguments(function(obj, keys) {\n keys = flatten(keys, false, false);\n var index = keys.length;\n if (index < 1) throw new Error('bindAll must be passed function names');\n while (index--) {\n var key = keys[index];\n obj[key] = _.bind(obj[key], obj);\n }\n });\n\n // Memoize an expensive function by storing its results.\n _.memoize = function(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n };\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n _.delay = restArguments(function(func, wait, args) {\n return setTimeout(function() {\n return func.apply(null, args);\n }, wait);\n });\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n _.defer = _.partial(_.delay, _, 1);\n\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n _.throttle = function(func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options) options = {};\n\n var later = function() {\n previous = options.leading === false ? 0 : _.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n\n var throttled = function() {\n var now = _.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n\n throttled.cancel = function() {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n\n return throttled;\n };\n\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered. The function will be called after it stops being called for\n // N milliseconds. If `immediate` is passed, trigger the function on the\n // leading edge, instead of the trailing.\n _.debounce = function(func, wait, immediate) {\n var timeout, result;\n\n var later = function(context, args) {\n timeout = null;\n if (args) result = func.apply(context, args);\n };\n\n var debounced = restArguments(function(args) {\n if (timeout) clearTimeout(timeout);\n if (immediate) {\n var callNow = !timeout;\n timeout = setTimeout(later, wait);\n if (callNow) result = func.apply(this, args);\n } else {\n timeout = _.delay(later, wait, this, args);\n }\n\n return result;\n });\n\n debounced.cancel = function() {\n clearTimeout(timeout);\n timeout = null;\n };\n\n return debounced;\n };\n\n // Returns the first function passed as an argument to the second,\n // allowing you to adjust arguments, run code before and after, and\n // conditionally execute the original function.\n _.wrap = function(func, wrapper) {\n return _.partial(wrapper, func);\n };\n\n // Returns a negated version of the passed-in predicate.\n _.negate = function(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n };\n\n // Returns a function that is the composition of a list of functions, each\n // consuming the return value of the function that follows.\n _.compose = function() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n };\n\n // Returns a function that will only be executed on and after the Nth call.\n _.after = function(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n };\n\n // Returns a function that will only be executed up to (but not including) the Nth call.\n _.before = function(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n };\n\n // Returns a function that will be executed at most one time, no matter how\n // often you call it. Useful for lazy initialization.\n _.once = _.partial(_.before, 2);\n\n _.restArguments = restArguments;\n\n // Object Functions\n // ----------------\n\n // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\n var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\n var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n var collectNonEnumProps = function(obj, keys) {\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = _.isFunction(constructor) && constructor.prototype || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {\n keys.push(prop);\n }\n }\n };\n\n // Retrieve the names of an object's own properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`.\n _.keys = function(obj) {\n if (!_.isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve all the property names of an object.\n _.allKeys = function(obj) {\n if (!_.isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve the values of an object's properties.\n _.values = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[keys[i]];\n }\n return values;\n };\n\n // Returns the results of applying the iteratee to each element of the object.\n // In contrast to _.map it returns an object.\n _.mapObject = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = _.keys(obj),\n length = keys.length,\n results = {};\n for (var index = 0; index < length; index++) {\n var currentKey = keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Convert an object into a list of `[key, value]` pairs.\n // The opposite of _.object.\n _.pairs = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [keys[i], obj[keys[i]]];\n }\n return pairs;\n };\n\n // Invert the keys and values of an object. The values must be serializable.\n _.invert = function(obj) {\n var result = {};\n var keys = _.keys(obj);\n for (var i = 0, length = keys.length; i < length; i++) {\n result[obj[keys[i]]] = keys[i];\n }\n return result;\n };\n\n // Return a sorted list of the function names available on the object.\n // Aliased as `methods`.\n _.functions = _.methods = function(obj) {\n var names = [];\n for (var key in obj) {\n if (_.isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n };\n\n // An internal function for creating assigner functions.\n var createAssigner = function(keysFunc, defaults) {\n return function(obj) {\n var length = arguments.length;\n if (defaults) obj = Object(obj);\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!defaults || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n };\n\n // Extend a given object with all the properties in passed-in object(s).\n _.extend = createAssigner(_.allKeys);\n\n // Assigns a given object with all the own properties in the passed-in object(s).\n // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n _.extendOwn = _.assign = createAssigner(_.keys);\n\n // Returns the first key on an object that passes a predicate test.\n _.findKey = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = _.keys(obj), key;\n for (var i = 0, length = keys.length; i < length; i++) {\n key = keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n };\n\n // Internal pick helper function to determine if `obj` has key `key`.\n var keyInObj = function(value, key, obj) {\n return key in obj;\n };\n\n // Return a copy of the object only containing the whitelisted properties.\n _.pick = restArguments(function(obj, keys) {\n var result = {}, iteratee = keys[0];\n if (obj == null) return result;\n if (_.isFunction(iteratee)) {\n if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);\n keys = _.allKeys(obj);\n } else {\n iteratee = keyInObj;\n keys = flatten(keys, false, false);\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n });\n\n // Return a copy of the object without the blacklisted properties.\n _.omit = restArguments(function(obj, keys) {\n var iteratee = keys[0], context;\n if (_.isFunction(iteratee)) {\n iteratee = _.negate(iteratee);\n if (keys.length > 1) context = keys[1];\n } else {\n keys = _.map(flatten(keys, false, false), String);\n iteratee = function(value, key) {\n return !_.contains(keys, key);\n };\n }\n return _.pick(obj, iteratee, context);\n });\n\n // Fill in a given object with default properties.\n _.defaults = createAssigner(_.allKeys, true);\n\n // Creates an object that inherits from the given prototype object.\n // If additional properties are provided then they will be added to the\n // created object.\n _.create = function(prototype, props) {\n var result = baseCreate(prototype);\n if (props) _.extendOwn(result, props);\n return result;\n };\n\n // Create a (shallow-cloned) duplicate of an object.\n _.clone = function(obj) {\n if (!_.isObject(obj)) return obj;\n return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n };\n\n // Invokes interceptor with the obj, and then returns obj.\n // The primary purpose of this method is to \"tap into\" a method chain, in\n // order to perform operations on intermediate results within the chain.\n _.tap = function(obj, interceptor) {\n interceptor(obj);\n return obj;\n };\n\n // Returns whether an object has a given set of `key:value` pairs.\n _.isMatch = function(object, attrs) {\n var keys = _.keys(attrs), length = keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n };\n\n\n // Internal recursive comparison function for `isEqual`.\n var eq, deepEq;\n eq = function(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // `null` or `undefined` only equal to itself (strict comparison).\n if (a == null || b == null) return false;\n // `NaN`s are equivalent, but non-reflexive.\n if (a !== a) return b !== b;\n // Exhaust primitive checks\n var type = typeof a;\n if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\n return deepEq(a, b, aStack, bStack);\n };\n\n // Internal recursive comparison function for `isEqual`.\n deepEq = function(a, b, aStack, bStack) {\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n case '[object Symbol]':\n return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&\n _.isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var keys = _.keys(a), key;\n length = keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (_.keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n };\n\n // Perform a deep comparison to check if two objects are equal.\n _.isEqual = function(a, b) {\n return eq(a, b);\n };\n\n // Is a given array, string, or object empty?\n // An \"empty\" object has no enumerable own-properties.\n _.isEmpty = function(obj) {\n if (obj == null) return true;\n if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;\n return _.keys(obj).length === 0;\n };\n\n // Is a given value a DOM element?\n _.isElement = function(obj) {\n return !!(obj && obj.nodeType === 1);\n };\n\n // Is a given value an array?\n // Delegates to ECMA5's native Array.isArray\n _.isArray = nativeIsArray || function(obj) {\n return toString.call(obj) === '[object Array]';\n };\n\n // Is a given variable an object?\n _.isObject = function(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n };\n\n // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.\n _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error', 'Symbol', 'Map', 'WeakMap', 'Set', 'WeakSet'], function(name) {\n _['is' + name] = function(obj) {\n return toString.call(obj) === '[object ' + name + ']';\n };\n });\n\n // Define a fallback version of the method in browsers (ahem, IE < 9), where\n // there isn't any inspectable \"Arguments\" type.\n if (!_.isArguments(arguments)) {\n _.isArguments = function(obj) {\n return has(obj, 'callee');\n };\n }\n\n // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,\n // IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).\n var nodelist = root.document && root.document.childNodes;\n if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {\n _.isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n }\n\n // Is a given object a finite number?\n _.isFinite = function(obj) {\n return !_.isSymbol(obj) && isFinite(obj) && !isNaN(parseFloat(obj));\n };\n\n // Is the given value `NaN`?\n _.isNaN = function(obj) {\n return _.isNumber(obj) && isNaN(obj);\n };\n\n // Is a given value a boolean?\n _.isBoolean = function(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n };\n\n // Is a given value equal to null?\n _.isNull = function(obj) {\n return obj === null;\n };\n\n // Is a given variable undefined?\n _.isUndefined = function(obj) {\n return obj === void 0;\n };\n\n // Shortcut function for checking if an object has a given property directly\n // on itself (in other words, not on a prototype).\n _.has = function(obj, path) {\n if (!_.isArray(path)) {\n return has(obj, path);\n }\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (obj == null || !hasOwnProperty.call(obj, key)) {\n return false;\n }\n obj = obj[key];\n }\n return !!length;\n };\n\n // Utility Functions\n // -----------------\n\n // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n // previous owner. Returns a reference to the Underscore object.\n _.noConflict = function() {\n root._ = previousUnderscore;\n return this;\n };\n\n // Keep the identity function around for default iteratees.\n _.identity = function(value) {\n return value;\n };\n\n // Predicate-generating functions. Often useful outside of Underscore.\n _.constant = function(value) {\n return function() {\n return value;\n };\n };\n\n _.noop = function(){};\n\n // Creates a function that, when passed an object, will traverse that object’s\n // properties down the given `path`, specified as an array of keys or indexes.\n _.property = function(path) {\n if (!_.isArray(path)) {\n return shallowProperty(path);\n }\n return function(obj) {\n return deepGet(obj, path);\n };\n };\n\n // Generates a function for a given object that returns a given property.\n _.propertyOf = function(obj) {\n if (obj == null) {\n return function(){};\n }\n return function(path) {\n return !_.isArray(path) ? obj[path] : deepGet(obj, path);\n };\n };\n\n // Returns a predicate for checking whether an object has a given set of\n // `key:value` pairs.\n _.matcher = _.matches = function(attrs) {\n attrs = _.extendOwn({}, attrs);\n return function(obj) {\n return _.isMatch(obj, attrs);\n };\n };\n\n // Run a function **n** times.\n _.times = function(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n };\n\n // Return a random integer between min and max (inclusive).\n _.random = function(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n };\n\n // A (possibly faster) way to get the current timestamp as an integer.\n _.now = Date.now || function() {\n return new Date().getTime();\n };\n\n // List of HTML entities for escaping.\n var escapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n var unescapeMap = _.invert(escapeMap);\n\n // Functions for escaping and unescaping strings to/from HTML interpolation.\n var createEscaper = function(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped.\n var source = '(?:' + _.keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n };\n _.escape = createEscaper(escapeMap);\n _.unescape = createEscaper(unescapeMap);\n\n // Traverses the children of `obj` along `path`. If a child is a function, it\n // is invoked with its parent as context. Returns the value of the final\n // child, or `fallback` if any child is undefined.\n _.result = function(obj, path, fallback) {\n if (!_.isArray(path)) path = [path];\n var length = path.length;\n if (!length) {\n return _.isFunction(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = _.isFunction(prop) ? prop.call(obj) : prop;\n }\n return obj;\n };\n\n // Generate a unique integer id (unique within the entire client session).\n // Useful for temporary DOM ids.\n var idCounter = 0;\n _.uniqueId = function(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n };\n\n // By default, Underscore uses ERB-style template delimiters, change the\n // following template settings to use alternative delimiters.\n _.templateSettings = {\n evaluate: /<%([\\s\\S]+?)%>/g,\n interpolate: /<%=([\\s\\S]+?)%>/g,\n escape: /<%-([\\s\\S]+?)%>/g\n };\n\n // When customizing `templateSettings`, if you don't want to define an\n // interpolation, evaluation or escaping regex, we need one that is\n // guaranteed not to match.\n var noMatch = /(.)^/;\n\n // Certain characters need to be escaped so that they can be put into a\n // string literal.\n var escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n var escapeRegExp = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\n var escapeChar = function(match) {\n return '\\\\' + escapes[match];\n };\n\n // JavaScript micro-templating, similar to John Resig's implementation.\n // Underscore templating handles arbitrary delimiters, preserves whitespace,\n // and correctly escapes quotes within interpolated code.\n // NB: `oldSettings` only exists for backwards compatibility.\n _.template = function(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = _.defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escapeRegExp, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offset.\n return match;\n });\n source += \"';\\n\";\n\n // If a variable is not specified, place data values in local scope.\n if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n var render;\n try {\n render = new Function(settings.variable || 'obj', '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n var argument = settings.variable || 'obj';\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n };\n\n // Add a \"chain\" function. Start chaining a wrapped Underscore object.\n _.chain = function(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n };\n\n // OOP\n // ---------------\n // If Underscore is called as a function, it returns a wrapped object that\n // can be used OO-style. This wrapper holds altered versions of all the\n // underscore functions. Wrapped objects may be chained.\n\n // Helper function to continue chaining intermediate results.\n var chainResult = function(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n };\n\n // Add your own custom functions to the Underscore object.\n _.mixin = function(obj) {\n _.each(_.functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n };\n\n // Add all of the Underscore functions to the wrapper object.\n _.mixin(_);\n\n // Add all mutator Array functions to the wrapper.\n _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];\n return chainResult(this, obj);\n };\n });\n\n // Add all accessor Array functions to the wrapper.\n _.each(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n return chainResult(this, method.apply(this._wrapped, arguments));\n };\n });\n\n // Extracts the result from a wrapped and chained object.\n _.prototype.value = function() {\n return this._wrapped;\n };\n\n // Provide unwrapping proxy for some methods used in engine operations\n // such as arithmetic and JSON stringification.\n _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n _.prototype.toString = function() {\n return String(this._wrapped);\n };\n\n // AMD registration happens at the end for compatibility with AMD loaders\n // that may not enforce next-turn semantics on modules. Even though general\n // practice for AMD registration is to be anonymous, underscore registers\n // as a named module because, like jQuery, it is a base library that is\n // popular enough to be bundled in a third party lib, but not be part of\n // an AMD load request. Those cases could generate an error when an\n // anonymous define() is called outside of a loader request.\n if (typeof define == 'function' && define.amd) {\n define('underscore', [], function() {\n return _;\n });\n }\n}());\n","// Backbone.js 1.3.3\n\n// (c) 2010-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Backbone may be freely distributed under the MIT license.\n// For all details and documentation:\n// http://backbonejs.org\n\n(function(factory) {\n\n // Establish the root object, `window` (`self`) in the browser, or `global` on the server.\n // We use `self` instead of `window` for `WebWorker` support.\n var root = (typeof self == 'object' && self.self === self && self) ||\n (typeof global == 'object' && global.global === global && global);\n\n // Set up Backbone appropriately for the environment. Start with AMD.\n if (typeof define === 'function' && define.amd) {\n define(['underscore', 'jquery', 'exports'], function(_, $, exports) {\n // Export global even in AMD case in case this script is loaded with\n // others that may still expect a global Backbone.\n root.Backbone = factory(root, exports, _, $);\n });\n\n // Next for Node.js or CommonJS. jQuery may not be needed as a module.\n } else if (typeof exports !== 'undefined') {\n var _ = require('underscore'), $;\n try { $ = require('jquery'); } catch (e) {}\n factory(root, exports, _, $);\n\n // Finally, as a browser global.\n } else {\n root.Backbone = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$));\n }\n\n})(function(root, Backbone, _, $) {\n\n // Initial Setup\n // -------------\n\n // Save the previous value of the `Backbone` variable, so that it can be\n // restored later on, if `noConflict` is used.\n var previousBackbone = root.Backbone;\n\n // Create a local reference to a common array method we'll want to use later.\n var slice = Array.prototype.slice;\n\n // Current version of the library. Keep in sync with `package.json`.\n Backbone.VERSION = '1.3.3';\n\n // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns\n // the `$` variable.\n Backbone.$ = $;\n\n // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable\n // to its previous owner. Returns a reference to this Backbone object.\n Backbone.noConflict = function() {\n root.Backbone = previousBackbone;\n return this;\n };\n\n // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option\n // will fake `\"PATCH\"`, `\"PUT\"` and `\"DELETE\"` requests via the `_method` parameter and\n // set a `X-Http-Method-Override` header.\n Backbone.emulateHTTP = false;\n\n // Turn on `emulateJSON` to support legacy servers that can't deal with direct\n // `application/json` requests ... this will encode the body as\n // `application/x-www-form-urlencoded` instead and will send the model in a\n // form param named `model`.\n Backbone.emulateJSON = false;\n\n // Proxy Backbone class methods to Underscore functions, wrapping the model's\n // `attributes` object or collection's `models` array behind the scenes.\n //\n // collection.filter(function(model) { return model.get('age') > 10 });\n // collection.each(this.addView);\n //\n // `Function#apply` can be slow so we use the method's arg count, if we know it.\n var addMethod = function(length, method, attribute) {\n switch (length) {\n case 1: return function() {\n return _[method](this[attribute]);\n };\n case 2: return function(value) {\n return _[method](this[attribute], value);\n };\n case 3: return function(iteratee, context) {\n return _[method](this[attribute], cb(iteratee, this), context);\n };\n case 4: return function(iteratee, defaultVal, context) {\n return _[method](this[attribute], cb(iteratee, this), defaultVal, context);\n };\n default: return function() {\n var args = slice.call(arguments);\n args.unshift(this[attribute]);\n return _[method].apply(_, args);\n };\n }\n };\n var addUnderscoreMethods = function(Class, methods, attribute) {\n _.each(methods, function(length, method) {\n if (_[method]) Class.prototype[method] = addMethod(length, method, attribute);\n });\n };\n\n // Support `collection.sortBy('attr')` and `collection.findWhere({id: 1})`.\n var cb = function(iteratee, instance) {\n if (_.isFunction(iteratee)) return iteratee;\n if (_.isObject(iteratee) && !instance._isModel(iteratee)) return modelMatcher(iteratee);\n if (_.isString(iteratee)) return function(model) { return model.get(iteratee); };\n return iteratee;\n };\n var modelMatcher = function(attrs) {\n var matcher = _.matches(attrs);\n return function(model) {\n return matcher(model.attributes);\n };\n };\n\n // Backbone.Events\n // ---------------\n\n // A module that can be mixed in to *any object* in order to provide it with\n // a custom event channel. You may bind a callback to an event with `on` or\n // remove with `off`; `trigger`-ing an event fires all callbacks in\n // succession.\n //\n // var object = {};\n // _.extend(object, Backbone.Events);\n // object.on('expand', function(){ alert('expanded'); });\n // object.trigger('expand');\n //\n var Events = Backbone.Events = {};\n\n // Regular expression used to split event strings.\n var eventSplitter = /\\s+/;\n\n // Iterates over the standard `event, callback` (as well as the fancy multiple\n // space-separated events `\"change blur\", callback` and jQuery-style event\n // maps `{event: callback}`).\n var eventsApi = function(iteratee, events, name, callback, opts) {\n var i = 0, names;\n if (name && typeof name === 'object') {\n // Handle event maps.\n if (callback !== void 0 && 'context' in opts && opts.context === void 0) opts.context = callback;\n for (names = _.keys(name); i < names.length ; i++) {\n events = eventsApi(iteratee, events, names[i], name[names[i]], opts);\n }\n } else if (name && eventSplitter.test(name)) {\n // Handle space-separated event names by delegating them individually.\n for (names = name.split(eventSplitter); i < names.length; i++) {\n events = iteratee(events, names[i], callback, opts);\n }\n } else {\n // Finally, standard events.\n events = iteratee(events, name, callback, opts);\n }\n return events;\n };\n\n // Bind an event to a `callback` function. Passing `\"all\"` will bind\n // the callback to all events fired.\n Events.on = function(name, callback, context) {\n return internalOn(this, name, callback, context);\n };\n\n // Guard the `listening` argument from the public API.\n var internalOn = function(obj, name, callback, context, listening) {\n obj._events = eventsApi(onApi, obj._events || {}, name, callback, {\n context: context,\n ctx: obj,\n listening: listening\n });\n\n if (listening) {\n var listeners = obj._listeners || (obj._listeners = {});\n listeners[listening.id] = listening;\n }\n\n return obj;\n };\n\n // Inversion-of-control versions of `on`. Tell *this* object to listen to\n // an event in another object... keeping track of what it's listening to\n // for easier unbinding later.\n Events.listenTo = function(obj, name, callback) {\n if (!obj) return this;\n var id = obj._listenId || (obj._listenId = _.uniqueId('l'));\n var listeningTo = this._listeningTo || (this._listeningTo = {});\n var listening = listeningTo[id];\n\n // This object is not listening to any other events on `obj` yet.\n // Setup the necessary references to track the listening callbacks.\n if (!listening) {\n var thisId = this._listenId || (this._listenId = _.uniqueId('l'));\n listening = listeningTo[id] = {obj: obj, objId: id, id: thisId, listeningTo: listeningTo, count: 0};\n }\n\n // Bind callbacks on obj, and keep track of them on listening.\n internalOn(obj, name, callback, this, listening);\n return this;\n };\n\n // The reducing API that adds a callback to the `events` object.\n var onApi = function(events, name, callback, options) {\n if (callback) {\n var handlers = events[name] || (events[name] = []);\n var context = options.context, ctx = options.ctx, listening = options.listening;\n if (listening) listening.count++;\n\n handlers.push({callback: callback, context: context, ctx: context || ctx, listening: listening});\n }\n return events;\n };\n\n // Remove one or many callbacks. If `context` is null, removes all\n // callbacks with that function. If `callback` is null, removes all\n // callbacks for the event. If `name` is null, removes all bound\n // callbacks for all events.\n Events.off = function(name, callback, context) {\n if (!this._events) return this;\n this._events = eventsApi(offApi, this._events, name, callback, {\n context: context,\n listeners: this._listeners\n });\n return this;\n };\n\n // Tell this object to stop listening to either specific events ... or\n // to every object it's currently listening to.\n Events.stopListening = function(obj, name, callback) {\n var listeningTo = this._listeningTo;\n if (!listeningTo) return this;\n\n var ids = obj ? [obj._listenId] : _.keys(listeningTo);\n\n for (var i = 0; i < ids.length; i++) {\n var listening = listeningTo[ids[i]];\n\n // If listening doesn't exist, this object is not currently\n // listening to obj. Break out early.\n if (!listening) break;\n\n listening.obj.off(name, callback, this);\n }\n\n return this;\n };\n\n // The reducing API that removes a callback from the `events` object.\n var offApi = function(events, name, callback, options) {\n if (!events) return;\n\n var i = 0, listening;\n var context = options.context, listeners = options.listeners;\n\n // Delete all events listeners and \"drop\" events.\n if (!name && !callback && !context) {\n var ids = _.keys(listeners);\n for (; i < ids.length; i++) {\n listening = listeners[ids[i]];\n delete listeners[listening.id];\n delete listening.listeningTo[listening.objId];\n }\n return;\n }\n\n var names = name ? [name] : _.keys(events);\n for (; i < names.length; i++) {\n name = names[i];\n var handlers = events[name];\n\n // Bail out if there are no events stored.\n if (!handlers) break;\n\n // Replace events if there are any remaining. Otherwise, clean up.\n var remaining = [];\n for (var j = 0; j < handlers.length; j++) {\n var handler = handlers[j];\n if (\n callback && callback !== handler.callback &&\n callback !== handler.callback._callback ||\n context && context !== handler.context\n ) {\n remaining.push(handler);\n } else {\n listening = handler.listening;\n if (listening && --listening.count === 0) {\n delete listeners[listening.id];\n delete listening.listeningTo[listening.objId];\n }\n }\n }\n\n // Update tail event if the list has any events. Otherwise, clean up.\n if (remaining.length) {\n events[name] = remaining;\n } else {\n delete events[name];\n }\n }\n return events;\n };\n\n // Bind an event to only be triggered a single time. After the first time\n // the callback is invoked, its listener will be removed. If multiple events\n // are passed in using the space-separated syntax, the handler will fire\n // once for each event, not once for a combination of all events.\n Events.once = function(name, callback, context) {\n // Map the event into a `{event: once}` object.\n var events = eventsApi(onceMap, {}, name, callback, _.bind(this.off, this));\n if (typeof name === 'string' && context == null) callback = void 0;\n return this.on(events, callback, context);\n };\n\n // Inversion-of-control versions of `once`.\n Events.listenToOnce = function(obj, name, callback) {\n // Map the event into a `{event: once}` object.\n var events = eventsApi(onceMap, {}, name, callback, _.bind(this.stopListening, this, obj));\n return this.listenTo(obj, events);\n };\n\n // Reduces the event callbacks into a map of `{event: onceWrapper}`.\n // `offer` unbinds the `onceWrapper` after it has been called.\n var onceMap = function(map, name, callback, offer) {\n if (callback) {\n var once = map[name] = _.once(function() {\n offer(name, once);\n callback.apply(this, arguments);\n });\n once._callback = callback;\n }\n return map;\n };\n\n // Trigger one or many events, firing all bound callbacks. Callbacks are\n // passed the same arguments as `trigger` is, apart from the event name\n // (unless you're listening on `\"all\"`, which will cause your callback to\n // receive the true name of the event as the first argument).\n Events.trigger = function(name) {\n if (!this._events) return this;\n\n var length = Math.max(0, arguments.length - 1);\n var args = Array(length);\n for (var i = 0; i < length; i++) args[i] = arguments[i + 1];\n\n eventsApi(triggerApi, this._events, name, void 0, args);\n return this;\n };\n\n // Handles triggering the appropriate event callbacks.\n var triggerApi = function(objEvents, name, callback, args) {\n if (objEvents) {\n var events = objEvents[name];\n var allEvents = objEvents.all;\n if (events && allEvents) allEvents = allEvents.slice();\n if (events) triggerEvents(events, args);\n if (allEvents) triggerEvents(allEvents, [name].concat(args));\n }\n return objEvents;\n };\n\n // A difficult-to-believe, but optimized internal dispatch function for\n // triggering events. Tries to keep the usual cases speedy (most internal\n // Backbone events have 3 arguments).\n var triggerEvents = function(events, args) {\n var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];\n switch (args.length) {\n case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;\n case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;\n case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;\n case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;\n default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); return;\n }\n };\n\n // Aliases for backwards compatibility.\n Events.bind = Events.on;\n Events.unbind = Events.off;\n\n // Allow the `Backbone` object to serve as a global event bus, for folks who\n // want global \"pubsub\" in a convenient place.\n _.extend(Backbone, Events);\n\n // Backbone.Model\n // --------------\n\n // Backbone **Models** are the basic data object in the framework --\n // frequently representing a row in a table in a database on your server.\n // A discrete chunk of data and a bunch of useful, related methods for\n // performing computations and transformations on that data.\n\n // Create a new model with the specified attributes. A client id (`cid`)\n // is automatically generated and assigned for you.\n var Model = Backbone.Model = function(attributes, options) {\n var attrs = attributes || {};\n options || (options = {});\n this.cid = _.uniqueId(this.cidPrefix);\n this.attributes = {};\n if (options.collection) this.collection = options.collection;\n if (options.parse) attrs = this.parse(attrs, options) || {};\n var defaults = _.result(this, 'defaults');\n attrs = _.defaults(_.extend({}, defaults, attrs), defaults);\n this.set(attrs, options);\n this.changed = {};\n this.initialize.apply(this, arguments);\n };\n\n // Attach all inheritable methods to the Model prototype.\n _.extend(Model.prototype, Events, {\n\n // A hash of attributes whose current and previous value differ.\n changed: null,\n\n // The value returned during the last failed validation.\n validationError: null,\n\n // The default name for the JSON `id` attribute is `\"id\"`. MongoDB and\n // CouchDB users may want to set this to `\"_id\"`.\n idAttribute: 'id',\n\n // The prefix is used to create the client id which is used to identify models locally.\n // You may want to override this if you're experiencing name clashes with model ids.\n cidPrefix: 'c',\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // Return a copy of the model's `attributes` object.\n toJSON: function(options) {\n return _.clone(this.attributes);\n },\n\n // Proxy `Backbone.sync` by default -- but override this if you need\n // custom syncing semantics for *this* particular model.\n sync: function() {\n return Backbone.sync.apply(this, arguments);\n },\n\n // Get the value of an attribute.\n get: function(attr) {\n return this.attributes[attr];\n },\n\n // Get the HTML-escaped value of an attribute.\n escape: function(attr) {\n return _.escape(this.get(attr));\n },\n\n // Returns `true` if the attribute contains a value that is not null\n // or undefined.\n has: function(attr) {\n return this.get(attr) != null;\n },\n\n // Special-cased proxy to underscore's `_.matches` method.\n matches: function(attrs) {\n return !!_.iteratee(attrs, this)(this.attributes);\n },\n\n // Set a hash of model attributes on the object, firing `\"change\"`. This is\n // the core primitive operation of a model, updating the data and notifying\n // anyone who needs to know about the change in state. The heart of the beast.\n set: function(key, val, options) {\n if (key == null) return this;\n\n // Handle both `\"key\", value` and `{key: value}` -style arguments.\n var attrs;\n if (typeof key === 'object') {\n attrs = key;\n options = val;\n } else {\n (attrs = {})[key] = val;\n }\n\n options || (options = {});\n\n // Run validation.\n if (!this._validate(attrs, options)) return false;\n\n // Extract attributes and options.\n var unset = options.unset;\n var silent = options.silent;\n var changes = [];\n var changing = this._changing;\n this._changing = true;\n\n if (!changing) {\n this._previousAttributes = _.clone(this.attributes);\n this.changed = {};\n }\n\n var current = this.attributes;\n var changed = this.changed;\n var prev = this._previousAttributes;\n\n // For each `set` attribute, update or delete the current value.\n for (var attr in attrs) {\n val = attrs[attr];\n if (!_.isEqual(current[attr], val)) changes.push(attr);\n if (!_.isEqual(prev[attr], val)) {\n changed[attr] = val;\n } else {\n delete changed[attr];\n }\n unset ? delete current[attr] : current[attr] = val;\n }\n\n // Update the `id`.\n if (this.idAttribute in attrs) this.id = this.get(this.idAttribute);\n\n // Trigger all relevant attribute changes.\n if (!silent) {\n if (changes.length) this._pending = options;\n for (var i = 0; i < changes.length; i++) {\n this.trigger('change:' + changes[i], this, current[changes[i]], options);\n }\n }\n\n // You might be wondering why there's a `while` loop here. Changes can\n // be recursively nested within `\"change\"` events.\n if (changing) return this;\n if (!silent) {\n while (this._pending) {\n options = this._pending;\n this._pending = false;\n this.trigger('change', this, options);\n }\n }\n this._pending = false;\n this._changing = false;\n return this;\n },\n\n // Remove an attribute from the model, firing `\"change\"`. `unset` is a noop\n // if the attribute doesn't exist.\n unset: function(attr, options) {\n return this.set(attr, void 0, _.extend({}, options, {unset: true}));\n },\n\n // Clear all attributes on the model, firing `\"change\"`.\n clear: function(options) {\n var attrs = {};\n for (var key in this.attributes) attrs[key] = void 0;\n return this.set(attrs, _.extend({}, options, {unset: true}));\n },\n\n // Determine if the model has changed since the last `\"change\"` event.\n // If you specify an attribute name, determine if that attribute has changed.\n hasChanged: function(attr) {\n if (attr == null) return !_.isEmpty(this.changed);\n return _.has(this.changed, attr);\n },\n\n // Return an object containing all the attributes that have changed, or\n // false if there are no changed attributes. Useful for determining what\n // parts of a view need to be updated and/or what attributes need to be\n // persisted to the server. Unset attributes will be set to undefined.\n // You can also pass an attributes object to diff against the model,\n // determining if there *would be* a change.\n changedAttributes: function(diff) {\n if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;\n var old = this._changing ? this._previousAttributes : this.attributes;\n var changed = {};\n for (var attr in diff) {\n var val = diff[attr];\n if (_.isEqual(old[attr], val)) continue;\n changed[attr] = val;\n }\n return _.size(changed) ? changed : false;\n },\n\n // Get the previous value of an attribute, recorded at the time the last\n // `\"change\"` event was fired.\n previous: function(attr) {\n if (attr == null || !this._previousAttributes) return null;\n return this._previousAttributes[attr];\n },\n\n // Get all of the attributes of the model at the time of the previous\n // `\"change\"` event.\n previousAttributes: function() {\n return _.clone(this._previousAttributes);\n },\n\n // Fetch the model from the server, merging the response with the model's\n // local attributes. Any changed attributes will trigger a \"change\" event.\n fetch: function(options) {\n options = _.extend({parse: true}, options);\n var model = this;\n var success = options.success;\n options.success = function(resp) {\n var serverAttrs = options.parse ? model.parse(resp, options) : resp;\n if (!model.set(serverAttrs, options)) return false;\n if (success) success.call(options.context, model, resp, options);\n model.trigger('sync', model, resp, options);\n };\n wrapError(this, options);\n return this.sync('read', this, options);\n },\n\n // Set a hash of model attributes, and sync the model to the server.\n // If the server returns an attributes hash that differs, the model's\n // state will be `set` again.\n save: function(key, val, options) {\n // Handle both `\"key\", value` and `{key: value}` -style arguments.\n var attrs;\n if (key == null || typeof key === 'object') {\n attrs = key;\n options = val;\n } else {\n (attrs = {})[key] = val;\n }\n\n options = _.extend({validate: true, parse: true}, options);\n var wait = options.wait;\n\n // If we're not waiting and attributes exist, save acts as\n // `set(attr).save(null, opts)` with validation. Otherwise, check if\n // the model will be valid when the attributes, if any, are set.\n if (attrs && !wait) {\n if (!this.set(attrs, options)) return false;\n } else if (!this._validate(attrs, options)) {\n return false;\n }\n\n // After a successful server-side save, the client is (optionally)\n // updated with the server-side state.\n var model = this;\n var success = options.success;\n var attributes = this.attributes;\n options.success = function(resp) {\n // Ensure attributes are restored during synchronous saves.\n model.attributes = attributes;\n var serverAttrs = options.parse ? model.parse(resp, options) : resp;\n if (wait) serverAttrs = _.extend({}, attrs, serverAttrs);\n if (serverAttrs && !model.set(serverAttrs, options)) return false;\n if (success) success.call(options.context, model, resp, options);\n model.trigger('sync', model, resp, options);\n };\n wrapError(this, options);\n\n // Set temporary attributes if `{wait: true}` to properly find new ids.\n if (attrs && wait) this.attributes = _.extend({}, attributes, attrs);\n\n var method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');\n if (method === 'patch' && !options.attrs) options.attrs = attrs;\n var xhr = this.sync(method, this, options);\n\n // Restore attributes.\n this.attributes = attributes;\n\n return xhr;\n },\n\n // Destroy this model on the server if it was already persisted.\n // Optimistically removes the model from its collection, if it has one.\n // If `wait: true` is passed, waits for the server to respond before removal.\n destroy: function(options) {\n options = options ? _.clone(options) : {};\n var model = this;\n var success = options.success;\n var wait = options.wait;\n\n var destroy = function() {\n model.stopListening();\n model.trigger('destroy', model, model.collection, options);\n };\n\n options.success = function(resp) {\n if (wait) destroy();\n if (success) success.call(options.context, model, resp, options);\n if (!model.isNew()) model.trigger('sync', model, resp, options);\n };\n\n var xhr = false;\n if (this.isNew()) {\n _.defer(options.success);\n } else {\n wrapError(this, options);\n xhr = this.sync('delete', this, options);\n }\n if (!wait) destroy();\n return xhr;\n },\n\n // Default URL for the model's representation on the server -- if you're\n // using Backbone's restful methods, override this to change the endpoint\n // that will be called.\n url: function() {\n var base =\n _.result(this, 'urlRoot') ||\n _.result(this.collection, 'url') ||\n urlError();\n if (this.isNew()) return base;\n var id = this.get(this.idAttribute);\n return base.replace(/[^\\/]$/, '$&/') + encodeURIComponent(id);\n },\n\n // **parse** converts a response into the hash of attributes to be `set` on\n // the model. The default implementation is just to pass the response along.\n parse: function(resp, options) {\n return resp;\n },\n\n // Create a new model with identical attributes to this one.\n clone: function() {\n return new this.constructor(this.attributes);\n },\n\n // A model is new if it has never been saved to the server, and lacks an id.\n isNew: function() {\n return !this.has(this.idAttribute);\n },\n\n // Check if the model is currently in a valid state.\n isValid: function(options) {\n return this._validate({}, _.extend({}, options, {validate: true}));\n },\n\n // Run validation against the next complete set of model attributes,\n // returning `true` if all is well. Otherwise, fire an `\"invalid\"` event.\n _validate: function(attrs, options) {\n if (!options.validate || !this.validate) return true;\n attrs = _.extend({}, this.attributes, attrs);\n var error = this.validationError = this.validate(attrs, options) || null;\n if (!error) return true;\n this.trigger('invalid', this, error, _.extend(options, {validationError: error}));\n return false;\n }\n\n });\n\n // Underscore methods that we want to implement on the Model, mapped to the\n // number of arguments they take.\n var modelMethods = {keys: 1, values: 1, pairs: 1, invert: 1, pick: 0,\n omit: 0, chain: 1, isEmpty: 1};\n\n // Mix in each Underscore method as a proxy to `Model#attributes`.\n addUnderscoreMethods(Model, modelMethods, 'attributes');\n\n // Backbone.Collection\n // -------------------\n\n // If models tend to represent a single row of data, a Backbone Collection is\n // more analogous to a table full of data ... or a small slice or page of that\n // table, or a collection of rows that belong together for a particular reason\n // -- all of the messages in this particular folder, all of the documents\n // belonging to this particular author, and so on. Collections maintain\n // indexes of their models, both in order, and for lookup by `id`.\n\n // Create a new **Collection**, perhaps to contain a specific type of `model`.\n // If a `comparator` is specified, the Collection will maintain\n // its models in sort order, as they're added and removed.\n var Collection = Backbone.Collection = function(models, options) {\n options || (options = {});\n if (options.model) this.model = options.model;\n if (options.comparator !== void 0) this.comparator = options.comparator;\n this._reset();\n this.initialize.apply(this, arguments);\n if (models) this.reset(models, _.extend({silent: true}, options));\n };\n\n // Default options for `Collection#set`.\n var setOptions = {add: true, remove: true, merge: true};\n var addOptions = {add: true, remove: false};\n\n // Splices `insert` into `array` at index `at`.\n var splice = function(array, insert, at) {\n at = Math.min(Math.max(at, 0), array.length);\n var tail = Array(array.length - at);\n var length = insert.length;\n var i;\n for (i = 0; i < tail.length; i++) tail[i] = array[i + at];\n for (i = 0; i < length; i++) array[i + at] = insert[i];\n for (i = 0; i < tail.length; i++) array[i + length + at] = tail[i];\n };\n\n // Define the Collection's inheritable methods.\n _.extend(Collection.prototype, Events, {\n\n // The default model for a collection is just a **Backbone.Model**.\n // This should be overridden in most cases.\n model: Model,\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // The JSON representation of a Collection is an array of the\n // models' attributes.\n toJSON: function(options) {\n return this.map(function(model) { return model.toJSON(options); });\n },\n\n // Proxy `Backbone.sync` by default.\n sync: function() {\n return Backbone.sync.apply(this, arguments);\n },\n\n // Add a model, or list of models to the set. `models` may be Backbone\n // Models or raw JavaScript objects to be converted to Models, or any\n // combination of the two.\n add: function(models, options) {\n return this.set(models, _.extend({merge: false}, options, addOptions));\n },\n\n // Remove a model, or a list of models from the set.\n remove: function(models, options) {\n options = _.extend({}, options);\n var singular = !_.isArray(models);\n models = singular ? [models] : models.slice();\n var removed = this._removeModels(models, options);\n if (!options.silent && removed.length) {\n options.changes = {added: [], merged: [], removed: removed};\n this.trigger('update', this, options);\n }\n return singular ? removed[0] : removed;\n },\n\n // Update a collection by `set`-ing a new list of models, adding new ones,\n // removing models that are no longer present, and merging models that\n // already exist in the collection, as necessary. Similar to **Model#set**,\n // the core operation for updating the data contained by the collection.\n set: function(models, options) {\n if (models == null) return;\n\n options = _.extend({}, setOptions, options);\n if (options.parse && !this._isModel(models)) {\n models = this.parse(models, options) || [];\n }\n\n var singular = !_.isArray(models);\n models = singular ? [models] : models.slice();\n\n var at = options.at;\n if (at != null) at = +at;\n if (at > this.length) at = this.length;\n if (at < 0) at += this.length + 1;\n\n var set = [];\n var toAdd = [];\n var toMerge = [];\n var toRemove = [];\n var modelMap = {};\n\n var add = options.add;\n var merge = options.merge;\n var remove = options.remove;\n\n var sort = false;\n var sortable = this.comparator && at == null && options.sort !== false;\n var sortAttr = _.isString(this.comparator) ? this.comparator : null;\n\n // Turn bare objects into model references, and prevent invalid models\n // from being added.\n var model, i;\n for (i = 0; i < models.length; i++) {\n model = models[i];\n\n // If a duplicate is found, prevent it from being added and\n // optionally merge it into the existing model.\n var existing = this.get(model);\n if (existing) {\n if (merge && model !== existing) {\n var attrs = this._isModel(model) ? model.attributes : model;\n if (options.parse) attrs = existing.parse(attrs, options);\n existing.set(attrs, options);\n toMerge.push(existing);\n if (sortable && !sort) sort = existing.hasChanged(sortAttr);\n }\n if (!modelMap[existing.cid]) {\n modelMap[existing.cid] = true;\n set.push(existing);\n }\n models[i] = existing;\n\n // If this is a new, valid model, push it to the `toAdd` list.\n } else if (add) {\n model = models[i] = this._prepareModel(model, options);\n if (model) {\n toAdd.push(model);\n this._addReference(model, options);\n modelMap[model.cid] = true;\n set.push(model);\n }\n }\n }\n\n // Remove stale models.\n if (remove) {\n for (i = 0; i < this.length; i++) {\n model = this.models[i];\n if (!modelMap[model.cid]) toRemove.push(model);\n }\n if (toRemove.length) this._removeModels(toRemove, options);\n }\n\n // See if sorting is needed, update `length` and splice in new models.\n var orderChanged = false;\n var replace = !sortable && add && remove;\n if (set.length && replace) {\n orderChanged = this.length !== set.length || _.some(this.models, function(m, index) {\n return m !== set[index];\n });\n this.models.length = 0;\n splice(this.models, set, 0);\n this.length = this.models.length;\n } else if (toAdd.length) {\n if (sortable) sort = true;\n splice(this.models, toAdd, at == null ? this.length : at);\n this.length = this.models.length;\n }\n\n // Silently sort the collection if appropriate.\n if (sort) this.sort({silent: true});\n\n // Unless silenced, it's time to fire all appropriate add/sort/update events.\n if (!options.silent) {\n for (i = 0; i < toAdd.length; i++) {\n if (at != null) options.index = at + i;\n model = toAdd[i];\n model.trigger('add', model, this, options);\n }\n if (sort || orderChanged) this.trigger('sort', this, options);\n if (toAdd.length || toRemove.length || toMerge.length) {\n options.changes = {\n added: toAdd,\n removed: toRemove,\n merged: toMerge\n };\n this.trigger('update', this, options);\n }\n }\n\n // Return the added (or merged) model (or models).\n return singular ? models[0] : models;\n },\n\n // When you have more items than you want to add or remove individually,\n // you can reset the entire set with a new list of models, without firing\n // any granular `add` or `remove` events. Fires `reset` when finished.\n // Useful for bulk operations and optimizations.\n reset: function(models, options) {\n options = options ? _.clone(options) : {};\n for (var i = 0; i < this.models.length; i++) {\n this._removeReference(this.models[i], options);\n }\n options.previousModels = this.models;\n this._reset();\n models = this.add(models, _.extend({silent: true}, options));\n if (!options.silent) this.trigger('reset', this, options);\n return models;\n },\n\n // Add a model to the end of the collection.\n push: function(model, options) {\n return this.add(model, _.extend({at: this.length}, options));\n },\n\n // Remove a model from the end of the collection.\n pop: function(options) {\n var model = this.at(this.length - 1);\n return this.remove(model, options);\n },\n\n // Add a model to the beginning of the collection.\n unshift: function(model, options) {\n return this.add(model, _.extend({at: 0}, options));\n },\n\n // Remove a model from the beginning of the collection.\n shift: function(options) {\n var model = this.at(0);\n return this.remove(model, options);\n },\n\n // Slice out a sub-array of models from the collection.\n slice: function() {\n return slice.apply(this.models, arguments);\n },\n\n // Get a model from the set by id, cid, model object with id or cid\n // properties, or an attributes object that is transformed through modelId.\n get: function(obj) {\n if (obj == null) return void 0;\n return this._byId[obj] ||\n this._byId[this.modelId(obj.attributes || obj)] ||\n obj.cid && this._byId[obj.cid];\n },\n\n // Returns `true` if the model is in the collection.\n has: function(obj) {\n return this.get(obj) != null;\n },\n\n // Get the model at the given index.\n at: function(index) {\n if (index < 0) index += this.length;\n return this.models[index];\n },\n\n // Return models with matching attributes. Useful for simple cases of\n // `filter`.\n where: function(attrs, first) {\n return this[first ? 'find' : 'filter'](attrs);\n },\n\n // Return the first model with matching attributes. Useful for simple cases\n // of `find`.\n findWhere: function(attrs) {\n return this.where(attrs, true);\n },\n\n // Force the collection to re-sort itself. You don't need to call this under\n // normal circumstances, as the set will maintain sort order as each item\n // is added.\n sort: function(options) {\n var comparator = this.comparator;\n if (!comparator) throw new Error('Cannot sort a set without a comparator');\n options || (options = {});\n\n var length = comparator.length;\n if (_.isFunction(comparator)) comparator = _.bind(comparator, this);\n\n // Run sort based on type of `comparator`.\n if (length === 1 || _.isString(comparator)) {\n this.models = this.sortBy(comparator);\n } else {\n this.models.sort(comparator);\n }\n if (!options.silent) this.trigger('sort', this, options);\n return this;\n },\n\n // Pluck an attribute from each model in the collection.\n pluck: function(attr) {\n return this.map(attr + '');\n },\n\n // Fetch the default set of models for this collection, resetting the\n // collection when they arrive. If `reset: true` is passed, the response\n // data will be passed through the `reset` method instead of `set`.\n fetch: function(options) {\n options = _.extend({parse: true}, options);\n var success = options.success;\n var collection = this;\n options.success = function(resp) {\n var method = options.reset ? 'reset' : 'set';\n collection[method](resp, options);\n if (success) success.call(options.context, collection, resp, options);\n collection.trigger('sync', collection, resp, options);\n };\n wrapError(this, options);\n return this.sync('read', this, options);\n },\n\n // Create a new instance of a model in this collection. Add the model to the\n // collection immediately, unless `wait: true` is passed, in which case we\n // wait for the server to agree.\n create: function(model, options) {\n options = options ? _.clone(options) : {};\n var wait = options.wait;\n model = this._prepareModel(model, options);\n if (!model) return false;\n if (!wait) this.add(model, options);\n var collection = this;\n var success = options.success;\n options.success = function(m, resp, callbackOpts) {\n if (wait) collection.add(m, callbackOpts);\n if (success) success.call(callbackOpts.context, m, resp, callbackOpts);\n };\n model.save(null, options);\n return model;\n },\n\n // **parse** converts a response into a list of models to be added to the\n // collection. The default implementation is just to pass it through.\n parse: function(resp, options) {\n return resp;\n },\n\n // Create a new collection with an identical list of models as this one.\n clone: function() {\n return new this.constructor(this.models, {\n model: this.model,\n comparator: this.comparator\n });\n },\n\n // Define how to uniquely identify models in the collection.\n modelId: function(attrs) {\n return attrs[this.model.prototype.idAttribute || 'id'];\n },\n\n // Private method to reset all internal state. Called when the collection\n // is first initialized or reset.\n _reset: function() {\n this.length = 0;\n this.models = [];\n this._byId = {};\n },\n\n // Prepare a hash of attributes (or other model) to be added to this\n // collection.\n _prepareModel: function(attrs, options) {\n if (this._isModel(attrs)) {\n if (!attrs.collection) attrs.collection = this;\n return attrs;\n }\n options = options ? _.clone(options) : {};\n options.collection = this;\n var model = new this.model(attrs, options);\n if (!model.validationError) return model;\n this.trigger('invalid', this, model.validationError, options);\n return false;\n },\n\n // Internal method called by both remove and set.\n _removeModels: function(models, options) {\n var removed = [];\n for (var i = 0; i < models.length; i++) {\n var model = this.get(models[i]);\n if (!model) continue;\n\n var index = this.indexOf(model);\n this.models.splice(index, 1);\n this.length--;\n\n // Remove references before triggering 'remove' event to prevent an\n // infinite loop. #3693\n delete this._byId[model.cid];\n var id = this.modelId(model.attributes);\n if (id != null) delete this._byId[id];\n\n if (!options.silent) {\n options.index = index;\n model.trigger('remove', model, this, options);\n }\n\n removed.push(model);\n this._removeReference(model, options);\n }\n return removed;\n },\n\n // Method for checking whether an object should be considered a model for\n // the purposes of adding to the collection.\n _isModel: function(model) {\n return model instanceof Model;\n },\n\n // Internal method to create a model's ties to a collection.\n _addReference: function(model, options) {\n this._byId[model.cid] = model;\n var id = this.modelId(model.attributes);\n if (id != null) this._byId[id] = model;\n model.on('all', this._onModelEvent, this);\n },\n\n // Internal method to sever a model's ties to a collection.\n _removeReference: function(model, options) {\n delete this._byId[model.cid];\n var id = this.modelId(model.attributes);\n if (id != null) delete this._byId[id];\n if (this === model.collection) delete model.collection;\n model.off('all', this._onModelEvent, this);\n },\n\n // Internal method called every time a model in the set fires an event.\n // Sets need to update their indexes when models change ids. All other\n // events simply proxy through. \"add\" and \"remove\" events that originate\n // in other collections are ignored.\n _onModelEvent: function(event, model, collection, options) {\n if (model) {\n if ((event === 'add' || event === 'remove') && collection !== this) return;\n if (event === 'destroy') this.remove(model, options);\n if (event === 'change') {\n var prevId = this.modelId(model.previousAttributes());\n var id = this.modelId(model.attributes);\n if (prevId !== id) {\n if (prevId != null) delete this._byId[prevId];\n if (id != null) this._byId[id] = model;\n }\n }\n }\n this.trigger.apply(this, arguments);\n }\n\n });\n\n // Underscore methods that we want to implement on the Collection.\n // 90% of the core usefulness of Backbone Collections is actually implemented\n // right here:\n var collectionMethods = {forEach: 3, each: 3, map: 3, collect: 3, reduce: 0,\n foldl: 0, inject: 0, reduceRight: 0, foldr: 0, find: 3, detect: 3, filter: 3,\n select: 3, reject: 3, every: 3, all: 3, some: 3, any: 3, include: 3, includes: 3,\n contains: 3, invoke: 0, max: 3, min: 3, toArray: 1, size: 1, first: 3,\n head: 3, take: 3, initial: 3, rest: 3, tail: 3, drop: 3, last: 3,\n without: 0, difference: 0, indexOf: 3, shuffle: 1, lastIndexOf: 3,\n isEmpty: 1, chain: 1, sample: 3, partition: 3, groupBy: 3, countBy: 3,\n sortBy: 3, indexBy: 3, findIndex: 3, findLastIndex: 3};\n\n // Mix in each Underscore method as a proxy to `Collection#models`.\n addUnderscoreMethods(Collection, collectionMethods, 'models');\n\n // Backbone.View\n // -------------\n\n // Backbone Views are almost more convention than they are actual code. A View\n // is simply a JavaScript object that represents a logical chunk of UI in the\n // DOM. This might be a single item, an entire list, a sidebar or panel, or\n // even the surrounding frame which wraps your whole app. Defining a chunk of\n // UI as a **View** allows you to define your DOM events declaratively, without\n // having to worry about render order ... and makes it easy for the view to\n // react to specific changes in the state of your models.\n\n // Creating a Backbone.View creates its initial element outside of the DOM,\n // if an existing element is not provided...\n var View = Backbone.View = function(options) {\n this.cid = _.uniqueId('view');\n _.extend(this, _.pick(options, viewOptions));\n this._ensureElement();\n this.initialize.apply(this, arguments);\n };\n\n // Cached regex to split keys for `delegate`.\n var delegateEventSplitter = /^(\\S+)\\s*(.*)$/;\n\n // List of view options to be set as properties.\n var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];\n\n // Set up all inheritable **Backbone.View** properties and methods.\n _.extend(View.prototype, Events, {\n\n // The default `tagName` of a View's element is `\"div\"`.\n tagName: 'div',\n\n // jQuery delegate for element lookup, scoped to DOM elements within the\n // current view. This should be preferred to global lookups where possible.\n $: function(selector) {\n return this.$el.find(selector);\n },\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // **render** is the core function that your view should override, in order\n // to populate its element (`this.el`), with the appropriate HTML. The\n // convention is for **render** to always return `this`.\n render: function() {\n return this;\n },\n\n // Remove this view by taking the element out of the DOM, and removing any\n // applicable Backbone.Events listeners.\n remove: function() {\n this._removeElement();\n this.stopListening();\n return this;\n },\n\n // Remove this view's element from the document and all event listeners\n // attached to it. Exposed for subclasses using an alternative DOM\n // manipulation API.\n _removeElement: function() {\n this.$el.remove();\n },\n\n // Change the view's element (`this.el` property) and re-delegate the\n // view's events on the new element.\n setElement: function(element) {\n this.undelegateEvents();\n this._setElement(element);\n this.delegateEvents();\n return this;\n },\n\n // Creates the `this.el` and `this.$el` references for this view using the\n // given `el`. `el` can be a CSS selector or an HTML string, a jQuery\n // context or an element. Subclasses can override this to utilize an\n // alternative DOM manipulation API and are only required to set the\n // `this.el` property.\n _setElement: function(el) {\n this.$el = el instanceof Backbone.$ ? el : Backbone.$(el);\n this.el = this.$el[0];\n },\n\n // Set callbacks, where `this.events` is a hash of\n //\n // *{\"event selector\": \"callback\"}*\n //\n // {\n // 'mousedown .title': 'edit',\n // 'click .button': 'save',\n // 'click .open': function(e) { ... }\n // }\n //\n // pairs. Callbacks will be bound to the view, with `this` set properly.\n // Uses event delegation for efficiency.\n // Omitting the selector binds the event to `this.el`.\n delegateEvents: function(events) {\n events || (events = _.result(this, 'events'));\n if (!events) return this;\n this.undelegateEvents();\n for (var key in events) {\n var method = events[key];\n if (!_.isFunction(method)) method = this[method];\n if (!method) continue;\n var match = key.match(delegateEventSplitter);\n this.delegate(match[1], match[2], _.bind(method, this));\n }\n return this;\n },\n\n // Add a single event listener to the view's element (or a child element\n // using `selector`). This only works for delegate-able events: not `focus`,\n // `blur`, and not `change`, `submit`, and `reset` in Internet Explorer.\n delegate: function(eventName, selector, listener) {\n this.$el.on(eventName + '.delegateEvents' + this.cid, selector, listener);\n return this;\n },\n\n // Clears all callbacks previously bound to the view by `delegateEvents`.\n // You usually don't need to use this, but may wish to if you have multiple\n // Backbone views attached to the same DOM element.\n undelegateEvents: function() {\n if (this.$el) this.$el.off('.delegateEvents' + this.cid);\n return this;\n },\n\n // A finer-grained `undelegateEvents` for removing a single delegated event.\n // `selector` and `listener` are both optional.\n undelegate: function(eventName, selector, listener) {\n this.$el.off(eventName + '.delegateEvents' + this.cid, selector, listener);\n return this;\n },\n\n // Produces a DOM element to be assigned to your view. Exposed for\n // subclasses using an alternative DOM manipulation API.\n _createElement: function(tagName) {\n return document.createElement(tagName);\n },\n\n // Ensure that the View has a DOM element to render into.\n // If `this.el` is a string, pass it through `$()`, take the first\n // matching element, and re-assign it to `el`. Otherwise, create\n // an element from the `id`, `className` and `tagName` properties.\n _ensureElement: function() {\n if (!this.el) {\n var attrs = _.extend({}, _.result(this, 'attributes'));\n if (this.id) attrs.id = _.result(this, 'id');\n if (this.className) attrs['class'] = _.result(this, 'className');\n this.setElement(this._createElement(_.result(this, 'tagName')));\n this._setAttributes(attrs);\n } else {\n this.setElement(_.result(this, 'el'));\n }\n },\n\n // Set attributes from a hash on this view's element. Exposed for\n // subclasses using an alternative DOM manipulation API.\n _setAttributes: function(attributes) {\n this.$el.attr(attributes);\n }\n\n });\n\n // Backbone.sync\n // -------------\n\n // Override this function to change the manner in which Backbone persists\n // models to the server. You will be passed the type of request, and the\n // model in question. By default, makes a RESTful Ajax request\n // to the model's `url()`. Some possible customizations could be:\n //\n // * Use `setTimeout` to batch rapid-fire updates into a single request.\n // * Send up the models as XML instead of JSON.\n // * Persist models via WebSockets instead of Ajax.\n //\n // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests\n // as `POST`, with a `_method` parameter containing the true HTTP method,\n // as well as all requests with the body as `application/x-www-form-urlencoded`\n // instead of `application/json` with the model in a param named `model`.\n // Useful when interfacing with server-side languages like **PHP** that make\n // it difficult to read the body of `PUT` requests.\n Backbone.sync = function(method, model, options) {\n var type = methodMap[method];\n\n // Default options, unless specified.\n _.defaults(options || (options = {}), {\n emulateHTTP: Backbone.emulateHTTP,\n emulateJSON: Backbone.emulateJSON\n });\n\n // Default JSON-request options.\n var params = {type: type, dataType: 'json'};\n\n // Ensure that we have a URL.\n if (!options.url) {\n params.url = _.result(model, 'url') || urlError();\n }\n\n // Ensure that we have the appropriate request data.\n if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {\n params.contentType = 'application/json';\n params.data = JSON.stringify(options.attrs || model.toJSON(options));\n }\n\n // For older servers, emulate JSON by encoding the request into an HTML-form.\n if (options.emulateJSON) {\n params.contentType = 'application/x-www-form-urlencoded';\n params.data = params.data ? {model: params.data} : {};\n }\n\n // For older servers, emulate HTTP by mimicking the HTTP method with `_method`\n // And an `X-HTTP-Method-Override` header.\n if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {\n params.type = 'POST';\n if (options.emulateJSON) params.data._method = type;\n var beforeSend = options.beforeSend;\n options.beforeSend = function(xhr) {\n xhr.setRequestHeader('X-HTTP-Method-Override', type);\n if (beforeSend) return beforeSend.apply(this, arguments);\n };\n }\n\n // Don't process data on a non-GET request.\n if (params.type !== 'GET' && !options.emulateJSON) {\n params.processData = false;\n }\n\n // Pass along `textStatus` and `errorThrown` from jQuery.\n var error = options.error;\n options.error = function(xhr, textStatus, errorThrown) {\n options.textStatus = textStatus;\n options.errorThrown = errorThrown;\n if (error) error.call(options.context, xhr, textStatus, errorThrown);\n };\n\n // Make the request, allowing the user to override any Ajax options.\n var xhr = options.xhr = Backbone.ajax(_.extend(params, options));\n model.trigger('request', model, xhr, options);\n return xhr;\n };\n\n // Map from CRUD to HTTP for our default `Backbone.sync` implementation.\n var methodMap = {\n 'create': 'POST',\n 'update': 'PUT',\n 'patch': 'PATCH',\n 'delete': 'DELETE',\n 'read': 'GET'\n };\n\n // Set the default implementation of `Backbone.ajax` to proxy through to `$`.\n // Override this if you'd like to use a different library.\n Backbone.ajax = function() {\n return Backbone.$.ajax.apply(Backbone.$, arguments);\n };\n\n // Backbone.Router\n // ---------------\n\n // Routers map faux-URLs to actions, and fire events when routes are\n // matched. Creating a new one sets its `routes` hash, if not set statically.\n var Router = Backbone.Router = function(options) {\n options || (options = {});\n if (options.routes) this.routes = options.routes;\n this._bindRoutes();\n this.initialize.apply(this, arguments);\n };\n\n // Cached regular expressions for matching named param parts and splatted\n // parts of route strings.\n var optionalParam = /\\((.*?)\\)/g;\n var namedParam = /(\\(\\?)?:\\w+/g;\n var splatParam = /\\*\\w+/g;\n var escapeRegExp = /[\\-{}\\[\\]+?.,\\\\\\^$|#\\s]/g;\n\n // Set up all inheritable **Backbone.Router** properties and methods.\n _.extend(Router.prototype, Events, {\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // Manually bind a single named route to a callback. For example:\n //\n // this.route('search/:query/p:num', 'search', function(query, num) {\n // ...\n // });\n //\n route: function(route, name, callback) {\n if (!_.isRegExp(route)) route = this._routeToRegExp(route);\n if (_.isFunction(name)) {\n callback = name;\n name = '';\n }\n if (!callback) callback = this[name];\n var router = this;\n Backbone.history.route(route, function(fragment) {\n var args = router._extractParameters(route, fragment);\n if (router.execute(callback, args, name) !== false) {\n router.trigger.apply(router, ['route:' + name].concat(args));\n router.trigger('route', name, args);\n Backbone.history.trigger('route', router, name, args);\n }\n });\n return this;\n },\n\n // Execute a route handler with the provided parameters. This is an\n // excellent place to do pre-route setup or post-route cleanup.\n execute: function(callback, args, name) {\n if (callback) callback.apply(this, args);\n },\n\n // Simple proxy to `Backbone.history` to save a fragment into the history.\n navigate: function(fragment, options) {\n Backbone.history.navigate(fragment, options);\n return this;\n },\n\n // Bind all defined routes to `Backbone.history`. We have to reverse the\n // order of the routes here to support behavior where the most general\n // routes can be defined at the bottom of the route map.\n _bindRoutes: function() {\n if (!this.routes) return;\n this.routes = _.result(this, 'routes');\n var route, routes = _.keys(this.routes);\n while ((route = routes.pop()) != null) {\n this.route(route, this.routes[route]);\n }\n },\n\n // Convert a route string into a regular expression, suitable for matching\n // against the current location hash.\n _routeToRegExp: function(route) {\n route = route.replace(escapeRegExp, '\\\\$&')\n .replace(optionalParam, '(?:$1)?')\n .replace(namedParam, function(match, optional) {\n return optional ? match : '([^/?]+)';\n })\n .replace(splatParam, '([^?]*?)');\n return new RegExp('^' + route + '(?:\\\\?([\\\\s\\\\S]*))?$');\n },\n\n // Given a route, and a URL fragment that it matches, return the array of\n // extracted decoded parameters. Empty or unmatched parameters will be\n // treated as `null` to normalize cross-browser behavior.\n _extractParameters: function(route, fragment) {\n var params = route.exec(fragment).slice(1);\n return _.map(params, function(param, i) {\n // Don't decode the search params.\n if (i === params.length - 1) return param || null;\n return param ? decodeURIComponent(param) : null;\n });\n }\n\n });\n\n // Backbone.History\n // ----------------\n\n // Handles cross-browser history management, based on either\n // [pushState](http://diveintohtml5.info/history.html) and real URLs, or\n // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)\n // and URL fragments. If the browser supports neither (old IE, natch),\n // falls back to polling.\n var History = Backbone.History = function() {\n this.handlers = [];\n this.checkUrl = _.bind(this.checkUrl, this);\n\n // Ensure that `History` can be used outside of the browser.\n if (typeof window !== 'undefined') {\n this.location = window.location;\n this.history = window.history;\n }\n };\n\n // Cached regex for stripping a leading hash/slash and trailing space.\n var routeStripper = /^[#\\/]|\\s+$/g;\n\n // Cached regex for stripping leading and trailing slashes.\n var rootStripper = /^\\/+|\\/+$/g;\n\n // Cached regex for stripping urls of hash.\n var pathStripper = /#.*$/;\n\n // Has the history handling already been started?\n History.started = false;\n\n // Set up all inheritable **Backbone.History** properties and methods.\n _.extend(History.prototype, Events, {\n\n // The default interval to poll for hash changes, if necessary, is\n // twenty times a second.\n interval: 50,\n\n // Are we at the app root?\n atRoot: function() {\n var path = this.location.pathname.replace(/[^\\/]$/, '$&/');\n return path === this.root && !this.getSearch();\n },\n\n // Does the pathname match the root?\n matchRoot: function() {\n var path = this.decodeFragment(this.location.pathname);\n var rootPath = path.slice(0, this.root.length - 1) + '/';\n return rootPath === this.root;\n },\n\n // Unicode characters in `location.pathname` are percent encoded so they're\n // decoded for comparison. `%25` should not be decoded since it may be part\n // of an encoded parameter.\n decodeFragment: function(fragment) {\n return decodeURI(fragment.replace(/%25/g, '%2525'));\n },\n\n // In IE6, the hash fragment and search params are incorrect if the\n // fragment contains `?`.\n getSearch: function() {\n var match = this.location.href.replace(/#.*/, '').match(/\\?.+/);\n return match ? match[0] : '';\n },\n\n // Gets the true hash value. Cannot use location.hash directly due to bug\n // in Firefox where location.hash will always be decoded.\n getHash: function(window) {\n var match = (window || this).location.href.match(/#(.*)$/);\n return match ? match[1] : '';\n },\n\n // Get the pathname and search params, without the root.\n getPath: function() {\n var path = this.decodeFragment(\n this.location.pathname + this.getSearch()\n ).slice(this.root.length - 1);\n return path.charAt(0) === '/' ? path.slice(1) : path;\n },\n\n // Get the cross-browser normalized URL fragment from the path or hash.\n getFragment: function(fragment) {\n if (fragment == null) {\n if (this._usePushState || !this._wantsHashChange) {\n fragment = this.getPath();\n } else {\n fragment = this.getHash();\n }\n }\n return fragment.replace(routeStripper, '');\n },\n\n // Start the hash change handling, returning `true` if the current URL matches\n // an existing route, and `false` otherwise.\n start: function(options) {\n if (History.started) throw new Error('Backbone.history has already been started');\n History.started = true;\n\n // Figure out the initial configuration. Do we need an iframe?\n // Is pushState desired ... is it available?\n this.options = _.extend({root: '/'}, this.options, options);\n this.root = this.options.root;\n this._wantsHashChange = this.options.hashChange !== false;\n this._hasHashChange = 'onhashchange' in window && (document.documentMode === void 0 || document.documentMode > 7);\n this._useHashChange = this._wantsHashChange && this._hasHashChange;\n this._wantsPushState = !!this.options.pushState;\n this._hasPushState = !!(this.history && this.history.pushState);\n this._usePushState = this._wantsPushState && this._hasPushState;\n this.fragment = this.getFragment();\n\n // Normalize root to always include a leading and trailing slash.\n this.root = ('/' + this.root + '/').replace(rootStripper, '/');\n\n // Transition from hashChange to pushState or vice versa if both are\n // requested.\n if (this._wantsHashChange && this._wantsPushState) {\n\n // If we've started off with a route from a `pushState`-enabled\n // browser, but we're currently in a browser that doesn't support it...\n if (!this._hasPushState && !this.atRoot()) {\n var rootPath = this.root.slice(0, -1) || '/';\n this.location.replace(rootPath + '#' + this.getPath());\n // Return immediately as browser will do redirect to new url\n return true;\n\n // Or if we've started out with a hash-based route, but we're currently\n // in a browser where it could be `pushState`-based instead...\n } else if (this._hasPushState && this.atRoot()) {\n this.navigate(this.getHash(), {replace: true});\n }\n\n }\n\n // Proxy an iframe to handle location events if the browser doesn't\n // support the `hashchange` event, HTML5 history, or the user wants\n // `hashChange` but not `pushState`.\n if (!this._hasHashChange && this._wantsHashChange && !this._usePushState) {\n this.iframe = document.createElement('iframe');\n this.iframe.src = 'javascript:0';\n this.iframe.style.display = 'none';\n this.iframe.tabIndex = -1;\n var body = document.body;\n // Using `appendChild` will throw on IE < 9 if the document is not ready.\n var iWindow = body.insertBefore(this.iframe, body.firstChild).contentWindow;\n iWindow.document.open();\n iWindow.document.close();\n iWindow.location.hash = '#' + this.fragment;\n }\n\n // Add a cross-platform `addEventListener` shim for older browsers.\n var addEventListener = window.addEventListener || function(eventName, listener) {\n return attachEvent('on' + eventName, listener);\n };\n\n // Depending on whether we're using pushState or hashes, and whether\n // 'onhashchange' is supported, determine how we check the URL state.\n if (this._usePushState) {\n addEventListener('popstate', this.checkUrl, false);\n } else if (this._useHashChange && !this.iframe) {\n addEventListener('hashchange', this.checkUrl, false);\n } else if (this._wantsHashChange) {\n this._checkUrlInterval = setInterval(this.checkUrl, this.interval);\n }\n\n if (!this.options.silent) return this.loadUrl();\n },\n\n // Disable Backbone.history, perhaps temporarily. Not useful in a real app,\n // but possibly useful for unit testing Routers.\n stop: function() {\n // Add a cross-platform `removeEventListener` shim for older browsers.\n var removeEventListener = window.removeEventListener || function(eventName, listener) {\n return detachEvent('on' + eventName, listener);\n };\n\n // Remove window listeners.\n if (this._usePushState) {\n removeEventListener('popstate', this.checkUrl, false);\n } else if (this._useHashChange && !this.iframe) {\n removeEventListener('hashchange', this.checkUrl, false);\n }\n\n // Clean up the iframe if necessary.\n if (this.iframe) {\n document.body.removeChild(this.iframe);\n this.iframe = null;\n }\n\n // Some environments will throw when clearing an undefined interval.\n if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);\n History.started = false;\n },\n\n // Add a route to be tested when the fragment changes. Routes added later\n // may override previous routes.\n route: function(route, callback) {\n this.handlers.unshift({route: route, callback: callback});\n },\n\n // Checks the current URL to see if it has changed, and if it has,\n // calls `loadUrl`, normalizing across the hidden iframe.\n checkUrl: function(e) {\n var current = this.getFragment();\n\n // If the user pressed the back button, the iframe's hash will have\n // changed and we should use that for comparison.\n if (current === this.fragment && this.iframe) {\n current = this.getHash(this.iframe.contentWindow);\n }\n\n if (current === this.fragment) return false;\n if (this.iframe) this.navigate(current);\n this.loadUrl();\n },\n\n // Attempt to load the current URL fragment. If a route succeeds with a\n // match, returns `true`. If no defined routes matches the fragment,\n // returns `false`.\n loadUrl: function(fragment) {\n // If the root doesn't match, no routes can match either.\n if (!this.matchRoot()) return false;\n fragment = this.fragment = this.getFragment(fragment);\n return _.some(this.handlers, function(handler) {\n if (handler.route.test(fragment)) {\n handler.callback(fragment);\n return true;\n }\n });\n },\n\n // Save a fragment into the hash history, or replace the URL state if the\n // 'replace' option is passed. You are responsible for properly URL-encoding\n // the fragment in advance.\n //\n // The options object can contain `trigger: true` if you wish to have the\n // route callback be fired (not usually desirable), or `replace: true`, if\n // you wish to modify the current URL without adding an entry to the history.\n navigate: function(fragment, options) {\n if (!History.started) return false;\n if (!options || options === true) options = {trigger: !!options};\n\n // Normalize the fragment.\n fragment = this.getFragment(fragment || '');\n\n // Don't include a trailing slash on the root.\n var rootPath = this.root;\n if (fragment === '' || fragment.charAt(0) === '?') {\n rootPath = rootPath.slice(0, -1) || '/';\n }\n var url = rootPath + fragment;\n\n // Strip the hash and decode for matching.\n fragment = this.decodeFragment(fragment.replace(pathStripper, ''));\n\n if (this.fragment === fragment) return;\n this.fragment = fragment;\n\n // If pushState is available, we use it to set the fragment as a real URL.\n if (this._usePushState) {\n this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);\n\n // If hash changes haven't been explicitly disabled, update the hash\n // fragment to store history.\n } else if (this._wantsHashChange) {\n this._updateHash(this.location, fragment, options.replace);\n if (this.iframe && fragment !== this.getHash(this.iframe.contentWindow)) {\n var iWindow = this.iframe.contentWindow;\n\n // Opening and closing the iframe tricks IE7 and earlier to push a\n // history entry on hash-tag change. When replace is true, we don't\n // want this.\n if (!options.replace) {\n iWindow.document.open();\n iWindow.document.close();\n }\n\n this._updateHash(iWindow.location, fragment, options.replace);\n }\n\n // If you've told us that you explicitly don't want fallback hashchange-\n // based history, then `navigate` becomes a page refresh.\n } else {\n return this.location.assign(url);\n }\n if (options.trigger) return this.loadUrl(fragment);\n },\n\n // Update the hash location, either replacing the current entry, or adding\n // a new one to the browser history.\n _updateHash: function(location, fragment, replace) {\n if (replace) {\n var href = location.href.replace(/(javascript:|#).*$/, '');\n location.replace(href + '#' + fragment);\n } else {\n // Some browsers require that `hash` contains a leading #.\n location.hash = '#' + fragment;\n }\n }\n\n });\n\n // Create the default Backbone.history.\n Backbone.history = new History;\n\n // Helpers\n // -------\n\n // Helper function to correctly set up the prototype chain for subclasses.\n // Similar to `goog.inherits`, but uses a hash of prototype properties and\n // class properties to be extended.\n var extend = function(protoProps, staticProps) {\n var parent = this;\n var child;\n\n // The constructor function for the new subclass is either defined by you\n // (the \"constructor\" property in your `extend` definition), or defaulted\n // by us to simply call the parent constructor.\n if (protoProps && _.has(protoProps, 'constructor')) {\n child = protoProps.constructor;\n } else {\n child = function(){ return parent.apply(this, arguments); };\n }\n\n // Add static properties to the constructor function, if supplied.\n _.extend(child, parent, staticProps);\n\n // Set the prototype chain to inherit from `parent`, without calling\n // `parent`'s constructor function and add the prototype properties.\n child.prototype = _.create(parent.prototype, protoProps);\n child.prototype.constructor = child;\n\n // Set a convenience property in case the parent's prototype is needed\n // later.\n child.__super__ = parent.prototype;\n\n return child;\n };\n\n // Set up inheritance for the model, collection, router, view and history.\n Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;\n\n // Throw an error when a URL is needed, and none is supplied.\n var urlError = function() {\n throw new Error('A \"url\" property or function must be specified');\n };\n\n // Wrap an optional error callback with a fallback error event.\n var wrapError = function(model, options) {\n var error = options.error;\n options.error = function(resp) {\n if (error) error.call(options.context, model, resp, options);\n model.trigger('error', model, resp, options);\n };\n };\n\n return Backbone;\n});\n","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","import { keys, isUndefined, isElement, isArray } from 'underscore';\n\nconst elProt = window.Element.prototype;\nconst matches =\n elProt.matches ||\n elProt.webkitMatchesSelector ||\n elProt.mozMatchesSelector ||\n elProt.msMatchesSelector;\n\n/**\n * Import styles asynchronously\n * @param {String|Array} styles\n */\nconst appendStyles = (styles, opts = {}) => {\n const stls = isArray(styles) ? [...styles] : [styles];\n\n if (stls.length) {\n const href = stls.shift();\n\n if (!opts.unique || !document.querySelector(`link[href=\"${href}\"]`)) {\n const { head } = document;\n const link = document.createElement('link');\n link.href = href;\n link.rel = 'stylesheet';\n\n if (opts.prepand) {\n head.insertBefore(link, head.firstChild);\n } else {\n head.appendChild(link);\n }\n }\n\n appendStyles(stls);\n }\n};\n\n/**\n * Returns shallow diff between 2 objects\n * @param {Object} objOrig\n * @param {Objec} objNew\n * @return {Object}\n * @example\n * var a = {foo: 'bar', baz: 1, faz: 'sop'};\n * var b = {foo: 'bar', baz: 2, bar: ''};\n * shallowDiff(a, b);\n * // -> {baz: 2, faz: null, bar: ''};\n */\nconst shallowDiff = (objOrig, objNew) => {\n const result = {};\n const keysNew = keys(objNew);\n\n for (let prop in objOrig) {\n if (objOrig.hasOwnProperty(prop)) {\n const origValue = objOrig[prop];\n const newValue = objNew[prop];\n\n if (keysNew.indexOf(prop) >= 0) {\n if (origValue !== newValue) {\n result[prop] = newValue;\n }\n } else {\n result[prop] = null;\n }\n }\n }\n\n for (let prop in objNew) {\n if (objNew.hasOwnProperty(prop)) {\n if (isUndefined(objOrig[prop])) {\n result[prop] = objNew[prop];\n }\n }\n }\n\n return result;\n};\n\nconst on = (el, ev, fn) => {\n ev = ev.split(/\\s+/);\n el = el instanceof Array ? el : [el];\n\n for (let i = 0; i < ev.length; ++i) {\n el.forEach(elem => elem.addEventListener(ev[i], fn));\n }\n};\n\nconst off = (el, ev, fn) => {\n ev = ev.split(/\\s+/);\n el = el instanceof Array ? el : [el];\n\n for (let i = 0; i < ev.length; ++i) {\n el.forEach(elem => elem.removeEventListener(ev[i], fn));\n }\n};\n\nconst getUnitFromValue = value => {\n return value.replace(parseFloat(value), '');\n};\n\nconst upFirst = value => value[0].toUpperCase() + value.toLowerCase().slice(1);\n\nconst camelCase = value => {\n const values = value.split('-').filter(String);\n return values[0].toLowerCase() + values.slice(1).map(upFirst);\n};\n\nconst normalizeFloat = (value, step = 1, valueDef = 0) => {\n let stepDecimals = 0;\n if (isNaN(value)) return valueDef;\n value = parseFloat(value);\n\n if (Math.floor(value) !== value) {\n const side = step.toString().split('.')[1];\n stepDecimals = side ? side.length : 0;\n }\n\n return stepDecimals ? parseFloat(value.toFixed(stepDecimals)) : value;\n};\n\nconst hasDnd = em => {\n return (\n 'draggable' in document.createElement('i') &&\n (em ? em.get('Config').nativeDnD : 1)\n );\n};\n\n/**\n * Ensure to fetch the element from the input argument\n * @param {HTMLElement|Component} el Component or HTML element\n * @return {HTMLElement}\n */\nconst getElement = el => {\n if (isElement(el) || isTextNode(el)) {\n return el;\n } else if (el && el.getEl) {\n return el.getEl();\n }\n};\n\n/**\n * Check if element is a text node\n * @param {HTMLElement} el\n * @return {Boolean}\n */\nconst isTextNode = el => el && el.nodeType === 3;\n\n/**\n * Check if element is a comment node\n * @param {HTMLElement} el\n * @return {Boolean}\n */\nexport const isCommentNode = el => el && el.nodeType === 8;\n\n/**\n * Check if element is a comment node\n * @param {HTMLElement} el\n * @return {Boolean}\n */\nexport const isTaggableNode = el => el && !isTextNode(el) && !isCommentNode(el);\n\n/**\n * Ensure to fetch the model from the input argument\n * @param {HTMLElement|Component} el Component or HTML element\n * @return {Component}\n */\nconst getModel = (el, $) => {\n let model = el;\n isElement(el) && (model = $(el).data('model'));\n return model;\n};\n\nconst getElRect = el => {\n const def = {\n top: 0,\n left: 0,\n width: 0,\n height: 0\n };\n if (!el) return def;\n let rectText;\n\n if (isTextNode(el)) {\n const range = document.createRange();\n range.selectNode(el);\n rectText = range.getBoundingClientRect();\n range.detach();\n }\n\n return (\n rectText || (el.getBoundingClientRect ? el.getBoundingClientRect() : def)\n );\n};\n\n/**\n * Get cross-device pointer event\n * @param {Event} ev\n * @return {Event}\n */\nconst getPointerEvent = ev =>\n ev.touches && ev.touches[0] ? ev.touches[0] : ev;\n\n/**\n * Get cross-browser keycode\n * @param {Event} ev\n * @return {Number}\n */\nconst getKeyCode = ev => ev.which || ev.keyCode;\nconst getKeyChar = ev => String.fromCharCode(getKeyCode(ev));\nconst isEscKey = ev => getKeyCode(ev) === 27;\n\nconst capitalize = str => str.charAt(0).toUpperCase() + str.substring(1);\nconst isComponent = obj => obj && obj.toHTML;\nconst isRule = obj => obj && obj.toCSS;\n\nexport {\n on,\n off,\n hasDnd,\n upFirst,\n matches,\n getModel,\n getElRect,\n camelCase,\n isTextNode,\n getKeyCode,\n getKeyChar,\n isEscKey,\n getElement,\n shallowDiff,\n normalizeFloat,\n getPointerEvent,\n getUnitFromValue,\n capitalize,\n appendStyles,\n isComponent,\n isRule\n};\n","import Backbone from 'backbone';\nimport { isUndefined } from 'underscore';\n\nexport default Backbone.Model.extend({\n defaults: {\n type: 'text', // text, number, range, select\n label: '',\n name: '',\n min: '',\n max: '',\n unit: '',\n step: 1,\n value: '',\n target: '',\n default: '',\n placeholder: '',\n changeProp: 0,\n options: []\n },\n\n initialize() {\n const target = this.get('target');\n const name = this.get('name');\n const changeProp = this.get('changeProp');\n\n if (target) {\n this.target = target;\n this.unset('target');\n const targetEvent = changeProp\n ? `change:${name}`\n : `change:attributes:${name}`;\n this.listenTo(target, targetEvent, this.targetUpdated);\n }\n },\n\n /**\n * Return all the propeties\n * @returns {Object}\n */\n props() {\n return this.attributes;\n },\n\n targetUpdated() {\n const value = this.getTargetValue();\n this.set({ value }, { fromTarget: 1 });\n },\n\n getTargetValue() {\n const name = this.get('name');\n const target = this.target;\n let value;\n\n if (this.get('changeProp')) {\n value = target.get(name);\n } else {\n value = target.getAttributes()[name];\n }\n\n return !isUndefined(value) ? value : '';\n },\n\n setTargetValue(value, opts = {}) {\n const target = this.target;\n const name = this.get('name');\n if (isUndefined(value)) return;\n let valueToSet = value;\n\n if (value === 'false') {\n valueToSet = false;\n } else if (value === 'true') {\n valueToSet = true;\n }\n\n if (this.get('changeProp')) {\n target.set(name, valueToSet, opts);\n } else {\n const attrs = { ...target.get('attributes') };\n attrs[name] = valueToSet;\n target.set('attributes', attrs, opts);\n }\n },\n\n setValueFromInput(value, final = 1, opts = {}) {\n const toSet = { value };\n this.set(toSet, { ...opts, avoidStore: 1 });\n\n // Have to trigger the change\n if (final) {\n this.set('value', '', opts);\n this.set(toSet, opts);\n }\n },\n\n /**\n * Get the initial value of the trait\n * @return {string}\n */\n getInitValue() {\n const target = this.target;\n const name = this.get('name');\n let value;\n\n if (target) {\n const attrs = target.get('attributes');\n value = this.get('changeProp') ? target.get(name) : attrs[name];\n }\n\n return value || this.get('value') || this.get('default');\n }\n});\n","import Backbone from 'backbone';\nimport { isString, isArray } from 'underscore';\nimport Trait from './Trait';\nimport TraitFactory from './TraitFactory';\n\nexport default Backbone.Collection.extend({\n model: Trait,\n\n initialize(coll, options = {}) {\n this.em = options.em || '';\n this.listenTo(this, 'add', this.handleAdd);\n this.listenTo(this, 'reset', this.handleReset);\n },\n\n handleReset(coll, { previousModels = [] } = {}) {\n previousModels.forEach(model => model.trigger('remove'));\n },\n\n handleAdd(model) {\n const target = this.target;\n\n if (target) {\n model.target = target;\n }\n },\n\n setTarget(target) {\n this.target = target;\n },\n\n add(models, opt) {\n const em = this.em;\n\n // Use TraitFactory if necessary\n if (isString(models) || isArray(models)) {\n const tm = em && em.get && em.get('TraitManager');\n const tmOpts = tm && tm.getConfig();\n const tf = TraitFactory(tmOpts);\n\n if (isString(models)) {\n models = [models];\n }\n\n for (var i = 0, len = models.length; i < len; i++) {\n const str = models[i];\n const model = isString(str) ? tf.build(str)[0] : str;\n model.target = this.target;\n models[i] = model;\n }\n }\n\n return Backbone.Collection.prototype.add.apply(this, [models, opt]);\n }\n});\n","export default (config = {}) => ({\n /**\n * Build props object by their name\n * @param {Array|string} props Array of properties name\n * @return {Array}\n */\n build(props) {\n var objs = [];\n\n if (typeof props === 'string') props = [props];\n\n for (var i = 0; i < props.length; i++) {\n var obj = {};\n var prop = props[i];\n obj.name = prop;\n\n // Define type\n switch (prop) {\n case 'target':\n obj.type = 'select';\n break;\n }\n\n // Define options\n switch (prop) {\n case 'target':\n obj.options = config.optionsTarget;\n break;\n }\n\n objs.push(obj);\n }\n\n return objs;\n }\n});\n","import {\n isUndefined,\n isFunction,\n isObject,\n isArray,\n isEmpty,\n isBoolean,\n has,\n isString,\n forEach,\n result,\n keys\n} from 'underscore';\nimport { shallowDiff } from 'utils/mixins';\nimport Styleable from 'domain_abstract/model/Styleable';\nimport Backbone from 'backbone';\nimport Components from './Components';\nimport Selector from 'selector_manager/model/Selector';\nimport Selectors from 'selector_manager/model/Selectors';\nimport Traits from 'trait_manager/model/Traits';\n\nconst componentList = {};\nlet componentIndex = 0;\n\nconst escapeRegExp = str => {\n return str.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n};\n\nconst avoidInline = em => em && em.getConfig('avoidInlineStyle');\n\n/**\n * The Component object represents a single node of our template structure, so when you update its properties the changes are\n * immediately reflected on the canvas and in the code to export (indeed, when you ask to export the code we just go through all\n * the tree of nodes).\n * An example on how to update properties:\n * ```js\n * component.set({\n * tagName: 'span',\n * attributes: { ... },\n * removable: false,\n * });\n * component.get('tagName');\n * // -> 'span'\n * ```\n *\n * @typedef Component\n * @property {String} [type=''] Component type, eg. `text`, `image`, `video`, etc.\n * @property {String} [tagName='div'] HTML tag of the component, eg. `span`. Default: `div`\n * @property {Object} [attributes={}] Key-value object of the component's attributes, eg. `{ title: 'Hello' }` Default: `{}`\n * @property {String} [name=''] Name of the component. Will be used, for example, in Layers and badges\n * @property {Boolean} [removable=true] When `true` the component is removable from the canvas, default: `true`\n * @property {Boolean|String} [draggable=true] Indicates if it's possible to drag the component inside others.\n * You can also specify a query string to indentify elements,\n * eg. `'.some-class[title=Hello], [data-gjs-type=column]'` means you can drag the component only inside elements\n * containing `some-class` class and `Hello` title, and `column` components. Default: `true`\n * @property {Boolean|String} [droppable=true] Indicates if it's possible to drop other components inside. You can use\n * a query string as with `draggable`. Default: `true`\n * @property {Boolean} [badgable=true] Set to false if you don't want to see the badge (with the name) over the component. Default: `true`\n * @property {Boolean|Array} [stylable=true] True if it's possible to style the component.\n * You can also indicate an array of CSS properties which is possible to style, eg. `['color', 'width']`, all other properties\n * will be hidden from the style manager. Default: `true`\n * @property {Array} [stylable-require=[]] Indicate an array of style properties to show up which has been marked as `toRequire`. Default: `[]`\n * @property {Array} [unstylable=[]] Indicate an array of style properties which should be hidden from the style manager. Default: `[]`\n * @property {Array} [style-signature=''] This option comes handy when you need to remove or export strictly component-specific rules. Be default, if this option is not empty, the editor will remove rules when there are no components, of that type, in the canvas. Eg. '['.navbar', '[navbar-']'. Default: `''`\n * @property {Boolean} [highlightable=true] It can be highlighted with 'dotted' borders if true. Default: `true`\n * @property {Boolean} [copyable=true] True if it's possible to clone the component. Default: `true`\n * @property {Boolean} [resizable=false] Indicates if it's possible to resize the component. It's also possible to pass an object as [options for the Resizer](https://github.com/artf/grapesjs/blob/master/src/utils/Resizer.js). Default: `false`\n * @property {Boolean} [editable=false] Allow to edit the content of the component (used on Text components). Default: `false`\n * @property {Boolean} [layerable=true] Set to `false` if you need to hide the component inside Layers. Default: `true`\n * @property {Boolean} [selectable=true] Allow component to be selected when clicked. Default: `true`\n * @property {Boolean} [hoverable=true] Shows a highlight outline when hovering on the element if `true`. Default: `true`\n * @property {Boolean} [void=false] This property is used by the HTML exporter as void elements don't have closing tags, eg. `
`, `
`, etc. Default: `false`\n * @property {String} [content=''] Content of the component (not escaped) which will be appended before children rendering. Default: `''`\n * @property {String} [icon=''] Component's icon, this string will be inserted before the name (in Layers and badge), eg. it can be an HTML string ''. Default: `''`\n * @property {String|Function} [script=''] Component's javascript. More about it [here](/modules/Components-js.html). Default: `''`\n * @property {String|Function} [script-export=''] You can specify javascript available only in export functions (eg. when you get the HTML).\n * If this property is defined it will overwrite the `script` one (in export functions). Default: `''`\n * @property {Array} [traits=''] Component's traits. More about it [here](/modules/Traits.html). Default: `['id', 'title']`\n * @property {Array} [propagate=[]] Indicates an array of properties which will be inhereted by all NEW appended children.\n * For example if you create a component likes this: `{ removable: false, draggable: false, propagate: ['removable', 'draggable'] }`\n * and append some new component inside, the new added component will get the exact same properties indicated in the `propagate` array (and the `propagate` property itself). Default: `[]`\n * @property {Array} [toolbar=null] Set an array of items to show up inside the toolbar when the component is selected (move, clone, delete).\n * Eg. `toolbar: [ { attributes: {class: 'fa fa-arrows'}, command: 'tlb-move' }, ... ]`.\n * By default, when `toolbar` property is falsy the editor will add automatically commands like `move`, `delete`, etc. based on its properties.\n * @property {Collection} [components=null] Children components. Default: `null`\n */\nconst Component = Backbone.Model.extend(Styleable).extend(\n {\n defaults: {\n tagName: 'div',\n type: '',\n name: '',\n removable: true,\n draggable: true,\n droppable: true,\n badgable: true,\n stylable: true,\n 'stylable-require': '',\n 'style-signature': '',\n unstylable: '',\n highlightable: true,\n copyable: true,\n resizable: false,\n editable: false,\n layerable: true,\n selectable: true,\n hoverable: true,\n void: false,\n state: '', // Indicates if the component is in some CSS state like ':hover', ':active', etc.\n status: '', // State, eg. 'selected'\n content: '',\n icon: '',\n style: '', // Component related style\n classes: '', // Array of classes\n script: '',\n 'script-export': '',\n attributes: '',\n traits: ['id', 'title'],\n propagate: '',\n dmode: '',\n toolbar: null\n },\n\n /**\n * Hook method, called once the model is created\n */\n init() {},\n\n /**\n * Hook method, called when the model has been updated (eg. updated some model's property)\n * @param {String} property Property name, if triggered after some property update\n * @param {*} value Property value, if triggered after some property update\n * @param {*} previous Property previous value, if triggered after some property update\n */\n updated(property, value, previous) {},\n\n /**\n * Hook method, called once the model has been removed\n */\n removed() {},\n\n initialize(props = {}, opt = {}) {\n const em = opt.em;\n\n // Propagate properties from parent if indicated\n const parent = this.parent();\n const parentAttr = parent && parent.attributes;\n\n if (parentAttr && parentAttr.propagate) {\n let newAttr = {};\n const toPropagate = parentAttr.propagate;\n toPropagate.forEach(prop => (newAttr[prop] = parent.get(prop)));\n newAttr.propagate = toPropagate;\n newAttr = { ...newAttr, ...props };\n this.set(newAttr);\n }\n\n const propagate = this.get('propagate');\n propagate &&\n this.set('propagate', isArray(propagate) ? propagate : [propagate]);\n\n // Check void elements\n if (\n opt &&\n opt.config &&\n opt.config.voidElements.indexOf(this.get('tagName')) >= 0\n ) {\n this.set('void', true);\n }\n\n opt.em = em;\n this.opt = opt;\n this.em = em;\n this.config = opt.config || {};\n this.set('attributes', {\n ...(this.defaults.attributes || {}),\n ...(this.get('attributes') || {})\n });\n this.ccid = Component.createId(this);\n this.initClasses();\n this.initTraits();\n this.initComponents();\n this.initToolbar();\n this.listenTo(this, 'change:script', this.scriptUpdated);\n this.listenTo(this, 'change:tagName', this.tagUpdated);\n this.listenTo(this, 'change:attributes', this.attrUpdated);\n this.listenTo(this, 'change:attributes:id', this._idUpdated);\n this.set('status', '');\n\n // Register global updates for collection properties\n ['classes', 'traits', 'components'].forEach(name => {\n const events = `add remove ${name !== 'components' ? 'change' : ''}`;\n this.listenTo(this.get(name), events.trim(), (...args) =>\n this.emitUpdate(name, ...args)\n );\n });\n\n if (!opt.temporary) {\n this.init();\n em && em.trigger('component:create', this);\n }\n },\n\n /**\n * Check component's type\n * @param {string} type Component type\n * @return {Boolean}\n * @example\n * component.is('image')\n * // -> false\n */\n is(type) {\n return !!(this.get('type') == type);\n },\n\n /**\n * Return all the propeties\n * @returns {Object}\n */\n props() {\n return this.attributes;\n },\n\n /**\n * Get the index of the component in the parent collection.\n * @return {Number}\n */\n index() {\n const { collection } = this;\n return collection && collection.indexOf(this);\n },\n\n /**\n * Change the drag mode of the component.\n * To get more about this feature read: https://github.com/artf/grapesjs/issues/1936\n * @param {String} value Drag mode, options: 'absolute' | 'translate'\n * @returns {this}\n */\n setDragMode(value) {\n return this.set('dmode', value);\n },\n\n /**\n * Find inner components by query string.\n * **ATTENTION**: this method works only with already rendered component\n * @param {String} query Query string\n * @return {Array} Array of components\n * @example\n * component.find('div > .class');\n * // -> [Component, Component, ...]\n */\n find(query) {\n const result = [];\n\n this.view.$el.find(query).each((el, i, $els) => {\n const $el = $els.eq(i);\n const model = $el.data('model');\n model && result.push(model);\n });\n\n return result;\n },\n\n /**\n * Find all inner components by component id.\n * The advantage of this method over `find` is that you can use it\n * also before rendering the component\n * @param {String} id Component id\n * @returns {Array}\n * @example\n * const allImages = component.findType('image');\n * console.log(allImages[0]) // prints the first found component\n */\n findType(id) {\n const result = [];\n const find = components =>\n components.forEach(item => {\n item.is(id) && result.push(item);\n find(item.components());\n });\n find(this.components());\n return result;\n },\n\n /**\n * Find the closest parent component by query string.\n * **ATTENTION**: this method works only with already rendered component\n * @param {string} query Query string\n * @return {Component}\n * @example\n * component.closest('div.some-class');\n * // -> Component\n */\n closest(query) {\n const result = this.view.$el.closest(query);\n return result.length && result.data('model');\n },\n\n /**\n * Once the tag is updated I have to remove the node and replace it\n * @private\n */\n tagUpdated() {\n const coll = this.collection;\n const at = coll.indexOf(this);\n coll.remove(this);\n coll.add(this, { at });\n },\n\n /**\n * Replace a component with another one\n * @param {String|Component} el Component or HTML string\n * @return {Component|Array} New added component/s\n * @example\n * component.replaceWith('
Some new content
');\n * // -> Component\n */\n replaceWith(el) {\n const coll = this.collection;\n const at = coll.indexOf(this);\n coll.remove(this);\n return coll.add(el, { at });\n },\n\n /**\n * Emit changes for each updated attribute\n * @private\n */\n attrUpdated(m, v, opts = {}) {\n const attrs = this.get('attributes');\n\n // Handle classes\n const classes = attrs.class;\n classes && this.setClass(classes);\n delete attrs.class;\n\n // Handle style\n const style = attrs.style;\n style && this.setStyle(style);\n delete attrs.style;\n\n const attrPrev = { ...this.previous('attributes') };\n const diff = shallowDiff(attrPrev, this.get('attributes'));\n keys(diff).forEach(pr =>\n this.trigger(`change:attributes:${pr}`, this, diff[pr], opts)\n );\n },\n\n /**\n * Update attributes of the component\n * @param {Object} attrs Key value attributes\n * @return {this}\n * @example\n * component.setAttributes({ id: 'test', 'data-key': 'value' });\n */\n setAttributes(attrs, opts = {}) {\n this.set('attributes', { ...attrs }, opts);\n return this;\n },\n\n /**\n * Add attributes to the component\n * @param {Object} attrs Key value attributes\n * @return {this}\n * @example\n * component.addAttributes({ 'data-key': 'value' });\n */\n addAttributes(attrs) {\n const newAttrs = { ...this.getAttributes(), ...attrs };\n this.setAttributes(newAttrs);\n\n return this;\n },\n\n /**\n * Get the style of the component\n * @return {Object}\n */\n getStyle() {\n const em = this.em;\n\n if (em && em.getConfig('avoidInlineStyle')) {\n const state = em.get('state');\n const cc = em.get('CssComposer');\n const rule = cc.getIdRule(this.getId(), { state });\n this.rule = rule;\n\n if (rule) {\n return rule.getStyle();\n }\n }\n\n return Styleable.getStyle.call(this);\n },\n\n /**\n * Set the style on the component\n * @param {Object} prop Key value style object\n * @return {Object}\n * @example\n * component.setStyle({ color: 'red' });\n */\n setStyle(prop = {}, opts = {}) {\n const em = this.em;\n const { opt } = this;\n\n if (em && em.getConfig('avoidInlineStyle') && !opt.temporary) {\n const style = this.get('style') || {};\n prop = isString(prop) ? this.parseStyle(prop) : prop;\n prop = { ...prop, ...style };\n const state = em.get('state');\n const cc = em.get('CssComposer');\n const propOrig = this.getStyle();\n this.rule = cc.setIdRule(this.getId(), prop, { ...opts, state });\n const diff = shallowDiff(propOrig, prop);\n this.set('style', {}, { silent: 1 });\n keys(diff).forEach(pr => this.trigger(`change:style:${pr}`));\n } else {\n prop = Styleable.setStyle.apply(this, arguments);\n }\n\n return prop;\n },\n\n /**\n * Return all component's attributes\n * @return {Object}\n */\n getAttributes() {\n const { em } = this;\n const classes = [];\n const attributes = { ...this.get('attributes') };\n const sm = em && em.get('SelectorManager');\n const id = this.getId();\n\n // Add classes\n this.get('classes').forEach(cls =>\n classes.push(isString(cls) ? cls : cls.get('name'))\n );\n classes.length && (attributes.class = classes.join(' '));\n\n // Check if we need an ID on the component\n if (!has(attributes, 'id')) {\n let hasStyle;\n\n // If we don't rely on inline styling we have to check\n // for the ID selector\n if (avoidInline(em)) {\n hasStyle = sm && sm.get(id, sm.Selector.TYPE_ID);\n } else if (!isEmpty(this.getStyle())) {\n hasStyle = 1;\n }\n\n if (hasStyle) {\n attributes.id = this.getId();\n }\n }\n\n return attributes;\n },\n\n /**\n * Add classes\n * @param {Array|String} classes Array or string of classes\n * @return {Array} Array of added selectors\n * @example\n * model.addClass('class1');\n * model.addClass('class1 class2');\n * model.addClass(['class1', 'class2']);\n * // -> [SelectorObject, ...]\n */\n addClass(classes) {\n const added = this.em.get('SelectorManager').addClass(classes);\n return this.get('classes').add(added);\n },\n\n /**\n * Set classes (resets current collection)\n * @param {Array|String} classes Array or string of classes\n * @return {Array} Array of added selectors\n * @example\n * model.setClass('class1');\n * model.setClass('class1 class2');\n * model.setClass(['class1', 'class2']);\n * // -> [SelectorObject, ...]\n */\n setClass(classes) {\n this.get('classes').reset();\n return this.addClass(classes);\n },\n\n /**\n * Remove classes\n * @param {Array|String} classes Array or string of classes\n * @return {Array} Array of removed selectors\n * @example\n * model.removeClass('class1');\n * model.removeClass('class1 class2');\n * model.removeClass(['class1', 'class2']);\n * // -> [SelectorObject, ...]\n */\n removeClass(classes) {\n const removed = [];\n classes = isArray(classes) ? classes : [classes];\n const selectors = this.get('classes');\n const type = Selector.TYPE_CLASS;\n\n classes.forEach(classe => {\n const classes = classe.split(' ');\n classes.forEach(name => {\n const selector = selectors.where({ name, type })[0];\n selector && removed.push(selectors.remove(selector));\n });\n });\n\n return removed;\n },\n\n /**\n * Returns component's classes as an array of strings\n * @return {Array}\n */\n getClasses() {\n const attr = this.getAttributes();\n const classStr = attr.class;\n return classStr ? classStr.split(' ') : [];\n },\n\n initClasses() {\n const event = 'change:classes';\n const toListen = [this, event, this.initClasses];\n const cls = this.get('classes') || [];\n const clsArr = isString(cls) ? cls.split(' ') : cls;\n this.stopListening(...toListen);\n const classes = this.normalizeClasses(clsArr);\n const selectors = new Selectors([]);\n this.set('classes', selectors);\n selectors.add(classes);\n this.listenTo(...toListen);\n return this;\n },\n\n initComponents() {\n const event = 'change:components';\n const toListen = [this, event, this.initComponents];\n this.stopListening(...toListen);\n // Have to add components after the init, otherwise the parent\n // is not visible\n const comps = new Components(null, this.opt);\n comps.parent = this;\n const components = this.get('components');\n const addChild = !this.opt.avoidChildren;\n this.set('components', comps);\n addChild &&\n comps.add(isFunction(components) ? components(this) : components);\n this.listenTo(...toListen);\n return this;\n },\n\n initTraits(changed) {\n const { em } = this;\n const event = 'change:traits';\n const toListen = [this, event, this.initTraits];\n this.stopListening(...toListen);\n this.loadTraits();\n const attrs = { ...this.get('attributes') };\n const traits = this.get('traits');\n traits.each(trait => {\n if (!trait.get('changeProp')) {\n const name = trait.get('name');\n const value = trait.getInitValue();\n if (name && value) attrs[name] = value;\n }\n });\n traits.length && this.set('attributes', attrs);\n this.listenTo(...toListen);\n changed && em && em.trigger('component:toggled');\n return this;\n },\n\n /**\n * Add new component children\n * @param {Component|String} components Component to add\n * @param {Object} [opts={}] Options, same as in `model.add()`(from backbone)\n * @return {Array} Array of appended components\n * @example\n * someComponent.get('components').length // -> 0\n * const videoComponent = someComponent.append('
')[0];\n * // This will add 2 components (`video` and `div`) to your `someComponent`\n * someComponent.get('components').length // -> 2\n * // You can pass components directly\n * otherComponent.append(otherComponent2);\n * otherComponent.append([otherComponent3, otherComponent4]);\n */\n append(components, opts = {}) {\n const result = this.components().add(components, opts);\n return isArray(result) ? result : [result];\n },\n\n /**\n * Set new collection if `components` are provided, otherwise the\n * current collection is returned\n * @param {Component|String} [components] Components to set\n * @return {Collection|Array}\n * @example\n * // Set new collection\n * component.components('
');\n * // Get current collection\n * const collection = component.components();\n * console.log(collection.length);\n * // -> 2\n */\n components(components) {\n const coll = this.get('components');\n\n if (isUndefined(components)) {\n return coll;\n } else {\n coll.reset();\n return components && this.append(components);\n }\n },\n\n /**\n * Get the parent component, if exists\n * @return {Component}\n * @example\n * component.parent();\n * // -> Component\n */\n parent() {\n const coll = this.collection;\n return coll && coll.parent;\n },\n\n /**\n * Script updated\n * @private\n */\n scriptUpdated() {\n this.set('scriptUpdated', 1);\n },\n\n /**\n * Init toolbar\n * @private\n */\n initToolbar() {\n const { em } = this;\n const model = this;\n const ppfx = (em && em.getConfig('stylePrefix')) || '';\n\n if (!model.get('toolbar')) {\n var tb = [];\n if (model.collection) {\n tb.push({\n attributes: { class: 'fa fa-arrow-up' },\n command: ed => ed.runCommand('core:component-exit', { force: 1 })\n });\n }\n if (model.get('draggable')) {\n tb.push({\n attributes: {\n class: `fa fa-arrows ${ppfx}no-touch-actions`,\n draggable: true\n },\n //events: hasDnd(this.em) ? { dragstart: 'execCommand' } : '',\n command: 'tlb-move'\n });\n }\n if (model.get('copyable')) {\n tb.push({\n attributes: { class: 'fa fa-clone' },\n command: 'tlb-clone'\n });\n }\n if (model.get('removable')) {\n tb.push({\n attributes: { class: 'fa fa-trash-o' },\n command: 'tlb-delete'\n });\n }\n model.set('toolbar', tb);\n }\n },\n\n /**\n * Load traits\n * @param {Array} traits\n * @private\n */\n loadTraits(traits, opts = {}) {\n traits = traits || this.get('traits');\n traits = isFunction(traits) ? traits(this) : traits;\n\n if (!(traits instanceof Traits)) {\n const trt = new Traits([], this.opt);\n trt.setTarget(this);\n\n if (traits.length) {\n traits.forEach(tr => tr.attributes && delete tr.attributes.value);\n trt.add(traits);\n }\n\n this.set('traits', trt, opts);\n }\n\n return this;\n },\n\n /**\n * Get the trait by id/name\n * @param {String} id The `id` or `name` of the trait\n * @return {Trait} Trait model\n * @example\n * const traitTitle = component.getTrait('title');\n * traitTitle && traitTitle.set('label', 'New label');\n */\n getTrait(id) {\n return this.get('traits').filter(trait => {\n return trait.get('id') === id || trait.get('name') === id;\n })[0];\n },\n\n /**\n * Update a trait\n * @param {String} id The `id` or `name` of the trait\n * @param {Object} props Object with the props to update\n * @return {this}\n * @example\n * component.updateTrait('title', {\n * type: 'select',\n * options: [ 'Option 1', 'Option 2' ],\n * });\n */\n updateTrait(id, props) {\n const { em } = this;\n const trait = this.getTrait(id);\n trait && trait.set(props);\n em && em.trigger('component:toggled');\n return this;\n },\n\n /**\n * Get the trait position index by id/name. Useful in case you want to\n * replace some trait, at runtime, with something else.\n * @param {String} id The `id` or `name` of the trait\n * @return {Number} Index position of the current trait\n * @example\n * const traitTitle = component.getTraitIndex('title');\n * console.log(traitTitle); // 1\n */\n getTraitIndex(id) {\n const trait = this.getTrait(id);\n return trait ? this.get('traits').indexOf(trait) : trait;\n },\n\n /**\n * Remove trait/s by id/s.\n * @param {String|Array} id The `id`/`name` of the trait (or an array)\n * @return {Array} Array of removed traits\n * @example\n * component.removeTrait('title');\n * component.removeTrait(['title', 'id']);\n */\n removeTrait(id) {\n const { em } = this;\n const ids = isArray(id) ? id : [id];\n const toRemove = ids.map(id => this.getTrait(id));\n const removed = this.get('traits').remove(toRemove);\n em && em.trigger('component:toggled');\n return removed;\n },\n\n /**\n * Add trait/s by id/s.\n * @param {String|Object|Array} trait Trait to add (or an array of traits)\n * @param {Options} opts Options for the add\n * @return {Array} Array of added traits\n * @example\n * component.addTrait('title', { at: 1 }); // Add title trait (`at` option is the position index)\n * component.addTrait({\n * type: 'checkbox',\n * name: 'disabled',\n * });\n * component.addTrait(['title', {...}, ...]);\n */\n addTrait(trait, opts = {}) {\n const { em } = this;\n const added = this.get('traits').add(trait, opts);\n em && em.trigger('component:toggled');\n return added;\n },\n\n /**\n * Normalize input classes from array to array of objects\n * @param {Array} arr\n * @return {Array}\n * @private\n */\n normalizeClasses(arr) {\n var res = [];\n const em = this.em;\n\n if (!em) return;\n\n var clm = em.get('SelectorManager');\n if (!clm) return;\n\n arr.forEach(val => {\n var name = '';\n\n if (typeof val === 'string') name = val;\n else name = val.name;\n\n var model = clm.add(name);\n res.push(model);\n });\n return res;\n },\n\n /**\n * Override original clone method\n * @private\n */\n clone() {\n const em = this.em;\n const style = this.getStyle();\n const attr = { ...this.attributes };\n const opts = { ...this.opt };\n attr.attributes = { ...attr.attributes };\n delete attr.attributes.id;\n attr.components = [];\n attr.classes = [];\n attr.traits = [];\n\n this.get('components').each((md, i) => {\n attr.components[i] = md.clone();\n });\n this.get('traits').each((md, i) => {\n attr.traits[i] = md.clone();\n });\n this.get('classes').each((md, i) => {\n attr.classes[i] = md.get('name');\n });\n\n attr.status = '';\n attr.view = '';\n opts.collection = null;\n\n if (em && em.getConfig('avoidInlineStyle') && !isEmpty(style)) {\n attr.style = style;\n }\n\n const cloned = new this.constructor(attr, opts);\n const event = 'component:clone';\n em && em.trigger(event, cloned);\n this.trigger(event, cloned);\n\n return cloned;\n },\n\n /**\n * Get the name of the component\n * @return {String}\n * */\n getName() {\n const { em } = this;\n const { type, tagName } = this.attributes;\n const customName = this.get('custom-name');\n const cName = this.get('name');\n let tag = tagName;\n tag = tag == 'div' ? 'box' : tag;\n let name = type || tag;\n name = name.charAt(0).toUpperCase() + name.slice(1);\n const i18nPfx = 'domComponents.names.';\n const i18nStr =\n em && (em.t(`${i18nPfx}${type}`) || em.t(`${i18nPfx}${tagName}`));\n return customName || i18nStr || cName || name;\n },\n\n /**\n * Get the icon string\n * @return {String}\n */\n getIcon() {\n let icon = this.get('icon');\n return icon ? icon + ' ' : '';\n },\n\n /**\n * Return HTML string of the component\n * @param {Object} [opts={}] Options\n * @param {String} [opts.tag] Custom tagName\n * @param {Object|Function} [opts.attributes=null] You can pass an object of custom attributes to replace\n * with the current one or you can even pass a function to generate attributes dynamically\n * @return {String} HTML string\n * @example\n * // Simple HTML return\n * component.set({ tagName: 'span' });\n * component.setAttributes({ title: 'Hello' });\n * component.toHTML();\n * // -> \n *\n * // Custom attributes\n * component.toHTML({ attributes: { 'data-test': 'Hello' } });\n * // -> \n *\n * // Custom dynamic attributes\n * component.toHTML({\n * attributes(component, attributes) {\n * if (component.get('tagName') == 'span') {\n * attributes.title = 'Custom attribute';\n * }\n * return attributes;\n * },\n * });\n * // -> \n */\n toHTML(opts = {}) {\n const model = this;\n const attrs = [];\n const customTag = opts.tag;\n const tag = customTag || model.get('tagName');\n const sTag = model.get('void');\n const customAttr = opts.attributes;\n let attributes = this.getAttrToHTML();\n delete opts.tag;\n\n // Get custom attributes if requested\n if (customAttr) {\n if (isFunction(customAttr)) {\n attributes = customAttr(model, attributes) || {};\n } else if (isObject(customAttr)) {\n attributes = customAttr;\n }\n }\n\n for (let attr in attributes) {\n const val = attributes[attr];\n const value = isString(val) ? val.replace(/\"/g, '"') : val;\n\n if (!isUndefined(value)) {\n if (isBoolean(value)) {\n value && attrs.push(attr);\n } else {\n attrs.push(`${attr}=\"${value}\"`);\n }\n }\n }\n\n let attrString = attrs.length ? ` ${attrs.join(' ')}` : '';\n let code = `<${tag}${attrString}${sTag ? '/' : ''}>${model.get(\n 'content'\n )}`;\n model.get('components').each(comp => (code += comp.toHTML(opts)));\n !sTag && (code += ``);\n\n return code;\n },\n\n /**\n * Returns object of attributes for HTML\n * @return {Object}\n * @private\n */\n getAttrToHTML() {\n var attr = this.getAttributes();\n delete attr.style;\n return attr;\n },\n\n /**\n * Return a shallow copy of the model's attributes for JSON\n * stringification.\n * @return {Object}\n * @private\n */\n toJSON(...args) {\n const obj = Backbone.Model.prototype.toJSON.apply(this, args);\n obj.attributes = this.getAttributes();\n delete obj.attributes.class;\n delete obj.toolbar;\n delete obj.traits;\n\n if (this.em.getConfig('avoidDefaults')) {\n const defaults = result(this, 'defaults');\n\n forEach(defaults, (value, key) => {\n if (['type', 'content'].indexOf(key) === -1 && obj[key] === value) {\n delete obj[key];\n }\n });\n\n if (isEmpty(obj.type)) {\n delete obj.type;\n }\n\n forEach(['attributes', 'style'], prop => {\n if (isEmpty(defaults[prop]) && isEmpty(obj[prop])) {\n delete obj[prop];\n }\n });\n\n forEach(['classes', 'components'], prop => {\n if (isEmpty(defaults[prop]) && !obj[prop].length) {\n delete obj[prop];\n }\n });\n }\n\n return obj;\n },\n\n /**\n * Return the component id\n * @return {String}\n */\n getId() {\n let attrs = this.get('attributes') || {};\n return attrs.id || this.ccid || this.cid;\n },\n\n /**\n * Set new id on the component\n * @param {String} id\n * @return {this}\n */\n setId(id, opts) {\n const attrs = { ...this.get('attributes') };\n attrs.id = id;\n this.set('attributes', attrs, opts);\n return this;\n },\n\n /**\n * Get the DOM element of the component.\n * This works only if the component is already rendered\n * @return {HTMLElement}\n */\n getEl() {\n return this.view && this.view.el;\n },\n\n /**\n * Get the View of the component.\n * This works only if the component is already rendered\n * @return {ComponentView}\n */\n getView() {\n return this.view;\n },\n\n /**\n * Return script in string format, cleans 'function() {..' from scripts\n * if it's a function\n * @param {string|Function} script\n * @return {string}\n * @private\n */\n getScriptString(script) {\n var scr = script || this.get('script');\n\n if (!scr) {\n return scr;\n }\n\n // Need to convert script functions to strings\n if (typeof scr == 'function') {\n var scrStr = scr.toString().trim();\n scrStr = scrStr\n .replace(/^function[\\s\\w]*\\(\\)\\s?\\{/, '')\n .replace(/\\}$/, '');\n scr = scrStr.trim();\n }\n\n var config = this.em.getConfig();\n var tagVarStart = escapeRegExp(config.tagVarStart || '{[ ');\n var tagVarEnd = escapeRegExp(config.tagVarEnd || ' ]}');\n var reg = new RegExp(`${tagVarStart}([\\\\w\\\\d-]*)${tagVarEnd}`, 'g');\n scr = scr.replace(reg, (match, v) => {\n // If at least one match is found I have to track this change for a\n // better optimization inside JS generator\n this.scriptUpdated();\n const result = this.attributes[v] || '';\n return isArray(result) || typeof result == 'object'\n ? JSON.stringify(result)\n : result;\n });\n\n return scr;\n },\n\n emitUpdate(property, ...args) {\n const em = this.em;\n const event = 'component:update' + (property ? `:${property}` : '');\n property &&\n this.updated(\n property,\n property && this.get(property),\n property && this.previous(property),\n ...args\n );\n this.trigger(event, ...args);\n em && em.trigger(event, this, ...args);\n },\n\n /**\n * Execute callback function on itself and all inner components\n * @param {Function} clb Callback function, the model is passed as an argument\n * @return {this}\n * @example\n * component.onAll(component => {\n * // do something with component\n * })\n */\n onAll(clb) {\n if (isFunction(clb)) {\n clb(this);\n this.components().forEach(model => model.onAll(clb));\n }\n return this;\n },\n\n /**\n * Remove the component\n * @return {this}\n */\n remove() {\n const coll = this.collection;\n return coll && coll.remove(this);\n },\n\n /**\n * Reset id of the component and any of its style rule\n * @param {Object} [opts={}] Options\n * @return {this}\n * @private\n */\n resetId(opts = {}) {\n const { em } = this;\n const oldId = this.getId();\n if (!oldId) return;\n const newId = Component.createId(this);\n this.setId(newId);\n const rule = em && em.get('CssComposer').getIdRule(oldId);\n const selector = rule && rule.get('selectors').at(0);\n selector && selector.set('name', newId);\n return this;\n },\n\n _getStyleRule({ id } = {}) {\n const { em } = this;\n const idS = id || this.getId();\n return em && em.get('CssComposer').getIdRule(idS);\n },\n\n _getStyleSelector(opts) {\n const rule = this._getStyleRule(opts);\n return rule && rule.get('selectors').at(0);\n },\n\n _idUpdated(m, v, opts = {}) {\n if (opts.idUpdate) return;\n\n const { ccid } = this;\n const { id } = this.get('attributes') || {};\n const idPrev = (this.previous('attributes') || {}).id || ccid;\n const list = Component.getList(this);\n\n // If the ID already exists I need to rollback to the old one\n if (list[id]) {\n return this.setId(idPrev, { idUpdate: 1 });\n }\n\n // Remove the old ID reference and add the new one\n delete list[idPrev];\n list[id] = this;\n this.ccid = id;\n\n // Update the style selector name\n const selector = this._getStyleSelector({ id: idPrev });\n selector && selector.set({ name: id, label: id });\n }\n },\n {\n /**\n * Detect if the passed element is a valid component.\n * In case the element is valid an object abstracted\n * from the element will be returned\n * @param {HTMLElement}\n * @return {Object}\n * @private\n */\n isComponent(el) {\n return { tagName: el.tagName ? el.tagName.toLowerCase() : '' };\n },\n\n /**\n * Relying simply on the number of components becomes a problem when you\n * store and load them back, you might hit collisions with new components\n * @param {Model} model\n * @return {string}\n * @private\n */\n createId(model) {\n const list = Component.getList(model);\n let { id } = model.get('attributes');\n let nextId;\n\n if (id) {\n nextId = Component.getIncrementId(id, list);\n model.setId(nextId);\n } else {\n nextId = Component.getNewId(list);\n }\n\n list[nextId] = model;\n return nextId;\n },\n\n getNewId(list) {\n const count = Object.keys(list).length;\n // Testing 1000000 components with `+ 2` returns 0 collisions\n const ilen = count.toString().length + 2;\n const uid = (Math.random() + 1.1).toString(36).slice(-ilen);\n let newId = `i${uid}`;\n\n while (list[newId]) {\n newId = Component.getNewId(list);\n }\n\n return newId;\n },\n\n getIncrementId(id, list) {\n let counter = 1;\n let newId = id;\n\n while (list[newId]) {\n counter++;\n newId = `${id}-${counter}`;\n }\n\n return newId;\n },\n\n /**\n * The list of components is taken from the Components module.\n * Initially, the list, was set statically on the Component object but it was\n * not ok, as it was shared between multiple editor instances\n */\n getList(model) {\n const domc = model.opt && model.opt.domc;\n return domc ? domc.componentsById : {};\n },\n\n /**\n * This method checks, for each parsed component and style object\n * (are not Components/CSSRules yet), for duplicated id and fixes them\n * This method is used in Components.js just after the parsing\n */\n checkId(components, styles = [], list = {}) {\n const comps = isArray(components) ? components : [components];\n comps.forEach(comp => {\n const { attributes = {}, components } = comp;\n const { id } = attributes;\n\n // Check if we have collisions with current components\n if (id && list[id]) {\n const newId = Component.getIncrementId(id, list);\n attributes.id = newId;\n // Update passed styles\n isArray(styles) &&\n styles.forEach(style => {\n const { selectors } = style;\n selectors.forEach((sel, idx) => {\n if (sel === `#${id}`) selectors[idx] = `#${newId}`;\n });\n });\n }\n\n components && Component.checkId(components, styles, list);\n });\n }\n }\n);\n\nexport default Component;\n","import Backbone from 'backbone';\nimport { isArray, isEmpty, each, keys } from 'underscore';\nimport Components from '../model/Components';\nimport ComponentsView from './ComponentsView';\nimport Selectors from 'selector_manager/model/Selectors';\nimport { replaceWith } from 'utils/dom';\n\nexport default Backbone.View.extend({\n className() {\n return this.getClasses();\n },\n\n tagName() {\n return this.model.get('tagName');\n },\n\n initialize(opt = {}) {\n const model = this.model;\n const config = opt.config || {};\n const em = config.em;\n const modelOpt = model.opt || {};\n const { $el } = this;\n const { draggableComponents } = config;\n this.opts = opt;\n this.modelOpt = modelOpt;\n this.config = config;\n this.em = em || '';\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.attr = model.get('attributes');\n this.classe = this.attr.class || [];\n this.listenTo(model, 'change:style', this.updateStyle);\n this.listenTo(model, 'change:attributes', this.renderAttributes);\n this.listenTo(model, 'change:highlightable', this.updateHighlight);\n this.listenTo(model, 'change:status', this.updateStatus);\n this.listenTo(model, 'change:script', this.reset);\n this.listenTo(model, 'change:content', this.updateContent);\n this.listenTo(model, 'change', this.handleChange);\n this.listenTo(model, 'active', this.onActive);\n this.listenTo(model, 'disable', this.onDisable);\n $el.data('model', model);\n model.view = this;\n this.initClasses();\n this.initComponents({ avoidRender: 1 });\n this.events = {\n ...this.events,\n ...(draggableComponents && { dragstart: 'handleDragStart' })\n };\n this.delegateEvents();\n !modelOpt.temporary && this.init(this._clbObj());\n },\n\n _clbObj() {\n const { em, model, el } = this;\n return {\n editor: em && em.getEditor(),\n model,\n el\n };\n },\n\n /**\n * Initialize callback\n */\n init() {},\n\n /**\n * Remove callback\n */\n removed() {},\n\n /**\n * Callback executed when the `active` event is triggered on component\n */\n onActive() {},\n\n /**\n * Callback executed when the `disable` event is triggered on component\n */\n onDisable() {},\n\n remove() {\n Backbone.View.prototype.remove.apply(this, arguments);\n this.removed(this._clbObj());\n return this;\n },\n\n handleDragStart(event) {\n event.preventDefault();\n event.stopPropagation();\n this.em.get('Commands').run('tlb-move', {\n target: this.model,\n event\n });\n },\n\n initClasses() {\n const { model } = this;\n const event = 'change:classes';\n const classes = model.get('classes');\n\n if (classes instanceof Selectors) {\n this.stopListening(model, event, this.initClasses);\n this.listenTo(model, event, this.initClasses);\n this.listenTo(classes, 'add remove change', this.updateClasses);\n classes.length && this.importClasses();\n }\n },\n\n initComponents(opts = {}) {\n const { model, $el, childrenView } = this;\n const event = 'change:components';\n const comps = model.get('components');\n const toListen = [model, event, this.initComponents];\n\n if (comps instanceof Components) {\n $el.data('collection', comps);\n childrenView && childrenView.remove();\n this.stopListening(...toListen);\n !opts.avoidRender && this.renderChildren();\n this.listenTo(...toListen);\n }\n },\n\n /**\n * Handle any property change\n * @private\n */\n handleChange() {\n const model = this.model;\n model.emitUpdate();\n\n for (let prop in model.changed) {\n model.emitUpdate(prop);\n }\n },\n\n /**\n * Import, if possible, classes inside main container\n * @private\n * */\n importClasses() {\n var clm = this.config.em.get('SelectorManager');\n\n if (clm) {\n this.model.get('classes').each(m => {\n clm.add(m.get('name'));\n });\n }\n },\n\n /**\n * Update item on status change\n * @param {Event} e\n * @private\n * */\n updateStatus(opts = {}) {\n const em = this.em;\n const el = this.el;\n const status = this.model.get('status');\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const selectedCls = `${pfx}selected`;\n const selectedParentCls = `${selectedCls}-parent`;\n const freezedCls = `${ppfx}freezed`;\n const hoveredCls = `${ppfx}hovered`;\n const toRemove = [selectedCls, selectedParentCls, freezedCls, hoveredCls];\n this.$el.removeClass(toRemove.join(' '));\n var actualCls = el.getAttribute('class') || '';\n var cls = '';\n\n switch (status) {\n case 'selected':\n cls = `${actualCls} ${selectedCls}`;\n break;\n case 'selected-parent':\n cls = `${actualCls} ${selectedParentCls}`;\n break;\n case 'freezed':\n cls = `${actualCls} ${freezedCls}`;\n break;\n case 'freezed-selected':\n cls = `${actualCls} ${freezedCls} ${selectedCls}`;\n break;\n case 'hovered':\n cls = !opts.avoidHover ? `${actualCls} ${hoveredCls}` : '';\n break;\n }\n\n cls = cls.trim();\n cls && el.setAttribute('class', cls);\n },\n\n /**\n * Update highlight attribute\n * @private\n * */\n updateHighlight() {\n const hl = this.model.get('highlightable');\n this.setAttribute('data-highlightable', hl ? 1 : '');\n },\n\n /**\n * Update style attribute\n * @private\n * */\n updateStyle() {\n const em = this.em;\n const model = this.model;\n\n if (em && em.getConfig('avoidInlineStyle')) {\n this.el.id = model.getId();\n const style = model.getStyle();\n !isEmpty(style) && model.setStyle(style);\n } else {\n this.setAttribute('style', model.styleToString());\n }\n },\n\n /**\n * Update classe attribute\n * @private\n * */\n updateClasses() {\n const str = this.model\n .get('classes')\n .pluck('name')\n .join(' ');\n this.setAttribute('class', str);\n\n // Regenerate status class\n this.updateStatus();\n },\n\n /**\n * Update single attribute\n * @param {[type]} name [description]\n * @param {[type]} value [description]\n */\n setAttribute(name, value) {\n const el = this.$el;\n value ? el.attr(name, value) : el.removeAttr(name);\n },\n\n /**\n * Get classes from attributes.\n * This method is called before initialize\n *\n * @return {Array}|null\n * @private\n * */\n getClasses() {\n return this.model.getClasses().join(' ');\n },\n\n /**\n * Update attributes\n * @private\n * */\n updateAttributes() {\n const attrs = [];\n const { model, $el, el, config } = this;\n const { highlightable, textable, type } = model.attributes;\n const { draggableComponents } = config;\n\n const defaultAttr = {\n 'data-gjs-type': type || 'default',\n ...(draggableComponents ? { draggable: true } : {}),\n ...(highlightable ? { 'data-highlightable': 1 } : {}),\n ...(textable\n ? {\n contenteditable: 'false',\n 'data-gjs-textable': 'true'\n }\n : {})\n };\n\n // Remove all current attributes\n each(el.attributes, attr => attrs.push(attr.nodeName));\n attrs.forEach(attr => $el.removeAttr(attr));\n const attr = {\n ...defaultAttr,\n ...model.getAttributes()\n };\n\n // Remove all `false` attributes\n keys(attr).forEach(key => attr[key] === false && delete attr[key]);\n\n $el.attr(attr);\n this.updateStyle();\n },\n\n /**\n * Update component content\n * @private\n * */\n updateContent() {\n this.getChildrenContainer().innerHTML = this.model.get('content');\n },\n\n /**\n * Prevent default helper\n * @param {Event} e\n * @private\n */\n prevDef(e) {\n e.preventDefault();\n },\n\n /**\n * Render component's script\n * @private\n */\n updateScript() {\n const { model, em } = this;\n if (!model.get('script')) return;\n em &&\n em\n .get('Canvas')\n .getCanvasView()\n .updateScript(this);\n },\n\n /**\n * Return children container\n * Differently from a simple component where children container is the\n * component itself\n * \n * \n * \n * You could have the children container more deeper\n * \n *
\n *
\n *
\n *
\n * \n *
\n *
\n *
\n * @return HTMLElement\n * @private\n */\n getChildrenContainer() {\n var container = this.el;\n\n if (typeof this.getChildrenSelector == 'function') {\n container = this.el.querySelector(this.getChildrenSelector());\n } else if (typeof this.getTemplate == 'function') {\n // Need to find deepest first child\n }\n\n return container;\n },\n\n /**\n * Recreate the element of the view\n */\n reset() {\n const { el, model } = this;\n const collection = model.components();\n this.el = '';\n this._ensureElement();\n this.$el.data({ model, collection });\n replaceWith(el, this.el);\n this.render();\n },\n\n /**\n * Render children components\n * @private\n */\n renderChildren() {\n this.updateContent();\n const container = this.getChildrenContainer();\n const view = new ComponentsView({\n collection: this.model.get('components'),\n config: this.config,\n componentTypes: this.opts.componentTypes\n });\n\n view.render(container);\n this.childrenView = view;\n const childNodes = Array.prototype.slice.call(view.el.childNodes);\n\n for (var i = 0, len = childNodes.length; i < len; i++) {\n container.appendChild(childNodes.shift());\n }\n },\n\n renderAttributes() {\n this.updateAttributes();\n this.updateClasses();\n },\n\n render() {\n this.renderAttributes();\n if (this.modelOpt.temporary) return this;\n this.renderChildren();\n this.updateScript();\n this.postRender();\n\n return this;\n },\n\n postRender() {\n const { em, model, modelOpt } = this;\n\n if (!modelOpt.temporary) {\n this.onRender(this._clbObj());\n em && em.trigger('component:mount', model);\n }\n },\n\n onRender() {}\n});\n","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","import Backbone from 'backbone';\n\nconst TYPE_CLASS = 1;\nconst TYPE_ID = 2;\n\nconst Selector = Backbone.Model.extend(\n {\n idAttribute: 'name',\n\n defaults: {\n name: '',\n\n label: '',\n\n // Type of the selector\n type: TYPE_CLASS,\n\n // If not active it's not selectable by the style manager (uncheckboxed)\n active: true,\n\n // Can't be seen by the style manager, therefore even by the user\n // Will be rendered only in export code\n private: false,\n\n // If true, can't be removed from the attacched element\n protected: false\n },\n\n initialize(props, opts = {}) {\n const { config = {} } = opts;\n const name = this.get('name');\n const label = this.get('label');\n\n if (!name) {\n this.set('name', label);\n } else if (!label) {\n this.set('label', name);\n }\n\n const namePreEsc = this.get('name');\n const { escapeName } = config;\n const nameEsc = escapeName\n ? escapeName(namePreEsc)\n : Selector.escapeName(namePreEsc);\n this.set('name', nameEsc);\n },\n\n /**\n * Get full selector name\n * @return {string}\n */\n getFullName() {\n let init = '';\n\n switch (this.get('type')) {\n case TYPE_CLASS:\n init = '.';\n break;\n case TYPE_ID:\n init = '#';\n break;\n }\n\n return init + this.get('name');\n }\n },\n {\n // All type selectors: https://developer.mozilla.org/it/docs/Web/CSS/CSS_Selectors\n // Here I define only what I need\n TYPE_CLASS,\n\n TYPE_ID,\n\n /**\n * Escape string\n * @param {string} name\n * @return {string}\n * @private\n */\n escapeName(name) {\n return `${name}`.trim().replace(/([^a-z0-9\\w-\\:]+)/gi, '-');\n }\n }\n);\n\nexport default Selector;\n","import { filter } from 'underscore';\nimport Backbone from 'backbone';\nimport Selector from './Selector';\n\nexport default Backbone.Collection.extend({\n model: Selector,\n\n modelId: attr => `${attr.name}_${attr.type || Selector.TYPE_CLASS}`,\n\n getStyleable() {\n return filter(\n this.models,\n item => item.get('active') && !item.get('private')\n );\n },\n\n getValid({ noDisabled } = {}) {\n return filter(this.models, item => !item.get('private')).filter(item =>\n noDisabled ? item.get('active') : 1\n );\n },\n\n getFullString(collection) {\n const result = [];\n const coll = collection || this;\n coll.forEach(selector => result.push(selector.getFullName()));\n return result.join('').trim();\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// This is CodeMirror (https://codemirror.net), a code editor\n// implemented in JavaScript on top of the browser's DOM.\n//\n// You can find some technical background for some of the code below\n// at http://marijnhaverbeke.nl/blog/#cm-internals .\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.CodeMirror = factory());\n}(this, (function () { 'use strict';\n\n // Kludges for bugs and behavior differences that can't be feature\n // detected are enabled based on userAgent etc sniffing.\n var userAgent = navigator.userAgent;\n var platform = navigator.platform;\n\n var gecko = /gecko\\/\\d/i.test(userAgent);\n var ie_upto10 = /MSIE \\d/.test(userAgent);\n var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(userAgent);\n var edge = /Edge\\/(\\d+)/.exec(userAgent);\n var ie = ie_upto10 || ie_11up || edge;\n var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);\n var webkit = !edge && /WebKit\\//.test(userAgent);\n var qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(userAgent);\n var chrome = !edge && /Chrome\\//.test(userAgent);\n var presto = /Opera\\//.test(userAgent);\n var safari = /Apple Computer/.test(navigator.vendor);\n var mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(userAgent);\n var phantom = /PhantomJS/.test(userAgent);\n\n var ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\\/\\w+/.test(userAgent);\n var android = /Android/.test(userAgent);\n // This is woefully incomplete. Suggestions for alternative methods welcome.\n var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);\n var mac = ios || /Mac/.test(platform);\n var chromeOS = /\\bCrOS\\b/.test(userAgent);\n var windows = /win/i.test(platform);\n\n var presto_version = presto && userAgent.match(/Version\\/(\\d*\\.\\d*)/);\n if (presto_version) { presto_version = Number(presto_version[1]); }\n if (presto_version && presto_version >= 15) { presto = false; webkit = true; }\n // Some browsers use the wrong event properties to signal cmd/ctrl on OS X\n var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));\n var captureRightClick = gecko || (ie && ie_version >= 9);\n\n function classTest(cls) { return new RegExp(\"(^|\\\\s)\" + cls + \"(?:$|\\\\s)\\\\s*\") }\n\n var rmClass = function(node, cls) {\n var current = node.className;\n var match = classTest(cls).exec(current);\n if (match) {\n var after = current.slice(match.index + match[0].length);\n node.className = current.slice(0, match.index) + (after ? match[1] + after : \"\");\n }\n };\n\n function removeChildren(e) {\n for (var count = e.childNodes.length; count > 0; --count)\n { e.removeChild(e.firstChild); }\n return e\n }\n\n function removeChildrenAndAdd(parent, e) {\n return removeChildren(parent).appendChild(e)\n }\n\n function elt(tag, content, className, style) {\n var e = document.createElement(tag);\n if (className) { e.className = className; }\n if (style) { e.style.cssText = style; }\n if (typeof content == \"string\") { e.appendChild(document.createTextNode(content)); }\n else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }\n return e\n }\n // wrapper for elt, which removes the elt from the accessibility tree\n function eltP(tag, content, className, style) {\n var e = elt(tag, content, className, style);\n e.setAttribute(\"role\", \"presentation\");\n return e\n }\n\n var range;\n if (document.createRange) { range = function(node, start, end, endNode) {\n var r = document.createRange();\n r.setEnd(endNode || node, end);\n r.setStart(node, start);\n return r\n }; }\n else { range = function(node, start, end) {\n var r = document.body.createTextRange();\n try { r.moveToElementText(node.parentNode); }\n catch(e) { return r }\n r.collapse(true);\n r.moveEnd(\"character\", end);\n r.moveStart(\"character\", start);\n return r\n }; }\n\n function contains(parent, child) {\n if (child.nodeType == 3) // Android browser always returns false when child is a textnode\n { child = child.parentNode; }\n if (parent.contains)\n { return parent.contains(child) }\n do {\n if (child.nodeType == 11) { child = child.host; }\n if (child == parent) { return true }\n } while (child = child.parentNode)\n }\n\n function activeElt() {\n // IE and Edge may throw an \"Unspecified Error\" when accessing document.activeElement.\n // IE < 10 will throw when accessed while the page is loading or in an iframe.\n // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.\n var activeElement;\n try {\n activeElement = document.activeElement;\n } catch(e) {\n activeElement = document.body || null;\n }\n while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)\n { activeElement = activeElement.shadowRoot.activeElement; }\n return activeElement\n }\n\n function addClass(node, cls) {\n var current = node.className;\n if (!classTest(cls).test(current)) { node.className += (current ? \" \" : \"\") + cls; }\n }\n function joinClasses(a, b) {\n var as = a.split(\" \");\n for (var i = 0; i < as.length; i++)\n { if (as[i] && !classTest(as[i]).test(b)) { b += \" \" + as[i]; } }\n return b\n }\n\n var selectInput = function(node) { node.select(); };\n if (ios) // Mobile Safari apparently has a bug where select() is broken.\n { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }\n else if (ie) // Suppress mysterious IE10 errors\n { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }\n\n function bind(f) {\n var args = Array.prototype.slice.call(arguments, 1);\n return function(){return f.apply(null, args)}\n }\n\n function copyObj(obj, target, overwrite) {\n if (!target) { target = {}; }\n for (var prop in obj)\n { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))\n { target[prop] = obj[prop]; } }\n return target\n }\n\n // Counts the column offset in a string, taking tabs into account.\n // Used mostly to find indentation.\n function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n }\n\n var Delayed = function() {\n this.id = null;\n this.f = null;\n this.time = 0;\n this.handler = bind(this.onTimeout, this);\n };\n Delayed.prototype.onTimeout = function (self) {\n self.id = 0;\n if (self.time <= +new Date) {\n self.f();\n } else {\n setTimeout(self.handler, self.time - +new Date);\n }\n };\n Delayed.prototype.set = function (ms, f) {\n this.f = f;\n var time = +new Date + ms;\n if (!this.id || time < this.time) {\n clearTimeout(this.id);\n this.id = setTimeout(this.handler, ms);\n this.time = time;\n }\n };\n\n function indexOf(array, elt) {\n for (var i = 0; i < array.length; ++i)\n { if (array[i] == elt) { return i } }\n return -1\n }\n\n // Number of pixels added to scroller and sizer to hide scrollbar\n var scrollerGap = 30;\n\n // Returned or thrown by various protocols to signal 'I'm not\n // handling this'.\n var Pass = {toString: function(){return \"CodeMirror.Pass\"}};\n\n // Reused option objects for setSelection & friends\n var sel_dontScroll = {scroll: false}, sel_mouse = {origin: \"*mouse\"}, sel_move = {origin: \"+move\"};\n\n // The inverse of countColumn -- find the offset that corresponds to\n // a particular column.\n function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }\n\n var spaceStrs = [\"\"];\n function spaceStr(n) {\n while (spaceStrs.length <= n)\n { spaceStrs.push(lst(spaceStrs) + \" \"); }\n return spaceStrs[n]\n }\n\n function lst(arr) { return arr[arr.length-1] }\n\n function map(array, f) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }\n return out\n }\n\n function insertSorted(array, value, score) {\n var pos = 0, priority = score(value);\n while (pos < array.length && score(array[pos]) <= priority) { pos++; }\n array.splice(pos, 0, value);\n }\n\n function nothing() {}\n\n function createObj(base, props) {\n var inst;\n if (Object.create) {\n inst = Object.create(base);\n } else {\n nothing.prototype = base;\n inst = new nothing();\n }\n if (props) { copyObj(props, inst); }\n return inst\n }\n\n var nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\n function isWordCharBasic(ch) {\n return /\\w/.test(ch) || ch > \"\\x80\" &&\n (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))\n }\n function isWordChar(ch, helper) {\n if (!helper) { return isWordCharBasic(ch) }\n if (helper.source.indexOf(\"\\\\w\") > -1 && isWordCharBasic(ch)) { return true }\n return helper.test(ch)\n }\n\n function isEmpty(obj) {\n for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } }\n return true\n }\n\n // Extending unicode characters. A series of a non-extending char +\n // any number of extending chars is treated as a single unit as far\n // as editing and measuring is concerned. This is not fully correct,\n // since some scripts/fonts/browsers also treat other configurations\n // of code points as a group.\n var extendingChars = /[\\u0300-\\u036f\\u0483-\\u0489\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u065e\\u0670\\u06d6-\\u06dc\\u06de-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07eb-\\u07f3\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0900-\\u0902\\u093c\\u0941-\\u0948\\u094d\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09bc\\u09be\\u09c1-\\u09c4\\u09cd\\u09d7\\u09e2\\u09e3\\u0a01\\u0a02\\u0a3c\\u0a41\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a70\\u0a71\\u0a75\\u0a81\\u0a82\\u0abc\\u0ac1-\\u0ac5\\u0ac7\\u0ac8\\u0acd\\u0ae2\\u0ae3\\u0b01\\u0b3c\\u0b3e\\u0b3f\\u0b41-\\u0b44\\u0b4d\\u0b56\\u0b57\\u0b62\\u0b63\\u0b82\\u0bbe\\u0bc0\\u0bcd\\u0bd7\\u0c3e-\\u0c40\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0cbc\\u0cbf\\u0cc2\\u0cc6\\u0ccc\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0d3e\\u0d41-\\u0d44\\u0d4d\\u0d57\\u0d62\\u0d63\\u0dca\\u0dcf\\u0dd2-\\u0dd4\\u0dd6\\u0ddf\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0eb1\\u0eb4-\\u0eb9\\u0ebb\\u0ebc\\u0ec8-\\u0ecd\\u0f18\\u0f19\\u0f35\\u0f37\\u0f39\\u0f71-\\u0f7e\\u0f80-\\u0f84\\u0f86\\u0f87\\u0f90-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102d-\\u1030\\u1032-\\u1037\\u1039\\u103a\\u103d\\u103e\\u1058\\u1059\\u105e-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108d\\u109d\\u135f\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b7-\\u17bd\\u17c6\\u17c9-\\u17d3\\u17dd\\u180b-\\u180d\\u18a9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193b\\u1a17\\u1a18\\u1a56\\u1a58-\\u1a5e\\u1a60\\u1a62\\u1a65-\\u1a6c\\u1a73-\\u1a7c\\u1a7f\\u1b00-\\u1b03\\u1b34\\u1b36-\\u1b3a\\u1b3c\\u1b42\\u1b6b-\\u1b73\\u1b80\\u1b81\\u1ba2-\\u1ba5\\u1ba8\\u1ba9\\u1c2c-\\u1c33\\u1c36\\u1c37\\u1cd0-\\u1cd2\\u1cd4-\\u1ce0\\u1ce2-\\u1ce8\\u1ced\\u1dc0-\\u1de6\\u1dfd-\\u1dff\\u200c\\u200d\\u20d0-\\u20f0\\u2cef-\\u2cf1\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua66f-\\ua672\\ua67c\\ua67d\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua825\\ua826\\ua8c4\\ua8e0-\\ua8f1\\ua926-\\ua92d\\ua947-\\ua951\\ua980-\\ua982\\ua9b3\\ua9b6-\\ua9b9\\ua9bc\\uaa29-\\uaa2e\\uaa31\\uaa32\\uaa35\\uaa36\\uaa43\\uaa4c\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uabe5\\uabe8\\uabed\\udc00-\\udfff\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe26\\uff9e\\uff9f]/;\n function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }\n\n // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.\n function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n }\n\n // Returns the value from the range [`from`; `to`] that satisfies\n // `pred` and is closest to `from`. Assumes that at least `to`\n // satisfies `pred`. Supports `from` being greater than `to`.\n function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n }\n\n // BIDI HELPERS\n\n function iterateBidiSections(order, from, to, f) {\n if (!order) { return f(from, to, \"ltr\", 0) }\n var found = false;\n for (var i = 0; i < order.length; ++i) {\n var part = order[i];\n if (part.from < to && part.to > from || from == to && part.to == from) {\n f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? \"rtl\" : \"ltr\", i);\n found = true;\n }\n }\n if (!found) { f(from, to, \"ltr\"); }\n }\n\n var bidiOther = null;\n function getBidiPartAt(order, ch, sticky) {\n var found;\n bidiOther = null;\n for (var i = 0; i < order.length; ++i) {\n var cur = order[i];\n if (cur.from < ch && cur.to > ch) { return i }\n if (cur.to == ch) {\n if (cur.from != cur.to && sticky == \"before\") { found = i; }\n else { bidiOther = i; }\n }\n if (cur.from == ch) {\n if (cur.from != cur.to && sticky != \"before\") { found = i; }\n else { bidiOther = i; }\n }\n }\n return found != null ? found : bidiOther\n }\n\n // Bidirectional ordering algorithm\n // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm\n // that this (partially) implements.\n\n // One-char codes used for character types:\n // L (L): Left-to-Right\n // R (R): Right-to-Left\n // r (AL): Right-to-Left Arabic\n // 1 (EN): European Number\n // + (ES): European Number Separator\n // % (ET): European Number Terminator\n // n (AN): Arabic Number\n // , (CS): Common Number Separator\n // m (NSM): Non-Spacing Mark\n // b (BN): Boundary Neutral\n // s (B): Paragraph Separator\n // t (S): Segment Separator\n // w (WS): Whitespace\n // N (ON): Other Neutrals\n\n // Returns null if characters are ordered as they appear\n // (left-to-right), or an array of sections ({from, to, level}\n // objects) in the order in which they occur visually.\n var bidiOrdering = (function() {\n // Character types for codepoints 0 to 0xff\n var lowTypes = \"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN\";\n // Character types for codepoints 0x600 to 0x6f9\n var arabicTypes = \"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111\";\n function charType(code) {\n if (code <= 0xf7) { return lowTypes.charAt(code) }\n else if (0x590 <= code && code <= 0x5f4) { return \"R\" }\n else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }\n else if (0x6ee <= code && code <= 0x8ac) { return \"r\" }\n else if (0x2000 <= code && code <= 0x200b) { return \"w\" }\n else if (code == 0x200c) { return \"b\" }\n else { return \"L\" }\n }\n\n var bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;\n\n function BidiSpan(level, from, to) {\n this.level = level;\n this.from = from; this.to = to;\n }\n\n return function(str, direction) {\n var outerType = direction == \"ltr\" ? \"L\" : \"R\";\n\n if (str.length == 0 || direction == \"ltr\" && !bidiRE.test(str)) { return false }\n var len = str.length, types = [];\n for (var i = 0; i < len; ++i)\n { types.push(charType(str.charCodeAt(i))); }\n\n // W1. Examine each non-spacing mark (NSM) in the level run, and\n // change the type of the NSM to the type of the previous\n // character. If the NSM is at the start of the level run, it will\n // get the type of sor.\n for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {\n var type = types[i$1];\n if (type == \"m\") { types[i$1] = prev; }\n else { prev = type; }\n }\n\n // W2. Search backwards from each instance of a European number\n // until the first strong type (R, L, AL, or sor) is found. If an\n // AL is found, change the type of the European number to Arabic\n // number.\n // W3. Change all ALs to R.\n for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {\n var type$1 = types[i$2];\n if (type$1 == \"1\" && cur == \"r\") { types[i$2] = \"n\"; }\n else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == \"r\") { types[i$2] = \"R\"; } }\n }\n\n // W4. A single European separator between two European numbers\n // changes to a European number. A single common separator between\n // two numbers of the same type changes to that type.\n for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {\n var type$2 = types[i$3];\n if (type$2 == \"+\" && prev$1 == \"1\" && types[i$3+1] == \"1\") { types[i$3] = \"1\"; }\n else if (type$2 == \",\" && prev$1 == types[i$3+1] &&\n (prev$1 == \"1\" || prev$1 == \"n\")) { types[i$3] = prev$1; }\n prev$1 = type$2;\n }\n\n // W5. A sequence of European terminators adjacent to European\n // numbers changes to all European numbers.\n // W6. Otherwise, separators and terminators change to Other\n // Neutral.\n for (var i$4 = 0; i$4 < len; ++i$4) {\n var type$3 = types[i$4];\n if (type$3 == \",\") { types[i$4] = \"N\"; }\n else if (type$3 == \"%\") {\n var end = (void 0);\n for (end = i$4 + 1; end < len && types[end] == \"%\"; ++end) {}\n var replace = (i$4 && types[i$4-1] == \"!\") || (end < len && types[end] == \"1\") ? \"1\" : \"N\";\n for (var j = i$4; j < end; ++j) { types[j] = replace; }\n i$4 = end - 1;\n }\n }\n\n // W7. Search backwards from each instance of a European number\n // until the first strong type (R, L, or sor) is found. If an L is\n // found, then change the type of the European number to L.\n for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {\n var type$4 = types[i$5];\n if (cur$1 == \"L\" && type$4 == \"1\") { types[i$5] = \"L\"; }\n else if (isStrong.test(type$4)) { cur$1 = type$4; }\n }\n\n // N1. A sequence of neutrals takes the direction of the\n // surrounding strong text if the text on both sides has the same\n // direction. European and Arabic numbers act as if they were R in\n // terms of their influence on neutrals. Start-of-level-run (sor)\n // and end-of-level-run (eor) are used at level run boundaries.\n // N2. Any remaining neutrals take the embedding direction.\n for (var i$6 = 0; i$6 < len; ++i$6) {\n if (isNeutral.test(types[i$6])) {\n var end$1 = (void 0);\n for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}\n var before = (i$6 ? types[i$6-1] : outerType) == \"L\";\n var after = (end$1 < len ? types[end$1] : outerType) == \"L\";\n var replace$1 = before == after ? (before ? \"L\" : \"R\") : outerType;\n for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }\n i$6 = end$1 - 1;\n }\n }\n\n // Here we depart from the documented algorithm, in order to avoid\n // building up an actual levels array. Since there are only three\n // levels (0, 1, 2) in an implementation that doesn't take\n // explicit embedding into account, we can build up the order on\n // the fly, without following the level-based algorithm.\n var order = [], m;\n for (var i$7 = 0; i$7 < len;) {\n if (countsAsLeft.test(types[i$7])) {\n var start = i$7;\n for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}\n order.push(new BidiSpan(0, start, i$7));\n } else {\n var pos = i$7, at = order.length;\n for (++i$7; i$7 < len && types[i$7] != \"L\"; ++i$7) {}\n for (var j$2 = pos; j$2 < i$7;) {\n if (countsAsNum.test(types[j$2])) {\n if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); }\n var nstart = j$2;\n for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}\n order.splice(at, 0, new BidiSpan(2, nstart, j$2));\n pos = j$2;\n } else { ++j$2; }\n }\n if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }\n }\n }\n if (direction == \"ltr\") {\n if (order[0].level == 1 && (m = str.match(/^\\s+/))) {\n order[0].from = m[0].length;\n order.unshift(new BidiSpan(0, 0, m[0].length));\n }\n if (lst(order).level == 1 && (m = str.match(/\\s+$/))) {\n lst(order).to -= m[0].length;\n order.push(new BidiSpan(0, len - m[0].length, len));\n }\n }\n\n return direction == \"rtl\" ? order.reverse() : order\n }\n })();\n\n // Get the bidi ordering for the given line (and cache it). Returns\n // false for lines that are fully left-to-right, and an array of\n // BidiSpan objects otherwise.\n function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n }\n\n // EVENT HANDLING\n\n // Lightweight event framework. on/off also work on DOM nodes,\n // registering native DOM handlers.\n\n var noHandlers = [];\n\n var on = function(emitter, type, f) {\n if (emitter.addEventListener) {\n emitter.addEventListener(type, f, false);\n } else if (emitter.attachEvent) {\n emitter.attachEvent(\"on\" + type, f);\n } else {\n var map$$1 = emitter._handlers || (emitter._handlers = {});\n map$$1[type] = (map$$1[type] || noHandlers).concat(f);\n }\n };\n\n function getHandlers(emitter, type) {\n return emitter._handlers && emitter._handlers[type] || noHandlers\n }\n\n function off(emitter, type, f) {\n if (emitter.removeEventListener) {\n emitter.removeEventListener(type, f, false);\n } else if (emitter.detachEvent) {\n emitter.detachEvent(\"on\" + type, f);\n } else {\n var map$$1 = emitter._handlers, arr = map$$1 && map$$1[type];\n if (arr) {\n var index = indexOf(arr, f);\n if (index > -1)\n { map$$1[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }\n }\n }\n }\n\n function signal(emitter, type /*, values...*/) {\n var handlers = getHandlers(emitter, type);\n if (!handlers.length) { return }\n var args = Array.prototype.slice.call(arguments, 2);\n for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }\n }\n\n // The DOM events that CodeMirror handles can be overridden by\n // registering a (non-DOM) handler on the editor for the event name,\n // and preventDefault-ing the event in that handler.\n function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n }\n\n function signalCursorActivity(cm) {\n var arr = cm._handlers && cm._handlers.cursorActivity;\n if (!arr) { return }\n var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);\n for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)\n { set.push(arr[i]); } }\n }\n\n function hasHandler(emitter, type) {\n return getHandlers(emitter, type).length > 0\n }\n\n // Add on and off methods to a constructor's prototype, to make\n // registering events on such objects more convenient.\n function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n }\n\n // Due to the fact that we still support jurassic IE versions, some\n // compatibility wrappers are needed.\n\n function e_preventDefault(e) {\n if (e.preventDefault) { e.preventDefault(); }\n else { e.returnValue = false; }\n }\n function e_stopPropagation(e) {\n if (e.stopPropagation) { e.stopPropagation(); }\n else { e.cancelBubble = true; }\n }\n function e_defaultPrevented(e) {\n return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false\n }\n function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}\n\n function e_target(e) {return e.target || e.srcElement}\n function e_button(e) {\n var b = e.which;\n if (b == null) {\n if (e.button & 1) { b = 1; }\n else if (e.button & 2) { b = 3; }\n else if (e.button & 4) { b = 2; }\n }\n if (mac && e.ctrlKey && b == 1) { b = 3; }\n return b\n }\n\n // Detect drag-and-drop\n var dragAndDrop = function() {\n // There is *some* kind of drag-and-drop support in IE6-8, but I\n // couldn't get it to work yet.\n if (ie && ie_version < 9) { return false }\n var div = elt('div');\n return \"draggable\" in div || \"dragDrop\" in div\n }();\n\n var zwspSupported;\n function zeroWidthElement(measure) {\n if (zwspSupported == null) {\n var test = elt(\"span\", \"\\u200b\");\n removeChildrenAndAdd(measure, elt(\"span\", [test, document.createTextNode(\"x\")]));\n if (measure.firstChild.offsetHeight != 0)\n { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }\n }\n var node = zwspSupported ? elt(\"span\", \"\\u200b\") :\n elt(\"span\", \"\\u00a0\", null, \"display: inline-block; width: 1px; margin-right: -1px\");\n node.setAttribute(\"cm-text\", \"\");\n return node\n }\n\n // Feature-detect IE's crummy client rect reporting for bidi text\n var badBidiRects;\n function hasBadBidiRects(measure) {\n if (badBidiRects != null) { return badBidiRects }\n var txt = removeChildrenAndAdd(measure, document.createTextNode(\"A\\u062eA\"));\n var r0 = range(txt, 0, 1).getBoundingClientRect();\n var r1 = range(txt, 1, 2).getBoundingClientRect();\n removeChildren(measure);\n if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)\n return badBidiRects = (r1.right - r0.right < 3)\n }\n\n // See if \"\".split is the broken IE version, if so, provide an\n // alternative way to split lines.\n var splitLinesAuto = \"\\n\\nb\".split(/\\n/).length != 3 ? function (string) {\n var pos = 0, result = [], l = string.length;\n while (pos <= l) {\n var nl = string.indexOf(\"\\n\", pos);\n if (nl == -1) { nl = string.length; }\n var line = string.slice(pos, string.charAt(nl - 1) == \"\\r\" ? nl - 1 : nl);\n var rt = line.indexOf(\"\\r\");\n if (rt != -1) {\n result.push(line.slice(0, rt));\n pos += rt + 1;\n } else {\n result.push(line);\n pos = nl + 1;\n }\n }\n return result\n } : function (string) { return string.split(/\\r\\n?|\\n/); };\n\n var hasSelection = window.getSelection ? function (te) {\n try { return te.selectionStart != te.selectionEnd }\n catch(e) { return false }\n } : function (te) {\n var range$$1;\n try {range$$1 = te.ownerDocument.selection.createRange();}\n catch(e) {}\n if (!range$$1 || range$$1.parentElement() != te) { return false }\n return range$$1.compareEndPoints(\"StartToEnd\", range$$1) != 0\n };\n\n var hasCopyEvent = (function () {\n var e = elt(\"div\");\n if (\"oncopy\" in e) { return true }\n e.setAttribute(\"oncopy\", \"return;\");\n return typeof e.oncopy == \"function\"\n })();\n\n var badZoomedRects = null;\n function hasBadZoomedRects(measure) {\n if (badZoomedRects != null) { return badZoomedRects }\n var node = removeChildrenAndAdd(measure, elt(\"span\", \"x\"));\n var normal = node.getBoundingClientRect();\n var fromRange = range(node, 0, 1).getBoundingClientRect();\n return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1\n }\n\n // Known modes, by name and by MIME\n var modes = {}, mimeModes = {};\n\n // Extra arguments are stored as the mode's dependencies, which is\n // used by (legacy) mechanisms like loadmode.js to automatically\n // load a mode. (Preferred mechanism is the require/define calls.)\n function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }\n\n function defineMIME(mime, spec) {\n mimeModes[mime] = spec;\n }\n\n // Given a MIME type, a {name, ...options} config object, or a name\n // string, return a mode config object.\n function resolveMode(spec) {\n if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n spec = mimeModes[spec];\n } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n var found = mimeModes[spec.name];\n if (typeof found == \"string\") { found = {name: found}; }\n spec = createObj(found, spec);\n spec.name = found.name;\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec)) {\n return resolveMode(\"application/xml\")\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+json$/.test(spec)) {\n return resolveMode(\"application/json\")\n }\n if (typeof spec == \"string\") { return {name: spec} }\n else { return spec || {name: \"null\"} }\n }\n\n // Given a mode spec (anything that resolveMode accepts), find and\n // initialize an actual mode object.\n function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n }\n\n // This can be used to attach properties to mode objects from\n // outside the actual mode definition.\n var modeExtensions = {};\n function extendMode(mode, properties) {\n var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});\n copyObj(properties, exts);\n }\n\n function copyState(mode, state) {\n if (state === true) { return state }\n if (mode.copyState) { return mode.copyState(state) }\n var nstate = {};\n for (var n in state) {\n var val = state[n];\n if (val instanceof Array) { val = val.concat([]); }\n nstate[n] = val;\n }\n return nstate\n }\n\n // Given a mode and a state (for that mode), find the inner mode and\n // state at the position that the state refers to.\n function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n }\n\n function startState(mode, a1, a2) {\n return mode.startState ? mode.startState(a1, a2) : true\n }\n\n // STRING STREAM\n\n // Fed to the mode parsers, provides helper functions to make\n // parsers more succinct.\n\n var StringStream = function(string, tabSize, lineOracle) {\n this.pos = this.start = 0;\n this.string = string;\n this.tabSize = tabSize || 8;\n this.lastColumnPos = this.lastColumnValue = 0;\n this.lineStart = 0;\n this.lineOracle = lineOracle;\n };\n\n StringStream.prototype.eol = function () {return this.pos >= this.string.length};\n StringStream.prototype.sol = function () {return this.pos == this.lineStart};\n StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};\n StringStream.prototype.next = function () {\n if (this.pos < this.string.length)\n { return this.string.charAt(this.pos++) }\n };\n StringStream.prototype.eat = function (match) {\n var ch = this.string.charAt(this.pos);\n var ok;\n if (typeof match == \"string\") { ok = ch == match; }\n else { ok = ch && (match.test ? match.test(ch) : match(ch)); }\n if (ok) {++this.pos; return ch}\n };\n StringStream.prototype.eatWhile = function (match) {\n var start = this.pos;\n while (this.eat(match)){}\n return this.pos > start\n };\n StringStream.prototype.eatSpace = function () {\n var this$1 = this;\n\n var start = this.pos;\n while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) { ++this$1.pos; }\n return this.pos > start\n };\n StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};\n StringStream.prototype.skipTo = function (ch) {\n var found = this.string.indexOf(ch, this.pos);\n if (found > -1) {this.pos = found; return true}\n };\n StringStream.prototype.backUp = function (n) {this.pos -= n;};\n StringStream.prototype.column = function () {\n if (this.lastColumnPos < this.start) {\n this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);\n this.lastColumnPos = this.start;\n }\n return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n };\n StringStream.prototype.indentation = function () {\n return countColumn(this.string, null, this.tabSize) -\n (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n };\n StringStream.prototype.match = function (pattern, consume, caseInsensitive) {\n if (typeof pattern == \"string\") {\n var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };\n var substr = this.string.substr(this.pos, pattern.length);\n if (cased(substr) == cased(pattern)) {\n if (consume !== false) { this.pos += pattern.length; }\n return true\n }\n } else {\n var match = this.string.slice(this.pos).match(pattern);\n if (match && match.index > 0) { return null }\n if (match && consume !== false) { this.pos += match[0].length; }\n return match\n }\n };\n StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};\n StringStream.prototype.hideFirstChars = function (n, inner) {\n this.lineStart += n;\n try { return inner() }\n finally { this.lineStart -= n; }\n };\n StringStream.prototype.lookAhead = function (n) {\n var oracle = this.lineOracle;\n return oracle && oracle.lookAhead(n)\n };\n StringStream.prototype.baseToken = function () {\n var oracle = this.lineOracle;\n return oracle && oracle.baseToken(this.pos)\n };\n\n // Find the line object corresponding to the given line number.\n function getLine(doc, n) {\n n -= doc.first;\n if (n < 0 || n >= doc.size) { throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\") }\n var chunk = doc;\n while (!chunk.lines) {\n for (var i = 0;; ++i) {\n var child = chunk.children[i], sz = child.chunkSize();\n if (n < sz) { chunk = child; break }\n n -= sz;\n }\n }\n return chunk.lines[n]\n }\n\n // Get the part of a document between two positions, as an array of\n // strings.\n function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }\n // Get the lines between from and to, as array of strings.\n function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }\n\n // Update the height of a line, propagating the height change\n // upwards to parent nodes.\n function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }\n\n // Given a line object, find its line number by walking up through\n // its parent links.\n function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n }\n\n // Find the line at the given vertical position, using the height\n // information in the document tree.\n function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }\n\n function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}\n\n function lineNumberFor(options, i) {\n return String(options.lineNumberFormatter(i + options.firstLineNumber))\n }\n\n // A Pos instance represents a position within the text.\n function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n }\n\n // Compare two positions, return 0 if they are the same, a negative\n // number when a is less, and a positive number otherwise.\n function cmp(a, b) { return a.line - b.line || a.ch - b.ch }\n\n function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }\n\n function copyPos(x) {return Pos(x.line, x.ch)}\n function maxPos(a, b) { return cmp(a, b) < 0 ? b : a }\n function minPos(a, b) { return cmp(a, b) < 0 ? a : b }\n\n // Most of the external API clips given positions to make sure they\n // actually exist within the document.\n function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}\n function clipPos(doc, pos) {\n if (pos.line < doc.first) { return Pos(doc.first, 0) }\n var last = doc.first + doc.size - 1;\n if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }\n return clipToLen(pos, getLine(doc, pos.line).text.length)\n }\n function clipToLen(pos, linelen) {\n var ch = pos.ch;\n if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }\n else if (ch < 0) { return Pos(pos.line, 0) }\n else { return pos }\n }\n function clipPosArray(doc, array) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }\n return out\n }\n\n var SavedContext = function(state, lookAhead) {\n this.state = state;\n this.lookAhead = lookAhead;\n };\n\n var Context = function(doc, state, line, lookAhead) {\n this.state = state;\n this.doc = doc;\n this.line = line;\n this.maxLookAhead = lookAhead || 0;\n this.baseTokens = null;\n this.baseTokenPos = 1;\n };\n\n Context.prototype.lookAhead = function (n) {\n var line = this.doc.getLine(this.line + n);\n if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; }\n return line\n };\n\n Context.prototype.baseToken = function (n) {\n var this$1 = this;\n\n if (!this.baseTokens) { return null }\n while (this.baseTokens[this.baseTokenPos] <= n)\n { this$1.baseTokenPos += 2; }\n var type = this.baseTokens[this.baseTokenPos + 1];\n return {type: type && type.replace(/( |^)overlay .*/, \"\"),\n size: this.baseTokens[this.baseTokenPos] - n}\n };\n\n Context.prototype.nextLine = function () {\n this.line++;\n if (this.maxLookAhead > 0) { this.maxLookAhead--; }\n };\n\n Context.fromSaved = function (doc, saved, line) {\n if (saved instanceof SavedContext)\n { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) }\n else\n { return new Context(doc, copyState(doc.mode, saved), line) }\n };\n\n Context.prototype.save = function (copy) {\n var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;\n return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state\n };\n\n\n // Compute a style array (an array starting with a mode generation\n // -- for invalidation -- followed by pairs of end positions and\n // style strings), which is used to highlight the tokens on the\n // line.\n function highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n }\n\n function getLineStyles(cm, line, updateFrontier) {\n if (!line.styles || line.styles[0] != cm.state.modeGen) {\n var context = getContextBefore(cm, lineNo(line));\n var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);\n var result = highlightLine(cm, line, context);\n if (resetState) { context.state = resetState; }\n line.stateAfter = context.save(!resetState);\n line.styles = result.styles;\n if (result.classes) { line.styleClasses = result.classes; }\n else if (line.styleClasses) { line.styleClasses = null; }\n if (updateFrontier === cm.doc.highlightFrontier)\n { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); }\n }\n return line.styles\n }\n\n function getContextBefore(cm, n, precise) {\n var doc = cm.doc, display = cm.display;\n if (!doc.mode.startState) { return new Context(doc, true, n) }\n var start = findStartLine(cm, n, precise);\n var saved = start > doc.first && getLine(doc, start - 1).stateAfter;\n var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);\n\n doc.iter(start, n, function (line) {\n processLine(cm, line.text, context);\n var pos = context.line;\n line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;\n context.nextLine();\n });\n if (precise) { doc.modeFrontier = context.line; }\n return context\n }\n\n // Lightweight form of highlight -- proceed over this line and\n // update state, but don't save a style array. Used for lines that\n // aren't currently visible.\n function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }\n\n function callBlankLine(mode, state) {\n if (mode.blankLine) { return mode.blankLine(state) }\n if (!mode.innerMode) { return }\n var inner = innerMode(mode, state);\n if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }\n }\n\n function readToken(mode, stream, state, inner) {\n for (var i = 0; i < 10; i++) {\n if (inner) { inner[0] = innerMode(mode, state).mode; }\n var style = mode.token(stream, state);\n if (stream.pos > stream.start) { return style }\n }\n throw new Error(\"Mode \" + mode.name + \" failed to advance stream.\")\n }\n\n var Token = function(stream, type, state) {\n this.start = stream.start; this.end = stream.pos;\n this.string = stream.current();\n this.type = type || null;\n this.state = state;\n };\n\n // Utility for getTokenAt and getLineTokens\n function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n }\n\n function extractLineClasses(type, output) {\n if (type) { for (;;) {\n var lineClass = type.match(/(?:^|\\s+)line-(background-)?(\\S+)/);\n if (!lineClass) { break }\n type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);\n var prop = lineClass[1] ? \"bgClass\" : \"textClass\";\n if (output[prop] == null)\n { output[prop] = lineClass[2]; }\n else if (!(new RegExp(\"(?:^|\\s)\" + lineClass[2] + \"(?:$|\\s)\")).test(output[prop]))\n { output[prop] += \" \" + lineClass[2]; }\n } }\n return type\n }\n\n // Run the given mode's parser over a line, calling f for each token.\n function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n }\n\n // Finds the line to start with when starting a parse. Tries to\n // find a line with a stateAfter, so that it can start with a\n // valid state. If that fails, it returns the line with the\n // smallest indentation, which tends to need the least context to\n // parse correctly.\n function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n }\n\n function retreatFrontier(doc, n) {\n doc.modeFrontier = Math.min(doc.modeFrontier, n);\n if (doc.highlightFrontier < n - 10) { return }\n var start = doc.first;\n for (var line = n - 1; line > start; line--) {\n var saved = getLine(doc, line).stateAfter;\n // change is on 3\n // state on line 1 looked ahead 2 -- so saw 3\n // test 1 + 2 < 3 should cover this\n if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {\n start = line + 1;\n break\n }\n }\n doc.highlightFrontier = Math.min(doc.highlightFrontier, start);\n }\n\n // Optimize some code when these features are not used.\n var sawReadOnlySpans = false, sawCollapsedSpans = false;\n\n function seeReadOnlySpans() {\n sawReadOnlySpans = true;\n }\n\n function seeCollapsedSpans() {\n sawCollapsedSpans = true;\n }\n\n // TEXTMARKER SPANS\n\n function MarkedSpan(marker, from, to) {\n this.marker = marker;\n this.from = from; this.to = to;\n }\n\n // Search an array of spans for a span matching the given marker.\n function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }\n // Remove a span from an array, returning undefined if no spans are\n // left (we don't store arrays for lines without spans).\n function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }\n // Add a span to a line.\n function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }\n\n // Used for the algorithm that adjusts markers for a change in the\n // document. These functions cut an array of spans at a given\n // character position, returning an array of remaining chunks (or\n // undefined if nothing remains).\n function markedSpansBefore(old, startCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);\n if (startsBefore || span.from == startCh && marker.type == \"bookmark\" && (!isInsert || !span.marker.insertLeft)) {\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh)\n ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));\n }\n } }\n return nw\n }\n function markedSpansAfter(old, endCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);\n if (endsAfter || span.from == endCh && marker.type == \"bookmark\" && (!isInsert || span.marker.insertLeft)) {\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh)\n ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,\n span.to == null ? null : span.to - endCh));\n }\n } }\n return nw\n }\n\n // Given a change object, compute the new set of marker spans that\n // cover the line in which the change took place. Removes spans\n // entirely within the change, reconnects spans belonging to the\n // same marker that appear on both sides of the change, and cuts off\n // spans partially within the change. Returns an array of span\n // arrays with one element for each line in (after) the change.\n function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n }\n\n // Remove spans that are empty and don't have a clearWhenEmpty\n // option of false.\n function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n }\n\n // Used to 'clip' out readOnly ranges when making a change.\n function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n }\n\n // Connect or disconnect spans from a line.\n function detachMarkedSpans(line) {\n var spans = line.markedSpans;\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.detachLine(line); }\n line.markedSpans = null;\n }\n function attachMarkedSpans(line, spans) {\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.attachLine(line); }\n line.markedSpans = spans;\n }\n\n // Helpers used when computing which overlapping collapsed span\n // counts as the larger one.\n function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }\n function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }\n\n // Returns a number indicating which of two overlapping collapsed\n // spans is larger (and thus includes the other). Falls back to\n // comparing ids when the spans cover exactly the same range.\n function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }\n\n // Find out whether a line ends or starts in a collapsed span. If\n // so, return the marker for that span.\n function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }\n function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }\n function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }\n\n function collapsedSpanAround(line, ch) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }\n } }\n return found\n }\n\n // Test whether there exists a collapsed span that partially\n // overlaps (covers the start or end, but not both) of a new span.\n // Such overlap is not allowed.\n function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }\n\n // A visual line is a line as drawn on the screen. Folding, for\n // example, can cause multiple logical lines to appear on the same\n // visual line. This finds the start of the visual line that the\n // given line is part of (usually that is the line itself).\n function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }\n\n function visualLineEnd(line) {\n var merged;\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return line\n }\n\n // Returns an array of logical lines that continue the visual line\n // started by the argument, or undefined if there are no such lines.\n function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }\n\n // Get the line number of the start of the visual line that the\n // given line number is part of.\n function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }\n\n // Get the line number of the start of the next visual line after\n // the given line.\n function visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) { return lineN }\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) { return lineN }\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return lineNo(line) + 1\n }\n\n // Compute whether a line is hidden. Lines count as hidden when they\n // are part of a visual line that starts with another line, or when\n // they are entirely covered by collapsed, non-widget span.\n function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }\n function lineIsHiddenInner(doc, line, span) {\n if (span.to == null) {\n var end = span.marker.find(1, true);\n return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))\n }\n if (span.marker.inclusiveRight && span.to == line.text.length)\n { return true }\n for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {\n sp = line.markedSpans[i];\n if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&\n (sp.to == null || sp.to != span.from) &&\n (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&\n lineIsHiddenInner(doc, line, sp)) { return true }\n }\n }\n\n // Find the height above the given line.\n function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }\n\n // Compute the character length of a line, taking into account\n // collapsed ranges (see markText) that might hide parts, and join\n // other lines onto it.\n function lineLength(line) {\n if (line.height == 0) { return 0 }\n var len = line.text.length, merged, cur = line;\n while (merged = collapsedSpanAtStart(cur)) {\n var found = merged.find(0, true);\n cur = found.from.line;\n len += found.from.ch - found.to.ch;\n }\n cur = line;\n while (merged = collapsedSpanAtEnd(cur)) {\n var found$1 = merged.find(0, true);\n len -= cur.text.length - found$1.from.ch;\n cur = found$1.to.line;\n len += cur.text.length - found$1.to.ch;\n }\n return len\n }\n\n // Find the longest line in the document.\n function findMaxLine(cm) {\n var d = cm.display, doc = cm.doc;\n d.maxLine = getLine(doc, doc.first);\n d.maxLineLength = lineLength(d.maxLine);\n d.maxLineChanged = true;\n doc.iter(function (line) {\n var len = lineLength(line);\n if (len > d.maxLineLength) {\n d.maxLineLength = len;\n d.maxLine = line;\n }\n });\n }\n\n // LINE DATA STRUCTURE\n\n // Line objects. These hold state related to a line, including\n // highlighting info (the styles array).\n var Line = function(text, markedSpans, estimateHeight) {\n this.text = text;\n attachMarkedSpans(this, markedSpans);\n this.height = estimateHeight ? estimateHeight(this) : 1;\n };\n\n Line.prototype.lineNo = function () { return lineNo(this) };\n eventMixin(Line);\n\n // Change the content (text, markers) of a line. Automatically\n // invalidates cached information and tries to re-estimate the\n // line's height.\n function updateLine(line, text, markedSpans, estimateHeight) {\n line.text = text;\n if (line.stateAfter) { line.stateAfter = null; }\n if (line.styles) { line.styles = null; }\n if (line.order != null) { line.order = null; }\n detachMarkedSpans(line);\n attachMarkedSpans(line, markedSpans);\n var estHeight = estimateHeight ? estimateHeight(line) : 1;\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n }\n\n // Detach a line from the document tree and its markers.\n function cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n }\n\n // Convert a style as returned by a mode (either null, or a string\n // containing one or more styles) to a CSS style. This is cached,\n // and also looks for line-wide styles.\n var styleToClassCache = {}, styleToClassCacheWithMode = {};\n function interpretTokenStyle(style, options) {\n if (!style || /^\\s*$/.test(style)) { return null }\n var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;\n return cache[style] ||\n (cache[style] = style.replace(/\\S+/g, \"cm-$&\"))\n }\n\n // Render the DOM representation of the text of a line. Also builds\n // up a 'line map', which points at the DOM nodes that represent\n // specific stretches of text, and is used by the measuring code.\n // The returned object contains the DOM node, this map, and\n // information about line-wide styles that were set by the mode.\n function buildLineContent(cm, lineView) {\n // The padding-right forces the element to have a 'border', which\n // is needed on Webkit to be able to get line-level bounding\n // rectangles for it (in measureChar).\n var content = eltP(\"span\", null, null, webkit ? \"padding-right: .1px\" : null);\n var builder = {pre: eltP(\"pre\", [content], \"CodeMirror-line\"), content: content,\n col: 0, pos: 0, cm: cm,\n trailingSpace: false,\n splitSpaces: cm.getOption(\"lineWrapping\")};\n lineView.measure = {};\n\n // Iterate over the logical lines that make up this visual line.\n for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {\n var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);\n builder.pos = 0;\n builder.addToken = buildToken;\n // Optionally wire in some hacks into the token-rendering\n // algorithm, to deal with browser quirks.\n if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))\n { builder.addToken = buildTokenBadBidi(builder.addToken, order); }\n builder.map = [];\n var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);\n insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));\n if (line.styleClasses) {\n if (line.styleClasses.bgClass)\n { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || \"\"); }\n if (line.styleClasses.textClass)\n { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || \"\"); }\n }\n\n // Ensure at least a single node is present, for measuring.\n if (builder.map.length == 0)\n { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }\n\n // Store the map and a cache object for the current logical line\n if (i == 0) {\n lineView.measure.map = builder.map;\n lineView.measure.cache = {};\n } else {\n (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)\n ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});\n }\n }\n\n // See issue #2901\n if (webkit) {\n var last = builder.content.lastChild;\n if (/\\bcm-tab\\b/.test(last.className) || (last.querySelector && last.querySelector(\".cm-tab\")))\n { builder.content.className = \"cm-tab-wrap-hack\"; }\n }\n\n signal(cm, \"renderLine\", cm, lineView.line, builder.pre);\n if (builder.pre.className)\n { builder.textClass = joinClasses(builder.pre.className, builder.textClass || \"\"); }\n\n return builder\n }\n\n function defaultSpecialCharPlaceholder(ch) {\n var token = elt(\"span\", \"\\u2022\", \"cm-invalidchar\");\n token.title = \"\\\\u\" + ch.charCodeAt(0).toString(16);\n token.setAttribute(\"aria-label\", token.title);\n return token\n }\n\n // Build up the DOM representation for a single token, and add it to\n // the line map. Takes care to render special characters separately.\n function buildToken(builder, text, style, startStyle, endStyle, css, attributes) {\n if (!text) { return }\n var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;\n var special = builder.cm.state.specialChars, mustWrap = false;\n var content;\n if (!special.test(text)) {\n builder.col += text.length;\n content = document.createTextNode(displayText);\n builder.map.push(builder.pos, builder.pos + text.length, content);\n if (ie && ie_version < 9) { mustWrap = true; }\n builder.pos += text.length;\n } else {\n content = document.createDocumentFragment();\n var pos = 0;\n while (true) {\n special.lastIndex = pos;\n var m = special.exec(text);\n var skipped = m ? m.index - pos : text.length - pos;\n if (skipped) {\n var txt = document.createTextNode(displayText.slice(pos, pos + skipped));\n if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt])); }\n else { content.appendChild(txt); }\n builder.map.push(builder.pos, builder.pos + skipped, txt);\n builder.col += skipped;\n builder.pos += skipped;\n }\n if (!m) { break }\n pos += skipped + 1;\n var txt$1 = (void 0);\n if (m[0] == \"\\t\") {\n var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;\n txt$1 = content.appendChild(elt(\"span\", spaceStr(tabWidth), \"cm-tab\"));\n txt$1.setAttribute(\"role\", \"presentation\");\n txt$1.setAttribute(\"cm-text\", \"\\t\");\n builder.col += tabWidth;\n } else if (m[0] == \"\\r\" || m[0] == \"\\n\") {\n txt$1 = content.appendChild(elt(\"span\", m[0] == \"\\r\" ? \"\\u240d\" : \"\\u2424\", \"cm-invalidchar\"));\n txt$1.setAttribute(\"cm-text\", m[0]);\n builder.col += 1;\n } else {\n txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);\n txt$1.setAttribute(\"cm-text\", m[0]);\n if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt$1])); }\n else { content.appendChild(txt$1); }\n builder.col += 1;\n }\n builder.map.push(builder.pos, builder.pos + 1, txt$1);\n builder.pos++;\n }\n }\n builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;\n if (style || startStyle || endStyle || mustWrap || css) {\n var fullStyle = style || \"\";\n if (startStyle) { fullStyle += startStyle; }\n if (endStyle) { fullStyle += endStyle; }\n var token = elt(\"span\", [content], fullStyle, css);\n if (attributes) {\n for (var attr in attributes) { if (attributes.hasOwnProperty(attr) && attr != \"style\" && attr != \"class\")\n { token.setAttribute(attr, attributes[attr]); } }\n }\n return builder.content.appendChild(token)\n }\n builder.content.appendChild(content);\n }\n\n // Change some spaces to NBSP to prevent the browser from collapsing\n // trailing spaces at the end of a line when rendering text (issue #1362).\n function splitSpaces(text, trailingBefore) {\n if (text.length > 1 && !/ /.test(text)) { return text }\n var spaceBefore = trailingBefore, result = \"\";\n for (var i = 0; i < text.length; i++) {\n var ch = text.charAt(i);\n if (ch == \" \" && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))\n { ch = \"\\u00a0\"; }\n result += ch;\n spaceBefore = ch == \" \";\n }\n return result\n }\n\n // Work around nonsense dimensions being reported for stretches of\n // right-to-left text.\n function buildTokenBadBidi(inner, order) {\n return function (builder, text, style, startStyle, endStyle, css, attributes) {\n style = style ? style + \" cm-force-border\" : \"cm-force-border\";\n var start = builder.pos, end = start + text.length;\n for (;;) {\n // Find the part that overlaps with the start of this text\n var part = (void 0);\n for (var i = 0; i < order.length; i++) {\n part = order[i];\n if (part.to > start && part.from <= start) { break }\n }\n if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, css, attributes) }\n inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes);\n startStyle = null;\n text = text.slice(part.to - start);\n start = part.to;\n }\n }\n }\n\n function buildCollapsedSpan(builder, size, marker, ignoreWidget) {\n var widget = !ignoreWidget && marker.widgetNode;\n if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }\n if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {\n if (!widget)\n { widget = builder.content.appendChild(document.createElement(\"span\")); }\n widget.setAttribute(\"cm-marker\", marker.id);\n }\n if (widget) {\n builder.cm.display.input.setUneditable(widget);\n builder.content.appendChild(widget);\n }\n builder.pos += size;\n builder.trailingSpace = false;\n }\n\n // Outputs a number of spans to make up a line, taking highlighting\n // and marked text into account.\n function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }\n\n\n // These objects are used to represent the visible (currently drawn)\n // part of the document. A LineView may correspond to multiple\n // logical lines, if those are connected by collapsed ranges.\n function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }\n\n // Create a range of LineView objects for the given lines.\n function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }\n\n var operationGroup = null;\n\n function pushOperation(op) {\n if (operationGroup) {\n operationGroup.ops.push(op);\n } else {\n op.ownsGroup = operationGroup = {\n ops: [op],\n delayedCallbacks: []\n };\n }\n }\n\n function fireCallbacksForOps(group) {\n // Calls delayed callbacks and cursorActivity handlers until no\n // new ones appear\n var callbacks = group.delayedCallbacks, i = 0;\n do {\n for (; i < callbacks.length; i++)\n { callbacks[i].call(null); }\n for (var j = 0; j < group.ops.length; j++) {\n var op = group.ops[j];\n if (op.cursorActivityHandlers)\n { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)\n { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }\n }\n } while (i < callbacks.length)\n }\n\n function finishOperation(op, endCb) {\n var group = op.ownsGroup;\n if (!group) { return }\n\n try { fireCallbacksForOps(group); }\n finally {\n operationGroup = null;\n endCb(group);\n }\n }\n\n var orphanDelayedCallbacks = null;\n\n // Often, we want to signal events at a point where we are in the\n // middle of some work, but don't want the handler to start calling\n // other methods on the editor, which might be in an inconsistent\n // state or simply not expect any other events to happen.\n // signalLater looks whether there are any handlers, and schedules\n // them to be executed when the last operation ends, or, if no\n // operation is active, when a timeout fires.\n function signalLater(emitter, type /*, values...*/) {\n var arr = getHandlers(emitter, type);\n if (!arr.length) { return }\n var args = Array.prototype.slice.call(arguments, 2), list;\n if (operationGroup) {\n list = operationGroup.delayedCallbacks;\n } else if (orphanDelayedCallbacks) {\n list = orphanDelayedCallbacks;\n } else {\n list = orphanDelayedCallbacks = [];\n setTimeout(fireOrphanDelayed, 0);\n }\n var loop = function ( i ) {\n list.push(function () { return arr[i].apply(null, args); });\n };\n\n for (var i = 0; i < arr.length; ++i)\n loop( i );\n }\n\n function fireOrphanDelayed() {\n var delayed = orphanDelayedCallbacks;\n orphanDelayedCallbacks = null;\n for (var i = 0; i < delayed.length; ++i) { delayed[i](); }\n }\n\n // When an aspect of a line changes, a string is added to\n // lineView.changes. This updates the relevant part of the line's\n // DOM structure.\n function updateLineForChanges(cm, lineView, lineN, dims) {\n for (var j = 0; j < lineView.changes.length; j++) {\n var type = lineView.changes[j];\n if (type == \"text\") { updateLineText(cm, lineView); }\n else if (type == \"gutter\") { updateLineGutter(cm, lineView, lineN, dims); }\n else if (type == \"class\") { updateLineClasses(cm, lineView); }\n else if (type == \"widget\") { updateLineWidgets(cm, lineView, dims); }\n }\n lineView.changes = null;\n }\n\n // Lines with gutter elements, widgets or a background class need to\n // be wrapped, and have the extra elements added to the wrapper div\n function ensureLineWrapped(lineView) {\n if (lineView.node == lineView.text) {\n lineView.node = elt(\"div\", null, null, \"position: relative\");\n if (lineView.text.parentNode)\n { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }\n lineView.node.appendChild(lineView.text);\n if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }\n }\n return lineView.node\n }\n\n function updateLineBackground(cm, lineView) {\n var cls = lineView.bgClass ? lineView.bgClass + \" \" + (lineView.line.bgClass || \"\") : lineView.line.bgClass;\n if (cls) { cls += \" CodeMirror-linebackground\"; }\n if (lineView.background) {\n if (cls) { lineView.background.className = cls; }\n else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }\n } else if (cls) {\n var wrap = ensureLineWrapped(lineView);\n lineView.background = wrap.insertBefore(elt(\"div\", null, cls), wrap.firstChild);\n cm.display.input.setUneditable(lineView.background);\n }\n }\n\n // Wrapper around buildLineContent which will reuse the structure\n // in display.externalMeasured when possible.\n function getLineContent(cm, lineView) {\n var ext = cm.display.externalMeasured;\n if (ext && ext.line == lineView.line) {\n cm.display.externalMeasured = null;\n lineView.measure = ext.measure;\n return ext.built\n }\n return buildLineContent(cm, lineView)\n }\n\n // Redraw the line's text. Interacts with the background and text\n // classes because the mode may output tokens that influence these\n // classes.\n function updateLineText(cm, lineView) {\n var cls = lineView.text.className;\n var built = getLineContent(cm, lineView);\n if (lineView.text == lineView.node) { lineView.node = built.pre; }\n lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n lineView.text = built.pre;\n if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n lineView.bgClass = built.bgClass;\n lineView.textClass = built.textClass;\n updateLineClasses(cm, lineView);\n } else if (cls) {\n lineView.text.className = cls;\n }\n }\n\n function updateLineClasses(cm, lineView) {\n updateLineBackground(cm, lineView);\n if (lineView.line.wrapClass)\n { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }\n else if (lineView.node != lineView.text)\n { lineView.node.className = \"\"; }\n var textClass = lineView.textClass ? lineView.textClass + \" \" + (lineView.line.textClass || \"\") : lineView.line.textClass;\n lineView.text.className = textClass || \"\";\n }\n\n function updateLineGutter(cm, lineView, lineN, dims) {\n if (lineView.gutter) {\n lineView.node.removeChild(lineView.gutter);\n lineView.gutter = null;\n }\n if (lineView.gutterBackground) {\n lineView.node.removeChild(lineView.gutterBackground);\n lineView.gutterBackground = null;\n }\n if (lineView.line.gutterClass) {\n var wrap = ensureLineWrapped(lineView);\n lineView.gutterBackground = elt(\"div\", null, \"CodeMirror-gutter-background \" + lineView.line.gutterClass,\n (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px; width: \" + (dims.gutterTotalWidth) + \"px\"));\n cm.display.input.setUneditable(lineView.gutterBackground);\n wrap.insertBefore(lineView.gutterBackground, lineView.text);\n }\n var markers = lineView.line.gutterMarkers;\n if (cm.options.lineNumbers || markers) {\n var wrap$1 = ensureLineWrapped(lineView);\n var gutterWrap = lineView.gutter = elt(\"div\", null, \"CodeMirror-gutter-wrapper\", (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px\"));\n cm.display.input.setUneditable(gutterWrap);\n wrap$1.insertBefore(gutterWrap, lineView.text);\n if (lineView.line.gutterClass)\n { gutterWrap.className += \" \" + lineView.line.gutterClass; }\n if (cm.options.lineNumbers && (!markers || !markers[\"CodeMirror-linenumbers\"]))\n { lineView.lineNumber = gutterWrap.appendChild(\n elt(\"div\", lineNumberFor(cm.options, lineN),\n \"CodeMirror-linenumber CodeMirror-gutter-elt\",\n (\"left: \" + (dims.gutterLeft[\"CodeMirror-linenumbers\"]) + \"px; width: \" + (cm.display.lineNumInnerWidth) + \"px\"))); }\n if (markers) { for (var k = 0; k < cm.display.gutterSpecs.length; ++k) {\n var id = cm.display.gutterSpecs[k].className, found = markers.hasOwnProperty(id) && markers[id];\n if (found)\n { gutterWrap.appendChild(elt(\"div\", [found], \"CodeMirror-gutter-elt\",\n (\"left: \" + (dims.gutterLeft[id]) + \"px; width: \" + (dims.gutterWidth[id]) + \"px\"))); }\n } }\n }\n }\n\n function updateLineWidgets(cm, lineView, dims) {\n if (lineView.alignable) { lineView.alignable = null; }\n for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {\n next = node.nextSibling;\n if (node.className == \"CodeMirror-linewidget\")\n { lineView.node.removeChild(node); }\n }\n insertLineWidgets(cm, lineView, dims);\n }\n\n // Build a line's DOM representation from scratch\n function buildLineElement(cm, lineView, lineN, dims) {\n var built = getLineContent(cm, lineView);\n lineView.text = lineView.node = built.pre;\n if (built.bgClass) { lineView.bgClass = built.bgClass; }\n if (built.textClass) { lineView.textClass = built.textClass; }\n\n updateLineClasses(cm, lineView);\n updateLineGutter(cm, lineView, lineN, dims);\n insertLineWidgets(cm, lineView, dims);\n return lineView.node\n }\n\n // A lineView may contain multiple logical lines (when merged by\n // collapsed spans). The widgets for all of them need to be drawn.\n function insertLineWidgets(cm, lineView, dims) {\n insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } }\n }\n\n function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {\n if (!line.widgets) { return }\n var wrap = ensureLineWrapped(lineView);\n for (var i = 0, ws = line.widgets; i < ws.length; ++i) {\n var widget = ws[i], node = elt(\"div\", [widget.node], \"CodeMirror-linewidget\");\n if (!widget.handleMouseEvents) { node.setAttribute(\"cm-ignore-events\", \"true\"); }\n positionLineWidget(widget, node, lineView, dims);\n cm.display.input.setUneditable(node);\n if (allowAbove && widget.above)\n { wrap.insertBefore(node, lineView.gutter || lineView.text); }\n else\n { wrap.appendChild(node); }\n signalLater(widget, \"redraw\");\n }\n }\n\n function positionLineWidget(widget, node, lineView, dims) {\n if (widget.noHScroll) {\n (lineView.alignable || (lineView.alignable = [])).push(node);\n var width = dims.wrapperWidth;\n node.style.left = dims.fixedPos + \"px\";\n if (!widget.coverGutter) {\n width -= dims.gutterTotalWidth;\n node.style.paddingLeft = dims.gutterTotalWidth + \"px\";\n }\n node.style.width = width + \"px\";\n }\n if (widget.coverGutter) {\n node.style.zIndex = 5;\n node.style.position = \"relative\";\n if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + \"px\"; }\n }\n }\n\n function widgetHeight(widget) {\n if (widget.height != null) { return widget.height }\n var cm = widget.doc.cm;\n if (!cm) { return 0 }\n if (!contains(document.body, widget.node)) {\n var parentStyle = \"position: relative;\";\n if (widget.coverGutter)\n { parentStyle += \"margin-left: -\" + cm.display.gutters.offsetWidth + \"px;\"; }\n if (widget.noHScroll)\n { parentStyle += \"width: \" + cm.display.wrapper.clientWidth + \"px;\"; }\n removeChildrenAndAdd(cm.display.measure, elt(\"div\", [widget.node], null, parentStyle));\n }\n return widget.height = widget.node.parentNode.offsetHeight\n }\n\n // Return true when the given mouse event happened in a widget\n function eventInWidget(display, e) {\n for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {\n if (!n || (n.nodeType == 1 && n.getAttribute(\"cm-ignore-events\") == \"true\") ||\n (n.parentNode == display.sizer && n != display.mover))\n { return true }\n }\n }\n\n // POSITION MEASUREMENT\n\n function paddingTop(display) {return display.lineSpace.offsetTop}\n function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}\n function paddingH(display) {\n if (display.cachedPaddingH) { return display.cachedPaddingH }\n var e = removeChildrenAndAdd(display.measure, elt(\"pre\", \"x\", \"CodeMirror-line-like\"));\n var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;\n var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};\n if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }\n return data\n }\n\n function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }\n function displayWidth(cm) {\n return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth\n }\n function displayHeight(cm) {\n return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight\n }\n\n // Ensure the lineView.wrapping.heights array is populated. This is\n // an array of bottom offsets for the lines that make up a drawn\n // line. When lineWrapping is on, there might be more than one\n // height.\n function ensureLineHeights(cm, lineView, rect) {\n var wrapping = cm.options.lineWrapping;\n var curWidth = wrapping && displayWidth(cm);\n if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {\n var heights = lineView.measure.heights = [];\n if (wrapping) {\n lineView.measure.width = curWidth;\n var rects = lineView.text.firstChild.getClientRects();\n for (var i = 0; i < rects.length - 1; i++) {\n var cur = rects[i], next = rects[i + 1];\n if (Math.abs(cur.bottom - next.bottom) > 2)\n { heights.push((cur.bottom + next.top) / 2 - rect.top); }\n }\n }\n heights.push(rect.bottom - rect.top);\n }\n }\n\n // Find a line map (mapping character offsets to text nodes) and a\n // measurement cache for the given line number. (A line view might\n // contain multiple lines when collapsed ranges are present.)\n function mapFromLineView(lineView, line, lineN) {\n if (lineView.line == line)\n { return {map: lineView.measure.map, cache: lineView.measure.cache} }\n for (var i = 0; i < lineView.rest.length; i++)\n { if (lineView.rest[i] == line)\n { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } }\n for (var i$1 = 0; i$1 < lineView.rest.length; i$1++)\n { if (lineNo(lineView.rest[i$1]) > lineN)\n { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } }\n }\n\n // Render a line into the hidden node display.externalMeasured. Used\n // when measurement is needed for a line that's not in the viewport.\n function updateExternalMeasurement(cm, line) {\n line = visualLine(line);\n var lineN = lineNo(line);\n var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);\n view.lineN = lineN;\n var built = view.built = buildLineContent(cm, view);\n view.text = built.pre;\n removeChildrenAndAdd(cm.display.lineMeasure, built.pre);\n return view\n }\n\n // Get a {top, bottom, left, right} box (in line-local coordinates)\n // for a given character.\n function measureChar(cm, line, ch, bias) {\n return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias)\n }\n\n // Find a line view that corresponds to the given line number.\n function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }\n\n // Measurement can be split in two steps, the set-up work that\n // applies to the whole line, and the measurement of the actual\n // character. Functions like coordsChar, that need to do a lot of\n // measurements in a row, can thus ensure that the set-up work is\n // only done once.\n function prepareMeasureForLine(cm, line) {\n var lineN = lineNo(line);\n var view = findViewForLine(cm, lineN);\n if (view && !view.text) {\n view = null;\n } else if (view && view.changes) {\n updateLineForChanges(cm, view, lineN, getDimensions(cm));\n cm.curOp.forceUpdate = true;\n }\n if (!view)\n { view = updateExternalMeasurement(cm, line); }\n\n var info = mapFromLineView(view, line, lineN);\n return {\n line: line, view: view, rect: null,\n map: info.map, cache: info.cache, before: info.before,\n hasHeights: false\n }\n }\n\n // Given a prepared measurement object, measures the position of an\n // actual character (or fetches it from the cache).\n function measureCharPrepared(cm, prepared, ch, bias, varHeight) {\n if (prepared.before) { ch = -1; }\n var key = ch + (bias || \"\"), found;\n if (prepared.cache.hasOwnProperty(key)) {\n found = prepared.cache[key];\n } else {\n if (!prepared.rect)\n { prepared.rect = prepared.view.text.getBoundingClientRect(); }\n if (!prepared.hasHeights) {\n ensureLineHeights(cm, prepared.view, prepared.rect);\n prepared.hasHeights = true;\n }\n found = measureCharInner(cm, prepared, ch, bias);\n if (!found.bogus) { prepared.cache[key] = found; }\n }\n return {left: found.left, right: found.right,\n top: varHeight ? found.rtop : found.top,\n bottom: varHeight ? found.rbottom : found.bottom}\n }\n\n var nullRect = {left: 0, right: 0, top: 0, bottom: 0};\n\n function nodeAndOffsetInLineMap(map$$1, ch, bias) {\n var node, start, end, collapse, mStart, mEnd;\n // First, search the line map for the text node corresponding to,\n // or closest to, the target character.\n for (var i = 0; i < map$$1.length; i += 3) {\n mStart = map$$1[i];\n mEnd = map$$1[i + 1];\n if (ch < mStart) {\n start = 0; end = 1;\n collapse = \"left\";\n } else if (ch < mEnd) {\n start = ch - mStart;\n end = start + 1;\n } else if (i == map$$1.length - 3 || ch == mEnd && map$$1[i + 3] > ch) {\n end = mEnd - mStart;\n start = end - 1;\n if (ch >= mEnd) { collapse = \"right\"; }\n }\n if (start != null) {\n node = map$$1[i + 2];\n if (mStart == mEnd && bias == (node.insertLeft ? \"left\" : \"right\"))\n { collapse = bias; }\n if (bias == \"left\" && start == 0)\n { while (i && map$$1[i - 2] == map$$1[i - 3] && map$$1[i - 1].insertLeft) {\n node = map$$1[(i -= 3) + 2];\n collapse = \"left\";\n } }\n if (bias == \"right\" && start == mEnd - mStart)\n { while (i < map$$1.length - 3 && map$$1[i + 3] == map$$1[i + 4] && !map$$1[i + 5].insertLeft) {\n node = map$$1[(i += 3) + 2];\n collapse = \"right\";\n } }\n break\n }\n }\n return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}\n }\n\n function getUsefulRect(rects, bias) {\n var rect = nullRect;\n if (bias == \"left\") { for (var i = 0; i < rects.length; i++) {\n if ((rect = rects[i]).left != rect.right) { break }\n } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {\n if ((rect = rects[i$1]).left != rect.right) { break }\n } }\n return rect\n }\n\n function measureCharInner(cm, prepared, ch, bias) {\n var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);\n var node = place.node, start = place.start, end = place.end, collapse = place.collapse;\n\n var rect;\n if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.\n for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned\n while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; }\n while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; }\n if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)\n { rect = node.parentNode.getBoundingClientRect(); }\n else\n { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); }\n if (rect.left || rect.right || start == 0) { break }\n end = start;\n start = start - 1;\n collapse = \"right\";\n }\n if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); }\n } else { // If it is a widget, simply get the box for the whole widget.\n if (start > 0) { collapse = bias = \"right\"; }\n var rects;\n if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)\n { rect = rects[bias == \"right\" ? rects.length - 1 : 0]; }\n else\n { rect = node.getBoundingClientRect(); }\n }\n if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {\n var rSpan = node.parentNode.getClientRects()[0];\n if (rSpan)\n { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; }\n else\n { rect = nullRect; }\n }\n\n var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;\n var mid = (rtop + rbot) / 2;\n var heights = prepared.view.measure.heights;\n var i = 0;\n for (; i < heights.length - 1; i++)\n { if (mid < heights[i]) { break } }\n var top = i ? heights[i - 1] : 0, bot = heights[i];\n var result = {left: (collapse == \"right\" ? rect.right : rect.left) - prepared.rect.left,\n right: (collapse == \"left\" ? rect.left : rect.right) - prepared.rect.left,\n top: top, bottom: bot};\n if (!rect.left && !rect.right) { result.bogus = true; }\n if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }\n\n return result\n }\n\n // Work around problem with bounding client rects on ranges being\n // returned incorrectly when zoomed on IE10 and below.\n function maybeUpdateRectForZooming(measure, rect) {\n if (!window.screen || screen.logicalXDPI == null ||\n screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n { return rect }\n var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n return {left: rect.left * scaleX, right: rect.right * scaleX,\n top: rect.top * scaleY, bottom: rect.bottom * scaleY}\n }\n\n function clearLineMeasurementCacheFor(lineView) {\n if (lineView.measure) {\n lineView.measure.cache = {};\n lineView.measure.heights = null;\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { lineView.measure.caches[i] = {}; } }\n }\n }\n\n function clearLineMeasurementCache(cm) {\n cm.display.externalMeasure = null;\n removeChildren(cm.display.lineMeasure);\n for (var i = 0; i < cm.display.view.length; i++)\n { clearLineMeasurementCacheFor(cm.display.view[i]); }\n }\n\n function clearCaches(cm) {\n clearLineMeasurementCache(cm);\n cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;\n if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; }\n cm.display.lineNumChars = null;\n }\n\n function pageScrollX() {\n // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206\n // which causes page_Offset and bounding client rects to use\n // different reference viewports and invalidate our calculations.\n if (chrome && android) { return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) }\n return window.pageXOffset || (document.documentElement || document.body).scrollLeft\n }\n function pageScrollY() {\n if (chrome && android) { return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) }\n return window.pageYOffset || (document.documentElement || document.body).scrollTop\n }\n\n function widgetTopHeight(lineObj) {\n var height = 0;\n if (lineObj.widgets) { for (var i = 0; i < lineObj.widgets.length; ++i) { if (lineObj.widgets[i].above)\n { height += widgetHeight(lineObj.widgets[i]); } } }\n return height\n }\n\n // Converts a {top, bottom, left, right} box from line-local\n // coordinates into another coordinate system. Context may be one of\n // \"line\", \"div\" (display.lineDiv), \"local\"./null (editor), \"window\",\n // or \"page\".\n function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {\n if (!includeWidgets) {\n var height = widgetTopHeight(lineObj);\n rect.top += height; rect.bottom += height;\n }\n if (context == \"line\") { return rect }\n if (!context) { context = \"local\"; }\n var yOff = heightAtLine(lineObj);\n if (context == \"local\") { yOff += paddingTop(cm.display); }\n else { yOff -= cm.display.viewOffset; }\n if (context == \"page\" || context == \"window\") {\n var lOff = cm.display.lineSpace.getBoundingClientRect();\n yOff += lOff.top + (context == \"window\" ? 0 : pageScrollY());\n var xOff = lOff.left + (context == \"window\" ? 0 : pageScrollX());\n rect.left += xOff; rect.right += xOff;\n }\n rect.top += yOff; rect.bottom += yOff;\n return rect\n }\n\n // Coverts a box from \"div\" coords to another coordinate system.\n // Context may be \"window\", \"page\", \"div\", or \"local\"./null.\n function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }\n\n function charCoords(cm, pos, context, lineObj, bias) {\n if (!lineObj) { lineObj = getLine(cm.doc, pos.line); }\n return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)\n }\n\n // Returns a box for a given cursor position, which may have an\n // 'other' property containing the position of the secondary cursor\n // on a bidi boundary.\n // A cursor Pos(line, char, \"before\") is on the same visual line as `char - 1`\n // and after `char - 1` in writing order of `char - 1`\n // A cursor Pos(line, char, \"after\") is on the same visual line as `char`\n // and before `char` in writing order of `char`\n // Examples (upper-case letters are RTL, lower-case are LTR):\n // Pos(0, 1, ...)\n // before after\n // ab a|b a|b\n // aB a|B aB|\n // Ab |Ab A|b\n // AB B|A B|A\n // Every position after the last character on a line is considered to stick\n // to the last character on the line.\n function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {\n lineObj = lineObj || getLine(cm.doc, pos.line);\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n function get(ch, right) {\n var m = measureCharPrepared(cm, preparedMeasure, ch, right ? \"right\" : \"left\", varHeight);\n if (right) { m.left = m.right; } else { m.right = m.left; }\n return intoCoordSystem(cm, lineObj, m, context)\n }\n var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky;\n if (ch >= lineObj.text.length) {\n ch = lineObj.text.length;\n sticky = \"before\";\n } else if (ch <= 0) {\n ch = 0;\n sticky = \"after\";\n }\n if (!order) { return get(sticky == \"before\" ? ch - 1 : ch, sticky == \"before\") }\n\n function getBidi(ch, partPos, invert) {\n var part = order[partPos], right = part.level == 1;\n return get(invert ? ch - 1 : ch, right != invert)\n }\n var partPos = getBidiPartAt(order, ch, sticky);\n var other = bidiOther;\n var val = getBidi(ch, partPos, sticky == \"before\");\n if (other != null) { val.other = getBidi(ch, other, sticky != \"before\"); }\n return val\n }\n\n // Used to cheaply estimate the coordinates for a position. Used for\n // intermediate scroll updates.\n function estimateCoords(cm, pos) {\n var left = 0;\n pos = clipPos(cm.doc, pos);\n if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; }\n var lineObj = getLine(cm.doc, pos.line);\n var top = heightAtLine(lineObj) + paddingTop(cm.display);\n return {left: left, right: left, top: top, bottom: top + lineObj.height}\n }\n\n // Positions returned by coordsChar contain some extra information.\n // xRel is the relative x position of the input coordinates compared\n // to the found position (so xRel > 0 means the coordinates are to\n // the right of the character position, for example). When outside\n // is true, that means the coordinates lie outside the line's\n // vertical range.\n function PosWithInfo(line, ch, sticky, outside, xRel) {\n var pos = Pos(line, ch, sticky);\n pos.xRel = xRel;\n if (outside) { pos.outside = outside; }\n return pos\n }\n\n // Compute the character position closest to the given coordinates.\n // Input must be lineSpace-local (\"div\" coordinate system).\n function coordsChar(cm, x, y) {\n var doc = cm.doc;\n y += cm.display.viewOffset;\n if (y < 0) { return PosWithInfo(doc.first, 0, null, -1, -1) }\n var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;\n if (lineN > last)\n { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1) }\n if (x < 0) { x = 0; }\n\n var lineObj = getLine(doc, lineN);\n for (;;) {\n var found = coordsCharInner(cm, lineObj, lineN, x, y);\n var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0));\n if (!collapsed) { return found }\n var rangeEnd = collapsed.find(1);\n if (rangeEnd.line == lineN) { return rangeEnd }\n lineObj = getLine(doc, lineN = rangeEnd.line);\n }\n }\n\n function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {\n y -= widgetTopHeight(lineObj);\n var end = lineObj.text.length;\n var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0);\n end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end);\n return {begin: begin, end: end}\n }\n\n function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), \"line\").top;\n return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)\n }\n\n // Returns true if the given side of a box is after the given\n // coordinates, in top-to-bottom, left-to-right order.\n function boxIsAfter(box, x, y, left) {\n return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x\n }\n\n function coordsCharInner(cm, lineObj, lineNo$$1, x, y) {\n // Move y into line-local coordinate space\n y -= heightAtLine(lineObj);\n var preparedMeasure = prepareMeasureForLine(cm, lineObj);\n // When directly calling `measureCharPrepared`, we have to adjust\n // for the widgets at this line.\n var widgetHeight$$1 = widgetTopHeight(lineObj);\n var begin = 0, end = lineObj.text.length, ltr = true;\n\n var order = getOrder(lineObj, cm.doc.direction);\n // If the line isn't plain left-to-right text, first figure out\n // which bidi section the coordinates fall into.\n if (order) {\n var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)\n (cm, lineObj, lineNo$$1, preparedMeasure, order, x, y);\n ltr = part.level != 1;\n // The awkward -1 offsets are needed because findFirst (called\n // on these below) will treat its first bound as inclusive,\n // second as exclusive, but we want to actually address the\n // characters in the part's range\n begin = ltr ? part.from : part.to - 1;\n end = ltr ? part.to : part.from - 1;\n }\n\n // A binary search to find the first character whose bounding box\n // starts after the coordinates. If we run across any whose box wrap\n // the coordinates, store that.\n var chAround = null, boxAround = null;\n var ch = findFirst(function (ch) {\n var box = measureCharPrepared(cm, preparedMeasure, ch);\n box.top += widgetHeight$$1; box.bottom += widgetHeight$$1;\n if (!boxIsAfter(box, x, y, false)) { return false }\n if (box.top <= y && box.left <= x) {\n chAround = ch;\n boxAround = box;\n }\n return true\n }, begin, end);\n\n var baseX, sticky, outside = false;\n // If a box around the coordinates was found, use that\n if (boxAround) {\n // Distinguish coordinates nearer to the left or right side of the box\n var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr;\n ch = chAround + (atStart ? 0 : 1);\n sticky = atStart ? \"after\" : \"before\";\n baseX = atLeft ? boxAround.left : boxAround.right;\n } else {\n // (Adjust for extended bound, if necessary.)\n if (!ltr && (ch == end || ch == begin)) { ch++; }\n // To determine which side to associate with, get the box to the\n // left of the character and compare it's vertical position to the\n // coordinates\n sticky = ch == 0 ? \"after\" : ch == lineObj.text.length ? \"before\" :\n (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight$$1 <= y) == ltr ?\n \"after\" : \"before\";\n // Now get accurate coordinates for this place, in order to get a\n // base X position\n var coords = cursorCoords(cm, Pos(lineNo$$1, ch, sticky), \"line\", lineObj, preparedMeasure);\n baseX = coords.left;\n outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0;\n }\n\n ch = skipExtendingChars(lineObj.text, ch, 1);\n return PosWithInfo(lineNo$$1, ch, sticky, outside, x - baseX)\n }\n\n function coordsBidiPart(cm, lineObj, lineNo$$1, preparedMeasure, order, x, y) {\n // Bidi parts are sorted left-to-right, and in a non-line-wrapping\n // situation, we can take this ordering to correspond to the visual\n // ordering. This finds the first part whose end is after the given\n // coordinates.\n var index = findFirst(function (i) {\n var part = order[i], ltr = part.level != 1;\n return boxIsAfter(cursorCoords(cm, Pos(lineNo$$1, ltr ? part.to : part.from, ltr ? \"before\" : \"after\"),\n \"line\", lineObj, preparedMeasure), x, y, true)\n }, 0, order.length - 1);\n var part = order[index];\n // If this isn't the first part, the part's start is also after\n // the coordinates, and the coordinates aren't on the same line as\n // that start, move one part back.\n if (index > 0) {\n var ltr = part.level != 1;\n var start = cursorCoords(cm, Pos(lineNo$$1, ltr ? part.from : part.to, ltr ? \"after\" : \"before\"),\n \"line\", lineObj, preparedMeasure);\n if (boxIsAfter(start, x, y, true) && start.top > y)\n { part = order[index - 1]; }\n }\n return part\n }\n\n function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {\n // In a wrapped line, rtl text on wrapping boundaries can do things\n // that don't correspond to the ordering in our `order` array at\n // all, so a binary search doesn't work, and we want to return a\n // part that only spans one line so that the binary search in\n // coordsCharInner is safe. As such, we first find the extent of the\n // wrapped line, and then do a flat search in which we discard any\n // spans that aren't on the line.\n var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);\n var begin = ref.begin;\n var end = ref.end;\n if (/\\s/.test(lineObj.text.charAt(end - 1))) { end--; }\n var part = null, closestDist = null;\n for (var i = 0; i < order.length; i++) {\n var p = order[i];\n if (p.from >= end || p.to <= begin) { continue }\n var ltr = p.level != 1;\n var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right;\n // Weigh against spans ending before this, so that they are only\n // picked if nothing ends after\n var dist = endX < x ? x - endX + 1e9 : endX - x;\n if (!part || closestDist > dist) {\n part = p;\n closestDist = dist;\n }\n }\n if (!part) { part = order[order.length - 1]; }\n // Clip the part to the wrapped line.\n if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; }\n if (part.to > end) { part = {from: part.from, to: end, level: part.level}; }\n return part\n }\n\n var measureText;\n // Compute the default text height.\n function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }\n\n // Compute the default character width.\n function charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n }\n\n // Do a bulk-read of the DOM positions and sizes needed to draw the\n // view, so that we don't interleave reading and writing to the DOM.\n function getDimensions(cm) {\n var d = cm.display, left = {}, width = {};\n var gutterLeft = d.gutters.clientLeft;\n for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n var id = cm.display.gutterSpecs[i].className;\n left[id] = n.offsetLeft + n.clientLeft + gutterLeft;\n width[id] = n.clientWidth;\n }\n return {fixedPos: compensateForHScroll(d),\n gutterTotalWidth: d.gutters.offsetWidth,\n gutterLeft: left,\n gutterWidth: width,\n wrapperWidth: d.wrapper.clientWidth}\n }\n\n // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,\n // but using getBoundingClientRect to get a sub-pixel-accurate\n // result.\n function compensateForHScroll(display) {\n return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left\n }\n\n // Returns a function that estimates the height of a line, to use as\n // first approximation until the line becomes visible (and is thus\n // properly measurable).\n function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }\n\n function estimateLineHeights(cm) {\n var doc = cm.doc, est = estimateHeight(cm);\n doc.iter(function (line) {\n var estHeight = est(line);\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n });\n }\n\n // Given a mouse event, find the corresponding position. If liberal\n // is false, it checks whether a gutter or scrollbar was clicked,\n // and returns null if it was. forRect is used by rectangular\n // selections, and tries to estimate a character position even for\n // coordinates beyond the right of the text.\n function posFromMouse(cm, e, liberal, forRect) {\n var display = cm.display;\n if (!liberal && e_target(e).getAttribute(\"cm-not-content\") == \"true\") { return null }\n\n var x, y, space = display.lineSpace.getBoundingClientRect();\n // Fails unpredictably on IE[67] when mouse is dragged around quickly.\n try { x = e.clientX - space.left; y = e.clientY - space.top; }\n catch (e) { return null }\n var coords = coordsChar(cm, x, y), line;\n if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {\n var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;\n coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));\n }\n return coords\n }\n\n // Find the view element corresponding to a given line. Return null\n // when the line isn't visible.\n function findViewIndex(cm, n) {\n if (n >= cm.display.viewTo) { return null }\n n -= cm.display.viewFrom;\n if (n < 0) { return null }\n var view = cm.display.view;\n for (var i = 0; i < view.length; i++) {\n n -= view[i].size;\n if (n < 0) { return i }\n }\n }\n\n // Updates the display.view data structure for a given change to the\n // document. From and to are in pre-change coordinates. Lendiff is\n // the amount of lines added or subtracted by the change. This is\n // used for changes that span multiple lines, or change the way\n // lines are divided into visual lines. regLineChange (below)\n // registers single-line changes.\n function regChange(cm, from, to, lendiff) {\n if (from == null) { from = cm.doc.first; }\n if (to == null) { to = cm.doc.first + cm.doc.size; }\n if (!lendiff) { lendiff = 0; }\n\n var display = cm.display;\n if (lendiff && to < display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers > from))\n { display.updateLineNumbers = from; }\n\n cm.curOp.viewChanged = true;\n\n if (from >= display.viewTo) { // Change after\n if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)\n { resetView(cm); }\n } else if (to <= display.viewFrom) { // Change before\n if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {\n resetView(cm);\n } else {\n display.viewFrom += lendiff;\n display.viewTo += lendiff;\n }\n } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap\n resetView(cm);\n } else if (from <= display.viewFrom) { // Top overlap\n var cut = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cut) {\n display.view = display.view.slice(cut.index);\n display.viewFrom = cut.lineN;\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n } else if (to >= display.viewTo) { // Bottom overlap\n var cut$1 = viewCuttingPoint(cm, from, from, -1);\n if (cut$1) {\n display.view = display.view.slice(0, cut$1.index);\n display.viewTo = cut$1.lineN;\n } else {\n resetView(cm);\n }\n } else { // Gap in the middle\n var cutTop = viewCuttingPoint(cm, from, from, -1);\n var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cutTop && cutBot) {\n display.view = display.view.slice(0, cutTop.index)\n .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))\n .concat(display.view.slice(cutBot.index));\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n }\n\n var ext = display.externalMeasured;\n if (ext) {\n if (to < ext.lineN)\n { ext.lineN += lendiff; }\n else if (from < ext.lineN + ext.size)\n { display.externalMeasured = null; }\n }\n }\n\n // Register a change to a single line. Type must be one of \"text\",\n // \"gutter\", \"class\", \"widget\"\n function regLineChange(cm, line, type) {\n cm.curOp.viewChanged = true;\n var display = cm.display, ext = cm.display.externalMeasured;\n if (ext && line >= ext.lineN && line < ext.lineN + ext.size)\n { display.externalMeasured = null; }\n\n if (line < display.viewFrom || line >= display.viewTo) { return }\n var lineView = display.view[findViewIndex(cm, line)];\n if (lineView.node == null) { return }\n var arr = lineView.changes || (lineView.changes = []);\n if (indexOf(arr, type) == -1) { arr.push(type); }\n }\n\n // Clear the view.\n function resetView(cm) {\n cm.display.viewFrom = cm.display.viewTo = cm.doc.first;\n cm.display.view = [];\n cm.display.viewOffset = 0;\n }\n\n function viewCuttingPoint(cm, oldN, newN, dir) {\n var index = findViewIndex(cm, oldN), diff, view = cm.display.view;\n if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)\n { return {index: index, lineN: newN} }\n var n = cm.display.viewFrom;\n for (var i = 0; i < index; i++)\n { n += view[i].size; }\n if (n != oldN) {\n if (dir > 0) {\n if (index == view.length - 1) { return null }\n diff = (n + view[index].size) - oldN;\n index++;\n } else {\n diff = n - oldN;\n }\n oldN += diff; newN += diff;\n }\n while (visualLineNo(cm.doc, newN) != newN) {\n if (index == (dir < 0 ? 0 : view.length - 1)) { return null }\n newN += dir * view[index - (dir < 0 ? 1 : 0)].size;\n index += dir;\n }\n return {index: index, lineN: newN}\n }\n\n // Force the view to cover a given range, adding empty view element\n // or clipping off existing ones as needed.\n function adjustView(cm, from, to) {\n var display = cm.display, view = display.view;\n if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {\n display.view = buildViewArray(cm, from, to);\n display.viewFrom = from;\n } else {\n if (display.viewFrom > from)\n { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); }\n else if (display.viewFrom < from)\n { display.view = display.view.slice(findViewIndex(cm, from)); }\n display.viewFrom = from;\n if (display.viewTo < to)\n { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); }\n else if (display.viewTo > to)\n { display.view = display.view.slice(0, findViewIndex(cm, to)); }\n }\n display.viewTo = to;\n }\n\n // Count the number of lines in the view whose DOM representation is\n // out of date (or nonexistent).\n function countDirtyView(cm) {\n var view = cm.display.view, dirty = 0;\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; }\n }\n return dirty\n }\n\n function updateSelection(cm) {\n cm.display.input.showSelection(cm.display.input.prepareSelection());\n }\n\n function prepareSelection(cm, primary) {\n if ( primary === void 0 ) primary = true;\n\n var doc = cm.doc, result = {};\n var curFragment = result.cursors = document.createDocumentFragment();\n var selFragment = result.selection = document.createDocumentFragment();\n\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n if (!primary && i == doc.sel.primIndex) { continue }\n var range$$1 = doc.sel.ranges[i];\n if (range$$1.from().line >= cm.display.viewTo || range$$1.to().line < cm.display.viewFrom) { continue }\n var collapsed = range$$1.empty();\n if (collapsed || cm.options.showCursorWhenSelecting)\n { drawSelectionCursor(cm, range$$1.head, curFragment); }\n if (!collapsed)\n { drawSelectionRange(cm, range$$1, selFragment); }\n }\n return result\n }\n\n // Draws a cursor for the given range\n function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }\n\n function cmpCoords(a, b) { return a.top - b.top || a.left - b.left }\n\n // Draws the given range as a highlighted selection\n function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n }\n\n // Cursor-blinking\n function restartBlink(cm) {\n if (!cm.state.focused) { return }\n var display = cm.display;\n clearInterval(display.blinker);\n var on = true;\n display.cursorDiv.style.visibility = \"\";\n if (cm.options.cursorBlinkRate > 0)\n { display.blinker = setInterval(function () { return display.cursorDiv.style.visibility = (on = !on) ? \"\" : \"hidden\"; },\n cm.options.cursorBlinkRate); }\n else if (cm.options.cursorBlinkRate < 0)\n { display.cursorDiv.style.visibility = \"hidden\"; }\n }\n\n function ensureFocus(cm) {\n if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }\n }\n\n function delayBlurEvent(cm) {\n cm.state.delayingBlurEvent = true;\n setTimeout(function () { if (cm.state.delayingBlurEvent) {\n cm.state.delayingBlurEvent = false;\n onBlur(cm);\n } }, 100);\n }\n\n function onFocus(cm, e) {\n if (cm.state.delayingBlurEvent) { cm.state.delayingBlurEvent = false; }\n\n if (cm.options.readOnly == \"nocursor\") { return }\n if (!cm.state.focused) {\n signal(cm, \"focus\", cm, e);\n cm.state.focused = true;\n addClass(cm.display.wrapper, \"CodeMirror-focused\");\n // This test prevents this from firing when a context\n // menu is closed (since the input reset would kill the\n // select-all detection hack)\n if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {\n cm.display.input.reset();\n if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730\n }\n cm.display.input.receivedFocus();\n }\n restartBlink(cm);\n }\n function onBlur(cm, e) {\n if (cm.state.delayingBlurEvent) { return }\n\n if (cm.state.focused) {\n signal(cm, \"blur\", cm, e);\n cm.state.focused = false;\n rmClass(cm.display.wrapper, \"CodeMirror-focused\");\n }\n clearInterval(cm.display.blinker);\n setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150);\n }\n\n // Read the actual heights of the rendered lines, and update their\n // stored heights to match.\n function updateHeightsInViewport(cm) {\n var display = cm.display;\n var prevBottom = display.lineDiv.offsetTop;\n for (var i = 0; i < display.view.length; i++) {\n var cur = display.view[i], wrapping = cm.options.lineWrapping;\n var height = (void 0), width = 0;\n if (cur.hidden) { continue }\n if (ie && ie_version < 8) {\n var bot = cur.node.offsetTop + cur.node.offsetHeight;\n height = bot - prevBottom;\n prevBottom = bot;\n } else {\n var box = cur.node.getBoundingClientRect();\n height = box.bottom - box.top;\n // Check that lines don't extend past the right of the current\n // editor width\n if (!wrapping && cur.text.firstChild)\n { width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1; }\n }\n var diff = cur.line.height - height;\n if (diff > .005 || diff < -.005) {\n updateLineHeight(cur.line, height);\n updateWidgetHeight(cur.line);\n if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)\n { updateWidgetHeight(cur.rest[j]); } }\n }\n if (width > cm.display.sizerWidth) {\n var chWidth = Math.ceil(width / charWidth(cm.display));\n if (chWidth > cm.display.maxLineLength) {\n cm.display.maxLineLength = chWidth;\n cm.display.maxLine = cur.line;\n cm.display.maxLineChanged = true;\n }\n }\n }\n }\n\n // Read and store the height of line widgets associated with the\n // given line.\n function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }\n\n // Compute the lines that are visible in a given viewport (defaults\n // the the current scroll position). viewport may contain top,\n // height, and ensure (see op.scrollToPos) properties.\n function visibleLines(display, doc, viewport) {\n var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;\n top = Math.floor(top - paddingTop(display));\n var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;\n\n var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);\n // Ensure is a {from: {line, ch}, to: {line, ch}} object, and\n // forces those lines into the viewport (if possible).\n if (viewport && viewport.ensure) {\n var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;\n if (ensureFrom < from) {\n from = ensureFrom;\n to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);\n } else if (Math.min(ensureTo, doc.lastLine()) >= to) {\n from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);\n to = ensureTo;\n }\n }\n return {from: from, to: Math.max(to, from + 1)}\n }\n\n // SCROLLING THINGS INTO VIEW\n\n // If an editor sits on the top or bottom of the window, partially\n // scrolled out of view, this ensures that the cursor is visible.\n function maybeScrollWindow(cm, rect) {\n if (signalDOMEvent(cm, \"scrollCursorIntoView\")) { return }\n\n var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;\n if (rect.top + box.top < 0) { doScroll = true; }\n else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; }\n if (doScroll != null && !phantom) {\n var scrollNode = elt(\"div\", \"\\u200b\", null, (\"position: absolute;\\n top: \" + (rect.top - display.viewOffset - paddingTop(cm.display)) + \"px;\\n height: \" + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + \"px;\\n left: \" + (rect.left) + \"px; width: \" + (Math.max(2, rect.right - rect.left)) + \"px;\"));\n cm.display.lineSpace.appendChild(scrollNode);\n scrollNode.scrollIntoView(doScroll);\n cm.display.lineSpace.removeChild(scrollNode);\n }\n }\n\n // Scroll a given position into view (immediately), verifying that\n // it actually became visible (as line heights are accurately\n // measured, the position of something may 'drift' during drawing).\n function scrollPosIntoView(cm, pos, end, margin) {\n if (margin == null) { margin = 0; }\n var rect;\n if (!cm.options.lineWrapping && pos == end) {\n // Set pos and end to the cursor positions around the character pos sticks to\n // If pos.sticky == \"before\", that is around pos.ch - 1, otherwise around pos.ch\n // If pos == Pos(_, 0, \"before\"), pos and end are unchanged\n pos = pos.ch ? Pos(pos.line, pos.sticky == \"before\" ? pos.ch - 1 : pos.ch, \"after\") : pos;\n end = pos.sticky == \"before\" ? Pos(pos.line, pos.ch + 1, \"before\") : pos;\n }\n for (var limit = 0; limit < 5; limit++) {\n var changed = false;\n var coords = cursorCoords(cm, pos);\n var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);\n rect = {left: Math.min(coords.left, endCoords.left),\n top: Math.min(coords.top, endCoords.top) - margin,\n right: Math.max(coords.left, endCoords.left),\n bottom: Math.max(coords.bottom, endCoords.bottom) + margin};\n var scrollPos = calculateScrollPos(cm, rect);\n var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;\n if (scrollPos.scrollTop != null) {\n updateScrollTop(cm, scrollPos.scrollTop);\n if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; }\n }\n if (scrollPos.scrollLeft != null) {\n setScrollLeft(cm, scrollPos.scrollLeft);\n if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; }\n }\n if (!changed) { break }\n }\n return rect\n }\n\n // Scroll a given set of coordinates into view (immediately).\n function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }\n\n // Calculate a new scroll position needed to scroll the given\n // rectangle into view. Returns an object with scrollTop and\n // scrollLeft properties. When these are undefined, the\n // vertical/horizontal position does not need to be adjusted.\n function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }\n\n // Store a relative adjustment to the scroll position in the current\n // operation (to be applied when the operation finishes).\n function addToScrollTop(cm, top) {\n if (top == null) { return }\n resolveScrollToPos(cm);\n cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;\n }\n\n // Make sure that at the end of the operation the current cursor is\n // shown.\n function ensureCursorVisible(cm) {\n resolveScrollToPos(cm);\n var cur = cm.getCursor();\n cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin};\n }\n\n function scrollToCoords(cm, x, y) {\n if (x != null || y != null) { resolveScrollToPos(cm); }\n if (x != null) { cm.curOp.scrollLeft = x; }\n if (y != null) { cm.curOp.scrollTop = y; }\n }\n\n function scrollToRange(cm, range$$1) {\n resolveScrollToPos(cm);\n cm.curOp.scrollToPos = range$$1;\n }\n\n // When an operation has its scrollToPos property set, and another\n // scroll action is applied before the end of the operation, this\n // 'simulates' scrolling that position into view in a cheap way, so\n // that the effect of intermediate scroll commands is not ignored.\n function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }\n\n function scrollToCoordsRange(cm, from, to, margin) {\n var sPos = calculateScrollPos(cm, {\n left: Math.min(from.left, to.left),\n top: Math.min(from.top, to.top) - margin,\n right: Math.max(from.right, to.right),\n bottom: Math.max(from.bottom, to.bottom) + margin\n });\n scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);\n }\n\n // Sync the scrollable area and scrollbars, ensure the viewport\n // covers the visible area.\n function updateScrollTop(cm, val) {\n if (Math.abs(cm.doc.scrollTop - val) < 2) { return }\n if (!gecko) { updateDisplaySimple(cm, {top: val}); }\n setScrollTop(cm, val, true);\n if (gecko) { updateDisplaySimple(cm); }\n startWorker(cm, 100);\n }\n\n function setScrollTop(cm, val, forceScroll) {\n val = Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val);\n if (cm.display.scroller.scrollTop == val && !forceScroll) { return }\n cm.doc.scrollTop = val;\n cm.display.scrollbars.setScrollTop(val);\n if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; }\n }\n\n // Sync scroller and scrollbar, ensure the gutter elements are\n // aligned.\n function setScrollLeft(cm, val, isScroller, forceScroll) {\n val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);\n if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return }\n cm.doc.scrollLeft = val;\n alignHorizontally(cm);\n if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; }\n cm.display.scrollbars.setScrollLeft(val);\n }\n\n // SCROLLBARS\n\n // Prepare DOM reads needed to update the scrollbars. Done in one\n // shot to minimize update/measure roundtrips.\n function measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n }\n\n var NativeScrollbars = function(place, scroll, cm) {\n this.cm = cm;\n var vert = this.vert = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n var horiz = this.horiz = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n vert.tabIndex = horiz.tabIndex = -1;\n place(vert); place(horiz);\n\n on(vert, \"scroll\", function () {\n if (vert.clientHeight) { scroll(vert.scrollTop, \"vertical\"); }\n });\n on(horiz, \"scroll\", function () {\n if (horiz.clientWidth) { scroll(horiz.scrollLeft, \"horizontal\"); }\n });\n\n this.checkedZeroWidth = false;\n // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = \"18px\"; }\n };\n\n NativeScrollbars.prototype.update = function (measure) {\n var needsH = measure.scrollWidth > measure.clientWidth + 1;\n var needsV = measure.scrollHeight > measure.clientHeight + 1;\n var sWidth = measure.nativeBarWidth;\n\n if (needsV) {\n this.vert.style.display = \"block\";\n this.vert.style.bottom = needsH ? sWidth + \"px\" : \"0\";\n var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);\n // A bug in IE8 can cause this value to be negative, so guard it.\n this.vert.firstChild.style.height =\n Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + \"px\";\n } else {\n this.vert.style.display = \"\";\n this.vert.firstChild.style.height = \"0\";\n }\n\n if (needsH) {\n this.horiz.style.display = \"block\";\n this.horiz.style.right = needsV ? sWidth + \"px\" : \"0\";\n this.horiz.style.left = measure.barLeft + \"px\";\n var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);\n this.horiz.firstChild.style.width =\n Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + \"px\";\n } else {\n this.horiz.style.display = \"\";\n this.horiz.firstChild.style.width = \"0\";\n }\n\n if (!this.checkedZeroWidth && measure.clientHeight > 0) {\n if (sWidth == 0) { this.zeroWidthHack(); }\n this.checkedZeroWidth = true;\n }\n\n return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}\n };\n\n NativeScrollbars.prototype.setScrollLeft = function (pos) {\n if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; }\n if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, \"horiz\"); }\n };\n\n NativeScrollbars.prototype.setScrollTop = function (pos) {\n if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; }\n if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, \"vert\"); }\n };\n\n NativeScrollbars.prototype.zeroWidthHack = function () {\n var w = mac && !mac_geMountainLion ? \"12px\" : \"18px\";\n this.horiz.style.height = this.vert.style.width = w;\n this.horiz.style.pointerEvents = this.vert.style.pointerEvents = \"none\";\n this.disableHoriz = new Delayed;\n this.disableVert = new Delayed;\n };\n\n NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {\n bar.style.pointerEvents = \"auto\";\n function maybeDisable() {\n // To find out whether the scrollbar is still visible, we\n // check whether the element under the pixel in the bottom\n // right corner of the scrollbar box is the scrollbar box\n // itself (when the bar is still visible) or its filler child\n // (when the bar is hidden). If it is still visible, we keep\n // it enabled, if it's hidden, we disable pointer events.\n var box = bar.getBoundingClientRect();\n var elt$$1 = type == \"vert\" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2)\n : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);\n if (elt$$1 != bar) { bar.style.pointerEvents = \"none\"; }\n else { delay.set(1000, maybeDisable); }\n }\n delay.set(1000, maybeDisable);\n };\n\n NativeScrollbars.prototype.clear = function () {\n var parent = this.horiz.parentNode;\n parent.removeChild(this.horiz);\n parent.removeChild(this.vert);\n };\n\n var NullScrollbars = function () {};\n\n NullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} };\n NullScrollbars.prototype.setScrollLeft = function () {};\n NullScrollbars.prototype.setScrollTop = function () {};\n NullScrollbars.prototype.clear = function () {};\n\n function updateScrollbars(cm, measure) {\n if (!measure) { measure = measureForScrollbars(cm); }\n var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;\n updateScrollbarsInner(cm, measure);\n for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {\n if (startWidth != cm.display.barWidth && cm.options.lineWrapping)\n { updateHeightsInViewport(cm); }\n updateScrollbarsInner(cm, measureForScrollbars(cm));\n startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;\n }\n }\n\n // Re-synchronize the fake scrollbars with the actual size of the\n // content.\n function updateScrollbarsInner(cm, measure) {\n var d = cm.display;\n var sizes = d.scrollbars.update(measure);\n\n d.sizer.style.paddingRight = (d.barWidth = sizes.right) + \"px\";\n d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + \"px\";\n d.heightForcer.style.borderBottom = sizes.bottom + \"px solid transparent\";\n\n if (sizes.right && sizes.bottom) {\n d.scrollbarFiller.style.display = \"block\";\n d.scrollbarFiller.style.height = sizes.bottom + \"px\";\n d.scrollbarFiller.style.width = sizes.right + \"px\";\n } else { d.scrollbarFiller.style.display = \"\"; }\n if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {\n d.gutterFiller.style.display = \"block\";\n d.gutterFiller.style.height = sizes.bottom + \"px\";\n d.gutterFiller.style.width = measure.gutterWidth + \"px\";\n } else { d.gutterFiller.style.display = \"\"; }\n }\n\n var scrollbarModel = {\"native\": NativeScrollbars, \"null\": NullScrollbars};\n\n function initScrollbars(cm) {\n if (cm.display.scrollbars) {\n cm.display.scrollbars.clear();\n if (cm.display.scrollbars.addClass)\n { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n }\n\n cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {\n cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);\n // Prevent clicks in the scrollbars from killing focus\n on(node, \"mousedown\", function () {\n if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); }\n });\n node.setAttribute(\"cm-not-content\", \"true\");\n }, function (pos, axis) {\n if (axis == \"horizontal\") { setScrollLeft(cm, pos); }\n else { updateScrollTop(cm, pos); }\n }, cm);\n if (cm.display.scrollbars.addClass)\n { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n }\n\n // Operations are used to wrap a series of changes to the editor\n // state in such a way that each change won't have to update the\n // cursor and display (which would be awkward, slow, and\n // error-prone). Instead, display updates are batched and then all\n // combined and executed at once.\n\n var nextOpId = 0;\n // Start a new operation.\n function startOperation(cm) {\n cm.curOp = {\n cm: cm,\n viewChanged: false, // Flag that indicates that lines might need to be redrawn\n startHeight: cm.doc.height, // Used to detect need to update scrollbar\n forceUpdate: false, // Used to force a redraw\n updateInput: 0, // Whether to reset the input textarea\n typing: false, // Whether this reset should be careful to leave existing text (for compositing)\n changeObjs: null, // Accumulated changes, for firing change events\n cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on\n cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already\n selectionChanged: false, // Whether the selection needs to be redrawn\n updateMaxLine: false, // Set when the widest line needs to be determined anew\n scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet\n scrollToPos: null, // Used to scroll to a specific position\n focus: false,\n id: ++nextOpId // Unique ID\n };\n pushOperation(cm.curOp);\n }\n\n // Finish an operation, updating the display and signalling delayed events\n function endOperation(cm) {\n var op = cm.curOp;\n if (op) { finishOperation(op, function (group) {\n for (var i = 0; i < group.ops.length; i++)\n { group.ops[i].cm.curOp = null; }\n endOperations(group);\n }); }\n }\n\n // The DOM updates done when an operation finishes are batched so\n // that the minimum number of relayouts are required.\n function endOperations(group) {\n var ops = group.ops;\n for (var i = 0; i < ops.length; i++) // Read DOM\n { endOperation_R1(ops[i]); }\n for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)\n { endOperation_W1(ops[i$1]); }\n for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM\n { endOperation_R2(ops[i$2]); }\n for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)\n { endOperation_W2(ops[i$3]); }\n for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM\n { endOperation_finish(ops[i$4]); }\n }\n\n function endOperation_R1(op) {\n var cm = op.cm, display = cm.display;\n maybeClipScrollbars(cm);\n if (op.updateMaxLine) { findMaxLine(cm); }\n\n op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||\n op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||\n op.scrollToPos.to.line >= display.viewTo) ||\n display.maxLineChanged && cm.options.lineWrapping;\n op.update = op.mustUpdate &&\n new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);\n }\n\n function endOperation_W1(op) {\n op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);\n }\n\n function endOperation_R2(op) {\n var cm = op.cm, display = cm.display;\n if (op.updatedDisplay) { updateHeightsInViewport(cm); }\n\n op.barMeasure = measureForScrollbars(cm);\n\n // If the max line changed since it was last measured, measure it,\n // and ensure the document's width matches it.\n // updateDisplay_W2 will use these properties to do the actual resizing\n if (display.maxLineChanged && !cm.options.lineWrapping) {\n op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;\n cm.display.sizerWidth = op.adjustWidthTo;\n op.barMeasure.scrollWidth =\n Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);\n op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));\n }\n\n if (op.updatedDisplay || op.selectionChanged)\n { op.preparedSelection = display.input.prepareSelection(); }\n }\n\n function endOperation_W2(op) {\n var cm = op.cm;\n\n if (op.adjustWidthTo != null) {\n cm.display.sizer.style.minWidth = op.adjustWidthTo + \"px\";\n if (op.maxScrollLeft < cm.doc.scrollLeft)\n { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); }\n cm.display.maxLineChanged = false;\n }\n\n var takeFocus = op.focus && op.focus == activeElt();\n if (op.preparedSelection)\n { cm.display.input.showSelection(op.preparedSelection, takeFocus); }\n if (op.updatedDisplay || op.startHeight != cm.doc.height)\n { updateScrollbars(cm, op.barMeasure); }\n if (op.updatedDisplay)\n { setDocumentHeight(cm, op.barMeasure); }\n\n if (op.selectionChanged) { restartBlink(cm); }\n\n if (cm.state.focused && op.updateInput)\n { cm.display.input.reset(op.typing); }\n if (takeFocus) { ensureFocus(op.cm); }\n }\n\n function endOperation_finish(op) {\n var cm = op.cm, display = cm.display, doc = cm.doc;\n\n if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); }\n\n // Abort mouse wheel delta measurement, when scrolling explicitly\n if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))\n { display.wheelStartX = display.wheelStartY = null; }\n\n // Propagate the scroll position to the actual DOM scroller\n if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); }\n\n if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); }\n // If we need to scroll a specific position into view, do so.\n if (op.scrollToPos) {\n var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),\n clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);\n maybeScrollWindow(cm, rect);\n }\n\n // Fire events for markers that are hidden/unidden by editing or\n // undoing\n var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;\n if (hidden) { for (var i = 0; i < hidden.length; ++i)\n { if (!hidden[i].lines.length) { signal(hidden[i], \"hide\"); } } }\n if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1)\n { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], \"unhide\"); } } }\n\n if (display.wrapper.offsetHeight)\n { doc.scrollTop = cm.display.scroller.scrollTop; }\n\n // Fire change events, and delayed event handlers\n if (op.changeObjs)\n { signal(cm, \"changes\", cm, op.changeObjs); }\n if (op.update)\n { op.update.finish(); }\n }\n\n // Run the given function in an operation\n function runInOp(cm, f) {\n if (cm.curOp) { return f() }\n startOperation(cm);\n try { return f() }\n finally { endOperation(cm); }\n }\n // Wraps a function in an operation. Returns the wrapped function.\n function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }\n // Used to add methods to editor and doc instances, wrapping them in\n // operations.\n function methodOp(f) {\n return function() {\n if (this.curOp) { return f.apply(this, arguments) }\n startOperation(this);\n try { return f.apply(this, arguments) }\n finally { endOperation(this); }\n }\n }\n function docMethodOp(f) {\n return function() {\n var cm = this.cm;\n if (!cm || cm.curOp) { return f.apply(this, arguments) }\n startOperation(cm);\n try { return f.apply(this, arguments) }\n finally { endOperation(cm); }\n }\n }\n\n // HIGHLIGHT WORKER\n\n function startWorker(cm, time) {\n if (cm.doc.highlightFrontier < cm.display.viewTo)\n { cm.state.highlight.set(time, bind(highlightWorker, cm)); }\n }\n\n function highlightWorker(cm) {\n var doc = cm.doc;\n if (doc.highlightFrontier >= cm.display.viewTo) { return }\n var end = +new Date + cm.options.workTime;\n var context = getContextBefore(cm, doc.highlightFrontier);\n var changedLines = [];\n\n doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {\n if (context.line >= cm.display.viewFrom) { // Visible\n var oldStyles = line.styles;\n var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null;\n var highlighted = highlightLine(cm, line, context, true);\n if (resetState) { context.state = resetState; }\n line.styles = highlighted.styles;\n var oldCls = line.styleClasses, newCls = highlighted.classes;\n if (newCls) { line.styleClasses = newCls; }\n else if (oldCls) { line.styleClasses = null; }\n var ischange = !oldStyles || oldStyles.length != line.styles.length ||\n oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);\n for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; }\n if (ischange) { changedLines.push(context.line); }\n line.stateAfter = context.save();\n context.nextLine();\n } else {\n if (line.text.length <= cm.options.maxHighlightLength)\n { processLine(cm, line.text, context); }\n line.stateAfter = context.line % 5 == 0 ? context.save() : null;\n context.nextLine();\n }\n if (+new Date > end) {\n startWorker(cm, cm.options.workDelay);\n return true\n }\n });\n doc.highlightFrontier = context.line;\n doc.modeFrontier = Math.max(doc.modeFrontier, context.line);\n if (changedLines.length) { runInOp(cm, function () {\n for (var i = 0; i < changedLines.length; i++)\n { regLineChange(cm, changedLines[i], \"text\"); }\n }); }\n }\n\n // DISPLAY DRAWING\n\n var DisplayUpdate = function(cm, viewport, force) {\n var display = cm.display;\n\n this.viewport = viewport;\n // Store some values that we'll need later (but don't want to force a relayout for)\n this.visible = visibleLines(display, cm.doc, viewport);\n this.editorIsHidden = !display.wrapper.offsetWidth;\n this.wrapperHeight = display.wrapper.clientHeight;\n this.wrapperWidth = display.wrapper.clientWidth;\n this.oldDisplayWidth = displayWidth(cm);\n this.force = force;\n this.dims = getDimensions(cm);\n this.events = [];\n };\n\n DisplayUpdate.prototype.signal = function (emitter, type) {\n if (hasHandler(emitter, type))\n { this.events.push(arguments); }\n };\n DisplayUpdate.prototype.finish = function () {\n var this$1 = this;\n\n for (var i = 0; i < this.events.length; i++)\n { signal.apply(null, this$1.events[i]); }\n };\n\n function maybeClipScrollbars(cm) {\n var display = cm.display;\n if (!display.scrollbarsClipped && display.scroller.offsetWidth) {\n display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;\n display.heightForcer.style.height = scrollGap(cm) + \"px\";\n display.sizer.style.marginBottom = -display.nativeBarWidth + \"px\";\n display.sizer.style.borderRightWidth = scrollGap(cm) + \"px\";\n display.scrollbarsClipped = true;\n }\n }\n\n function selectionSnapshot(cm) {\n if (cm.hasFocus()) { return null }\n var active = activeElt();\n if (!active || !contains(cm.display.lineDiv, active)) { return null }\n var result = {activeElt: active};\n if (window.getSelection) {\n var sel = window.getSelection();\n if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {\n result.anchorNode = sel.anchorNode;\n result.anchorOffset = sel.anchorOffset;\n result.focusNode = sel.focusNode;\n result.focusOffset = sel.focusOffset;\n }\n }\n return result\n }\n\n function restoreSelection(snapshot) {\n if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { return }\n snapshot.activeElt.focus();\n if (snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {\n var sel = window.getSelection(), range$$1 = document.createRange();\n range$$1.setEnd(snapshot.anchorNode, snapshot.anchorOffset);\n range$$1.collapse(false);\n sel.removeAllRanges();\n sel.addRange(range$$1);\n sel.extend(snapshot.focusNode, snapshot.focusOffset);\n }\n }\n\n // Does the actual updating of the line display. Bails out\n // (returning false) when there is nothing to be done and forced is\n // false.\n function updateDisplayIfNeeded(cm, update) {\n var display = cm.display, doc = cm.doc;\n\n if (update.editorIsHidden) {\n resetView(cm);\n return false\n }\n\n // Bail out if the visible area is already rendered and nothing changed.\n if (!update.force &&\n update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&\n display.renderedView == display.view && countDirtyView(cm) == 0)\n { return false }\n\n if (maybeUpdateLineNumberWidth(cm)) {\n resetView(cm);\n update.dims = getDimensions(cm);\n }\n\n // Compute a suitable new viewport (from & to)\n var end = doc.first + doc.size;\n var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);\n var to = Math.min(end, update.visible.to + cm.options.viewportMargin);\n if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); }\n if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); }\n if (sawCollapsedSpans) {\n from = visualLineNo(cm.doc, from);\n to = visualLineEndNo(cm.doc, to);\n }\n\n var different = from != display.viewFrom || to != display.viewTo ||\n display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;\n adjustView(cm, from, to);\n\n display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));\n // Position the mover div to align with the current scroll position\n cm.display.mover.style.top = display.viewOffset + \"px\";\n\n var toUpdate = countDirtyView(cm);\n if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))\n { return false }\n\n // For big changes, we hide the enclosing element during the\n // update, since that speeds up the operations on most browsers.\n var selSnapshot = selectionSnapshot(cm);\n if (toUpdate > 4) { display.lineDiv.style.display = \"none\"; }\n patchDisplay(cm, display.updateLineNumbers, update.dims);\n if (toUpdate > 4) { display.lineDiv.style.display = \"\"; }\n display.renderedView = display.view;\n // There might have been a widget with a focused element that got\n // hidden or updated, if so re-focus it.\n restoreSelection(selSnapshot);\n\n // Prevent selection and cursors from interfering with the scroll\n // width and height.\n removeChildren(display.cursorDiv);\n removeChildren(display.selectionDiv);\n display.gutters.style.height = display.sizer.style.minHeight = 0;\n\n if (different) {\n display.lastWrapHeight = update.wrapperHeight;\n display.lastWrapWidth = update.wrapperWidth;\n startWorker(cm, 400);\n }\n\n display.updateLineNumbers = null;\n\n return true\n }\n\n function postUpdateDisplay(cm, update) {\n var viewport = update.viewport;\n\n for (var first = true;; first = false) {\n if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {\n // Clip forced viewport to actual scrollable area.\n if (viewport && viewport.top != null)\n { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; }\n // Updated line heights might result in the drawn area not\n // actually covering the viewport. Keep looping until it does.\n update.visible = visibleLines(cm.display, cm.doc, viewport);\n if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)\n { break }\n }\n if (!updateDisplayIfNeeded(cm, update)) { break }\n updateHeightsInViewport(cm);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n update.force = false;\n }\n\n update.signal(cm, \"update\", cm);\n if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {\n update.signal(cm, \"viewportChange\", cm, cm.display.viewFrom, cm.display.viewTo);\n cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;\n }\n }\n\n function updateDisplaySimple(cm, viewport) {\n var update = new DisplayUpdate(cm, viewport);\n if (updateDisplayIfNeeded(cm, update)) {\n updateHeightsInViewport(cm);\n postUpdateDisplay(cm, update);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n update.finish();\n }\n }\n\n // Sync the actual display DOM structure with display.view, removing\n // nodes for lines that are no longer in view, and creating the ones\n // that are not there yet, and updating the ones that are out of\n // date.\n function patchDisplay(cm, updateNumbersFrom, dims) {\n var display = cm.display, lineNumbers = cm.options.lineNumbers;\n var container = display.lineDiv, cur = container.firstChild;\n\n function rm(node) {\n var next = node.nextSibling;\n // Works around a throw-scroll bug in OS X Webkit\n if (webkit && mac && cm.display.currentWheelTarget == node)\n { node.style.display = \"none\"; }\n else\n { node.parentNode.removeChild(node); }\n return next\n }\n\n var view = display.view, lineN = display.viewFrom;\n // Loop over the elements in the view, syncing cur (the DOM nodes\n // in display.lineDiv) with the view as we go.\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (lineView.hidden) ; else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet\n var node = buildLineElement(cm, lineView, lineN, dims);\n container.insertBefore(node, cur);\n } else { // Already drawn\n while (cur != lineView.node) { cur = rm(cur); }\n var updateNumber = lineNumbers && updateNumbersFrom != null &&\n updateNumbersFrom <= lineN && lineView.lineNumber;\n if (lineView.changes) {\n if (indexOf(lineView.changes, \"gutter\") > -1) { updateNumber = false; }\n updateLineForChanges(cm, lineView, lineN, dims);\n }\n if (updateNumber) {\n removeChildren(lineView.lineNumber);\n lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));\n }\n cur = lineView.node.nextSibling;\n }\n lineN += lineView.size;\n }\n while (cur) { cur = rm(cur); }\n }\n\n function updateGutterSpace(display) {\n var width = display.gutters.offsetWidth;\n display.sizer.style.marginLeft = width + \"px\";\n }\n\n function setDocumentHeight(cm, measure) {\n cm.display.sizer.style.minHeight = measure.docHeight + \"px\";\n cm.display.heightForcer.style.top = measure.docHeight + \"px\";\n cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + \"px\";\n }\n\n // Re-align line numbers and gutter marks to compensate for\n // horizontal scrolling.\n function alignHorizontally(cm) {\n var display = cm.display, view = display.view;\n if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }\n var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;\n var gutterW = display.gutters.offsetWidth, left = comp + \"px\";\n for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {\n if (cm.options.fixedGutter) {\n if (view[i].gutter)\n { view[i].gutter.style.left = left; }\n if (view[i].gutterBackground)\n { view[i].gutterBackground.style.left = left; }\n }\n var align = view[i].alignable;\n if (align) { for (var j = 0; j < align.length; j++)\n { align[j].style.left = left; } }\n } }\n if (cm.options.fixedGutter)\n { display.gutters.style.left = (comp + gutterW) + \"px\"; }\n }\n\n // Used to ensure that the line number gutter is still the right\n // size for the current document size. Returns true when an update\n // is needed.\n function maybeUpdateLineNumberWidth(cm) {\n if (!cm.options.lineNumbers) { return false }\n var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;\n if (last.length != display.lineNumChars) {\n var test = display.measure.appendChild(elt(\"div\", [elt(\"div\", last)],\n \"CodeMirror-linenumber CodeMirror-gutter-elt\"));\n var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;\n display.lineGutter.style.width = \"\";\n display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;\n display.lineNumWidth = display.lineNumInnerWidth + padding;\n display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;\n display.lineGutter.style.width = display.lineNumWidth + \"px\";\n updateGutterSpace(cm.display);\n return true\n }\n return false\n }\n\n function getGutters(gutters, lineNumbers) {\n var result = [], sawLineNumbers = false;\n for (var i = 0; i < gutters.length; i++) {\n var name = gutters[i], style = null;\n if (typeof name != \"string\") { style = name.style; name = name.className; }\n if (name == \"CodeMirror-linenumbers\") {\n if (!lineNumbers) { continue }\n else { sawLineNumbers = true; }\n }\n result.push({className: name, style: style});\n }\n if (lineNumbers && !sawLineNumbers) { result.push({className: \"CodeMirror-linenumbers\", style: null}); }\n return result\n }\n\n // Rebuild the gutter elements, ensure the margin to the left of the\n // code matches their width.\n function renderGutters(display) {\n var gutters = display.gutters, specs = display.gutterSpecs;\n removeChildren(gutters);\n display.lineGutter = null;\n for (var i = 0; i < specs.length; ++i) {\n var ref = specs[i];\n var className = ref.className;\n var style = ref.style;\n var gElt = gutters.appendChild(elt(\"div\", null, \"CodeMirror-gutter \" + className));\n if (style) { gElt.style.cssText = style; }\n if (className == \"CodeMirror-linenumbers\") {\n display.lineGutter = gElt;\n gElt.style.width = (display.lineNumWidth || 1) + \"px\";\n }\n }\n gutters.style.display = specs.length ? \"\" : \"none\";\n updateGutterSpace(display);\n }\n\n function updateGutters(cm) {\n renderGutters(cm.display);\n regChange(cm);\n alignHorizontally(cm);\n }\n\n // The display handles the DOM integration, both for input reading\n // and content drawing. It holds references to DOM nodes and\n // display-related state.\n\n function Display(place, doc, input, options) {\n var d = this;\n this.input = input;\n\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n d.scrollbarFiller.setAttribute(\"cm-not-content\", \"true\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n d.gutterFiller.setAttribute(\"cm-not-content\", \"true\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = eltP(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = eltP(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n var lines = eltP(\"div\", [d.lineSpace], \"CodeMirror-lines\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [lines], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n d.sizerWidth = null;\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }\n\n if (place) {\n if (place.appendChild) { place.appendChild(d.wrapper); }\n else { place(d.wrapper); }\n }\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n d.reportedViewFrom = d.reportedViewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n d.renderedView = null;\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastWrapHeight = d.lastWrapWidth = 0;\n d.updateLineNumbers = null;\n\n d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n d.scrollbarsClipped = false;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n\n d.activeTouch = null;\n\n d.gutterSpecs = getGutters(options.gutters, options.lineNumbers);\n renderGutters(d);\n\n input.init(d);\n }\n\n // Since the delta values reported on mouse wheel events are\n // unstandardized between browsers and even browser versions, and\n // generally horribly unpredictable, this code starts by measuring\n // the scroll effect that the first few mouse wheel events have,\n // and, from that, detects the way it can convert deltas to pixel\n // offsets afterwards.\n //\n // The reason we want to know the amount a wheel event will scroll\n // is that it gives us a chance to update the display before the\n // actual scrolling happens, reducing flickering.\n\n var wheelSamples = 0, wheelPixelsPerUnit = null;\n // Fill in a browser-detected starting value on browsers where we\n // know one. These don't have to be accurate -- the result of them\n // being wrong would just be a slight flicker on the first wheel\n // scroll (if it is large enough).\n if (ie) { wheelPixelsPerUnit = -.53; }\n else if (gecko) { wheelPixelsPerUnit = 15; }\n else if (chrome) { wheelPixelsPerUnit = -.7; }\n else if (safari) { wheelPixelsPerUnit = -1/3; }\n\n function wheelEventDelta(e) {\n var dx = e.wheelDeltaX, dy = e.wheelDeltaY;\n if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; }\n if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; }\n else if (dy == null) { dy = e.wheelDelta; }\n return {x: dx, y: dy}\n }\n function wheelEventPixels(e) {\n var delta = wheelEventDelta(e);\n delta.x *= wheelPixelsPerUnit;\n delta.y *= wheelPixelsPerUnit;\n return delta\n }\n\n function onScrollWheel(cm, e) {\n var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;\n\n var display = cm.display, scroll = display.scroller;\n // Quit if there's nothing to scroll here\n var canScrollX = scroll.scrollWidth > scroll.clientWidth;\n var canScrollY = scroll.scrollHeight > scroll.clientHeight;\n if (!(dx && canScrollX || dy && canScrollY)) { return }\n\n // Webkit browsers on OS X abort momentum scrolls when the target\n // of the scroll event is removed from the scrollable element.\n // This hack (see related code in patchDisplay) makes sure the\n // element is kept around.\n if (dy && mac && webkit) {\n outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {\n for (var i = 0; i < view.length; i++) {\n if (view[i].node == cur) {\n cm.display.currentWheelTarget = cur;\n break outer\n }\n }\n }\n }\n\n // On some browsers, horizontal scrolling will cause redraws to\n // happen before the gutter has been realigned, causing it to\n // wriggle around in a most unseemly way. When we have an\n // estimated pixels/delta value, we just handle horizontal\n // scrolling entirely here. It'll be slightly off from native, but\n // better than glitching out.\n if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {\n if (dy && canScrollY)\n { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * wheelPixelsPerUnit)); }\n setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * wheelPixelsPerUnit));\n // Only prevent default scrolling if vertical scrolling is\n // actually possible. Otherwise, it causes vertical scroll\n // jitter on OSX trackpads when deltaX is small and deltaY\n // is large (issue #3579)\n if (!dy || (dy && canScrollY))\n { e_preventDefault(e); }\n display.wheelStartX = null; // Abort measurement, if in progress\n return\n }\n\n // 'Project' the visible viewport to cover the area that is being\n // scrolled into view (if we know enough to estimate it).\n if (dy && wheelPixelsPerUnit != null) {\n var pixels = dy * wheelPixelsPerUnit;\n var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;\n if (pixels < 0) { top = Math.max(0, top + pixels - 50); }\n else { bot = Math.min(cm.doc.height, bot + pixels + 50); }\n updateDisplaySimple(cm, {top: top, bottom: bot});\n }\n\n if (wheelSamples < 20) {\n if (display.wheelStartX == null) {\n display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;\n display.wheelDX = dx; display.wheelDY = dy;\n setTimeout(function () {\n if (display.wheelStartX == null) { return }\n var movedX = scroll.scrollLeft - display.wheelStartX;\n var movedY = scroll.scrollTop - display.wheelStartY;\n var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||\n (movedX && display.wheelDX && movedX / display.wheelDX);\n display.wheelStartX = display.wheelStartY = null;\n if (!sample) { return }\n wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);\n ++wheelSamples;\n }, 200);\n } else {\n display.wheelDX += dx; display.wheelDY += dy;\n }\n }\n }\n\n // Selection objects are immutable. A new one is created every time\n // the selection changes. A selection is one or more non-overlapping\n // (and non-touching) ranges, sorted, and an integer that indicates\n // which one is the primary selection (the one that's scrolled into\n // view, that getCursor returns, etc).\n var Selection = function(ranges, primIndex) {\n this.ranges = ranges;\n this.primIndex = primIndex;\n };\n\n Selection.prototype.primary = function () { return this.ranges[this.primIndex] };\n\n Selection.prototype.equals = function (other) {\n var this$1 = this;\n\n if (other == this) { return true }\n if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false }\n for (var i = 0; i < this.ranges.length; i++) {\n var here = this$1.ranges[i], there = other.ranges[i];\n if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false }\n }\n return true\n };\n\n Selection.prototype.deepCopy = function () {\n var this$1 = this;\n\n var out = [];\n for (var i = 0; i < this.ranges.length; i++)\n { out[i] = new Range(copyPos(this$1.ranges[i].anchor), copyPos(this$1.ranges[i].head)); }\n return new Selection(out, this.primIndex)\n };\n\n Selection.prototype.somethingSelected = function () {\n var this$1 = this;\n\n for (var i = 0; i < this.ranges.length; i++)\n { if (!this$1.ranges[i].empty()) { return true } }\n return false\n };\n\n Selection.prototype.contains = function (pos, end) {\n var this$1 = this;\n\n if (!end) { end = pos; }\n for (var i = 0; i < this.ranges.length; i++) {\n var range = this$1.ranges[i];\n if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)\n { return i }\n }\n return -1\n };\n\n var Range = function(anchor, head) {\n this.anchor = anchor; this.head = head;\n };\n\n Range.prototype.from = function () { return minPos(this.anchor, this.head) };\n Range.prototype.to = function () { return maxPos(this.anchor, this.head) };\n Range.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch };\n\n // Take an unsorted, potentially overlapping set of ranges, and\n // build a selection out of it. 'Consumes' ranges array (modifying\n // it).\n function normalizeSelection(cm, ranges, primIndex) {\n var mayTouch = cm && cm.options.selectionsMayTouch;\n var prim = ranges[primIndex];\n ranges.sort(function (a, b) { return cmp(a.from(), b.from()); });\n primIndex = indexOf(ranges, prim);\n for (var i = 1; i < ranges.length; i++) {\n var cur = ranges[i], prev = ranges[i - 1];\n var diff = cmp(prev.to(), cur.from());\n if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) {\n var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());\n var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;\n if (i <= primIndex) { --primIndex; }\n ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));\n }\n }\n return new Selection(ranges, primIndex)\n }\n\n function simpleSelection(anchor, head) {\n return new Selection([new Range(anchor, head || anchor)], 0)\n }\n\n // Compute the position of the end of a change (its 'to' property\n // refers to the pre-change end).\n function changeEnd(change) {\n if (!change.text) { return change.to }\n return Pos(change.from.line + change.text.length - 1,\n lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0))\n }\n\n // Adjust a position to refer to the post-change position of the\n // same text, or the end of the change if the change covers it.\n function adjustForChange(pos, change) {\n if (cmp(pos, change.from) < 0) { return pos }\n if (cmp(pos, change.to) <= 0) { return changeEnd(change) }\n\n var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;\n if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; }\n return Pos(line, ch)\n }\n\n function computeSelAfterChange(doc, change) {\n var out = [];\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n var range = doc.sel.ranges[i];\n out.push(new Range(adjustForChange(range.anchor, change),\n adjustForChange(range.head, change)));\n }\n return normalizeSelection(doc.cm, out, doc.sel.primIndex)\n }\n\n function offsetPos(pos, old, nw) {\n if (pos.line == old.line)\n { return Pos(nw.line, pos.ch - old.ch + nw.ch) }\n else\n { return Pos(nw.line + (pos.line - old.line), pos.ch) }\n }\n\n // Used by replaceSelections to allow moving the selection to the\n // start or around the replaced test. Hint may be \"start\" or \"around\".\n function computeReplacedSel(doc, changes, hint) {\n var out = [];\n var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;\n for (var i = 0; i < changes.length; i++) {\n var change = changes[i];\n var from = offsetPos(change.from, oldPrev, newPrev);\n var to = offsetPos(changeEnd(change), oldPrev, newPrev);\n oldPrev = change.to;\n newPrev = to;\n if (hint == \"around\") {\n var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;\n out[i] = new Range(inv ? to : from, inv ? from : to);\n } else {\n out[i] = new Range(from, from);\n }\n }\n return new Selection(out, doc.sel.primIndex)\n }\n\n // Used to get the editor into a consistent state again when options change.\n\n function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }\n\n function resetModeState(cm) {\n cm.doc.iter(function (line) {\n if (line.stateAfter) { line.stateAfter = null; }\n if (line.styles) { line.styles = null; }\n });\n cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first;\n startWorker(cm, 100);\n cm.state.modeGen++;\n if (cm.curOp) { regChange(cm); }\n }\n\n // DOCUMENT DATA STRUCTURE\n\n // By default, updates that start and end at the beginning of a line\n // are treated specially, in order to make the association of line\n // widgets and marker elements with the text behave more intuitive.\n function isWholeLineUpdate(doc, change) {\n return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == \"\" &&\n (!doc.cm || doc.cm.options.wholeLineUpdateBefore)\n }\n\n // Perform a change on the document data structure.\n function updateDoc(doc, change, markedSpans, estimateHeight$$1) {\n function spansFor(n) {return markedSpans ? markedSpans[n] : null}\n function update(line, text, spans) {\n updateLine(line, text, spans, estimateHeight$$1);\n signalLater(line, \"change\", line, change);\n }\n function linesFor(start, end) {\n var result = [];\n for (var i = start; i < end; ++i)\n { result.push(new Line(text[i], spansFor(i), estimateHeight$$1)); }\n return result\n }\n\n var from = change.from, to = change.to, text = change.text;\n var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);\n var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;\n\n // Adjust the line structure\n if (change.full) {\n doc.insert(0, linesFor(0, text.length));\n doc.remove(text.length, doc.size - text.length);\n } else if (isWholeLineUpdate(doc, change)) {\n // This is a whole-line replace. Treated specially to make\n // sure line objects move the way they are supposed to.\n var added = linesFor(0, text.length - 1);\n update(lastLine, lastLine.text, lastSpans);\n if (nlines) { doc.remove(from.line, nlines); }\n if (added.length) { doc.insert(from.line, added); }\n } else if (firstLine == lastLine) {\n if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);\n } else {\n var added$1 = linesFor(1, text.length - 1);\n added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight$$1));\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n doc.insert(from.line + 1, added$1);\n }\n } else if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));\n doc.remove(from.line + 1, nlines);\n } else {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);\n var added$2 = linesFor(1, text.length - 1);\n if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); }\n doc.insert(from.line + 1, added$2);\n }\n\n signalLater(doc, \"change\", doc, change);\n }\n\n // Call f for all linked documents.\n function linkedDocs(doc, f, sharedHistOnly) {\n function propagate(doc, skip, sharedHist) {\n if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) {\n var rel = doc.linked[i];\n if (rel.doc == skip) { continue }\n var shared = sharedHist && rel.sharedHist;\n if (sharedHistOnly && !shared) { continue }\n f(rel.doc, shared);\n propagate(rel.doc, doc, shared);\n } }\n }\n propagate(doc, null, true);\n }\n\n // Attach a document to an editor.\n function attachDoc(cm, doc) {\n if (doc.cm) { throw new Error(\"This document is already in use.\") }\n cm.doc = doc;\n doc.cm = cm;\n estimateLineHeights(cm);\n loadMode(cm);\n setDirectionClass(cm);\n if (!cm.options.lineWrapping) { findMaxLine(cm); }\n cm.options.mode = doc.modeOption;\n regChange(cm);\n }\n\n function setDirectionClass(cm) {\n (cm.doc.direction == \"rtl\" ? addClass : rmClass)(cm.display.lineDiv, \"CodeMirror-rtl\");\n }\n\n function directionChanged(cm) {\n runInOp(cm, function () {\n setDirectionClass(cm);\n regChange(cm);\n });\n }\n\n function History(startGen) {\n // Arrays of change events and selections. Doing something adds an\n // event to done and clears undo. Undoing moves events from done\n // to undone, redoing moves them in the other direction.\n this.done = []; this.undone = [];\n this.undoDepth = Infinity;\n // Used to track when changes can be merged into a single undo\n // event\n this.lastModTime = this.lastSelTime = 0;\n this.lastOp = this.lastSelOp = null;\n this.lastOrigin = this.lastSelOrigin = null;\n // Used by the isClean() method\n this.generation = this.maxGeneration = startGen || 1;\n }\n\n // Create a history change event from an updateDoc-style change\n // object.\n function historyChangeFromChange(doc, change) {\n var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};\n attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);\n linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true);\n return histChange\n }\n\n // Pop all selection events off the end of a history array. Stop at\n // a change event.\n function clearSelectionEvents(array) {\n while (array.length) {\n var last = lst(array);\n if (last.ranges) { array.pop(); }\n else { break }\n }\n }\n\n // Find the top change event in the history. Pop off selection\n // events that are in the way.\n function lastChangeEvent(hist, force) {\n if (force) {\n clearSelectionEvents(hist.done);\n return lst(hist.done)\n } else if (hist.done.length && !lst(hist.done).ranges) {\n return lst(hist.done)\n } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {\n hist.done.pop();\n return lst(hist.done)\n }\n }\n\n // Register a change in the history. Merges changes that are within\n // a single operation, or are close together with an origin that\n // allows merging (starting with \"+\") into a single event.\n function addChangeToHistory(doc, change, selAfter, opId) {\n var hist = doc.history;\n hist.undone.length = 0;\n var time = +new Date, cur;\n var last;\n\n if ((hist.lastOp == opId ||\n hist.lastOrigin == change.origin && change.origin &&\n ((change.origin.charAt(0) == \"+\" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||\n change.origin.charAt(0) == \"*\")) &&\n (cur = lastChangeEvent(hist, hist.lastOp == opId))) {\n // Merge this change into the last event\n last = lst(cur.changes);\n if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {\n // Optimized case for simple insertion -- don't want to add\n // new changesets for every character typed\n last.to = changeEnd(change);\n } else {\n // Add new sub-event\n cur.changes.push(historyChangeFromChange(doc, change));\n }\n } else {\n // Can not be merged, start a new event.\n var before = lst(hist.done);\n if (!before || !before.ranges)\n { pushSelectionToHistory(doc.sel, hist.done); }\n cur = {changes: [historyChangeFromChange(doc, change)],\n generation: hist.generation};\n hist.done.push(cur);\n while (hist.done.length > hist.undoDepth) {\n hist.done.shift();\n if (!hist.done[0].ranges) { hist.done.shift(); }\n }\n }\n hist.done.push(selAfter);\n hist.generation = ++hist.maxGeneration;\n hist.lastModTime = hist.lastSelTime = time;\n hist.lastOp = hist.lastSelOp = opId;\n hist.lastOrigin = hist.lastSelOrigin = change.origin;\n\n if (!last) { signal(doc, \"historyAdded\"); }\n }\n\n function selectionEventCanBeMerged(doc, origin, prev, sel) {\n var ch = origin.charAt(0);\n return ch == \"*\" ||\n ch == \"+\" &&\n prev.ranges.length == sel.ranges.length &&\n prev.somethingSelected() == sel.somethingSelected() &&\n new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500)\n }\n\n // Called whenever the selection changes, sets the new selection as\n // the pending selection in the history, and pushes the old pending\n // selection into the 'done' array when it was significantly\n // different (in number of selected ranges, emptiness, or time).\n function addSelectionToHistory(doc, sel, opId, options) {\n var hist = doc.history, origin = options && options.origin;\n\n // A new event is started when the previous origin does not match\n // the current, or the origins don't allow matching. Origins\n // starting with * are always merged, those starting with + are\n // merged when similar and close together in time.\n if (opId == hist.lastSelOp ||\n (origin && hist.lastSelOrigin == origin &&\n (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||\n selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))\n { hist.done[hist.done.length - 1] = sel; }\n else\n { pushSelectionToHistory(sel, hist.done); }\n\n hist.lastSelTime = +new Date;\n hist.lastSelOrigin = origin;\n hist.lastSelOp = opId;\n if (options && options.clearRedo !== false)\n { clearSelectionEvents(hist.undone); }\n }\n\n function pushSelectionToHistory(sel, dest) {\n var top = lst(dest);\n if (!(top && top.ranges && top.equals(sel)))\n { dest.push(sel); }\n }\n\n // Used to store marked span information in the history.\n function attachLocalSpans(doc, change, from, to) {\n var existing = change[\"spans_\" + doc.id], n = 0;\n doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {\n if (line.markedSpans)\n { (existing || (existing = change[\"spans_\" + doc.id] = {}))[n] = line.markedSpans; }\n ++n;\n });\n }\n\n // When un/re-doing restores text containing marked spans, those\n // that have been explicitly cleared should not be restored.\n function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }\n\n // Retrieve and filter the old marked spans stored in a change event.\n function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }\n\n // Used for un/re-doing changes from the history. Combines the\n // result of computing the existing spans with the set of spans that\n // existed in the history (so that deleting around a span and then\n // undoing brings back the span).\n function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) { return stretched }\n if (!stretched) { return old }\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n { if (oldCur[k].marker == span.marker) { continue spans } }\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old\n }\n\n // Used both to provide a JSON-safe object in .getHistory, and, when\n // detaching a document, to split the history in two\n function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }\n\n // The 'scroll' parameter given to many of these indicated whether\n // the new cursor position should be scrolled into view after\n // modifying the selection.\n\n // If shift is held or the extend flag is set, extends a range to\n // include a given position (and optionally a second position).\n // Otherwise, simply returns the range between the given positions.\n // Used for cursor motion and such.\n function extendRange(range, head, other, extend) {\n if (extend) {\n var anchor = range.anchor;\n if (other) {\n var posBefore = cmp(head, anchor) < 0;\n if (posBefore != (cmp(other, anchor) < 0)) {\n anchor = head;\n head = other;\n } else if (posBefore != (cmp(head, other) < 0)) {\n head = other;\n }\n }\n return new Range(anchor, head)\n } else {\n return new Range(other || head, head)\n }\n }\n\n // Extend the primary selection range, discard the rest.\n function extendSelection(doc, head, other, options, extend) {\n if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); }\n setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options);\n }\n\n // Extend all selections (pos is an array of selections with length\n // equal the number of selections)\n function extendSelections(doc, heads, options) {\n var out = [];\n var extend = doc.cm && (doc.cm.display.shift || doc.extend);\n for (var i = 0; i < doc.sel.ranges.length; i++)\n { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); }\n var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex);\n setSelection(doc, newSel, options);\n }\n\n // Updates a single range in the selection.\n function replaceOneSelection(doc, i, range, options) {\n var ranges = doc.sel.ranges.slice(0);\n ranges[i] = range;\n setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options);\n }\n\n // Reset the selection to a single range.\n function setSimpleSelection(doc, anchor, head, options) {\n setSelection(doc, simpleSelection(anchor, head), options);\n }\n\n // Give beforeSelectionChange handlers a change to influence a\n // selection update.\n function filterSelectionChange(doc, sel, options) {\n var obj = {\n ranges: sel.ranges,\n update: function(ranges) {\n var this$1 = this;\n\n this.ranges = [];\n for (var i = 0; i < ranges.length; i++)\n { this$1.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n clipPos(doc, ranges[i].head)); }\n },\n origin: options && options.origin\n };\n signal(doc, \"beforeSelectionChange\", doc, obj);\n if (doc.cm) { signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj); }\n if (obj.ranges != sel.ranges) { return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) }\n else { return sel }\n }\n\n function setSelectionReplaceHistory(doc, sel, options) {\n var done = doc.history.done, last = lst(done);\n if (last && last.ranges) {\n done[done.length - 1] = sel;\n setSelectionNoUndo(doc, sel, options);\n } else {\n setSelection(doc, sel, options);\n }\n }\n\n // Set a new selection.\n function setSelection(doc, sel, options) {\n setSelectionNoUndo(doc, sel, options);\n addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);\n }\n\n function setSelectionNoUndo(doc, sel, options) {\n if (hasHandler(doc, \"beforeSelectionChange\") || doc.cm && hasHandler(doc.cm, \"beforeSelectionChange\"))\n { sel = filterSelectionChange(doc, sel, options); }\n\n var bias = options && options.bias ||\n (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);\n setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));\n\n if (!(options && options.scroll === false) && doc.cm)\n { ensureCursorVisible(doc.cm); }\n }\n\n function setSelectionInner(doc, sel) {\n if (sel.equals(doc.sel)) { return }\n\n doc.sel = sel;\n\n if (doc.cm) {\n doc.cm.curOp.updateInput = 1;\n doc.cm.curOp.selectionChanged = true;\n signalCursorActivity(doc.cm);\n }\n signalLater(doc, \"cursorActivity\", doc);\n }\n\n // Verify that the selection does not partially select any atomic\n // marked ranges.\n function reCheckSelection(doc) {\n setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false));\n }\n\n // Return a selection that does not partially select any atomic\n // ranges.\n function skipAtomicInSelection(doc, sel, bias, mayClear) {\n var out;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range = sel.ranges[i];\n var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];\n var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);\n var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);\n if (out || newAnchor != range.anchor || newHead != range.head) {\n if (!out) { out = sel.ranges.slice(0, i); }\n out[i] = new Range(newAnchor, newHead);\n }\n }\n return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel\n }\n\n function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {\n var line = getLine(doc, pos.line);\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var sp = line.markedSpans[i], m = sp.marker;\n\n // Determine if we should prevent the cursor being placed to the left/right of an atomic marker\n // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it\n // is with selectLeft/Right\n var preventCursorLeft = (\"selectLeft\" in m) ? !m.selectLeft : m.inclusiveLeft;\n var preventCursorRight = (\"selectRight\" in m) ? !m.selectRight : m.inclusiveRight;\n\n if ((sp.from == null || (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&\n (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch))) {\n if (mayClear) {\n signal(m, \"beforeCursorEnter\");\n if (m.explicitlyCleared) {\n if (!line.markedSpans) { break }\n else {--i; continue}\n }\n }\n if (!m.atomic) { continue }\n\n if (oldPos) {\n var near = m.find(dir < 0 ? 1 : -1), diff = (void 0);\n if (dir < 0 ? preventCursorRight : preventCursorLeft)\n { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); }\n if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))\n { return skipAtomicInner(doc, near, pos, dir, mayClear) }\n }\n\n var far = m.find(dir < 0 ? -1 : 1);\n if (dir < 0 ? preventCursorLeft : preventCursorRight)\n { far = movePos(doc, far, dir, far.line == pos.line ? line : null); }\n return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null\n }\n } }\n return pos\n }\n\n // Ensure a given position is not inside an atomic range.\n function skipAtomic(doc, pos, oldPos, bias, mayClear) {\n var dir = bias || 1;\n var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||\n skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));\n if (!found) {\n doc.cantEdit = true;\n return Pos(doc.first, 0)\n }\n return found\n }\n\n function movePos(doc, pos, dir, line) {\n if (dir < 0 && pos.ch == 0) {\n if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) }\n else { return null }\n } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {\n if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) }\n else { return null }\n } else {\n return new Pos(pos.line, pos.ch + dir)\n }\n }\n\n function selectAll(cm) {\n cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);\n }\n\n // UPDATING\n\n // Allow \"beforeChange\" event handlers to influence a change\n function filterChange(doc, change, update) {\n var obj = {\n canceled: false,\n from: change.from,\n to: change.to,\n text: change.text,\n origin: change.origin,\n cancel: function () { return obj.canceled = true; }\n };\n if (update) { obj.update = function (from, to, text, origin) {\n if (from) { obj.from = clipPos(doc, from); }\n if (to) { obj.to = clipPos(doc, to); }\n if (text) { obj.text = text; }\n if (origin !== undefined) { obj.origin = origin; }\n }; }\n signal(doc, \"beforeChange\", doc, obj);\n if (doc.cm) { signal(doc.cm, \"beforeChange\", doc.cm, obj); }\n\n if (obj.canceled) {\n if (doc.cm) { doc.cm.curOp.updateInput = 2; }\n return null\n }\n return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}\n }\n\n // Apply a change to a document, and add it to the document's\n // history, and propagating it to all linked documents.\n function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }\n\n function makeChangeInner(doc, change) {\n if (change.text.length == 1 && change.text[0] == \"\" && cmp(change.from, change.to) == 0) { return }\n var selAfter = computeSelAfterChange(doc, change);\n addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);\n\n makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));\n var rebased = [];\n\n linkedDocs(doc, function (doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));\n });\n }\n\n // Revert a change stored in a document's history.\n function makeChangeFromHistory(doc, type, allowSelectionOnly) {\n var suppress = doc.cm && doc.cm.state.suppressEdits;\n if (suppress && !allowSelectionOnly) { return }\n\n var hist = doc.history, event, selAfter = doc.sel;\n var source = type == \"undo\" ? hist.done : hist.undone, dest = type == \"undo\" ? hist.undone : hist.done;\n\n // Verify that there is a useable event (so that ctrl-z won't\n // needlessly clear selection events)\n var i = 0;\n for (; i < source.length; i++) {\n event = source[i];\n if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)\n { break }\n }\n if (i == source.length) { return }\n hist.lastOrigin = hist.lastSelOrigin = null;\n\n for (;;) {\n event = source.pop();\n if (event.ranges) {\n pushSelectionToHistory(event, dest);\n if (allowSelectionOnly && !event.equals(doc.sel)) {\n setSelection(doc, event, {clearRedo: false});\n return\n }\n selAfter = event;\n } else if (suppress) {\n source.push(event);\n return\n } else { break }\n }\n\n // Build up a reverse change object to add to the opposite history\n // stack (redo when undoing, and vice versa).\n var antiChanges = [];\n pushSelectionToHistory(selAfter, dest);\n dest.push({changes: antiChanges, generation: hist.generation});\n hist.generation = event.generation || ++hist.maxGeneration;\n\n var filter = hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\");\n\n var loop = function ( i ) {\n var change = event.changes[i];\n change.origin = type;\n if (filter && !filterChange(doc, change, false)) {\n source.length = 0;\n return {}\n }\n\n antiChanges.push(historyChangeFromChange(doc, change));\n\n var after = i ? computeSelAfterChange(doc, change) : lst(source);\n makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));\n if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); }\n var rebased = [];\n\n // Propagate to the linked documents\n linkedDocs(doc, function (doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));\n });\n };\n\n for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {\n var returned = loop( i$1 );\n\n if ( returned ) return returned.v;\n }\n }\n\n // Sub-views need their line numbers shifted when text is added\n // above or below them in the parent document.\n function shiftDoc(doc, distance) {\n if (distance == 0) { return }\n doc.first += distance;\n doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range(\n Pos(range.anchor.line + distance, range.anchor.ch),\n Pos(range.head.line + distance, range.head.ch)\n ); }), doc.sel.primIndex);\n if (doc.cm) {\n regChange(doc.cm, doc.first, doc.first - distance, distance);\n for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)\n { regLineChange(doc.cm, l, \"gutter\"); }\n }\n }\n\n // More lower-level change function, handling only a single document\n // (not linked ones).\n function makeChangeSingleDoc(doc, change, selAfter, spans) {\n if (doc.cm && !doc.cm.curOp)\n { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) }\n\n if (change.to.line < doc.first) {\n shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));\n return\n }\n if (change.from.line > doc.lastLine()) { return }\n\n // Clip the change to the size of this doc\n if (change.from.line < doc.first) {\n var shift = change.text.length - 1 - (doc.first - change.from.line);\n shiftDoc(doc, shift);\n change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),\n text: [lst(change.text)], origin: change.origin};\n }\n var last = doc.lastLine();\n if (change.to.line > last) {\n change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),\n text: [change.text[0]], origin: change.origin};\n }\n\n change.removed = getBetween(doc, change.from, change.to);\n\n if (!selAfter) { selAfter = computeSelAfterChange(doc, change); }\n if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); }\n else { updateDoc(doc, change, spans); }\n setSelectionNoUndo(doc, selAfter, sel_dontScroll);\n\n if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0)))\n { doc.cantEdit = false; }\n }\n\n // Handle the interaction of a change to a document with the editor\n // that this document is part of.\n function makeChangeSingleDocInEditor(cm, change, spans) {\n var doc = cm.doc, display = cm.display, from = change.from, to = change.to;\n\n var recomputeMaxLength = false, checkWidthStart = from.line;\n if (!cm.options.lineWrapping) {\n checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));\n doc.iter(checkWidthStart, to.line + 1, function (line) {\n if (line == display.maxLine) {\n recomputeMaxLength = true;\n return true\n }\n });\n }\n\n if (doc.sel.contains(change.from, change.to) > -1)\n { signalCursorActivity(cm); }\n\n updateDoc(doc, change, spans, estimateHeight(cm));\n\n if (!cm.options.lineWrapping) {\n doc.iter(checkWidthStart, from.line + change.text.length, function (line) {\n var len = lineLength(line);\n if (len > display.maxLineLength) {\n display.maxLine = line;\n display.maxLineLength = len;\n display.maxLineChanged = true;\n recomputeMaxLength = false;\n }\n });\n if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; }\n }\n\n retreatFrontier(doc, from.line);\n startWorker(cm, 400);\n\n var lendiff = change.text.length - (to.line - from.line) - 1;\n // Remember that these lines changed, for updating the display\n if (change.full)\n { regChange(cm); }\n else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))\n { regLineChange(cm, from.line, \"text\"); }\n else\n { regChange(cm, from.line, to.line + 1, lendiff); }\n\n var changesHandler = hasHandler(cm, \"changes\"), changeHandler = hasHandler(cm, \"change\");\n if (changeHandler || changesHandler) {\n var obj = {\n from: from, to: to,\n text: change.text,\n removed: change.removed,\n origin: change.origin\n };\n if (changeHandler) { signalLater(cm, \"change\", cm, obj); }\n if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); }\n }\n cm.display.selForContextMenu = null;\n }\n\n function replaceRange(doc, code, from, to, origin) {\n var assign;\n\n if (!to) { to = from; }\n if (cmp(to, from) < 0) { (assign = [to, from], from = assign[0], to = assign[1]); }\n if (typeof code == \"string\") { code = doc.splitLines(code); }\n makeChange(doc, {from: from, to: to, text: code, origin: origin});\n }\n\n // Rebasing/resetting history to deal with externally-sourced changes\n\n function rebaseHistSelSingle(pos, from, to, diff) {\n if (to < pos.line) {\n pos.line += diff;\n } else if (from < pos.line) {\n pos.line = from;\n pos.ch = 0;\n }\n }\n\n // Tries to rebase an array of history events given a change in the\n // document. If the change touches the same lines as the event, the\n // event, and everything 'behind' it, is discarded. If the change is\n // before the event, the event's positions are updated. Uses a\n // copy-on-write scheme for the positions, to avoid having to\n // reallocate them all on every rebase, but also avoid problems with\n // shared position objects being unsafely updated.\n function rebaseHistArray(array, from, to, diff) {\n for (var i = 0; i < array.length; ++i) {\n var sub = array[i], ok = true;\n if (sub.ranges) {\n if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }\n for (var j = 0; j < sub.ranges.length; j++) {\n rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);\n rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);\n }\n continue\n }\n for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {\n var cur = sub.changes[j$1];\n if (to < cur.from.line) {\n cur.from = Pos(cur.from.line + diff, cur.from.ch);\n cur.to = Pos(cur.to.line + diff, cur.to.ch);\n } else if (from <= cur.to.line) {\n ok = false;\n break\n }\n }\n if (!ok) {\n array.splice(0, i + 1);\n i = 0;\n }\n }\n }\n\n function rebaseHist(hist, change) {\n var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;\n rebaseHistArray(hist.done, from, to, diff);\n rebaseHistArray(hist.undone, from, to, diff);\n }\n\n // Utility for applying a change to a line by handle or number,\n // returning the number and optionally registering the line as\n // changed.\n function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }\n\n // The document is represented as a BTree consisting of leaves, with\n // chunk of lines in them, and branches, with up to ten leaves or\n // other branch nodes below them. The top node is always a branch\n // node, and is the document object itself (meaning it has\n // additional methods and properties).\n //\n // All nodes have parent links. The tree is used both to go from\n // line numbers to line objects, and to go from objects to numbers.\n // It also indexes by height, and is used to convert between height\n // and line object, and to find the total height of the document.\n //\n // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html\n\n function LeafChunk(lines) {\n var this$1 = this;\n\n this.lines = lines;\n this.parent = null;\n var height = 0;\n for (var i = 0; i < lines.length; ++i) {\n lines[i].parent = this$1;\n height += lines[i].height;\n }\n this.height = height;\n }\n\n LeafChunk.prototype = {\n chunkSize: function() { return this.lines.length },\n\n // Remove the n lines at offset 'at'.\n removeInner: function(at, n) {\n var this$1 = this;\n\n for (var i = at, e = at + n; i < e; ++i) {\n var line = this$1.lines[i];\n this$1.height -= line.height;\n cleanUpLine(line);\n signalLater(line, \"delete\");\n }\n this.lines.splice(at, n);\n },\n\n // Helper used to collapse a small branch into a single leaf.\n collapse: function(lines) {\n lines.push.apply(lines, this.lines);\n },\n\n // Insert the given array of lines at offset 'at', count them as\n // having the given height.\n insertInner: function(at, lines, height) {\n var this$1 = this;\n\n this.height += height;\n this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));\n for (var i = 0; i < lines.length; ++i) { lines[i].parent = this$1; }\n },\n\n // Used to iterate over a part of the tree.\n iterN: function(at, n, op) {\n var this$1 = this;\n\n for (var e = at + n; at < e; ++at)\n { if (op(this$1.lines[at])) { return true } }\n }\n };\n\n function BranchChunk(children) {\n var this$1 = this;\n\n this.children = children;\n var size = 0, height = 0;\n for (var i = 0; i < children.length; ++i) {\n var ch = children[i];\n size += ch.chunkSize(); height += ch.height;\n ch.parent = this$1;\n }\n this.size = size;\n this.height = height;\n this.parent = null;\n }\n\n BranchChunk.prototype = {\n chunkSize: function() { return this.size },\n\n removeInner: function(at, n) {\n var this$1 = this;\n\n this.size -= n;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this$1.children[i], sz = child.chunkSize();\n if (at < sz) {\n var rm = Math.min(n, sz - at), oldHeight = child.height;\n child.removeInner(at, rm);\n this$1.height -= oldHeight - child.height;\n if (sz == rm) { this$1.children.splice(i--, 1); child.parent = null; }\n if ((n -= rm) == 0) { break }\n at = 0;\n } else { at -= sz; }\n }\n // If the result is smaller than 25 lines, ensure that it is a\n // single leaf node.\n if (this.size - n < 25 &&\n (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {\n var lines = [];\n this.collapse(lines);\n this.children = [new LeafChunk(lines)];\n this.children[0].parent = this;\n }\n },\n\n collapse: function(lines) {\n var this$1 = this;\n\n for (var i = 0; i < this.children.length; ++i) { this$1.children[i].collapse(lines); }\n },\n\n insertInner: function(at, lines, height) {\n var this$1 = this;\n\n this.size += lines.length;\n this.height += height;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this$1.children[i], sz = child.chunkSize();\n if (at <= sz) {\n child.insertInner(at, lines, height);\n if (child.lines && child.lines.length > 50) {\n // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.\n // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.\n var remaining = child.lines.length % 25 + 25;\n for (var pos = remaining; pos < child.lines.length;) {\n var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));\n child.height -= leaf.height;\n this$1.children.splice(++i, 0, leaf);\n leaf.parent = this$1;\n }\n child.lines = child.lines.slice(0, remaining);\n this$1.maybeSpill();\n }\n break\n }\n at -= sz;\n }\n },\n\n // When a node has grown, check whether it should be split.\n maybeSpill: function() {\n if (this.children.length <= 10) { return }\n var me = this;\n do {\n var spilled = me.children.splice(me.children.length - 5, 5);\n var sibling = new BranchChunk(spilled);\n if (!me.parent) { // Become the parent node\n var copy = new BranchChunk(me.children);\n copy.parent = me;\n me.children = [copy, sibling];\n me = copy;\n } else {\n me.size -= sibling.size;\n me.height -= sibling.height;\n var myIndex = indexOf(me.parent.children, me);\n me.parent.children.splice(myIndex + 1, 0, sibling);\n }\n sibling.parent = me.parent;\n } while (me.children.length > 10)\n me.parent.maybeSpill();\n },\n\n iterN: function(at, n, op) {\n var this$1 = this;\n\n for (var i = 0; i < this.children.length; ++i) {\n var child = this$1.children[i], sz = child.chunkSize();\n if (at < sz) {\n var used = Math.min(n, sz - at);\n if (child.iterN(at, used, op)) { return true }\n if ((n -= used) == 0) { break }\n at = 0;\n } else { at -= sz; }\n }\n }\n };\n\n // Line widgets are block elements displayed above or below a line.\n\n var LineWidget = function(doc, node, options) {\n var this$1 = this;\n\n if (options) { for (var opt in options) { if (options.hasOwnProperty(opt))\n { this$1[opt] = options[opt]; } } }\n this.doc = doc;\n this.node = node;\n };\n\n LineWidget.prototype.clear = function () {\n var this$1 = this;\n\n var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);\n if (no == null || !ws) { return }\n for (var i = 0; i < ws.length; ++i) { if (ws[i] == this$1) { ws.splice(i--, 1); } }\n if (!ws.length) { line.widgets = null; }\n var height = widgetHeight(this);\n updateLineHeight(line, Math.max(0, line.height - height));\n if (cm) {\n runInOp(cm, function () {\n adjustScrollWhenAboveVisible(cm, line, -height);\n regLineChange(cm, no, \"widget\");\n });\n signalLater(cm, \"lineWidgetCleared\", cm, this, no);\n }\n };\n\n LineWidget.prototype.changed = function () {\n var this$1 = this;\n\n var oldH = this.height, cm = this.doc.cm, line = this.line;\n this.height = null;\n var diff = widgetHeight(this) - oldH;\n if (!diff) { return }\n if (!lineIsHidden(this.doc, line)) { updateLineHeight(line, line.height + diff); }\n if (cm) {\n runInOp(cm, function () {\n cm.curOp.forceUpdate = true;\n adjustScrollWhenAboveVisible(cm, line, diff);\n signalLater(cm, \"lineWidgetChanged\", cm, this$1, lineNo(line));\n });\n }\n };\n eventMixin(LineWidget);\n\n function adjustScrollWhenAboveVisible(cm, line, diff) {\n if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))\n { addToScrollTop(cm, diff); }\n }\n\n function addLineWidget(doc, handle, node, options) {\n var widget = new LineWidget(doc, node, options);\n var cm = doc.cm;\n if (cm && widget.noHScroll) { cm.display.alignWidgets = true; }\n changeLine(doc, handle, \"widget\", function (line) {\n var widgets = line.widgets || (line.widgets = []);\n if (widget.insertAt == null) { widgets.push(widget); }\n else { widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); }\n widget.line = line;\n if (cm && !lineIsHidden(doc, line)) {\n var aboveVisible = heightAtLine(line) < doc.scrollTop;\n updateLineHeight(line, line.height + widgetHeight(widget));\n if (aboveVisible) { addToScrollTop(cm, widget.height); }\n cm.curOp.forceUpdate = true;\n }\n return true\n });\n if (cm) { signalLater(cm, \"lineWidgetAdded\", cm, widget, typeof handle == \"number\" ? handle : lineNo(handle)); }\n return widget\n }\n\n // TEXTMARKERS\n\n // Created with markText and setBookmark methods. A TextMarker is a\n // handle that can be used to clear or find a marked position in the\n // document. Line objects hold arrays (markedSpans) containing\n // {from, to, marker} object pointing to such marker objects, and\n // indicating that such a marker is present on that line. Multiple\n // lines may point to the same marker when it spans across lines.\n // The spans will have null for their from/to properties when the\n // marker continues beyond the start/end of the line. Markers have\n // links back to the lines they currently touch.\n\n // Collapsed markers have unique ids, in order to be able to order\n // them, which is needed for uniquely determining an outer marker\n // when they overlap (they may nest, but not partially overlap).\n var nextMarkerId = 0;\n\n var TextMarker = function(doc, type) {\n this.lines = [];\n this.type = type;\n this.doc = doc;\n this.id = ++nextMarkerId;\n };\n\n // Clear the marker.\n TextMarker.prototype.clear = function () {\n var this$1 = this;\n\n if (this.explicitlyCleared) { return }\n var cm = this.doc.cm, withOp = cm && !cm.curOp;\n if (withOp) { startOperation(cm); }\n if (hasHandler(this, \"clear\")) {\n var found = this.find();\n if (found) { signalLater(this, \"clear\", found.from, found.to); }\n }\n var min = null, max = null;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this$1.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this$1);\n if (cm && !this$1.collapsed) { regLineChange(cm, lineNo(line), \"text\"); }\n else if (cm) {\n if (span.to != null) { max = lineNo(line); }\n if (span.from != null) { min = lineNo(line); }\n }\n line.markedSpans = removeMarkedSpan(line.markedSpans, span);\n if (span.from == null && this$1.collapsed && !lineIsHidden(this$1.doc, line) && cm)\n { updateLineHeight(line, textHeight(cm.display)); }\n }\n if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {\n var visual = visualLine(this$1.lines[i$1]), len = lineLength(visual);\n if (len > cm.display.maxLineLength) {\n cm.display.maxLine = visual;\n cm.display.maxLineLength = len;\n cm.display.maxLineChanged = true;\n }\n } }\n\n if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); }\n this.lines.length = 0;\n this.explicitlyCleared = true;\n if (this.atomic && this.doc.cantEdit) {\n this.doc.cantEdit = false;\n if (cm) { reCheckSelection(cm.doc); }\n }\n if (cm) { signalLater(cm, \"markerCleared\", cm, this, min, max); }\n if (withOp) { endOperation(cm); }\n if (this.parent) { this.parent.clear(); }\n };\n\n // Find the position of the marker in the document. Returns a {from,\n // to} object by default. Side can be passed to get a specific side\n // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the\n // Pos objects returned contain a line object, rather than a line\n // number (used to prevent looking up the same line twice).\n TextMarker.prototype.find = function (side, lineObj) {\n var this$1 = this;\n\n if (side == null && this.type == \"bookmark\") { side = 1; }\n var from, to;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this$1.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this$1);\n if (span.from != null) {\n from = Pos(lineObj ? line : lineNo(line), span.from);\n if (side == -1) { return from }\n }\n if (span.to != null) {\n to = Pos(lineObj ? line : lineNo(line), span.to);\n if (side == 1) { return to }\n }\n }\n return from && {from: from, to: to}\n };\n\n // Signals that the marker's widget changed, and surrounding layout\n // should be recomputed.\n TextMarker.prototype.changed = function () {\n var this$1 = this;\n\n var pos = this.find(-1, true), widget = this, cm = this.doc.cm;\n if (!pos || !cm) { return }\n runInOp(cm, function () {\n var line = pos.line, lineN = lineNo(pos.line);\n var view = findViewForLine(cm, lineN);\n if (view) {\n clearLineMeasurementCacheFor(view);\n cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;\n }\n cm.curOp.updateMaxLine = true;\n if (!lineIsHidden(widget.doc, line) && widget.height != null) {\n var oldHeight = widget.height;\n widget.height = null;\n var dHeight = widgetHeight(widget) - oldHeight;\n if (dHeight)\n { updateLineHeight(line, line.height + dHeight); }\n }\n signalLater(cm, \"markerChanged\", cm, this$1);\n });\n };\n\n TextMarker.prototype.attachLine = function (line) {\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp;\n if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)\n { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); }\n }\n this.lines.push(line);\n };\n\n TextMarker.prototype.detachLine = function (line) {\n this.lines.splice(indexOf(this.lines, line), 1);\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp\n ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);\n }\n };\n eventMixin(TextMarker);\n\n // Create a marker, wire it up to the right lines, and\n function markText(doc, from, to, options, type) {\n // Shared markers (across linked documents) are handled separately\n // (markTextShared will call out to this again, once per\n // document).\n if (options && options.shared) { return markTextShared(doc, from, to, options, type) }\n // Ensure we are in an operation.\n if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) }\n\n var marker = new TextMarker(doc, type), diff = cmp(from, to);\n if (options) { copyObj(options, marker, false); }\n // Don't connect empty markers unless clearWhenEmpty is false\n if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)\n { return marker }\n if (marker.replacedWith) {\n // Showing up as a widget implies collapsed (widget replaces text)\n marker.collapsed = true;\n marker.widgetNode = eltP(\"span\", [marker.replacedWith], \"CodeMirror-widget\");\n if (!options.handleMouseEvents) { marker.widgetNode.setAttribute(\"cm-ignore-events\", \"true\"); }\n if (options.insertLeft) { marker.widgetNode.insertLeft = true; }\n }\n if (marker.collapsed) {\n if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||\n from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))\n { throw new Error(\"Inserting collapsed marker partially overlapping an existing one\") }\n seeCollapsedSpans();\n }\n\n if (marker.addToHistory)\n { addChangeToHistory(doc, {from: from, to: to, origin: \"markText\"}, doc.sel, NaN); }\n\n var curLine = from.line, cm = doc.cm, updateMaxLine;\n doc.iter(curLine, to.line + 1, function (line) {\n if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)\n { updateMaxLine = true; }\n if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }\n addMarkedSpan(line, new MarkedSpan(marker,\n curLine == from.line ? from.ch : null,\n curLine == to.line ? to.ch : null));\n ++curLine;\n });\n // lineIsHidden depends on the presence of the spans, so needs a second pass\n if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) {\n if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); }\n }); }\n\n if (marker.clearOnEnter) { on(marker, \"beforeCursorEnter\", function () { return marker.clear(); }); }\n\n if (marker.readOnly) {\n seeReadOnlySpans();\n if (doc.history.done.length || doc.history.undone.length)\n { doc.clearHistory(); }\n }\n if (marker.collapsed) {\n marker.id = ++nextMarkerId;\n marker.atomic = true;\n }\n if (cm) {\n // Sync editor state\n if (updateMaxLine) { cm.curOp.updateMaxLine = true; }\n if (marker.collapsed)\n { regChange(cm, from.line, to.line + 1); }\n else if (marker.className || marker.startStyle || marker.endStyle || marker.css ||\n marker.attributes || marker.title)\n { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, \"text\"); } }\n if (marker.atomic) { reCheckSelection(cm.doc); }\n signalLater(cm, \"markerAdded\", cm, marker);\n }\n return marker\n }\n\n // SHARED TEXTMARKERS\n\n // A shared marker spans multiple linked documents. It is\n // implemented as a meta-marker-object controlling multiple normal\n // markers.\n var SharedTextMarker = function(markers, primary) {\n var this$1 = this;\n\n this.markers = markers;\n this.primary = primary;\n for (var i = 0; i < markers.length; ++i)\n { markers[i].parent = this$1; }\n };\n\n SharedTextMarker.prototype.clear = function () {\n var this$1 = this;\n\n if (this.explicitlyCleared) { return }\n this.explicitlyCleared = true;\n for (var i = 0; i < this.markers.length; ++i)\n { this$1.markers[i].clear(); }\n signalLater(this, \"clear\");\n };\n\n SharedTextMarker.prototype.find = function (side, lineObj) {\n return this.primary.find(side, lineObj)\n };\n eventMixin(SharedTextMarker);\n\n function markTextShared(doc, from, to, options, type) {\n options = copyObj(options);\n options.shared = false;\n var markers = [markText(doc, from, to, options, type)], primary = markers[0];\n var widget = options.widgetNode;\n linkedDocs(doc, function (doc) {\n if (widget) { options.widgetNode = widget.cloneNode(true); }\n markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));\n for (var i = 0; i < doc.linked.length; ++i)\n { if (doc.linked[i].isParent) { return } }\n primary = lst(markers);\n });\n return new SharedTextMarker(markers, primary)\n }\n\n function findSharedMarkers(doc) {\n return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; })\n }\n\n function copySharedMarkers(doc, markers) {\n for (var i = 0; i < markers.length; i++) {\n var marker = markers[i], pos = marker.find();\n var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);\n if (cmp(mFrom, mTo)) {\n var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);\n marker.markers.push(subMark);\n subMark.parent = marker;\n }\n }\n }\n\n function detachSharedMarkers(markers) {\n var loop = function ( i ) {\n var marker = markers[i], linked = [marker.primary.doc];\n linkedDocs(marker.primary.doc, function (d) { return linked.push(d); });\n for (var j = 0; j < marker.markers.length; j++) {\n var subMarker = marker.markers[j];\n if (indexOf(linked, subMarker.doc) == -1) {\n subMarker.parent = null;\n marker.markers.splice(j--, 1);\n }\n }\n };\n\n for (var i = 0; i < markers.length; i++) loop( i );\n }\n\n var nextDocId = 0;\n var Doc = function(text, mode, firstLine, lineSep, direction) {\n if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) }\n if (firstLine == null) { firstLine = 0; }\n\n BranchChunk.call(this, [new LeafChunk([new Line(\"\", null)])]);\n this.first = firstLine;\n this.scrollTop = this.scrollLeft = 0;\n this.cantEdit = false;\n this.cleanGeneration = 1;\n this.modeFrontier = this.highlightFrontier = firstLine;\n var start = Pos(firstLine, 0);\n this.sel = simpleSelection(start);\n this.history = new History(null);\n this.id = ++nextDocId;\n this.modeOption = mode;\n this.lineSep = lineSep;\n this.direction = (direction == \"rtl\") ? \"rtl\" : \"ltr\";\n this.extend = false;\n\n if (typeof text == \"string\") { text = this.splitLines(text); }\n updateDoc(this, {from: start, to: start, text: text});\n setSelection(this, simpleSelection(start), sel_dontScroll);\n };\n\n Doc.prototype = createObj(BranchChunk.prototype, {\n constructor: Doc,\n // Iterate over the document. Supports two forms -- with only one\n // argument, it calls that for each line in the document. With\n // three, it iterates over the range given by the first two (with\n // the second being non-inclusive).\n iter: function(from, to, op) {\n if (op) { this.iterN(from - this.first, to - from, op); }\n else { this.iterN(this.first, this.first + this.size, from); }\n },\n\n // Non-public interface for adding and removing lines.\n insert: function(at, lines) {\n var height = 0;\n for (var i = 0; i < lines.length; ++i) { height += lines[i].height; }\n this.insertInner(at - this.first, lines, height);\n },\n remove: function(at, n) { this.removeInner(at - this.first, n); },\n\n // From here, the methods are part of the public interface. Most\n // are also available from CodeMirror (editor) instances.\n\n getValue: function(lineSep) {\n var lines = getLines(this, this.first, this.first + this.size);\n if (lineSep === false) { return lines }\n return lines.join(lineSep || this.lineSeparator())\n },\n setValue: docMethodOp(function(code) {\n var top = Pos(this.first, 0), last = this.first + this.size - 1;\n makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),\n text: this.splitLines(code), origin: \"setValue\", full: true}, true);\n if (this.cm) { scrollToCoords(this.cm, 0, 0); }\n setSelection(this, simpleSelection(top), sel_dontScroll);\n }),\n replaceRange: function(code, from, to, origin) {\n from = clipPos(this, from);\n to = to ? clipPos(this, to) : from;\n replaceRange(this, code, from, to, origin);\n },\n getRange: function(from, to, lineSep) {\n var lines = getBetween(this, clipPos(this, from), clipPos(this, to));\n if (lineSep === false) { return lines }\n return lines.join(lineSep || this.lineSeparator())\n },\n\n getLine: function(line) {var l = this.getLineHandle(line); return l && l.text},\n\n getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }},\n getLineNumber: function(line) {return lineNo(line)},\n\n getLineHandleVisualStart: function(line) {\n if (typeof line == \"number\") { line = getLine(this, line); }\n return visualLine(line)\n },\n\n lineCount: function() {return this.size},\n firstLine: function() {return this.first},\n lastLine: function() {return this.first + this.size - 1},\n\n clipPos: function(pos) {return clipPos(this, pos)},\n\n getCursor: function(start) {\n var range$$1 = this.sel.primary(), pos;\n if (start == null || start == \"head\") { pos = range$$1.head; }\n else if (start == \"anchor\") { pos = range$$1.anchor; }\n else if (start == \"end\" || start == \"to\" || start === false) { pos = range$$1.to(); }\n else { pos = range$$1.from(); }\n return pos\n },\n listSelections: function() { return this.sel.ranges },\n somethingSelected: function() {return this.sel.somethingSelected()},\n\n setCursor: docMethodOp(function(line, ch, options) {\n setSimpleSelection(this, clipPos(this, typeof line == \"number\" ? Pos(line, ch || 0) : line), null, options);\n }),\n setSelection: docMethodOp(function(anchor, head, options) {\n setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);\n }),\n extendSelection: docMethodOp(function(head, other, options) {\n extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);\n }),\n extendSelections: docMethodOp(function(heads, options) {\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n extendSelectionsBy: docMethodOp(function(f, options) {\n var heads = map(this.sel.ranges, f);\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n setSelections: docMethodOp(function(ranges, primary, options) {\n var this$1 = this;\n\n if (!ranges.length) { return }\n var out = [];\n for (var i = 0; i < ranges.length; i++)\n { out[i] = new Range(clipPos(this$1, ranges[i].anchor),\n clipPos(this$1, ranges[i].head)); }\n if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); }\n setSelection(this, normalizeSelection(this.cm, out, primary), options);\n }),\n addSelection: docMethodOp(function(anchor, head, options) {\n var ranges = this.sel.ranges.slice(0);\n ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));\n setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options);\n }),\n\n getSelection: function(lineSep) {\n var this$1 = this;\n\n var ranges = this.sel.ranges, lines;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this$1, ranges[i].from(), ranges[i].to());\n lines = lines ? lines.concat(sel) : sel;\n }\n if (lineSep === false) { return lines }\n else { return lines.join(lineSep || this.lineSeparator()) }\n },\n getSelections: function(lineSep) {\n var this$1 = this;\n\n var parts = [], ranges = this.sel.ranges;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this$1, ranges[i].from(), ranges[i].to());\n if (lineSep !== false) { sel = sel.join(lineSep || this$1.lineSeparator()); }\n parts[i] = sel;\n }\n return parts\n },\n replaceSelection: function(code, collapse, origin) {\n var dup = [];\n for (var i = 0; i < this.sel.ranges.length; i++)\n { dup[i] = code; }\n this.replaceSelections(dup, collapse, origin || \"+input\");\n },\n replaceSelections: docMethodOp(function(code, collapse, origin) {\n var this$1 = this;\n\n var changes = [], sel = this.sel;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range$$1 = sel.ranges[i];\n changes[i] = {from: range$$1.from(), to: range$$1.to(), text: this$1.splitLines(code[i]), origin: origin};\n }\n var newSel = collapse && collapse != \"end\" && computeReplacedSel(this, changes, collapse);\n for (var i$1 = changes.length - 1; i$1 >= 0; i$1--)\n { makeChange(this$1, changes[i$1]); }\n if (newSel) { setSelectionReplaceHistory(this, newSel); }\n else if (this.cm) { ensureCursorVisible(this.cm); }\n }),\n undo: docMethodOp(function() {makeChangeFromHistory(this, \"undo\");}),\n redo: docMethodOp(function() {makeChangeFromHistory(this, \"redo\");}),\n undoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"undo\", true);}),\n redoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"redo\", true);}),\n\n setExtending: function(val) {this.extend = val;},\n getExtending: function() {return this.extend},\n\n historySize: function() {\n var hist = this.history, done = 0, undone = 0;\n for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } }\n for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } }\n return {undo: done, redo: undone}\n },\n clearHistory: function() {this.history = new History(this.history.maxGeneration);},\n\n markClean: function() {\n this.cleanGeneration = this.changeGeneration(true);\n },\n changeGeneration: function(forceSplit) {\n if (forceSplit)\n { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; }\n return this.history.generation\n },\n isClean: function (gen) {\n return this.history.generation == (gen || this.cleanGeneration)\n },\n\n getHistory: function() {\n return {done: copyHistoryArray(this.history.done),\n undone: copyHistoryArray(this.history.undone)}\n },\n setHistory: function(histData) {\n var hist = this.history = new History(this.history.maxGeneration);\n hist.done = copyHistoryArray(histData.done.slice(0), null, true);\n hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);\n },\n\n setGutterMarker: docMethodOp(function(line, gutterID, value) {\n return changeLine(this, line, \"gutter\", function (line) {\n var markers = line.gutterMarkers || (line.gutterMarkers = {});\n markers[gutterID] = value;\n if (!value && isEmpty(markers)) { line.gutterMarkers = null; }\n return true\n })\n }),\n\n clearGutter: docMethodOp(function(gutterID) {\n var this$1 = this;\n\n this.iter(function (line) {\n if (line.gutterMarkers && line.gutterMarkers[gutterID]) {\n changeLine(this$1, line, \"gutter\", function () {\n line.gutterMarkers[gutterID] = null;\n if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; }\n return true\n });\n }\n });\n }),\n\n lineInfo: function(line) {\n var n;\n if (typeof line == \"number\") {\n if (!isLine(this, line)) { return null }\n n = line;\n line = getLine(this, line);\n if (!line) { return null }\n } else {\n n = lineNo(line);\n if (n == null) { return null }\n }\n return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,\n textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,\n widgets: line.widgets}\n },\n\n addLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n var prop = where == \"text\" ? \"textClass\"\n : where == \"background\" ? \"bgClass\"\n : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n if (!line[prop]) { line[prop] = cls; }\n else if (classTest(cls).test(line[prop])) { return false }\n else { line[prop] += \" \" + cls; }\n return true\n })\n }),\n removeLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n var prop = where == \"text\" ? \"textClass\"\n : where == \"background\" ? \"bgClass\"\n : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n var cur = line[prop];\n if (!cur) { return false }\n else if (cls == null) { line[prop] = null; }\n else {\n var found = cur.match(classTest(cls));\n if (!found) { return false }\n var end = found.index + found[0].length;\n line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? \"\" : \" \") + cur.slice(end) || null;\n }\n return true\n })\n }),\n\n addLineWidget: docMethodOp(function(handle, node, options) {\n return addLineWidget(this, handle, node, options)\n }),\n removeLineWidget: function(widget) { widget.clear(); },\n\n markText: function(from, to, options) {\n return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || \"range\")\n },\n setBookmark: function(pos, options) {\n var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),\n insertLeft: options && options.insertLeft,\n clearWhenEmpty: false, shared: options && options.shared,\n handleMouseEvents: options && options.handleMouseEvents};\n pos = clipPos(this, pos);\n return markText(this, pos, pos, realOpts, \"bookmark\")\n },\n findMarksAt: function(pos) {\n pos = clipPos(this, pos);\n var markers = [], spans = getLine(this, pos.line).markedSpans;\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if ((span.from == null || span.from <= pos.ch) &&\n (span.to == null || span.to >= pos.ch))\n { markers.push(span.marker.parent || span.marker); }\n } }\n return markers\n },\n findMarks: function(from, to, filter) {\n from = clipPos(this, from); to = clipPos(this, to);\n var found = [], lineNo$$1 = from.line;\n this.iter(from.line, to.line + 1, function (line) {\n var spans = line.markedSpans;\n if (spans) { for (var i = 0; i < spans.length; i++) {\n var span = spans[i];\n if (!(span.to != null && lineNo$$1 == from.line && from.ch >= span.to ||\n span.from == null && lineNo$$1 != from.line ||\n span.from != null && lineNo$$1 == to.line && span.from >= to.ch) &&\n (!filter || filter(span.marker)))\n { found.push(span.marker.parent || span.marker); }\n } }\n ++lineNo$$1;\n });\n return found\n },\n getAllMarks: function() {\n var markers = [];\n this.iter(function (line) {\n var sps = line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i)\n { if (sps[i].from != null) { markers.push(sps[i].marker); } } }\n });\n return markers\n },\n\n posFromIndex: function(off) {\n var ch, lineNo$$1 = this.first, sepSize = this.lineSeparator().length;\n this.iter(function (line) {\n var sz = line.text.length + sepSize;\n if (sz > off) { ch = off; return true }\n off -= sz;\n ++lineNo$$1;\n });\n return clipPos(this, Pos(lineNo$$1, ch))\n },\n indexFromPos: function (coords) {\n coords = clipPos(this, coords);\n var index = coords.ch;\n if (coords.line < this.first || coords.ch < 0) { return 0 }\n var sepSize = this.lineSeparator().length;\n this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value\n index += line.text.length + sepSize;\n });\n return index\n },\n\n copy: function(copyHistory) {\n var doc = new Doc(getLines(this, this.first, this.first + this.size),\n this.modeOption, this.first, this.lineSep, this.direction);\n doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;\n doc.sel = this.sel;\n doc.extend = false;\n if (copyHistory) {\n doc.history.undoDepth = this.history.undoDepth;\n doc.setHistory(this.getHistory());\n }\n return doc\n },\n\n linkedDoc: function(options) {\n if (!options) { options = {}; }\n var from = this.first, to = this.first + this.size;\n if (options.from != null && options.from > from) { from = options.from; }\n if (options.to != null && options.to < to) { to = options.to; }\n var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);\n if (options.sharedHist) { copy.history = this.history\n ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});\n copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];\n copySharedMarkers(copy, findSharedMarkers(this));\n return copy\n },\n unlinkDoc: function(other) {\n var this$1 = this;\n\n if (other instanceof CodeMirror) { other = other.doc; }\n if (this.linked) { for (var i = 0; i < this.linked.length; ++i) {\n var link = this$1.linked[i];\n if (link.doc != other) { continue }\n this$1.linked.splice(i, 1);\n other.unlinkDoc(this$1);\n detachSharedMarkers(findSharedMarkers(this$1));\n break\n } }\n // If the histories were shared, split them again\n if (other.history == this.history) {\n var splitIds = [other.id];\n linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true);\n other.history = new History(null);\n other.history.done = copyHistoryArray(this.history.done, splitIds);\n other.history.undone = copyHistoryArray(this.history.undone, splitIds);\n }\n },\n iterLinkedDocs: function(f) {linkedDocs(this, f);},\n\n getMode: function() {return this.mode},\n getEditor: function() {return this.cm},\n\n splitLines: function(str) {\n if (this.lineSep) { return str.split(this.lineSep) }\n return splitLinesAuto(str)\n },\n lineSeparator: function() { return this.lineSep || \"\\n\" },\n\n setDirection: docMethodOp(function (dir) {\n if (dir != \"rtl\") { dir = \"ltr\"; }\n if (dir == this.direction) { return }\n this.direction = dir;\n this.iter(function (line) { return line.order = null; });\n if (this.cm) { directionChanged(this.cm); }\n })\n });\n\n // Public alias.\n Doc.prototype.eachLine = Doc.prototype.iter;\n\n // Kludge to work around strange IE behavior where it'll sometimes\n // re-fire a series of drag-related events right after the drop (#1551)\n var lastDrop = 0;\n\n function onDrop(e) {\n var cm = this;\n clearDragCursor(cm);\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))\n { return }\n e_preventDefault(e);\n if (ie) { lastDrop = +new Date; }\n var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;\n if (!pos || cm.isReadOnly()) { return }\n // Might be a file drop, in which case we simply extract the text\n // and insert it.\n if (files && files.length && window.FileReader && window.File) {\n var n = files.length, text = Array(n), read = 0;\n var loadFile = function (file, i) {\n if (cm.options.allowDropFileTypes &&\n indexOf(cm.options.allowDropFileTypes, file.type) == -1)\n { return }\n\n var reader = new FileReader;\n reader.onload = operation(cm, function () {\n var content = reader.result;\n if (/[\\x00-\\x08\\x0e-\\x1f]{2}/.test(content)) { content = \"\"; }\n text[i] = content;\n if (++read == n) {\n pos = clipPos(cm.doc, pos);\n var change = {from: pos, to: pos,\n text: cm.doc.splitLines(text.join(cm.doc.lineSeparator())),\n origin: \"paste\"};\n makeChange(cm.doc, change);\n setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change)));\n }\n });\n reader.readAsText(file);\n };\n for (var i = 0; i < n; ++i) { loadFile(files[i], i); }\n } else { // Normal drop\n // Don't do a replace if the drop happened inside of the selected text.\n if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {\n cm.state.draggingText(e);\n // Ensure the editor is re-focused\n setTimeout(function () { return cm.display.input.focus(); }, 20);\n return\n }\n try {\n var text$1 = e.dataTransfer.getData(\"Text\");\n if (text$1) {\n var selected;\n if (cm.state.draggingText && !cm.state.draggingText.copy)\n { selected = cm.listSelections(); }\n setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));\n if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1)\n { replaceRange(cm.doc, \"\", selected[i$1].anchor, selected[i$1].head, \"drag\"); } }\n cm.replaceSelection(text$1, \"around\", \"paste\");\n cm.display.input.focus();\n }\n }\n catch(e){}\n }\n }\n\n function onDragStart(cm, e) {\n if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }\n\n e.dataTransfer.setData(\"Text\", cm.getSelection());\n e.dataTransfer.effectAllowed = \"copyMove\";\n\n // Use dummy image instead of default browsers image.\n // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.\n if (e.dataTransfer.setDragImage && !safari) {\n var img = elt(\"img\", null, null, \"position: fixed; left: 0; top: 0;\");\n img.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n if (presto) {\n img.width = img.height = 1;\n cm.display.wrapper.appendChild(img);\n // Force a relayout, or Opera won't use our image for some obscure reason\n img._top = img.offsetTop;\n }\n e.dataTransfer.setDragImage(img, 0, 0);\n if (presto) { img.parentNode.removeChild(img); }\n }\n }\n\n function onDragOver(cm, e) {\n var pos = posFromMouse(cm, e);\n if (!pos) { return }\n var frag = document.createDocumentFragment();\n drawSelectionCursor(cm, pos, frag);\n if (!cm.display.dragCursor) {\n cm.display.dragCursor = elt(\"div\", null, \"CodeMirror-cursors CodeMirror-dragcursors\");\n cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);\n }\n removeChildrenAndAdd(cm.display.dragCursor, frag);\n }\n\n function clearDragCursor(cm) {\n if (cm.display.dragCursor) {\n cm.display.lineSpace.removeChild(cm.display.dragCursor);\n cm.display.dragCursor = null;\n }\n }\n\n // These must be handled carefully, because naively registering a\n // handler for each editor will cause the editors to never be\n // garbage collected.\n\n function forEachCodeMirror(f) {\n if (!document.getElementsByClassName) { return }\n var byClass = document.getElementsByClassName(\"CodeMirror\"), editors = [];\n for (var i = 0; i < byClass.length; i++) {\n var cm = byClass[i].CodeMirror;\n if (cm) { editors.push(cm); }\n }\n if (editors.length) { editors[0].operation(function () {\n for (var i = 0; i < editors.length; i++) { f(editors[i]); }\n }); }\n }\n\n var globalsRegistered = false;\n function ensureGlobalHandlers() {\n if (globalsRegistered) { return }\n registerGlobalHandlers();\n globalsRegistered = true;\n }\n function registerGlobalHandlers() {\n // When the window resizes, we need to refresh active editors.\n var resizeTimer;\n on(window, \"resize\", function () {\n if (resizeTimer == null) { resizeTimer = setTimeout(function () {\n resizeTimer = null;\n forEachCodeMirror(onResize);\n }, 100); }\n });\n // When the window loses focus, we want to show the editor as blurred\n on(window, \"blur\", function () { return forEachCodeMirror(onBlur); });\n }\n // Called when the window resizes\n function onResize(cm) {\n var d = cm.display;\n // Might be a text scaling operation, clear size caches.\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n d.scrollbarsClipped = false;\n cm.setSize();\n }\n\n var keyNames = {\n 3: \"Pause\", 8: \"Backspace\", 9: \"Tab\", 13: \"Enter\", 16: \"Shift\", 17: \"Ctrl\", 18: \"Alt\",\n 19: \"Pause\", 20: \"CapsLock\", 27: \"Esc\", 32: \"Space\", 33: \"PageUp\", 34: \"PageDown\", 35: \"End\",\n 36: \"Home\", 37: \"Left\", 38: \"Up\", 39: \"Right\", 40: \"Down\", 44: \"PrintScrn\", 45: \"Insert\",\n 46: \"Delete\", 59: \";\", 61: \"=\", 91: \"Mod\", 92: \"Mod\", 93: \"Mod\",\n 106: \"*\", 107: \"=\", 109: \"-\", 110: \".\", 111: \"/\", 145: \"ScrollLock\",\n 173: \"-\", 186: \";\", 187: \"=\", 188: \",\", 189: \"-\", 190: \".\", 191: \"/\", 192: \"`\", 219: \"[\", 220: \"\\\\\",\n 221: \"]\", 222: \"'\", 63232: \"Up\", 63233: \"Down\", 63234: \"Left\", 63235: \"Right\", 63272: \"Delete\",\n 63273: \"Home\", 63275: \"End\", 63276: \"PageUp\", 63277: \"PageDown\", 63302: \"Insert\"\n };\n\n // Number keys\n for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); }\n // Alphabetic keys\n for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); }\n // Function keys\n for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = \"F\" + i$2; }\n\n var keyMap = {};\n\n keyMap.basic = {\n \"Left\": \"goCharLeft\", \"Right\": \"goCharRight\", \"Up\": \"goLineUp\", \"Down\": \"goLineDown\",\n \"End\": \"goLineEnd\", \"Home\": \"goLineStartSmart\", \"PageUp\": \"goPageUp\", \"PageDown\": \"goPageDown\",\n \"Delete\": \"delCharAfter\", \"Backspace\": \"delCharBefore\", \"Shift-Backspace\": \"delCharBefore\",\n \"Tab\": \"defaultTab\", \"Shift-Tab\": \"indentAuto\",\n \"Enter\": \"newlineAndIndent\", \"Insert\": \"toggleOverwrite\",\n \"Esc\": \"singleSelection\"\n };\n // Note that the save and find-related commands aren't defined by\n // default. User code or addons can define them. Unknown commands\n // are simply ignored.\n keyMap.pcDefault = {\n \"Ctrl-A\": \"selectAll\", \"Ctrl-D\": \"deleteLine\", \"Ctrl-Z\": \"undo\", \"Shift-Ctrl-Z\": \"redo\", \"Ctrl-Y\": \"redo\",\n \"Ctrl-Home\": \"goDocStart\", \"Ctrl-End\": \"goDocEnd\", \"Ctrl-Up\": \"goLineUp\", \"Ctrl-Down\": \"goLineDown\",\n \"Ctrl-Left\": \"goGroupLeft\", \"Ctrl-Right\": \"goGroupRight\", \"Alt-Left\": \"goLineStart\", \"Alt-Right\": \"goLineEnd\",\n \"Ctrl-Backspace\": \"delGroupBefore\", \"Ctrl-Delete\": \"delGroupAfter\", \"Ctrl-S\": \"save\", \"Ctrl-F\": \"find\",\n \"Ctrl-G\": \"findNext\", \"Shift-Ctrl-G\": \"findPrev\", \"Shift-Ctrl-F\": \"replace\", \"Shift-Ctrl-R\": \"replaceAll\",\n \"Ctrl-[\": \"indentLess\", \"Ctrl-]\": \"indentMore\",\n \"Ctrl-U\": \"undoSelection\", \"Shift-Ctrl-U\": \"redoSelection\", \"Alt-U\": \"redoSelection\",\n \"fallthrough\": \"basic\"\n };\n // Very basic readline/emacs-style bindings, which are standard on Mac.\n keyMap.emacsy = {\n \"Ctrl-F\": \"goCharRight\", \"Ctrl-B\": \"goCharLeft\", \"Ctrl-P\": \"goLineUp\", \"Ctrl-N\": \"goLineDown\",\n \"Alt-F\": \"goWordRight\", \"Alt-B\": \"goWordLeft\", \"Ctrl-A\": \"goLineStart\", \"Ctrl-E\": \"goLineEnd\",\n \"Ctrl-V\": \"goPageDown\", \"Shift-Ctrl-V\": \"goPageUp\", \"Ctrl-D\": \"delCharAfter\", \"Ctrl-H\": \"delCharBefore\",\n \"Alt-D\": \"delWordAfter\", \"Alt-Backspace\": \"delWordBefore\", \"Ctrl-K\": \"killLine\", \"Ctrl-T\": \"transposeChars\",\n \"Ctrl-O\": \"openLine\"\n };\n keyMap.macDefault = {\n \"Cmd-A\": \"selectAll\", \"Cmd-D\": \"deleteLine\", \"Cmd-Z\": \"undo\", \"Shift-Cmd-Z\": \"redo\", \"Cmd-Y\": \"redo\",\n \"Cmd-Home\": \"goDocStart\", \"Cmd-Up\": \"goDocStart\", \"Cmd-End\": \"goDocEnd\", \"Cmd-Down\": \"goDocEnd\", \"Alt-Left\": \"goGroupLeft\",\n \"Alt-Right\": \"goGroupRight\", \"Cmd-Left\": \"goLineLeft\", \"Cmd-Right\": \"goLineRight\", \"Alt-Backspace\": \"delGroupBefore\",\n \"Ctrl-Alt-Backspace\": \"delGroupAfter\", \"Alt-Delete\": \"delGroupAfter\", \"Cmd-S\": \"save\", \"Cmd-F\": \"find\",\n \"Cmd-G\": \"findNext\", \"Shift-Cmd-G\": \"findPrev\", \"Cmd-Alt-F\": \"replace\", \"Shift-Cmd-Alt-F\": \"replaceAll\",\n \"Cmd-[\": \"indentLess\", \"Cmd-]\": \"indentMore\", \"Cmd-Backspace\": \"delWrappedLineLeft\", \"Cmd-Delete\": \"delWrappedLineRight\",\n \"Cmd-U\": \"undoSelection\", \"Shift-Cmd-U\": \"redoSelection\", \"Ctrl-Up\": \"goDocStart\", \"Ctrl-Down\": \"goDocEnd\",\n \"fallthrough\": [\"basic\", \"emacsy\"]\n };\n keyMap[\"default\"] = mac ? keyMap.macDefault : keyMap.pcDefault;\n\n // KEYMAP DISPATCH\n\n function normalizeKeyName(name) {\n var parts = name.split(/-(?!$)/);\n name = parts[parts.length - 1];\n var alt, ctrl, shift, cmd;\n for (var i = 0; i < parts.length - 1; i++) {\n var mod = parts[i];\n if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; }\n else if (/^a(lt)?$/i.test(mod)) { alt = true; }\n else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }\n else if (/^s(hift)?$/i.test(mod)) { shift = true; }\n else { throw new Error(\"Unrecognized modifier name: \" + mod) }\n }\n if (alt) { name = \"Alt-\" + name; }\n if (ctrl) { name = \"Ctrl-\" + name; }\n if (cmd) { name = \"Cmd-\" + name; }\n if (shift) { name = \"Shift-\" + name; }\n return name\n }\n\n // This is a kludge to keep keymaps mostly working as raw objects\n // (backwards compatibility) while at the same time support features\n // like normalization and multi-stroke key bindings. It compiles a\n // new normalized keymap, and then updates the old object to reflect\n // this.\n function normalizeKeyMap(keymap) {\n var copy = {};\n for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {\n var value = keymap[keyname];\n if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }\n if (value == \"...\") { delete keymap[keyname]; continue }\n\n var keys = map(keyname.split(\" \"), normalizeKeyName);\n for (var i = 0; i < keys.length; i++) {\n var val = (void 0), name = (void 0);\n if (i == keys.length - 1) {\n name = keys.join(\" \");\n val = value;\n } else {\n name = keys.slice(0, i + 1).join(\" \");\n val = \"...\";\n }\n var prev = copy[name];\n if (!prev) { copy[name] = val; }\n else if (prev != val) { throw new Error(\"Inconsistent bindings for \" + name) }\n }\n delete keymap[keyname];\n } }\n for (var prop in copy) { keymap[prop] = copy[prop]; }\n return keymap\n }\n\n function lookupKey(key, map$$1, handle, context) {\n map$$1 = getKeyMap(map$$1);\n var found = map$$1.call ? map$$1.call(key, context) : map$$1[key];\n if (found === false) { return \"nothing\" }\n if (found === \"...\") { return \"multi\" }\n if (found != null && handle(found)) { return \"handled\" }\n\n if (map$$1.fallthrough) {\n if (Object.prototype.toString.call(map$$1.fallthrough) != \"[object Array]\")\n { return lookupKey(key, map$$1.fallthrough, handle, context) }\n for (var i = 0; i < map$$1.fallthrough.length; i++) {\n var result = lookupKey(key, map$$1.fallthrough[i], handle, context);\n if (result) { return result }\n }\n }\n }\n\n // Modifier key presses don't count as 'real' key presses for the\n // purpose of keymap fallthrough.\n function isModifierKey(value) {\n var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\"\n }\n\n function addModifierNames(name, event, noShift) {\n var base = name;\n if (event.altKey && base != \"Alt\") { name = \"Alt-\" + name; }\n if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != \"Ctrl\") { name = \"Ctrl-\" + name; }\n if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != \"Cmd\") { name = \"Cmd-\" + name; }\n if (!noShift && event.shiftKey && base != \"Shift\") { name = \"Shift-\" + name; }\n return name\n }\n\n // Look up the name of a key as indicated by an event object.\n function keyName(event, noShift) {\n if (presto && event.keyCode == 34 && event[\"char\"]) { return false }\n var name = keyNames[event.keyCode];\n if (name == null || event.altGraphKey) { return false }\n // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,\n // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)\n if (event.keyCode == 3 && event.code) { name = event.code; }\n return addModifierNames(name, event, noShift)\n }\n\n function getKeyMap(val) {\n return typeof val == \"string\" ? keyMap[val] : val\n }\n\n // Helper for deleting text near the selection(s), used to implement\n // backspace, delete, and similar functionality.\n function deleteNearSelection(cm, compute) {\n var ranges = cm.doc.sel.ranges, kill = [];\n // Build up a set of ranges to kill first, merging overlapping\n // ranges.\n for (var i = 0; i < ranges.length; i++) {\n var toKill = compute(ranges[i]);\n while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {\n var replaced = kill.pop();\n if (cmp(replaced.from, toKill.from) < 0) {\n toKill.from = replaced.from;\n break\n }\n }\n kill.push(toKill);\n }\n // Next, remove those actual ranges.\n runInOp(cm, function () {\n for (var i = kill.length - 1; i >= 0; i--)\n { replaceRange(cm.doc, \"\", kill[i].from, kill[i].to, \"+delete\"); }\n ensureCursorVisible(cm);\n });\n }\n\n function moveCharLogically(line, ch, dir) {\n var target = skipExtendingChars(line.text, ch + dir, dir);\n return target < 0 || target > line.text.length ? null : target\n }\n\n function moveLogically(line, start, dir) {\n var ch = moveCharLogically(line, start.ch, dir);\n return ch == null ? null : new Pos(start.line, ch, dir < 0 ? \"after\" : \"before\")\n }\n\n function endOfLine(visually, cm, lineObj, lineNo, dir) {\n if (visually) {\n var order = getOrder(lineObj, cm.doc.direction);\n if (order) {\n var part = dir < 0 ? lst(order) : order[0];\n var moveInStorageOrder = (dir < 0) == (part.level == 1);\n var sticky = moveInStorageOrder ? \"after\" : \"before\";\n var ch;\n // With a wrapped rtl chunk (possibly spanning multiple bidi parts),\n // it could be that the last bidi part is not on the last visual line,\n // since visual lines contain content order-consecutive chunks.\n // Thus, in rtl, we are looking for the first (content-order) character\n // in the rtl chunk that is on the last line (that is, the same line\n // as the last (content-order) character).\n if (part.level > 0 || cm.doc.direction == \"rtl\") {\n var prep = prepareMeasureForLine(cm, lineObj);\n ch = dir < 0 ? lineObj.text.length - 1 : 0;\n var targetTop = measureCharPrepared(cm, prep, ch).top;\n ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch);\n if (sticky == \"before\") { ch = moveCharLogically(lineObj, ch, 1); }\n } else { ch = dir < 0 ? part.to : part.from; }\n return new Pos(lineNo, ch, sticky)\n }\n }\n return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? \"before\" : \"after\")\n }\n\n function moveVisually(cm, line, start, dir) {\n var bidi = getOrder(line, cm.doc.direction);\n if (!bidi) { return moveLogically(line, start, dir) }\n if (start.ch >= line.text.length) {\n start.ch = line.text.length;\n start.sticky = \"before\";\n } else if (start.ch <= 0) {\n start.ch = 0;\n start.sticky = \"after\";\n }\n var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos];\n if (cm.doc.direction == \"ltr\" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {\n // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,\n // nothing interesting happens.\n return moveLogically(line, start, dir)\n }\n\n var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); };\n var prep;\n var getWrappedLineExtent = function (ch) {\n if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }\n prep = prep || prepareMeasureForLine(cm, line);\n return wrappedLineExtentChar(cm, line, prep, ch)\n };\n var wrappedLineExtent = getWrappedLineExtent(start.sticky == \"before\" ? mv(start, -1) : start.ch);\n\n if (cm.doc.direction == \"rtl\" || part.level == 1) {\n var moveInStorageOrder = (part.level == 1) == (dir < 0);\n var ch = mv(start, moveInStorageOrder ? 1 : -1);\n if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {\n // Case 2: We move within an rtl part or in an rtl editor on the same visual line\n var sticky = moveInStorageOrder ? \"before\" : \"after\";\n return new Pos(start.line, ch, sticky)\n }\n }\n\n // Case 3: Could not move within this bidi part in this visual line, so leave\n // the current bidi part\n\n var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {\n var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder\n ? new Pos(start.line, mv(ch, 1), \"before\")\n : new Pos(start.line, ch, \"after\"); };\n\n for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {\n var part = bidi[partPos];\n var moveInStorageOrder = (dir > 0) == (part.level != 1);\n var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);\n if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }\n ch = moveInStorageOrder ? part.from : mv(part.to, -1);\n if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }\n }\n };\n\n // Case 3a: Look for other bidi parts on the same visual line\n var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);\n if (res) { return res }\n\n // Case 3b: Look for other bidi parts on the next visual line\n var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);\n if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {\n res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));\n if (res) { return res }\n }\n\n // Case 4: Nowhere to move\n return null\n }\n\n // Commands are parameter-less actions that can be performed on an\n // editor, mostly used for keybindings.\n var commands = {\n selectAll: selectAll,\n singleSelection: function (cm) { return cm.setSelection(cm.getCursor(\"anchor\"), cm.getCursor(\"head\"), sel_dontScroll); },\n killLine: function (cm) { return deleteNearSelection(cm, function (range) {\n if (range.empty()) {\n var len = getLine(cm.doc, range.head.line).text.length;\n if (range.head.ch == len && range.head.line < cm.lastLine())\n { return {from: range.head, to: Pos(range.head.line + 1, 0)} }\n else\n { return {from: range.head, to: Pos(range.head.line, len)} }\n } else {\n return {from: range.from(), to: range.to()}\n }\n }); },\n deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n from: Pos(range.from().line, 0),\n to: clipPos(cm.doc, Pos(range.to().line + 1, 0))\n }); }); },\n delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n from: Pos(range.from().line, 0), to: range.from()\n }); }); },\n delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n var leftPos = cm.coordsChar({left: 0, top: top}, \"div\");\n return {from: leftPos, to: range.from()}\n }); },\n delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n return {from: range.from(), to: rightPos }\n }); },\n undo: function (cm) { return cm.undo(); },\n redo: function (cm) { return cm.redo(); },\n undoSelection: function (cm) { return cm.undoSelection(); },\n redoSelection: function (cm) { return cm.redoSelection(); },\n goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); },\n goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); },\n goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); },\n {origin: \"+move\", bias: 1}\n ); },\n goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); },\n {origin: \"+move\", bias: 1}\n ); },\n goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); },\n {origin: \"+move\", bias: -1}\n ); },\n goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\")\n }, sel_move); },\n goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n return cm.coordsChar({left: 0, top: top}, \"div\")\n }, sel_move); },\n goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n var pos = cm.coordsChar({left: 0, top: top}, \"div\");\n if (pos.ch < cm.getLine(pos.line).search(/\\S/)) { return lineStartSmart(cm, range.head) }\n return pos\n }, sel_move); },\n goLineUp: function (cm) { return cm.moveV(-1, \"line\"); },\n goLineDown: function (cm) { return cm.moveV(1, \"line\"); },\n goPageUp: function (cm) { return cm.moveV(-1, \"page\"); },\n goPageDown: function (cm) { return cm.moveV(1, \"page\"); },\n goCharLeft: function (cm) { return cm.moveH(-1, \"char\"); },\n goCharRight: function (cm) { return cm.moveH(1, \"char\"); },\n goColumnLeft: function (cm) { return cm.moveH(-1, \"column\"); },\n goColumnRight: function (cm) { return cm.moveH(1, \"column\"); },\n goWordLeft: function (cm) { return cm.moveH(-1, \"word\"); },\n goGroupRight: function (cm) { return cm.moveH(1, \"group\"); },\n goGroupLeft: function (cm) { return cm.moveH(-1, \"group\"); },\n goWordRight: function (cm) { return cm.moveH(1, \"word\"); },\n delCharBefore: function (cm) { return cm.deleteH(-1, \"char\"); },\n delCharAfter: function (cm) { return cm.deleteH(1, \"char\"); },\n delWordBefore: function (cm) { return cm.deleteH(-1, \"word\"); },\n delWordAfter: function (cm) { return cm.deleteH(1, \"word\"); },\n delGroupBefore: function (cm) { return cm.deleteH(-1, \"group\"); },\n delGroupAfter: function (cm) { return cm.deleteH(1, \"group\"); },\n indentAuto: function (cm) { return cm.indentSelection(\"smart\"); },\n indentMore: function (cm) { return cm.indentSelection(\"add\"); },\n indentLess: function (cm) { return cm.indentSelection(\"subtract\"); },\n insertTab: function (cm) { return cm.replaceSelection(\"\\t\"); },\n insertSoftTab: function (cm) {\n var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;\n for (var i = 0; i < ranges.length; i++) {\n var pos = ranges[i].from();\n var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);\n spaces.push(spaceStr(tabSize - col % tabSize));\n }\n cm.replaceSelections(spaces);\n },\n defaultTab: function (cm) {\n if (cm.somethingSelected()) { cm.indentSelection(\"add\"); }\n else { cm.execCommand(\"insertTab\"); }\n },\n // Swap the two chars left and right of each selection's head.\n // Move cursor behind the two swapped characters afterwards.\n //\n // Doesn't consider line feeds a character.\n // Doesn't scan more than one line above to find a character.\n // Doesn't do anything on an empty line.\n // Doesn't do anything with non-empty selections.\n transposeChars: function (cm) { return runInOp(cm, function () {\n var ranges = cm.listSelections(), newSel = [];\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].empty()) { continue }\n var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;\n if (line) {\n if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); }\n if (cur.ch > 0) {\n cur = new Pos(cur.line, cur.ch + 1);\n cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),\n Pos(cur.line, cur.ch - 2), cur, \"+transpose\");\n } else if (cur.line > cm.doc.first) {\n var prev = getLine(cm.doc, cur.line - 1).text;\n if (prev) {\n cur = new Pos(cur.line, 1);\n cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +\n prev.charAt(prev.length - 1),\n Pos(cur.line - 1, prev.length - 1), cur, \"+transpose\");\n }\n }\n }\n newSel.push(new Range(cur, cur));\n }\n cm.setSelections(newSel);\n }); },\n newlineAndIndent: function (cm) { return runInOp(cm, function () {\n var sels = cm.listSelections();\n for (var i = sels.length - 1; i >= 0; i--)\n { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, \"+input\"); }\n sels = cm.listSelections();\n for (var i$1 = 0; i$1 < sels.length; i$1++)\n { cm.indentLine(sels[i$1].from().line, null, true); }\n ensureCursorVisible(cm);\n }); },\n openLine: function (cm) { return cm.replaceSelection(\"\\n\", \"start\"); },\n toggleOverwrite: function (cm) { return cm.toggleOverwrite(); }\n };\n\n\n function lineStart(cm, lineN) {\n var line = getLine(cm.doc, lineN);\n var visual = visualLine(line);\n if (visual != line) { lineN = lineNo(visual); }\n return endOfLine(true, cm, visual, lineN, 1)\n }\n function lineEnd(cm, lineN) {\n var line = getLine(cm.doc, lineN);\n var visual = visualLineEnd(line);\n if (visual != line) { lineN = lineNo(visual); }\n return endOfLine(true, cm, line, lineN, -1)\n }\n function lineStartSmart(cm, pos) {\n var start = lineStart(cm, pos.line);\n var line = getLine(cm.doc, start.line);\n var order = getOrder(line, cm.doc.direction);\n if (!order || order[0].level == 0) {\n var firstNonWS = Math.max(0, line.text.search(/\\S/));\n var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;\n return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)\n }\n return start\n }\n\n // Run a handler that was bound to a key.\n function doHandleBinding(cm, bound, dropShift) {\n if (typeof bound == \"string\") {\n bound = commands[bound];\n if (!bound) { return false }\n }\n // Ensure previous input has been read, so that the handler sees a\n // consistent view of the document\n cm.display.input.ensurePolled();\n var prevShift = cm.display.shift, done = false;\n try {\n if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n if (dropShift) { cm.display.shift = false; }\n done = bound(cm) != Pass;\n } finally {\n cm.display.shift = prevShift;\n cm.state.suppressEdits = false;\n }\n return done\n }\n\n function lookupKeyForEditor(cm, name, handle) {\n for (var i = 0; i < cm.state.keyMaps.length; i++) {\n var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);\n if (result) { return result }\n }\n return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))\n || lookupKey(name, cm.options.keyMap, handle, cm)\n }\n\n // Note that, despite the name, this function is also used to check\n // for bound mouse clicks.\n\n var stopSeq = new Delayed;\n\n function dispatchKey(cm, name, e, handle) {\n var seq = cm.state.keySeq;\n if (seq) {\n if (isModifierKey(name)) { return \"handled\" }\n if (/\\'$/.test(name))\n { cm.state.keySeq = null; }\n else\n { stopSeq.set(50, function () {\n if (cm.state.keySeq == seq) {\n cm.state.keySeq = null;\n cm.display.input.reset();\n }\n }); }\n if (dispatchKeyInner(cm, seq + \" \" + name, e, handle)) { return true }\n }\n return dispatchKeyInner(cm, name, e, handle)\n }\n\n function dispatchKeyInner(cm, name, e, handle) {\n var result = lookupKeyForEditor(cm, name, handle);\n\n if (result == \"multi\")\n { cm.state.keySeq = name; }\n if (result == \"handled\")\n { signalLater(cm, \"keyHandled\", cm, name, e); }\n\n if (result == \"handled\" || result == \"multi\") {\n e_preventDefault(e);\n restartBlink(cm);\n }\n\n return !!result\n }\n\n // Handle a key from the keydown event.\n function handleKeyBinding(cm, e) {\n var name = keyName(e, true);\n if (!name) { return false }\n\n if (e.shiftKey && !cm.state.keySeq) {\n // First try to resolve full name (including 'Shift-'). Failing\n // that, see if there is a cursor-motion command (starting with\n // 'go') bound to the keyname without 'Shift-'.\n return dispatchKey(cm, \"Shift-\" + name, e, function (b) { return doHandleBinding(cm, b, true); })\n || dispatchKey(cm, name, e, function (b) {\n if (typeof b == \"string\" ? /^go[A-Z]/.test(b) : b.motion)\n { return doHandleBinding(cm, b) }\n })\n } else {\n return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); })\n }\n }\n\n // Handle a key from the keypress event\n function handleCharBinding(cm, e, ch) {\n return dispatchKey(cm, \"'\" + ch + \"'\", e, function (b) { return doHandleBinding(cm, b, true); })\n }\n\n var lastStoppedKey = null;\n function onKeyDown(e) {\n var cm = this;\n cm.curOp.focus = activeElt();\n if (signalDOMEvent(cm, e)) { return }\n // IE does strange things with escape.\n if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }\n var code = e.keyCode;\n cm.display.shift = code == 16 || e.shiftKey;\n var handled = handleKeyBinding(cm, e);\n if (presto) {\n lastStoppedKey = handled ? code : null;\n // Opera has no cut event... we try to at least catch the key combo\n if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))\n { cm.replaceSelection(\"\", null, \"cut\"); }\n }\n\n // Turn mouse into crosshair when Alt is held on Mac.\n if (code == 18 && !/\\bCodeMirror-crosshair\\b/.test(cm.display.lineDiv.className))\n { showCrossHair(cm); }\n }\n\n function showCrossHair(cm) {\n var lineDiv = cm.display.lineDiv;\n addClass(lineDiv, \"CodeMirror-crosshair\");\n\n function up(e) {\n if (e.keyCode == 18 || !e.altKey) {\n rmClass(lineDiv, \"CodeMirror-crosshair\");\n off(document, \"keyup\", up);\n off(document, \"mouseover\", up);\n }\n }\n on(document, \"keyup\", up);\n on(document, \"mouseover\", up);\n }\n\n function onKeyUp(e) {\n if (e.keyCode == 16) { this.doc.sel.shift = false; }\n signalDOMEvent(this, e);\n }\n\n function onKeyPress(e) {\n var cm = this;\n if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }\n var keyCode = e.keyCode, charCode = e.charCode;\n if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}\n if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }\n var ch = String.fromCharCode(charCode == null ? keyCode : charCode);\n // Some browsers fire keypress events for backspace\n if (ch == \"\\x08\") { return }\n if (handleCharBinding(cm, e, ch)) { return }\n cm.display.input.onKeyPress(e);\n }\n\n var DOUBLECLICK_DELAY = 400;\n\n var PastClick = function(time, pos, button) {\n this.time = time;\n this.pos = pos;\n this.button = button;\n };\n\n PastClick.prototype.compare = function (time, pos, button) {\n return this.time + DOUBLECLICK_DELAY > time &&\n cmp(pos, this.pos) == 0 && button == this.button\n };\n\n var lastClick, lastDoubleClick;\n function clickRepeat(pos, button) {\n var now = +new Date;\n if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {\n lastClick = lastDoubleClick = null;\n return \"triple\"\n } else if (lastClick && lastClick.compare(now, pos, button)) {\n lastDoubleClick = new PastClick(now, pos, button);\n lastClick = null;\n return \"double\"\n } else {\n lastClick = new PastClick(now, pos, button);\n lastDoubleClick = null;\n return \"single\"\n }\n }\n\n // A mouse down can be a single click, double click, triple click,\n // start of selection drag, start of text drag, new cursor\n // (ctrl-click), rectangle drag (alt-drag), or xwin\n // middle-click-paste. Or it might be a click on something we should\n // not interfere with, such as a scrollbar or widget.\n function onMouseDown(e) {\n var cm = this, display = cm.display;\n if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }\n display.input.ensurePolled();\n display.shift = e.shiftKey;\n\n if (eventInWidget(display, e)) {\n if (!webkit) {\n // Briefly turn off draggability, to allow widgets to do\n // normal dragging things.\n display.scroller.draggable = false;\n setTimeout(function () { return display.scroller.draggable = true; }, 100);\n }\n return\n }\n if (clickInGutter(cm, e)) { return }\n var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : \"single\";\n window.focus();\n\n // #3261: make sure, that we're not starting a second selection\n if (button == 1 && cm.state.selectingText)\n { cm.state.selectingText(e); }\n\n if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return }\n\n if (button == 1) {\n if (pos) { leftButtonDown(cm, pos, repeat, e); }\n else if (e_target(e) == display.scroller) { e_preventDefault(e); }\n } else if (button == 2) {\n if (pos) { extendSelection(cm.doc, pos); }\n setTimeout(function () { return display.input.focus(); }, 20);\n } else if (button == 3) {\n if (captureRightClick) { cm.display.input.onContextMenu(e); }\n else { delayBlurEvent(cm); }\n }\n }\n\n function handleMappedButton(cm, button, pos, repeat, event) {\n var name = \"Click\";\n if (repeat == \"double\") { name = \"Double\" + name; }\n else if (repeat == \"triple\") { name = \"Triple\" + name; }\n name = (button == 1 ? \"Left\" : button == 2 ? \"Middle\" : \"Right\") + name;\n\n return dispatchKey(cm, addModifierNames(name, event), event, function (bound) {\n if (typeof bound == \"string\") { bound = commands[bound]; }\n if (!bound) { return false }\n var done = false;\n try {\n if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n done = bound(cm, pos) != Pass;\n } finally {\n cm.state.suppressEdits = false;\n }\n return done\n })\n }\n\n function configureMouse(cm, repeat, event) {\n var option = cm.getOption(\"configureMouse\");\n var value = option ? option(cm, repeat, event) : {};\n if (value.unit == null) {\n var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;\n value.unit = rect ? \"rectangle\" : repeat == \"single\" ? \"char\" : repeat == \"double\" ? \"word\" : \"line\";\n }\n if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; }\n if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; }\n if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); }\n return value\n }\n\n function leftButtonDown(cm, pos, repeat, event) {\n if (ie) { setTimeout(bind(ensureFocus, cm), 0); }\n else { cm.curOp.focus = activeElt(); }\n\n var behavior = configureMouse(cm, repeat, event);\n\n var sel = cm.doc.sel, contained;\n if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&\n repeat == \"single\" && (contained = sel.contains(pos)) > -1 &&\n (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&\n (cmp(contained.to(), pos) > 0 || pos.xRel < 0))\n { leftButtonStartDrag(cm, event, pos, behavior); }\n else\n { leftButtonSelect(cm, event, pos, behavior); }\n }\n\n // Start a text drag. When it ends, see if any dragging actually\n // happen, and treat as a click if it didn't.\n function leftButtonStartDrag(cm, event, pos, behavior) {\n var display = cm.display, moved = false;\n var dragEnd = operation(cm, function (e) {\n if (webkit) { display.scroller.draggable = false; }\n cm.state.draggingText = false;\n off(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n off(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n off(display.scroller, \"dragstart\", dragStart);\n off(display.scroller, \"drop\", dragEnd);\n if (!moved) {\n e_preventDefault(e);\n if (!behavior.addNew)\n { extendSelection(cm.doc, pos, null, null, behavior.extend); }\n // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)\n if (webkit || ie && ie_version == 9)\n { setTimeout(function () {display.wrapper.ownerDocument.body.focus(); display.input.focus();}, 20); }\n else\n { display.input.focus(); }\n }\n });\n var mouseMove = function(e2) {\n moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10;\n };\n var dragStart = function () { return moved = true; };\n // Let the drag handler handle this.\n if (webkit) { display.scroller.draggable = true; }\n cm.state.draggingText = dragEnd;\n dragEnd.copy = !behavior.moveOnDrag;\n // IE's approach to draggable\n if (display.scroller.dragDrop) { display.scroller.dragDrop(); }\n on(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n on(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n on(display.scroller, \"dragstart\", dragStart);\n on(display.scroller, \"drop\", dragEnd);\n\n delayBlurEvent(cm);\n setTimeout(function () { return display.input.focus(); }, 20);\n }\n\n function rangeForUnit(cm, pos, unit) {\n if (unit == \"char\") { return new Range(pos, pos) }\n if (unit == \"word\") { return cm.findWordAt(pos) }\n if (unit == \"line\") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) }\n var result = unit(cm, pos);\n return new Range(result.from, result.to)\n }\n\n // Normal selection, as opposed to text dragging.\n function leftButtonSelect(cm, event, start, behavior) {\n var display = cm.display, doc = cm.doc;\n e_preventDefault(event);\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n if (behavior.addNew && !behavior.extend) {\n ourIndex = doc.sel.contains(start);\n if (ourIndex > -1)\n { ourRange = ranges[ourIndex]; }\n else\n { ourRange = new Range(start, start); }\n } else {\n ourRange = doc.sel.primary();\n ourIndex = doc.sel.primIndex;\n }\n\n if (behavior.unit == \"rectangle\") {\n if (!behavior.addNew) { ourRange = new Range(start, start); }\n start = posFromMouse(cm, event, true, true);\n ourIndex = -1;\n } else {\n var range$$1 = rangeForUnit(cm, start, behavior.unit);\n if (behavior.extend)\n { ourRange = extendRange(ourRange, range$$1.anchor, range$$1.head, behavior.extend); }\n else\n { ourRange = range$$1; }\n }\n\n if (!behavior.addNew) {\n ourIndex = 0;\n setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n startSel = doc.sel;\n } else if (ourIndex == -1) {\n ourIndex = ranges.length;\n setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: \"*mouse\"});\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: \"*mouse\"});\n startSel = doc.sel;\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n }\n\n var lastPos = start;\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) { return }\n lastPos = pos;\n\n if (behavior.unit == \"rectangle\") {\n var ranges = [], tabSize = cm.options.tabSize;\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n if (left == right)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }\n else if (text.length > leftPos)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }\n }\n if (!ranges.length) { ranges.push(new Range(start, start)); }\n setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: \"*mouse\", scroll: false});\n cm.scrollIntoView(pos);\n } else {\n var oldRange = ourRange;\n var range$$1 = rangeForUnit(cm, pos, behavior.unit);\n var anchor = oldRange.anchor, head;\n if (cmp(range$$1.anchor, anchor) > 0) {\n head = range$$1.head;\n anchor = minPos(oldRange.from(), range$$1.anchor);\n } else {\n head = range$$1.anchor;\n anchor = maxPos(oldRange.to(), range$$1.head);\n }\n var ranges$1 = startSel.ranges.slice(0);\n ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));\n setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect();\n // Used to ensure timeout re-tries don't fire when another extend\n // happened in the meantime (clearTimeout isn't reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0;\n\n function extend(e) {\n var curCount = ++counter;\n var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\");\n if (!cur) { return }\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt();\n extendTo(cur);\n var visible = visibleLines(display, doc);\n if (cur.line >= visible.to || cur.line < visible.from)\n { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n if (outside) { setTimeout(operation(cm, function () {\n if (counter != curCount) { return }\n display.scroller.scrollTop += outside;\n extend(e);\n }), 50); }\n }\n }\n\n function done(e) {\n cm.state.selectingText = false;\n counter = Infinity;\n // If e is null or undefined we interpret this as someone trying\n // to explicitly cancel the selection rather than the user\n // letting go of the mouse button.\n if (e) {\n e_preventDefault(e);\n display.input.focus();\n }\n off(display.wrapper.ownerDocument, \"mousemove\", move);\n off(display.wrapper.ownerDocument, \"mouseup\", up);\n doc.history.lastSelOrigin = null;\n }\n\n var move = operation(cm, function (e) {\n if (e.buttons === 0 || !e_button(e)) { done(e); }\n else { extend(e); }\n });\n var up = operation(cm, done);\n cm.state.selectingText = up;\n on(display.wrapper.ownerDocument, \"mousemove\", move);\n on(display.wrapper.ownerDocument, \"mouseup\", up);\n }\n\n // Used when mouse-selecting to adjust the anchor to the proper side\n // of a bidi jump depending on the visual position of the head.\n function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n }\n\n\n // Determines whether an event happened in the gutter, and fires the\n // handlers for the corresponding event.\n function gutterEvent(cm, e, type, prevent) {\n var mX, mY;\n if (e.touches) {\n mX = e.touches[0].clientX;\n mY = e.touches[0].clientY;\n } else {\n try { mX = e.clientX; mY = e.clientY; }\n catch(e) { return false }\n }\n if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }\n if (prevent) { e_preventDefault(e); }\n\n var display = cm.display;\n var lineBox = display.lineDiv.getBoundingClientRect();\n\n if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) }\n mY -= lineBox.top - display.viewOffset;\n\n for (var i = 0; i < cm.display.gutterSpecs.length; ++i) {\n var g = display.gutters.childNodes[i];\n if (g && g.getBoundingClientRect().right >= mX) {\n var line = lineAtHeight(cm.doc, mY);\n var gutter = cm.display.gutterSpecs[i];\n signal(cm, type, cm, line, gutter.className, e);\n return e_defaultPrevented(e)\n }\n }\n }\n\n function clickInGutter(cm, e) {\n return gutterEvent(cm, e, \"gutterClick\", true)\n }\n\n // CONTEXT MENU HANDLING\n\n // To make the context menu work, we need to briefly unhide the\n // textarea (making it as unobtrusive as possible) to let the\n // right-click take effect on it.\n function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n if (!captureRightClick) { cm.display.input.onContextMenu(e); }\n }\n\n function contextMenuInGutter(cm, e) {\n if (!hasHandler(cm, \"gutterContextMenu\")) { return false }\n return gutterEvent(cm, e, \"gutterContextMenu\", false)\n }\n\n function themeChanged(cm) {\n cm.display.wrapper.className = cm.display.wrapper.className.replace(/\\s*cm-s-\\S+/g, \"\") +\n cm.options.theme.replace(/(^|\\s)\\s*/g, \" cm-s-\");\n clearCaches(cm);\n }\n\n var Init = {toString: function(){return \"CodeMirror.Init\"}};\n\n var defaults = {};\n var optionHandlers = {};\n\n function defineOptions(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n\n function option(name, deflt, handle, notOnInit) {\n CodeMirror.defaults[name] = deflt;\n if (handle) { optionHandlers[name] =\n notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; }\n }\n\n CodeMirror.defineOption = option;\n\n // Passed to option handlers when there is no old value.\n CodeMirror.Init = Init;\n\n // These two are, on init, called from the constructor because they\n // have to be initialized before the editor can start at all.\n option(\"value\", \"\", function (cm, val) { return cm.setValue(val); }, true);\n option(\"mode\", null, function (cm, val) {\n cm.doc.modeOption = val;\n loadMode(cm);\n }, true);\n\n option(\"indentUnit\", 2, loadMode, true);\n option(\"indentWithTabs\", false);\n option(\"smartIndent\", true);\n option(\"tabSize\", 4, function (cm) {\n resetModeState(cm);\n clearCaches(cm);\n regChange(cm);\n }, true);\n\n option(\"lineSeparator\", null, function (cm, val) {\n cm.doc.lineSep = val;\n if (!val) { return }\n var newBreaks = [], lineNo = cm.doc.first;\n cm.doc.iter(function (line) {\n for (var pos = 0;;) {\n var found = line.text.indexOf(val, pos);\n if (found == -1) { break }\n pos = found + val.length;\n newBreaks.push(Pos(lineNo, found));\n }\n lineNo++;\n });\n for (var i = newBreaks.length - 1; i >= 0; i--)\n { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }\n });\n option(\"specialChars\", /[\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u061c\\u200b-\\u200f\\u2028\\u2029\\ufeff\\ufff9-\\ufffc]/g, function (cm, val, old) {\n cm.state.specialChars = new RegExp(val.source + (val.test(\"\\t\") ? \"\" : \"|\\t\"), \"g\");\n if (old != Init) { cm.refresh(); }\n });\n option(\"specialCharPlaceholder\", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true);\n option(\"electricChars\", true);\n option(\"inputStyle\", mobile ? \"contenteditable\" : \"textarea\", function () {\n throw new Error(\"inputStyle can not (yet) be changed in a running editor\") // FIXME\n }, true);\n option(\"spellcheck\", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true);\n option(\"autocorrect\", false, function (cm, val) { return cm.getInputField().autocorrect = val; }, true);\n option(\"autocapitalize\", false, function (cm, val) { return cm.getInputField().autocapitalize = val; }, true);\n option(\"rtlMoveVisually\", !windows);\n option(\"wholeLineUpdateBefore\", true);\n\n option(\"theme\", \"default\", function (cm) {\n themeChanged(cm);\n updateGutters(cm);\n }, true);\n option(\"keyMap\", \"default\", function (cm, val, old) {\n var next = getKeyMap(val);\n var prev = old != Init && getKeyMap(old);\n if (prev && prev.detach) { prev.detach(cm, next); }\n if (next.attach) { next.attach(cm, prev || null); }\n });\n option(\"extraKeys\", null);\n option(\"configureMouse\", null);\n\n option(\"lineWrapping\", false, wrappingChanged, true);\n option(\"gutters\", [], function (cm, val) {\n cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers);\n updateGutters(cm);\n }, true);\n option(\"fixedGutter\", true, function (cm, val) {\n cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + \"px\" : \"0\";\n cm.refresh();\n }, true);\n option(\"coverGutterNextToScrollbar\", false, function (cm) { return updateScrollbars(cm); }, true);\n option(\"scrollbarStyle\", \"native\", function (cm) {\n initScrollbars(cm);\n updateScrollbars(cm);\n cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);\n cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);\n }, true);\n option(\"lineNumbers\", false, function (cm, val) {\n cm.display.gutterSpecs = getGutters(cm.options.gutters, val);\n updateGutters(cm);\n }, true);\n option(\"firstLineNumber\", 1, updateGutters, true);\n option(\"lineNumberFormatter\", function (integer) { return integer; }, updateGutters, true);\n option(\"showCursorWhenSelecting\", false, updateSelection, true);\n\n option(\"resetSelectionOnContextMenu\", true);\n option(\"lineWiseCopyCut\", true);\n option(\"pasteLinesPerSelection\", true);\n option(\"selectionsMayTouch\", false);\n\n option(\"readOnly\", false, function (cm, val) {\n if (val == \"nocursor\") {\n onBlur(cm);\n cm.display.input.blur();\n }\n cm.display.input.readOnlyChanged(val);\n });\n option(\"disableInput\", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true);\n option(\"dragDrop\", true, dragDropChanged);\n option(\"allowDropFileTypes\", null);\n\n option(\"cursorBlinkRate\", 530);\n option(\"cursorScrollMargin\", 0);\n option(\"cursorHeight\", 1, updateSelection, true);\n option(\"singleCursorHeightPerLine\", true, updateSelection, true);\n option(\"workTime\", 100);\n option(\"workDelay\", 100);\n option(\"flattenSpans\", true, resetModeState, true);\n option(\"addModeClass\", false, resetModeState, true);\n option(\"pollInterval\", 100);\n option(\"undoDepth\", 200, function (cm, val) { return cm.doc.history.undoDepth = val; });\n option(\"historyEventDelay\", 1250);\n option(\"viewportMargin\", 10, function (cm) { return cm.refresh(); }, true);\n option(\"maxHighlightLength\", 10000, resetModeState, true);\n option(\"moveInputWithCursor\", true, function (cm, val) {\n if (!val) { cm.display.input.resetPosition(); }\n });\n\n option(\"tabindex\", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || \"\"; });\n option(\"autofocus\", null);\n option(\"direction\", \"ltr\", function (cm, val) { return cm.doc.setDirection(val); }, true);\n option(\"phrases\", null);\n }\n\n function dragDropChanged(cm, value, old) {\n var wasOn = old && old != Init;\n if (!value != !wasOn) {\n var funcs = cm.display.dragFunctions;\n var toggle = value ? on : off;\n toggle(cm.display.scroller, \"dragstart\", funcs.start);\n toggle(cm.display.scroller, \"dragenter\", funcs.enter);\n toggle(cm.display.scroller, \"dragover\", funcs.over);\n toggle(cm.display.scroller, \"dragleave\", funcs.leave);\n toggle(cm.display.scroller, \"drop\", funcs.drop);\n }\n }\n\n function wrappingChanged(cm) {\n if (cm.options.lineWrapping) {\n addClass(cm.display.wrapper, \"CodeMirror-wrap\");\n cm.display.sizer.style.minWidth = \"\";\n cm.display.sizerWidth = null;\n } else {\n rmClass(cm.display.wrapper, \"CodeMirror-wrap\");\n findMaxLine(cm);\n }\n estimateLineHeights(cm);\n regChange(cm);\n clearCaches(cm);\n setTimeout(function () { return updateScrollbars(cm); }, 100);\n }\n\n // A CodeMirror instance represents an editor. This is the object\n // that user code is usually dealing with.\n\n function CodeMirror(place, options) {\n var this$1 = this;\n\n if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) }\n\n this.options = options = options ? copyObj(options) : {};\n // Determine effective options based on given values and defaults.\n copyObj(defaults, options, false);\n\n var doc = options.value;\n if (typeof doc == \"string\") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }\n else if (options.mode) { doc.modeOption = options.mode; }\n this.doc = doc;\n\n var input = new CodeMirror.inputStyles[options.inputStyle](this);\n var display = this.display = new Display(place, doc, input, options);\n display.wrapper.CodeMirror = this;\n themeChanged(this);\n if (options.lineWrapping)\n { this.display.wrapper.className += \" CodeMirror-wrap\"; }\n initScrollbars(this);\n\n this.state = {\n keyMaps: [], // stores maps added by addKeyMap\n overlays: [], // highlighting overlays, as added by addOverlay\n modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info\n overwrite: false,\n delayingBlurEvent: false,\n focused: false,\n suppressEdits: false, // used to disable editing during key handlers when in readOnly mode\n pasteIncoming: -1, cutIncoming: -1, // help recognize paste/cut edits in input.poll\n selectingText: false,\n draggingText: false,\n highlight: new Delayed(), // stores highlight worker timeout\n keySeq: null, // Unfinished key sequence\n specialChars: null\n };\n\n if (options.autofocus && !mobile) { display.input.focus(); }\n\n // Override magic textarea content restore that IE sometimes does\n // on our hidden textarea on reload\n if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); }\n\n registerEventHandlers(this);\n ensureGlobalHandlers();\n\n startOperation(this);\n this.curOp.forceUpdate = true;\n attachDoc(this, doc);\n\n if ((options.autofocus && !mobile) || this.hasFocus())\n { setTimeout(bind(onFocus, this), 20); }\n else\n { onBlur(this); }\n\n for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt))\n { optionHandlers[opt](this$1, options[opt], Init); } }\n maybeUpdateLineNumberWidth(this);\n if (options.finishInit) { options.finishInit(this); }\n for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this$1); }\n endOperation(this);\n // Suppress optimizelegibility in Webkit, since it breaks text\n // measuring on line wrapping boundaries.\n if (webkit && options.lineWrapping &&\n getComputedStyle(display.lineDiv).textRendering == \"optimizelegibility\")\n { display.lineDiv.style.textRendering = \"auto\"; }\n }\n\n // The default configuration options.\n CodeMirror.defaults = defaults;\n // Functions to run when options are changed.\n CodeMirror.optionHandlers = optionHandlers;\n\n // Attach the necessary event handlers when initializing the editor\n function registerEventHandlers(cm) {\n var d = cm.display;\n on(d.scroller, \"mousedown\", operation(cm, onMouseDown));\n // Older IE's will not fire a second mousedown for a double click\n if (ie && ie_version < 11)\n { on(d.scroller, \"dblclick\", operation(cm, function (e) {\n if (signalDOMEvent(cm, e)) { return }\n var pos = posFromMouse(cm, e);\n if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return }\n e_preventDefault(e);\n var word = cm.findWordAt(pos);\n extendSelection(cm.doc, word.anchor, word.head);\n })); }\n else\n { on(d.scroller, \"dblclick\", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); }\n // Some browsers fire contextmenu *after* opening the menu, at\n // which point we can't mess with it anymore. Context menu is\n // handled in onMouseDown for these browsers.\n on(d.scroller, \"contextmenu\", function (e) { return onContextMenu(cm, e); });\n\n // Used to suppress mouse event handling when a touch happens\n var touchFinished, prevTouch = {end: 0};\n function finishTouch() {\n if (d.activeTouch) {\n touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000);\n prevTouch = d.activeTouch;\n prevTouch.end = +new Date;\n }\n }\n function isMouseLikeTouchEvent(e) {\n if (e.touches.length != 1) { return false }\n var touch = e.touches[0];\n return touch.radiusX <= 1 && touch.radiusY <= 1\n }\n function farAway(touch, other) {\n if (other.left == null) { return true }\n var dx = other.left - touch.left, dy = other.top - touch.top;\n return dx * dx + dy * dy > 20 * 20\n }\n on(d.scroller, \"touchstart\", function (e) {\n if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) {\n d.input.ensurePolled();\n clearTimeout(touchFinished);\n var now = +new Date;\n d.activeTouch = {start: now, moved: false,\n prev: now - prevTouch.end <= 300 ? prevTouch : null};\n if (e.touches.length == 1) {\n d.activeTouch.left = e.touches[0].pageX;\n d.activeTouch.top = e.touches[0].pageY;\n }\n }\n });\n on(d.scroller, \"touchmove\", function () {\n if (d.activeTouch) { d.activeTouch.moved = true; }\n });\n on(d.scroller, \"touchend\", function (e) {\n var touch = d.activeTouch;\n if (touch && !eventInWidget(d, e) && touch.left != null &&\n !touch.moved && new Date - touch.start < 300) {\n var pos = cm.coordsChar(d.activeTouch, \"page\"), range;\n if (!touch.prev || farAway(touch, touch.prev)) // Single tap\n { range = new Range(pos, pos); }\n else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap\n { range = cm.findWordAt(pos); }\n else // Triple tap\n { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); }\n cm.setSelection(range.anchor, range.head);\n cm.focus();\n e_preventDefault(e);\n }\n finishTouch();\n });\n on(d.scroller, \"touchcancel\", finishTouch);\n\n // Sync scrolling between fake scrollbars and real scrollable\n // area, ensure viewport is updated when scrolling.\n on(d.scroller, \"scroll\", function () {\n if (d.scroller.clientHeight) {\n updateScrollTop(cm, d.scroller.scrollTop);\n setScrollLeft(cm, d.scroller.scrollLeft, true);\n signal(cm, \"scroll\", cm);\n }\n });\n\n // Listen to wheel events in order to try and update the viewport on time.\n on(d.scroller, \"mousewheel\", function (e) { return onScrollWheel(cm, e); });\n on(d.scroller, \"DOMMouseScroll\", function (e) { return onScrollWheel(cm, e); });\n\n // Prevent wrapper from ever scrolling\n on(d.wrapper, \"scroll\", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n d.dragFunctions = {\n enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }},\n over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},\n start: function (e) { return onDragStart(cm, e); },\n drop: operation(cm, onDrop),\n leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}\n };\n\n var inp = d.input.getField();\n on(inp, \"keyup\", function (e) { return onKeyUp.call(cm, e); });\n on(inp, \"keydown\", operation(cm, onKeyDown));\n on(inp, \"keypress\", operation(cm, onKeyPress));\n on(inp, \"focus\", function (e) { return onFocus(cm, e); });\n on(inp, \"blur\", function (e) { return onBlur(cm, e); });\n }\n\n var initHooks = [];\n CodeMirror.defineInitHook = function (f) { return initHooks.push(f); };\n\n // Indent the given line. The how parameter can be \"smart\",\n // \"add\"/null, \"subtract\", or \"prev\". When aggressive is false\n // (typically set to true for forced single-line indents), empty\n // lines are not indented, and places where the mode returns Pass\n // are left alone.\n function indentLine(cm, n, how, aggressive) {\n var doc = cm.doc, state;\n if (how == null) { how = \"add\"; }\n if (how == \"smart\") {\n // Fall back to \"prev\" when the mode doesn't have an indentation\n // method.\n if (!doc.mode.indent) { how = \"prev\"; }\n else { state = getContextBefore(cm, n).state; }\n }\n\n var tabSize = cm.options.tabSize;\n var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);\n if (line.stateAfter) { line.stateAfter = null; }\n var curSpaceString = line.text.match(/^\\s*/)[0], indentation;\n if (!aggressive && !/\\S/.test(line.text)) {\n indentation = 0;\n how = \"not\";\n } else if (how == \"smart\") {\n indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);\n if (indentation == Pass || indentation > 150) {\n if (!aggressive) { return }\n how = \"prev\";\n }\n }\n if (how == \"prev\") {\n if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); }\n else { indentation = 0; }\n } else if (how == \"add\") {\n indentation = curSpace + cm.options.indentUnit;\n } else if (how == \"subtract\") {\n indentation = curSpace - cm.options.indentUnit;\n } else if (typeof how == \"number\") {\n indentation = curSpace + how;\n }\n indentation = Math.max(0, indentation);\n\n var indentString = \"\", pos = 0;\n if (cm.options.indentWithTabs)\n { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += \"\\t\";} }\n if (pos < indentation) { indentString += spaceStr(indentation - pos); }\n\n if (indentString != curSpaceString) {\n replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), \"+input\");\n line.stateAfter = null;\n return true\n } else {\n // Ensure that, if the cursor was in the whitespace at the start\n // of the line, it is moved to the end of that space.\n for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {\n var range = doc.sel.ranges[i$1];\n if (range.head.line == n && range.head.ch < curSpaceString.length) {\n var pos$1 = Pos(n, curSpaceString.length);\n replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));\n break\n }\n }\n }\n }\n\n // This will be set to a {lineWise: bool, text: [string]} object, so\n // that, when pasting, we know what kind of selections the copied\n // text was made out of.\n var lastCopied = null;\n\n function setLastCopied(newLastCopied) {\n lastCopied = newLastCopied;\n }\n\n function applyTextInput(cm, inserted, deleted, sel, origin) {\n var doc = cm.doc;\n cm.display.shift = false;\n if (!sel) { sel = doc.sel; }\n\n var recent = +new Date - 200;\n var paste = origin == \"paste\" || cm.state.pasteIncoming > recent;\n var textLines = splitLinesAuto(inserted), multiPaste = null;\n // When pasting N lines into N selections, insert one line per selection\n if (paste && sel.ranges.length > 1) {\n if (lastCopied && lastCopied.text.join(\"\\n\") == inserted) {\n if (sel.ranges.length % lastCopied.text.length == 0) {\n multiPaste = [];\n for (var i = 0; i < lastCopied.text.length; i++)\n { multiPaste.push(doc.splitLines(lastCopied.text[i])); }\n }\n } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) {\n multiPaste = map(textLines, function (l) { return [l]; });\n }\n }\n\n var updateInput = cm.curOp.updateInput;\n // Normal behavior is to insert the new text into every selection\n for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {\n var range$$1 = sel.ranges[i$1];\n var from = range$$1.from(), to = range$$1.to();\n if (range$$1.empty()) {\n if (deleted && deleted > 0) // Handle deletion\n { from = Pos(from.line, from.ch - deleted); }\n else if (cm.state.overwrite && !paste) // Handle overwrite\n { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }\n else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join(\"\\n\") == inserted)\n { from = to = Pos(from.line, 0); }\n }\n var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,\n origin: origin || (paste ? \"paste\" : cm.state.cutIncoming > recent ? \"cut\" : \"+input\")};\n makeChange(cm.doc, changeEvent);\n signalLater(cm, \"inputRead\", cm, changeEvent);\n }\n if (inserted && !paste)\n { triggerElectric(cm, inserted); }\n\n ensureCursorVisible(cm);\n if (cm.curOp.updateInput < 2) { cm.curOp.updateInput = updateInput; }\n cm.curOp.typing = true;\n cm.state.pasteIncoming = cm.state.cutIncoming = -1;\n }\n\n function handlePaste(e, cm) {\n var pasted = e.clipboardData && e.clipboardData.getData(\"Text\");\n if (pasted) {\n e.preventDefault();\n if (!cm.isReadOnly() && !cm.options.disableInput)\n { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, \"paste\"); }); }\n return true\n }\n }\n\n function triggerElectric(cm, inserted) {\n // When an 'electric' character is inserted, immediately trigger a reindent\n if (!cm.options.electricChars || !cm.options.smartIndent) { return }\n var sel = cm.doc.sel;\n\n for (var i = sel.ranges.length - 1; i >= 0; i--) {\n var range$$1 = sel.ranges[i];\n if (range$$1.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range$$1.head.line)) { continue }\n var mode = cm.getModeAt(range$$1.head);\n var indented = false;\n if (mode.electricChars) {\n for (var j = 0; j < mode.electricChars.length; j++)\n { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n indented = indentLine(cm, range$$1.head.line, \"smart\");\n break\n } }\n } else if (mode.electricInput) {\n if (mode.electricInput.test(getLine(cm.doc, range$$1.head.line).text.slice(0, range$$1.head.ch)))\n { indented = indentLine(cm, range$$1.head.line, \"smart\"); }\n }\n if (indented) { signalLater(cm, \"electricInput\", cm, range$$1.head.line); }\n }\n }\n\n function copyableRanges(cm) {\n var text = [], ranges = [];\n for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n var line = cm.doc.sel.ranges[i].head.line;\n var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n ranges.push(lineRange);\n text.push(cm.getRange(lineRange.anchor, lineRange.head));\n }\n return {text: text, ranges: ranges}\n }\n\n function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {\n field.setAttribute(\"autocorrect\", autocorrect ? \"\" : \"off\");\n field.setAttribute(\"autocapitalize\", autocapitalize ? \"\" : \"off\");\n field.setAttribute(\"spellcheck\", !!spellcheck);\n }\n\n function hiddenTextarea() {\n var te = elt(\"textarea\", null, null, \"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none\");\n var div = elt(\"div\", [te], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) { te.style.width = \"1000px\"; }\n else { te.setAttribute(\"wrap\", \"off\"); }\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) { te.style.border = \"1px solid black\"; }\n disableBrowserMagic(te);\n return div\n }\n\n // The publicly visible API. Note that methodOp(f) means\n // 'wrap f in an operation, performed on its `this` parameter'.\n\n // This is not the complete set of editor methods. Most of the\n // methods defined on the Doc type are also injected into\n // CodeMirror.prototype, for backwards compatibility and\n // convenience.\n\n function addEditorMethods(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n\n var helpers = CodeMirror.helpers = {};\n\n CodeMirror.prototype = {\n constructor: CodeMirror,\n focus: function(){window.focus(); this.display.input.focus();},\n\n setOption: function(option, value) {\n var options = this.options, old = options[option];\n if (options[option] == value && option != \"mode\") { return }\n options[option] = value;\n if (optionHandlers.hasOwnProperty(option))\n { operation(this, optionHandlers[option])(this, value, old); }\n signal(this, \"optionChange\", this, option);\n },\n\n getOption: function(option) {return this.options[option]},\n getDoc: function() {return this.doc},\n\n addKeyMap: function(map$$1, bottom) {\n this.state.keyMaps[bottom ? \"push\" : \"unshift\"](getKeyMap(map$$1));\n },\n removeKeyMap: function(map$$1) {\n var maps = this.state.keyMaps;\n for (var i = 0; i < maps.length; ++i)\n { if (maps[i] == map$$1 || maps[i].name == map$$1) {\n maps.splice(i, 1);\n return true\n } }\n },\n\n addOverlay: methodOp(function(spec, options) {\n var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);\n if (mode.startState) { throw new Error(\"Overlays may not be stateful.\") }\n insertSorted(this.state.overlays,\n {mode: mode, modeSpec: spec, opaque: options && options.opaque,\n priority: (options && options.priority) || 0},\n function (overlay) { return overlay.priority; });\n this.state.modeGen++;\n regChange(this);\n }),\n removeOverlay: methodOp(function(spec) {\n var this$1 = this;\n\n var overlays = this.state.overlays;\n for (var i = 0; i < overlays.length; ++i) {\n var cur = overlays[i].modeSpec;\n if (cur == spec || typeof spec == \"string\" && cur.name == spec) {\n overlays.splice(i, 1);\n this$1.state.modeGen++;\n regChange(this$1);\n return\n }\n }\n }),\n\n indentLine: methodOp(function(n, dir, aggressive) {\n if (typeof dir != \"string\" && typeof dir != \"number\") {\n if (dir == null) { dir = this.options.smartIndent ? \"smart\" : \"prev\"; }\n else { dir = dir ? \"add\" : \"subtract\"; }\n }\n if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); }\n }),\n indentSelection: methodOp(function(how) {\n var this$1 = this;\n\n var ranges = this.doc.sel.ranges, end = -1;\n for (var i = 0; i < ranges.length; i++) {\n var range$$1 = ranges[i];\n if (!range$$1.empty()) {\n var from = range$$1.from(), to = range$$1.to();\n var start = Math.max(end, from.line);\n end = Math.min(this$1.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;\n for (var j = start; j < end; ++j)\n { indentLine(this$1, j, how); }\n var newRanges = this$1.doc.sel.ranges;\n if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)\n { replaceOneSelection(this$1.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); }\n } else if (range$$1.head.line > end) {\n indentLine(this$1, range$$1.head.line, how, true);\n end = range$$1.head.line;\n if (i == this$1.doc.sel.primIndex) { ensureCursorVisible(this$1); }\n }\n }\n }),\n\n // Fetch the parser token for a given character. Useful for hacks\n // that want to inspect the mode state (say, for completion).\n getTokenAt: function(pos, precise) {\n return takeToken(this, pos, precise)\n },\n\n getLineTokens: function(line, precise) {\n return takeToken(this, Pos(line), precise, true)\n },\n\n getTokenTypeAt: function(pos) {\n pos = clipPos(this.doc, pos);\n var styles = getLineStyles(this, getLine(this.doc, pos.line));\n var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;\n var type;\n if (ch == 0) { type = styles[2]; }\n else { for (;;) {\n var mid = (before + after) >> 1;\n if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; }\n else if (styles[mid * 2 + 1] < ch) { before = mid + 1; }\n else { type = styles[mid * 2 + 2]; break }\n } }\n var cut = type ? type.indexOf(\"overlay \") : -1;\n return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1)\n },\n\n getModeAt: function(pos) {\n var mode = this.doc.mode;\n if (!mode.innerMode) { return mode }\n return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode\n },\n\n getHelper: function(pos, type) {\n return this.getHelpers(pos, type)[0]\n },\n\n getHelpers: function(pos, type) {\n var this$1 = this;\n\n var found = [];\n if (!helpers.hasOwnProperty(type)) { return found }\n var help = helpers[type], mode = this.getModeAt(pos);\n if (typeof mode[type] == \"string\") {\n if (help[mode[type]]) { found.push(help[mode[type]]); }\n } else if (mode[type]) {\n for (var i = 0; i < mode[type].length; i++) {\n var val = help[mode[type][i]];\n if (val) { found.push(val); }\n }\n } else if (mode.helperType && help[mode.helperType]) {\n found.push(help[mode.helperType]);\n } else if (help[mode.name]) {\n found.push(help[mode.name]);\n }\n for (var i$1 = 0; i$1 < help._global.length; i$1++) {\n var cur = help._global[i$1];\n if (cur.pred(mode, this$1) && indexOf(found, cur.val) == -1)\n { found.push(cur.val); }\n }\n return found\n },\n\n getStateAfter: function(line, precise) {\n var doc = this.doc;\n line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);\n return getContextBefore(this, line + 1, precise).state\n },\n\n cursorCoords: function(start, mode) {\n var pos, range$$1 = this.doc.sel.primary();\n if (start == null) { pos = range$$1.head; }\n else if (typeof start == \"object\") { pos = clipPos(this.doc, start); }\n else { pos = start ? range$$1.from() : range$$1.to(); }\n return cursorCoords(this, pos, mode || \"page\")\n },\n\n charCoords: function(pos, mode) {\n return charCoords(this, clipPos(this.doc, pos), mode || \"page\")\n },\n\n coordsChar: function(coords, mode) {\n coords = fromCoordSystem(this, coords, mode || \"page\");\n return coordsChar(this, coords.left, coords.top)\n },\n\n lineAtHeight: function(height, mode) {\n height = fromCoordSystem(this, {top: height, left: 0}, mode || \"page\").top;\n return lineAtHeight(this.doc, height + this.display.viewOffset)\n },\n heightAtLine: function(line, mode, includeWidgets) {\n var end = false, lineObj;\n if (typeof line == \"number\") {\n var last = this.doc.first + this.doc.size - 1;\n if (line < this.doc.first) { line = this.doc.first; }\n else if (line > last) { line = last; end = true; }\n lineObj = getLine(this.doc, line);\n } else {\n lineObj = line;\n }\n return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || \"page\", includeWidgets || end).top +\n (end ? this.doc.height - heightAtLine(lineObj) : 0)\n },\n\n defaultTextHeight: function() { return textHeight(this.display) },\n defaultCharWidth: function() { return charWidth(this.display) },\n\n getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}},\n\n addWidget: function(pos, node, scroll, vert, horiz) {\n var display = this.display;\n pos = cursorCoords(this, clipPos(this.doc, pos));\n var top = pos.bottom, left = pos.left;\n node.style.position = \"absolute\";\n node.setAttribute(\"cm-ignore-events\", \"true\");\n this.display.input.setUneditable(node);\n display.sizer.appendChild(node);\n if (vert == \"over\") {\n top = pos.top;\n } else if (vert == \"above\" || vert == \"near\") {\n var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),\n hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);\n // Default to positioning above (if specified and possible); otherwise default to positioning below\n if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)\n { top = pos.top - node.offsetHeight; }\n else if (pos.bottom + node.offsetHeight <= vspace)\n { top = pos.bottom; }\n if (left + node.offsetWidth > hspace)\n { left = hspace - node.offsetWidth; }\n }\n node.style.top = top + \"px\";\n node.style.left = node.style.right = \"\";\n if (horiz == \"right\") {\n left = display.sizer.clientWidth - node.offsetWidth;\n node.style.right = \"0px\";\n } else {\n if (horiz == \"left\") { left = 0; }\n else if (horiz == \"middle\") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; }\n node.style.left = left + \"px\";\n }\n if (scroll)\n { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); }\n },\n\n triggerOnKeyDown: methodOp(onKeyDown),\n triggerOnKeyPress: methodOp(onKeyPress),\n triggerOnKeyUp: onKeyUp,\n triggerOnMouseDown: methodOp(onMouseDown),\n\n execCommand: function(cmd) {\n if (commands.hasOwnProperty(cmd))\n { return commands[cmd].call(null, this) }\n },\n\n triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),\n\n findPosH: function(from, amount, unit, visually) {\n var this$1 = this;\n\n var dir = 1;\n if (amount < 0) { dir = -1; amount = -amount; }\n var cur = clipPos(this.doc, from);\n for (var i = 0; i < amount; ++i) {\n cur = findPosH(this$1.doc, cur, dir, unit, visually);\n if (cur.hitSide) { break }\n }\n return cur\n },\n\n moveH: methodOp(function(dir, unit) {\n var this$1 = this;\n\n this.extendSelectionsBy(function (range$$1) {\n if (this$1.display.shift || this$1.doc.extend || range$$1.empty())\n { return findPosH(this$1.doc, range$$1.head, dir, unit, this$1.options.rtlMoveVisually) }\n else\n { return dir < 0 ? range$$1.from() : range$$1.to() }\n }, sel_move);\n }),\n\n deleteH: methodOp(function(dir, unit) {\n var sel = this.doc.sel, doc = this.doc;\n if (sel.somethingSelected())\n { doc.replaceSelection(\"\", null, \"+delete\"); }\n else\n { deleteNearSelection(this, function (range$$1) {\n var other = findPosH(doc, range$$1.head, dir, unit, false);\n return dir < 0 ? {from: other, to: range$$1.head} : {from: range$$1.head, to: other}\n }); }\n }),\n\n findPosV: function(from, amount, unit, goalColumn) {\n var this$1 = this;\n\n var dir = 1, x = goalColumn;\n if (amount < 0) { dir = -1; amount = -amount; }\n var cur = clipPos(this.doc, from);\n for (var i = 0; i < amount; ++i) {\n var coords = cursorCoords(this$1, cur, \"div\");\n if (x == null) { x = coords.left; }\n else { coords.left = x; }\n cur = findPosV(this$1, coords, dir, unit);\n if (cur.hitSide) { break }\n }\n return cur\n },\n\n moveV: methodOp(function(dir, unit) {\n var this$1 = this;\n\n var doc = this.doc, goals = [];\n var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();\n doc.extendSelectionsBy(function (range$$1) {\n if (collapse)\n { return dir < 0 ? range$$1.from() : range$$1.to() }\n var headPos = cursorCoords(this$1, range$$1.head, \"div\");\n if (range$$1.goalColumn != null) { headPos.left = range$$1.goalColumn; }\n goals.push(headPos.left);\n var pos = findPosV(this$1, headPos, dir, unit);\n if (unit == \"page\" && range$$1 == doc.sel.primary())\n { addToScrollTop(this$1, charCoords(this$1, pos, \"div\").top - headPos.top); }\n return pos\n }, sel_move);\n if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)\n { doc.sel.ranges[i].goalColumn = goals[i]; } }\n }),\n\n // Find the word at the given position (as returned by coordsChar).\n findWordAt: function(pos) {\n var doc = this.doc, line = getLine(doc, pos.line).text;\n var start = pos.ch, end = pos.ch;\n if (line) {\n var helper = this.getHelper(pos, \"wordChars\");\n if ((pos.sticky == \"before\" || end == line.length) && start) { --start; } else { ++end; }\n var startChar = line.charAt(start);\n var check = isWordChar(startChar, helper)\n ? function (ch) { return isWordChar(ch, helper); }\n : /\\s/.test(startChar) ? function (ch) { return /\\s/.test(ch); }\n : function (ch) { return (!/\\s/.test(ch) && !isWordChar(ch)); };\n while (start > 0 && check(line.charAt(start - 1))) { --start; }\n while (end < line.length && check(line.charAt(end))) { ++end; }\n }\n return new Range(Pos(pos.line, start), Pos(pos.line, end))\n },\n\n toggleOverwrite: function(value) {\n if (value != null && value == this.state.overwrite) { return }\n if (this.state.overwrite = !this.state.overwrite)\n { addClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n else\n { rmClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n\n signal(this, \"overwriteToggle\", this, this.state.overwrite);\n },\n hasFocus: function() { return this.display.input.getField() == activeElt() },\n isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },\n\n scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }),\n getScrollInfo: function() {\n var scroller = this.display.scroller;\n return {left: scroller.scrollLeft, top: scroller.scrollTop,\n height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,\n width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,\n clientHeight: displayHeight(this), clientWidth: displayWidth(this)}\n },\n\n scrollIntoView: methodOp(function(range$$1, margin) {\n if (range$$1 == null) {\n range$$1 = {from: this.doc.sel.primary().head, to: null};\n if (margin == null) { margin = this.options.cursorScrollMargin; }\n } else if (typeof range$$1 == \"number\") {\n range$$1 = {from: Pos(range$$1, 0), to: null};\n } else if (range$$1.from == null) {\n range$$1 = {from: range$$1, to: null};\n }\n if (!range$$1.to) { range$$1.to = range$$1.from; }\n range$$1.margin = margin || 0;\n\n if (range$$1.from.line != null) {\n scrollToRange(this, range$$1);\n } else {\n scrollToCoordsRange(this, range$$1.from, range$$1.to, range$$1.margin);\n }\n }),\n\n setSize: methodOp(function(width, height) {\n var this$1 = this;\n\n var interpret = function (val) { return typeof val == \"number\" || /^\\d+$/.test(String(val)) ? val + \"px\" : val; };\n if (width != null) { this.display.wrapper.style.width = interpret(width); }\n if (height != null) { this.display.wrapper.style.height = interpret(height); }\n if (this.options.lineWrapping) { clearLineMeasurementCache(this); }\n var lineNo$$1 = this.display.viewFrom;\n this.doc.iter(lineNo$$1, this.display.viewTo, function (line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)\n { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo$$1, \"widget\"); break } } }\n ++lineNo$$1;\n });\n this.curOp.forceUpdate = true;\n signal(this, \"refresh\", this);\n }),\n\n operation: function(f){return runInOp(this, f)},\n startOperation: function(){return startOperation(this)},\n endOperation: function(){return endOperation(this)},\n\n refresh: methodOp(function() {\n var oldHeight = this.display.cachedTextHeight;\n regChange(this);\n this.curOp.forceUpdate = true;\n clearCaches(this);\n scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);\n updateGutterSpace(this.display);\n if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5)\n { estimateLineHeights(this); }\n signal(this, \"refresh\", this);\n }),\n\n swapDoc: methodOp(function(doc) {\n var old = this.doc;\n old.cm = null;\n // Cancel the current text selection if any (#5821)\n if (this.state.selectingText) { this.state.selectingText(); }\n attachDoc(this, doc);\n clearCaches(this);\n this.display.input.reset();\n scrollToCoords(this, doc.scrollLeft, doc.scrollTop);\n this.curOp.forceScroll = true;\n signalLater(this, \"swapDoc\", this, old);\n return old\n }),\n\n phrase: function(phraseText) {\n var phrases = this.options.phrases;\n return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText\n },\n\n getInputField: function(){return this.display.input.getField()},\n getWrapperElement: function(){return this.display.wrapper},\n getScrollerElement: function(){return this.display.scroller},\n getGutterElement: function(){return this.display.gutters}\n };\n eventMixin(CodeMirror);\n\n CodeMirror.registerHelper = function(type, name, value) {\n if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; }\n helpers[type][name] = value;\n };\n CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {\n CodeMirror.registerHelper(type, name, value);\n helpers[type]._global.push({pred: predicate, val: value});\n };\n }\n\n // Used for horizontal relative motion. Dir is -1 or 1 (left or\n // right), unit can be \"char\", \"column\" (like char, but doesn't\n // cross line boundaries), \"word\" (across next word), or \"group\" (to\n // the start of next group of word or non-word-non-whitespace\n // chars). The visually param controls whether, in right-to-left\n // text, direction 1 means to move towards the next index in the\n // string, or towards the character to the right of the current\n // position. The resulting position will have a hitSide=true\n // property if it reached the end of the document.\n function findPosH(doc, pos, dir, unit, visually) {\n var oldPos = pos;\n var origDir = dir;\n var lineObj = getLine(doc, pos.line);\n function findNextLine() {\n var l = pos.line + dir;\n if (l < doc.first || l >= doc.first + doc.size) { return false }\n pos = new Pos(l, pos.ch, pos.sticky);\n return lineObj = getLine(doc, l)\n }\n function moveOnce(boundToLine) {\n var next;\n if (visually) {\n next = moveVisually(doc.cm, lineObj, pos, dir);\n } else {\n next = moveLogically(lineObj, pos, dir);\n }\n if (next == null) {\n if (!boundToLine && findNextLine())\n { pos = endOfLine(visually, doc.cm, lineObj, pos.line, dir); }\n else\n { return false }\n } else {\n pos = next;\n }\n return true\n }\n\n if (unit == \"char\") {\n moveOnce();\n } else if (unit == \"column\") {\n moveOnce(true);\n } else if (unit == \"word\" || unit == \"group\") {\n var sawType = null, group = unit == \"group\";\n var helper = doc.cm && doc.cm.getHelper(pos, \"wordChars\");\n for (var first = true;; first = false) {\n if (dir < 0 && !moveOnce(!first)) { break }\n var cur = lineObj.text.charAt(pos.ch) || \"\\n\";\n var type = isWordChar(cur, helper) ? \"w\"\n : group && cur == \"\\n\" ? \"n\"\n : !group || /\\s/.test(cur) ? null\n : \"p\";\n if (group && !first && !type) { type = \"s\"; }\n if (sawType && sawType != type) {\n if (dir < 0) {dir = 1; moveOnce(); pos.sticky = \"after\";}\n break\n }\n\n if (type) { sawType = type; }\n if (dir > 0 && !moveOnce(!first)) { break }\n }\n }\n var result = skipAtomic(doc, pos, oldPos, origDir, true);\n if (equalCursorPos(oldPos, result)) { result.hitSide = true; }\n return result\n }\n\n // For relative vertical movement. Dir may be -1 or 1. Unit can be\n // \"page\" or \"line\". The resulting position will have a hitSide=true\n // property if it reached the end of the document.\n function findPosV(cm, pos, dir, unit) {\n var doc = cm.doc, x = pos.left, y;\n if (unit == \"page\") {\n var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);\n var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);\n y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;\n\n } else if (unit == \"line\") {\n y = dir > 0 ? pos.bottom + 3 : pos.top - 3;\n }\n var target;\n for (;;) {\n target = coordsChar(cm, x, y);\n if (!target.outside) { break }\n if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break }\n y += dir * 5;\n }\n return target\n }\n\n // CONTENTEDITABLE INPUT STYLE\n\n var ContentEditableInput = function(cm) {\n this.cm = cm;\n this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;\n this.polling = new Delayed();\n this.composing = null;\n this.gracePeriod = false;\n this.readDOMTimeout = null;\n };\n\n ContentEditableInput.prototype.init = function (display) {\n var this$1 = this;\n\n var input = this, cm = input.cm;\n var div = input.div = display.lineDiv;\n disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize);\n\n on(div, \"paste\", function (e) {\n if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n // IE doesn't fire input events, so we schedule a read for the pasted content in this way\n if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); }\n });\n\n on(div, \"compositionstart\", function (e) {\n this$1.composing = {data: e.data, done: false};\n });\n on(div, \"compositionupdate\", function (e) {\n if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; }\n });\n on(div, \"compositionend\", function (e) {\n if (this$1.composing) {\n if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); }\n this$1.composing.done = true;\n }\n });\n\n on(div, \"touchstart\", function () { return input.forceCompositionEnd(); });\n\n on(div, \"input\", function () {\n if (!this$1.composing) { this$1.readFromDOMSoon(); }\n });\n\n function onCopyCut(e) {\n if (signalDOMEvent(cm, e)) { return }\n if (cm.somethingSelected()) {\n setLastCopied({lineWise: false, text: cm.getSelections()});\n if (e.type == \"cut\") { cm.replaceSelection(\"\", null, \"cut\"); }\n } else if (!cm.options.lineWiseCopyCut) {\n return\n } else {\n var ranges = copyableRanges(cm);\n setLastCopied({lineWise: true, text: ranges.text});\n if (e.type == \"cut\") {\n cm.operation(function () {\n cm.setSelections(ranges.ranges, 0, sel_dontScroll);\n cm.replaceSelection(\"\", null, \"cut\");\n });\n }\n }\n if (e.clipboardData) {\n e.clipboardData.clearData();\n var content = lastCopied.text.join(\"\\n\");\n // iOS exposes the clipboard API, but seems to discard content inserted into it\n e.clipboardData.setData(\"Text\", content);\n if (e.clipboardData.getData(\"Text\") == content) {\n e.preventDefault();\n return\n }\n }\n // Old-fashioned briefly-focus-a-textarea hack\n var kludge = hiddenTextarea(), te = kludge.firstChild;\n cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);\n te.value = lastCopied.text.join(\"\\n\");\n var hadFocus = document.activeElement;\n selectInput(te);\n setTimeout(function () {\n cm.display.lineSpace.removeChild(kludge);\n hadFocus.focus();\n if (hadFocus == div) { input.showPrimarySelection(); }\n }, 50);\n }\n on(div, \"copy\", onCopyCut);\n on(div, \"cut\", onCopyCut);\n };\n\n ContentEditableInput.prototype.prepareSelection = function () {\n var result = prepareSelection(this.cm, false);\n result.focus = this.cm.state.focused;\n return result\n };\n\n ContentEditableInput.prototype.showSelection = function (info, takeFocus) {\n if (!info || !this.cm.display.view.length) { return }\n if (info.focus || takeFocus) { this.showPrimarySelection(); }\n this.showMultipleSelections(info);\n };\n\n ContentEditableInput.prototype.getSelection = function () {\n return this.cm.display.wrapper.ownerDocument.getSelection()\n };\n\n ContentEditableInput.prototype.showPrimarySelection = function () {\n var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();\n var from = prim.from(), to = prim.to();\n\n if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {\n sel.removeAllRanges();\n return\n }\n\n var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset);\n if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&\n cmp(minPos(curAnchor, curFocus), from) == 0 &&\n cmp(maxPos(curAnchor, curFocus), to) == 0)\n { return }\n\n var view = cm.display.view;\n var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) ||\n {node: view[0].measure.map[2], offset: 0};\n var end = to.line < cm.display.viewTo && posToDOM(cm, to);\n if (!end) {\n var measure = view[view.length - 1].measure;\n var map$$1 = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;\n end = {node: map$$1[map$$1.length - 1], offset: map$$1[map$$1.length - 2] - map$$1[map$$1.length - 3]};\n }\n\n if (!start || !end) {\n sel.removeAllRanges();\n return\n }\n\n var old = sel.rangeCount && sel.getRangeAt(0), rng;\n try { rng = range(start.node, start.offset, end.offset, end.node); }\n catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible\n if (rng) {\n if (!gecko && cm.state.focused) {\n sel.collapse(start.node, start.offset);\n if (!rng.collapsed) {\n sel.removeAllRanges();\n sel.addRange(rng);\n }\n } else {\n sel.removeAllRanges();\n sel.addRange(rng);\n }\n if (old && sel.anchorNode == null) { sel.addRange(old); }\n else if (gecko) { this.startGracePeriod(); }\n }\n this.rememberSelection();\n };\n\n ContentEditableInput.prototype.startGracePeriod = function () {\n var this$1 = this;\n\n clearTimeout(this.gracePeriod);\n this.gracePeriod = setTimeout(function () {\n this$1.gracePeriod = false;\n if (this$1.selectionChanged())\n { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); }\n }, 20);\n };\n\n ContentEditableInput.prototype.showMultipleSelections = function (info) {\n removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);\n removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);\n };\n\n ContentEditableInput.prototype.rememberSelection = function () {\n var sel = this.getSelection();\n this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;\n this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;\n };\n\n ContentEditableInput.prototype.selectionInEditor = function () {\n var sel = this.getSelection();\n if (!sel.rangeCount) { return false }\n var node = sel.getRangeAt(0).commonAncestorContainer;\n return contains(this.div, node)\n };\n\n ContentEditableInput.prototype.focus = function () {\n if (this.cm.options.readOnly != \"nocursor\") {\n if (!this.selectionInEditor())\n { this.showSelection(this.prepareSelection(), true); }\n this.div.focus();\n }\n };\n ContentEditableInput.prototype.blur = function () { this.div.blur(); };\n ContentEditableInput.prototype.getField = function () { return this.div };\n\n ContentEditableInput.prototype.supportsTouch = function () { return true };\n\n ContentEditableInput.prototype.receivedFocus = function () {\n var input = this;\n if (this.selectionInEditor())\n { this.pollSelection(); }\n else\n { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }\n\n function poll() {\n if (input.cm.state.focused) {\n input.pollSelection();\n input.polling.set(input.cm.options.pollInterval, poll);\n }\n }\n this.polling.set(this.cm.options.pollInterval, poll);\n };\n\n ContentEditableInput.prototype.selectionChanged = function () {\n var sel = this.getSelection();\n return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||\n sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset\n };\n\n ContentEditableInput.prototype.pollSelection = function () {\n if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }\n var sel = this.getSelection(), cm = this.cm;\n // On Android Chrome (version 56, at least), backspacing into an\n // uneditable block element will put the cursor in that element,\n // and then, because it's not editable, hide the virtual keyboard.\n // Because Android doesn't allow us to actually detect backspace\n // presses in a sane way, this code checks for when that happens\n // and simulates a backspace press in this case.\n if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) {\n this.cm.triggerOnKeyDown({type: \"keydown\", keyCode: 8, preventDefault: Math.abs});\n this.blur();\n this.focus();\n return\n }\n if (this.composing) { return }\n this.rememberSelection();\n var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n var head = domToPos(cm, sel.focusNode, sel.focusOffset);\n if (anchor && head) { runInOp(cm, function () {\n setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);\n if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; }\n }); }\n };\n\n ContentEditableInput.prototype.pollContent = function () {\n if (this.readDOMTimeout != null) {\n clearTimeout(this.readDOMTimeout);\n this.readDOMTimeout = null;\n }\n\n var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();\n var from = sel.from(), to = sel.to();\n if (from.ch == 0 && from.line > cm.firstLine())\n { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); }\n if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine())\n { to = Pos(to.line + 1, 0); }\n if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false }\n\n var fromIndex, fromLine, fromNode;\n if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {\n fromLine = lineNo(display.view[0].line);\n fromNode = display.view[0].node;\n } else {\n fromLine = lineNo(display.view[fromIndex].line);\n fromNode = display.view[fromIndex - 1].node.nextSibling;\n }\n var toIndex = findViewIndex(cm, to.line);\n var toLine, toNode;\n if (toIndex == display.view.length - 1) {\n toLine = display.viewTo - 1;\n toNode = display.lineDiv.lastChild;\n } else {\n toLine = lineNo(display.view[toIndex + 1].line) - 1;\n toNode = display.view[toIndex + 1].node.previousSibling;\n }\n\n if (!fromNode) { return false }\n var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));\n var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));\n while (newText.length > 1 && oldText.length > 1) {\n if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }\n else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }\n else { break }\n }\n\n var cutFront = 0, cutEnd = 0;\n var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);\n while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))\n { ++cutFront; }\n var newBot = lst(newText), oldBot = lst(oldText);\n var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),\n oldBot.length - (oldText.length == 1 ? cutFront : 0));\n while (cutEnd < maxCutEnd &&\n newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))\n { ++cutEnd; }\n // Try to move start of change to start of selection if ambiguous\n if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {\n while (cutFront && cutFront > from.ch &&\n newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {\n cutFront--;\n cutEnd++;\n }\n }\n\n newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\\u200b+/, \"\");\n newText[0] = newText[0].slice(cutFront).replace(/\\u200b+$/, \"\");\n\n var chFrom = Pos(fromLine, cutFront);\n var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);\n if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {\n replaceRange(cm.doc, newText, chFrom, chTo, \"+input\");\n return true\n }\n };\n\n ContentEditableInput.prototype.ensurePolled = function () {\n this.forceCompositionEnd();\n };\n ContentEditableInput.prototype.reset = function () {\n this.forceCompositionEnd();\n };\n ContentEditableInput.prototype.forceCompositionEnd = function () {\n if (!this.composing) { return }\n clearTimeout(this.readDOMTimeout);\n this.composing = null;\n this.updateFromDOM();\n this.div.blur();\n this.div.focus();\n };\n ContentEditableInput.prototype.readFromDOMSoon = function () {\n var this$1 = this;\n\n if (this.readDOMTimeout != null) { return }\n this.readDOMTimeout = setTimeout(function () {\n this$1.readDOMTimeout = null;\n if (this$1.composing) {\n if (this$1.composing.done) { this$1.composing = null; }\n else { return }\n }\n this$1.updateFromDOM();\n }, 80);\n };\n\n ContentEditableInput.prototype.updateFromDOM = function () {\n var this$1 = this;\n\n if (this.cm.isReadOnly() || !this.pollContent())\n { runInOp(this.cm, function () { return regChange(this$1.cm); }); }\n };\n\n ContentEditableInput.prototype.setUneditable = function (node) {\n node.contentEditable = \"false\";\n };\n\n ContentEditableInput.prototype.onKeyPress = function (e) {\n if (e.charCode == 0 || this.composing) { return }\n e.preventDefault();\n if (!this.cm.isReadOnly())\n { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }\n };\n\n ContentEditableInput.prototype.readOnlyChanged = function (val) {\n this.div.contentEditable = String(val != \"nocursor\");\n };\n\n ContentEditableInput.prototype.onContextMenu = function () {};\n ContentEditableInput.prototype.resetPosition = function () {};\n\n ContentEditableInput.prototype.needsContentAttribute = true;\n\n function posToDOM(cm, pos) {\n var view = findViewForLine(cm, pos.line);\n if (!view || view.hidden) { return null }\n var line = getLine(cm.doc, pos.line);\n var info = mapFromLineView(view, line, pos.line);\n\n var order = getOrder(line, cm.doc.direction), side = \"left\";\n if (order) {\n var partPos = getBidiPartAt(order, pos.ch);\n side = partPos % 2 ? \"right\" : \"left\";\n }\n var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);\n result.offset = result.collapse == \"right\" ? result.end : result.start;\n return result\n }\n\n function isInGutter(node) {\n for (var scan = node; scan; scan = scan.parentNode)\n { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } }\n return false\n }\n\n function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }\n\n function domTextBetween(cm, from, to, fromLine, toLine) {\n var text = \"\", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;\n function recognizeMarker(id) { return function (marker) { return marker.id == id; } }\n function close() {\n if (closing) {\n text += lineSep;\n if (extraLinebreak) { text += lineSep; }\n closing = extraLinebreak = false;\n }\n }\n function addText(str) {\n if (str) {\n close();\n text += str;\n }\n }\n function walk(node) {\n if (node.nodeType == 1) {\n var cmText = node.getAttribute(\"cm-text\");\n if (cmText) {\n addText(cmText);\n return\n }\n var markerID = node.getAttribute(\"cm-marker\"), range$$1;\n if (markerID) {\n var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));\n if (found.length && (range$$1 = found[0].find(0)))\n { addText(getBetween(cm.doc, range$$1.from, range$$1.to).join(lineSep)); }\n return\n }\n if (node.getAttribute(\"contenteditable\") == \"false\") { return }\n var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);\n if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }\n\n if (isBlock) { close(); }\n for (var i = 0; i < node.childNodes.length; i++)\n { walk(node.childNodes[i]); }\n\n if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }\n if (isBlock) { closing = true; }\n } else if (node.nodeType == 3) {\n addText(node.nodeValue.replace(/\\u200b/g, \"\").replace(/\\u00a0/g, \" \"));\n }\n }\n for (;;) {\n walk(from);\n if (from == to) { break }\n from = from.nextSibling;\n extraLinebreak = false;\n }\n return text\n }\n\n function domToPos(cm, node, offset) {\n var lineNode;\n if (node == cm.display.lineDiv) {\n lineNode = cm.display.lineDiv.childNodes[offset];\n if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) }\n node = null; offset = 0;\n } else {\n for (lineNode = node;; lineNode = lineNode.parentNode) {\n if (!lineNode || lineNode == cm.display.lineDiv) { return null }\n if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break }\n }\n }\n for (var i = 0; i < cm.display.view.length; i++) {\n var lineView = cm.display.view[i];\n if (lineView.node == lineNode)\n { return locateNodeInLineView(lineView, node, offset) }\n }\n }\n\n function locateNodeInLineView(lineView, node, offset) {\n var wrapper = lineView.text.firstChild, bad = false;\n if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }\n if (node == wrapper) {\n bad = true;\n node = wrapper.childNodes[offset];\n offset = 0;\n if (!node) {\n var line = lineView.rest ? lst(lineView.rest) : lineView.line;\n return badPos(Pos(lineNo(line), line.text.length), bad)\n }\n }\n\n var textNode = node.nodeType == 3 ? node : null, topNode = node;\n if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {\n textNode = node.firstChild;\n if (offset) { offset = textNode.nodeValue.length; }\n }\n while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; }\n var measure = lineView.measure, maps = measure.maps;\n\n function find(textNode, topNode, offset) {\n for (var i = -1; i < (maps ? maps.length : 0); i++) {\n var map$$1 = i < 0 ? measure.map : maps[i];\n for (var j = 0; j < map$$1.length; j += 3) {\n var curNode = map$$1[j + 2];\n if (curNode == textNode || curNode == topNode) {\n var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);\n var ch = map$$1[j] + offset;\n if (offset < 0 || curNode != textNode) { ch = map$$1[j + (offset ? 1 : 0)]; }\n return Pos(line, ch)\n }\n }\n }\n }\n var found = find(textNode, topNode, offset);\n if (found) { return badPos(found, bad) }\n\n // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems\n for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {\n found = find(after, after.firstChild, 0);\n if (found)\n { return badPos(Pos(found.line, found.ch - dist), bad) }\n else\n { dist += after.textContent.length; }\n }\n for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {\n found = find(before, before.firstChild, -1);\n if (found)\n { return badPos(Pos(found.line, found.ch + dist$1), bad) }\n else\n { dist$1 += before.textContent.length; }\n }\n }\n\n // TEXTAREA INPUT STYLE\n\n var TextareaInput = function(cm) {\n this.cm = cm;\n // See input.poll and input.reset\n this.prevInput = \"\";\n\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n this.pollingFast = false;\n // Self-resetting timeout for the poller\n this.polling = new Delayed();\n // Used to work around IE issue with selection being forgotten when focus moves away from textarea\n this.hasSelection = false;\n this.composing = null;\n };\n\n TextareaInput.prototype.init = function (display) {\n var this$1 = this;\n\n var input = this, cm = this.cm;\n this.createField(display);\n var te = this.textarea;\n\n display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);\n\n // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)\n if (ios) { te.style.width = \"0px\"; }\n\n on(te, \"input\", function () {\n if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; }\n input.poll();\n });\n\n on(te, \"paste\", function (e) {\n if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n\n cm.state.pasteIncoming = +new Date;\n input.fastPoll();\n });\n\n function prepareCopyCut(e) {\n if (signalDOMEvent(cm, e)) { return }\n if (cm.somethingSelected()) {\n setLastCopied({lineWise: false, text: cm.getSelections()});\n } else if (!cm.options.lineWiseCopyCut) {\n return\n } else {\n var ranges = copyableRanges(cm);\n setLastCopied({lineWise: true, text: ranges.text});\n if (e.type == \"cut\") {\n cm.setSelections(ranges.ranges, null, sel_dontScroll);\n } else {\n input.prevInput = \"\";\n te.value = ranges.text.join(\"\\n\");\n selectInput(te);\n }\n }\n if (e.type == \"cut\") { cm.state.cutIncoming = +new Date; }\n }\n on(te, \"cut\", prepareCopyCut);\n on(te, \"copy\", prepareCopyCut);\n\n on(display.scroller, \"paste\", function (e) {\n if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }\n if (!te.dispatchEvent) {\n cm.state.pasteIncoming = +new Date;\n input.focus();\n return\n }\n\n // Pass the `paste` event to the textarea so it's handled by its event listener.\n var event = new Event(\"paste\");\n event.clipboardData = e.clipboardData;\n te.dispatchEvent(event);\n });\n\n // Prevent normal selection in the editor (we handle our own)\n on(display.lineSpace, \"selectstart\", function (e) {\n if (!eventInWidget(display, e)) { e_preventDefault(e); }\n });\n\n on(te, \"compositionstart\", function () {\n var start = cm.getCursor(\"from\");\n if (input.composing) { input.composing.range.clear(); }\n input.composing = {\n start: start,\n range: cm.markText(start, cm.getCursor(\"to\"), {className: \"CodeMirror-composing\"})\n };\n });\n on(te, \"compositionend\", function () {\n if (input.composing) {\n input.poll();\n input.composing.range.clear();\n input.composing = null;\n }\n });\n };\n\n TextareaInput.prototype.createField = function (_display) {\n // Wraps and hides input textarea\n this.wrapper = hiddenTextarea();\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n this.textarea = this.wrapper.firstChild;\n };\n\n TextareaInput.prototype.prepareSelection = function () {\n // Redraw the selection and/or cursor\n var cm = this.cm, display = cm.display, doc = cm.doc;\n var result = prepareSelection(cm);\n\n // Move the hidden textarea near the cursor to prevent scrolling artifacts\n if (cm.options.moveInputWithCursor) {\n var headPos = cursorCoords(cm, doc.sel.primary().head, \"div\");\n var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();\n result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,\n headPos.top + lineOff.top - wrapOff.top));\n result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,\n headPos.left + lineOff.left - wrapOff.left));\n }\n\n return result\n };\n\n TextareaInput.prototype.showSelection = function (drawn) {\n var cm = this.cm, display = cm.display;\n removeChildrenAndAdd(display.cursorDiv, drawn.cursors);\n removeChildrenAndAdd(display.selectionDiv, drawn.selection);\n if (drawn.teTop != null) {\n this.wrapper.style.top = drawn.teTop + \"px\";\n this.wrapper.style.left = drawn.teLeft + \"px\";\n }\n };\n\n // Reset the input to correspond to the selection (or to be empty,\n // when not typing and nothing is selected)\n TextareaInput.prototype.reset = function (typing) {\n if (this.contextMenuPending || this.composing) { return }\n var cm = this.cm;\n if (cm.somethingSelected()) {\n this.prevInput = \"\";\n var content = cm.getSelection();\n this.textarea.value = content;\n if (cm.state.focused) { selectInput(this.textarea); }\n if (ie && ie_version >= 9) { this.hasSelection = content; }\n } else if (!typing) {\n this.prevInput = this.textarea.value = \"\";\n if (ie && ie_version >= 9) { this.hasSelection = null; }\n }\n };\n\n TextareaInput.prototype.getField = function () { return this.textarea };\n\n TextareaInput.prototype.supportsTouch = function () { return false };\n\n TextareaInput.prototype.focus = function () {\n if (this.cm.options.readOnly != \"nocursor\" && (!mobile || activeElt() != this.textarea)) {\n try { this.textarea.focus(); }\n catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM\n }\n };\n\n TextareaInput.prototype.blur = function () { this.textarea.blur(); };\n\n TextareaInput.prototype.resetPosition = function () {\n this.wrapper.style.top = this.wrapper.style.left = 0;\n };\n\n TextareaInput.prototype.receivedFocus = function () { this.slowPoll(); };\n\n // Poll for input changes, using the normal rate of polling. This\n // runs as long as the editor is focused.\n TextareaInput.prototype.slowPoll = function () {\n var this$1 = this;\n\n if (this.pollingFast) { return }\n this.polling.set(this.cm.options.pollInterval, function () {\n this$1.poll();\n if (this$1.cm.state.focused) { this$1.slowPoll(); }\n });\n };\n\n // When an event has just come in that is likely to add or change\n // something in the input textarea, we poll faster, to ensure that\n // the change appears on the screen quickly.\n TextareaInput.prototype.fastPoll = function () {\n var missed = false, input = this;\n input.pollingFast = true;\n function p() {\n var changed = input.poll();\n if (!changed && !missed) {missed = true; input.polling.set(60, p);}\n else {input.pollingFast = false; input.slowPoll();}\n }\n input.polling.set(20, p);\n };\n\n // Read input from the textarea, and update the document to match.\n // When something is selected, it is present in the textarea, and\n // selected (unless it is huge, in which case a placeholder is\n // used). When nothing is selected, the cursor sits after previously\n // seen text (can be empty), which is stored in prevInput (we must\n // not reset the textarea when typing, because that breaks IME).\n TextareaInput.prototype.poll = function () {\n var this$1 = this;\n\n var cm = this.cm, input = this.textarea, prevInput = this.prevInput;\n // Since this is called a *lot*, try to bail out as cheaply as\n // possible when it is clear that nothing happened. hasSelection\n // will be the case when there is a lot of text in the textarea,\n // in which case reading its value would be expensive.\n if (this.contextMenuPending || !cm.state.focused ||\n (hasSelection(input) && !prevInput && !this.composing) ||\n cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)\n { return false }\n\n var text = input.value;\n // If nothing changed, bail.\n if (text == prevInput && !cm.somethingSelected()) { return false }\n // Work around nonsensical selection resetting in IE9/10, and\n // inexplicable appearance of private area unicode characters on\n // some key combos in Mac (#2689).\n if (ie && ie_version >= 9 && this.hasSelection === text ||\n mac && /[\\uf700-\\uf7ff]/.test(text)) {\n cm.display.input.reset();\n return false\n }\n\n if (cm.doc.sel == cm.display.selForContextMenu) {\n var first = text.charCodeAt(0);\n if (first == 0x200b && !prevInput) { prevInput = \"\\u200b\"; }\n if (first == 0x21da) { this.reset(); return this.cm.execCommand(\"undo\") }\n }\n // Find the part of the input that is actually new\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; }\n\n runInOp(cm, function () {\n applyTextInput(cm, text.slice(same), prevInput.length - same,\n null, this$1.composing ? \"*compose\" : null);\n\n // Don't leave long text in the textarea, since it makes further polling slow\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) { input.value = this$1.prevInput = \"\"; }\n else { this$1.prevInput = text; }\n\n if (this$1.composing) {\n this$1.composing.range.clear();\n this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor(\"to\"),\n {className: \"CodeMirror-composing\"});\n }\n });\n return true\n };\n\n TextareaInput.prototype.ensurePolled = function () {\n if (this.pollingFast && this.poll()) { this.pollingFast = false; }\n };\n\n TextareaInput.prototype.onKeyPress = function () {\n if (ie && ie_version >= 9) { this.hasSelection = null; }\n this.fastPoll();\n };\n\n TextareaInput.prototype.onContextMenu = function (e) {\n var input = this, cm = input.cm, display = cm.display, te = input.textarea;\n if (input.contextMenuPending) { input.contextMenuPending(); }\n var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;\n if (!pos || presto) { return } // Opera is difficult.\n\n // Reset the current text selection only if the click is done outside of the selection\n // and 'resetSelectionOnContextMenu' option is true.\n var reset = cm.options.resetSelectionOnContextMenu;\n if (reset && cm.doc.sel.contains(pos) == -1)\n { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); }\n\n var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText;\n var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect();\n input.wrapper.style.cssText = \"position: static\";\n te.style.cssText = \"position: absolute; width: 30px; height: 30px;\\n top: \" + (e.clientY - wrapperBox.top - 5) + \"px; left: \" + (e.clientX - wrapperBox.left - 5) + \"px;\\n z-index: 1000; background: \" + (ie ? \"rgba(255, 255, 255, .05)\" : \"transparent\") + \";\\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);\";\n var oldScrollY;\n if (webkit) { oldScrollY = window.scrollY; } // Work around Chrome issue (#2712)\n display.input.focus();\n if (webkit) { window.scrollTo(null, oldScrollY); }\n display.input.reset();\n // Adds \"Select all\" to context menu in FF\n if (!cm.somethingSelected()) { te.value = input.prevInput = \" \"; }\n input.contextMenuPending = rehide;\n display.selForContextMenu = cm.doc.sel;\n clearTimeout(display.detectingSelectAll);\n\n // Select-all will be greyed out if there's nothing to select, so\n // this adds a zero-width space so that we can later check whether\n // it got selected.\n function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }\n function rehide() {\n if (input.contextMenuPending != rehide) { return }\n input.contextMenuPending = false;\n input.wrapper.style.cssText = oldWrapperCSS;\n te.style.cssText = oldCSS;\n if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); }\n\n // Try to detect the user choosing select-all\n if (te.selectionStart != null) {\n if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); }\n var i = 0, poll = function () {\n if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&\n te.selectionEnd > 0 && input.prevInput == \"\\u200b\") {\n operation(cm, selectAll)(cm);\n } else if (i++ < 10) {\n display.detectingSelectAll = setTimeout(poll, 500);\n } else {\n display.selForContextMenu = null;\n display.input.reset();\n }\n };\n display.detectingSelectAll = setTimeout(poll, 200);\n }\n }\n\n if (ie && ie_version >= 9) { prepareSelectAllHack(); }\n if (captureRightClick) {\n e_stop(e);\n var mouseup = function () {\n off(window, \"mouseup\", mouseup);\n setTimeout(rehide, 20);\n };\n on(window, \"mouseup\", mouseup);\n } else {\n setTimeout(rehide, 50);\n }\n };\n\n TextareaInput.prototype.readOnlyChanged = function (val) {\n if (!val) { this.reset(); }\n this.textarea.disabled = val == \"nocursor\";\n };\n\n TextareaInput.prototype.setUneditable = function () {};\n\n TextareaInput.prototype.needsContentAttribute = false;\n\n function fromTextArea(textarea, options) {\n options = options ? copyObj(options) : {};\n options.value = textarea.value;\n if (!options.tabindex && textarea.tabIndex)\n { options.tabindex = textarea.tabIndex; }\n if (!options.placeholder && textarea.placeholder)\n { options.placeholder = textarea.placeholder; }\n // Set autofocus to true if this textarea is focused, or if it has\n // autofocus and no other element is focused.\n if (options.autofocus == null) {\n var hasFocus = activeElt();\n options.autofocus = hasFocus == textarea ||\n textarea.getAttribute(\"autofocus\") != null && hasFocus == document.body;\n }\n\n function save() {textarea.value = cm.getValue();}\n\n var realSubmit;\n if (textarea.form) {\n on(textarea.form, \"submit\", save);\n // Deplorable hack to make the submit method do the right thing.\n if (!options.leaveSubmitMethodAlone) {\n var form = textarea.form;\n realSubmit = form.submit;\n try {\n var wrappedSubmit = form.submit = function () {\n save();\n form.submit = realSubmit;\n form.submit();\n form.submit = wrappedSubmit;\n };\n } catch(e) {}\n }\n }\n\n options.finishInit = function (cm) {\n cm.save = save;\n cm.getTextArea = function () { return textarea; };\n cm.toTextArea = function () {\n cm.toTextArea = isNaN; // Prevent this from being ran twice\n save();\n textarea.parentNode.removeChild(cm.getWrapperElement());\n textarea.style.display = \"\";\n if (textarea.form) {\n off(textarea.form, \"submit\", save);\n if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == \"function\")\n { textarea.form.submit = realSubmit; }\n }\n };\n };\n\n textarea.style.display = \"none\";\n var cm = CodeMirror(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); },\n options);\n return cm\n }\n\n function addLegacyProps(CodeMirror) {\n CodeMirror.off = off;\n CodeMirror.on = on;\n CodeMirror.wheelEventPixels = wheelEventPixels;\n CodeMirror.Doc = Doc;\n CodeMirror.splitLines = splitLinesAuto;\n CodeMirror.countColumn = countColumn;\n CodeMirror.findColumn = findColumn;\n CodeMirror.isWordChar = isWordCharBasic;\n CodeMirror.Pass = Pass;\n CodeMirror.signal = signal;\n CodeMirror.Line = Line;\n CodeMirror.changeEnd = changeEnd;\n CodeMirror.scrollbarModel = scrollbarModel;\n CodeMirror.Pos = Pos;\n CodeMirror.cmpPos = cmp;\n CodeMirror.modes = modes;\n CodeMirror.mimeModes = mimeModes;\n CodeMirror.resolveMode = resolveMode;\n CodeMirror.getMode = getMode;\n CodeMirror.modeExtensions = modeExtensions;\n CodeMirror.extendMode = extendMode;\n CodeMirror.copyState = copyState;\n CodeMirror.startState = startState;\n CodeMirror.innerMode = innerMode;\n CodeMirror.commands = commands;\n CodeMirror.keyMap = keyMap;\n CodeMirror.keyName = keyName;\n CodeMirror.isModifierKey = isModifierKey;\n CodeMirror.lookupKey = lookupKey;\n CodeMirror.normalizeKeyMap = normalizeKeyMap;\n CodeMirror.StringStream = StringStream;\n CodeMirror.SharedTextMarker = SharedTextMarker;\n CodeMirror.TextMarker = TextMarker;\n CodeMirror.LineWidget = LineWidget;\n CodeMirror.e_preventDefault = e_preventDefault;\n CodeMirror.e_stopPropagation = e_stopPropagation;\n CodeMirror.e_stop = e_stop;\n CodeMirror.addClass = addClass;\n CodeMirror.contains = contains;\n CodeMirror.rmClass = rmClass;\n CodeMirror.keyNames = keyNames;\n }\n\n // EDITOR CONSTRUCTOR\n\n defineOptions(CodeMirror);\n\n addEditorMethods(CodeMirror);\n\n // Set up methods on CodeMirror's prototype to redirect to the editor's document.\n var dontDelegate = \"iter insert remove copy getEditor constructor\".split(\" \");\n for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)\n { CodeMirror.prototype[prop] = (function(method) {\n return function() {return method.apply(this.doc, arguments)}\n })(Doc.prototype[prop]); } }\n\n eventMixin(Doc);\n CodeMirror.inputStyles = {\"textarea\": TextareaInput, \"contenteditable\": ContentEditableInput};\n\n // Extra arguments are stored as the mode's dependencies, which is\n // used by (legacy) mechanisms like loadmode.js to automatically\n // load a mode. (Preferred mechanism is the require/define calls.)\n CodeMirror.defineMode = function(name/*, mode, …*/) {\n if (!CodeMirror.defaults.mode && name != \"null\") { CodeMirror.defaults.mode = name; }\n defineMode.apply(this, arguments);\n };\n\n CodeMirror.defineMIME = defineMIME;\n\n // Minimal default mode.\n CodeMirror.defineMode(\"null\", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); });\n CodeMirror.defineMIME(\"text/plain\", \"null\");\n\n // EXTENSIONS\n\n CodeMirror.defineExtension = function (name, func) {\n CodeMirror.prototype[name] = func;\n };\n CodeMirror.defineDocExtension = function (name, func) {\n Doc.prototype[name] = func;\n };\n\n CodeMirror.fromTextArea = fromTextArea;\n\n addLegacyProps(CodeMirror);\n\n CodeMirror.version = \"5.49.2\";\n\n return CodeMirror;\n\n})));\n","// DOM helpers\nimport { each, isUndefined } from 'underscore';\n\nconst KEY_TAG = 'tag';\nconst KEY_ATTR = 'attributes';\nconst KEY_CHILD = 'children';\n\nexport const empty = node => {\n while (node.firstChild) node.removeChild(node.firstChild);\n};\n\nexport const replaceWith = (oldEl, newEl) => {\n oldEl.parentNode.replaceChild(newEl, oldEl);\n};\n\nexport const appendAtIndex = (parent, child, index) => {\n const { childNodes } = parent;\n const total = childNodes.length;\n const at = isUndefined(index) ? total : index;\n\n if (at >= total) {\n parent.appendChild(child);\n } else {\n parent.insertBefore(child, childNodes[at]);\n }\n};\n\n/**\n * Append an array of vNodes to an element\n * @param {HTMLElement} node HTML element\n * @param {Array} vNodes Array of node objects\n */\nexport const appendVNodes = (node, vNodes = []) => {\n const vNodesArr = Array.isArray(vNodes) ? vNodes : [vNodes];\n vNodesArr.forEach(vnode => {\n const tag = vnode[KEY_TAG] || 'div';\n const attr = vnode[KEY_ATTR] || {};\n const el = document.createElement(tag);\n\n each(attr, (value, key) => {\n el.setAttribute(key, value);\n });\n\n node.appendChild(el);\n });\n};\n","import Backbone from 'backbone';\n\nexport default Backbone.View.extend({\n events() {\n return (\n this.model.get('events') || {\n mousedown: 'handleClick'\n }\n );\n },\n\n attributes() {\n return this.model.get('attributes');\n },\n\n initialize(opts = {}) {\n const { config = {} } = opts;\n this.em = config.em;\n this.editor = config.editor;\n },\n\n handleClick(event) {\n event.preventDefault();\n event.stopPropagation();\n\n /*\n * Since the toolbar lives outside the canvas frame, the event's\n * generated on it have clientX and clientY relative to the page.\n *\n * This causes issues during events like dragging, where they depend\n * on the clientX and clientY.\n *\n * This makes sure the offsets are calculated.\n *\n * More information on\n * https://github.com/artf/grapesjs/issues/2372\n * https://github.com/artf/grapesjs/issues/2207\n */\n\n const { editor, em } = this;\n const { left, top } = editor.Canvas.getFrameEl().getBoundingClientRect();\n\n const calibrated = {\n ...event,\n clientX: event.clientX - left,\n clientY: event.clientY - top\n };\n\n em.trigger('toolbar:run:before');\n this.execCommand(calibrated);\n },\n\n execCommand(event) {\n const opts = { event };\n const command = this.model.get('command');\n const editor = this.editor;\n\n if (typeof command === 'function') {\n command(editor, null, opts);\n }\n\n if (typeof command === 'string') {\n editor.runCommand(command, opts);\n }\n },\n\n render() {\n const { editor, $el, model } = this;\n const id = model.get('id');\n const label = model.get('label');\n const pfx = editor.getConfig('stylePrefix');\n $el.addClass(`${pfx}toolbar-item`);\n id && $el.addClass(`${pfx}toolbar-item__${id}`);\n label && $el.append(label);\n return this;\n }\n});\n","import DomainViews from 'domain_abstract/view/DomainViews';\nimport ToolbarButtonView from './ToolbarButtonView';\n\nexport default DomainViews.extend({\n itemView: ToolbarButtonView,\n\n initialize(opts = {}) {\n this.config = { editor: opts.editor || '', em: opts.em };\n this.listenTo(this.collection, 'reset', this.render);\n }\n});\n","import Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n defaults: {\n command: '',\n attributes: {}\n }\n});\n","import Backbone from 'backbone';\nimport ToolbarButton from './ToolbarButton';\n\nexport default Backbone.Collection.extend({ model: ToolbarButton });\n","import Backbone from 'backbone';\nimport { bindAll, isElement, isUndefined } from 'underscore';\nimport { on, off, getUnitFromValue, isTaggableNode } from 'utils/mixins';\nimport ToolbarView from 'dom_components/view/ToolbarView';\nimport Toolbar from 'dom_components/model/Toolbar';\n\nconst $ = Backbone.$;\nlet showOffsets;\n\nexport default {\n init(o) {\n bindAll(this, 'onHover', 'onOut', 'onClick', 'onFrameScroll');\n },\n\n enable() {\n this.frameOff = this.canvasOff = this.adjScroll = null;\n this.startSelectComponent();\n const { em } = this.config;\n showOffsets = 1;\n\n em.on('component:update', this.updateAttached, this);\n em.on('change:canvasOffset', this.updateAttached, this);\n },\n\n /**\n * Start select component event\n * @private\n * */\n startSelectComponent() {\n this.toggleSelectComponent(1);\n },\n\n /**\n * Stop select component event\n * @private\n * */\n stopSelectComponent() {\n this.toggleSelectComponent();\n },\n\n /**\n * Toggle select component event\n * @private\n * */\n toggleSelectComponent(enable) {\n const { em } = this;\n const method = enable ? 'on' : 'off';\n const methods = { on, off };\n const body = this.getCanvasBody();\n const win = this.getContentWindow();\n methods[method](body, 'mouseover', this.onHover);\n methods[method](body, 'mouseout', this.onOut);\n methods[method](body, 'click touchend', this.onClick);\n methods[method](win, 'scroll resize', this.onFrameScroll);\n em[method]('component:toggled', this.onSelect, this);\n em[method]('change:componentHovered', this.onHovered, this);\n },\n\n /**\n * Hover command\n * @param {Object} e\n * @private\n */\n onHover(e) {\n e.stopPropagation();\n let trg = e.target;\n let $el = $(trg);\n let model = $el.data('model');\n\n if (!model) {\n let parent = $el.parent();\n while (!model && parent.length > 0) {\n model = parent.data('model');\n parent = parent.parent();\n }\n }\n\n // Adjust tools scroll top\n if (!this.adjScroll) {\n this.adjScroll = 1;\n this.updateAttached();\n }\n\n if (model && !model.get('hoverable')) {\n let parent = model && model.parent();\n while (parent && !parent.get('hoverable')) parent = parent.parent();\n model = parent;\n }\n\n this.em.setHovered(model, { forceChange: 1 });\n },\n\n onHovered(em, component) {\n const trg = component && component.getEl();\n if (trg) {\n const pos = this.getElementPos(trg);\n this.updateBadge(trg, pos);\n this.updateHighlighter(trg, pos);\n this.showElementOffset(trg, pos);\n }\n },\n\n /**\n * Out command\n * @param {Object} e\n * @private\n */\n onOut(ev) {\n ev && ev.stopPropagation();\n this.hideBadge();\n this.hideHighlighter();\n this.hideElementOffset();\n },\n\n /**\n * Show element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n showElementOffset(el, pos) {\n var $el = $(el);\n var model = $el.data('model');\n\n if ((model && model.get('status') == 'selected') || !showOffsets) {\n return;\n }\n\n this.editor.runCommand('show-offset', {\n el,\n elPos: pos,\n force: 1\n });\n },\n\n /**\n * Hide element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n hideElementOffset(el, pos) {\n const { editor } = this;\n editor && editor.stopCommand('show-offset');\n },\n\n /**\n * Show fixed element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n showFixedElementOffset(el, pos) {\n this.editor.runCommand('show-offset', {\n el,\n elPos: pos,\n state: 'Fixed'\n });\n },\n\n /**\n * Hide fixed element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n hideFixedElementOffset(el, pos) {\n if (this.editor) this.editor.stopCommand('show-offset', { state: 'Fixed' });\n },\n\n /**\n * Hide Highlighter element\n */\n hideHighlighter() {\n this.canvas.getHighlighter().style.display = 'none';\n },\n\n /**\n * On element click\n * @param {Event} e\n * @private\n */\n onClick(e) {\n const { em } = this;\n e.stopPropagation();\n e.preventDefault();\n if (em.get('_cmpDrag')) return em.set('_cmpDrag');\n const $el = $(e.target);\n let model = $el.data('model');\n\n if (!model) {\n let parent = $el.parent();\n while (!model && parent.length > 0) {\n model = parent.data('model');\n parent = parent.parent();\n }\n }\n\n if (model) {\n if (model.get('selectable')) {\n this.select(model, e);\n } else {\n let parent = model.parent();\n while (parent && !parent.get('selectable')) parent = parent.parent();\n this.select(parent, e);\n }\n }\n },\n\n /**\n * Select component\n * @param {Component} model\n * @param {Event} event\n */\n select(model, event = {}) {\n if (!model) return;\n const ctrlKey = event.ctrlKey || event.metaKey;\n const shiftKey = event.shiftKey;\n const { editor } = this;\n const multiple = editor.getConfig('multipleSelection');\n const em = this.em;\n\n if (ctrlKey && multiple) {\n editor.selectToggle(model);\n } else if (shiftKey && multiple) {\n em.clearSelection(editor.Canvas.getWindow());\n const coll = model.collection;\n const index = coll.indexOf(model);\n const selAll = editor.getSelectedAll();\n let min, max;\n\n // Fin min and max siblings\n editor.getSelectedAll().forEach(sel => {\n const selColl = sel.collection;\n const selIndex = selColl.indexOf(sel);\n if (selColl === coll) {\n if (selIndex < index) {\n // First model BEFORE the selected one\n min = isUndefined(min) ? selIndex : Math.max(min, selIndex);\n } else if (selIndex > index) {\n // First model AFTER the selected one\n max = isUndefined(max) ? selIndex : Math.min(max, selIndex);\n }\n }\n });\n\n if (!isUndefined(min)) {\n while (min !== index) {\n editor.selectAdd(coll.at(min));\n min++;\n }\n }\n\n if (!isUndefined(max)) {\n while (max !== index) {\n editor.selectAdd(coll.at(max));\n max--;\n }\n }\n\n editor.selectAdd(model);\n } else {\n editor.select(model);\n }\n\n this.initResize(model);\n },\n\n /**\n * Update badge for the component\n * @param {Object} Component\n * @param {Object} pos Position object\n * @private\n * */\n updateBadge(el, pos) {\n var $el = $(el);\n var canvas = this.canvas;\n var config = canvas.getConfig();\n const ppfx = config.pStylePrefix || '';\n var customeLabel = config.customBadgeLabel;\n this.cacheEl = el;\n var model = $el.data('model');\n if (!model || !model.get('badgable')) return;\n var badge = this.getBadge();\n const icon = model.getIcon();\n const clsBadge = `${ppfx}badge`;\n let badgeLabel = `${\n icon ? `
${icon}
` : ''\n }\n
${model.getName()}
`;\n badgeLabel = customeLabel ? customeLabel(model) : badgeLabel;\n badge.innerHTML = badgeLabel;\n var bStyle = badge.style;\n var u = 'px';\n bStyle.display = 'block';\n var canvasPos = this.getCanvasPosition();\n\n if (canvasPos) {\n const canvasTop = canvasPos.top;\n const canvasLeft = canvasPos.left;\n const posTop = pos.top - (badge ? badge.offsetHeight : 0);\n const badgeW = badge ? badge.offsetWidth : 0;\n var top = posTop < canvasTop ? canvasTop : posTop;\n var left = pos.left + badgeW < canvasLeft ? canvasLeft : pos.left;\n bStyle.top = top + u;\n bStyle.left = left + u;\n }\n },\n\n /**\n * Update highlighter element\n * @param {HTMLElement} el\n * @param {Object} pos Position object\n * @private\n */\n updateHighlighter(el, pos) {\n var $el = $(el);\n var model = $el.data('model');\n\n if (\n !model ||\n !model.get('hoverable') ||\n model.get('status') == 'selected'\n ) {\n return;\n }\n\n var hlEl = this.canvas.getHighlighter();\n var hlStyle = hlEl.style;\n var unit = 'px';\n hlStyle.left = pos.left + unit;\n hlStyle.top = pos.top + unit;\n hlStyle.height = pos.height + unit;\n hlStyle.width = pos.width + unit;\n hlStyle.display = 'block';\n },\n\n /**\n * Say what to do after the component was selected\n * @param {Object} e\n * @param {Object} el\n * @private\n * */\n onSelect() {\n // Get the selected model directly from the Editor as the event might\n // be triggered manually without the model\n const model = this.em.getSelected();\n const view = model && model.view;\n this.updateToolbar(model);\n\n if (view) {\n const { el } = view;\n this.showFixedElementOffset(el);\n this.hideElementOffset();\n this.hideHighlighter();\n this.initResize(el);\n } else {\n this.editor.stopCommand('resize');\n }\n },\n\n /**\n * Init resizer on the element if possible\n * @param {HTMLElement|Component} elem\n * @private\n */\n initResize(elem) {\n const { em, canvas } = this;\n const editor = em ? em.get('Editor') : '';\n const config = em ? em.get('Config') : '';\n const pfx = config.stylePrefix || '';\n const resizeClass = `${pfx}resizing`;\n const model =\n !isElement(elem) && isTaggableNode(elem) ? elem : em.getSelected();\n const resizable = model.get('resizable');\n const el = isElement(elem) ? elem : model.getEl();\n let options = {};\n let modelToStyle;\n\n var toggleBodyClass = (method, e, opts) => {\n const docs = opts.docs;\n docs &&\n docs.forEach(doc => {\n const body = doc.body;\n const cls = body.className || '';\n body.className = (method == 'add'\n ? `${cls} ${resizeClass}`\n : cls.replace(resizeClass, '')\n ).trim();\n });\n };\n\n if (editor && resizable) {\n options = {\n // Here the resizer is updated with the current element height and width\n onStart(e, opts = {}) {\n const { el, config, resizer } = opts;\n const {\n keyHeight,\n keyWidth,\n currentUnit,\n keepAutoHeight,\n keepAutoWidth\n } = config;\n toggleBodyClass('add', e, opts);\n modelToStyle = em.get('StyleManager').getModelToStyle(model);\n const computedStyle = getComputedStyle(el);\n const modelStyle = modelToStyle.getStyle();\n\n let currentWidth = modelStyle[keyWidth];\n config.autoWidth = keepAutoWidth && currentWidth === 'auto';\n if (isNaN(parseFloat(currentWidth))) {\n currentWidth = computedStyle[keyWidth];\n }\n\n let currentHeight = modelStyle[keyHeight];\n config.autoHeight = keepAutoHeight && currentHeight === 'auto';\n if (isNaN(parseFloat(currentHeight))) {\n currentHeight = computedStyle[keyHeight];\n }\n\n resizer.startDim.w = parseFloat(currentWidth);\n resizer.startDim.h = parseFloat(currentHeight);\n showOffsets = 0;\n\n if (currentUnit) {\n config.unitHeight = getUnitFromValue(currentHeight);\n config.unitWidth = getUnitFromValue(currentWidth);\n }\n },\n\n // Update all positioned elements (eg. component toolbar)\n onMove() {\n editor.trigger('change:canvasOffset');\n },\n\n onEnd(e, opts) {\n toggleBodyClass('remove', e, opts);\n editor.trigger('change:canvasOffset');\n showOffsets = 1;\n },\n\n updateTarget(el, rect, options = {}) {\n if (!modelToStyle) {\n return;\n }\n\n const { store, selectedHandler, config } = options;\n const {\n keyHeight,\n keyWidth,\n autoHeight,\n autoWidth,\n unitWidth,\n unitHeight\n } = config;\n const onlyHeight = ['tc', 'bc'].indexOf(selectedHandler) >= 0;\n const onlyWidth = ['cl', 'cr'].indexOf(selectedHandler) >= 0;\n const style = modelToStyle.getStyle();\n\n if (!onlyHeight) {\n const bodyw = canvas.getBody().offsetWidth;\n const width = rect.w < bodyw ? rect.w : bodyw;\n style[keyWidth] = autoWidth ? 'auto' : `${width}${unitWidth}`;\n }\n\n if (!onlyWidth) {\n style[keyHeight] = autoHeight ? 'auto' : `${rect.h}${unitHeight}`;\n }\n\n modelToStyle.setStyle(style, { avoidStore: 1 });\n const updateEvent = `update:component:style`;\n em &&\n em.trigger(\n `${updateEvent}:${keyHeight} ${updateEvent}:${keyWidth}`\n );\n\n if (store) {\n modelToStyle.trigger('change:style', modelToStyle, style, {});\n }\n }\n };\n\n if (typeof resizable == 'object') {\n options = { ...options, ...resizable };\n }\n\n this.resizer = editor.runCommand('resize', { el, options, force: 1 });\n } else {\n editor.stopCommand('resize');\n this.resizer = null;\n }\n },\n\n /**\n * Update toolbar if the component has one\n * @param {Object} mod\n */\n updateToolbar(mod) {\n var em = this.config.em;\n var model = mod == em ? em.getSelected() : mod;\n var toolbarEl = this.canvas.getToolbarEl();\n var toolbarStyle = toolbarEl.style;\n\n if (!model) {\n // By putting `toolbarStyle.display = 'none'` will cause kind\n // of freezed effect with component selection (probably by iframe\n // switching)\n toolbarStyle.opacity = 0;\n return;\n }\n\n var toolbar = model.get('toolbar');\n var ppfx = this.ppfx;\n var showToolbar = em.get('Config').showToolbar;\n\n if (showToolbar && toolbar && toolbar.length) {\n toolbarStyle.opacity = '';\n toolbarStyle.display = '';\n if (!this.toolbar) {\n toolbarEl.innerHTML = '';\n this.toolbar = new Toolbar(toolbar);\n var toolbarView = new ToolbarView({\n collection: this.toolbar,\n editor: this.editor,\n em\n });\n toolbarEl.appendChild(toolbarView.render().el);\n }\n\n this.toolbar.reset(toolbar);\n const view = model.view;\n toolbarStyle.top = '-100px';\n toolbarStyle.left = 0;\n setTimeout(() => view && this.updateToolbarPos(view.el), 0);\n } else {\n toolbarStyle.display = 'none';\n }\n },\n\n /**\n * Update toolbar positions\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n updateToolbarPos(el, elPos) {\n const { canvas } = this;\n const unit = 'px';\n const toolbarEl = canvas.getToolbarEl();\n const toolbarStyle = toolbarEl.style;\n toolbarStyle.opacity = 0;\n const pos = canvas.getTargetToElementDim(toolbarEl, el, {\n elPos,\n event: 'toolbarPosUpdate'\n });\n\n if (pos) {\n const frameOffset = canvas.getCanvasView().getFrameOffset();\n\n // Scroll with the window if the top edge is reached and the\n // element is bigger than the canvas\n if (\n pos.top <= pos.canvasTop &&\n !(pos.elementHeight + pos.targetHeight >= frameOffset.height)\n ) {\n pos.top = pos.elementTop + pos.elementHeight;\n }\n\n // Check left position of the toolbar\n const elRight = pos.elementLeft + pos.elementWidth;\n let left = elRight - pos.targetWidth;\n\n if (elRight > pos.canvasWidth) {\n left -= elRight - pos.canvasWidth;\n }\n\n left = left < 0 ? 0 : left;\n toolbarStyle.top = `${pos.top}${unit}`;\n toolbarStyle.left = `${left}${unit}`;\n toolbarStyle.opacity = '';\n }\n },\n\n /**\n * Return canvas dimensions and positions\n * @return {Object}\n */\n getCanvasPosition() {\n return this.canvas.getCanvasView().getPosition();\n },\n\n /**\n * Removes all highlighting effects on components\n * @private\n * */\n clean() {\n if (this.selEl) this.selEl.removeClass(this.hoverClass);\n },\n\n /**\n * Returns badge element\n * @return {HTMLElement}\n * @private\n */\n getBadge() {\n return this.canvas.getBadgeEl();\n },\n\n /**\n * On frame scroll callback\n * @private\n */\n onFrameScroll() {\n const el = this.cacheEl;\n\n if (el) {\n const elPos = this.getElementPos(el);\n this.updateBadge(el, elPos);\n const model = this.em.getSelected();\n const viewEl = model && model.getEl();\n viewEl && this.updateToolbarPos(viewEl);\n }\n },\n\n /**\n * Update attached elements, eg. component toolbar\n */\n updateAttached() {\n const { resizer, em } = this;\n const model = em.getSelected();\n const view = model && model.view;\n\n if (view) {\n const { el } = view;\n this.updateToolbarPos(el);\n this.showFixedElementOffset(el);\n resizer && resizer.updateContainer();\n }\n },\n\n /**\n * Returns element's data info\n * @param {HTMLElement} el\n * @return {Object}\n * @private\n */\n getElementPos(el, badge) {\n return this.canvas.getCanvasView().getElementPos(el);\n },\n\n /**\n * Hide badge\n * @private\n * */\n hideBadge() {\n this.getBadge().style.display = 'none';\n },\n\n /**\n * Clean previous model from different states\n * @param {Component} model\n * @private\n */\n cleanPrevious(model) {\n model &&\n model.set({\n status: '',\n state: ''\n });\n },\n\n /**\n * Returns content window\n * @private\n */\n getContentWindow() {\n return this.frameEl.contentWindow;\n },\n\n run(editor) {\n this.editor = editor && editor.get('Editor');\n this.enable();\n this.onSelect();\n },\n\n stop(ed, sender, opts = {}) {\n const { em, editor } = this;\n this.stopSelectComponent();\n !opts.preserveSelected && em.setSelected(null);\n this.clean();\n this.onOut();\n this.hideFixedElementOffset();\n this.canvas.getToolbarEl().style.display = 'none';\n editor && editor.stopCommand('resize');\n\n em.off('component:update', this.updateAttached, this);\n em.off('change:canvasOffset', this.updateAttached, this);\n }\n};\n","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","import Backbone from 'backbone';\n\nconst $ = Backbone.$;\n\nexport default Backbone.View.extend({\n events: {\n change: 'handleChange'\n },\n\n template() {\n return ``;\n },\n\n inputClass() {\n return `${this.ppfx}field`;\n },\n\n holderClass() {\n return `${this.ppfx}input-holder`;\n },\n\n initialize(opts = {}) {\n const ppfx = opts.ppfx || '';\n this.opts = opts;\n this.ppfx = ppfx;\n this.em = opts.target || {};\n this.listenTo(this.model, 'change:value', this.handleModelChange);\n },\n\n /**\n * Fired when the element of the property is updated\n */\n elementUpdated() {\n this.model.trigger('el:change');\n },\n\n /**\n * Set value to the input element\n * @param {string} value\n */\n setValue(value) {\n const model = this.model;\n let val = value || model.get('defaults');\n const input = this.getInputEl();\n input && (input.value = val);\n },\n\n /**\n * Updates the view when the model is changed\n * */\n handleModelChange(model, value, opts) {\n this.setValue(value, opts);\n },\n\n /**\n * Handled when the view is changed\n */\n handleChange(e) {\n e.stopPropagation();\n const value = this.getInputEl().value;\n this.model.set({ value }, { fromInput: 1 });\n this.elementUpdated();\n },\n\n /**\n * Get the input element\n * @return {HTMLElement}\n */\n getInputEl() {\n if (!this.inputEl) {\n const { model } = this;\n const plh = model.get('placeholder') || model.get('defaults') || '';\n this.inputEl = $(``);\n }\n\n return this.inputEl.get(0);\n },\n\n render() {\n this.inputEl = null;\n const el = this.$el;\n el.addClass(this.inputClass());\n el.html(this.template());\n el.find(`.${this.holderClass()}`).append(this.getInputEl());\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport { appendAtIndex } from 'utils/dom';\n\nexport default Backbone.View.extend({\n initialize(o) {\n this.config = o.config || {};\n this.pfx = this.config.stylePrefix || '';\n this.target = o.target || {};\n this.propTarget = o.propTarget || {};\n this.onChange = o.onChange;\n this.onInputRender = o.onInputRender || {};\n this.customValue = o.customValue || {};\n this.properties = [];\n const coll = this.collection;\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.render);\n },\n\n addTo(model, coll, opts) {\n this.add(model, null, opts);\n },\n\n add(model, frag, opts = {}) {\n const appendTo = frag || this.el;\n const view = new model.typeView({\n model,\n name: model.get('name'),\n id: this.pfx + model.get('property'),\n target: this.target,\n propTarget: this.propTarget,\n onChange: this.onChange,\n onInputRender: this.onInputRender,\n config: this.config\n });\n\n if (model.get('type') != 'composite') {\n view.customValue = this.customValue;\n }\n\n view.render();\n const rendered = view.el;\n this.properties.push(view);\n\n appendAtIndex(appendTo, rendered, opts.at);\n },\n\n render() {\n this.properties = [];\n const fragment = document.createDocumentFragment();\n this.collection.each(model => this.add(model, fragment));\n this.$el.append(fragment);\n this.$el.attr('class', `${this.pfx}properties`);\n return this;\n }\n});\n","import { bindAll, isFunction, result, isUndefined } from 'underscore';\nimport { on, off, isEscKey, getPointerEvent } from 'utils/mixins';\n\nconst resetPos = () => ({ x: 0, y: 0 });\n\nexport default class Dragger {\n /**\n * Init the dragger\n * @param {Object} opts\n */\n constructor(opts = {}) {\n this.opts = {\n /**\n * Element on which the drag will be executed. By default, the document will be used\n */\n container: null,\n /**\n * Callback on start\n * onStart(ev, dragger) {\n * console.log('pointer start', dragger.startPointer, 'position start', dragger.startPosition);\n * },\n */\n onStart: null,\n /**\n * Callback on drag\n * onDrag(ev, dragger) {\n * console.log('pointer', dragger.currentPointer, 'position', dragger.position, 'delta', dragger.delta);\n * },\n */\n onDrag: null,\n /**\n * Callback on drag\n * onEnd(ev, dragger) {\n * console.log('pointer', dragger.currentPointer, 'position', dragger.position, 'delta', dragger.delta);\n * },\n */\n onEnd: null,\n /**\n * Indicate a callback where to pass an object with new coordinates\n */\n setPosition: null,\n /**\n * Indicate a callback where to get initial coordinates.\n * getPosition: () => {\n * ...\n * return { x: 10, y: 100 }\n * }\n */\n getPosition: null,\n\n // Static guides to be snapped\n guidesStatic: null,\n\n // Target guides that will snap to static one\n guidesTarget: null,\n\n // Offset before snap to guides\n snapOffset: 5,\n\n // Document on which listen to pointer events\n doc: 0,\n\n // Scale result points, can also be a function\n scale: 1\n };\n bindAll(this, 'drag', 'stop', 'keyHandle', 'handleScroll');\n this.setOptions(opts);\n this.delta = resetPos();\n return this;\n }\n\n /**\n * Update options\n * @param {Object} options\n */\n setOptions(opts = {}) {\n this.opts = {\n ...this.opts,\n ...opts\n };\n }\n\n toggleDrag(enable) {\n const docs = this.getDocumentEl();\n const container = this.getContainerEl();\n const win = this.getWindowEl();\n const method = enable ? 'on' : 'off';\n const methods = { on, off };\n methods[method](container, 'mousemove dragover', this.drag);\n methods[method](docs, 'mouseup dragend touchend', this.stop);\n methods[method](docs, 'keydown', this.keyHandle);\n methods[method](win, 'scroll', this.handleScroll);\n }\n\n handleScroll() {\n const { lastScroll, delta } = this;\n const actualScroll = this.getScrollInfo();\n const scrollDiff = {\n x: actualScroll.x - lastScroll.x,\n y: actualScroll.y - lastScroll.y\n };\n this.move(delta.x + scrollDiff.x, delta.y + scrollDiff.y);\n this.lastScrollDiff = scrollDiff;\n }\n\n /**\n * Start dragging\n * @param {Event} e\n */\n start(ev) {\n const { opts } = this;\n const { onStart } = opts;\n this.toggleDrag(1);\n this.startPointer = this.getPointerPos(ev);\n this.guidesStatic = result(opts, 'guidesStatic') || [];\n this.guidesTarget = result(opts, 'guidesTarget') || [];\n isFunction(onStart) && onStart(ev, this);\n this.startPosition = this.getStartPosition();\n this.lastScrollDiff = resetPos();\n this.globScrollDiff = resetPos();\n this.drag(ev);\n }\n\n /**\n * Drag event\n * @param {Event} event\n */\n drag(ev) {\n const { opts, lastScrollDiff, globScrollDiff } = this;\n const { onDrag } = opts;\n const { startPointer } = this;\n const currentPos = this.getPointerPos(ev);\n const glDiff = {\n x: globScrollDiff.x + lastScrollDiff.x,\n y: globScrollDiff.y + lastScrollDiff.y\n };\n this.globScrollDiff = glDiff;\n const delta = {\n x: currentPos.x - startPointer.x + glDiff.x,\n y: currentPos.y - startPointer.y + glDiff.y\n };\n this.lastScrollDiff = resetPos();\n let { lockedAxis } = this;\n\n // Lock one axis\n if (ev.shiftKey) {\n lockedAxis = !lockedAxis && this.detectAxisLock(delta.x, delta.y);\n } else {\n lockedAxis = null;\n }\n\n if (lockedAxis === 'x') {\n delta.x = startPointer.x;\n } else if (lockedAxis === 'y') {\n delta.y = startPointer.y;\n }\n\n const moveDelta = delta => {\n ['x', 'y'].forEach(co => (delta[co] = delta[co] * result(opts, 'scale')));\n this.delta = delta;\n this.move(delta.x, delta.y);\n isFunction(onDrag) && onDrag(ev, this);\n };\n const deltaPre = { ...delta };\n this.currentPointer = currentPos;\n this.lockedAxis = lockedAxis;\n this.lastScroll = this.getScrollInfo();\n moveDelta(delta);\n\n if (this.guidesTarget.length) {\n const { newDelta, trgX, trgY } = this.snapGuides(deltaPre);\n (trgX || trgY) && moveDelta(newDelta);\n }\n\n // In case the mouse button was released outside of the window\n ev.which === 0 && this.stop(ev);\n }\n\n /**\n * Check if the delta hits some guide\n */\n snapGuides(delta) {\n const newDelta = delta;\n let { trgX, trgY } = this;\n\n this.guidesTarget.forEach(trg => {\n // Skip the guide if its locked axis already exists\n if ((trg.x && this.trgX) || (trg.y && this.trgY)) return;\n trg.active = 0;\n\n this.guidesStatic.forEach(stat => {\n if ((trg.y && stat.x) || (trg.x && stat.y)) return;\n const isY = trg.y && stat.y;\n const axs = isY ? 'y' : 'x';\n const trgPoint = trg[axs];\n const statPoint = stat[axs];\n const deltaPoint = delta[axs];\n const trgGuide = isY ? trgY : trgX;\n\n if (this.isPointIn(trgPoint, statPoint)) {\n if (isUndefined(trgGuide)) {\n const trgValue = deltaPoint - (trgPoint - statPoint);\n this.setGuideLock(trg, trgValue);\n }\n }\n });\n });\n\n trgX = this.trgX;\n trgY = this.trgY;\n\n ['x', 'y'].forEach(co => {\n const axis = co.toUpperCase();\n let trg = this[`trg${axis}`];\n\n if (trg && !this.isPointIn(delta[co], trg.lock)) {\n this.setGuideLock(trg, null);\n trg = null;\n }\n\n if (trg && !isUndefined(trg.lock)) {\n newDelta[co] = trg.lock;\n }\n });\n\n return {\n newDelta,\n trgX: this.trgX,\n trgY: this.trgY\n };\n }\n\n isPointIn(src, trg, { offset } = {}) {\n const ofst = offset || this.opts.snapOffset;\n return (\n (src >= trg && src <= trg + ofst) || (src <= trg && src >= trg - ofst)\n );\n }\n\n setGuideLock(guide, value) {\n const axis = !isUndefined(guide.x) ? 'X' : 'Y';\n const trgName = `trg${axis}`;\n\n if (value !== null) {\n guide.active = 1;\n guide.lock = value;\n this[trgName] = guide;\n } else {\n delete guide.active;\n delete guide.lock;\n delete this[trgName];\n }\n\n return guide;\n }\n\n /**\n * Stop dragging\n */\n stop(ev, opts = {}) {\n const { delta } = this;\n const cancelled = opts.cancel;\n const x = cancelled ? 0 : delta.x;\n const y = cancelled ? 0 : delta.y;\n this.toggleDrag();\n this.lockedAxis = null;\n this.move(x, y, 1);\n const { onEnd } = this.opts;\n isFunction(onEnd) && onEnd(ev, this, { cancelled });\n }\n\n keyHandle(ev) {\n if (isEscKey(ev)) {\n this.stop(ev, { cancel: 1 });\n }\n }\n\n /**\n * Move the element\n * @param {integer} x\n * @param {integer} y\n */\n move(x, y, end) {\n const { el, opts } = this;\n const pos = this.startPosition;\n if (!pos) return;\n const { setPosition } = opts;\n const xPos = pos.x + x;\n const yPos = pos.y + y;\n this.position = {\n x: xPos,\n y: yPos,\n end\n };\n\n isFunction(setPosition) && setPosition(this.position);\n\n if (el) {\n el.style.left = `${xPos}px`;\n el.style.top = `${yPos}px`;\n }\n }\n\n getContainerEl() {\n const { container } = this.opts;\n return container ? [container] : this.getDocumentEl();\n }\n\n getWindowEl() {\n const cont = this.getContainerEl();\n return cont.map(item => {\n const doc = item.ownerDocument || item;\n return doc.defaultView || doc.parentWindow;\n });\n }\n\n /**\n * Returns documents\n */\n getDocumentEl(el) {\n const { doc } = this.opts;\n el = el || this.el;\n\n if (!this.docs) {\n const docs = [document];\n el && docs.push(el.ownerDocument);\n doc && docs.push(doc);\n this.docs = docs;\n }\n\n return this.docs;\n }\n\n /**\n * Get mouse coordinates\n * @param {Event} event\n * @return {Object}\n */\n getPointerPos(ev) {\n const getPos = this.opts.getPointerPosition;\n const pEv = getPointerEvent(ev);\n\n return getPos\n ? getPos(ev)\n : {\n x: pEv.clientX,\n y: pEv.clientY\n };\n }\n\n getStartPosition() {\n const { el, opts } = this;\n const getPos = opts.getPosition;\n let result = resetPos();\n\n if (isFunction(getPos)) {\n result = getPos();\n } else if (el) {\n result = {\n x: parseFloat(el.style.left),\n y: parseFloat(el.style.top)\n };\n }\n\n return result;\n }\n\n getScrollInfo() {\n const { doc } = this.opts;\n const body = doc && doc.body;\n\n return {\n y: body ? body.scrollTop : 0,\n x: body ? body.scrollLeft : 0\n };\n }\n\n detectAxisLock(x, y) {\n const relX = x;\n const relY = y;\n const absX = Math.abs(relX);\n const absY = Math.abs(relY);\n\n // Vertical or Horizontal lock\n if (relY >= absX || relY <= -absX) {\n return 'x';\n } else if (relX > absY || relX < -absY) {\n return 'y';\n }\n }\n}\n","import Backbone from 'backbone';\nimport { isEmpty, isArray, isString, each, includes, extend } from 'underscore';\n\nlet Component;\n\nexport default Backbone.Collection.extend({\n initialize(models, opt = {}) {\n this.opt = opt;\n this.listenTo(this, 'add', this.onAdd);\n this.config = opt.config;\n this.em = opt.em;\n const { em } = this;\n\n this.model = (attrs, options) => {\n var model;\n var df = opt.componentTypes;\n options.em = opt.em;\n options.config = opt.config;\n options.componentTypes = df;\n options.domc = opt.domc;\n\n for (var it = 0; it < df.length; it++) {\n var dfId = df[it].id;\n if (dfId == attrs.type) {\n model = df[it].model;\n break;\n }\n }\n\n if (!model) {\n // get the last one\n model = df[df.length - 1].model;\n em &&\n attrs.type &&\n em.logWarning(`Component type '${attrs.type}' not found`, {\n attrs,\n options\n });\n }\n\n return new model(attrs, options);\n };\n },\n\n parseString(value, opt = {}) {\n const { em } = this;\n const cssc = em.get('CssComposer');\n const parsed = em.get('Parser').parseHtml(value);\n // We need this to avoid duplicate IDs\n if (!Component) Component = require('./Component').default;\n Component.checkId(parsed.html, parsed.css, this.opt.domc.componentsById);\n\n if (parsed.css && cssc && !opt.temporary) {\n cssc.addCollection(parsed.css, {\n ...opt,\n extend: 1\n });\n }\n\n return parsed.html;\n },\n\n add(models, opt = {}) {\n if (isString(models)) {\n models = this.parseString(models, opt);\n } else if (isArray(models)) {\n models.forEach((item, index) => {\n if (isString(item)) {\n models[index] = this.parseString(item, opt);\n }\n });\n }\n\n const isMult = isArray(models);\n models = (isMult ? models : [models])\n .filter(i => i)\n .map(model => this.processDef(model));\n models = isMult ? models : models[0];\n\n return Backbone.Collection.prototype.add.apply(this, [models, opt]);\n },\n\n /**\n * Process component definition.\n */\n processDef(mdl) {\n // Avoid processing Models\n if (mdl.cid && mdl.ccid) return mdl;\n const { em, config = {} } = this;\n const { processor } = config;\n let model = mdl;\n\n if (processor) {\n model = { ...model }; // Avoid 'Cannot delete property ...'\n const modelPr = processor(model);\n if (modelPr) {\n each(model, (val, key) => delete model[key]);\n extend(model, modelPr);\n }\n }\n\n // React JSX preset\n if (model.$$typeof && typeof model.props == 'object') {\n model = { ...model };\n model.props = { ...model.props };\n const domc = em.get('DomComponents');\n const parser = em.get('Parser');\n const { parserHtml } = parser;\n\n each(model, (value, key) => {\n if (!includes(['props', 'type'], key)) delete model[key];\n });\n const { props } = model;\n const comps = props.children;\n delete props.children;\n delete model.props;\n const res = parserHtml.splitPropsFromAttr(props);\n model.attributes = res.attrs;\n\n if (comps) {\n model.components = comps;\n }\n if (!model.type) {\n model.type = 'textnode';\n } else if (!domc.getType(model.type)) {\n model.tagName = model.type;\n delete model.type;\n }\n\n extend(model, res.props);\n }\n\n return model;\n },\n\n onAdd(model, c, opts = {}) {\n const em = this.em;\n const style = model.getStyle();\n const avoidInline = em && em.getConfig('avoidInlineStyle');\n\n if (\n !isEmpty(style) &&\n !avoidInline &&\n em &&\n em.get &&\n em.getConfig('forceClass') &&\n !opts.temporary\n ) {\n const name = model.cid;\n const rule = em.get('CssComposer').setClassRule(name, style);\n model.setStyle({});\n model.addClass(name);\n }\n }\n});\n","import Backbone from 'backbone';\nconst $ = Backbone.$;\n\nexport default Backbone.View.extend({\n /**\n * Initialize method that can't be removed\n * @param {Object} o Options\n * @private\n * */\n initialize(o) {\n this.config = o || {};\n this.editorModel = this.em = this.config.em || {};\n this.pfx = this.config.stylePrefix;\n this.ppfx = this.config.pStylePrefix;\n this.hoverClass = this.pfx + 'hover';\n this.badgeClass = this.pfx + 'badge';\n this.plhClass = this.pfx + 'placeholder';\n this.freezClass = this.ppfx + 'freezed';\n\n this.canvas = this.em.get && this.em.get('Canvas');\n\n if (this.em.get) this.setElement(this.getCanvas());\n\n if (this.canvas) {\n this.$canvas = this.$el;\n this.$wrapper = $(this.getCanvasWrapper());\n this.frameEl = this.canvas.getFrameEl();\n this.canvasTool = this.getCanvasTools();\n this.bodyEl = this.getCanvasBody();\n }\n\n this.init(this.config);\n },\n\n /**\n * On frame scroll callback\n * @param {[type]} e [description]\n * @return {[type]} [description]\n */\n onFrameScroll(e) {},\n\n /**\n * Returns canval element\n * @return {HTMLElement}\n */\n getCanvas() {\n return this.canvas.getElement();\n },\n\n /**\n * Get canvas body element\n * @return {HTMLElement}\n */\n getCanvasBody() {\n return this.canvas.getBody();\n },\n\n /**\n * Get canvas wrapper element\n * @return {HTMLElement}\n */\n getCanvasWrapper() {\n return this.canvas.getWrapperEl();\n },\n\n /**\n * Get canvas wrapper element\n * @return {HTMLElement}\n */\n getCanvasTools() {\n return this.canvas.getToolsEl();\n },\n\n /**\n * Get the offset of the element\n * @param {HTMLElement} el\n * @return {Object}\n */\n offset(el) {\n var rect = el.getBoundingClientRect();\n return {\n top: rect.top + el.ownerDocument.body.scrollTop,\n left: rect.left + el.ownerDocument.body.scrollLeft\n };\n },\n\n /**\n * Callback triggered after initialize\n * @param {Object} o Options\n * @private\n * */\n init(o) {},\n\n /**\n * Method that run command\n * @param {Object} editor Editor instance\n * @param {Object} [options={}] Options\n * @private\n * */\n callRun(editor, options = {}) {\n const id = this.id;\n editor.trigger(`run:${id}:before`, options);\n\n if (options && options.abort) {\n editor.trigger(`abort:${id}`, options);\n return;\n }\n\n const sender = options.sender || editor;\n const result = this.run(editor, sender, options);\n editor.trigger(`run:${id}`, result, options);\n editor.trigger('run', id, result, options);\n return result;\n },\n\n /**\n * Method that run command\n * @param {Object} editor Editor instance\n * @param {Object} [options={}] Options\n * @private\n * */\n callStop(editor, options = {}) {\n const id = this.id;\n const sender = options.sender || editor;\n editor.trigger(`stop:${id}:before`, options);\n const result = this.stop(editor, sender, options);\n editor.trigger(`stop:${id}`, result, options);\n editor.trigger('stop', id, result, options);\n return result;\n },\n\n /**\n * Stop current command\n */\n stopCommand() {\n this.em.get('Commands').stop(this.id);\n },\n\n /**\n * Method that run command\n * @param {Object} em Editor model\n * @param {Object} sender Button sender\n * @private\n * */\n run(em, sender) {},\n\n /**\n * Method that stop command\n * @param {Object} em Editor model\n * @param {Object} sender Button sender\n * @private\n * */\n stop(em, sender) {}\n});\n","import { isString, isArray, keys } from 'underscore';\nimport { shallowDiff } from 'utils/mixins';\nimport ParserHtml from 'parser/model/ParserHtml';\n\nconst parseStyle = ParserHtml().parseStyle;\n\nexport default {\n parseStyle,\n\n /**\n * To trigger the style change event on models I have to\n * pass a new object instance\n * @param {Object} prop\n * @return {Object}\n */\n extendStyle(prop) {\n return { ...this.getStyle(), ...prop };\n },\n\n /**\n * Get style object\n * @return {Object}\n */\n getStyle() {\n const style = this.get('style') || {};\n return { ...style };\n },\n\n /**\n * Set new style object\n * @param {Object|string} prop\n * @param {Object} opts\n * @return {Object} Applied properties\n */\n setStyle(prop = {}, opts = {}) {\n if (isString(prop)) {\n prop = parseStyle(prop);\n }\n\n const propOrig = this.getStyle();\n const propNew = { ...prop };\n this.set('style', propNew, opts);\n const diff = shallowDiff(propOrig, propNew);\n keys(diff).forEach(pr => {\n const em = this.em;\n this.trigger(`change:style:${pr}`);\n if (em) {\n em.trigger(`styleable:change`, this, pr);\n em.trigger(`styleable:change:${pr}`, this, pr);\n }\n });\n\n return propNew;\n },\n\n /**\n * Add style property\n * @param {Object|string} prop\n * @param {string} value\n * @example\n * this.addStyle({color: 'red'});\n * this.addStyle('color', 'blue');\n */\n addStyle(prop, value = '', opts = {}) {\n if (typeof prop == 'string') {\n prop = {\n prop: value\n };\n } else {\n opts = value || {};\n }\n\n prop = this.extendStyle(prop);\n this.setStyle(prop, opts);\n },\n\n /**\n * Remove style property\n * @param {string} prop\n */\n removeStyle(prop) {\n let style = this.getStyle();\n delete style[prop];\n this.setStyle(style);\n },\n\n /**\n * Returns string of style properties\n * @param {Object} [opts={}] Options\n * @return {String}\n */\n styleToString(opts = {}) {\n const result = [];\n const style = this.getStyle();\n\n for (let prop in style) {\n const imp = opts.important;\n const important = isArray(imp) ? imp.indexOf(prop) >= 0 : imp;\n const value = `${style[prop]}${important ? ' !important' : ''}`;\n value && result.push(`${prop}:${value};`);\n }\n\n return result.join('');\n },\n\n getSelectors() {\n return this.get('selectors') || this.get('classes');\n },\n\n getSelectorsString() {\n return this.selectorsToString\n ? this.selectorsToString()\n : this.getSelectors().getFullString();\n }\n};\n","\"use strict\";\n\n/*! cash-dom 1.3.7, https://github.com/kenwheeler/cash @license MIT */\n;(function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(factory);\n } else if (typeof exports !== \"undefined\") {\n module.exports = factory();\n } else {\n root.cash = root.$ = factory();\n }\n})(this, function () {\n var doc = document, win = window, ArrayProto = Array.prototype, slice = ArrayProto.slice, filter = ArrayProto.filter, push = ArrayProto.push;\n\n var noop = function () {}, isFunction = function (item) {\n // @see https://crbug.com/568448\n return typeof item === typeof noop && item.call;\n }, isString = function (item) {\n return typeof item === typeof \"\";\n };\n\n var idMatch = /^#[\\w-]*$/, classMatch = /^\\.[\\w-]*$/, htmlMatch = /<.+>/, singlet = /^\\w+$/;\n\n function find(selector, context) {\n context = context || doc;\n var elems = (classMatch.test(selector) ? context.getElementsByClassName(selector.slice(1)) : singlet.test(selector) ? context.getElementsByTagName(selector) : context.querySelectorAll(selector));\n return elems;\n }\n\n var frag;\n function parseHTML(str) {\n if (!frag) {\n frag = doc.implementation.createHTMLDocument(null);\n var base = frag.createElement(\"base\");\n base.href = doc.location.href;\n frag.head.appendChild(base);\n }\n\n frag.body.innerHTML = str;\n\n return frag.body.childNodes;\n }\n\n function onReady(fn) {\n if (doc.readyState !== \"loading\") {\n setTimeout(fn);\n } else {\n doc.addEventListener(\"DOMContentLoaded\", fn);\n }\n }\n\n function Init(selector, context) {\n if (!selector) {\n return this;\n }\n\n // If already a cash collection, don't do any further processing\n if (selector.cash && selector !== win) {\n return selector;\n }\n\n var elems = selector, i = 0, length;\n\n if (isString(selector)) {\n elems = (idMatch.test(selector) ?\n // If an ID use the faster getElementById check\n doc.getElementById(selector.slice(1)) : htmlMatch.test(selector) ?\n // If HTML, parse it into real elements\n parseHTML(selector) :\n // else use `find`\n find(selector, context));\n\n // If function, use as shortcut for DOM ready\n } else if (isFunction(selector)) {\n onReady(selector);return this;\n }\n\n if (!elems) {\n return this;\n }\n\n // If a single DOM element is passed in or received via ID, return the single element\n if (elems.nodeType || elems === win) {\n this[0] = elems;\n this.length = 1;\n } else {\n // Treat like an array and loop through each item.\n length = this.length = elems.length;\n for (; i < length; i++) {\n this[i] = elems[i];\n }\n }\n\n return this;\n }\n\n function cash(selector, context) {\n return new Init(selector, context);\n }\n\n var fn = cash.fn = cash.prototype = Init.prototype = { // jshint ignore:line\n cash: true,\n length: 0,\n push: push,\n splice: ArrayProto.splice,\n map: ArrayProto.map,\n init: Init\n };\n\n Object.defineProperty(fn, \"constructor\", { value: cash });\n\n cash.parseHTML = parseHTML;\n cash.noop = noop;\n cash.isFunction = isFunction;\n cash.isString = isString;\n\n cash.extend = fn.extend = function (target) {\n target = target || {};\n\n var args = slice.call(arguments), length = args.length, i = 1;\n\n if (args.length === 1) {\n target = this;\n i = 0;\n }\n\n for (; i < length; i++) {\n if (!args[i]) {\n continue;\n }\n for (var key in args[i]) {\n if (args[i].hasOwnProperty(key)) {\n target[key] = args[i][key];\n }\n }\n }\n\n return target;\n };\n\n function each(collection, callback) {\n var l = collection.length, i = 0;\n\n for (; i < l; i++) {\n if (callback.call(collection[i], collection[i], i, collection) === false) {\n break;\n }\n }\n }\n\n function matches(el, selector) {\n var m = el && (el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector || el.oMatchesSelector);\n return !!m && m.call(el, selector);\n }\n\n function getCompareFunction(selector) {\n return (\n /* Use browser's `matches` function if string */\n isString(selector) ? matches :\n /* Match a cash element */\n selector.cash ? function (el) {\n return selector.is(el);\n } :\n /* Direct comparison */\n function (el, selector) {\n return el === selector;\n });\n }\n\n function unique(collection) {\n return cash(slice.call(collection).filter(function (item, index, self) {\n return self.indexOf(item) === index;\n }));\n }\n\n cash.extend({\n merge: function (first, second) {\n var len = +second.length, i = first.length, j = 0;\n\n for (; j < len; i++, j++) {\n first[i] = second[j];\n }\n\n first.length = i;\n return first;\n },\n\n each: each,\n matches: matches,\n unique: unique,\n isArray: Array.isArray,\n isNumeric: function (n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n });\n\n var uid = cash.uid = \"_cash\" + Date.now();\n\n function getDataCache(node) {\n return (node[uid] = node[uid] || {});\n }\n\n function setData(node, key, value) {\n return (getDataCache(node)[key] = value);\n }\n\n function getData(node, key) {\n var c = getDataCache(node);\n if (c[key] === undefined) {\n c[key] = node.dataset ? node.dataset[key] : cash(node).attr(\"data-\" + key);\n }\n return c[key];\n }\n\n function removeData(node, key) {\n var c = getDataCache(node);\n if (c) {\n delete c[key];\n } else if (node.dataset) {\n delete node.dataset[key];\n } else {\n cash(node).removeAttr(\"data-\" + name);\n }\n }\n\n fn.extend({\n data: function (name, value) {\n if (isString(name)) {\n return (value === undefined ? getData(this[0], name) : this.each(function (v) {\n return setData(v, name, value);\n }));\n }\n\n for (var key in name) {\n this.data(key, name[key]);\n }\n\n return this;\n },\n\n removeData: function (key) {\n return this.each(function (v) {\n return removeData(v, key);\n });\n }\n\n });\n\n var notWhiteMatch = /\\S+/g;\n\n function getClasses(c) {\n return isString(c) && c.match(notWhiteMatch);\n }\n\n function hasClass(v, c) {\n return (v.classList ? v.classList.contains(c) : new RegExp(\"(^| )\" + c + \"( |$)\", \"gi\").test(v.className));\n }\n\n function addClass(v, c) {\n if (v.classList) {\n v.classList.add(c);\n } else if (!hasClass(v, c)) {\n v.className += \" \" + c;\n }\n }\n\n function removeClass(v, c) {\n if (v.classList) {\n v.classList.remove(c);\n } else {\n v.className = v.className.replace(c, \"\");\n }\n }\n\n fn.extend({\n addClass: function (c) {\n var classes = getClasses(c);\n\n return (classes ? this.each(function (v) {\n each(classes, function (c) {\n addClass(v, c);\n });\n }) : this);\n },\n\n attr: function (name, value) {\n if (!name) {\n return undefined;\n }\n\n if (isString(name)) {\n if (value === undefined) {\n return this[0] ? this[0].getAttribute ? this[0].getAttribute(name) : this[0][name] : undefined;\n }\n\n return this.each(function (v) {\n if (v.setAttribute) {\n v.setAttribute(name, value);\n } else {\n v[name] = value;\n }\n });\n }\n\n for (var key in name) {\n this.attr(key, name[key]);\n }\n\n return this;\n },\n\n hasClass: function (c) {\n var check = false, classes = getClasses(c);\n if (classes && classes.length) {\n this.each(function (v) {\n check = hasClass(v, classes[0]);\n return !check;\n });\n }\n return check;\n },\n\n prop: function (name, value) {\n if (isString(name)) {\n return (value === undefined ? this[0][name] : this.each(function (v) {\n v[name] = value;\n }));\n }\n\n for (var key in name) {\n this.prop(key, name[key]);\n }\n\n return this;\n },\n\n removeAttr: function (name) {\n return this.each(function (v) {\n if (v.removeAttribute) {\n v.removeAttribute(name);\n } else {\n delete v[name];\n }\n });\n },\n\n removeClass: function (c) {\n if (!arguments.length) {\n return this.attr(\"class\", \"\");\n }\n var classes = getClasses(c);\n return (classes ? this.each(function (v) {\n each(classes, function (c) {\n removeClass(v, c);\n });\n }) : this);\n },\n\n removeProp: function (name) {\n return this.each(function (v) {\n delete v[name];\n });\n },\n\n toggleClass: function (c, state) {\n if (state !== undefined) {\n return this[state ? \"addClass\" : \"removeClass\"](c);\n }\n var classes = getClasses(c);\n return (classes ? this.each(function (v) {\n each(classes, function (c) {\n if (hasClass(v, c)) {\n removeClass(v, c);\n } else {\n addClass(v, c);\n }\n });\n }) : this);\n } });\n\n fn.extend({\n add: function (selector, context) {\n return unique(cash.merge(this, cash(selector, context)));\n },\n\n each: function (callback) {\n each(this, callback);\n return this;\n },\n\n eq: function (index) {\n return cash(this.get(index));\n },\n\n filter: function (selector) {\n if (!selector) {\n return this;\n }\n\n var comparator = (isFunction(selector) ? selector : getCompareFunction(selector));\n\n return cash(filter.call(this, function (e) {\n return comparator(e, selector);\n }));\n },\n\n first: function () {\n return this.eq(0);\n },\n\n get: function (index) {\n if (index === undefined) {\n return slice.call(this);\n }\n return (index < 0 ? this[index + this.length] : this[index]);\n },\n\n index: function (elem) {\n var child = elem ? cash(elem)[0] : this[0], collection = elem ? this : cash(child).parent().children();\n return slice.call(collection).indexOf(child);\n },\n\n last: function () {\n return this.eq(-1);\n }\n\n });\n\n var camelCase = (function () {\n var camelRegex = /(?:^\\w|[A-Z]|\\b\\w)/g, whiteSpace = /[\\s-_]+/g;\n return function (str) {\n return str.replace(camelRegex, function (letter, index) {\n return letter[index === 0 ? \"toLowerCase\" : \"toUpperCase\"]();\n }).replace(whiteSpace, \"\");\n };\n }());\n\n var getPrefixedProp = (function () {\n var cache = {}, doc = document, div = doc.createElement(\"div\"), style = div.style;\n\n return function (prop) {\n prop = camelCase(prop);\n if (cache[prop]) {\n return cache[prop];\n }\n\n var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1), prefixes = [\"webkit\", \"moz\", \"ms\", \"o\"], props = (prop + \" \" + (prefixes).join(ucProp + \" \") + ucProp).split(\" \");\n\n each(props, function (p) {\n if (p in style) {\n cache[p] = prop = cache[prop] = p;\n return false;\n }\n });\n\n return cache[prop];\n };\n }());\n\n cash.prefixedProp = getPrefixedProp;\n cash.camelCase = camelCase;\n\n fn.extend({\n css: function (prop, value) {\n if (isString(prop)) {\n prop = getPrefixedProp(prop);\n return (arguments.length > 1 ? this.each(function (v) {\n return v.style[prop] = value;\n }) : win.getComputedStyle(this[0])[prop]);\n }\n\n for (var key in prop) {\n this.css(key, prop[key]);\n }\n\n return this;\n }\n\n });\n\n function compute(el, prop) {\n return parseInt(win.getComputedStyle(el[0], null)[prop], 10) || 0;\n }\n\n each([\"Width\", \"Height\"], function (v) {\n var lower = v.toLowerCase();\n\n fn[lower] = function () {\n return this[0].getBoundingClientRect()[lower];\n };\n\n fn[\"inner\" + v] = function () {\n return this[0][\"client\" + v];\n };\n\n fn[\"outer\" + v] = function (margins) {\n return this[0][\"offset\" + v] + (margins ? compute(this, \"margin\" + (v === \"Width\" ? \"Left\" : \"Top\")) + compute(this, \"margin\" + (v === \"Width\" ? \"Right\" : \"Bottom\")) : 0);\n };\n });\n\n function registerEvent(node, eventName, callback) {\n var eventCache = getData(node, \"_cashEvents\") || setData(node, \"_cashEvents\", {});\n eventCache[eventName] = eventCache[eventName] || [];\n eventCache[eventName].push(callback);\n node.addEventListener(eventName, callback);\n }\n\n function removeEvent(node, eventName, callback) {\n var events = getData(node, \"_cashEvents\"), eventCache = (events && events[eventName]), index;\n\n if (!eventCache) {\n return;\n }\n\n if (callback) {\n node.removeEventListener(eventName, callback);\n index = eventCache.indexOf(callback);\n if (index >= 0) {\n eventCache.splice(index, 1);\n }\n } else {\n each(eventCache, function (event) {\n node.removeEventListener(eventName, event);\n });\n eventCache = [];\n }\n }\n\n fn.extend({\n off: function (eventName, callback) {\n return this.each(function (v) {\n return removeEvent(v, eventName, callback);\n });\n },\n\n on: function (eventName, delegate, callback, runOnce) {\n // jshint ignore:line\n\n var originalCallback;\n\n if (!isString(eventName)) {\n for (var key in eventName) {\n this.on(key, delegate, eventName[key]);\n }\n return this;\n }\n\n if (isFunction(delegate)) {\n callback = delegate;\n delegate = null;\n }\n\n if (eventName === \"ready\") {\n onReady(callback);\n return this;\n }\n\n if (delegate) {\n originalCallback = callback;\n callback = function (e) {\n var t = e.target;\n\n while (!matches(t, delegate)) {\n if (t === this) {\n return (t = false);\n }\n t = t.parentNode;\n }\n\n if (t) {\n originalCallback.call(t, e);\n }\n };\n }\n\n return this.each(function (v) {\n var finalCallback = callback;\n if (runOnce) {\n finalCallback = function () {\n callback.apply(this, arguments);\n removeEvent(v, eventName, finalCallback);\n };\n }\n registerEvent(v, eventName, finalCallback);\n });\n },\n\n one: function (eventName, delegate, callback) {\n return this.on(eventName, delegate, callback, true);\n },\n\n ready: onReady,\n\n trigger: function (eventName, data) {\n var evt = doc.createEvent(\"HTMLEvents\");\n evt.data = data;\n evt.initEvent(eventName, true, false);\n return this.each(function (v) {\n return v.dispatchEvent(evt);\n });\n }\n\n });\n\n function encode(name, value) {\n return \"&\" + encodeURIComponent(name) + \"=\" + encodeURIComponent(value).replace(/%20/g, \"+\");\n }\n\n function getSelectMultiple_(el) {\n var values = [];\n each(el.options, function (o) {\n if (o.selected) {\n values.push(o.value);\n }\n });\n return values.length ? values : null;\n }\n\n function getSelectSingle_(el) {\n var selectedIndex = el.selectedIndex;\n return selectedIndex >= 0 ? el.options[selectedIndex].value : null;\n }\n\n function getValue(el) {\n var type = el.type;\n if (!type) {\n return null;\n }\n switch (type.toLowerCase()) {\n case \"select-one\":\n return getSelectSingle_(el);\n case \"select-multiple\":\n return getSelectMultiple_(el);\n case \"radio\":\n return (el.checked) ? el.value : null;\n case \"checkbox\":\n return (el.checked) ? el.value : null;\n default:\n return el.value ? el.value : null;\n }\n }\n\n fn.extend({\n serialize: function () {\n var query = \"\";\n\n each(this[0].elements || this, function (el) {\n if (el.disabled || el.tagName === \"FIELDSET\") {\n return;\n }\n var name = el.name;\n switch (el.type.toLowerCase()) {\n case \"file\":\n case \"reset\":\n case \"submit\":\n case \"button\":\n break;\n case \"select-multiple\":\n var values = getValue(el);\n if (values !== null) {\n each(values, function (value) {\n query += encode(name, value);\n });\n }\n break;\n default:\n var value = getValue(el);\n if (value !== null) {\n query += encode(name, value);\n }\n }\n });\n\n return query.substr(1);\n },\n\n val: function (value) {\n if (value === undefined) {\n return getValue(this[0]);\n } else {\n return this.each(function (v) {\n return v.value = value;\n });\n }\n }\n\n });\n\n function insertElement(el, child, prepend) {\n if (prepend) {\n var first = el.childNodes[0];\n el.insertBefore(child, first);\n } else {\n el.appendChild(child);\n }\n }\n\n function insertContent(parent, child, prepend) {\n var str = isString(child);\n\n if (!str && child.length) {\n each(child, function (v) {\n return insertContent(parent, v, prepend);\n });\n return;\n }\n\n each(parent, str ? function (v) {\n return v.insertAdjacentHTML(prepend ? \"afterbegin\" : \"beforeend\", child);\n } : function (v, i) {\n return insertElement(v, (i === 0 ? child : child.cloneNode(true)), prepend);\n });\n }\n\n fn.extend({\n after: function (selector) {\n cash(selector).insertAfter(this);\n return this;\n },\n\n append: function (content) {\n insertContent(this, content);\n return this;\n },\n\n appendTo: function (parent) {\n insertContent(cash(parent), this);\n return this;\n },\n\n before: function (selector) {\n cash(selector).insertBefore(this);\n return this;\n },\n\n clone: function () {\n return cash(this.map(function (v) {\n return v.cloneNode(true);\n }));\n },\n\n empty: function () {\n this.html(\"\");\n return this;\n },\n\n html: function (content) {\n if (content === undefined) {\n return this[0].innerHTML;\n }\n var source = (content.nodeType ? content[0].outerHTML : content);\n return this.each(function (v) {\n return v.innerHTML = source;\n });\n },\n\n insertAfter: function (selector) {\n var _this = this;\n\n\n cash(selector).each(function (el, i) {\n var parent = el.parentNode, sibling = el.nextSibling;\n _this.each(function (v) {\n parent.insertBefore((i === 0 ? v : v.cloneNode(true)), sibling);\n });\n });\n\n return this;\n },\n\n insertBefore: function (selector) {\n var _this2 = this;\n cash(selector).each(function (el, i) {\n var parent = el.parentNode;\n _this2.each(function (v) {\n parent.insertBefore((i === 0 ? v : v.cloneNode(true)), el);\n });\n });\n return this;\n },\n\n prepend: function (content) {\n insertContent(this, content, true);\n return this;\n },\n\n prependTo: function (parent) {\n insertContent(cash(parent), this, true);\n return this;\n },\n\n remove: function () {\n return this.each(function (v) {\n return v.parentNode.removeChild(v);\n });\n },\n\n text: function (content) {\n if (content === undefined) {\n return this[0].textContent;\n }\n return this.each(function (v) {\n return v.textContent = content;\n });\n }\n\n });\n\n var docEl = doc.documentElement;\n\n fn.extend({\n position: function () {\n var el = this[0];\n return {\n left: el.offsetLeft,\n top: el.offsetTop\n };\n },\n\n offset: function () {\n var rect = this[0].getBoundingClientRect();\n return {\n top: rect.top + win.pageYOffset - docEl.clientTop,\n left: rect.left + win.pageXOffset - docEl.clientLeft\n };\n },\n\n offsetParent: function () {\n return cash(this[0].offsetParent);\n }\n\n });\n\n fn.extend({\n children: function (selector) {\n var elems = [];\n this.each(function (el) {\n push.apply(elems, el.children);\n });\n elems = unique(elems);\n\n return (!selector ? elems : elems.filter(function (v) {\n return matches(v, selector);\n }));\n },\n\n closest: function (selector) {\n if (!selector || this.length < 1) {\n return cash();\n }\n if (this.is(selector)) {\n return this.filter(selector);\n }\n return this.parent().closest(selector);\n },\n\n is: function (selector) {\n if (!selector) {\n return false;\n }\n\n var match = false, comparator = getCompareFunction(selector);\n\n this.each(function (el) {\n match = comparator(el, selector);\n return !match;\n });\n\n return match;\n },\n\n find: function (selector) {\n if (!selector || selector.nodeType) {\n return cash(selector && this.has(selector).length ? selector : null);\n }\n\n var elems = [];\n this.each(function (el) {\n push.apply(elems, find(selector, el));\n });\n\n return unique(elems);\n },\n\n has: function (selector) {\n var comparator = (isString(selector) ? function (el) {\n return find(selector, el).length !== 0;\n } : function (el) {\n return el.contains(selector);\n });\n\n return this.filter(comparator);\n },\n\n next: function () {\n return cash(this[0].nextElementSibling);\n },\n\n not: function (selector) {\n if (!selector) {\n return this;\n }\n\n var comparator = getCompareFunction(selector);\n\n return this.filter(function (el) {\n return !comparator(el, selector);\n });\n },\n\n parent: function () {\n var result = [];\n\n this.each(function (item) {\n if (item && item.parentNode) {\n result.push(item.parentNode);\n }\n });\n\n return unique(result);\n },\n\n parents: function (selector) {\n var last, result = [];\n\n this.each(function (item) {\n last = item;\n\n while (last && last.parentNode && last !== doc.body.parentNode) {\n last = last.parentNode;\n\n if (!selector || (selector && matches(last, selector))) {\n result.push(last);\n }\n }\n });\n\n return unique(result);\n },\n\n prev: function () {\n return cash(this[0].previousElementSibling);\n },\n\n siblings: function () {\n var collection = this.parent().children(), el = this[0];\n\n return collection.filter(function (i) {\n return i !== el;\n });\n }\n\n });\n\n\n return cash;\n});","import Backbone from 'backbone';\nimport { isUndefined, isString } from 'underscore';\nimport { capitalize } from 'utils/mixins';\n\nconst Property = Backbone.Model.extend(\n {\n defaults: {\n name: '',\n property: '',\n type: '',\n defaults: '',\n info: '',\n value: '',\n icon: '',\n functionName: '',\n status: '',\n visible: true,\n fixedValues: ['initial', 'inherit'],\n\n // If true, the property will be forced to be full width\n full: 0,\n\n // If true to the value will be added '!important'\n important: 0,\n\n // If true, will be hidden by default and will show up only for targets\n // which require this property (via `stylable-require`)\n // Use case:\n // you can add all SVG CSS properties with toRequire as true\n // and then require them on SVG Components\n toRequire: 0,\n\n // Specifies dependency on other properties of the selected object.\n // Property is shown only when all conditions are matched.\n //\n // example: { display: ['flex', 'block'], position: ['absolute'] };\n // in this case the property is only shown when display is\n // of value 'flex' or 'block' AND position is 'absolute'\n requires: null,\n\n // Specifies dependency on properties of the parent of the selected object.\n // Property is shown only when all conditions are matched.\n requiresParent: null\n },\n\n initialize(props = {}, opts = {}) {\n const id = this.get('id') || '';\n const name = this.get('name') || '';\n !this.get('property') &&\n this.set('property', (name || id).replace(/ /g, '-'));\n const prop = this.get('property');\n !this.get('id') && this.set('id', prop);\n !name && this.set('name', capitalize(prop).replace(/-/g, ' '));\n Property.callInit(this, props, opts);\n },\n\n init() {},\n\n /**\n * Clear the value\n * @return {this}\n */\n clearValue(opts = {}) {\n this.set({ value: undefined }, opts);\n return this;\n },\n\n /**\n * Update value\n * @param {any} value\n * @param {Boolen} [complete=true] Indicates if it's a final state\n * @param {Object} [opts={}] Options\n */\n setValue(value, complete = 1, opts = {}) {\n const parsed = this.parseValue(value);\n this.set(parsed, { ...opts, avoidStore: 1 });\n\n // It's important to set an empty value, otherwise the\n // UndoManager won't see the change\n if (complete) {\n this.set('value', '', opts);\n this.set(parsed, opts);\n }\n },\n\n /**\n * Like `setValue` but, in addition, prevents the update of the input element\n * as the changes should come from the input itself.\n * This method is useful with the definition of custom properties\n * @param {any} value\n * @param {Boolen} [complete=true] Indicates if it's a final state\n * @param {Object} [opts={}] Options\n */\n setValueFromInput(value, complete, opts = {}) {\n this.setValue(value, complete, { ...opts, fromInput: 1 });\n },\n\n /**\n * Parse a raw value, generally fetched from the target, for this property\n * @param {string} value Raw value string\n * @return {Object}\n * @example\n * // example with an Input type\n * prop.parseValue('translateX(10deg)');\n * // -> { value: 10, unit: 'deg', functionName: 'translateX' }\n *\n */\n parseValue(value, opts = {}) {\n const result = { value };\n const imp = '!important';\n\n if (isString(value) && value.indexOf(imp) !== -1) {\n result.value = value.replace(imp, '').trim();\n result.important = 1;\n }\n\n if (!this.get('functionName') && !opts.complete) {\n return result;\n }\n\n const args = [];\n let valueStr = `${result.value}`;\n let start = valueStr.indexOf('(') + 1;\n let end = valueStr.lastIndexOf(')');\n const functionName = valueStr.substring(0, start - 1);\n if (functionName) result.functionName = functionName;\n args.push(start);\n\n // Will try even if the last closing parentheses is not found\n if (end >= 0) {\n args.push(end);\n }\n\n result.value = String.prototype.substring.apply(valueStr, args);\n\n if (opts.numeric) {\n const num = parseFloat(result.value);\n result.unit = result.value.replace(num, '');\n result.value = num;\n }\n\n return result;\n },\n\n /**\n * Get the default value\n * @return {string}\n * @private\n */\n getDefaultValue() {\n return this.get('defaults');\n },\n\n /**\n * Get a complete value of the property.\n * This probably will replace the getValue when all\n * properties models will be splitted\n * @param {string} val Custom value to replace the one on the model\n * @return {string}\n * @private\n */\n getFullValue(val) {\n const fn = this.get('functionName');\n let value = isUndefined(val) ? this.get('value') : val;\n const hasValue = !isUndefined(value);\n\n if (fn && hasValue) {\n value = `${fn}(${value})`;\n }\n\n if (hasValue && this.get('important')) {\n value = `${value} !important`;\n }\n\n return value || '';\n }\n },\n {\n callParentInit(property, ctx, props, opts = {}) {\n property.prototype.initialize.apply(ctx, [\n props,\n {\n ...opts,\n skipInit: 1\n }\n ]);\n },\n\n callInit(context, props, opts = {}) {\n !opts.skipInit && context.init(props, opts);\n }\n }\n);\n\nexport default Property;\n","import Property from './Property';\n\nexport default Property.extend({\n defaults: {\n ...Property.prototype.defaults,\n // 'background' is a good example where to make a difference\n // between detached and not\n //\n // - NOT detached (default)\n // background: url(..) no-repeat center ...;\n // - Detached\n // background-image: url();\n // background-repeat: repeat;\n // ...\n detached: 0,\n\n // Array of sub properties\n properties: [],\n\n // Separator between properties\n separator: ' '\n },\n\n initialize(props = {}, opts = {}) {\n Property.callParentInit(Property, this, props, opts);\n const properties = this.get('properties') || [];\n const Properties = require('./Properties').default;\n this.set('properties', new Properties(properties));\n this.listenTo(this, 'change:value', this.updateValues);\n Property.callInit(this, props, opts);\n },\n\n /**\n * Clear the value\n * @return {this}\n */\n clearValue(opts = {}) {\n this.get('properties').each(property => property.clearValue());\n return Property.prototype.clearValue.apply(this, arguments);\n },\n\n /**\n * Update property values\n */\n updateValues() {\n const values = this.getFullValue().split(this.getSplitSeparator());\n this.get('properties').each((property, i) => {\n const len = values.length;\n // Try to get value from a shorthand:\n // 11px -> 11px 11px 11px 11xp\n // 11px 22px -> 11px 22px 11px 22xp\n const value =\n values[i] || values[(i % len) + (len != 1 && len % 2 ? 1 : 0)];\n // There some issue with UndoManager\n //property.setValue(value, 0, {fromParent: 1});\n });\n },\n\n /**\n * Split by sperator but avoid it inside parenthesis\n * @return {RegExp}\n */\n getSplitSeparator() {\n return new RegExp(`${this.get('separator')}(?![^\\\\(]*\\\\))`);\n },\n\n /**\n * Returns default value\n * @param {Boolean} defaultProps Force to get defaults from properties\n * @return {string}\n */\n getDefaultValue(defaultProps) {\n let value = this.get('defaults');\n\n if (value && !defaultProps) {\n return value;\n }\n\n value = '';\n const properties = this.get('properties');\n properties.each((prop, index) => (value += `${prop.getDefaultValue()} `));\n return value.trim();\n },\n\n getFullValue() {\n if (this.get('detached')) {\n return '';\n }\n\n return this.get('properties').getFullValue();\n },\n\n /**\n * Get property at some index\n * @param {Number} index\n * @return {Object}\n */\n getPropertyAt(index) {\n return this.get('properties').at(index);\n }\n});\n","import Backbone from 'backbone';\nimport Properties from './Properties';\n\nexport default Backbone.Model.extend({\n defaults: {\n index: '',\n value: '',\n values: {},\n active: false,\n preview: false,\n properties: []\n },\n\n initialize() {\n const properties = this.get('properties');\n var value = this.get('value');\n this.set(\n 'properties',\n properties instanceof Properties ? properties : new Properties(properties)\n );\n this.get('properties').forEach(item => {\n const { collection } = this;\n item.parent = collection && collection.property;\n });\n\n // If there is no value I'll try to get it from values\n // I need value setted to make preview working\n if (!value) {\n var val = '';\n var values = this.get('values');\n\n for (var prop in values) {\n val += ' ' + values[prop];\n }\n\n this.set('value', val.trim());\n }\n },\n\n /**\n * Get property at some index\n * @param {Number} index\n * @return {Object}\n */\n getPropertyAt(index) {\n return this.get('properties').at(index);\n },\n\n getPropertyValue(property) {\n let result = '';\n this.get('properties').each(prop => {\n if (prop.get('property') == property) {\n result = prop.getFullValue();\n }\n });\n return result;\n },\n\n getFullValue() {\n let result = [];\n this.get('properties').each(prop => result.push(prop.getFullValue()));\n return result.join(' ');\n }\n});\n","import Backbone from 'backbone';\nimport Layer from './Layer';\n\nexport default Backbone.Collection.extend({\n model: Layer,\n\n initialize() {\n this.idx = 1;\n this.on('add', this.onAdd);\n this.on('reset', this.onReset);\n },\n\n onAdd(model, c, opts) {\n if (!opts.noIncrement) model.set('index', this.idx++);\n },\n\n onReset() {\n this.idx = 1;\n },\n\n getSeparator() {\n const { property } = this;\n return property ? property.get('layerSeparator') : ', ';\n },\n\n /**\n * Get layers from a value string (for not detached properties),\n * example of input:\n * `layer1Value, layer2Value, layer3Value, ...`\n * @param {string} value\n * @return {Array}\n * @private\n */\n getLayersFromValue(value) {\n const layers = [];\n // Remove spaces inside functions, eg:\n // From: 1px 1px rgba(2px, 2px, 2px), 2px 2px rgba(3px, 3px, 3px)\n // To: 1px 1px rgba(2px,2px,2px), 2px 2px rgba(3px,3px,3px)\n value.replace(/\\(([\\w\\s,.]*)\\)/g, match => {\n var cleaned = match.replace(/,\\s*/g, ',');\n value = value.replace(match, cleaned);\n });\n const layerValues = value ? value.split(this.getSeparator()) : [];\n layerValues.forEach(layerValue => {\n layers.push({ properties: this.properties.parseValue(layerValue) });\n });\n return layers;\n },\n\n /**\n * Get layers from a style object (for detached properties),\n * example of input:\n * {\n * subPropname1: sub-propvalue11, sub-propvalue12, sub-propvalue13, ...\n * subPropname2: sub-propvalue21, sub-propvalue22, sub-propvalue23, ...\n * subPropname3: sub-propvalue31, sub-propvalue32, sub-propvalue33, ...\n * }\n * @param {Object} styleObj\n * @return {Array}\n * @private\n */\n getLayersFromStyle(styleObj) {\n const layers = [];\n const properties = this.properties;\n const propNames = properties.pluck('property');\n\n properties.each(propModel => {\n const style = styleObj[propModel.get('property')];\n const values = style ? style.split(', ') : [];\n values.forEach((value, i) => {\n value = propModel.parseValue(value.trim()).value;\n const layer = layers[i];\n const propertyObj = { ...propModel.attributes, ...{ value } };\n\n if (layer) {\n layer.properties.push(propertyObj);\n } else {\n layers[i] = {\n properties: [propertyObj]\n };\n }\n });\n });\n\n // Now whit all layers in, will check missing properties\n layers.forEach(layer => {\n const layerProprs = layer.properties.map(prop => prop.property);\n properties.each(propModel => {\n const propertyName = propModel.get('property');\n\n if (layerProprs.indexOf(propertyName) < 0) {\n layer.properties.push({ ...propModel.attributes });\n }\n });\n });\n\n return layers;\n },\n\n active(index) {\n this.each(layer => layer.set('active', 0));\n const layer = this.at(index);\n layer && layer.set('active', 1);\n },\n\n getFullValue() {\n let result = [];\n this.each(layer => result.push(layer.getFullValue()));\n return result.join(this.getSeparator());\n },\n\n getPropertyValues(property) {\n const result = [];\n this.each(layer => {\n const value = layer.getPropertyValue(property);\n value && result.push(value);\n });\n return result.join(', ');\n }\n});\n","import Property from './PropertyComposite';\nimport Layers from './Layers';\n\nexport default Property.extend({\n defaults: {\n ...Property.prototype.defaults,\n // Array of layers (which contain properties)\n layers: [],\n\n // The separator used to join layer values\n layerSeparator: ', ',\n\n // Layer preview\n preview: 0\n },\n\n initialize(props = {}, opts = {}) {\n Property.callParentInit(Property, this, props, opts);\n const layers = this.get('layers');\n const layersColl = new Layers(layers);\n layersColl.property = this;\n layersColl.properties = this.get('properties');\n this.set('layers', layersColl);\n Property.callInit(this, props, opts);\n },\n\n getLayers() {\n return this.get('layers');\n },\n\n getCurrentLayer() {\n return this.getLayers().filter(layer => layer.get('active'))[0];\n },\n\n getFullValue() {\n return this.get('detached') ? '' : this.get('layers').getFullValue();\n },\n\n /**\n * This method allows to customize layers returned from the target\n * @param {Object} target\n * @return {Array} Should return an array of layers\n * @example\n * // return example\n * [\n * {\n * properties: [\n * { property: 'width', ... }\n * { property: 'height', ... }\n * ]\n * }\n * ]\n */\n getLayersFromTarget(target) {\n return;\n }\n});\n","import Backbone from 'backbone';\nimport { bindAll, isArray, isUndefined, debounce } from 'underscore';\nimport { camelCase } from 'utils/mixins';\nimport { includes, each } from 'underscore';\n\nconst clearProp = 'data-clear-style';\n\nexport default Backbone.View.extend({\n template(model) {\n const pfx = this.pfx;\n return `\n
\n ${this.templateLabel(model)}\n
\n
\n ${this.templateInput(model)}\n
\n `;\n },\n\n templateLabel(model) {\n const { pfx, em } = this;\n const { parent } = model;\n const { icon = '', info = '', id, name } = model.attributes;\n const label = (em && em.t(`styleManager.properties.${id}`)) || name;\n\n return `\n \n ${label}\n \n ${!parent ? `` : ''}\n `;\n },\n\n templateInput(model) {\n return `\n
\n \n
\n `;\n },\n\n events: {\n change: 'inputValueChanged',\n [`click [${clearProp}]`]: 'clear'\n },\n\n initialize(o = {}) {\n bindAll(this, 'targetUpdated');\n this.config = o.config || {};\n const em = this.config.em;\n this.em = em;\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n this.target = o.target || {};\n this.propTarget = o.propTarget || {};\n this.onChange = o.onChange;\n this.onInputRender = o.onInputRender || {};\n this.customValue = o.customValue || {};\n const model = this.model;\n this.property = model.get('property');\n this.input = null;\n const pfx = this.pfx;\n this.inputHolderId = '#' + pfx + 'input-holder';\n this.sector = model.collection && model.collection.sector;\n model.view = this;\n\n if (!model.get('value')) {\n model.set('value', model.getDefaultValue());\n }\n\n em && em.on(`update:component:style:${this.property}`, this.targetUpdated);\n //em && em.on(`styleable:change:${this.property}`, this.targetUpdated);\n\n // Listening to changes of properties in this.requires, so that styleable\n // changes based on other properties are propagated\n const requires = model.get('requires');\n requires &&\n Object.keys(requires).forEach(property => {\n em && em.on(`component:styleUpdate:${property}`, this.targetUpdated);\n });\n\n this.listenTo(\n this.propTarget,\n 'update styleManager:update',\n this.targetUpdated\n );\n this.listenTo(model, 'destroy remove', this.remove);\n this.listenTo(model, 'change:value', this.modelValueChanged);\n this.listenTo(model, 'targetUpdated', this.targetUpdated);\n this.listenTo(model, 'change:visible', this.updateVisibility);\n this.listenTo(model, 'change:status', this.updateStatus);\n\n const init = this.init && this.init.bind(this);\n init && init();\n },\n\n /**\n * Triggers when the status changes. The status indicates if the value of\n * the proprerty is changed or inherited\n * @private\n */\n updateStatus() {\n const { model } = this;\n const status = model.get('status');\n const parent = model.parent;\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const config = this.config;\n const updatedCls = `${ppfx}four-color`;\n const computedCls = `${ppfx}color-warn`;\n const labelEl = this.$el.children(`.${pfx}label`);\n const clearStyleEl = this.getClearEl();\n const clearStyle = clearStyleEl ? clearStyleEl.style : {};\n labelEl.removeClass(`${updatedCls} ${computedCls}`);\n clearStyle.display = 'none';\n\n switch (status) {\n case 'updated':\n !parent && labelEl.addClass(updatedCls);\n\n if (config.clearProperties) {\n clearStyle.display = 'inline';\n }\n break;\n case 'computed':\n labelEl.addClass(computedCls);\n break;\n }\n },\n\n /**\n * Clear the property from the target\n */\n clear(e) {\n e && e.stopPropagation();\n this.model.clearValue();\n // Skip one stack with setTimeout to avoid inconsistencies\n setTimeout(() => this.targetUpdated());\n },\n\n /**\n * Get clear element\n * @return {HTMLElement}\n */\n getClearEl() {\n if (!this.clearEl) {\n this.clearEl = this.el.querySelector(`[${clearProp}]`);\n }\n\n return this.clearEl;\n },\n\n /**\n * Returns selected target which should have 'style' property\n * @return {Model|null}\n */\n getTarget() {\n return this.getTargetModel();\n },\n\n getTargets() {\n const { targets } = this.propTarget;\n return targets || [this.getTarget()];\n },\n\n /**\n * Returns Styleable model\n * @return {Model|null}\n */\n getTargetModel() {\n return this.propTarget && this.propTarget.model;\n },\n\n /**\n * Returns helper Styleable model\n * @return {Model|null}\n */\n getHelperModel() {\n return this.propTarget && this.propTarget.helper;\n },\n\n /**\n * Triggers when the value of element input/s is changed, so have to update\n * the value of the model which will propogate those changes to the target\n */\n inputValueChanged(e) {\n e && e.stopPropagation();\n this.model.setValue(this.getInputValue(), 1, { fromInput: 1 });\n this.elementUpdated();\n },\n\n /**\n * Fired when the element of the property is updated\n */\n elementUpdated() {\n this.setStatus('updated');\n },\n\n setStatus(value) {\n this.model.set('status', value);\n const parent = this.model.parent;\n parent && value && parent.set('status', value);\n },\n\n emitUpdateTarget: debounce(function() {\n const em = this.config.em;\n em && em.trigger('styleManager:update:target', this.getTarget());\n }),\n\n /**\n * Fired when the target is changed\n * */\n targetUpdated() {\n this.emitUpdateTarget();\n\n if (!this.checkVisibility()) {\n return;\n }\n\n const config = this.config;\n const em = config.em;\n const { model } = this;\n const property = model.get('property');\n let value = '';\n let status = '';\n let targetValue = this.getTargetValue({ ignoreDefault: 1 });\n let defaultValue = model.getDefaultValue();\n let computedValue = this.getComputedValue();\n\n if (targetValue) {\n value = targetValue;\n\n if (config.highlightChanged) {\n status = 'updated';\n }\n } else if (\n computedValue &&\n config.showComputed &&\n computedValue != defaultValue\n ) {\n value = computedValue;\n\n if (config.highlightComputed) {\n status = 'computed';\n }\n } else {\n value = defaultValue;\n status = '';\n }\n\n model.setValue(value, 0, { fromTarget: 1 });\n this.setStatus(status);\n\n if (em) {\n em.trigger('styleManager:change', this, property, value);\n em.trigger(`styleManager:change:${property}`, this, value);\n }\n },\n\n checkVisibility() {\n var result = 1;\n\n // Check if need to hide the property\n if (this.config.hideNotStylable) {\n if (!this.isTargetStylable() || !this.isComponentStylable()) {\n this.hide();\n result = 0;\n } else {\n this.show();\n }\n // Sector is not passed to Composite and Stack types\n if (this.sector) {\n this.sector.trigger('updateVisibility');\n }\n }\n\n return result;\n },\n\n /**\n * Get the value of this property from the target (eg, Component, CSSRule)\n * @param {Object} [opts] Options\n * @param {Boolean} [options.fetchFromFunction]\n * @param {Boolean} [options.ignoreDefault]\n * @return string\n * @private\n */\n getTargetValue(opts = {}) {\n var result;\n var model = this.model;\n var target = this.getTargetModel();\n var customFetchValue = this.customValue;\n\n if (!target) {\n return result;\n }\n\n result = target.getStyle()[model.get('property')];\n\n if (!result && !opts.ignoreDefault) {\n result = model.getDefaultValue();\n }\n\n if (typeof customFetchValue == 'function' && !opts.ignoreCustomValue) {\n let index = model.collection.indexOf(model);\n let customValue = customFetchValue(this, index);\n\n if (customValue) {\n result = customValue;\n }\n }\n\n return result;\n },\n\n /**\n * Returns computed value\n * @return {String}\n * @private\n */\n getComputedValue() {\n const target = this.propTarget;\n const computed = target.computed || {};\n const computedDef = target.computedDefault || {};\n const avoid = this.config.avoidComputed || [];\n const property = this.model.get('property');\n const notToSkip = avoid.indexOf(property) < 0;\n const value = computed[property];\n const valueDef = computedDef[camelCase(property)];\n return computed && notToSkip && valueDef !== value && value;\n },\n\n /**\n * Returns value from input\n * @return {string}\n */\n getInputValue() {\n const input = this.getInputEl();\n return input ? input.value : '';\n },\n\n /**\n * Triggers when the `value` of the model changes, so the target and\n * the input element should be updated\n * @param {Object} e Event\n * @param {Mixed} val Value\n * @param {Object} opt Options\n * */\n modelValueChanged(e, val, opt = {}) {\n const model = this.model;\n const value = model.getFullValue();\n\n // Avoid element update if the change comes from it\n if (!opt.fromInput) {\n this.setValue(value);\n }\n\n this.getTargets().forEach(target => this.__updateTarget(target, opt));\n },\n\n __updateTarget(target, opt = {}) {\n const { model } = this;\n const { em } = this.config;\n const prop = model.get('property');\n const value = model.getFullValue();\n const onChange = this.onChange;\n\n // Check if component is allowed to be styled\n if (\n !target ||\n !this.isTargetStylable(target) ||\n !this.isComponentStylable()\n ) {\n return;\n }\n\n // Avoid target update if the changes comes from it\n if (!opt.fromTarget) {\n // The onChange is used by Composite/Stack properties, so I'd avoid sending\n // it back if the change comes from one of those\n if (onChange && !opt.fromParent) {\n onChange(target, this, opt);\n } else {\n this.updateTargetStyle(value, null, { ...opt, target });\n }\n }\n\n // TODO: use target if componentFirst\n const component = em && em.getSelected();\n\n if (em && component) {\n em.trigger('component:update', component);\n em.trigger('component:styleUpdate', component, prop);\n em.trigger(`component:styleUpdate:${prop}`, component);\n }\n },\n\n /**\n * Update target style\n * @param {string} value\n * @param {string} name\n * @param {Object} opts\n */\n updateTargetStyle(value, name = '', opts = {}) {\n const property = name || this.model.get('property');\n const target = opts.target || this.getTarget();\n const style = target.getStyle();\n\n if (value) {\n style[property] = value;\n } else {\n delete style[property];\n }\n\n target.setStyle(style, opts);\n\n // Helper is used by `states` like ':hover' to show its preview\n const helper = this.getHelperModel();\n helper && helper.setStyle(style, opts);\n },\n\n /**\n * Check if target is stylable with this property\n * The target could be the Component as the CSS Rule\n * @return {Boolean}\n */\n isTargetStylable(target) {\n const trg = target || this.getTarget();\n const model = this.model;\n const id = model.get('id');\n const property = model.get('property');\n const toRequire = model.get('toRequire');\n const unstylable = trg.get('unstylable');\n const stylableReq = trg.get('stylable-require');\n const requires = model.get('requires');\n const requiresParent = model.get('requiresParent');\n const sectors = this.sector ? this.sector.collection : null;\n const selected = this.em ? this.em.getSelected() : null;\n let stylable = trg.get('stylable');\n\n // Stylable could also be an array indicating with which property\n // the target could be styled\n if (isArray(stylable)) {\n stylable = stylable.indexOf(property) >= 0;\n }\n\n // Check if the property was signed as unstylable\n if (isArray(unstylable)) {\n stylable = unstylable.indexOf(property) < 0;\n }\n\n // Check if the property is available only if requested\n if (toRequire) {\n stylable =\n !target ||\n (stylableReq &&\n (stylableReq.indexOf(id) >= 0 || stylableReq.indexOf(property) >= 0));\n }\n\n // Check if the property is available based on other property's values\n if (sectors && requires) {\n const properties = Object.keys(requires);\n sectors.each(sector => {\n sector.get('properties').each(model => {\n if (includes(properties, model.id)) {\n const values = requires[model.id];\n stylable = stylable && includes(values, model.get('value'));\n }\n });\n });\n }\n\n // Check if the property is available based on parent's property values\n if (requiresParent) {\n const parent = selected && selected.parent();\n const parentEl = parent && parent.getEl();\n if (parentEl) {\n const styles = window.getComputedStyle(parentEl);\n each(requiresParent, (values, property) => {\n stylable =\n stylable && styles[property] && includes(values, styles[property]);\n });\n } else {\n stylable = false;\n }\n }\n\n return stylable;\n },\n\n /**\n * Check if the selected component is stylable with this property\n * The target could be the Component as the CSS Rule\n * @return {Boolean}\n */\n isComponentStylable() {\n const em = this.em;\n const component = em && em.getSelected();\n\n if (!component) {\n return true;\n }\n\n return this.isTargetStylable(component);\n },\n\n /**\n * Passed a raw value you have to update the input element, generally\n * is the value fetched from targets, so you can receive values with\n * functions, units, etc. (eg. `rotateY(45deg)`)\n * get also\n * @param {string} value\n * @private\n */\n setRawValue(value) {\n this.setValue(this.model.parseValue(value));\n },\n\n /**\n * Update the element input.\n * Usually the value is a result of `model.getFullValue()`\n * @param {String} value The value from the model\n * */\n setValue(value) {\n const model = this.model;\n let val = isUndefined(value) ? model.getDefaultValue() : value;\n const input = this.getInputEl();\n input && (input.value = val);\n },\n\n getInputEl() {\n if (!this.input) {\n this.input = this.el.querySelector('input');\n }\n\n return this.input;\n },\n\n updateVisibility() {\n this.el.style.display = this.model.get('visible') ? 'block' : 'none';\n },\n\n show() {\n this.model.set('visible', 1);\n },\n\n hide() {\n this.model.set('visible', 0);\n },\n\n /**\n * Clean input\n * */\n cleanValue() {\n this.setValue('');\n },\n\n clearCached() {\n this.clearEl = null;\n this.input = null;\n this.$input = null;\n },\n\n render() {\n this.clearCached();\n const pfx = this.pfx;\n const model = this.model;\n const el = this.el;\n const property = model.get('property');\n const full = model.get('full');\n const className = `${pfx}property`;\n el.innerHTML = this.template(model);\n el.className = `${className} ${pfx}${model.get(\n 'type'\n )} ${className}__${property}`;\n el.className += full ? ` ${className}--full` : '';\n this.updateStatus();\n\n const onRender = this.onRender && this.onRender.bind(this);\n onRender && onRender();\n this.setValue(model.get('value'), { targetUpdate: 1 });\n }\n});\n","import Backbone from 'backbone';\nimport PropertyView from './PropertyView';\n\nconst $ = Backbone.$;\n\nexport default PropertyView.extend({\n templateInput() {\n const pfx = this.pfx;\n return `\n
\n \n
\n `;\n },\n\n inputValueChanged(...args) {\n // If it's not detached (eg. 'padding: 1px 2px 3px 4px;') it will follow\n // the same flow of PropertyView\n if (!this.model.get('detached')) {\n PropertyView.prototype.inputValueChanged.apply(this, args);\n }\n },\n\n clear(e) {\n const props = this.properties;\n props && props.forEach(propView => propView.clear());\n PropertyView.prototype.clear.apply(this, arguments);\n },\n\n /**\n * Renders input\n * */\n onRender() {\n var model = this.model;\n var props = model.get('properties') || [];\n var self = this;\n this.properties = [];\n\n if (props.length) {\n if (!this.$input) {\n this.$input = $('');\n this.input = this.$input.get(0);\n }\n\n if (!this.props) {\n this.props = model.get('properties');\n }\n\n if (!this.$props) {\n //Not yet supported nested composite\n this.props.each(function(prop, index) {\n if (prop && prop.get('type') == 'composite') {\n this.props.remove(prop);\n console.warn('Nested composite types not yet allowed.');\n }\n prop.parent = model;\n }, this);\n\n var PropertiesView = require('./PropertiesView').default;\n var propsView = new PropertiesView(this.getPropsConfig());\n this.$props = propsView.render().$el;\n this.properties = propsView.properties;\n this.$el.find(`#${this.pfx}input-holder`).append(this.$props);\n }\n }\n },\n\n /**\n * Returns configurations that should be past to properties\n * @param {Object} opts\n * @return {Object}\n */\n getPropsConfig(opts) {\n var that = this;\n const model = this.model;\n\n var result = {\n config: this.config,\n collection: this.props,\n target: this.target,\n propTarget: this.propTarget,\n // On any change made to children I need to update composite value\n onChange(el, view, opts) {\n model.set('value', model.getFullValue(), opts);\n },\n // Each child property will receive a full composite string, eg. '0px 0px 10px 0px'\n // I need to extract from that string the corresponding one to that property.\n customValue(property, mIndex) {\n return that.valueOnIndex(mIndex, property);\n }\n };\n\n // If detached let follow its standard flow\n if (model.get('detached')) {\n delete result.onChange;\n }\n\n return result;\n },\n\n /**\n * Extract string from composite value\n * @param {number} index Index\n * @param {Object} view Property view\n * @return {string}\n * */\n valueOnIndex(index, view) {\n let value;\n const targetValue = this.getTargetValue({ ignoreDefault: 1 });\n\n // If the target value of the composite is not empty I'll fetch\n // the corresponding value from the requested index, otherwise try\n // to get the value of the sub-property\n if (targetValue) {\n const values = targetValue.split(this.model.getSplitSeparator());\n value = values[index];\n } else {\n value =\n view && view.getTargetValue({ ignoreCustomValue: 1, ignoreDefault: 1 });\n }\n\n return value;\n },\n\n clearCached() {\n PropertyView.prototype.clearCached.apply(this, arguments);\n this.$input = null;\n this.props = null;\n this.$props = null;\n }\n});\n","import Backbone from 'backbone';\nimport PropertiesView from './PropertiesView';\n\nexport default Backbone.View.extend({\n events: {\n click: 'active',\n 'click [data-close-layer]': 'remove',\n 'mousedown [data-move-layer]': 'initSorter',\n 'touchstart [data-move-layer]': 'initSorter'\n },\n\n template(model) {\n const { pfx, ppfx, em } = this;\n const label = `${em && em.t('styleManager.layer')} ${model.get('index')}`;\n\n return `\n
\n \n
\n
${label}
\n
\n \t
\n
\n
\n ⨯\n
\n
\n
\n `;\n },\n\n initialize(o = {}) {\n let model = this.model;\n this.stackModel = o.stackModel || {};\n this.config = o.config || {};\n this.em = this.config.em;\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n this.sorter = o.sorter || null;\n this.propsConfig = o.propsConfig || {};\n this.customPreview = o.onPreview;\n this.listenTo(model, 'destroy remove', this.remove);\n this.listenTo(model, 'change:active', this.updateVisibility);\n this.listenTo(model.get('properties'), 'change', this.updatePreview);\n\n // For the sorter\n model.view = this;\n model.set({ droppable: 0, draggable: 1 });\n this.$el.data('model', model);\n },\n\n /**\n * Delegate sorting\n * @param {Event} e\n * */\n initSorter(e) {\n if (this.sorter) this.sorter.startSort(this.el);\n },\n\n remove(e) {\n if (e && e.stopPropagation) e.stopPropagation();\n\n const model = this.model;\n const collection = model.collection;\n const stackModel = this.stackModel;\n\n Backbone.View.prototype.remove.apply(this, arguments);\n\n if (collection.contains(model)) {\n collection.remove(model);\n }\n\n if (stackModel && stackModel.set) {\n stackModel.set({ stackIndex: null }, { silent: true });\n stackModel.trigger('updateValue');\n }\n },\n\n /**\n * Default method for changing preview box\n * @param {Collection} props\n * @param {Element} $el\n */\n onPreview(value) {\n const values = value.split(' ');\n const lim = 3;\n const result = [];\n this.model.get('properties').each((prop, index) => {\n var value = values[index] || '';\n\n if (value) {\n if (prop.get('type') == 'integer') {\n let valueInt = parseInt(value, 10);\n let unit = value.replace(valueInt, '');\n valueInt = !isNaN(valueInt) ? valueInt : 0;\n valueInt = valueInt > lim ? lim : valueInt;\n valueInt = valueInt < -lim ? -lim : valueInt;\n value = valueInt + unit;\n }\n }\n\n result.push(value);\n });\n\n return result.join(' ');\n },\n\n updatePreview() {\n const stackModel = this.stackModel;\n const customPreview = this.customPreview;\n const previewEl = this.getPreviewEl();\n const value = this.model.getFullValue();\n const preview = customPreview\n ? customPreview(value)\n : this.onPreview(value);\n\n if (preview && stackModel && previewEl) {\n previewEl.style[stackModel.get('property')] = preview;\n }\n },\n\n getPropertiesWrapper() {\n if (!this.propsWrapEl) {\n this.propsWrapEl = this.el.querySelector('[data-properties]');\n }\n return this.propsWrapEl;\n },\n\n getPreviewEl() {\n if (!this.previewEl) {\n this.previewEl = this.el.querySelector('[data-preview]');\n }\n return this.previewEl;\n },\n\n active() {\n const model = this.model;\n const collection = model.collection;\n collection.active(collection.indexOf(model));\n },\n\n updateVisibility() {\n const pfx = this.pfx;\n const wrapEl = this.getPropertiesWrapper();\n const active = this.model.get('active');\n wrapEl.style.display = active ? '' : 'none';\n this.$el[active ? 'addClass' : 'removeClass'](`${pfx}active`);\n },\n\n render() {\n const propsConfig = this.propsConfig;\n const { model, el, pfx } = this;\n const preview = model.get('preview');\n const properties = new PropertiesView({\n collection: model.get('properties'),\n config: this.config,\n target: propsConfig.target,\n customValue: propsConfig.customValue,\n propTarget: propsConfig.propTarget,\n onChange: propsConfig.onChange\n }).render().el;\n\n el.innerHTML = this.template(model);\n el.className = `${pfx}layer${!preview ? ` ${pfx}no-preview` : ''}`;\n this.getPropertiesWrapper().appendChild(properties);\n this.updateVisibility();\n this.updatePreview();\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport LayerView from './LayerView';\n\nexport default Backbone.View.extend({\n initialize(o) {\n this.config = o.config || {};\n this.stackModel = o.stackModel;\n this.preview = o.preview;\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n this.propsConfig = o.propsConfig;\n let pfx = this.pfx;\n let ppfx = this.ppfx;\n let collection = this.collection;\n this.className = `${pfx}layers ${ppfx}field`;\n this.listenTo(collection, 'add', this.addTo);\n this.listenTo(collection, 'deselectAll', this.deselectAll);\n this.listenTo(collection, 'reset', this.render);\n\n var em = this.config.em || '';\n var utils = em ? em.get('Utils') : '';\n\n this.sorter = utils\n ? new utils.Sorter({\n container: this.el,\n ignoreViewChildren: 1,\n containerSel: `.${pfx}layers`,\n itemSel: `.${pfx}layer`,\n pfx: this.config.pStylePrefix\n })\n : '';\n\n // For the Sorter\n collection.view = this;\n this.$el.data('model', collection);\n this.$el.data('collection', collection);\n },\n\n /**\n * Add to collection\n * @param Object Model\n *\n * @return Object\n * */\n addTo(model) {\n var i = this.collection.indexOf(model);\n this.addToCollection(model, null, i);\n },\n\n /**\n * Add new object to collection\n * @param Object Model\n * @param Object Fragment collection\n * @param {number} index Index of append\n *\n * @return Object Object created\n * */\n addToCollection(model, fragmentEl, index) {\n var fragment = fragmentEl || null;\n const stackModel = this.stackModel;\n const config = this.config;\n const sorter = this.sorter;\n const propsConfig = this.propsConfig;\n\n if (typeof this.preview !== 'undefined') {\n model.set('preview', this.preview);\n }\n\n var view = new LayerView({\n model,\n config,\n sorter,\n stackModel,\n propsConfig\n });\n var rendered = view.render().el;\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n if (typeof index != 'undefined') {\n var method = 'before';\n // If the added model is the last of collection\n // need to change the logic of append\n if (this.$el.children().length == index) {\n index--;\n method = 'after';\n }\n // In case the added is new in the collection index will be -1\n if (index < 0) {\n this.$el.append(rendered);\n } else\n this.$el\n .children()\n .eq(index)\n [method](rendered);\n } else this.$el.append(rendered);\n }\n\n return rendered;\n },\n\n /**\n * Deselect all\n *\n * @return void\n * */\n deselectAll() {\n this.$el.find('.' + this.pfx + 'layer').removeClass(this.pfx + 'active');\n },\n\n render() {\n var fragment = document.createDocumentFragment();\n this.$el.empty();\n\n this.collection.each(function(model) {\n this.addToCollection(model, fragment);\n }, this);\n\n this.$el.append(fragment);\n this.$el.attr('class', this.className);\n\n if (this.sorter) this.sorter.plh = null;\n\n return this;\n }\n});\n","import PropertyCompositeView from './PropertyCompositeView';\nimport LayersView from './LayersView';\n\nexport default PropertyCompositeView.extend({\n templateInput() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n return `\n
\n \n
\n
\n `;\n },\n\n init() {\n const model = this.model;\n const pfx = this.pfx;\n model.set('stackIndex', null);\n this.events[`click [data-add-layer]`] = 'addLayer';\n this.listenTo(model, 'change:stackIndex', this.indexChanged);\n this.listenTo(model, 'updateValue', this.inputValueChanged);\n this.delegateEvents();\n },\n\n clear(e) {\n e && e.stopPropagation();\n this.model.get('layers').reset();\n this.model.clearValue();\n this.targetUpdated();\n },\n\n /**\n * Fired when the target is updated.\n * With detached mode the component will be always empty as its value\n * so we gonna check all props and find if it has any difference\n * */\n targetUpdated(...args) {\n if (!this.model.get('detached')) {\n PropertyCompositeView.prototype.targetUpdated.apply(this, args);\n } else {\n this.checkVisibility();\n }\n\n this.refreshLayers();\n },\n\n /**\n * Returns the collection of layers\n * @return {Collection}\n */\n getLayers() {\n return this.model.get('layers');\n },\n\n /**\n * Triggered when another layer has been selected.\n * This allow to move all rendered properties to a new\n * selected layer\n * @param {Event}\n *\n * @return {Object}\n * */\n indexChanged(e) {\n const model = this.model;\n this.getLayers().active(model.get('stackIndex'));\n },\n\n addLayer() {\n const model = this.model;\n const layers = this.getLayers();\n const properties = model.get('properties').deepClone();\n properties.each(property => property.set('value', ''));\n const layer = layers.add({ properties });\n\n // In detached mode inputValueChanged will add new 'layer value'\n // to all subprops\n this.inputValueChanged();\n\n // This will set subprops with a new default values\n model.set('stackIndex', layers.indexOf(layer));\n },\n\n inputValueChanged() {\n const model = this.model;\n this.elementUpdated();\n\n // If not detached I'll just put all the values from layers to property\n // eg. background: layer1Value, layer2Value, layer3Value, ...\n if (!model.get('detached')) {\n model.set('value', this.getLayerValues());\n } else {\n model.get('properties').each(prop => prop.trigger('change:value'));\n }\n },\n\n /**\n * There is no need to handle input update by the property itself,\n * this will be done by layers\n * @private\n */\n setValue() {},\n\n /**\n * Create value by layers\n * @return string\n * */\n getLayerValues() {\n return this.getLayers().getFullValue();\n },\n\n /**\n * Refresh layers\n * */\n refreshLayers() {\n let layersObj = [];\n const model = this.model;\n const layers = this.getLayers();\n const detached = model.get('detached');\n const target = this.getTarget();\n\n // With detached layers values will be assigned to their properties\n if (detached) {\n const style = target ? target.getStyle() : {};\n layersObj = layers.getLayersFromStyle(style);\n } else {\n let value = this.getTargetValue();\n value = value == model.getDefaultValue() ? '' : value;\n layersObj = layers.getLayersFromValue(value);\n }\n\n const toAdd = model.getLayersFromTarget(target) || layersObj;\n layers.reset();\n layers.add(toAdd);\n model.set({ stackIndex: null }, { silent: true });\n },\n\n onRender() {\n const self = this;\n const model = this.model;\n const fieldEl = this.el.querySelector('[data-layers-wrapper]');\n const PropertiesView = require('./PropertiesView').default;\n const propsConfig = {\n target: this.target,\n propTarget: this.propTarget,\n\n // Things to do when a single sub-property is changed\n onChange(el, view, opt) {\n const subModel = view.model;\n\n if (model.get('detached')) {\n const subProp = subModel.get('property');\n const values = self.getLayers().getPropertyValues(subProp);\n view.updateTargetStyle(values, null, opt);\n } else {\n model.set('value', model.getFullValue(), opt);\n }\n }\n };\n const layers = new LayersView({\n collection: this.getLayers(),\n stackModel: model,\n preview: model.get('preview'),\n config: this.config,\n propsConfig\n }).render().el;\n\n // Will use it to propogate changes\n new PropertiesView({\n target: this.target,\n collection: this.model.get('properties'),\n stackModel: model,\n config: this.config,\n onChange: propsConfig.onChange,\n propTarget: propsConfig.propTarget,\n customValue: propsConfig.customValue\n }).render();\n\n //model.get('properties')\n fieldEl.appendChild(layers);\n }\n});\n","import { isString } from 'underscore';\nimport Backbone from 'backbone';\nimport PropertyView from './PropertyView';\n\nconst $ = Backbone.$;\n\nexport default PropertyView.extend({\n templateInput() {\n const { pfx, em } = this;\n\n return `\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n `;\n },\n\n init() {\n const em = this.em;\n this.modal = em.get('Modal');\n this.am = em.get('AssetManager');\n this.events['click #' + this.pfx + 'close'] = 'removeFile';\n this.events['click #' + this.pfx + 'images'] = 'openAssetManager';\n this.delegateEvents();\n },\n\n onRender() {\n if (!this.$input) {\n const plh = this.model.getDefaultValue();\n this.$input = $(``);\n }\n\n if (!this.$preview) {\n this.$preview = this.$el.find('#' + this.pfx + 'preview-file');\n }\n\n if (!this.$previewBox) {\n this.$previewBox = this.$el.find('#' + this.pfx + 'preview-box');\n }\n\n this.setValue(this.componentValue, 0);\n },\n\n clearCached() {\n PropertyView.prototype.clearCached.apply(this, arguments);\n this.$preview = null;\n this.$previewBox = null;\n },\n\n setValue(value, f) {\n PropertyView.prototype.setValue.apply(this, arguments);\n this.setPreviewView(value && value != this.model.getDefaultValue());\n this.setPreview(value);\n },\n\n /**\n * Change visibility of the preview box\n * @param bool Visibility\n *\n * @return void\n * */\n setPreviewView(v) {\n const pv = this.$previewBox;\n pv && pv[v ? 'addClass' : 'removeClass'](`${this.pfx}show`);\n },\n\n /**\n * Spread url\n * @param string Url\n *\n * @return void\n * */\n spreadUrl(url) {\n this.model.set('value', url);\n this.setPreviewView(1);\n },\n\n /**\n * Shows file preview\n * @param string Value\n * */\n setPreview(value) {\n const preview = this.$preview;\n value = value && value.indexOf('url(') < 0 ? `url(${value})` : value;\n preview && preview.css('background-image', value);\n },\n\n /** @inheritdoc */\n cleanValue() {\n this.setPreviewView(0);\n this.model.set({ value: '' }, { silent: true });\n },\n\n /**\n * Remove file from input\n *\n * @return void\n * */\n removeFile(...args) {\n this.model.set('value', this.model.getDefaultValue());\n PropertyView.prototype.cleanValue.apply(this, args);\n this.setPreviewView(0);\n },\n\n /**\n * Open dialog for image selecting\n * @param {Object} e Event\n *\n * @return void\n * */\n openAssetManager(e) {\n const { em, modal } = this;\n const editor = em ? em.get('Editor') : '';\n\n if (editor) {\n editor.runCommand('open-assets', {\n types: ['image'],\n accept: 'image/*',\n target: this.getTargetModel(),\n onClick() {},\n onDblClick() {},\n onSelect: asset => {\n modal.close();\n const url = isString(asset) ? asset : asset.get('src');\n this.spreadUrl(url);\n }\n });\n }\n }\n});\n","import Backbone from 'backbone';\nimport PropertyView from './PropertyView';\n\nconst $ = Backbone.$;\n\nexport default PropertyView.extend({\n templateInput() {\n return '';\n },\n\n init() {\n const model = this.model;\n this.listenTo(model, 'change:unit', this.modelValueChanged);\n this.listenTo(model, 'el:change', this.elementUpdated);\n this.listenTo(model, 'change:units', this.render);\n },\n\n setValue(value) {\n const parsed = this.model.parseValue(value);\n value = `${parsed.value}${parsed.unit}`;\n this.inputInst.setValue(value, { silent: 1 });\n },\n\n onRender() {\n const ppfx = this.ppfx;\n\n if (!this.input) {\n const input = this.model.input;\n input.ppfx = ppfx;\n input.render();\n const fields = this.el.querySelector(`.${ppfx}fields`);\n fields.appendChild(input.el);\n this.$input = input.inputEl;\n this.unit = input.unitEl;\n this.$unit = $(this.unit);\n this.input = this.$input.get(0);\n this.inputInst = input;\n }\n },\n\n clearCached() {\n PropertyView.prototype.clearCached.apply(this, arguments);\n this.unit = null;\n this.$unit = null;\n }\n});\n","import PropertyIntegerView from './PropertyIntegerView';\nimport InputColor from 'domain_abstract/ui/InputColor';\n\nexport default PropertyIntegerView.extend({\n setValue(value, opts = {}) {\n opts = { ...opts, silent: 1 };\n this.inputInst.setValue(value, opts);\n },\n\n onRender() {\n if (!this.input) {\n const ppfx = this.ppfx;\n const inputColor = new InputColor({\n target: this.target,\n model: this.model,\n ppfx\n });\n const input = inputColor.render();\n this.el.querySelector(`.${ppfx}fields`).appendChild(input.el);\n this.$input = input.inputEl;\n this.$color = input.colorEl;\n this.input = this.$input.get(0);\n this.inputInst = input;\n }\n }\n});\n","import Property from './Property';\n\nexport default Property.extend({\n defaults: () => ({\n ...Property.prototype.defaults,\n // Array of options, eg. [{name: 'Label ', value: '100'}]\n options: [],\n full: 1\n }),\n\n initialize(...args) {\n Property.prototype.initialize.apply(this, args);\n this.listenTo(this, 'change:options', this.onOptionChange);\n },\n\n onOptionChange() {\n this.set('list', this.get('options'));\n },\n\n getOptions() {\n const { options, list } = this.attributes;\n return options && options.length ? options : list;\n },\n\n setOptions(opts = []) {\n this.set('options', opts);\n return this;\n },\n\n addOption(opt) {\n if (opt) {\n const opts = this.getOptions();\n this.setOptions([...opts, opt]);\n }\n return this;\n }\n});\n","import Property from './PropertyRadio';\n\nexport default Property.extend({\n defaults: () => ({\n ...Property.prototype.defaults,\n full: 0\n })\n});\n","import Backbone from 'backbone';\nimport PropertyView from './PropertyView';\n\nconst $ = Backbone.$;\n\nexport default PropertyView.extend({\n templateInput() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n return `\n
\n \n
\n
\n
\n
\n `;\n },\n\n initialize(...args) {\n PropertyView.prototype.initialize.apply(this, args);\n this.listenTo(this.model, 'change:options', this.updateOptions);\n },\n\n updateOptions() {\n this.input = null;\n this.onRender();\n },\n\n onRender() {\n var pfx = this.pfx;\n const options = this.model.getOptions();\n\n if (!this.input) {\n let optionsStr = '';\n\n options.forEach(option => {\n let name = option.name || option.value;\n let style = option.style ? option.style.replace(/\"/g, '"') : '';\n let styleAttr = style ? `style=\"${style}\"` : '';\n let value = option.value.replace(/\"/g, '"');\n optionsStr += ``;\n });\n\n const inputH = this.el.querySelector(`#${pfx}input-holder`);\n inputH.innerHTML = ``;\n this.input = inputH.firstChild;\n }\n }\n});\n","import PropertyView from './PropertyView';\n\nexport default PropertyView.extend({\n templateInput() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n return `\n
\n
\n `;\n },\n\n onRender() {\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const itemCls = `${ppfx}radio-item-label`;\n const model = this.model;\n const prop = model.get('property');\n const options = model.get('list') || model.get('options') || [];\n\n if (!this.input) {\n if (options && options.length) {\n let inputStr = '';\n\n options.forEach(el => {\n let cl = el.className ? `${el.className} ${pfx}icon ${itemCls}` : '';\n let id = `${prop}-${el.value}`;\n let labelTxt = el.name || el.value;\n let titleAttr = el.title ? `title=\"${el.title}\"` : '';\n inputStr += `\n
\n \n \n
\n `;\n });\n\n const inputHld = this.el.querySelector(`.${ppfx}field`);\n inputHld.innerHTML = `
${inputStr}
`;\n this.input = inputHld.firstChild;\n }\n }\n },\n\n getInputValue() {\n const inputChk = this.getCheckedEl();\n return inputChk ? inputChk.value : '';\n },\n\n getCheckedEl() {\n const input = this.getInputEl();\n return input ? input.querySelector('input:checked') : '';\n },\n\n setValue(value) {\n const model = this.model;\n let val = value || model.get('value') || model.getDefaultValue();\n const input = this.getInputEl();\n const inputIn = input ? input.querySelector(`[value=\"${val}\"]`) : '';\n\n if (inputIn) {\n inputIn.checked = true;\n } else {\n const inputChk = this.getCheckedEl();\n inputChk && (inputChk.checked = false);\n }\n }\n});\n","import { isUndefined } from 'underscore';\nimport Property from './Property';\nimport InputNumber from 'domain_abstract/ui/InputNumber';\n\nexport default Property.extend({\n defaults: {\n ...Property.prototype.defaults,\n // Array of units, eg. ['px', '%']\n units: [],\n\n // Selected unit, eg. 'px'\n unit: '',\n\n // Integer value steps\n step: 1,\n\n // Minimum value\n min: '',\n\n // Maximum value\n max: ''\n },\n\n initialize(props = {}, opts = {}) {\n Property.callParentInit(Property, this, props, opts);\n const unit = this.get('unit');\n const units = this.get('units');\n this.input = new InputNumber({ model: this });\n\n if (units.length && !unit) {\n this.set('unit', units[0]);\n }\n Property.callInit(this, props, opts);\n },\n\n clearValue(opts = {}) {\n this.set({ value: undefined, unit: undefined }, opts);\n return this;\n },\n\n parseValue(val) {\n const parsed = Property.prototype.parseValue.apply(this, arguments);\n const { value, unit } = this.input.validateInputValue(parsed.value, {\n deepCheck: 1\n });\n parsed.value = value;\n parsed.unit = unit;\n return parsed;\n },\n\n getFullValue() {\n let value = this.get('value');\n let unit = this.get('unit');\n value = !isUndefined(value) ? value : '';\n unit = !isUndefined(unit) && value ? unit : '';\n value = `${value}${unit}`;\n return Property.prototype.getFullValue.apply(this, [value]);\n }\n});\n","import Property from './PropertyInteger';\n\nexport default Property.extend({\n defaults: {\n ...Property.prototype.defaults,\n showInput: 1\n }\n});\n","import Property from './PropertyIntegerView';\n\nexport default Property.extend({\n events() {\n return {\n ...Property.prototype.events,\n 'change [type=range]': 'inputValueChanged',\n 'input [type=range]': 'inputValueChangedSoft',\n change: ''\n };\n },\n\n templateInput(model) {\n const ppfx = this.ppfx;\n return `\n
\n \n
\n `;\n },\n\n getSliderEl() {\n if (!this.slider) {\n this.slider = this.el.querySelector('input[type=range]');\n }\n\n return this.slider;\n },\n\n inputValueChanged() {\n const model = this.model;\n const step = model.get('step');\n this.getInputEl().value = this.getSliderEl().value;\n const value = this.getInputValue() - step;\n model.set('value', value, { avoidStore: 1 }).set('value', value + step);\n this.elementUpdated();\n },\n\n inputValueChangedSoft() {\n this.getInputEl().value = this.getSliderEl().value;\n this.model.set('value', this.getInputValue(), { avoidStore: 1 });\n this.elementUpdated();\n },\n\n setValue(value) {\n const parsed = this.model.parseValue(value);\n this.getSliderEl().value = parseFloat(parsed.value);\n Property.prototype.setValue.apply(this, arguments);\n },\n\n onRender() {\n Property.prototype.onRender.apply(this, arguments);\n\n if (!this.model.get('showInput')) {\n this.inputInst.el.style.display = 'none';\n }\n },\n\n clearCached() {\n Property.prototype.clearCached.apply(this, arguments);\n this.slider = null;\n }\n});\n","import Backbone from 'backbone';\nimport TypeableCollection from 'domain_abstract/model/TypeableCollection';\nimport Property from './Property';\nimport PropertyStack from './PropertyStack';\nimport PropertyStackView from './../view/PropertyStackView';\nimport PropertyComposite from './PropertyComposite';\nimport PropertyCompositeView from './../view/PropertyCompositeView';\nimport PropertyFileView from './../view/PropertyFileView';\nimport PropertyColorView from './../view/PropertyColorView';\nimport PropertySelect from './PropertySelect';\nimport PropertySelectView from './../view/PropertySelectView';\nimport PropertyRadio from './PropertyRadio';\nimport PropertyRadioView from './../view/PropertyRadioView';\nimport PropertySlider from './PropertySlider';\nimport PropertySliderView from './../view/PropertySliderView';\nimport PropertyInteger from './PropertyInteger';\nimport PropertyIntegerView from './../view/PropertyIntegerView';\nimport PropertyView from './../view/PropertyView';\n\nexport default Backbone.Collection.extend(TypeableCollection).extend({\n types: [\n {\n id: 'stack',\n model: PropertyStack,\n view: PropertyStackView,\n isType(value) {\n if (value && value.type == 'stack') {\n return value;\n }\n }\n },\n {\n id: 'composite',\n model: PropertyComposite,\n view: PropertyCompositeView,\n isType(value) {\n if (value && value.type == 'composite') {\n return value;\n }\n }\n },\n {\n id: 'file',\n model: Property,\n view: PropertyFileView,\n isType(value) {\n if (value && value.type == 'file') {\n return value;\n }\n }\n },\n {\n id: 'color',\n model: Property,\n view: PropertyColorView,\n isType(value) {\n if (value && value.type == 'color') {\n return value;\n }\n }\n },\n {\n id: 'select',\n model: PropertySelect,\n view: PropertySelectView,\n isType(value) {\n if (value && value.type == 'select') {\n return value;\n }\n }\n },\n {\n id: 'radio',\n model: PropertyRadio,\n view: PropertyRadioView,\n isType(value) {\n if (value && value.type == 'radio') {\n return value;\n }\n }\n },\n {\n id: 'slider',\n model: PropertySlider,\n view: PropertySliderView,\n isType(value) {\n if (value && value.type == 'slider') {\n return value;\n }\n }\n },\n {\n id: 'integer',\n model: PropertyInteger,\n view: PropertyIntegerView,\n isType(value) {\n if (value && value.type == 'integer') {\n return value;\n }\n }\n },\n {\n id: 'base',\n model: Property,\n view: PropertyView,\n isType(value) {\n value.type = 'base';\n return value;\n }\n }\n ],\n\n deepClone() {\n const collection = this.clone();\n collection.reset(\n collection.map(model => {\n const cloned = model.clone();\n cloned.typeView = model.typeView;\n return cloned;\n })\n );\n return collection;\n },\n\n /**\n * Parse a value and return an array splitted by properties\n * @param {string} value\n * @return {Array}\n * @return\n */\n parseValue(value) {\n const properties = [];\n const values = value.split(' ');\n values.forEach((value, i) => {\n const property = this.at(i);\n if (!property) return;\n properties.push({ ...property.attributes, ...{ value } });\n });\n return properties;\n },\n\n getFullValue() {\n let result = '';\n this.each(model => (result += `${model.getFullValue()} `));\n return result.trim();\n }\n});\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","import Backbone from 'backbone';\nconst $ = Backbone.$;\n\nexport default {\n /**\n * Start select position event\n * @param {HTMLElement} trg\n * @private\n * */\n startSelectPosition(trg, doc) {\n this.isPointed = false;\n var utils = this.editorModel.get('Utils');\n if (utils && !this.sorter)\n this.sorter = new utils.Sorter({\n container: this.getCanvasBody(),\n placer: this.canvas.getPlacerEl(),\n containerSel: '*',\n itemSel: '*',\n pfx: this.ppfx,\n direction: 'a',\n document: doc,\n wmargin: 1,\n nested: 1,\n em: this.editorModel,\n canvasRelative: 1,\n scale: () => this.em.getZoomDecimal()\n });\n trg && this.sorter.startSort(trg);\n },\n\n /**\n * Get frame position\n * @return {Object}\n * @private\n */\n getOffsetDim() {\n var frameOff = this.offset(this.canvas.getFrameEl());\n var canvasOff = this.offset(this.canvas.getElement());\n var top = frameOff.top - canvasOff.top;\n var left = frameOff.left - canvasOff.left;\n return { top, left };\n },\n\n /**\n * Stop select position event\n * @private\n * */\n stopSelectPosition() {\n this.posTargetCollection = null;\n this.posIndex =\n this.posMethod == 'after' && this.cDim.length !== 0\n ? this.posIndex + 1\n : this.posIndex; //Normalize\n if (this.sorter) {\n this.sorter.moved = 0;\n this.sorter.endMove();\n }\n if (this.cDim) {\n this.posIsLastEl =\n this.cDim.length !== 0 &&\n this.posMethod == 'after' &&\n this.posIndex == this.cDim.length;\n this.posTargetEl =\n this.cDim.length === 0\n ? $(this.outsideElem)\n : !this.posIsLastEl && this.cDim[this.posIndex]\n ? $(this.cDim[this.posIndex][5]).parent()\n : $(this.outsideElem);\n this.posTargetModel = this.posTargetEl.data('model');\n this.posTargetCollection = this.posTargetEl.data('model-comp');\n }\n },\n\n /**\n * Enabel select position\n * @private\n */\n enable() {\n this.startSelectPosition();\n },\n\n /**\n * Check if the pointer is near to the float component\n * @param {number} index\n * @param {string} method\n * @param {Array} dims\n * @return {Boolean}\n * @private\n * */\n nearFloat(index, method, dims) {\n var i = index || 0;\n var m = method || 'before';\n var len = dims.length;\n var isLast = len !== 0 && m == 'after' && i == len;\n if (\n len !== 0 &&\n ((!isLast && !dims[i][4]) ||\n (dims[i - 1] && !dims[i - 1][4]) ||\n (isLast && !dims[i - 1][4]))\n )\n return 1;\n return 0;\n },\n\n run() {\n this.enable();\n },\n\n stop() {\n this.stopSelectPosition();\n this.$wrapper.css('cursor', '');\n this.$wrapper.unbind();\n }\n};\n","import Promise from 'promise-polyfill';\n\nwindow.Promise = window.Promise || Promise;\n\nexport default (typeof fetch == 'function'\n ? fetch.bind()\n : (url, options) => {\n return new Promise((res, rej) => {\n const req = new XMLHttpRequest();\n req.open(options.method || 'get', url);\n req.withCredentials = options.credentials == 'include';\n\n for (let k in options.headers || {}) {\n req.setRequestHeader(k, options.headers[k]);\n }\n\n req.onload = e =>\n res({\n status: req.status,\n statusText: req.statusText,\n text: () => Promise.resolve(req.responseText)\n });\n req.onerror = rej;\n\n // Actually, fetch doesn't support onProgress feature\n if (req.upload && options.onProgress) {\n req.upload.onprogress = options.onProgress;\n }\n\n // Include body only if present\n options.body ? req.send(options.body) : req.send();\n });\n });\n","import { each, isString } from 'underscore';\n\nexport default config => {\n var TEXT_NODE = 'span';\n var c = config;\n var modelAttrStart = 'data-gjs-';\n\n return {\n compTypes: '',\n\n modelAttrStart,\n\n /**\n * Extract component props from an attribute object\n * @param {Object} attr\n * @returns {Object} An object containing props and attributes without them\n */\n splitPropsFromAttr(attr = {}) {\n const props = {};\n const attrs = {};\n\n each(attr, (value, key) => {\n if (key.indexOf(this.modelAttrStart) === 0) {\n const modelAttr = key.replace(modelAttrStart, '');\n const valueLen = value.length;\n const valStr = value && isString(value);\n const firstChar = valStr && value.substr(0, 1);\n const lastChar = valStr && value.substr(valueLen - 1);\n value = value === 'true' ? true : value;\n value = value === 'false' ? false : value;\n\n // Try to parse JSON where it's possible\n // I can get false positive here (eg. a selector '[data-attr]')\n // so put it under try/catch and let fail silently\n try {\n value =\n (firstChar == '{' && lastChar == '}') ||\n (firstChar == '[' && lastChar == ']')\n ? JSON.parse(value)\n : value;\n } catch (e) {}\n\n props[modelAttr] = value;\n } else {\n attrs[key] = value;\n }\n });\n\n return {\n props,\n attrs\n };\n },\n\n /**\n * Parse style string to object\n * @param {string} str\n * @return {Object}\n * @example\n * var stl = ParserHtml.parseStyle('color:black; width:100px; test:value;');\n * console.log(stl);\n * // {color: 'black', width: '100px', test: 'value'}\n */\n parseStyle(str) {\n var result = {};\n var decls = str.split(';');\n for (var i = 0, len = decls.length; i < len; i++) {\n var decl = decls[i].trim();\n if (!decl) continue;\n var prop = decl.split(':');\n result[prop[0].trim()] = prop\n .slice(1)\n .join(':')\n .trim();\n }\n return result;\n },\n\n /**\n * Parse class string to array\n * @param {string} str\n * @return {Array}\n * @example\n * var res = ParserHtml.parseClass('test1 test2 test3');\n * console.log(res);\n * // ['test1', 'test2', 'test3']\n */\n parseClass(str) {\n const result = [];\n const cls = str.split(' ');\n for (let i = 0, len = cls.length; i < len; i++) {\n const cl = cls[i].trim();\n if (!cl) continue;\n result.push(cl);\n }\n return result;\n },\n\n /**\n * Get data from the node element\n * @param {HTMLElement} el DOM element to traverse\n * @return {Array}\n */\n parseNode(el) {\n const result = [];\n const nodes = el.childNodes;\n\n for (var i = 0, len = nodes.length; i < len; i++) {\n const node = nodes[i];\n const attrs = node.attributes || [];\n const attrsLen = attrs.length;\n const nodePrev = result[result.length - 1];\n const nodeChild = node.childNodes.length;\n const ct = this.compTypes;\n let model = {};\n\n // Start with understanding what kind of component it is\n if (ct) {\n let obj = '';\n let type =\n node.getAttribute && node.getAttribute(`${modelAttrStart}type`);\n\n // If the type is already defined, use it\n if (type) {\n model = { type };\n } else {\n // Iterate over all available Component Types and\n // the first with a valid result will be that component\n for (let it = 0; it < ct.length; it++) {\n const compType = ct[it];\n obj = compType.model.isComponent(node);\n\n if (obj) {\n if (typeof obj !== 'object') {\n obj = { type: compType.id };\n }\n break;\n }\n }\n\n model = obj;\n }\n }\n\n // Set tag name if not yet done\n if (!model.tagName) {\n model.tagName = node.tagName ? node.tagName.toLowerCase() : '';\n }\n\n if (attrsLen) {\n model.attributes = {};\n }\n\n // Parse attributes\n for (let j = 0; j < attrsLen; j++) {\n const nodeName = attrs[j].nodeName;\n let nodeValue = attrs[j].nodeValue;\n\n // Isolate attributes\n if (nodeName == 'style') {\n model.style = this.parseStyle(nodeValue);\n } else if (nodeName == 'class') {\n model.classes = this.parseClass(nodeValue);\n } else if (nodeName == 'contenteditable') {\n continue;\n } else if (nodeName.indexOf(modelAttrStart) === 0) {\n const modelAttr = nodeName.replace(modelAttrStart, '');\n const valueLen = nodeValue.length;\n const firstChar = nodeValue && nodeValue.substr(0, 1);\n const lastChar = nodeValue && nodeValue.substr(valueLen - 1);\n nodeValue = nodeValue === 'true' ? true : nodeValue;\n nodeValue = nodeValue === 'false' ? false : nodeValue;\n\n // Try to parse JSON where it's possible\n // I can get false positive here (eg. a selector '[data-attr]')\n // so put it under try/catch and let fail silently\n try {\n nodeValue =\n (firstChar == '{' && lastChar == '}') ||\n (firstChar == '[' && lastChar == ']')\n ? JSON.parse(nodeValue)\n : nodeValue;\n } catch (e) {}\n\n model[modelAttr] = nodeValue;\n } else {\n model.attributes[nodeName] = nodeValue;\n }\n }\n\n // Check for nested elements but avoid it if already provided\n if (nodeChild && !model.components) {\n // Avoid infinite nested text nodes\n const firstChild = node.childNodes[0];\n\n // If there is only one child and it's a TEXTNODE\n // just make it content of the current node\n if (nodeChild === 1 && firstChild.nodeType === 3) {\n !model.type && (model.type = 'text');\n model.content = firstChild.nodeValue;\n } else {\n model.components = this.parseNode(node);\n }\n }\n\n // Check if it's a text node and if could be moved to the prevous model\n if (model.type == 'textnode') {\n if (nodePrev && nodePrev.type == 'textnode') {\n nodePrev.content += model.content;\n continue;\n }\n\n // Throw away empty nodes (keep spaces)\n if (!config.keepEmptyTextNodes) {\n const content = node.nodeValue;\n if (content != ' ' && !content.trim()) {\n continue;\n }\n }\n }\n\n // If all children are texts and there is some textnode the parent should\n // be text too otherwise I'm unable to edit texnodes\n const comps = model.components;\n if (!model.type && comps) {\n let allTxt = 1;\n let foundTextNode = 0;\n\n for (let ci = 0; ci < comps.length; ci++) {\n const comp = comps[ci];\n const cType = comp.type;\n\n if (\n ['text', 'textnode'].indexOf(cType) < 0 &&\n c.textTags.indexOf(comp.tagName) < 0\n ) {\n allTxt = 0;\n break;\n }\n\n if (cType == 'textnode') {\n foundTextNode = 1;\n }\n }\n\n if (allTxt && foundTextNode) {\n model.type = 'text';\n }\n }\n\n // If tagName is still empty and is not a textnode, do not push it\n if (!model.tagName && model.type != 'textnode') {\n continue;\n }\n\n result.push(model);\n }\n\n return result;\n },\n\n /**\n * Parse HTML string to a desired model object\n * @param {string} str HTML string\n * @param {ParserCss} parserCss In case there is style tags inside HTML\n * @return {Object}\n */\n parse(str, parserCss) {\n var config = (c.em && c.em.get('Config')) || {};\n var res = { html: '', css: '' };\n var el = document.createElement('div');\n el.innerHTML = str;\n var scripts = el.querySelectorAll('script');\n var i = scripts.length;\n\n // Remove all scripts\n if (!config.allowScripts) {\n while (i--) scripts[i].parentNode.removeChild(scripts[i]);\n }\n\n // Detach style tags and parse them\n if (parserCss) {\n var styleStr = '';\n var styles = el.querySelectorAll('style');\n var j = styles.length;\n\n while (j--) {\n styleStr = styles[j].innerHTML + styleStr;\n styles[j].parentNode.removeChild(styles[j]);\n }\n\n if (styleStr) res.css = parserCss.parse(styleStr);\n }\n\n var result = this.parseNode(el);\n\n if (result.length == 1) result = result[0];\n\n res.html = result;\n\n return res;\n }\n };\n};\n","import { isFunction } from 'underscore';\nimport Backbone from 'backbone';\n\nconst Model = Backbone.Model;\nconst View = Backbone.View;\n\nexport default {\n types: [],\n\n initialize(models, opts) {\n this.model = (attrs = {}, options = {}) => {\n let Model, View, type;\n\n if (attrs && attrs.type) {\n const baseType = this.getBaseType();\n type = this.getType(attrs.type);\n Model = type ? type.model : baseType.model;\n View = type ? type.view : baseType.view;\n } else {\n const typeFound = this.recognizeType(attrs);\n type = typeFound.type;\n Model = type.model;\n View = type.view;\n attrs = typeFound.attributes;\n }\n\n const model = new Model(attrs, options);\n model.typeView = View;\n return model;\n };\n const init = this.init && this.init.bind(this);\n init && init();\n },\n\n /**\n * Recognize type by any value\n * @param {mixed} value\n * @return {Object} Found type\n */\n recognizeType(value) {\n const types = this.getTypes();\n\n for (let i = 0; i < types.length; i++) {\n const type = types[i];\n let typeFound = type.isType(value);\n typeFound =\n typeof typeFound == 'boolean' && typeFound\n ? { type: type.id }\n : typeFound;\n\n if (typeFound) {\n return {\n type,\n attributes: typeFound\n };\n }\n }\n\n // If, for any reason, the type is not found it'll return the base one\n return {\n type: this.getBaseType(),\n attributes: value\n };\n },\n\n /**\n * Returns the base type (last object in the stack)\n * @return {Object}\n */\n getBaseType() {\n const types = this.getTypes();\n return types[types.length - 1];\n },\n\n /**\n * Get types\n * @return {Array}\n */\n getTypes() {\n return this.types;\n },\n\n /**\n * Get type\n * @param {string} id Type ID\n * @return {Object} Type definition\n */\n getType(id) {\n const types = this.getTypes();\n\n for (let i = 0; i < types.length; i++) {\n const type = types[i];\n if (type.id === id) {\n return type;\n }\n }\n },\n\n /**\n * Add new type\n * @param {string} id Type ID\n * @param {Object} definition Definition of the type. Each definition contains\n * `model` (business logic), `view` (presentation logic)\n * and `isType` function which recognize the type of the\n * passed entity\n * addType('my-type', {\n * model: {},\n * view: {},\n * isType: (value) => {},\n * })\n */\n addType(id, definition) {\n const type = this.getType(id);\n const baseType = this.getBaseType();\n const ModelInst = type ? type.model : baseType.model;\n const ViewInst = type ? type.view : baseType.view;\n let { model, view, isType } = definition;\n model =\n model instanceof Model || isFunction(model)\n ? model\n : ModelInst.extend(model || {});\n view =\n view instanceof View || isFunction(view)\n ? view\n : ViewInst.extend(view || {});\n\n if (type) {\n type.model = model;\n type.view = view;\n type.isType = isType || type.isType;\n } else {\n definition.id = id;\n definition.model = model;\n definition.view = view;\n definition.isType =\n isType ||\n function(value) {\n if (value && value.type == id) {\n return true;\n }\n };\n this.getTypes().unshift(definition);\n }\n }\n};\n","import Backbone from 'backbone';\nimport { bindAll, isUndefined, indexOf } from 'underscore';\nimport { on, off } from 'utils/mixins';\nimport Input from './Input';\n\nconst $ = Backbone.$;\n\nexport default Input.extend({\n events: {\n 'change input': 'handleChange',\n 'change select': 'handleUnitChange',\n 'click [data-arrow-up]': 'upArrowClick',\n 'click [data-arrow-down]': 'downArrowClick',\n 'mousedown [data-arrows]': 'downIncrement'\n },\n\n template() {\n const ppfx = this.ppfx;\n return `\n \n \n
\n
\n
\n
\n `;\n },\n\n inputClass() {\n const ppfx = this.ppfx;\n return this.opts.contClass || `${ppfx}field ${ppfx}field-integer`;\n },\n\n initialize(opts = {}) {\n Input.prototype.initialize.apply(this, arguments);\n bindAll(this, 'moveIncrement', 'upIncrement');\n this.doc = document;\n this.listenTo(this.model, 'change:unit', this.handleModelChange);\n },\n\n /**\n * Set value to the model\n * @param {string} value\n * @param {Object} opts\n */\n setValue(value, opts) {\n var opt = opts || {};\n var valid = this.validateInputValue(value, { deepCheck: 1 });\n var validObj = { value: valid.value };\n\n // If found some unit value\n if (valid.unit || valid.force) {\n validObj.unit = valid.unit;\n }\n\n this.model.set(validObj, opt);\n\n // Generally I get silent when I need to reflect data to view without\n // reupdating the target\n if (opt.silent) {\n this.handleModelChange();\n }\n },\n\n /**\n * Handled when the view is changed\n */\n handleChange(e) {\n e.stopPropagation();\n this.setValue(this.getInputEl().value);\n this.elementUpdated();\n },\n\n /**\n * Handled when the view is changed\n */\n handleUnitChange(e) {\n e.stopPropagation();\n var value = this.getUnitEl().value;\n this.model.set('unit', value);\n this.elementUpdated();\n },\n\n /**\n * Fired when the element of the property is updated\n */\n elementUpdated() {\n this.model.trigger('el:change');\n },\n\n /**\n * Updates the view when the model is changed\n * */\n handleModelChange() {\n const model = this.model;\n this.getInputEl().value = model.get('value');\n const unitEl = this.getUnitEl();\n unitEl && (unitEl.value = model.get('unit') || '');\n },\n\n /**\n * Get the unit element\n * @return {HTMLElement}\n */\n getUnitEl() {\n if (!this.unitEl) {\n const model = this.model;\n const units = model.get('units') || [];\n\n if (units.length) {\n const options = [];\n\n units.forEach(unit => {\n const selected = unit == model.get('unit') ? 'selected' : '';\n options.push(``);\n });\n\n const temp = document.createElement('div');\n temp.innerHTML = ``;\n this.unitEl = temp.firstChild;\n }\n }\n\n return this.unitEl;\n },\n\n /**\n * Invoked when the up arrow is clicked\n * */\n upArrowClick() {\n const model = this.model;\n const step = model.get('step');\n let value = parseInt(model.get('value'), 10);\n value = this.normalizeValue(value + step);\n var valid = this.validateInputValue(value);\n model.set('value', valid.value);\n this.elementUpdated();\n },\n\n /**\n * Invoked when the down arrow is clicked\n * */\n downArrowClick() {\n const model = this.model;\n const step = model.get('step');\n const value = parseInt(model.get('value'), 10);\n const val = this.normalizeValue(value - step);\n var valid = this.validateInputValue(val);\n model.set('value', valid.value);\n this.elementUpdated();\n },\n\n /**\n * Change easily integer input value with click&drag method\n * @param Event\n *\n * @return void\n * */\n downIncrement(e) {\n e.preventDefault();\n this.moved = 0;\n var value = this.model.get('value');\n value = this.normalizeValue(value);\n this.current = { y: e.pageY, val: value };\n on(this.doc, 'mousemove', this.moveIncrement);\n on(this.doc, 'mouseup', this.upIncrement);\n },\n\n /** While the increment is clicked, moving the mouse will update input value\n * @param Object\n *\n * @return bool\n * */\n moveIncrement(ev) {\n this.moved = 1;\n const model = this.model;\n const step = model.get('step');\n const data = this.current;\n var pos = this.normalizeValue(data.val + (data.y - ev.pageY) * step);\n this.prValue = this.validateInputValue(pos).value;\n model.set('value', this.prValue, { avoidStore: 1 });\n return false;\n },\n\n /**\n * Stop moveIncrement method\n * */\n upIncrement() {\n const model = this.model;\n const step = model.get('step');\n off(this.doc, 'mouseup', this.upIncrement);\n off(this.doc, 'mousemove', this.moveIncrement);\n\n if (this.prValue && this.moved) {\n var value = this.prValue - step;\n model.set('value', value, { avoidStore: 1 }).set('value', value + step);\n this.elementUpdated();\n }\n },\n\n normalizeValue(value, defValue = 0) {\n const model = this.model;\n const step = model.get('step');\n let stepDecimals = 0;\n\n if (isNaN(value)) {\n return defValue;\n }\n\n value = parseFloat(value);\n\n if (Math.floor(value) !== value) {\n const side = step.toString().split('.')[1];\n stepDecimals = side ? side.length : 0;\n }\n\n return stepDecimals ? parseFloat(value.toFixed(stepDecimals)) : value;\n },\n\n /**\n * Validate input value\n * @param {String} value Raw value\n * @param {Object} opts Options\n * @return {Object} Validated string\n */\n validateInputValue(value, opts) {\n var force = 0;\n var opt = opts || {};\n var model = this.model;\n const defValue = ''; //model.get('defaults');\n var val = !isUndefined(value) ? value : defValue;\n var units = model.get('units') || [];\n var unit = model.get('unit') || (units.length && units[0]) || '';\n var max = model.get('max');\n var min = model.get('min');\n\n if (opt.deepCheck) {\n var fixed = model.get('fixedValues') || [];\n\n if (val) {\n // If the value is one of the fixed values I leave it as it is\n var regFixed = new RegExp('^' + fixed.join('|'), 'g');\n if (fixed.length && regFixed.test(val)) {\n val = val.match(regFixed)[0];\n unit = '';\n force = 1;\n } else {\n var valCopy = val + '';\n val += ''; // Make it suitable for replace\n val = parseFloat(val.replace(',', '.'));\n val = !isNaN(val) ? val : defValue;\n var uN = valCopy.replace(val, '');\n // Check if exists as unit\n if (indexOf(units, uN) >= 0) unit = uN;\n }\n }\n }\n\n if (!isUndefined(max) && max !== '') val = val > max ? max : val;\n if (!isUndefined(min) && min !== '') val = val < min ? min : val;\n\n return {\n force,\n value: val,\n unit\n };\n },\n\n render() {\n Input.prototype.render.call(this);\n this.unitEl = null;\n const unit = this.getUnitEl();\n unit &&\n this.$el\n .find(`.${this.ppfx}field-units`)\n .get(0)\n .appendChild(unit);\n return this;\n }\n});\n","import Backbone from 'backbone';\n\nexport default Backbone.View.extend({\n // Default view\n itemView: '',\n\n // Defines the View per type\n itemsView: '',\n\n itemType: 'type',\n\n initialize(opts, config) {\n this.config = config || {};\n },\n\n /**\n * Add new model to the collection\n * @param {Model} model\n * @private\n * */\n addTo(model) {\n this.add(model);\n },\n\n itemViewNotFound(type) {\n const { config, ns } = this;\n const { em } = config;\n const warn = `${ns ? `[${ns}]: ` : ''}'${type}' type not found`;\n em && em.logWarning(warn);\n },\n\n /**\n * Render new model inside the view\n * @param {Model} model\n * @param {Object} fragment Fragment collection\n * @private\n * */\n add(model, fragment) {\n const { config, reuseView, itemsView = {} } = this;\n var frag = fragment || null;\n var itemView = this.itemView;\n var typeField = model.get(this.itemType);\n let view;\n\n if (itemsView[typeField]) {\n itemView = itemsView[typeField];\n } else if (typeField && !itemsView[typeField]) {\n this.itemViewNotFound(typeField);\n }\n\n if (model.view && reuseView) {\n view = model.view;\n } else {\n view = new itemView({ model, config }, config);\n }\n\n var rendered = view.render().el;\n\n if (frag) frag.appendChild(rendered);\n else this.$el.append(rendered);\n },\n\n render() {\n var frag = document.createDocumentFragment();\n this.$el.empty();\n\n if (this.collection.length)\n this.collection.each(function(model) {\n this.add(model, frag);\n }, this);\n\n this.$el.append(frag);\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport { isUndefined } from 'underscore';\n\nexport default Backbone.View.extend({\n initialize(o) {\n this.opts = o || {};\n this.config = o.config || {};\n const coll = this.collection;\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.resetChildren);\n this.listenTo(coll, 'remove', this.removeChildren);\n },\n\n removeChildren(removed, coll, opts = {}) {\n const em = this.config.em;\n const view = removed.view;\n const tempComp = removed.opt.temporary;\n const tempRemove = opts.temporary;\n if (!view) return;\n view.remove.apply(view);\n const { childrenView, scriptContainer } = view;\n childrenView && childrenView.stopListening();\n scriptContainer && scriptContainer.remove();\n removed.components().forEach(it => this.removeChildren(it, coll, opts));\n\n if (em && !tempRemove) {\n // Remove the component from the global list\n const id = removed.getId();\n const domc = em.get('DomComponents');\n delete domc.componentsById[id];\n\n // Remove all related CSS rules\n const allRules = em.get('CssComposer').getAll();\n allRules.remove(\n allRules.filter(\n rule => rule.getSelectors().getFullString() === `#${id}`\n )\n );\n\n if (!tempComp) {\n const cm = em.get('Commands');\n const hasSign = removed.get('style-signature');\n const optStyle = { target: removed };\n hasSign && cm.run('core:component-style-clear', optStyle);\n removed.removed();\n em.trigger('component:remove', removed);\n }\n }\n },\n\n /**\n * Add to collection\n * @param {Model} model\n * @param {Collection} coll\n * @param {Object} opts\n * @private\n * */\n addTo(model, coll = {}, opts = {}) {\n const em = this.config.em;\n const i = this.collection.indexOf(model);\n this.addToCollection(model, null, i);\n\n if (em && !opts.temporary) {\n const triggerAdd = model => {\n em.trigger('component:add', model);\n model.components().forEach(comp => triggerAdd(comp));\n };\n triggerAdd(model);\n }\n },\n\n /**\n * Add new object to collection\n * @param {Object} Model\n * @param {Object} Fragment collection\n * @param {Integer} Index of append\n *\n * @return {Object} Object rendered\n * @private\n * */\n addToCollection(model, fragmentEl, index) {\n if (!this.compView) this.compView = require('./ComponentView').default;\n const { config, opts } = this;\n const fragment = fragmentEl || null;\n const dt = opts.componentTypes;\n const type = model.get('type');\n let viewObject = this.compView;\n\n for (let it = 0; it < dt.length; it++) {\n if (dt[it].id == type) {\n viewObject = dt[it].view;\n break;\n }\n }\n\n const view = new viewObject({\n model,\n config,\n componentTypes: dt\n });\n let rendered = view.render().el;\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n const parent = this.parentEl;\n const children = parent.childNodes;\n\n if (!isUndefined(index)) {\n const lastIndex = children.length == index;\n\n // If the added model is the last of collection\n // need to change the logic of append\n if (lastIndex) {\n index--;\n }\n\n // In case the added is new in the collection index will be -1\n if (lastIndex || !children.length) {\n parent.appendChild(rendered);\n } else {\n parent.insertBefore(rendered, children[index]);\n }\n } else {\n parent.appendChild(rendered);\n }\n }\n\n return rendered;\n },\n\n resetChildren() {\n this.parentEl.innerHTML = '';\n this.collection.each(model => this.addToCollection(model));\n },\n\n render(parent) {\n const el = this.el;\n const frag = document.createDocumentFragment();\n this.parentEl = parent || this.el;\n this.collection.each(model => this.addToCollection(model, frag));\n el.innerHTML = '';\n el.appendChild(frag);\n return this;\n }\n});\n","import { isUndefined, isString } from 'underscore';\nimport { getModel } from 'utils/mixins';\nimport Backbone from 'backbone';\nimport ComponentView from 'dom_components/view/ComponentView';\n\nconst inputProp = 'contentEditable';\nconst $ = Backbone.$;\nlet ItemsView;\n\nexport default Backbone.View.extend({\n events: {\n 'mousedown [data-toggle-move]': 'startSort',\n 'touchstart [data-toggle-move]': 'startSort',\n 'click [data-toggle-visible]': 'toggleVisibility',\n 'click [data-toggle-select]': 'handleSelect',\n 'mouseover [data-toggle-select]': 'handleHover',\n 'click [data-toggle-open]': 'toggleOpening',\n 'dblclick [data-name]': 'handleEdit',\n 'focusout [data-name]': 'handleEditEnd'\n },\n\n template(model) {\n const { pfx, ppfx, config, clsNoEdit } = this;\n const { hidable } = config;\n const count = this.countChildren(model);\n const addClass = !count ? this.clsNoChild : '';\n const clsTitle = `${this.clsTitle} ${addClass}`;\n const clsTitleC = `${this.clsTitleC} ${ppfx}one-bg`;\n const clsCaret = `${this.clsCaret} fa fa-chevron-right`;\n const clsInput = `${this.inputNameCls} ${clsNoEdit} ${ppfx}no-app`;\n const level = this.level + 1;\n const gut = `${30 + level * 10}px`;\n const name = model.getName();\n const icon = model.getIcon();\n const clsBase = `${pfx}layer`;\n\n return `\n ${\n hidable\n ? ``\n : ''\n }\n
\n
\n
\n \n ${icon ? `${icon}` : ''}\n ${name}\n
\n
\n
\n
${count || ''}
\n
\n \n
\n
`;\n },\n\n initialize(o = {}) {\n this.opt = o;\n this.level = o.level;\n this.config = o.config;\n this.em = o.config.em;\n this.ppfx = this.em.get('Config').stylePrefix;\n this.sorter = o.sorter || '';\n this.pfx = this.config.stylePrefix;\n this.parentView = o.parentView;\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const model = this.model;\n const components = model.get('components');\n const type = model.get('type') || 'default';\n model.set('open', false);\n this.listenTo(components, 'remove add reset', this.checkChildren);\n this.listenTo(model, 'change:status', this.updateStatus);\n this.listenTo(model, 'change:open', this.updateOpening);\n this.listenTo(model, 'change:layerable', this.updateLayerable);\n this.listenTo(model, 'change:style:display', this.updateVisibility);\n this.className = `${pfx}layer ${pfx}layer__t-${type} no-select ${ppfx}two-color`;\n this.inputNameCls = `${ppfx}layer-name`;\n this.clsTitleC = `${pfx}layer-title-c`;\n this.clsTitle = `${pfx}layer-title`;\n this.clsCaret = `${pfx}layer-caret`;\n this.clsCount = `${pfx}layer-count`;\n this.clsMove = `${pfx}layer-move`;\n this.clsChildren = `${pfx}layer-children`;\n this.clsNoChild = `${pfx}layer-no-chld`;\n this.clsEdit = `${this.inputNameCls}--edit`;\n this.clsNoEdit = `${this.inputNameCls}--no-edit`;\n this.$el.data('model', model);\n this.$el.data('collection', components);\n model.viewLayer = this;\n },\n\n getVisibilityEl() {\n if (!this.eyeEl) {\n this.eyeEl = this.$el.children(`.${this.pfx}layer-vis`);\n }\n\n return this.eyeEl;\n },\n\n updateVisibility() {\n const pfx = this.pfx;\n const model = this.model;\n const hClass = `${pfx}layer-hidden`;\n const hideIcon = 'fa-eye-slash';\n const hidden = model.getStyle().display == 'none';\n const method = hidden ? 'addClass' : 'removeClass';\n this.$el[method](hClass);\n this.getVisibilityEl()[method](hideIcon);\n },\n\n /**\n * Toggle visibility\n * @param\tEvent\n *\n * @return \tvoid\n * */\n toggleVisibility(e) {\n e && e.stopPropagation();\n const model = this.model;\n const style = model.getStyle();\n const hidden = style.display == 'none';\n\n if (hidden) {\n delete style.display;\n } else {\n style.display = 'none';\n }\n\n model.setStyle(style);\n },\n\n /**\n * Handle the edit of the component name\n */\n handleEdit(e) {\n e && e.stopPropagation();\n const { em, $el, clsNoEdit, clsEdit } = this;\n const inputEl = this.getInputName();\n inputEl[inputProp] = true;\n inputEl.focus();\n em && em.setEditing(1);\n $el\n .find(`.${this.inputNameCls}`)\n .removeClass(clsNoEdit)\n .addClass(clsEdit);\n },\n\n /**\n * Handle with the end of editing of the component name\n */\n handleEditEnd(e) {\n e && e.stopPropagation();\n const { em, $el, clsNoEdit, clsEdit } = this;\n const inputEl = this.getInputName();\n const name = inputEl.textContent;\n inputEl.scrollLeft = 0;\n inputEl[inputProp] = false;\n this.model.set({ 'custom-name': name });\n em && em.setEditing(0);\n $el\n .find(`.${this.inputNameCls}`)\n .addClass(clsNoEdit)\n .removeClass(clsEdit);\n },\n\n /**\n * Get the input containing the name of the component\n * @return {HTMLElement}\n */\n getInputName() {\n if (!this.inputName) {\n this.inputName = this.el.querySelector(`.${this.inputNameCls}`);\n }\n return this.inputName;\n },\n\n /**\n * Update item opening\n *\n * @return void\n * */\n updateOpening() {\n var opened = this.opt.opened || {};\n var model = this.model;\n const chvDown = 'fa-chevron-down';\n\n if (model.get('open')) {\n this.$el.addClass('open');\n this.getCaret().addClass(chvDown);\n opened[model.cid] = model;\n } else {\n this.$el.removeClass('open');\n this.getCaret().removeClass(chvDown);\n delete opened[model.cid];\n }\n },\n\n /**\n * Toggle item opening\n * @param {Object}\te\n *\n * @return void\n * */\n toggleOpening(e) {\n e.stopPropagation();\n\n if (!this.model.get('components').length) return;\n\n this.model.set('open', !this.model.get('open'));\n },\n\n /**\n * Handle component selection\n */\n handleSelect(e) {\n e.stopPropagation();\n const { em, config } = this;\n\n if (em) {\n const model = this.model;\n em.setSelected(model, { fromLayers: 1 });\n const scroll = config.scrollCanvas;\n scroll && em.get('Canvas').scrollTo(model, scroll);\n }\n },\n\n /**\n * Handle component selection\n */\n handleHover(e) {\n e.stopPropagation();\n const { em, config, model } = this;\n em && config.showHover && em.setHovered(model, { fromLayers: 1 });\n },\n\n /**\n * Delegate to sorter\n * @param\tEvent\n * */\n startSort(e) {\n e.stopPropagation();\n const sorter = this.sorter;\n // Right or middel click\n if (e.button && e.button !== 0) return;\n sorter && sorter.startSort(e.target);\n },\n\n /**\n * Freeze item\n * @return\tvoid\n * */\n freeze() {\n this.$el.addClass(this.pfx + 'opac50');\n this.model.set('open', 0);\n },\n\n /**\n * Unfreeze item\n * @return\tvoid\n * */\n unfreeze() {\n this.$el.removeClass(this.pfx + 'opac50');\n },\n\n /**\n * Update item on status change\n * @param\tEvent\n * */\n updateStatus(e) {\n ComponentView.prototype.updateStatus.apply(this, [\n {\n avoidHover: !this.config.highlightHover\n }\n ]);\n },\n\n /**\n * Check if component is visible\n *\n * @return bool\n * */\n isVisible() {\n var css = this.model.get('style'),\n pr = css.display;\n if (pr && pr == 'none') return;\n return 1;\n },\n\n /**\n * Update item aspect after children changes\n *\n * @return void\n * */\n checkChildren() {\n const { model, clsNoChild } = this;\n const count = this.countChildren(model);\n const title = this.$el\n .children(`.${this.clsTitleC}`)\n .children(`.${this.clsTitle}`);\n let { cnt } = this;\n\n if (!cnt) {\n cnt = this.$el.children('[data-count]').get(0);\n this.cnt = cnt;\n }\n\n title[count ? 'removeClass' : 'addClass'](clsNoChild);\n if (cnt) cnt.innerHTML = count || '';\n !count && model.set('open', 0);\n },\n\n /**\n * Count children inside model\n * @param {Object} model\n * @return {number}\n * @private\n */\n countChildren(model) {\n var count = 0;\n model.get('components').each(function(m) {\n var isCountable = this.opt.isCountable;\n var hide = this.config.hideTextnode;\n if (isCountable && !isCountable(m, hide)) return;\n count++;\n }, this);\n return count;\n },\n\n getCaret() {\n if (!this.caret || !this.caret.length) {\n const pfx = this.pfx;\n this.caret = this.$el\n .children(`.${this.clsTitleC}`)\n .find(`.${this.clsCaret}`);\n }\n\n return this.caret;\n },\n\n setRoot(el) {\n el = isString(el) ? this.em.getWrapper().find(el)[0] : el;\n const model = getModel(el, $);\n if (!model) return;\n this.stopListening();\n this.model = model;\n this.initialize(this.opt);\n this.render();\n },\n\n updateLayerable() {\n const { parentView } = this;\n const toRerender = parentView || this;\n toRerender.render();\n },\n\n render() {\n const { model, config, pfx, ppfx, opt } = this;\n const { isCountable } = opt;\n const hidden = isCountable && !isCountable(model, config.hideTextnode);\n const vis = this.isVisible();\n const el = this.$el.empty();\n const level = this.level + 1;\n\n if (isUndefined(ItemsView)) {\n ItemsView = require('./ItemsView').default;\n }\n\n const children = new ItemsView({\n collection: model.get('components'),\n config: this.config,\n sorter: this.sorter,\n opened: this.opt.opened,\n parentView: this,\n parent: model,\n level\n }).render().$el;\n\n if (!this.config.showWrapper && level === 1) {\n el.append(children);\n } else {\n el.html(this.template(model));\n el.find(`.${this.clsChildren}`).append(children);\n }\n\n if (!model.get('draggable') || !this.config.sortable) {\n el.children(`.${this.clsMove}`).remove();\n }\n\n !vis && (this.className += ` ${pfx}hide`);\n hidden && (this.className += ` ${ppfx}hidden`);\n el.attr('class', this.className);\n this.updateOpening();\n this.updateStatus();\n this.updateVisibility();\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport { isUndefined } from 'underscore';\nimport ColorPicker from 'utils/ColorPicker';\nimport Input from './Input';\n\nconst $ = Backbone.$;\nColorPicker($);\n\nexport default Input.extend({\n template() {\n const ppfx = this.ppfx;\n return `\n
\n
\n
\n
\n
\n
\n `;\n },\n\n inputClass() {\n const ppfx = this.ppfx;\n return `${ppfx}field ${ppfx}field-color`;\n },\n\n holderClass() {\n return `${this.ppfx}input-holder`;\n },\n\n /**\n * Set value to the model\n * @param {string} val\n * @param {Object} opts\n */\n setValue(val, opts = {}) {\n const model = this.model;\n const def = model.get('defaults');\n const value = !isUndefined(val) ? val : !isUndefined(def) ? def : '';\n const inputEl = this.getInputEl();\n const colorEl = this.getColorEl();\n const valueClr = value != 'none' ? value : '';\n inputEl.value = value;\n colorEl.get(0).style.backgroundColor = valueClr;\n\n // This prevents from adding multiple thumbs in spectrum\n if (opts.fromTarget) {\n colorEl.spectrum('set', valueClr);\n this.noneColor = value == 'none';\n }\n },\n\n /**\n * Get the color input element\n * @return {HTMLElement}\n */\n getColorEl() {\n if (!this.colorEl) {\n const self = this;\n const ppfx = this.ppfx;\n var model = this.model;\n\n var colorEl = $(`
`);\n var cpStyle = colorEl.get(0).style;\n var elToAppend = this.em && this.em.config ? this.em.config.el : '';\n var colorPickerConfig =\n (this.em && this.em.getConfig && this.em.getConfig('colorPicker')) ||\n {};\n const getColor = color => {\n let cl =\n color.getAlpha() == 1 ? color.toHexString() : color.toRgbString();\n return cl.replace(/ /g, '');\n };\n\n let changed = 0;\n let previousColor;\n this.$el.find(`[data-colorp-c]`).append(colorEl);\n colorEl.spectrum({\n containerClassName: `${ppfx}one-bg ${ppfx}two-color`,\n appendTo: elToAppend || 'body',\n maxSelectionSize: 8,\n showPalette: true,\n showAlpha: true,\n chooseText: 'Ok',\n cancelText: '⨯',\n palette: [],\n\n // config expanded here so that the functions below are not overridden\n ...colorPickerConfig,\n\n move(color) {\n const cl = getColor(color);\n cpStyle.backgroundColor = cl;\n model.setValueFromInput(cl, 0);\n },\n change(color) {\n changed = 1;\n const cl = getColor(color);\n cpStyle.backgroundColor = cl;\n model.setValueFromInput(cl);\n self.noneColor = 0;\n },\n show(color) {\n changed = 0;\n previousColor = getColor(color);\n },\n hide(color) {\n if (!changed && previousColor) {\n if (self.noneColor) {\n previousColor = '';\n }\n cpStyle.backgroundColor = previousColor;\n colorEl.spectrum('set', previousColor);\n model.setValueFromInput(previousColor, 0);\n }\n }\n });\n\n this.colorEl = colorEl;\n }\n return this.colorEl;\n },\n\n render() {\n Input.prototype.render.call(this);\n // This will make the color input available on render\n this.getColorEl();\n return this;\n }\n});\n","// Without jquery I have to update few stuff\n//\n// Spectrum Colorpicker v1.8.0\n// https://github.com/bgrins/spectrum\n// Author: Brian Grinstead\n// License: MIT\n\nexport default function($, undefined) {\n 'use strict';\n\n var defaultOpts = {\n // Callbacks\n beforeShow: noop,\n move: noop,\n change: noop,\n show: noop,\n hide: noop,\n\n // Options\n color: false,\n flat: false,\n showInput: false,\n allowEmpty: false,\n showButtons: true,\n clickoutFiresChange: true,\n showInitial: false,\n showPalette: false,\n showPaletteOnly: false,\n hideAfterPaletteSelect: false,\n togglePaletteOnly: false,\n showSelectionPalette: true,\n localStorageKey: false,\n appendTo: 'body',\n maxSelectionSize: 7,\n cancelText: 'cancel',\n chooseText: 'choose',\n togglePaletteMoreText: 'more',\n togglePaletteLessText: 'less',\n clearText: 'Clear Color Selection',\n noColorSelectedText: 'No Color Selected',\n preferredFormat: false,\n className: '', // Deprecated - use containerClassName and replacerClassName instead.\n containerClassName: '',\n replacerClassName: '',\n showAlpha: false,\n theme: 'sp-light',\n palette: [\n [\n '#ffffff',\n '#000000',\n '#ff0000',\n '#ff8000',\n '#ffff00',\n '#008000',\n '#0000ff',\n '#4b0082',\n '#9400d3'\n ]\n ],\n selectionPalette: [],\n disabled: false,\n offset: null\n },\n spectrums = [],\n IE = !!/msie/i.exec(window.navigator.userAgent),\n rgbaSupport = (function() {\n function contains(str, substr) {\n return !!~('' + str).indexOf(substr);\n }\n\n var elem = document.createElement('div');\n var style = elem.style;\n style.cssText = 'background-color:rgba(0,0,0,.5)';\n return (\n contains(style.backgroundColor, 'rgba') ||\n contains(style.backgroundColor, 'hsla')\n );\n })(),\n replaceInput = [\n \"
\",\n \"
\",\n \"
\",\n '
'\n ].join(''),\n markup = (function() {\n // IE does not support gradients with multiple stops, so we need to simulate\n // that for the rainbow slider with 8 divs that each have a single gradient\n var gradientFix = '';\n if (IE) {\n for (var i = 1; i <= 6; i++) {\n gradientFix += \"
\";\n }\n }\n\n return [\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n \"\",\n '
',\n '
',\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n \"
\",\n '
',\n '
',\n '
',\n \"
\",\n '
',\n \"
\",\n \"
\",\n gradientFix,\n '
',\n '
',\n \"
\",\n '
',\n \"
\",\n \"\",\n '
',\n \"
\",\n \"
\",\n \"\",\n \"\",\n '
',\n '
',\n '
'\n ].join('');\n })();\n\n function paletteTemplate(p, color, className, opts) {\n var html = [];\n for (var i = 0; i < p.length; i++) {\n var current = p[i];\n if (current) {\n var tiny = tinycolor(current);\n var c =\n tiny.toHsl().l < 0.5\n ? 'sp-thumb-el sp-thumb-dark'\n : 'sp-thumb-el sp-thumb-light';\n c += tinycolor.equals(color, current) ? ' sp-thumb-active' : '';\n var formattedString = tiny.toString(opts.preferredFormat || 'rgb');\n var swatchStyle = rgbaSupport\n ? 'background-color:' + tiny.toRgbString()\n : 'filter:' + tiny.toFilter();\n html.push(\n ''\n );\n } else {\n var cls = 'sp-clear-display';\n html.push(\n $('
')\n .append(\n $(\n ''\n ).attr('title', opts.noColorSelectedText)\n )\n .html()\n );\n }\n }\n return \"
\" + html.join('') + '
';\n }\n\n function hideAll() {\n for (var i = 0; i < spectrums.length; i++) {\n if (spectrums[i]) {\n spectrums[i].hide();\n }\n }\n }\n\n function instanceOptions(o, callbackContext) {\n var opts = $.extend({}, defaultOpts, o);\n opts.callbacks = {\n move: bind(opts.move, callbackContext),\n change: bind(opts.change, callbackContext),\n show: bind(opts.show, callbackContext),\n hide: bind(opts.hide, callbackContext),\n beforeShow: bind(opts.beforeShow, callbackContext)\n };\n return opts;\n }\n\n function spectrum(element, o) {\n var opts = instanceOptions(o, element),\n flat = opts.flat,\n showSelectionPalette = opts.showSelectionPalette,\n localStorageKey = opts.localStorageKey,\n theme = opts.theme,\n callbacks = opts.callbacks,\n resize = throttle(reflow, 10),\n visible = false,\n isDragging = false,\n dragWidth = 0,\n dragHeight = 0,\n dragHelperHeight = 0,\n slideHeight = 0,\n slideWidth = 0,\n alphaWidth = 0,\n alphaSlideHelperWidth = 0,\n slideHelperHeight = 0,\n currentHue = 0,\n currentSaturation = 0,\n currentValue = 0,\n currentAlpha = 1,\n palette = [],\n paletteArray = [],\n paletteLookup = {},\n selectionPalette = opts.selectionPalette.slice(0),\n maxSelectionSize = opts.maxSelectionSize,\n draggingClass = 'sp-dragging',\n shiftMovementDirection = null;\n\n var doc = element.ownerDocument,\n body = doc.body,\n boundElement = $(element),\n disabled = false,\n container = $(markup, doc).addClass(theme),\n pickerContainer = container.find('.sp-picker-container'),\n dragger = container.find('.sp-color'),\n dragHelper = container.find('.sp-dragger'),\n slider = container.find('.sp-hue'),\n slideHelper = container.find('.sp-slider'),\n alphaSliderInner = container.find('.sp-alpha-inner'),\n alphaSlider = container.find('.sp-alpha'),\n alphaSlideHelper = container.find('.sp-alpha-handle'),\n textInput = container.find('.sp-input'),\n paletteContainer = container.find('.sp-palette'),\n initialColorContainer = container.find('.sp-initial'),\n cancelButton = container.find('.sp-cancel'),\n clearButton = container.find('.sp-clear'),\n chooseButton = container.find('.sp-choose'),\n toggleButton = container.find('.sp-palette-toggle'),\n isInput = boundElement.is('input'),\n isInputTypeColor =\n isInput &&\n boundElement.attr('type') === 'color' &&\n inputTypeColorSupport(),\n shouldReplace = isInput && !flat,\n replacer = shouldReplace\n ? $(replaceInput)\n .addClass(theme)\n .addClass(opts.className)\n .addClass(opts.replacerClassName)\n : $([]),\n offsetElement = shouldReplace ? replacer : boundElement,\n previewElement = replacer.find('.sp-preview-inner'),\n initialColor = opts.color || (isInput && boundElement.val()),\n colorOnShow = false,\n currentPreferredFormat = opts.preferredFormat,\n clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange,\n isEmpty = !initialColor,\n allowEmpty = opts.allowEmpty && !isInputTypeColor;\n\n function applyOptions() {\n if (opts.showPaletteOnly) {\n opts.showPalette = true;\n }\n\n toggleButton.text(\n opts.showPaletteOnly\n ? opts.togglePaletteMoreText\n : opts.togglePaletteLessText\n );\n\n if (opts.palette) {\n palette = opts.palette.slice(0);\n paletteArray = $.isArray(palette[0]) ? palette : [palette];\n paletteLookup = {};\n for (var i = 0; i < paletteArray.length; i++) {\n for (var j = 0; j < paletteArray[i].length; j++) {\n var rgb = tinycolor(paletteArray[i][j]).toRgbString();\n paletteLookup[rgb] = true;\n }\n }\n }\n\n container.toggleClass('sp-flat', flat);\n container.toggleClass('sp-input-disabled', !opts.showInput);\n container.toggleClass('sp-alpha-enabled', opts.showAlpha);\n container.toggleClass('sp-clear-enabled', allowEmpty);\n container.toggleClass('sp-buttons-disabled', !opts.showButtons);\n container.toggleClass(\n 'sp-palette-buttons-disabled',\n !opts.togglePaletteOnly\n );\n container.toggleClass('sp-palette-disabled', !opts.showPalette);\n container.toggleClass('sp-palette-only', opts.showPaletteOnly);\n container.toggleClass('sp-initial-disabled', !opts.showInitial);\n container.addClass(opts.className).addClass(opts.containerClassName);\n\n reflow();\n }\n\n function initialize() {\n if (IE) {\n container.find('*:not(input)').attr('unselectable', 'on');\n }\n\n applyOptions();\n\n if (shouldReplace) {\n boundElement.after(replacer).hide();\n }\n\n if (!allowEmpty) {\n clearButton.hide();\n }\n\n if (flat) {\n boundElement.after(container).hide();\n } else {\n var appendTo =\n opts.appendTo === 'parent' ? boundElement.parent() : $(opts.appendTo);\n if (appendTo.length !== 1) {\n appendTo = $('body');\n }\n\n appendTo.append(container);\n }\n\n updateSelectionPaletteFromStorage();\n\n offsetElement.bind('click.spectrum touchstart.spectrum', function(e) {\n if (!disabled) {\n toggle();\n }\n\n e.stopPropagation();\n\n if (!$(e.target).is('input')) {\n e.preventDefault();\n }\n });\n\n if (boundElement.is(':disabled') || opts.disabled === true) {\n disable();\n }\n\n // Prevent clicks from bubbling up to document. This would cause it to be hidden.\n container.click(stopPropagation);\n\n // Handle user typed input\n textInput.change(setFromTextInput);\n textInput.bind('paste', function() {\n setTimeout(setFromTextInput, 1);\n });\n textInput.keydown(function(e) {\n if (e.keyCode == 13) {\n setFromTextInput();\n }\n });\n\n cancelButton.text(opts.cancelText);\n cancelButton.bind('click.spectrum', function(e) {\n e.stopPropagation();\n e.preventDefault();\n revert();\n hide();\n });\n\n clearButton.attr('title', opts.clearText);\n clearButton.bind('click.spectrum', function(e) {\n e.stopPropagation();\n e.preventDefault();\n isEmpty = true;\n move();\n\n if (flat) {\n //for the flat style, this is a change event\n updateOriginalInput(true);\n }\n });\n\n chooseButton.text(opts.chooseText);\n chooseButton.bind('click.spectrum', function(e) {\n e.stopPropagation();\n e.preventDefault();\n\n if (IE && textInput.is(':focus')) {\n textInput.trigger('change');\n }\n\n if (isValid()) {\n updateOriginalInput(true);\n hide();\n }\n });\n\n toggleButton.text(\n opts.showPaletteOnly\n ? opts.togglePaletteMoreText\n : opts.togglePaletteLessText\n );\n toggleButton.bind('click.spectrum', function(e) {\n e.stopPropagation();\n e.preventDefault();\n\n opts.showPaletteOnly = !opts.showPaletteOnly;\n\n // To make sure the Picker area is drawn on the right, next to the\n // Palette area (and not below the palette), first move the Palette\n // to the left to make space for the picker, plus 5px extra.\n // The 'applyOptions' function puts the whole container back into place\n // and takes care of the button-text and the sp-palette-only CSS class.\n if (!opts.showPaletteOnly && !flat) {\n container.css('left', '-=' + (pickerContainer.outerWidth(true) + 5));\n }\n applyOptions();\n });\n\n draggable(\n alphaSlider,\n function(dragX, dragY, e) {\n currentAlpha = dragX / alphaWidth;\n isEmpty = false;\n if (e.shiftKey) {\n currentAlpha = Math.round(currentAlpha * 10) / 10;\n }\n\n move();\n },\n dragStart,\n dragStop\n );\n\n draggable(\n slider,\n function(dragX, dragY) {\n currentHue = parseFloat(dragY / slideHeight);\n isEmpty = false;\n if (!opts.showAlpha) {\n currentAlpha = 1;\n }\n move();\n },\n dragStart,\n dragStop\n );\n\n draggable(\n dragger,\n function(dragX, dragY, e) {\n // shift+drag should snap the movement to either the x or y axis.\n if (!e.shiftKey) {\n shiftMovementDirection = null;\n } else if (!shiftMovementDirection) {\n var oldDragX = currentSaturation * dragWidth;\n var oldDragY = dragHeight - currentValue * dragHeight;\n var furtherFromX =\n Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY);\n\n shiftMovementDirection = furtherFromX ? 'x' : 'y';\n }\n\n var setSaturation =\n !shiftMovementDirection || shiftMovementDirection === 'x';\n var setValue =\n !shiftMovementDirection || shiftMovementDirection === 'y';\n\n if (setSaturation) {\n currentSaturation = parseFloat(dragX / dragWidth);\n }\n if (setValue) {\n currentValue = parseFloat((dragHeight - dragY) / dragHeight);\n }\n\n isEmpty = false;\n if (!opts.showAlpha) {\n currentAlpha = 1;\n }\n\n move();\n },\n dragStart,\n dragStop\n );\n\n if (!!initialColor) {\n set(initialColor);\n\n // In case color was black - update the preview UI and set the format\n // since the set function will not run (default color is black).\n updateUI();\n currentPreferredFormat =\n opts.preferredFormat || tinycolor(initialColor).format;\n\n addColorToSelectionPalette(initialColor);\n } else {\n updateUI();\n }\n\n if (flat) {\n show();\n }\n\n function paletteElementClick(e) {\n if (e.data && e.data.ignore) {\n set(\n $(e.target)\n .closest('.sp-thumb-el')\n .data('color')\n );\n move();\n } else {\n set(\n $(e.target)\n .closest('.sp-thumb-el')\n .data('color')\n );\n move();\n updateOriginalInput(true);\n if (opts.hideAfterPaletteSelect) {\n hide();\n }\n }\n\n return false;\n }\n\n var paletteEvent = IE\n ? 'mousedown.spectrum'\n : 'click.spectrum touchstart.spectrum';\n paletteContainer.delegate(\n '.sp-thumb-el',\n paletteEvent,\n paletteElementClick\n );\n initialColorContainer.delegate(\n '.sp-thumb-el:nth-child(1)',\n paletteEvent,\n { ignore: true },\n paletteElementClick\n );\n }\n\n function updateSelectionPaletteFromStorage() {\n if (localStorageKey && window.localStorage) {\n // Migrate old palettes over to new format. May want to remove this eventually.\n try {\n var oldPalette = window.localStorage[localStorageKey].split(',#');\n if (oldPalette.length > 1) {\n delete window.localStorage[localStorageKey];\n $.each(oldPalette, function(i, c) {\n addColorToSelectionPalette(c);\n });\n }\n } catch (e) {}\n\n try {\n selectionPalette = window.localStorage[localStorageKey].split(';');\n } catch (e) {}\n }\n }\n\n function addColorToSelectionPalette(color) {\n if (showSelectionPalette) {\n var rgb = tinycolor(color).toRgbString();\n if (!paletteLookup[rgb] && $.inArray(rgb, selectionPalette) === -1) {\n selectionPalette.push(rgb);\n while (selectionPalette.length > maxSelectionSize) {\n selectionPalette.shift();\n }\n }\n\n if (localStorageKey && window.localStorage) {\n try {\n window.localStorage[localStorageKey] = selectionPalette.join(';');\n } catch (e) {}\n }\n }\n }\n\n function getUniqueSelectionPalette() {\n var unique = [];\n if (opts.showPalette) {\n for (var i = 0; i < selectionPalette.length; i++) {\n var rgb = tinycolor(selectionPalette[i]).toRgbString();\n\n if (!paletteLookup[rgb]) {\n unique.push(selectionPalette[i]);\n }\n }\n }\n\n return unique.reverse().slice(0, opts.maxSelectionSize);\n }\n\n function drawPalette() {\n var currentColor = get();\n\n var html = $.map(paletteArray, function(palette, i) {\n return paletteTemplate(\n palette,\n currentColor,\n 'sp-palette-row sp-palette-row-' + i,\n opts\n );\n });\n\n updateSelectionPaletteFromStorage();\n\n if (selectionPalette) {\n html.push(\n paletteTemplate(\n getUniqueSelectionPalette(),\n currentColor,\n 'sp-palette-row sp-palette-row-selection',\n opts\n )\n );\n }\n\n paletteContainer.html(html.join(''));\n }\n\n function drawInitial() {\n if (opts.showInitial) {\n var initial = colorOnShow;\n var current = get();\n initialColorContainer.html(\n paletteTemplate(\n [initial, current],\n current,\n 'sp-palette-row-initial',\n opts\n )\n );\n }\n }\n\n function dragStart() {\n if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) {\n reflow();\n }\n isDragging = true;\n container.addClass(draggingClass);\n shiftMovementDirection = null;\n boundElement.trigger('dragstart.spectrum', [get()]);\n }\n\n function dragStop() {\n isDragging = false;\n container.removeClass(draggingClass);\n boundElement.trigger('dragstop.spectrum', [get()]);\n }\n\n function setFromTextInput() {\n var value = textInput.val();\n\n if ((value === null || value === '') && allowEmpty) {\n set(null);\n updateOriginalInput(true);\n } else {\n var tiny = tinycolor(value);\n if (tiny.isValid()) {\n set(tiny);\n updateOriginalInput(true);\n } else {\n textInput.addClass('sp-validation-error');\n }\n }\n }\n\n function toggle() {\n if (visible) {\n hide();\n } else {\n show();\n }\n }\n\n function show() {\n var event = $.Event('beforeShow.spectrum');\n\n if (visible) {\n reflow();\n return;\n }\n\n boundElement.trigger(event, [get()]);\n\n if (callbacks.beforeShow(get()) === false || event.isDefaultPrevented()) {\n return;\n }\n\n hideAll();\n visible = true;\n\n var $doc = $(doc);\n $doc.bind('keydown.spectrum', onkeydown);\n $doc.bind('click.spectrum', clickout);\n $(window).bind('resize.spectrum', resize);\n replacer.addClass('sp-active');\n container.removeClass('sp-hidden');\n\n reflow();\n updateUI();\n\n colorOnShow = get();\n\n drawInitial();\n callbacks.show(colorOnShow);\n boundElement.trigger('show.spectrum', [colorOnShow]);\n }\n\n function onkeydown(e) {\n // Close on ESC\n if (e.keyCode === 27) {\n hide();\n }\n }\n\n function clickout(e) {\n // Return on right click.\n if (e.button == 2) {\n return;\n }\n\n // If a drag event was happening during the mouseup, don't hide\n // on click.\n if (isDragging) {\n return;\n }\n\n if (clickoutFiresChange) {\n updateOriginalInput(true);\n } else {\n revert();\n }\n hide();\n }\n\n function hide() {\n // Return if hiding is unnecessary\n if (!visible || flat) {\n return;\n }\n visible = false;\n\n $(doc).unbind('keydown.spectrum', onkeydown);\n $(doc).unbind('click.spectrum', clickout);\n $(window).unbind('resize.spectrum', resize);\n\n replacer.removeClass('sp-active');\n container.addClass('sp-hidden');\n\n callbacks.hide(get());\n boundElement.trigger('hide.spectrum', [get()]);\n }\n\n function revert() {\n set(colorOnShow, true);\n }\n\n function set(color, ignoreFormatChange) {\n if (tinycolor.equals(color, get())) {\n // Update UI just in case a validation error needs\n // to be cleared.\n updateUI();\n return;\n }\n\n var newColor, newHsv;\n if (!color && allowEmpty) {\n isEmpty = true;\n } else {\n isEmpty = false;\n newColor = tinycolor(color);\n newHsv = newColor.toHsv();\n\n currentHue = (newHsv.h % 360) / 360;\n currentSaturation = newHsv.s;\n currentValue = newHsv.v;\n currentAlpha = newHsv.a;\n }\n updateUI();\n\n if (newColor && newColor.isValid() && !ignoreFormatChange) {\n currentPreferredFormat = opts.preferredFormat || newColor.getFormat();\n }\n }\n\n function get(opts) {\n opts = opts || {};\n\n if (allowEmpty && isEmpty) {\n return null;\n }\n\n return tinycolor.fromRatio(\n {\n h: currentHue,\n s: currentSaturation,\n v: currentValue,\n a: Math.round(currentAlpha * 100) / 100\n },\n { format: opts.format || currentPreferredFormat }\n );\n }\n\n function isValid() {\n return !textInput.hasClass('sp-validation-error');\n }\n\n function move() {\n updateUI();\n\n callbacks.move(get());\n boundElement.trigger('move.spectrum', [get()]);\n }\n\n function updateUI() {\n textInput.removeClass('sp-validation-error');\n\n updateHelperLocations();\n\n // Update dragger background color (gradients take care of saturation and value).\n var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 });\n dragger.css('background-color', flatColor.toHexString());\n\n // Get a format that alpha will be included in (hex and names ignore alpha)\n var format = currentPreferredFormat;\n if (currentAlpha < 1 && !(currentAlpha === 0 && format === 'name')) {\n if (\n format === 'hex' ||\n format === 'hex3' ||\n format === 'hex6' ||\n format === 'name'\n ) {\n format = 'rgb';\n }\n }\n\n var realColor = get({ format: format }),\n displayColor = '';\n\n //reset background info for preview element\n previewElement.removeClass('sp-clear-display');\n previewElement.css('background-color', 'transparent');\n\n if (!realColor && allowEmpty) {\n // Update the replaced elements background with icon indicating no color selection\n previewElement.addClass('sp-clear-display');\n } else {\n var realHex = realColor.toHexString(),\n realRgb = realColor.toRgbString();\n\n // Update the replaced elements background color (with actual selected color)\n if (rgbaSupport || realColor.alpha === 1) {\n previewElement.css('background-color', realRgb);\n } else {\n previewElement.css('background-color', 'transparent');\n previewElement.css('filter', realColor.toFilter());\n }\n\n if (opts.showAlpha) {\n var rgb = realColor.toRgb();\n rgb.a = 0;\n var realAlpha = tinycolor(rgb).toRgbString();\n var gradient =\n 'linear-gradient(left, ' + realAlpha + ', ' + realHex + ')';\n\n if (IE) {\n alphaSliderInner.css(\n 'filter',\n tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex)\n );\n } else {\n alphaSliderInner.css('background', '-webkit-' + gradient);\n alphaSliderInner.css('background', '-moz-' + gradient);\n alphaSliderInner.css('background', '-ms-' + gradient);\n // Use current syntax gradient on unprefixed property.\n alphaSliderInner.css(\n 'background',\n 'linear-gradient(to right, ' + realAlpha + ', ' + realHex + ')'\n );\n }\n }\n\n displayColor = realColor.toString(format);\n }\n\n // Update the text entry input as it changes happen\n if (opts.showInput) {\n textInput.val(displayColor);\n }\n\n if (opts.showPalette) {\n drawPalette();\n }\n\n drawInitial();\n }\n\n function updateHelperLocations() {\n var s = currentSaturation;\n var v = currentValue;\n\n if (allowEmpty && isEmpty) {\n //if selected color is empty, hide the helpers\n alphaSlideHelper.hide();\n slideHelper.hide();\n dragHelper.hide();\n } else {\n //make sure helpers are visible\n alphaSlideHelper.show();\n slideHelper.show();\n dragHelper.show();\n\n // Where to show the little circle in that displays your current selected color\n var dragX = s * dragWidth;\n var dragY = dragHeight - v * dragHeight;\n dragX = Math.max(\n -dragHelperHeight,\n Math.min(dragWidth - dragHelperHeight, dragX - dragHelperHeight)\n );\n dragY = Math.max(\n -dragHelperHeight,\n Math.min(dragHeight - dragHelperHeight, dragY - dragHelperHeight)\n );\n dragHelper.css({\n top: dragY + 'px',\n left: dragX + 'px'\n });\n\n var alphaX = currentAlpha * alphaWidth;\n alphaSlideHelper.css({\n left: alphaX - alphaSlideHelperWidth / 2 + 'px'\n });\n\n // Where to show the bar that displays your current selected hue\n var slideY = currentHue * slideHeight;\n slideHelper.css({\n top: slideY - slideHelperHeight + 'px'\n });\n }\n }\n\n function updateOriginalInput(fireCallback) {\n var color = get(),\n displayColor = '',\n hasChanged = !tinycolor.equals(color, colorOnShow);\n\n if (color) {\n displayColor = color.toString(currentPreferredFormat);\n // Update the selection palette with the current color\n addColorToSelectionPalette(color);\n }\n\n if (isInput) {\n boundElement.val(displayColor);\n }\n\n if (fireCallback && hasChanged) {\n callbacks.change(color);\n boundElement.trigger('change', [color]);\n }\n }\n\n function reflow() {\n if (!visible) {\n return; // Calculations would be useless and wouldn't be reliable anyways\n }\n dragWidth = dragger.width();\n dragHeight = dragger.height();\n dragHelperHeight = dragHelper.height();\n slideWidth = slider.width();\n slideHeight = slider.height();\n slideHelperHeight = slideHelper.height();\n alphaWidth = alphaSlider.width();\n alphaSlideHelperWidth = alphaSlideHelper.width();\n\n if (!flat) {\n container.css('position', 'absolute');\n if (opts.offset) {\n container.offset(opts.offset);\n } else {\n container.offset(getOffset(container, offsetElement));\n }\n }\n\n updateHelperLocations();\n\n if (opts.showPalette) {\n drawPalette();\n }\n\n boundElement.trigger('reflow.spectrum');\n }\n\n function destroy() {\n boundElement.show();\n offsetElement.unbind('click.spectrum touchstart.spectrum');\n container.remove();\n replacer.remove();\n spectrums[spect.id] = null;\n }\n\n function option(optionName, optionValue) {\n if (optionName === undefined) {\n return $.extend({}, opts);\n }\n if (optionValue === undefined) {\n return opts[optionName];\n }\n\n opts[optionName] = optionValue;\n\n if (optionName === 'preferredFormat') {\n currentPreferredFormat = opts.preferredFormat;\n }\n applyOptions();\n }\n\n function enable() {\n disabled = false;\n boundElement.attr('disabled', false);\n offsetElement.removeClass('sp-disabled');\n }\n\n function disable() {\n hide();\n disabled = true;\n boundElement.attr('disabled', true);\n offsetElement.addClass('sp-disabled');\n }\n\n function setOffset(coord) {\n opts.offset = coord;\n reflow();\n }\n\n initialize();\n\n var spect = {\n show: show,\n hide: hide,\n toggle: toggle,\n reflow: reflow,\n option: option,\n enable: enable,\n disable: disable,\n offset: setOffset,\n set: function(c) {\n set(c);\n updateOriginalInput();\n },\n get: get,\n destroy: destroy,\n container: container\n };\n\n spect.id = spectrums.push(spect) - 1;\n\n return spect;\n }\n\n /**\n * checkOffset - get the offset below/above and left/right element depending on screen position\n * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js\n */\n function getOffset(picker, input) {\n var extraY = 0;\n var dpWidth = picker.outerWidth();\n var dpHeight = picker.outerHeight();\n var inputHeight = input.outerHeight();\n var doc = picker[0].ownerDocument;\n var docElem = doc.documentElement;\n var cW = docElem.clientWidth;\n var cH = docElem.clientHeight;\n var scL = $(doc).scrollLeft();\n var scT = $(doc).scrollTop();\n var viewWidth = cW + scL;\n var viewHeight = cH + scT;\n var offset = input.offset();\n\n offset.top += inputHeight;\n\n offset.left -= Math.min(\n offset.left,\n offset.left + dpWidth > viewWidth && viewWidth > dpWidth\n ? Math.abs(offset.left + dpWidth - viewWidth)\n : 0\n );\n\n offset.top -= Math.min(\n offset.top,\n offset.top + dpHeight > viewHeight && viewHeight > dpHeight\n ? Math.abs(dpHeight + inputHeight - extraY)\n : extraY\n );\n\n return offset;\n }\n\n /**\n * noop - do nothing\n */\n function noop() {}\n\n /**\n * stopPropagation - makes the code only doing this a little easier to read in line\n */\n function stopPropagation(e) {\n e.stopPropagation();\n }\n\n /**\n * Create a function bound to a given object\n * Thanks to underscore.js\n */\n function bind(func, obj) {\n var slice = Array.prototype.slice;\n var args = slice.call(arguments, 2);\n return function() {\n return func.apply(obj, args.concat(slice.call(arguments)));\n };\n }\n\n /**\n * Lightweight drag helper. Handles containment within the element, so that\n * when dragging, the x is within [0,element.width] and y is within [0,element.height]\n */\n function draggable(element, onmove, onstart, onstop) {\n onmove = onmove || function() {};\n onstart = onstart || function() {};\n onstop = onstop || function() {};\n var doc = document;\n var dragging = false;\n var offset = {};\n var maxHeight = 0;\n var maxWidth = 0;\n var hasTouch = 'ontouchstart' in window;\n\n var duringDragEvents = {};\n duringDragEvents['selectstart'] = prevent;\n duringDragEvents['dragstart'] = prevent;\n duringDragEvents['touchmove mousemove'] = move;\n duringDragEvents['touchend mouseup'] = stop;\n\n function prevent(e) {\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n if (e.preventDefault) {\n e.preventDefault();\n }\n e.returnValue = false;\n }\n\n function move(e) {\n if (dragging) {\n // Mouseup happened outside of window\n if (IE && doc.documentMode < 9 && !e.button) {\n return stop();\n }\n\n var t0 = e && e.touches && e.touches[0];\n var pageX = (t0 && t0.pageX) || e.pageX;\n var pageY = (t0 && t0.pageY) || e.pageY;\n\n var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth));\n var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight));\n\n if (hasTouch) {\n // Stop scrolling in iOS\n prevent(e);\n }\n\n onmove.apply(element, [dragX, dragY, e]);\n }\n }\n\n function start(e) {\n var rightclick = e.which ? e.which == 3 : e.button == 2;\n\n if (!rightclick && !dragging) {\n if (onstart.apply(element, arguments) !== false) {\n dragging = true;\n maxHeight = $(element).height();\n maxWidth = $(element).width();\n offset = $(element).offset();\n\n $(doc).bind(duringDragEvents);\n $(doc.body).addClass('sp-dragging');\n\n move(e);\n\n prevent(e);\n }\n }\n }\n\n function stop() {\n if (dragging) {\n $(doc).unbind(duringDragEvents);\n $(doc.body).removeClass('sp-dragging');\n\n // Wait a tick before notifying observers to allow the click event\n // to fire in Chrome.\n setTimeout(function() {\n onstop.apply(element, arguments);\n }, 0);\n }\n dragging = false;\n }\n\n $(element).bind('touchstart mousedown', start);\n }\n\n function throttle(func, wait, debounce) {\n var timeout;\n return function() {\n var context = this,\n args = arguments;\n var throttler = function() {\n timeout = null;\n func.apply(context, args);\n };\n if (debounce) clearTimeout(timeout);\n if (debounce || !timeout) timeout = setTimeout(throttler, wait);\n };\n }\n\n function inputTypeColorSupport() {\n return $.fn.spectrum.inputTypeColorSupport();\n }\n\n /**\n * Define a jQuery plugin\n */\n var dataID = 'spectrum.id';\n $.fn.spectrum = function(opts, extra) {\n if (typeof opts == 'string') {\n var returnValue = this;\n var args = Array.prototype.slice.call(arguments, 1);\n\n this.each(function() {\n var spect = spectrums[$(this).data(dataID)];\n if (spect) {\n var method = spect[opts];\n if (!method) {\n throw new Error(\"Spectrum: no such method: '\" + opts + \"'\");\n }\n\n if (opts == 'get') {\n returnValue = spect.get();\n } else if (opts == 'container') {\n returnValue = spect.container;\n } else if (opts == 'option') {\n returnValue = spect.option.apply(spect, args);\n } else if (opts == 'destroy') {\n spect.destroy();\n $(this).removeData(dataID);\n } else {\n method.apply(spect, args);\n }\n }\n });\n\n return returnValue;\n }\n\n // Initializing a new instance of spectrum\n return this.spectrum('destroy').each(function() {\n var options = $.extend({}, opts, $(this).data());\n var spect = spectrum(this, options);\n $(this).data(dataID, spect.id);\n });\n };\n\n $.fn.spectrum.load = true;\n $.fn.spectrum.loadOpts = {};\n $.fn.spectrum.draggable = draggable;\n $.fn.spectrum.defaults = defaultOpts;\n $.fn.spectrum.inputTypeColorSupport = function inputTypeColorSupport() {\n if (typeof inputTypeColorSupport._cachedResult === 'undefined') {\n var colorInput = $(\"\")[0]; // if color element is supported, value will default to not null\n inputTypeColorSupport._cachedResult =\n colorInput.type === 'color' && colorInput.value !== '';\n }\n return inputTypeColorSupport._cachedResult;\n };\n\n $.spectrum = {};\n $.spectrum.localization = {};\n $.spectrum.palettes = {};\n\n $.fn.spectrum.processNativeColorInputs = function() {\n var colorInputs = $('input[type=color]');\n if (colorInputs.length && !inputTypeColorSupport()) {\n colorInputs.spectrum({\n preferredFormat: 'hex6'\n });\n }\n };\n\n // TinyColor v1.1.2\n // https://github.com/bgrins/TinyColor\n // Brian Grinstead, MIT License\n\n //(function() {\n\n var trimLeft = /^[\\s,#]+/,\n trimRight = /\\s+$/,\n tinyCounter = 0,\n math = Math,\n mathRound = math.round,\n mathMin = math.min,\n mathMax = math.max,\n mathRandom = math.random;\n\n var tinycolor = function(color, opts) {\n color = color ? color : '';\n opts = opts || {};\n\n // If input is already a tinycolor, return itself\n if (color instanceof tinycolor) {\n return color;\n }\n // If we are called as a function, call using new instead\n if (!(this instanceof tinycolor)) {\n return new tinycolor(color, opts);\n }\n\n var rgb = inputToRGB(color);\n (this._originalInput = color),\n (this._r = rgb.r),\n (this._g = rgb.g),\n (this._b = rgb.b),\n (this._a = rgb.a),\n (this._roundA = mathRound(100 * this._a) / 100),\n (this._format = opts.format || rgb.format);\n this._gradientType = opts.gradientType;\n\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this._r < 1) {\n this._r = mathRound(this._r);\n }\n if (this._g < 1) {\n this._g = mathRound(this._g);\n }\n if (this._b < 1) {\n this._b = mathRound(this._b);\n }\n\n this._ok = rgb.ok;\n this._tc_id = tinyCounter++;\n };\n\n tinycolor.prototype = {\n isDark: function() {\n return this.getBrightness() < 128;\n },\n isLight: function() {\n return !this.isDark();\n },\n isValid: function() {\n return this._ok;\n },\n getOriginalInput: function() {\n return this._originalInput;\n },\n getFormat: function() {\n return this._format;\n },\n getAlpha: function() {\n return this._a;\n },\n getBrightness: function() {\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n },\n setAlpha: function(value) {\n this._a = boundAlpha(value);\n this._roundA = mathRound(100 * this._a) / 100;\n return this;\n },\n toHsv: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };\n },\n toHsvString: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n var h = mathRound(hsv.h * 360),\n s = mathRound(hsv.s * 100),\n v = mathRound(hsv.v * 100);\n return this._a == 1\n ? 'hsv(' + h + ', ' + s + '%, ' + v + '%)'\n : 'hsva(' + h + ', ' + s + '%, ' + v + '%, ' + this._roundA + ')';\n },\n toHsl: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };\n },\n toHslString: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n var h = mathRound(hsl.h * 360),\n s = mathRound(hsl.s * 100),\n l = mathRound(hsl.l * 100);\n return this._a == 1\n ? 'hsl(' + h + ', ' + s + '%, ' + l + '%)'\n : 'hsla(' + h + ', ' + s + '%, ' + l + '%, ' + this._roundA + ')';\n },\n toHex: function(allow3Char) {\n return rgbToHex(this._r, this._g, this._b, allow3Char);\n },\n toHexString: function(allow3Char) {\n return '#' + this.toHex(allow3Char);\n },\n toHex8: function() {\n return rgbaToHex(this._r, this._g, this._b, this._a);\n },\n toHex8String: function() {\n return '#' + this.toHex8();\n },\n toRgb: function() {\n return {\n r: mathRound(this._r),\n g: mathRound(this._g),\n b: mathRound(this._b),\n a: this._a\n };\n },\n toRgbString: function() {\n return this._a == 1\n ? 'rgb(' +\n mathRound(this._r) +\n ', ' +\n mathRound(this._g) +\n ', ' +\n mathRound(this._b) +\n ')'\n : 'rgba(' +\n mathRound(this._r) +\n ', ' +\n mathRound(this._g) +\n ', ' +\n mathRound(this._b) +\n ', ' +\n this._roundA +\n ')';\n },\n toPercentageRgb: function() {\n return {\n r: mathRound(bound01(this._r, 255) * 100) + '%',\n g: mathRound(bound01(this._g, 255) * 100) + '%',\n b: mathRound(bound01(this._b, 255) * 100) + '%',\n a: this._a\n };\n },\n toPercentageRgbString: function() {\n return this._a == 1\n ? 'rgb(' +\n mathRound(bound01(this._r, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._g, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._b, 255) * 100) +\n '%)'\n : 'rgba(' +\n mathRound(bound01(this._r, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._g, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._b, 255) * 100) +\n '%, ' +\n this._roundA +\n ')';\n },\n toName: function() {\n if (this._a === 0) {\n return 'transparent';\n }\n\n if (this._a < 1) {\n return false;\n }\n\n return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;\n },\n toFilter: function(secondColor) {\n var hex8String = '#' + rgbaToHex(this._r, this._g, this._b, this._a);\n var secondHex8String = hex8String;\n var gradientType = this._gradientType ? 'GradientType = 1, ' : '';\n\n if (secondColor) {\n var s = tinycolor(secondColor);\n secondHex8String = s.toHex8String();\n }\n\n return (\n 'progid:DXImageTransform.Microsoft.gradient(' +\n gradientType +\n 'startColorstr=' +\n hex8String +\n ',endColorstr=' +\n secondHex8String +\n ')'\n );\n },\n toString: function(format) {\n var formatSet = !!format;\n format = format || this._format;\n\n var formattedString = false;\n var hasAlpha = this._a < 1 && this._a >= 0;\n var needsAlphaFormat =\n !formatSet &&\n hasAlpha &&\n (format === 'hex' ||\n format === 'hex6' ||\n format === 'hex3' ||\n format === 'name');\n\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === 'name' && this._a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === 'rgb') {\n formattedString = this.toRgbString();\n }\n if (format === 'prgb') {\n formattedString = this.toPercentageRgbString();\n }\n if (format === 'hex' || format === 'hex6') {\n formattedString = this.toHexString();\n }\n if (format === 'hex3') {\n formattedString = this.toHexString(true);\n }\n if (format === 'hex8') {\n formattedString = this.toHex8String();\n }\n if (format === 'name') {\n formattedString = this.toName();\n }\n if (format === 'hsl') {\n formattedString = this.toHslString();\n }\n if (format === 'hsv') {\n formattedString = this.toHsvString();\n }\n\n return formattedString || this.toHexString();\n },\n\n _applyModification: function(fn, args) {\n var color = fn.apply(null, [this].concat([].slice.call(args)));\n this._r = color._r;\n this._g = color._g;\n this._b = color._b;\n this.setAlpha(color._a);\n return this;\n },\n lighten: function() {\n return this._applyModification(lighten, arguments);\n },\n brighten: function() {\n return this._applyModification(brighten, arguments);\n },\n darken: function() {\n return this._applyModification(darken, arguments);\n },\n desaturate: function() {\n return this._applyModification(desaturate, arguments);\n },\n saturate: function() {\n return this._applyModification(saturate, arguments);\n },\n greyscale: function() {\n return this._applyModification(greyscale, arguments);\n },\n spin: function() {\n return this._applyModification(spin, arguments);\n },\n\n _applyCombination: function(fn, args) {\n return fn.apply(null, [this].concat([].slice.call(args)));\n },\n analogous: function() {\n return this._applyCombination(analogous, arguments);\n },\n complement: function() {\n return this._applyCombination(complement, arguments);\n },\n monochromatic: function() {\n return this._applyCombination(monochromatic, arguments);\n },\n splitcomplement: function() {\n return this._applyCombination(splitcomplement, arguments);\n },\n triad: function() {\n return this._applyCombination(triad, arguments);\n },\n tetrad: function() {\n return this._applyCombination(tetrad, arguments);\n }\n };\n\n // If input is an object, force 1 into \"1.0\" to handle ratios properly\n // String input requires \"1.0\" as input, so 1 will be treated as 1\n tinycolor.fromRatio = function(color, opts) {\n if (typeof color == 'object') {\n var newColor = {};\n for (var i in color) {\n if (color.hasOwnProperty(i)) {\n if (i === 'a') {\n newColor[i] = color[i];\n } else {\n newColor[i] = convertToPercentage(color[i]);\n }\n }\n }\n color = newColor;\n }\n\n return tinycolor(color, opts);\n };\n\n // Given a string or object, convert that input to RGB\n // Possible string inputs:\n //\n // \"red\"\n // \"#f00\" or \"f00\"\n // \"#ff0000\" or \"ff0000\"\n // \"#ff000000\" or \"ff000000\"\n // \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n // \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n // \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n // \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n // \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n // \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n // \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n //\n function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == 'string') {\n color = stringInputToObject(color);\n }\n\n if (typeof color == 'object') {\n if (\n color.hasOwnProperty('r') &&\n color.hasOwnProperty('g') &&\n color.hasOwnProperty('b')\n ) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n } else if (\n color.hasOwnProperty('h') &&\n color.hasOwnProperty('s') &&\n color.hasOwnProperty('v')\n ) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = 'hsv';\n } else if (\n color.hasOwnProperty('h') &&\n color.hasOwnProperty('s') &&\n color.hasOwnProperty('l')\n ) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = 'hsl';\n }\n\n if (color.hasOwnProperty('a')) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n }\n\n // Conversion Functions\n // --------------------\n\n // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n // \n\n // `rgbToRgb`\n // Handle bounds / percentage checking to conform to CSS color spec\n // \n // *Assumes:* r, g, b in [0, 255] or [0, 1]\n // *Returns:* { r, g, b } in [0, 255]\n function rgbToRgb(r, g, b) {\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255\n };\n }\n\n // `rgbToHsl`\n // Converts an RGB color value to HSL.\n // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n // *Returns:* { h, s, l } in [0,1]\n function rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b),\n min = mathMin(r, g, b);\n var h,\n s,\n l = (max + min) / 2;\n\n if (max == min) {\n h = s = 0; // achromatic\n } else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n\n h /= 6;\n }\n\n return { h: h, s: s, l: l };\n }\n\n // `hslToRgb`\n // Converts an HSL color value to RGB.\n // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n // *Returns:* { r, g, b } in the set [0, 255]\n function hslToRgb(h, s, l) {\n var r, g, b;\n\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n\n function hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n\n if (s === 0) {\n r = g = b = l; // achromatic\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n }\n\n // `rgbToHsv`\n // Converts an RGB color value to HSV\n // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n // *Returns:* { h, s, v } in [0,1]\n function rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b),\n min = mathMin(r, g, b);\n var h,\n s,\n v = max;\n\n var d = max - min;\n s = max === 0 ? 0 : d / max;\n\n if (max == min) {\n h = 0; // achromatic\n } else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n }\n\n // `hsvToRgb`\n // Converts an HSV color value to RGB.\n // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n // *Returns:* { r, g, b } in the set [0, 255]\n function hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n\n var i = math.floor(h),\n f = h - i,\n p = v * (1 - s),\n q = v * (1 - f * s),\n t = v * (1 - (1 - f) * s),\n mod = i % 6,\n r = [v, q, p, p, t, v][mod],\n g = [t, v, v, q, p, p][mod],\n b = [p, p, t, v, v, q][mod];\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n }\n\n // `rgbToHex`\n // Converts an RGB color to hex\n // Assumes r, g, and b are contained in the set [0, 255]\n // Returns a 3 or 6 character hex\n function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n // Return a 3 character hex if possible\n if (\n allow3Char &&\n hex[0].charAt(0) == hex[0].charAt(1) &&\n hex[1].charAt(0) == hex[1].charAt(1) &&\n hex[2].charAt(0) == hex[2].charAt(1)\n ) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n\n return hex.join('');\n }\n // `rgbaToHex`\n // Converts an RGBA color plus alpha transparency to hex\n // Assumes r, g, b and a are contained in the set [0, 255]\n // Returns an 8 character hex\n function rgbaToHex(r, g, b, a) {\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join('');\n }\n\n // `equals`\n // Can be called with any tinycolor input\n tinycolor.equals = function(color1, color2) {\n if (!color1 || !color2) {\n return false;\n }\n return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();\n };\n tinycolor.random = function() {\n return tinycolor.fromRatio({\n r: mathRandom(),\n g: mathRandom(),\n b: mathRandom()\n });\n };\n\n // Modification Functions\n // ----------------------\n // Thanks to less.js for some of the basics here\n // \n\n function desaturate(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n }\n\n function saturate(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n }\n\n function greyscale(color) {\n return tinycolor(color).desaturate(100);\n }\n\n function lighten(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n }\n\n function brighten(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var rgb = tinycolor(color).toRgb();\n rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * -(amount / 100))));\n rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * -(amount / 100))));\n rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * -(amount / 100))));\n return tinycolor(rgb);\n }\n\n function darken(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n }\n\n // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n // Values outside of this range will be wrapped into this range.\n function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (mathRound(hsl.h) + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n }\n\n // Combination Functions\n // ---------------------\n // Thanks to jQuery xColor for some of the ideas behind these\n // \n\n function complement(color) {\n var hsl = tinycolor(color).toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return tinycolor(hsl);\n }\n\n function triad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })\n ];\n }\n\n function tetrad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })\n ];\n }\n\n function splitcomplement(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l })\n ];\n }\n\n function analogous(color, results, slices) {\n results = results || 6;\n slices = slices || 30;\n\n var hsl = tinycolor(color).toHsl();\n var part = 360 / slices;\n var ret = [tinycolor(color)];\n\n for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results; ) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(tinycolor(hsl));\n }\n return ret;\n }\n\n function monochromatic(color, results) {\n results = results || 6;\n var hsv = tinycolor(color).toHsv();\n var h = hsv.h,\n s = hsv.s,\n v = hsv.v;\n var ret = [];\n var modification = 1 / results;\n\n while (results--) {\n ret.push(tinycolor({ h: h, s: s, v: v }));\n v = (v + modification) % 1;\n }\n\n return ret;\n }\n\n // Utility Functions\n // ---------------------\n\n tinycolor.mix = function(color1, color2, amount) {\n amount = amount === 0 ? 0 : amount || 50;\n\n var rgb1 = tinycolor(color1).toRgb();\n var rgb2 = tinycolor(color2).toRgb();\n\n var p = amount / 100;\n var w = p * 2 - 1;\n var a = rgb2.a - rgb1.a;\n\n var w1;\n\n if (w * a == -1) {\n w1 = w;\n } else {\n w1 = (w + a) / (1 + w * a);\n }\n\n w1 = (w1 + 1) / 2;\n\n var w2 = 1 - w1;\n\n var rgba = {\n r: rgb2.r * w1 + rgb1.r * w2,\n g: rgb2.g * w1 + rgb1.g * w2,\n b: rgb2.b * w1 + rgb1.b * w2,\n a: rgb2.a * p + rgb1.a * (1 - p)\n };\n\n return tinycolor(rgba);\n };\n\n // Readability Functions\n // ---------------------\n // \n\n // `readability`\n // Analyze the 2 colors and returns an object with the following properties:\n // `brightness`: difference in brightness between the two colors\n // `color`: difference in color/hue between the two colors\n tinycolor.readability = function(color1, color2) {\n var c1 = tinycolor(color1);\n var c2 = tinycolor(color2);\n var rgb1 = c1.toRgb();\n var rgb2 = c2.toRgb();\n var brightnessA = c1.getBrightness();\n var brightnessB = c2.getBrightness();\n var colorDiff =\n Math.max(rgb1.r, rgb2.r) -\n Math.min(rgb1.r, rgb2.r) +\n Math.max(rgb1.g, rgb2.g) -\n Math.min(rgb1.g, rgb2.g) +\n Math.max(rgb1.b, rgb2.b) -\n Math.min(rgb1.b, rgb2.b);\n\n return {\n brightness: Math.abs(brightnessA - brightnessB),\n color: colorDiff\n };\n };\n\n // `readable`\n // http://www.w3.org/TR/AERT#color-contrast\n // Ensure that foreground and background color combinations provide sufficient contrast.\n // *Example*\n // tinycolor.isReadable(\"#000\", \"#111\") => false\n tinycolor.isReadable = function(color1, color2) {\n var readability = tinycolor.readability(color1, color2);\n return readability.brightness > 125 && readability.color > 500;\n };\n\n // `mostReadable`\n // Given a base color and a list of possible foreground or background\n // colors for that base, returns the most readable color.\n // *Example*\n // tinycolor.mostReadable(\"#123\", [\"#fff\", \"#000\"]) => \"#000\"\n tinycolor.mostReadable = function(baseColor, colorList) {\n var bestColor = null;\n var bestScore = 0;\n var bestIsReadable = false;\n for (var i = 0; i < colorList.length; i++) {\n // We normalize both around the \"acceptable\" breaking point,\n // but rank brightness constrast higher than hue.\n\n var readability = tinycolor.readability(baseColor, colorList[i]);\n var readable = readability.brightness > 125 && readability.color > 500;\n var score = 3 * (readability.brightness / 125) + readability.color / 500;\n\n if (\n (readable && !bestIsReadable) ||\n (readable && bestIsReadable && score > bestScore) ||\n (!readable && !bestIsReadable && score > bestScore)\n ) {\n bestIsReadable = readable;\n bestScore = score;\n bestColor = tinycolor(colorList[i]);\n }\n }\n return bestColor;\n };\n\n // Big List of Colors\n // ------------------\n // \n var names = (tinycolor.names = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '0ff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000',\n blanchedalmond: 'ffebcd',\n blue: '00f',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n burntsienna: 'ea7e5d',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '0ff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkgrey: 'a9a9a9',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkslategrey: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dimgrey: '696969',\n dodgerblue: '1e90ff',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'f0f',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n grey: '808080',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred: 'cd5c5c',\n indigo: '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgray: 'd3d3d3',\n lightgreen: '90ee90',\n lightgrey: 'd3d3d3',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslategray: '789',\n lightslategrey: '789',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '0f0',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'f0f',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370db',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'db7093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '663399',\n red: 'f00',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n slategrey: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n wheat: 'f5deb3',\n white: 'fff',\n whitesmoke: 'f5f5f5',\n yellow: 'ff0',\n yellowgreen: '9acd32'\n });\n\n // Make it easy to access colors via `hexNames[hex]`\n var hexNames = (tinycolor.hexNames = flip(names));\n\n // Utilities\n // ---------\n\n // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`\n function flip(o) {\n var flipped = {};\n for (var i in o) {\n if (o.hasOwnProperty(i)) {\n flipped[o[i]] = i;\n }\n }\n return flipped;\n }\n\n // Return a valid alpha value [0,1] with all invalid values being set to 1\n function boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n }\n\n // Take input from [0, n] and return it as [0, 1]\n function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n\n var processPercent = isPercentage(n);\n n = mathMin(max, mathMax(0, parseFloat(n)));\n\n // Automatically convert percentage into number\n if (processPercent) {\n n = parseInt(n * max, 10) / 100;\n }\n\n // Handle floating point rounding errors\n if (math.abs(n - max) < 0.000001) {\n return 1;\n }\n\n // Convert into [0, 1] range if it isn't already\n return (n % max) / parseFloat(max);\n }\n\n // Force a number between 0 and 1\n function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }\n\n // Parse a base-16 hex value into a base-10 integer\n function parseIntFromHex(val) {\n return parseInt(val, 16);\n }\n\n // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n // \n function isOnePointZero(n) {\n return typeof n == 'string' && n.indexOf('.') != -1 && parseFloat(n) === 1;\n }\n\n // Check to see if string passed in is a percentage\n function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') != -1;\n }\n\n // Force a hex value to have 2 characters\n function pad2(c) {\n return c.length == 1 ? '0' + c : '' + c;\n }\n\n // Replace a decimal with it's percentage value\n function convertToPercentage(n) {\n if (n <= 1) {\n n = n * 100 + '%';\n }\n\n return n;\n }\n\n // Converts a decimal to a hex value\n function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }\n // Converts a hex value to a decimal\n function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n }\n\n var matchers = (function() {\n // \n var CSS_INTEGER = '[-\\\\+]?\\\\d+%?';\n\n // \n var CSS_NUMBER = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?';\n\n // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\n var CSS_UNIT = '(?:' + CSS_NUMBER + ')|(?:' + CSS_INTEGER + ')';\n\n // Actual matching.\n // Parentheses and commas are optional, but not required.\n // Whitespace can take the place of commas or opening paren\n var PERMISSIVE_MATCH3 =\n '[\\\\s|\\\\(]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')\\\\s*\\\\)?';\n var PERMISSIVE_MATCH4 =\n '[\\\\s|\\\\(]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')\\\\s*\\\\)?';\n\n return {\n rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),\n rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),\n hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),\n hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),\n hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),\n hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),\n hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex8: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n };\n })();\n\n // `stringInputToObject`\n // Permissive string parsing. Take in a number of formats, and output an object\n // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\n function stringInputToObject(color) {\n color = color\n .replace(trimLeft, '')\n .replace(trimRight, '')\n .toLowerCase();\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n } else if (color == 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: 'name' };\n }\n\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match;\n if ((match = matchers.rgb.exec(color))) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n if ((match = matchers.rgba.exec(color))) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n if ((match = matchers.hsl.exec(color))) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n if ((match = matchers.hsla.exec(color))) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n if ((match = matchers.hsv.exec(color))) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n if ((match = matchers.hsva.exec(color))) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n if ((match = matchers.hex8.exec(color))) {\n return {\n a: convertHexToDecimal(match[1]),\n r: parseIntFromHex(match[2]),\n g: parseIntFromHex(match[3]),\n b: parseIntFromHex(match[4]),\n format: named ? 'name' : 'hex8'\n };\n }\n if ((match = matchers.hex6.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? 'name' : 'hex'\n };\n }\n if ((match = matchers.hex3.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n format: named ? 'name' : 'hex'\n };\n }\n\n return false;\n }\n\n window.tinycolor = tinycolor;\n //})();\n\n $(function() {\n if ($.fn.spectrum.load) {\n $.fn.spectrum.processNativeColorInputs();\n }\n });\n}\n","// keymaster.js\n// (c) 2011-2013 Thomas Fuchs\n// keymaster.js may be freely distributed under the MIT license.\n\n;(function(global){\n var k,\n _handlers = {},\n _mods = { 16: false, 18: false, 17: false, 91: false },\n _scope = 'all',\n // modifier keys\n _MODIFIERS = {\n '⇧': 16, shift: 16,\n '⌥': 18, alt: 18, option: 18,\n '⌃': 17, ctrl: 17, control: 17,\n '⌘': 91, command: 91\n },\n // special keys\n _MAP = {\n backspace: 8, tab: 9, clear: 12,\n enter: 13, 'return': 13,\n esc: 27, escape: 27, space: 32,\n left: 37, up: 38,\n right: 39, down: 40,\n del: 46, 'delete': 46,\n home: 36, end: 35,\n pageup: 33, pagedown: 34,\n ',': 188, '.': 190, '/': 191,\n '`': 192, '-': 189, '=': 187,\n ';': 186, '\\'': 222,\n '[': 219, ']': 221, '\\\\': 220\n },\n code = function(x){\n return _MAP[x] || x.toUpperCase().charCodeAt(0);\n },\n _downKeys = [];\n\n for(k=1;k<20;k++) _MAP['f'+k] = 111+k;\n\n // IE doesn't support Array#indexOf, so have a simple replacement\n function index(array, item){\n var i = array.length;\n while(i--) if(array[i]===item) return i;\n return -1;\n }\n\n // for comparing mods before unassignment\n function compareArray(a1, a2) {\n if (a1.length != a2.length) return false;\n for (var i = 0; i < a1.length; i++) {\n if (a1[i] !== a2[i]) return false;\n }\n return true;\n }\n\n var modifierMap = {\n 16:'shiftKey',\n 18:'altKey',\n 17:'ctrlKey',\n 91:'metaKey'\n };\n function updateModifierKey(event) {\n for(k in _mods) _mods[k] = event[modifierMap[k]];\n };\n\n // handle keydown event\n function dispatch(event) {\n var key, handler, k, i, modifiersMatch, scope;\n key = event.keyCode;\n\n if (index(_downKeys, key) == -1) {\n _downKeys.push(key);\n }\n\n // if a modifier key, set the key. property to true and return\n if(key == 93 || key == 224) key = 91; // right command on webkit, command on Gecko\n if(key in _mods) {\n _mods[key] = true;\n // 'assignKey' from inside this closure is exported to window.key\n for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = true;\n return;\n }\n updateModifierKey(event);\n\n // see if we need to ignore the keypress (filter() can can be overridden)\n // by default ignore key presses if a select, textarea, or input is focused\n if(!assignKey.filter.call(this, event)) return;\n\n // abort if no potentially matching shortcuts found\n if (!(key in _handlers)) return;\n\n scope = getScope();\n\n // for each potential shortcut\n for (i = 0; i < _handlers[key].length; i++) {\n handler = _handlers[key][i];\n\n // see if it's in the current scope\n if(handler.scope == scope || handler.scope == 'all'){\n // check if modifiers match if any\n modifiersMatch = handler.mods.length > 0;\n for(k in _mods)\n if((!_mods[k] && index(handler.mods, +k) > -1) ||\n (_mods[k] && index(handler.mods, +k) == -1)) modifiersMatch = false;\n // call the handler and stop the event if neccessary\n if((handler.mods.length == 0 && !_mods[16] && !_mods[18] && !_mods[17] && !_mods[91]) || modifiersMatch){\n if(handler.method(event, handler)===false){\n if(event.preventDefault) event.preventDefault();\n else event.returnValue = false;\n if(event.stopPropagation) event.stopPropagation();\n if(event.cancelBubble) event.cancelBubble = true;\n }\n }\n }\n }\n };\n\n // unset modifier keys on keyup\n function clearModifier(event){\n var key = event.keyCode, k,\n i = index(_downKeys, key);\n\n // remove key from _downKeys\n if (i >= 0) {\n _downKeys.splice(i, 1);\n }\n\n if(key == 93 || key == 224) key = 91;\n if(key in _mods) {\n _mods[key] = false;\n for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = false;\n }\n };\n\n function resetModifiers() {\n for(k in _mods) _mods[k] = false;\n for(k in _MODIFIERS) assignKey[k] = false;\n };\n\n // parse and assign shortcut\n function assignKey(key, scope, method){\n var keys, mods;\n keys = getKeys(key);\n if (method === undefined) {\n method = scope;\n scope = 'all';\n }\n\n // for each shortcut\n for (var i = 0; i < keys.length; i++) {\n // set modifier keys if any\n mods = [];\n key = keys[i].split('+');\n if (key.length > 1){\n mods = getMods(key);\n key = [key[key.length-1]];\n }\n // convert to keycode and...\n key = key[0]\n key = code(key);\n // ...store handler\n if (!(key in _handlers)) _handlers[key] = [];\n _handlers[key].push({ shortcut: keys[i], scope: scope, method: method, key: keys[i], mods: mods });\n }\n };\n\n // unbind all handlers for given key in current scope\n function unbindKey(key, scope) {\n var multipleKeys, keys,\n mods = [],\n i, j, obj;\n\n multipleKeys = getKeys(key);\n\n for (j = 0; j < multipleKeys.length; j++) {\n keys = multipleKeys[j].split('+');\n\n if (keys.length > 1) {\n mods = getMods(keys);\n key = keys[keys.length - 1];\n }\n\n key = code(key);\n\n if (scope === undefined) {\n scope = getScope();\n }\n if (!_handlers[key]) {\n return;\n }\n for (i = 0; i < _handlers[key].length; i++) {\n obj = _handlers[key][i];\n // only clear handlers if correct scope and mods match\n if (obj.scope === scope && compareArray(obj.mods, mods)) {\n _handlers[key][i] = {};\n }\n }\n }\n };\n\n // Returns true if the key with code 'keyCode' is currently down\n // Converts strings into key codes.\n function isPressed(keyCode) {\n if (typeof(keyCode)=='string') {\n keyCode = code(keyCode);\n }\n return index(_downKeys, keyCode) != -1;\n }\n\n function getPressedKeyCodes() {\n return _downKeys.slice(0);\n }\n\n function filter(event){\n var tagName = (event.target || event.srcElement).tagName;\n // ignore keypressed in any elements that support keyboard data input\n return !(tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA');\n }\n\n // initialize key. to false\n for(k in _MODIFIERS) assignKey[k] = false;\n\n // set current scope (default 'all')\n function setScope(scope){ _scope = scope || 'all' };\n function getScope(){ return _scope || 'all' };\n\n // delete all handlers for a given scope\n function deleteScope(scope){\n var key, handlers, i;\n\n for (key in _handlers) {\n handlers = _handlers[key];\n for (i = 0; i < handlers.length; ) {\n if (handlers[i].scope === scope) handlers.splice(i, 1);\n else i++;\n }\n }\n };\n\n // abstract key logic for assign and unassign\n function getKeys(key) {\n var keys;\n key = key.replace(/\\s/g, '');\n keys = key.split(',');\n if ((keys[keys.length - 1]) == '') {\n keys[keys.length - 2] += ',';\n }\n return keys;\n }\n\n // abstract mods logic for assign and unassign\n function getMods(key) {\n var mods = key.slice(0, key.length - 1);\n for (var mi = 0; mi < mods.length; mi++)\n mods[mi] = _MODIFIERS[mods[mi]];\n return mods;\n }\n\n // cross-browser events\n function addEvent(object, event, method) {\n if (object.addEventListener)\n object.addEventListener(event, method, false);\n else if(object.attachEvent)\n object.attachEvent('on'+event, function(){ method(window.event) });\n };\n\n // set the handlers globally on document\n addEvent(document, 'keydown', function(event) { dispatch(event) }); // Passing _scope to a callback to ensure it remains the same by execution. Fixes #48\n addEvent(document, 'keyup', clearModifier);\n\n // reset modifiers to false whenever the window is (re)focused.\n addEvent(window, 'focus', resetModifiers);\n\n // store previously defined key\n var previousKey = global.key;\n\n // restore previously defined key and return reference to our key object\n function noConflict() {\n var k = global.key;\n global.key = previousKey;\n return k;\n }\n\n // set window.key and window.key.set/get/deleteScope, and the default filter\n global.key = assignKey;\n global.key.setScope = setScope;\n global.key.getScope = getScope;\n global.key.deleteScope = deleteScope;\n global.key.filter = filter;\n global.key.isPressed = isPressed;\n global.key.getPressedKeyCodes = getPressedKeyCodes;\n global.key.noConflict = noConflict;\n global.key.unbind = unbindKey;\n\n if(typeof module !== 'undefined') module.exports = assignKey;\n\n})(this);\n","import promiseFinally from './finally';\n\n// Store setTimeout reference so promise-polyfill will be unaffected by\n// other code modifying setTimeout (like sinon.useFakeTimers())\nvar setTimeoutFunc = setTimeout;\n\nfunction isArray(x) {\n return Boolean(x && typeof x.length !== 'undefined');\n}\n\nfunction noop() {}\n\n// Polyfill for Function.prototype.bind\nfunction bind(fn, thisArg) {\n return function() {\n fn.apply(thisArg, arguments);\n };\n}\n\n/**\n * @constructor\n * @param {Function} fn\n */\nfunction Promise(fn) {\n if (!(this instanceof Promise))\n throw new TypeError('Promises must be constructed via new');\n if (typeof fn !== 'function') throw new TypeError('not a function');\n /** @type {!number} */\n this._state = 0;\n /** @type {!boolean} */\n this._handled = false;\n /** @type {Promise|undefined} */\n this._value = undefined;\n /** @type {!Array} */\n this._deferreds = [];\n\n doResolve(fn, this);\n}\n\nfunction handle(self, deferred) {\n while (self._state === 3) {\n self = self._value;\n }\n if (self._state === 0) {\n self._deferreds.push(deferred);\n return;\n }\n self._handled = true;\n Promise._immediateFn(function() {\n var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n return;\n }\n var ret;\n try {\n ret = cb(self._value);\n } catch (e) {\n reject(deferred.promise, e);\n return;\n }\n resolve(deferred.promise, ret);\n });\n}\n\nfunction resolve(self, newValue) {\n try {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self)\n throw new TypeError('A promise cannot be resolved with itself.');\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = newValue.then;\n if (newValue instanceof Promise) {\n self._state = 3;\n self._value = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(bind(then, newValue), self);\n return;\n }\n }\n self._state = 1;\n self._value = newValue;\n finale(self);\n } catch (e) {\n reject(self, e);\n }\n}\n\nfunction reject(self, newValue) {\n self._state = 2;\n self._value = newValue;\n finale(self);\n}\n\nfunction finale(self) {\n if (self._state === 2 && self._deferreds.length === 0) {\n Promise._immediateFn(function() {\n if (!self._handled) {\n Promise._unhandledRejectionFn(self._value);\n }\n });\n }\n\n for (var i = 0, len = self._deferreds.length; i < len; i++) {\n handle(self, self._deferreds[i]);\n }\n self._deferreds = null;\n}\n\n/**\n * @constructor\n */\nfunction Handler(onFulfilled, onRejected, promise) {\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}\n\nPromise.prototype['catch'] = function(onRejected) {\n return this.then(null, onRejected);\n};\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n // @ts-ignore\n var prom = new this.constructor(noop);\n\n handle(this, new Handler(onFulfilled, onRejected, prom));\n return prom;\n};\n\nPromise.prototype['finally'] = promiseFinally;\n\nPromise.all = function(arr) {\n return new Promise(function(resolve, reject) {\n if (!isArray(arr)) {\n return reject(new TypeError('Promise.all accepts an array'));\n }\n\n var args = Array.prototype.slice.call(arr);\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n\n function res(i, val) {\n try {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n var then = val.then;\n if (typeof then === 'function') {\n then.call(\n val,\n function(val) {\n res(i, val);\n },\n reject\n );\n return;\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n } catch (ex) {\n reject(ex);\n }\n }\n\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.resolve = function(value) {\n if (value && typeof value === 'object' && value.constructor === Promise) {\n return value;\n }\n\n return new Promise(function(resolve) {\n resolve(value);\n });\n};\n\nPromise.reject = function(value) {\n return new Promise(function(resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function(arr) {\n return new Promise(function(resolve, reject) {\n if (!isArray(arr)) {\n return reject(new TypeError('Promise.race accepts an array'));\n }\n\n for (var i = 0, len = arr.length; i < len; i++) {\n Promise.resolve(arr[i]).then(resolve, reject);\n }\n });\n};\n\n// Use polyfill for setImmediate for performance gains\nPromise._immediateFn =\n // @ts-ignore\n (typeof setImmediate === 'function' &&\n function(fn) {\n // @ts-ignore\n setImmediate(fn);\n }) ||\n function(fn) {\n setTimeoutFunc(fn, 0);\n };\n\nPromise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\n if (typeof console !== 'undefined' && console) {\n console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\n }\n};\n\nexport default Promise;\n","import Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n defaults: {\n id: '',\n label: '',\n tagName: 'span',\n className: '',\n command: '',\n context: '',\n buttons: [],\n attributes: {},\n options: {},\n active: false,\n dragDrop: false,\n togglable: true,\n runDefaultCommand: true,\n stopDefaultCommand: false,\n disable: false\n },\n\n initialize(options) {\n if (this.get('buttons').length) {\n var Buttons = require('./Buttons').default;\n this.set('buttons', new Buttons(this.get('buttons')));\n }\n }\n});\n","import Backbone from 'backbone';\nimport Button from './Button';\n\nexport default Backbone.Collection.extend({\n model: Button,\n\n /**\n * Deactivate all buttons, except one passed\n * @param {Object} except Model to ignore\n * @param {Boolean} r Recursive flag\n *\n * @return void\n * */\n deactivateAllExceptOne(except, r) {\n this.forEach((model, index) => {\n if (model !== except) {\n model.set('active', false);\n if (r && model.get('buttons').length)\n model.get('buttons').deactivateAllExceptOne(except, r);\n }\n });\n },\n\n /**\n * Deactivate all buttons\n * @param {String} ctx Context string\n *\n * @return void\n * */\n deactivateAll(ctx, sender) {\n const context = ctx || '';\n this.forEach(model => {\n if (model.get('context') == context && model !== sender) {\n model.set('active', false, { silent: 1 });\n model.trigger('updateActive', { fromCollection: 1 });\n }\n });\n },\n\n /**\n * Disables all buttons\n * @param {String} ctx Context string\n *\n * @return void\n * */\n disableAllButtons(ctx) {\n var context = ctx || '';\n this.forEach((model, index) => {\n if (model.get('context') == context) {\n model.set('disable', true);\n }\n });\n },\n\n /**\n * Disables all buttons, except one passed\n * @param {Object} except Model to ignore\n * @param {Boolean} r Recursive flag\n *\n * @return void\n * */\n disableAllButtonsExceptOne(except, r) {\n this.forEach((model, index) => {\n if (model !== except) {\n model.set('disable', true);\n if (r && model.get('buttons').length)\n model.get('buttons').disableAllButtonsExceptOne(except, r);\n }\n });\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"css\", function(config, parserConfig) {\n var inline = parserConfig.inline\n if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode(\"text/css\");\n\n var indentUnit = config.indentUnit,\n tokenHooks = parserConfig.tokenHooks,\n documentTypes = parserConfig.documentTypes || {},\n mediaTypes = parserConfig.mediaTypes || {},\n mediaFeatures = parserConfig.mediaFeatures || {},\n mediaValueKeywords = parserConfig.mediaValueKeywords || {},\n propertyKeywords = parserConfig.propertyKeywords || {},\n nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},\n fontProperties = parserConfig.fontProperties || {},\n counterDescriptors = parserConfig.counterDescriptors || {},\n colorKeywords = parserConfig.colorKeywords || {},\n valueKeywords = parserConfig.valueKeywords || {},\n allowNested = parserConfig.allowNested,\n lineComment = parserConfig.lineComment,\n supportsAtComponent = parserConfig.supportsAtComponent === true;\n\n var type, override;\n function ret(style, tp) { type = tp; return style; }\n\n // Tokenizers\n\n function tokenBase(stream, state) {\n var ch = stream.next();\n if (tokenHooks[ch]) {\n var result = tokenHooks[ch](stream, state);\n if (result !== false) return result;\n }\n if (ch == \"@\") {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret(\"def\", stream.current());\n } else if (ch == \"=\" || (ch == \"~\" || ch == \"|\") && stream.eat(\"=\")) {\n return ret(null, \"compare\");\n } else if (ch == \"\\\"\" || ch == \"'\") {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n } else if (ch == \"#\") {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret(\"atom\", \"hash\");\n } else if (ch == \"!\") {\n stream.match(/^\\s*\\w*/);\n return ret(\"keyword\", \"important\");\n } else if (/\\d/.test(ch) || ch == \".\" && stream.eat(/\\d/)) {\n stream.eatWhile(/[\\w.%]/);\n return ret(\"number\", \"unit\");\n } else if (ch === \"-\") {\n if (/[\\d.]/.test(stream.peek())) {\n stream.eatWhile(/[\\w.%]/);\n return ret(\"number\", \"unit\");\n } else if (stream.match(/^-[\\w\\\\\\-]*/)) {\n stream.eatWhile(/[\\w\\\\\\-]/);\n if (stream.match(/^\\s*:/, false))\n return ret(\"variable-2\", \"variable-definition\");\n return ret(\"variable-2\", \"variable\");\n } else if (stream.match(/^\\w+-/)) {\n return ret(\"meta\", \"meta\");\n }\n } else if (/[,+>*\\/]/.test(ch)) {\n return ret(null, \"select-op\");\n } else if (ch == \".\" && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {\n return ret(\"qualifier\", \"qualifier\");\n } else if (/[:;{}\\[\\]\\(\\)]/.test(ch)) {\n return ret(null, ch);\n } else if (stream.match(/[\\w-.]+(?=\\()/)) {\n if (/^(url(-prefix)?|domain|regexp)$/.test(stream.current().toLowerCase())) {\n state.tokenize = tokenParenthesized;\n }\n return ret(\"variable callee\", \"variable\");\n } else if (/[\\w\\\\\\-]/.test(ch)) {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret(\"property\", \"word\");\n } else {\n return ret(null, null);\n }\n }\n\n function tokenString(quote) {\n return function(stream, state) {\n var escaped = false, ch;\n while ((ch = stream.next()) != null) {\n if (ch == quote && !escaped) {\n if (quote == \")\") stream.backUp(1);\n break;\n }\n escaped = !escaped && ch == \"\\\\\";\n }\n if (ch == quote || !escaped && quote != \")\") state.tokenize = null;\n return ret(\"string\", \"string\");\n };\n }\n\n function tokenParenthesized(stream, state) {\n stream.next(); // Must be '('\n if (!stream.match(/\\s*[\\\"\\')]/, false))\n state.tokenize = tokenString(\")\");\n else\n state.tokenize = null;\n return ret(null, \"(\");\n }\n\n // Context management\n\n function Context(type, indent, prev) {\n this.type = type;\n this.indent = indent;\n this.prev = prev;\n }\n\n function pushContext(state, stream, type, indent) {\n state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);\n return type;\n }\n\n function popContext(state) {\n if (state.context.prev)\n state.context = state.context.prev;\n return state.context.type;\n }\n\n function pass(type, stream, state) {\n return states[state.context.type](type, stream, state);\n }\n function popAndPass(type, stream, state, n) {\n for (var i = n || 1; i > 0; i--)\n state.context = state.context.prev;\n return pass(type, stream, state);\n }\n\n // Parser\n\n function wordAsValue(stream) {\n var word = stream.current().toLowerCase();\n if (valueKeywords.hasOwnProperty(word))\n override = \"atom\";\n else if (colorKeywords.hasOwnProperty(word))\n override = \"keyword\";\n else\n override = \"variable\";\n }\n\n var states = {};\n\n states.top = function(type, stream, state) {\n if (type == \"{\") {\n return pushContext(state, stream, \"block\");\n } else if (type == \"}\" && state.context.prev) {\n return popContext(state);\n } else if (supportsAtComponent && /@component/i.test(type)) {\n return pushContext(state, stream, \"atComponentBlock\");\n } else if (/^@(-moz-)?document$/i.test(type)) {\n return pushContext(state, stream, \"documentTypes\");\n } else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {\n return pushContext(state, stream, \"atBlock\");\n } else if (/^@(font-face|counter-style)/i.test(type)) {\n state.stateArg = type;\n return \"restricted_atBlock_before\";\n } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {\n return \"keyframes\";\n } else if (type && type.charAt(0) == \"@\") {\n return pushContext(state, stream, \"at\");\n } else if (type == \"hash\") {\n override = \"builtin\";\n } else if (type == \"word\") {\n override = \"tag\";\n } else if (type == \"variable-definition\") {\n return \"maybeprop\";\n } else if (type == \"interpolation\") {\n return pushContext(state, stream, \"interpolation\");\n } else if (type == \":\") {\n return \"pseudo\";\n } else if (allowNested && type == \"(\") {\n return pushContext(state, stream, \"parens\");\n }\n return state.context.type;\n };\n\n states.block = function(type, stream, state) {\n if (type == \"word\") {\n var word = stream.current().toLowerCase();\n if (propertyKeywords.hasOwnProperty(word)) {\n override = \"property\";\n return \"maybeprop\";\n } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {\n override = \"string-2\";\n return \"maybeprop\";\n } else if (allowNested) {\n override = stream.match(/^\\s*:(?:\\s|$)/, false) ? \"property\" : \"tag\";\n return \"block\";\n } else {\n override += \" error\";\n return \"maybeprop\";\n }\n } else if (type == \"meta\") {\n return \"block\";\n } else if (!allowNested && (type == \"hash\" || type == \"qualifier\")) {\n override = \"error\";\n return \"block\";\n } else {\n return states.top(type, stream, state);\n }\n };\n\n states.maybeprop = function(type, stream, state) {\n if (type == \":\") return pushContext(state, stream, \"prop\");\n return pass(type, stream, state);\n };\n\n states.prop = function(type, stream, state) {\n if (type == \";\") return popContext(state);\n if (type == \"{\" && allowNested) return pushContext(state, stream, \"propBlock\");\n if (type == \"}\" || type == \"{\") return popAndPass(type, stream, state);\n if (type == \"(\") return pushContext(state, stream, \"parens\");\n\n if (type == \"hash\" && !/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(stream.current())) {\n override += \" error\";\n } else if (type == \"word\") {\n wordAsValue(stream);\n } else if (type == \"interpolation\") {\n return pushContext(state, stream, \"interpolation\");\n }\n return \"prop\";\n };\n\n states.propBlock = function(type, _stream, state) {\n if (type == \"}\") return popContext(state);\n if (type == \"word\") { override = \"property\"; return \"maybeprop\"; }\n return state.context.type;\n };\n\n states.parens = function(type, stream, state) {\n if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state);\n if (type == \")\") return popContext(state);\n if (type == \"(\") return pushContext(state, stream, \"parens\");\n if (type == \"interpolation\") return pushContext(state, stream, \"interpolation\");\n if (type == \"word\") wordAsValue(stream);\n return \"parens\";\n };\n\n states.pseudo = function(type, stream, state) {\n if (type == \"meta\") return \"pseudo\";\n\n if (type == \"word\") {\n override = \"variable-3\";\n return state.context.type;\n }\n return pass(type, stream, state);\n };\n\n states.documentTypes = function(type, stream, state) {\n if (type == \"word\" && documentTypes.hasOwnProperty(stream.current())) {\n override = \"tag\";\n return state.context.type;\n } else {\n return states.atBlock(type, stream, state);\n }\n };\n\n states.atBlock = function(type, stream, state) {\n if (type == \"(\") return pushContext(state, stream, \"atBlock_parens\");\n if (type == \"}\" || type == \";\") return popAndPass(type, stream, state);\n if (type == \"{\") return popContext(state) && pushContext(state, stream, allowNested ? \"block\" : \"top\");\n\n if (type == \"interpolation\") return pushContext(state, stream, \"interpolation\");\n\n if (type == \"word\") {\n var word = stream.current().toLowerCase();\n if (word == \"only\" || word == \"not\" || word == \"and\" || word == \"or\")\n override = \"keyword\";\n else if (mediaTypes.hasOwnProperty(word))\n override = \"attribute\";\n else if (mediaFeatures.hasOwnProperty(word))\n override = \"property\";\n else if (mediaValueKeywords.hasOwnProperty(word))\n override = \"keyword\";\n else if (propertyKeywords.hasOwnProperty(word))\n override = \"property\";\n else if (nonStandardPropertyKeywords.hasOwnProperty(word))\n override = \"string-2\";\n else if (valueKeywords.hasOwnProperty(word))\n override = \"atom\";\n else if (colorKeywords.hasOwnProperty(word))\n override = \"keyword\";\n else\n override = \"error\";\n }\n return state.context.type;\n };\n\n states.atComponentBlock = function(type, stream, state) {\n if (type == \"}\")\n return popAndPass(type, stream, state);\n if (type == \"{\")\n return popContext(state) && pushContext(state, stream, allowNested ? \"block\" : \"top\", false);\n if (type == \"word\")\n override = \"error\";\n return state.context.type;\n };\n\n states.atBlock_parens = function(type, stream, state) {\n if (type == \")\") return popContext(state);\n if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state, 2);\n return states.atBlock(type, stream, state);\n };\n\n states.restricted_atBlock_before = function(type, stream, state) {\n if (type == \"{\")\n return pushContext(state, stream, \"restricted_atBlock\");\n if (type == \"word\" && state.stateArg == \"@counter-style\") {\n override = \"variable\";\n return \"restricted_atBlock_before\";\n }\n return pass(type, stream, state);\n };\n\n states.restricted_atBlock = function(type, stream, state) {\n if (type == \"}\") {\n state.stateArg = null;\n return popContext(state);\n }\n if (type == \"word\") {\n if ((state.stateArg == \"@font-face\" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||\n (state.stateArg == \"@counter-style\" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))\n override = \"error\";\n else\n override = \"property\";\n return \"maybeprop\";\n }\n return \"restricted_atBlock\";\n };\n\n states.keyframes = function(type, stream, state) {\n if (type == \"word\") { override = \"variable\"; return \"keyframes\"; }\n if (type == \"{\") return pushContext(state, stream, \"top\");\n return pass(type, stream, state);\n };\n\n states.at = function(type, stream, state) {\n if (type == \";\") return popContext(state);\n if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state);\n if (type == \"word\") override = \"tag\";\n else if (type == \"hash\") override = \"builtin\";\n return \"at\";\n };\n\n states.interpolation = function(type, stream, state) {\n if (type == \"}\") return popContext(state);\n if (type == \"{\" || type == \";\") return popAndPass(type, stream, state);\n if (type == \"word\") override = \"variable\";\n else if (type != \"variable\" && type != \"(\" && type != \")\") override = \"error\";\n return \"interpolation\";\n };\n\n return {\n startState: function(base) {\n return {tokenize: null,\n state: inline ? \"block\" : \"top\",\n stateArg: null,\n context: new Context(inline ? \"block\" : \"top\", base || 0, null)};\n },\n\n token: function(stream, state) {\n if (!state.tokenize && stream.eatSpace()) return null;\n var style = (state.tokenize || tokenBase)(stream, state);\n if (style && typeof style == \"object\") {\n type = style[1];\n style = style[0];\n }\n override = style;\n if (type != \"comment\")\n state.state = states[state.state](type, stream, state);\n return override;\n },\n\n indent: function(state, textAfter) {\n var cx = state.context, ch = textAfter && textAfter.charAt(0);\n var indent = cx.indent;\n if (cx.type == \"prop\" && (ch == \"}\" || ch == \")\")) cx = cx.prev;\n if (cx.prev) {\n if (ch == \"}\" && (cx.type == \"block\" || cx.type == \"top\" ||\n cx.type == \"interpolation\" || cx.type == \"restricted_atBlock\")) {\n // Resume indentation from parent context.\n cx = cx.prev;\n indent = cx.indent;\n } else if (ch == \")\" && (cx.type == \"parens\" || cx.type == \"atBlock_parens\") ||\n ch == \"{\" && (cx.type == \"at\" || cx.type == \"atBlock\")) {\n // Dedent relative to current context.\n indent = Math.max(0, cx.indent - indentUnit);\n }\n }\n return indent;\n },\n\n electricChars: \"}\",\n blockCommentStart: \"/*\",\n blockCommentEnd: \"*/\",\n blockCommentContinue: \" * \",\n lineComment: lineComment,\n fold: \"brace\"\n };\n});\n\n function keySet(array) {\n var keys = {};\n for (var i = 0; i < array.length; ++i) {\n keys[array[i].toLowerCase()] = true;\n }\n return keys;\n }\n\n var documentTypes_ = [\n \"domain\", \"regexp\", \"url\", \"url-prefix\"\n ], documentTypes = keySet(documentTypes_);\n\n var mediaTypes_ = [\n \"all\", \"aural\", \"braille\", \"handheld\", \"print\", \"projection\", \"screen\",\n \"tty\", \"tv\", \"embossed\"\n ], mediaTypes = keySet(mediaTypes_);\n\n var mediaFeatures_ = [\n \"width\", \"min-width\", \"max-width\", \"height\", \"min-height\", \"max-height\",\n \"device-width\", \"min-device-width\", \"max-device-width\", \"device-height\",\n \"min-device-height\", \"max-device-height\", \"aspect-ratio\",\n \"min-aspect-ratio\", \"max-aspect-ratio\", \"device-aspect-ratio\",\n \"min-device-aspect-ratio\", \"max-device-aspect-ratio\", \"color\", \"min-color\",\n \"max-color\", \"color-index\", \"min-color-index\", \"max-color-index\",\n \"monochrome\", \"min-monochrome\", \"max-monochrome\", \"resolution\",\n \"min-resolution\", \"max-resolution\", \"scan\", \"grid\", \"orientation\",\n \"device-pixel-ratio\", \"min-device-pixel-ratio\", \"max-device-pixel-ratio\",\n \"pointer\", \"any-pointer\", \"hover\", \"any-hover\"\n ], mediaFeatures = keySet(mediaFeatures_);\n\n var mediaValueKeywords_ = [\n \"landscape\", \"portrait\", \"none\", \"coarse\", \"fine\", \"on-demand\", \"hover\",\n \"interlace\", \"progressive\"\n ], mediaValueKeywords = keySet(mediaValueKeywords_);\n\n var propertyKeywords_ = [\n \"align-content\", \"align-items\", \"align-self\", \"alignment-adjust\",\n \"alignment-baseline\", \"anchor-point\", \"animation\", \"animation-delay\",\n \"animation-direction\", \"animation-duration\", \"animation-fill-mode\",\n \"animation-iteration-count\", \"animation-name\", \"animation-play-state\",\n \"animation-timing-function\", \"appearance\", \"azimuth\", \"backface-visibility\",\n \"background\", \"background-attachment\", \"background-blend-mode\", \"background-clip\",\n \"background-color\", \"background-image\", \"background-origin\", \"background-position\",\n \"background-repeat\", \"background-size\", \"baseline-shift\", \"binding\",\n \"bleed\", \"bookmark-label\", \"bookmark-level\", \"bookmark-state\",\n \"bookmark-target\", \"border\", \"border-bottom\", \"border-bottom-color\",\n \"border-bottom-left-radius\", \"border-bottom-right-radius\",\n \"border-bottom-style\", \"border-bottom-width\", \"border-collapse\",\n \"border-color\", \"border-image\", \"border-image-outset\",\n \"border-image-repeat\", \"border-image-slice\", \"border-image-source\",\n \"border-image-width\", \"border-left\", \"border-left-color\",\n \"border-left-style\", \"border-left-width\", \"border-radius\", \"border-right\",\n \"border-right-color\", \"border-right-style\", \"border-right-width\",\n \"border-spacing\", \"border-style\", \"border-top\", \"border-top-color\",\n \"border-top-left-radius\", \"border-top-right-radius\", \"border-top-style\",\n \"border-top-width\", \"border-width\", \"bottom\", \"box-decoration-break\",\n \"box-shadow\", \"box-sizing\", \"break-after\", \"break-before\", \"break-inside\",\n \"caption-side\", \"caret-color\", \"clear\", \"clip\", \"color\", \"color-profile\", \"column-count\",\n \"column-fill\", \"column-gap\", \"column-rule\", \"column-rule-color\",\n \"column-rule-style\", \"column-rule-width\", \"column-span\", \"column-width\",\n \"columns\", \"content\", \"counter-increment\", \"counter-reset\", \"crop\", \"cue\",\n \"cue-after\", \"cue-before\", \"cursor\", \"direction\", \"display\",\n \"dominant-baseline\", \"drop-initial-after-adjust\",\n \"drop-initial-after-align\", \"drop-initial-before-adjust\",\n \"drop-initial-before-align\", \"drop-initial-size\", \"drop-initial-value\",\n \"elevation\", \"empty-cells\", \"fit\", \"fit-position\", \"flex\", \"flex-basis\",\n \"flex-direction\", \"flex-flow\", \"flex-grow\", \"flex-shrink\", \"flex-wrap\",\n \"float\", \"float-offset\", \"flow-from\", \"flow-into\", \"font\", \"font-feature-settings\",\n \"font-family\", \"font-kerning\", \"font-language-override\", \"font-size\", \"font-size-adjust\",\n \"font-stretch\", \"font-style\", \"font-synthesis\", \"font-variant\",\n \"font-variant-alternates\", \"font-variant-caps\", \"font-variant-east-asian\",\n \"font-variant-ligatures\", \"font-variant-numeric\", \"font-variant-position\",\n \"font-weight\", \"grid\", \"grid-area\", \"grid-auto-columns\", \"grid-auto-flow\",\n \"grid-auto-rows\", \"grid-column\", \"grid-column-end\", \"grid-column-gap\",\n \"grid-column-start\", \"grid-gap\", \"grid-row\", \"grid-row-end\", \"grid-row-gap\",\n \"grid-row-start\", \"grid-template\", \"grid-template-areas\", \"grid-template-columns\",\n \"grid-template-rows\", \"hanging-punctuation\", \"height\", \"hyphens\",\n \"icon\", \"image-orientation\", \"image-rendering\", \"image-resolution\",\n \"inline-box-align\", \"justify-content\", \"justify-items\", \"justify-self\", \"left\", \"letter-spacing\",\n \"line-break\", \"line-height\", \"line-stacking\", \"line-stacking-ruby\",\n \"line-stacking-shift\", \"line-stacking-strategy\", \"list-style\",\n \"list-style-image\", \"list-style-position\", \"list-style-type\", \"margin\",\n \"margin-bottom\", \"margin-left\", \"margin-right\", \"margin-top\",\n \"marks\", \"marquee-direction\", \"marquee-loop\",\n \"marquee-play-count\", \"marquee-speed\", \"marquee-style\", \"max-height\",\n \"max-width\", \"min-height\", \"min-width\", \"mix-blend-mode\", \"move-to\", \"nav-down\", \"nav-index\",\n \"nav-left\", \"nav-right\", \"nav-up\", \"object-fit\", \"object-position\",\n \"opacity\", \"order\", \"orphans\", \"outline\",\n \"outline-color\", \"outline-offset\", \"outline-style\", \"outline-width\",\n \"overflow\", \"overflow-style\", \"overflow-wrap\", \"overflow-x\", \"overflow-y\",\n \"padding\", \"padding-bottom\", \"padding-left\", \"padding-right\", \"padding-top\",\n \"page\", \"page-break-after\", \"page-break-before\", \"page-break-inside\",\n \"page-policy\", \"pause\", \"pause-after\", \"pause-before\", \"perspective\",\n \"perspective-origin\", \"pitch\", \"pitch-range\", \"place-content\", \"place-items\", \"place-self\", \"play-during\", \"position\",\n \"presentation-level\", \"punctuation-trim\", \"quotes\", \"region-break-after\",\n \"region-break-before\", \"region-break-inside\", \"region-fragment\",\n \"rendering-intent\", \"resize\", \"rest\", \"rest-after\", \"rest-before\", \"richness\",\n \"right\", \"rotation\", \"rotation-point\", \"ruby-align\", \"ruby-overhang\",\n \"ruby-position\", \"ruby-span\", \"shape-image-threshold\", \"shape-inside\", \"shape-margin\",\n \"shape-outside\", \"size\", \"speak\", \"speak-as\", \"speak-header\",\n \"speak-numeral\", \"speak-punctuation\", \"speech-rate\", \"stress\", \"string-set\",\n \"tab-size\", \"table-layout\", \"target\", \"target-name\", \"target-new\",\n \"target-position\", \"text-align\", \"text-align-last\", \"text-decoration\",\n \"text-decoration-color\", \"text-decoration-line\", \"text-decoration-skip\",\n \"text-decoration-style\", \"text-emphasis\", \"text-emphasis-color\",\n \"text-emphasis-position\", \"text-emphasis-style\", \"text-height\",\n \"text-indent\", \"text-justify\", \"text-outline\", \"text-overflow\", \"text-shadow\",\n \"text-size-adjust\", \"text-space-collapse\", \"text-transform\", \"text-underline-position\",\n \"text-wrap\", \"top\", \"transform\", \"transform-origin\", \"transform-style\",\n \"transition\", \"transition-delay\", \"transition-duration\",\n \"transition-property\", \"transition-timing-function\", \"unicode-bidi\",\n \"user-select\", \"vertical-align\", \"visibility\", \"voice-balance\", \"voice-duration\",\n \"voice-family\", \"voice-pitch\", \"voice-range\", \"voice-rate\", \"voice-stress\",\n \"voice-volume\", \"volume\", \"white-space\", \"widows\", \"width\", \"will-change\", \"word-break\",\n \"word-spacing\", \"word-wrap\", \"z-index\",\n // SVG-specific\n \"clip-path\", \"clip-rule\", \"mask\", \"enable-background\", \"filter\", \"flood-color\",\n \"flood-opacity\", \"lighting-color\", \"stop-color\", \"stop-opacity\", \"pointer-events\",\n \"color-interpolation\", \"color-interpolation-filters\",\n \"color-rendering\", \"fill\", \"fill-opacity\", \"fill-rule\", \"image-rendering\",\n \"marker\", \"marker-end\", \"marker-mid\", \"marker-start\", \"shape-rendering\", \"stroke\",\n \"stroke-dasharray\", \"stroke-dashoffset\", \"stroke-linecap\", \"stroke-linejoin\",\n \"stroke-miterlimit\", \"stroke-opacity\", \"stroke-width\", \"text-rendering\",\n \"baseline-shift\", \"dominant-baseline\", \"glyph-orientation-horizontal\",\n \"glyph-orientation-vertical\", \"text-anchor\", \"writing-mode\"\n ], propertyKeywords = keySet(propertyKeywords_);\n\n var nonStandardPropertyKeywords_ = [\n \"scrollbar-arrow-color\", \"scrollbar-base-color\", \"scrollbar-dark-shadow-color\",\n \"scrollbar-face-color\", \"scrollbar-highlight-color\", \"scrollbar-shadow-color\",\n \"scrollbar-3d-light-color\", \"scrollbar-track-color\", \"shape-inside\",\n \"searchfield-cancel-button\", \"searchfield-decoration\", \"searchfield-results-button\",\n \"searchfield-results-decoration\", \"zoom\"\n ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);\n\n var fontProperties_ = [\n \"font-family\", \"src\", \"unicode-range\", \"font-variant\", \"font-feature-settings\",\n \"font-stretch\", \"font-weight\", \"font-style\"\n ], fontProperties = keySet(fontProperties_);\n\n var counterDescriptors_ = [\n \"additive-symbols\", \"fallback\", \"negative\", \"pad\", \"prefix\", \"range\",\n \"speak-as\", \"suffix\", \"symbols\", \"system\"\n ], counterDescriptors = keySet(counterDescriptors_);\n\n var colorKeywords_ = [\n \"aliceblue\", \"antiquewhite\", \"aqua\", \"aquamarine\", \"azure\", \"beige\",\n \"bisque\", \"black\", \"blanchedalmond\", \"blue\", \"blueviolet\", \"brown\",\n \"burlywood\", \"cadetblue\", \"chartreuse\", \"chocolate\", \"coral\", \"cornflowerblue\",\n \"cornsilk\", \"crimson\", \"cyan\", \"darkblue\", \"darkcyan\", \"darkgoldenrod\",\n \"darkgray\", \"darkgreen\", \"darkkhaki\", \"darkmagenta\", \"darkolivegreen\",\n \"darkorange\", \"darkorchid\", \"darkred\", \"darksalmon\", \"darkseagreen\",\n \"darkslateblue\", \"darkslategray\", \"darkturquoise\", \"darkviolet\",\n \"deeppink\", \"deepskyblue\", \"dimgray\", \"dodgerblue\", \"firebrick\",\n \"floralwhite\", \"forestgreen\", \"fuchsia\", \"gainsboro\", \"ghostwhite\",\n \"gold\", \"goldenrod\", \"gray\", \"grey\", \"green\", \"greenyellow\", \"honeydew\",\n \"hotpink\", \"indianred\", \"indigo\", \"ivory\", \"khaki\", \"lavender\",\n \"lavenderblush\", \"lawngreen\", \"lemonchiffon\", \"lightblue\", \"lightcoral\",\n \"lightcyan\", \"lightgoldenrodyellow\", \"lightgray\", \"lightgreen\", \"lightpink\",\n \"lightsalmon\", \"lightseagreen\", \"lightskyblue\", \"lightslategray\",\n \"lightsteelblue\", \"lightyellow\", \"lime\", \"limegreen\", \"linen\", \"magenta\",\n \"maroon\", \"mediumaquamarine\", \"mediumblue\", \"mediumorchid\", \"mediumpurple\",\n \"mediumseagreen\", \"mediumslateblue\", \"mediumspringgreen\", \"mediumturquoise\",\n \"mediumvioletred\", \"midnightblue\", \"mintcream\", \"mistyrose\", \"moccasin\",\n \"navajowhite\", \"navy\", \"oldlace\", \"olive\", \"olivedrab\", \"orange\", \"orangered\",\n \"orchid\", \"palegoldenrod\", \"palegreen\", \"paleturquoise\", \"palevioletred\",\n \"papayawhip\", \"peachpuff\", \"peru\", \"pink\", \"plum\", \"powderblue\",\n \"purple\", \"rebeccapurple\", \"red\", \"rosybrown\", \"royalblue\", \"saddlebrown\",\n \"salmon\", \"sandybrown\", \"seagreen\", \"seashell\", \"sienna\", \"silver\", \"skyblue\",\n \"slateblue\", \"slategray\", \"snow\", \"springgreen\", \"steelblue\", \"tan\",\n \"teal\", \"thistle\", \"tomato\", \"turquoise\", \"violet\", \"wheat\", \"white\",\n \"whitesmoke\", \"yellow\", \"yellowgreen\"\n ], colorKeywords = keySet(colorKeywords_);\n\n var valueKeywords_ = [\n \"above\", \"absolute\", \"activeborder\", \"additive\", \"activecaption\", \"afar\",\n \"after-white-space\", \"ahead\", \"alias\", \"all\", \"all-scroll\", \"alphabetic\", \"alternate\",\n \"always\", \"amharic\", \"amharic-abegede\", \"antialiased\", \"appworkspace\",\n \"arabic-indic\", \"armenian\", \"asterisks\", \"attr\", \"auto\", \"auto-flow\", \"avoid\", \"avoid-column\", \"avoid-page\",\n \"avoid-region\", \"background\", \"backwards\", \"baseline\", \"below\", \"bidi-override\", \"binary\",\n \"bengali\", \"blink\", \"block\", \"block-axis\", \"bold\", \"bolder\", \"border\", \"border-box\",\n \"both\", \"bottom\", \"break\", \"break-all\", \"break-word\", \"bullets\", \"button\", \"button-bevel\",\n \"buttonface\", \"buttonhighlight\", \"buttonshadow\", \"buttontext\", \"calc\", \"cambodian\",\n \"capitalize\", \"caps-lock-indicator\", \"caption\", \"captiontext\", \"caret\",\n \"cell\", \"center\", \"checkbox\", \"circle\", \"cjk-decimal\", \"cjk-earthly-branch\",\n \"cjk-heavenly-stem\", \"cjk-ideographic\", \"clear\", \"clip\", \"close-quote\",\n \"col-resize\", \"collapse\", \"color\", \"color-burn\", \"color-dodge\", \"column\", \"column-reverse\",\n \"compact\", \"condensed\", \"contain\", \"content\", \"contents\",\n \"content-box\", \"context-menu\", \"continuous\", \"copy\", \"counter\", \"counters\", \"cover\", \"crop\",\n \"cross\", \"crosshair\", \"currentcolor\", \"cursive\", \"cyclic\", \"darken\", \"dashed\", \"decimal\",\n \"decimal-leading-zero\", \"default\", \"default-button\", \"dense\", \"destination-atop\",\n \"destination-in\", \"destination-out\", \"destination-over\", \"devanagari\", \"difference\",\n \"disc\", \"discard\", \"disclosure-closed\", \"disclosure-open\", \"document\",\n \"dot-dash\", \"dot-dot-dash\",\n \"dotted\", \"double\", \"down\", \"e-resize\", \"ease\", \"ease-in\", \"ease-in-out\", \"ease-out\",\n \"element\", \"ellipse\", \"ellipsis\", \"embed\", \"end\", \"ethiopic\", \"ethiopic-abegede\",\n \"ethiopic-abegede-am-et\", \"ethiopic-abegede-gez\", \"ethiopic-abegede-ti-er\",\n \"ethiopic-abegede-ti-et\", \"ethiopic-halehame-aa-er\",\n \"ethiopic-halehame-aa-et\", \"ethiopic-halehame-am-et\",\n \"ethiopic-halehame-gez\", \"ethiopic-halehame-om-et\",\n \"ethiopic-halehame-sid-et\", \"ethiopic-halehame-so-et\",\n \"ethiopic-halehame-ti-er\", \"ethiopic-halehame-ti-et\", \"ethiopic-halehame-tig\",\n \"ethiopic-numeric\", \"ew-resize\", \"exclusion\", \"expanded\", \"extends\", \"extra-condensed\",\n \"extra-expanded\", \"fantasy\", \"fast\", \"fill\", \"fixed\", \"flat\", \"flex\", \"flex-end\", \"flex-start\", \"footnotes\",\n \"forwards\", \"from\", \"geometricPrecision\", \"georgian\", \"graytext\", \"grid\", \"groove\",\n \"gujarati\", \"gurmukhi\", \"hand\", \"hangul\", \"hangul-consonant\", \"hard-light\", \"hebrew\",\n \"help\", \"hidden\", \"hide\", \"higher\", \"highlight\", \"highlighttext\",\n \"hiragana\", \"hiragana-iroha\", \"horizontal\", \"hsl\", \"hsla\", \"hue\", \"icon\", \"ignore\",\n \"inactiveborder\", \"inactivecaption\", \"inactivecaptiontext\", \"infinite\",\n \"infobackground\", \"infotext\", \"inherit\", \"initial\", \"inline\", \"inline-axis\",\n \"inline-block\", \"inline-flex\", \"inline-grid\", \"inline-table\", \"inset\", \"inside\", \"intrinsic\", \"invert\",\n \"italic\", \"japanese-formal\", \"japanese-informal\", \"justify\", \"kannada\",\n \"katakana\", \"katakana-iroha\", \"keep-all\", \"khmer\",\n \"korean-hangul-formal\", \"korean-hanja-formal\", \"korean-hanja-informal\",\n \"landscape\", \"lao\", \"large\", \"larger\", \"left\", \"level\", \"lighter\", \"lighten\",\n \"line-through\", \"linear\", \"linear-gradient\", \"lines\", \"list-item\", \"listbox\", \"listitem\",\n \"local\", \"logical\", \"loud\", \"lower\", \"lower-alpha\", \"lower-armenian\",\n \"lower-greek\", \"lower-hexadecimal\", \"lower-latin\", \"lower-norwegian\",\n \"lower-roman\", \"lowercase\", \"ltr\", \"luminosity\", \"malayalam\", \"match\", \"matrix\", \"matrix3d\",\n \"media-controls-background\", \"media-current-time-display\",\n \"media-fullscreen-button\", \"media-mute-button\", \"media-play-button\",\n \"media-return-to-realtime-button\", \"media-rewind-button\",\n \"media-seek-back-button\", \"media-seek-forward-button\", \"media-slider\",\n \"media-sliderthumb\", \"media-time-remaining-display\", \"media-volume-slider\",\n \"media-volume-slider-container\", \"media-volume-sliderthumb\", \"medium\",\n \"menu\", \"menulist\", \"menulist-button\", \"menulist-text\",\n \"menulist-textfield\", \"menutext\", \"message-box\", \"middle\", \"min-intrinsic\",\n \"mix\", \"mongolian\", \"monospace\", \"move\", \"multiple\", \"multiply\", \"myanmar\", \"n-resize\",\n \"narrower\", \"ne-resize\", \"nesw-resize\", \"no-close-quote\", \"no-drop\",\n \"no-open-quote\", \"no-repeat\", \"none\", \"normal\", \"not-allowed\", \"nowrap\",\n \"ns-resize\", \"numbers\", \"numeric\", \"nw-resize\", \"nwse-resize\", \"oblique\", \"octal\", \"opacity\", \"open-quote\",\n \"optimizeLegibility\", \"optimizeSpeed\", \"oriya\", \"oromo\", \"outset\",\n \"outside\", \"outside-shape\", \"overlay\", \"overline\", \"padding\", \"padding-box\",\n \"painted\", \"page\", \"paused\", \"persian\", \"perspective\", \"plus-darker\", \"plus-lighter\",\n \"pointer\", \"polygon\", \"portrait\", \"pre\", \"pre-line\", \"pre-wrap\", \"preserve-3d\",\n \"progress\", \"push-button\", \"radial-gradient\", \"radio\", \"read-only\",\n \"read-write\", \"read-write-plaintext-only\", \"rectangle\", \"region\",\n \"relative\", \"repeat\", \"repeating-linear-gradient\",\n \"repeating-radial-gradient\", \"repeat-x\", \"repeat-y\", \"reset\", \"reverse\",\n \"rgb\", \"rgba\", \"ridge\", \"right\", \"rotate\", \"rotate3d\", \"rotateX\", \"rotateY\",\n \"rotateZ\", \"round\", \"row\", \"row-resize\", \"row-reverse\", \"rtl\", \"run-in\", \"running\",\n \"s-resize\", \"sans-serif\", \"saturation\", \"scale\", \"scale3d\", \"scaleX\", \"scaleY\", \"scaleZ\", \"screen\",\n \"scroll\", \"scrollbar\", \"scroll-position\", \"se-resize\", \"searchfield\",\n \"searchfield-cancel-button\", \"searchfield-decoration\",\n \"searchfield-results-button\", \"searchfield-results-decoration\", \"self-start\", \"self-end\",\n \"semi-condensed\", \"semi-expanded\", \"separate\", \"serif\", \"show\", \"sidama\",\n \"simp-chinese-formal\", \"simp-chinese-informal\", \"single\",\n \"skew\", \"skewX\", \"skewY\", \"skip-white-space\", \"slide\", \"slider-horizontal\",\n \"slider-vertical\", \"sliderthumb-horizontal\", \"sliderthumb-vertical\", \"slow\",\n \"small\", \"small-caps\", \"small-caption\", \"smaller\", \"soft-light\", \"solid\", \"somali\",\n \"source-atop\", \"source-in\", \"source-out\", \"source-over\", \"space\", \"space-around\", \"space-between\", \"space-evenly\", \"spell-out\", \"square\",\n \"square-button\", \"start\", \"static\", \"status-bar\", \"stretch\", \"stroke\", \"sub\",\n \"subpixel-antialiased\", \"super\", \"sw-resize\", \"symbolic\", \"symbols\", \"system-ui\", \"table\",\n \"table-caption\", \"table-cell\", \"table-column\", \"table-column-group\",\n \"table-footer-group\", \"table-header-group\", \"table-row\", \"table-row-group\",\n \"tamil\",\n \"telugu\", \"text\", \"text-bottom\", \"text-top\", \"textarea\", \"textfield\", \"thai\",\n \"thick\", \"thin\", \"threeddarkshadow\", \"threedface\", \"threedhighlight\",\n \"threedlightshadow\", \"threedshadow\", \"tibetan\", \"tigre\", \"tigrinya-er\",\n \"tigrinya-er-abegede\", \"tigrinya-et\", \"tigrinya-et-abegede\", \"to\", \"top\",\n \"trad-chinese-formal\", \"trad-chinese-informal\", \"transform\",\n \"translate\", \"translate3d\", \"translateX\", \"translateY\", \"translateZ\",\n \"transparent\", \"ultra-condensed\", \"ultra-expanded\", \"underline\", \"unset\", \"up\",\n \"upper-alpha\", \"upper-armenian\", \"upper-greek\", \"upper-hexadecimal\",\n \"upper-latin\", \"upper-norwegian\", \"upper-roman\", \"uppercase\", \"urdu\", \"url\",\n \"var\", \"vertical\", \"vertical-text\", \"visible\", \"visibleFill\", \"visiblePainted\",\n \"visibleStroke\", \"visual\", \"w-resize\", \"wait\", \"wave\", \"wider\",\n \"window\", \"windowframe\", \"windowtext\", \"words\", \"wrap\", \"wrap-reverse\", \"x-large\", \"x-small\", \"xor\",\n \"xx-large\", \"xx-small\"\n ], valueKeywords = keySet(valueKeywords_);\n\n var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)\n .concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)\n .concat(valueKeywords_);\n CodeMirror.registerHelper(\"hintWords\", \"css\", allWords);\n\n function tokenCComment(stream, state) {\n var maybeEnd = false, ch;\n while ((ch = stream.next()) != null) {\n if (maybeEnd && ch == \"/\") {\n state.tokenize = null;\n break;\n }\n maybeEnd = (ch == \"*\");\n }\n return [\"comment\", \"comment\"];\n }\n\n CodeMirror.defineMIME(\"text/css\", {\n documentTypes: documentTypes,\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n fontProperties: fontProperties,\n counterDescriptors: counterDescriptors,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n tokenHooks: {\n \"/\": function(stream, state) {\n if (!stream.eat(\"*\")) return false;\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n }\n },\n name: \"css\"\n });\n\n CodeMirror.defineMIME(\"text/x-scss\", {\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n fontProperties: fontProperties,\n allowNested: true,\n lineComment: \"//\",\n tokenHooks: {\n \"/\": function(stream, state) {\n if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return [\"comment\", \"comment\"];\n } else if (stream.eat(\"*\")) {\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n } else {\n return [\"operator\", \"operator\"];\n }\n },\n \":\": function(stream) {\n if (stream.match(/\\s*\\{/, false))\n return [null, null]\n return false;\n },\n \"$\": function(stream) {\n stream.match(/^[\\w-]+/);\n if (stream.match(/^\\s*:/, false))\n return [\"variable-2\", \"variable-definition\"];\n return [\"variable-2\", \"variable\"];\n },\n \"#\": function(stream) {\n if (!stream.eat(\"{\")) return false;\n return [null, \"interpolation\"];\n }\n },\n name: \"css\",\n helperType: \"scss\"\n });\n\n CodeMirror.defineMIME(\"text/x-less\", {\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n fontProperties: fontProperties,\n allowNested: true,\n lineComment: \"//\",\n tokenHooks: {\n \"/\": function(stream, state) {\n if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return [\"comment\", \"comment\"];\n } else if (stream.eat(\"*\")) {\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n } else {\n return [\"operator\", \"operator\"];\n }\n },\n \"@\": function(stream) {\n if (stream.eat(\"{\")) return [null, \"interpolation\"];\n if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\\b/i, false)) return false;\n stream.eatWhile(/[\\w\\\\\\-]/);\n if (stream.match(/^\\s*:/, false))\n return [\"variable-2\", \"variable-definition\"];\n return [\"variable-2\", \"variable\"];\n },\n \"&\": function() {\n return [\"atom\", \"atom\"];\n }\n },\n name: \"css\",\n helperType: \"less\"\n });\n\n CodeMirror.defineMIME(\"text/x-gss\", {\n documentTypes: documentTypes,\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n fontProperties: fontProperties,\n counterDescriptors: counterDescriptors,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n supportsAtComponent: true,\n tokenHooks: {\n \"/\": function(stream, state) {\n if (!stream.eat(\"*\")) return false;\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n }\n },\n name: \"css\",\n helperType: \"gss\"\n });\n\n});\n","export default {\n run(ed) {\n ed.DomComponents.clear();\n ed.CssComposer.clear();\n }\n};\n","import { bindAll } from 'underscore';\nimport { on, off, getKeyChar } from 'utils/mixins';\nimport Dragger from 'utils/Dragger';\n\nexport default {\n run(ed) {\n bindAll(this, 'onKeyUp', 'enableDragger', 'disableDragger');\n this.editor = ed;\n this.canvasModel = this.canvas.getCanvasView().model;\n this.toggleMove(1);\n },\n stop(ed) {\n this.toggleMove();\n this.disableDragger();\n },\n\n onKeyUp(ev) {\n if (getKeyChar(ev) === ' ') {\n this.editor.stopCommand(this.id);\n }\n },\n\n enableDragger(ev) {\n this.toggleDragger(1, ev);\n },\n\n disableDragger(ev) {\n this.toggleDragger(0, ev);\n },\n\n toggleDragger(enable, ev) {\n const { canvasModel, em } = this;\n let { dragger } = this;\n const methodCls = enable ? 'add' : 'remove';\n this.getCanvas().classList[methodCls](`${this.ppfx}is__grabbing`);\n\n if (!dragger) {\n dragger = new Dragger({\n getPosition() {\n return {\n x: canvasModel.get('x'),\n y: canvasModel.get('y')\n };\n },\n setPosition({ x, y }) {\n canvasModel.set({ x, y });\n },\n onStart(ev, dragger) {\n em.trigger('canvas:move:start', dragger);\n },\n onDrag(ev, dragger) {\n em.trigger('canvas:move', dragger);\n },\n onEnd(ev, dragger) {\n em.trigger('canvas:move:end', dragger);\n }\n });\n this.dragger = dragger;\n }\n\n enable ? dragger.start(ev) : dragger.stop();\n },\n\n toggleMove(enable) {\n const { ppfx } = this;\n const methodCls = enable ? 'add' : 'remove';\n const methodEv = enable ? 'on' : 'off';\n const methodsEv = { on, off };\n const canvas = this.getCanvas();\n const classes = [`${ppfx}is__grab`];\n !enable && classes.push(`${ppfx}is__grabbing`);\n classes.forEach(cls => canvas.classList[methodCls](cls));\n methodsEv[methodEv](document, 'keyup', this.onKeyUp);\n methodsEv[methodEv](canvas, 'mousedown', this.enableDragger);\n methodsEv[methodEv](document, 'mouseup', this.disableDragger);\n }\n};\n","import { isArray } from 'underscore';\n\nexport default {\n run(ed, sender, opts = {}) {\n let components = opts.component || ed.getSelectedAll();\n components = isArray(components) ? [...components] : [components];\n\n // It's important to deselect components first otherwise,\n // with undo, the component will be set with the wrong `collection`\n ed.select(null);\n\n components.forEach(component => {\n if (!component || !component.get('removable')) {\n console.warn('The element is not removable', component);\n return;\n }\n if (component) {\n const coll = component.collection;\n component.trigger('component:destroy');\n coll && coll.remove(component);\n }\n });\n\n return components;\n }\n};\n","import { keys, bindAll, each, isUndefined } from 'underscore';\nimport Dragger from 'utils/Dragger';\n\nexport default {\n run(editor, sender, opts = {}) {\n bindAll(\n this,\n 'setPosition',\n 'onStart',\n 'onDrag',\n 'onEnd',\n 'getPosition',\n 'getGuidesStatic',\n 'renderGuide',\n 'getGuidesTarget'\n );\n const { target, event, mode, dragger = {} } = opts;\n const el = target.getEl();\n const config = {\n doc: el.ownerDocument,\n onStart: this.onStart,\n onEnd: this.onEnd,\n onDrag: this.onDrag,\n getPosition: this.getPosition,\n setPosition: this.setPosition,\n guidesStatic: () => this.guidesStatic,\n guidesTarget: () => this.guidesTarget,\n ...dragger\n };\n this.setupGuides();\n this.opts = opts;\n this.editor = editor;\n this.em = editor.getModel();\n this.target = target;\n this.isTran = mode == 'translate';\n this.guidesContainer = this.getGuidesContainer();\n this.guidesTarget = this.getGuidesTarget();\n this.guidesStatic = this.getGuidesStatic();\n window.guidesTarget = this.guidesTarget;\n let drg = this.dragger;\n\n if (!drg) {\n drg = new Dragger(config);\n this.dragger = drg;\n } else {\n drg.setOptions(config);\n }\n\n event && drg.start(event);\n this.toggleDrag(1);\n\n return drg;\n },\n\n stop() {\n this.toggleDrag();\n },\n\n setupGuides() {\n (this.guides || []).forEach(item => {\n const { guide } = item;\n guide && guide.parentNode.removeChild(guide);\n });\n this.guides = [];\n },\n\n getGuidesContainer() {\n let { guidesEl } = this;\n\n if (!guidesEl) {\n const { editor, em, opts } = this;\n const pfx = editor.getConfig('stylePrefix');\n const elInfoX = document.createElement('div');\n const elInfoY = document.createElement('div');\n const guideContent = `
\n
\n
`;\n guidesEl = document.createElement('div');\n guidesEl.className = `${pfx}guides`;\n elInfoX.className = `${pfx}guide-info ${pfx}guide-info__x`;\n elInfoY.className = `${pfx}guide-info ${pfx}guide-info__y`;\n elInfoX.innerHTML = guideContent;\n elInfoY.innerHTML = guideContent;\n guidesEl.appendChild(elInfoX);\n guidesEl.appendChild(elInfoY);\n editor.Canvas.getToolsEl().appendChild(guidesEl);\n this.guidesEl = guidesEl;\n this.elGuideInfoX = elInfoX;\n this.elGuideInfoY = elInfoY;\n this.elGuideInfoContentX = elInfoX.querySelector(\n `.${pfx}guide-info__content`\n );\n this.elGuideInfoContentY = elInfoY.querySelector(\n `.${pfx}guide-info__content`\n );\n em.on('canvas:update', () => {\n this.updateGuides();\n opts.debug && this.guides.forEach(item => this.renderGuide(item));\n });\n }\n\n return guidesEl;\n },\n\n getGuidesStatic() {\n let result = [];\n const el = this.target.getEl();\n const { parentNode = {} } = el;\n each(\n parentNode.children,\n item =>\n (result = result.concat(el !== item ? this.getElementGuides(item) : []))\n );\n\n return result.concat(this.getElementGuides(parentNode));\n },\n\n getGuidesTarget() {\n return this.getElementGuides(this.target.getEl());\n },\n\n updateGuides(guides) {\n const { editor } = this;\n\n (guides || this.guides).forEach(item => {\n const { origin } = item;\n const { top, height, left, width } = editor.Canvas.getElementPos(origin);\n\n switch (item.type) {\n case 't':\n return (item.y = top);\n case 'b':\n return (item.y = top + height);\n case 'l':\n return (item.x = left);\n case 'r':\n return (item.x = left + width);\n case 'x':\n return (item.x = left + width / 2);\n case 'y':\n return (item.y = top + height / 2);\n }\n });\n },\n\n getGuidePosUpdate(item, rect) {\n const result = {};\n const { top, height, left, width } = rect;\n\n switch (item.type) {\n case 't':\n result.y = top;\n break;\n case 'b':\n result.y = top + height;\n break;\n case 'l':\n result.x = left;\n break;\n case 'r':\n result.x = left + width;\n break;\n case 'x':\n result.x = left + width / 2;\n break;\n case 'y':\n result.y = top + height / 2;\n break;\n }\n\n return result;\n },\n\n renderGuide(item = {}) {\n const el = item.guide || document.createElement('div');\n const { Canvas } = this.editor;\n const { topScroll, top } = Canvas.getRect();\n const frameTop = Canvas.getCanvasView().getFrameOffset().top;\n const un = 'px';\n const guideSize = item.active ? 2 : 1;\n let numEl = el.children[0];\n el.style = `position: absolute; background-color: ${\n item.active ? 'green' : 'red'\n };`;\n\n if (!el.children.length) {\n numEl = document.createElement('div');\n numEl.style =\n 'position: absolute; color: red; padding: 5px; top: 0; left: 0;';\n el.appendChild(numEl);\n }\n\n if (item.y) {\n el.style.width = '100%';\n el.style.height = `${guideSize}${un}`;\n el.style.top = `${item.y}${un}`;\n el.style.left = 0;\n } else {\n el.style.width = `${guideSize}${un}`;\n el.style.height = '100%';\n el.style.left = `${item.x}${un}`;\n el.style.top = `${topScroll - frameTop + top}${un}`;\n }\n\n !item.guide && this.guidesContainer.appendChild(el);\n return el;\n },\n\n getElementGuides(el) {\n const { editor, opts } = this;\n const { top, height, left, width } = editor.Canvas.getElementPos(el);\n const guides = [\n { type: 't', y: top }, // Top\n { type: 'b', y: top + height }, // Bottom\n { type: 'l', x: left }, // Left\n { type: 'r', x: left + width }, // Right\n { type: 'x', x: left + width / 2 }, // Mid x\n { type: 'y', y: top + height / 2 } // Mid y\n ].map(item => ({\n ...item,\n origin: el,\n originRect: editor.Canvas.getElementPos(el),\n guide: opts.debug && this.renderGuide(item)\n }));\n guides.forEach(item => this.guides.push(item));\n\n return guides;\n },\n\n getTranslate(transform, axis = 'x') {\n let result = 0;\n (transform || '').split(' ').forEach(item => {\n const itemStr = item.trim();\n const fn = `translate${axis.toUpperCase()}(`;\n if (itemStr.indexOf(fn) === 0)\n result = parseFloat(itemStr.replace(fn, ''));\n });\n return result;\n },\n\n setTranslate(transform, axis, value) {\n const fn = `translate${axis.toUpperCase()}(`;\n const val = `${fn}${value})`;\n let result = (transform || '')\n .split(' ')\n .map(item => {\n const itemStr = item.trim();\n if (itemStr.indexOf(fn) === 0) item = val;\n return item;\n })\n .join(' ');\n if (result.indexOf(fn) < 0) result += ` ${val}`;\n\n return result;\n },\n\n getPosition() {\n const { target, isTran } = this;\n const { left, top, transform } = target.getStyle();\n let x = 0;\n let y = 0;\n\n if (isTran) {\n x = this.getTranslate(transform);\n y = this.getTranslate(transform, 'y');\n } else {\n x = parseFloat(left);\n y = parseFloat(top);\n }\n\n return { x, y };\n },\n\n setPosition({ x, y, end, position, width, height }) {\n const { target, isTran } = this;\n const unit = 'px';\n const en = !end ? 1 : ''; // this will trigger the final change\n const left = `${x}${unit}`;\n const top = `${y}${unit}`;\n\n if (isTran) {\n let transform = target.getStyle()['transform'] || '';\n transform = this.setTranslate(transform, 'x', left);\n transform = this.setTranslate(transform, 'y', top);\n return target.addStyle({ transform, en }, { avoidStore: !end });\n }\n\n const adds = { position, width, height };\n const style = { left, top, en };\n keys(adds).forEach(add => {\n const prop = adds[add];\n if (prop) style[add] = prop;\n });\n target.addStyle(style, { avoidStore: !end });\n },\n\n onStart() {\n const { target, editor, isTran, opts } = this;\n const { center } = opts;\n const { Canvas } = editor;\n const style = target.getStyle();\n const position = 'absolute';\n if (isTran) return;\n\n if (style.position !== position) {\n let { left, top, width, height } = Canvas.offset(target.getEl());\n\n // Check if to center the target to the pointer position\n if (center) {\n const { x, y } = Canvas.getMouseRelativeCanvas(event);\n left = x;\n top = y;\n }\n\n this.setPosition({\n x: left,\n y: top,\n width: `${width}px`,\n height: `${height}px`,\n position\n });\n }\n },\n\n onDrag(...args) {\n const { guidesTarget, opts } = this;\n const { onDrag } = opts;\n this.updateGuides(guidesTarget);\n opts.debug && guidesTarget.forEach(item => this.renderGuide(item));\n opts.guidesInfo &&\n this.renderGuideInfo(guidesTarget.filter(item => item.active));\n onDrag && onDrag(...args);\n },\n\n onEnd(...args) {\n const { editor, opts, id } = this;\n const { onEnd } = opts;\n onEnd && onEnd(...args);\n editor.stopCommand(id);\n this.hideGuidesInfo();\n },\n\n hideGuidesInfo() {\n ['X', 'Y'].forEach(item => {\n const guide = this[`elGuideInfo${item}`];\n if (guide) guide.style.display = 'none';\n });\n },\n\n /**\n * Render guides with spacing information\n */\n renderGuideInfo(guides = []) {\n const { guidesStatic, editor } = this;\n this.hideGuidesInfo();\n\n guides.forEach(item => {\n const { origin, x } = item;\n const rectOrigin = editor.Canvas.getElementPos(origin);\n const axis = isUndefined(x) ? 'y' : 'x';\n const isY = axis === 'y';\n const origEdge1 = rectOrigin[isY ? 'left' : 'top'];\n const origEdge1Raw = rectOrigin.rect[isY ? 'left' : 'top'];\n const origEdge2 = isY\n ? origEdge1 + rectOrigin.width\n : origEdge1 + rectOrigin.height;\n const origEdge2Raw = isY\n ? origEdge1Raw + rectOrigin.rect.width\n : origEdge1Raw + rectOrigin.rect.height;\n const elGuideInfo = this[`elGuideInfo${axis.toUpperCase()}`];\n const elGuideInfoCnt = this[`elGuideInfoContent${axis.toUpperCase()}`];\n const guideInfoStyle = elGuideInfo.style;\n\n // Find the nearest element\n const res = guidesStatic\n .filter(stat => stat[axis] === item[axis])\n .map(stat => {\n const { left, width, top, height } = stat.originRect;\n const statEdge1 = isY ? left : top;\n const statEdge2 = isY ? left + width : top + height;\n return {\n gap:\n statEdge2 < origEdge1\n ? origEdge1 - statEdge2\n : statEdge1 - origEdge2,\n guide: stat\n };\n })\n .filter(item => item.gap > 0)\n .sort((a, b) => a.gap - b.gap)\n .map(item => item.guide)[0];\n\n if (res) {\n const { left, width, top, height, rect } = res.originRect;\n const isEdge1 = isY ? left < rectOrigin.left : top < rectOrigin.top;\n const statEdge1 = isY ? left : top;\n const statEdge1Raw = isY ? rect.left : rect.top;\n const statEdge2 = isY ? left + width : top + height;\n const statEdge2Raw = isY\n ? rect.left + rect.width\n : rect.top + rect.height;\n const pos2 = `${isY ? item.y : item.x}px`;\n const size = isEdge1 ? origEdge1 - statEdge2 : statEdge1 - origEdge2;\n const sizeRaw = isEdge1\n ? origEdge1Raw - statEdge2Raw\n : statEdge1Raw - origEdge2Raw;\n guideInfoStyle.display = '';\n guideInfoStyle[isY ? 'top' : 'left'] = pos2;\n guideInfoStyle[isY ? 'left' : 'top'] = `${\n isEdge1 ? statEdge2 : origEdge2\n }px`;\n guideInfoStyle[isY ? 'width' : 'height'] = `${size}px`;\n elGuideInfoCnt.innerHTML = `${Math.round(sizeRaw)}px`;\n }\n });\n },\n\n toggleDrag(enable) {\n const { ppfx, editor } = this;\n const methodCls = enable ? 'add' : 'remove';\n const classes = [`${ppfx}is__grabbing`];\n const { Canvas } = editor;\n const body = Canvas.getBody();\n classes.forEach(cls => body.classList[methodCls](cls));\n Canvas[enable ? 'startAutoscroll' : 'stopAutoscroll']();\n }\n};\n","export default {\n run(ed) {\n if (!ed.Canvas.hasFocus()) return;\n const toSelect = [];\n\n ed.getSelectedAll().forEach(component => {\n const coll = component.components();\n const next = coll && coll.at(0);\n next && toSelect.push(next);\n });\n\n toSelect.length && ed.select(toSelect);\n }\n};\n","export default {\n run(ed, snd, opts = {}) {\n if (!ed.Canvas.hasFocus() && !opts.force) return;\n const toSelect = [];\n\n ed.getSelectedAll().forEach(component => {\n let next = component.parent();\n\n // Recurse through the parent() chain until a selectable parent is found\n while (next && !next.get('selectable')) {\n next = next.parent();\n }\n\n next && toSelect.push(next);\n });\n\n toSelect.length && ed.select(toSelect);\n }\n};\n","export default {\n run(ed) {\n if (!ed.Canvas.hasFocus()) return;\n const toSelect = [];\n\n ed.getSelectedAll().forEach(component => {\n const coll = component.collection;\n const at = coll.indexOf(component);\n const next = coll.at(at + 1);\n toSelect.push(next || component);\n });\n\n toSelect.length && ed.select(toSelect);\n }\n};\n","export default {\n run(ed) {\n if (!ed.Canvas.hasFocus()) return;\n const toSelect = [];\n\n ed.getSelectedAll().forEach(component => {\n const coll = component.collection;\n const at = coll.indexOf(component);\n const next = coll.at(at - 1);\n toSelect.push(next && at - 1 >= 0 ? next : component);\n });\n\n toSelect.length && ed.select(toSelect);\n }\n};\n","import { isArray } from 'underscore';\n\nexport default {\n run(ed, sender, opts = {}) {\n const { target } = opts;\n const dc = ed.DomComponents;\n const type = target.get('type');\n const len = dc.getWrapper().find(`[data-gjs-type=\"${type}\"]`).length;\n const toRemove = [];\n\n if (!len) {\n const rules = ed.CssComposer.getAll();\n let toClear = target.get('style-signature');\n toClear = isArray(toClear) ? toClear : [toClear];\n\n rules.forEach(rule => {\n const selector = rule.selectorsToString();\n toClear.forEach(part => {\n part && selector.indexOf(part) >= 0 && toRemove.push(rule);\n });\n });\n\n rules.remove(toRemove);\n }\n\n return toRemove;\n }\n};\n","export default {\n run(ed) {\n const em = ed.getModel();\n const models = [...ed.getSelectedAll()];\n\n if (models.length) {\n em.set('clipboard', models);\n }\n }\n};\n","import { extend, bindAll } from 'underscore';\nimport Backbone from 'backbone';\nimport SelectComponent from './SelectComponent';\n\nconst $ = Backbone.$;\n\nexport default extend({}, SelectComponent, {\n init(o) {\n bindAll(this, 'startDelete', 'stopDelete', 'onDelete');\n this.hoverClass = this.pfx + 'hover-delete';\n this.badgeClass = this.pfx + 'badge-red';\n },\n\n enable() {\n var that = this;\n this.$el\n .find('*')\n .mouseover(this.startDelete)\n .mouseout(this.stopDelete)\n .click(this.onDelete);\n },\n\n /**\n * Start command\n * @param {Object} e\n * @private\n */\n startDelete(e) {\n e.stopPropagation();\n var $this = $(e.target);\n\n // Show badge if possible\n if ($this.data('model').get('removable')) {\n $this.addClass(this.hoverClass);\n this.attachBadge($this.get(0));\n }\n },\n\n /**\n * Stop command\n * @param {Object} e\n * @private\n */\n stopDelete(e) {\n e.stopPropagation();\n var $this = $(e.target);\n $this.removeClass(this.hoverClass);\n\n // Hide badge if possible\n if (this.badge) this.badge.css({ left: -1000, top: -1000 });\n },\n\n /**\n * Delete command\n * @param {Object} e\n * @private\n */\n onDelete(e) {\n e.stopPropagation();\n var $this = $(e.target);\n\n // Do nothing in case can't remove\n if (!$this.data('model').get('removable')) return;\n\n $this.data('model').destroy();\n this.removeBadge();\n this.clean();\n },\n\n /**\n * Updates badge label\n * @param {Object} model\n * @private\n * */\n updateBadgeLabel(model) {\n this.badge.html('Remove ' + model.getName());\n }\n});\n","import Backbone from 'backbone';\nconst $ = Backbone.$;\n\nexport default {\n run(editor, sender, opts = {}) {\n sender && sender.set && sender.set('active', 0);\n const config = editor.getConfig();\n const modal = editor.Modal;\n const pfx = config.stylePrefix;\n this.cm = editor.CodeManager || null;\n\n if (!this.$editors) {\n const oHtmlEd = this.buildEditor('htmlmixed', 'hopscotch', 'HTML');\n const oCsslEd = this.buildEditor('css', 'hopscotch', 'CSS');\n this.htmlEditor = oHtmlEd.el;\n this.cssEditor = oCsslEd.el;\n const $editors = $(`
`);\n $editors.append(oHtmlEd.$el).append(oCsslEd.$el);\n this.$editors = $editors;\n }\n\n modal\n .open({\n title: config.textViewCode,\n content: this.$editors\n })\n .getModel()\n .once('change:open', () => editor.stopCommand(this.id));\n this.htmlEditor.setContent(editor.getHtml());\n this.cssEditor.setContent(editor.getCss());\n },\n\n stop(editor) {\n const modal = editor.Modal;\n modal && modal.close();\n },\n\n buildEditor(codeName, theme, label) {\n const input = document.createElement('textarea');\n !this.codeMirror && (this.codeMirror = this.cm.getViewer('CodeMirror'));\n\n const el = this.codeMirror.clone().set({\n label,\n codeName,\n theme,\n input\n });\n\n const $el = new this.cm.EditorView({\n model: el,\n config: this.cm.getConfig()\n }).render().$el;\n\n el.init(input);\n\n return { el, $el };\n }\n};\n","import { isElement } from 'underscore';\n\nexport default {\n /**\n * Check if fullscreen mode is enabled\n * @return {Boolean}\n */\n isEnabled() {\n var d = document;\n if (\n d.fullscreenElement ||\n d.webkitFullscreenElement ||\n d.mozFullScreenElement\n )\n return 1;\n else return 0;\n },\n\n /**\n * Enable fullscreen mode and return browser prefix\n * @param {HTMLElement} el\n * @return {string}\n */\n enable(el) {\n var pfx = '';\n if (el.requestFullscreen) el.requestFullscreen();\n else if (el.webkitRequestFullscreen) {\n pfx = 'webkit';\n el.webkitRequestFullscreen();\n } else if (el.mozRequestFullScreen) {\n pfx = 'moz';\n el.mozRequestFullScreen();\n } else if (el.msRequestFullscreen) el.msRequestFullscreen();\n else console.warn('Fullscreen not supported');\n return pfx;\n },\n\n /**\n * Disable fullscreen mode\n */\n disable() {\n const d = document;\n if (this.isEnabled()) {\n if (d.exitFullscreen) d.exitFullscreen();\n else if (d.webkitExitFullscreen) d.webkitExitFullscreen();\n else if (d.mozCancelFullScreen) d.mozCancelFullScreen();\n else if (d.msExitFullscreen) d.msExitFullscreen();\n }\n },\n\n /**\n * Triggered when the state of the fullscreen is changed. Inside detects if\n * it's enabled\n * @param {strinf} pfx Browser prefix\n * @param {Event} e\n */\n fsChanged(pfx, e) {\n var d = document;\n var ev = (pfx || '') + 'fullscreenchange';\n if (!this.isEnabled()) {\n this.stop(null, this.sender);\n document.removeEventListener(ev, this.fsChanged);\n }\n },\n\n run(editor, sender, opts = {}) {\n this.sender = sender;\n const { target } = opts;\n const targetEl = isElement(target)\n ? target\n : document.querySelector(target);\n const pfx = this.enable(targetEl || editor.getContainer());\n this.fsChanged = this.fsChanged.bind(this, pfx);\n document.addEventListener(pfx + 'fullscreenchange', this.fsChanged);\n editor.trigger('change:canvasOffset');\n },\n\n stop(editor, sender) {\n if (sender && sender.set) sender.set('active', false);\n this.disable();\n if (editor) editor.trigger('change:canvasOffset');\n }\n};\n","import { extend, bindAll } from 'underscore';\nimport Backbone from 'backbone';\nimport { on, off } from 'utils/mixins';\nimport SelectComponent from './SelectComponent';\nimport SelectPosition from './SelectPosition';\n\nconst $ = Backbone.$;\n\nexport default extend({}, SelectPosition, SelectComponent, {\n init(o) {\n SelectComponent.init.apply(this, arguments);\n bindAll(this, 'initSorter', 'rollback', 'onEndMove');\n this.opt = o;\n this.hoverClass = this.ppfx + 'highlighter-warning';\n this.badgeClass = this.ppfx + 'badge-warning';\n this.noSelClass = this.ppfx + 'no-select';\n },\n\n enable(...args) {\n SelectComponent.enable.apply(this, args);\n this.getBadgeEl().addClass(this.badgeClass);\n this.getHighlighterEl().addClass(this.hoverClass);\n var wp = this.$wrapper;\n wp.css('cursor', 'move');\n wp.on('mousedown', this.initSorter);\n\n // Avoid strange moving behavior\n wp.addClass(this.noSelClass);\n },\n\n /**\n * Overwrite for doing nothing\n * @private\n */\n toggleClipboard() {},\n\n /**\n * Delegate sorting\n * @param {Event} e\n * @private\n * */\n initSorter(e) {\n var el = $(e.target).data('model');\n var drag = el.get('draggable');\n if (!drag) return;\n\n // Avoid badge showing on move\n this.cacheEl = null;\n this.startSelectPosition(e.target, this.frameEl.contentDocument);\n this.sorter.draggable = drag;\n this.sorter.onEndMove = this.onEndMove.bind(this);\n this.stopSelectComponent();\n this.$wrapper.off('mousedown', this.initSorter);\n on(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Init sorter from model\n * @param {Object} model\n * @private\n */\n initSorterFromModel(model) {\n var drag = model.get('draggable');\n if (!drag) return;\n // Avoid badge showing on move\n this.cacheEl = null;\n var el = model.view.el;\n this.startSelectPosition(el, this.frameEl.contentDocument);\n this.sorter.draggable = drag;\n this.sorter.onEndMove = this.onEndMoveFromModel.bind(this);\n\n /*\n this.sorter.setDragHelper(el);\n var dragHelper = this.sorter.dragHelper;\n dragHelper.className = this.ppfx + 'drag-helper';\n dragHelper.innerHTML = '';\n dragHelper.backgroundColor = 'white';\n */\n\n this.stopSelectComponent();\n on(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Init sorter from models\n * @param {Object} model\n * @private\n */\n initSorterFromModels(models) {\n // TODO: if one only check for `draggable`\n // Avoid badge showing on move\n this.cacheEl = null;\n const lastModel = models[models.length - 1];\n const doc = this.frameEl.contentDocument;\n this.startSelectPosition(lastModel.view.el, doc);\n this.sorter.draggable = lastModel.get('draggable');\n this.sorter.toMove = models;\n this.sorter.onEndMove = this.onEndMoveFromModel.bind(this);\n this.stopSelectComponent();\n on(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n onEndMoveFromModel() {\n off(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Callback after sorting\n * @private\n */\n onEndMove() {\n this.enable();\n off(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Say what to do after the component was selected (selectComponent)\n * @param {Event} e\n * @param {Object} Selected element\n * @private\n * */\n onSelect(e, el) {},\n\n /**\n * Used to bring the previous situation before start moving the component\n * @param {Event} e\n * @param {Boolean} Indicates if rollback in anycase\n * @private\n * */\n rollback(e, force) {\n var key = e.which || e.keyCode;\n if (key == 27 || force) {\n this.sorter.moved = false;\n this.sorter.endMove();\n }\n return;\n },\n\n /**\n * Returns badge element\n * @return {HTMLElement}\n * @private\n */\n getBadgeEl() {\n if (!this.$badge) this.$badge = $(this.getBadge());\n return this.$badge;\n },\n\n /**\n * Returns highlighter element\n * @return {HTMLElement}\n * @private\n */\n getHighlighterEl() {\n if (!this.$hl) this.$hl = $(this.canvas.getHighlighter());\n return this.$hl;\n },\n\n stop(...args) {\n SelectComponent.stop.apply(this, args);\n this.getBadgeEl().removeClass(this.badgeClass);\n this.getHighlighterEl().removeClass(this.hoverClass);\n var wp = this.$wrapper;\n wp.css('cursor', '')\n .unbind()\n .removeClass(this.noSelClass);\n }\n});\n","export default {\n run(editor, sender, opts = {}) {\n const modal = editor.Modal;\n const am = editor.AssetManager;\n const config = am.getConfig();\n const amContainer = am.getContainer();\n const title = opts.modalTitle || editor.t('assetManager.modalTitle') || '';\n const types = opts.types;\n const accept = opts.accept;\n\n am.setTarget(opts.target);\n am.onClick(opts.onClick);\n am.onDblClick(opts.onDblClick);\n am.onSelect(opts.onSelect);\n\n if (!this.rendered || types) {\n let assets = am.getAll().filter(i => 1);\n\n if (types && types.length) {\n assets = assets.filter(a => types.indexOf(a.get('type')) !== -1);\n }\n\n am.render(assets);\n this.rendered = 1;\n }\n\n if (accept) {\n const uploadEl = amContainer.querySelector(\n `input#${config.stylePrefix}uploadFile`\n );\n uploadEl && uploadEl.setAttribute('accept', accept);\n }\n\n modal\n .open({\n title,\n content: amContainer\n })\n .getModel()\n .once('change:open', () => editor.stopCommand(this.id));\n return this;\n },\n\n stop(editor) {\n editor.Modal.close();\n return this;\n }\n};\n","export default {\n run(editor, sender) {\n const bm = editor.BlockManager;\n const pn = editor.Panels;\n\n if (!this.blocks) {\n bm.render();\n const id = 'views-container';\n const blocks = document.createElement('div');\n const panels = pn.getPanel(id) || pn.addPanel({ id });\n blocks.appendChild(bm.getContainer());\n panels.set('appendContent', blocks).trigger('change:appendContent');\n this.blocks = blocks;\n }\n\n this.blocks.style.display = 'block';\n },\n\n stop() {\n const blocks = this.blocks;\n blocks && (blocks.style.display = 'none');\n }\n};\n","import Backbone from 'backbone';\nimport Layers from 'navigator';\n\nconst $ = Backbone.$;\n\nexport default {\n run(editor) {\n const lm = editor.LayerManager;\n const pn = editor.Panels;\n\n if (!this.layers) {\n const id = 'views-container';\n const layers = document.createElement('div');\n const panels = pn.getPanel(id) || pn.addPanel({ id });\n layers.appendChild(lm.render());\n panels.set('appendContent', layers).trigger('change:appendContent');\n this.layers = layers;\n }\n\n this.layers.style.display = 'block';\n },\n\n stop() {\n const layers = this.layers;\n layers && (layers.style.display = 'none');\n }\n};\n","import Backbone from 'backbone';\nimport StyleManager from 'style_manager';\n\nconst $ = Backbone.$;\n\nexport default {\n run(em, sender) {\n this.sender = sender;\n if (!this.$cn) {\n var config = em.getConfig(),\n panels = em.Panels;\n // Main container\n this.$cn = $('
');\n // Secondary container\n this.$cn2 = $('
');\n this.$cn.append(this.$cn2);\n\n // Device Manager\n var dvm = em.DeviceManager;\n if (dvm && config.showDevices) {\n var devicePanel = panels.addPanel({ id: 'devices-c' });\n devicePanel\n .set('appendContent', dvm.render())\n .trigger('change:appendContent');\n }\n\n // Class Manager container\n var clm = em.SelectorManager;\n if (clm) this.$cn2.append(clm.render([]));\n\n this.$cn2.append(em.StyleManager.render());\n var smConfig = em.StyleManager.getConfig();\n const pfx = smConfig.stylePrefix;\n // Create header\n this.$header = $(\n `
${em.t('styleManager.empty')}
`\n );\n this.$cn.append(this.$header);\n\n // Create panel if not exists\n if (!panels.getPanel('views-container'))\n this.panel = panels.addPanel({ id: 'views-container' });\n else this.panel = panels.getPanel('views-container');\n\n // Add all containers to the panel\n this.panel.set('appendContent', this.$cn).trigger('change:appendContent');\n\n this.target = em.editor;\n this.listenTo(this.target, 'component:toggled', this.toggleSm);\n }\n this.toggleSm();\n },\n\n /**\n * Toggle Style Manager visibility\n * @private\n */\n toggleSm() {\n const { target, sender } = this;\n if (sender && sender.get && !sender.get('active')) return;\n const { componentFirst } = target.get('SelectorManager').getConfig();\n const selectedAll = target.getSelectedAll().length;\n\n if (selectedAll === 1 || (selectedAll > 1 && componentFirst)) {\n this.$cn2.show();\n this.$header.hide();\n } else {\n this.$cn2.hide();\n this.$header.show();\n }\n },\n\n stop() {\n // Hide secondary container if exists\n if (this.$cn2) this.$cn2.hide();\n\n // Hide header container if exists\n if (this.$header) this.$header.hide();\n }\n};\n","import Backbone from 'backbone';\n\nconst $ = Backbone.$;\n\nexport default {\n run(editor, sender) {\n this.sender = sender;\n const em = editor.getModel();\n\n var config = editor.Config;\n var pfx = config.stylePrefix;\n var tm = editor.TraitManager;\n var panelC;\n\n if (!this.$cn) {\n var tmView = tm.getTraitsViewer();\n var confTm = tm.getConfig();\n this.$cn = $('
');\n this.$cn2 = $('
');\n this.$cn.append(this.$cn2);\n this.$header = $('
').append(\n `
${em.t(\n 'traitManager.empty'\n )}
`\n );\n this.$cn.append(this.$header);\n this.$cn2.append(\n `
${em.t('traitManager.label')}
`\n );\n this.$cn2.append(tmView.render().el);\n var panels = editor.Panels;\n\n if (!panels.getPanel('views-container'))\n panelC = panels.addPanel({ id: 'views-container' });\n else panelC = panels.getPanel('views-container');\n\n panelC\n .set('appendContent', this.$cn.get(0))\n .trigger('change:appendContent');\n\n this.target = editor.getModel();\n this.listenTo(this.target, 'component:toggled', this.toggleTm);\n }\n\n this.toggleTm();\n },\n\n /**\n * Toggle Trait Manager visibility\n * @private\n */\n toggleTm() {\n const sender = this.sender;\n if (sender && sender.get && !sender.get('active')) return;\n\n if (this.target.getSelectedAll().length === 1) {\n this.$cn2.show();\n this.$header.hide();\n } else {\n this.$cn2.hide();\n this.$header.show();\n }\n },\n\n stop() {\n this.$cn2 && this.$cn2.hide();\n this.$header && this.$header.hide();\n }\n};\n","import { isArray, contains } from 'underscore';\n\nexport default {\n run(ed) {\n const em = ed.getModel();\n const clp = em.get('clipboard');\n const selected = ed.getSelected();\n\n if (clp && selected) {\n ed.getSelectedAll().forEach(comp => {\n if (!comp) return;\n const coll = comp.collection;\n const at = coll.indexOf(comp) + 1;\n const copyable = clp.filter(cop => cop.get('copyable'));\n let added;\n\n if (contains(clp, comp) && comp.get('copyable')) {\n added = coll.add(comp.clone(), { at });\n } else {\n added = coll.add(copyable.map(cop => cop.clone()), { at });\n }\n\n added = isArray(added) ? added : [added];\n added.forEach(add => ed.trigger('component:paste', add));\n });\n\n selected.emitUpdate();\n }\n }\n};\n","import { each } from 'underscore';\n\nexport default {\n getPanels(editor) {\n if (!this.panels) {\n this.panels = editor.Panels.getPanelsEl();\n }\n\n return this.panels;\n },\n\n tglPointers(editor, val) {\n const body = editor.Canvas.getBody();\n const elP = body.querySelectorAll(`.${this.ppfx}no-pointer`);\n each(elP, item => (item.style.pointerEvents = val ? '' : 'all'));\n },\n\n run(editor, sender) {\n this.sender = sender;\n editor.stopCommand('sw-visibility');\n editor.getModel().stopDefault();\n const panels = this.getPanels(editor);\n const canvas = editor.Canvas.getElement();\n const editorEl = editor.getEl();\n const pfx = editor.Config.stylePrefix;\n\n if (!this.helper) {\n const helper = document.createElement('span');\n helper.className = `${pfx}off-prv fa fa-eye-slash`;\n editorEl.appendChild(helper);\n helper.onclick = () => this.stopCommand();\n this.helper = helper;\n }\n\n this.helper.style.display = 'inline-block';\n this.tglPointers(editor);\n panels.style.display = 'none';\n const canvasS = canvas.style;\n canvasS.width = '100%';\n canvasS.height = '100%';\n canvasS.top = '0';\n canvasS.left = '0';\n canvasS.padding = '0';\n canvasS.margin = '0';\n editor.refresh();\n },\n\n stop(editor) {\n const { sender = {} } = this;\n sender.set && sender.set('active', 0);\n const panels = this.getPanels(editor);\n editor.runCommand('sw-visibility');\n editor.getModel().runDefault();\n panels.style.display = '';\n const canvas = editor.Canvas.getElement();\n canvas.setAttribute('style', '');\n\n if (this.helper) {\n this.helper.style.display = 'none';\n }\n\n editor.refresh();\n this.tglPointers(editor, 1);\n }\n};\n","export default {\n run(editor, sender, opts) {\n var opt = opts || {};\n var el = opt.el || '';\n var canvas = editor.Canvas;\n var canvasResizer = this.canvasResizer;\n var options = opt.options || {};\n var canvasView = canvas.getCanvasView();\n options.appendTo = canvas.getResizerEl();\n options.prefix = editor.getConfig().stylePrefix;\n options.posFetcher = canvasView.getElementPos.bind(canvasView);\n options.mousePosFetcher = canvas.getMouseRelativePos;\n\n // Create the resizer for the canvas if not yet created\n if (!canvasResizer || opt.forceNew) {\n this.canvasResizer = editor.Utils.Resizer.init(options);\n canvasResizer = this.canvasResizer;\n }\n\n canvasResizer.setOptions(options);\n canvasResizer.blur();\n canvasResizer.focus(el);\n return canvasResizer;\n },\n\n stop() {\n const resizer = this.canvasResizer;\n resizer && resizer.blur();\n }\n};\n","import Backbone from 'backbone';\nimport { isTextNode } from 'utils/mixins';\nconst $ = Backbone.$;\n\nexport default {\n getOffsetMethod(state) {\n var method = state || '';\n return 'get' + method + 'OffsetViewerEl';\n },\n\n run(editor, sender, opts) {\n var opt = opts || {};\n var state = opt.state || '';\n var config = editor.getConfig();\n const zoom = this.em.getZoomDecimal();\n const el = opt.el || '';\n\n if (\n !config.showOffsets ||\n isTextNode(el) ||\n (!config.showOffsetsSelected && state == 'Fixed')\n ) {\n editor.stopCommand(this.id, opts);\n return;\n }\n\n var canvas = editor.Canvas;\n var pos = opt.elPos || canvas.getElementPos(el);\n var style = window.getComputedStyle(el);\n var ppfx = this.ppfx;\n var stateVar = state + 'State';\n var method = this.getOffsetMethod(state);\n var offsetViewer = canvas[method]();\n offsetViewer.style.display = 'block';\n\n var marginT = this['marginT' + state];\n var marginB = this['marginB' + state];\n var marginL = this['marginL' + state];\n var marginR = this['marginR' + state];\n var padT = this['padT' + state];\n var padB = this['padB' + state];\n var padL = this['padL' + state];\n var padR = this['padR' + state];\n\n if (!this[stateVar]) {\n var stateLow = state.toLowerCase();\n var marginName = stateLow + 'margin-v';\n var paddingName = stateLow + 'padding-v';\n var marginV = $(`
`).get(0);\n var paddingV = $(`
`).get(0);\n var marginEls = ppfx + marginName + '-el';\n var paddingEls = ppfx + paddingName + '-el';\n const fullMargName = `${marginEls} ${ppfx + marginName}`;\n const fullPadName = `${paddingEls} ${ppfx + paddingName}`;\n marginT = $(`
`).get(0);\n marginB = $(`
`).get(0);\n marginL = $(`
`).get(0);\n marginR = $(`
`).get(0);\n padT = $(`
`).get(0);\n padB = $(`
`).get(0);\n padL = $(`
`).get(0);\n padR = $(`
`).get(0);\n this['marginT' + state] = marginT;\n this['marginB' + state] = marginB;\n this['marginL' + state] = marginL;\n this['marginR' + state] = marginR;\n this['padT' + state] = padT;\n this['padB' + state] = padB;\n this['padL' + state] = padL;\n this['padR' + state] = padR;\n marginV.appendChild(marginT);\n marginV.appendChild(marginB);\n marginV.appendChild(marginL);\n marginV.appendChild(marginR);\n paddingV.appendChild(padT);\n paddingV.appendChild(padB);\n paddingV.appendChild(padL);\n paddingV.appendChild(padR);\n offsetViewer.appendChild(marginV);\n offsetViewer.appendChild(paddingV);\n this[stateVar] = '1';\n }\n\n var unit = 'px';\n var marginLeftSt = parseFloat(style.marginLeft.replace(unit, '')) * zoom;\n var marginRightSt = parseFloat(style.marginRight.replace(unit, '')) * zoom;\n var marginTopSt = parseFloat(style.marginTop.replace(unit, '')) * zoom;\n var marginBottomSt =\n parseFloat(style.marginBottom.replace(unit, '')) * zoom;\n var mtStyle = marginT.style;\n var mbStyle = marginB.style;\n var mlStyle = marginL.style;\n var mrStyle = marginR.style;\n var ptStyle = padT.style;\n var pbStyle = padB.style;\n var plStyle = padL.style;\n var prStyle = padR.style;\n var posLeft = parseFloat(pos.left);\n var widthEl = parseFloat(style.width) * zoom + unit;\n\n // Margin style\n mtStyle.height = marginTopSt + unit;\n mtStyle.width = widthEl;\n mtStyle.top = pos.top - marginTopSt + unit;\n mtStyle.left = posLeft + unit;\n\n mbStyle.height = marginBottomSt + unit;\n mbStyle.width = widthEl;\n mbStyle.top = pos.top + pos.height + unit;\n mbStyle.left = posLeft + unit;\n\n var marginSideH = pos.height + marginTopSt + marginBottomSt + unit;\n var marginSideT = pos.top - marginTopSt + unit;\n mlStyle.height = marginSideH;\n mlStyle.width = marginLeftSt + unit;\n mlStyle.top = marginSideT;\n mlStyle.left = posLeft - marginLeftSt + unit;\n\n mrStyle.height = marginSideH;\n mrStyle.width = marginRightSt + unit;\n mrStyle.top = marginSideT;\n mrStyle.left = posLeft + pos.width + unit;\n\n // Padding style\n var padTop = parseFloat(style.paddingTop) * zoom;\n ptStyle.height = padTop + unit;\n ptStyle.width = widthEl;\n ptStyle.top = pos.top + unit;\n ptStyle.left = posLeft + unit;\n\n var padBot = parseFloat(style.paddingBottom) * zoom;\n pbStyle.height = padBot + unit;\n pbStyle.width = widthEl;\n pbStyle.top = pos.top + pos.height - padBot + unit;\n pbStyle.left = posLeft + unit;\n\n var padSideH = pos.height - padBot - padTop + unit;\n var padSideT = pos.top + padTop + unit;\n plStyle.height = padSideH;\n plStyle.width = parseFloat(style.paddingLeft) * zoom + unit;\n plStyle.top = padSideT;\n plStyle.left = pos.left + unit;\n\n var padRight = parseFloat(style.paddingRight) * zoom;\n prStyle.height = padSideH;\n prStyle.width = padRight + unit;\n prStyle.top = padSideT;\n prStyle.left = pos.left + pos.width - padRight + unit;\n },\n\n stop(editor, sender, opts) {\n var opt = opts || {};\n var state = opt.state || '';\n var method = this.getOffsetMethod(state);\n var canvas = editor.Canvas;\n var offsetViewer = canvas[method]();\n offsetViewer.style.display = 'none';\n }\n};\n","export default {\n run(ed) {\n ed.Canvas.getBody().className = this.ppfx + 'dashed';\n },\n\n stop(ed) {\n ed.Canvas.getBody().className = '';\n }\n};\n","export default {\n stylePrefix: 'sm-',\n\n sectors: [],\n\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n // Hide the property in case it's not stylable for the\n // selected component (each component has 'stylable' property)\n hideNotStylable: true,\n\n // Highlight changed properties of the selected component\n highlightChanged: true,\n\n // Highlight computed properties of the selected component\n highlightComputed: true,\n\n // Show computed properties of the selected component, if this value\n // is set to false, highlightComputed will not take effect\n showComputed: true,\n\n // Adds the possibility to clear property value from the target style\n clearProperties: 0,\n\n // Properties not to take in account for computed styles\n avoidComputed: ['width', 'height']\n};\n","export default () => ({\n /**\n * Build props object by their name\n * @param {Array|string} props Array of properties name\n * @return {Array}\n */\n build(props) {\n var objs = [];\n var dftFixedValues = ['initial', 'inherit'];\n\n if (typeof props === 'string') props = [props];\n\n for (var i = 0, len = props.length; i < len; i++) {\n var obj = {};\n var prop = props[i];\n obj.property = prop;\n\n // Property\n switch (prop) {\n case 'border-radius-c':\n obj.property = 'border-radius';\n break;\n }\n\n // Fixed values\n switch (prop) {\n case 'top':\n case 'right':\n case 'bottom':\n case 'left':\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'width':\n case 'max-width':\n case 'min-width':\n case 'height':\n case 'max-height':\n case 'min-height':\n case 'flex-basis':\n obj.fixedValues = ['initial', 'inherit', 'auto'];\n break;\n case 'font-size':\n obj.fixedValues = [\n 'medium',\n 'xx-small',\n 'x-small',\n 'small',\n 'large',\n 'x-large',\n 'xx-large',\n 'smaller',\n 'larger',\n 'length',\n 'initial',\n 'inherit'\n ];\n break;\n case 'letter-spacing':\n case 'line-height':\n obj.fixedValues = ['normal', 'initial', 'inherit'];\n break;\n }\n\n // Type\n switch (prop) {\n case 'float':\n case 'position':\n case 'text-align':\n obj.type = 'radio';\n break;\n case 'display':\n case 'flex-direction':\n case 'flex-wrap':\n case 'justify-content':\n case 'align-items':\n case 'align-content':\n case 'align-self':\n case 'font-family':\n case 'font-weight':\n case 'border-style':\n case 'box-shadow-type':\n case 'background-repeat':\n case 'background-position':\n case 'background-attachment':\n case 'background-size':\n case 'transition-property':\n case 'transition-timing-function':\n case 'cursor':\n case 'overflow':\n case 'overflow-x':\n case 'overflow-y':\n obj.type = 'select';\n break;\n case 'top':\n case 'right':\n case 'bottom':\n case 'left':\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'min-height':\n case 'min-width':\n case 'max-height':\n case 'max-width':\n case 'width':\n case 'height':\n case 'font-size':\n case 'letter-spacing':\n case 'line-height':\n case 'text-shadow-h':\n case 'text-shadow-v':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n case 'border-width':\n case 'box-shadow-h':\n case 'box-shadow-v':\n case 'box-shadow-blur':\n case 'box-shadow-spread':\n case 'transition-duration':\n case 'perspective':\n case 'transform-rotate-x':\n case 'transform-rotate-y':\n case 'transform-rotate-z':\n case 'transform-scale-x':\n case 'transform-scale-y':\n case 'transform-scale-z':\n case 'order':\n case 'flex-grow':\n case 'flex-shrink':\n case 'flex-basis':\n obj.type = 'integer';\n break;\n case 'margin':\n case 'padding':\n case 'border-radius':\n case 'border':\n case 'transform':\n obj.type = 'composite';\n break;\n case 'color':\n case 'text-shadow-color':\n case 'background-color':\n case 'border-color':\n case 'box-shadow-color':\n obj.type = 'color';\n break;\n case 'text-shadow':\n case 'box-shadow':\n case 'background':\n case 'transition':\n obj.type = 'stack';\n break;\n case 'background-image':\n obj.type = 'file';\n break;\n }\n\n // Defaults\n switch (prop) {\n case 'float':\n case 'background-color':\n case 'background-image':\n case 'text-shadow':\n obj.defaults = 'none';\n break;\n case 'display':\n obj.defaults = 'block';\n break;\n case 'flex-direction':\n obj.defaults = 'row';\n break;\n case 'flex-wrap':\n obj.defaults = 'nowrap';\n break;\n case 'justify-content':\n obj.defaults = 'flex-start';\n break;\n case 'align-items':\n obj.defaults = 'stretch';\n break;\n case 'align-content':\n obj.defaults = 'stretch';\n break;\n case 'align-self':\n obj.defaults = 'auto';\n break;\n case 'position':\n obj.defaults = 'static';\n break;\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'text-shadow-h':\n case 'text-shadow-v':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'box-shadow-h':\n case 'box-shadow-v':\n case 'box-shadow-spread':\n case 'perspective':\n case 'transform-rotate-x':\n case 'transform-rotate-y':\n case 'transform-rotate-z':\n case 'order':\n case 'flex-grow':\n obj.defaults = 0;\n break;\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n obj.defaults = '0px';\n break;\n case 'transform-scale-x':\n case 'transform-scale-y':\n case 'transform-scale-z':\n case 'flex-shrink':\n obj.defaults = 1;\n break;\n case 'box-shadow-blur':\n obj.defaults = '5px';\n break;\n case 'top':\n case 'right':\n case 'bottom':\n case 'left':\n case 'min-height':\n case 'min-width':\n case 'max-height':\n case 'max-width':\n case 'width':\n case 'height':\n case 'background-size':\n case 'cursor':\n case 'flex-basis':\n obj.defaults = 'auto';\n break;\n case 'font-family':\n obj.defaults = 'Arial, Helvetica, sans-serif';\n break;\n case 'font-size':\n case 'border-width':\n obj.defaults = 'medium';\n break;\n case 'font-weight':\n obj.defaults = '400';\n break;\n case 'letter-spacing':\n case 'line-height':\n obj.defaults = 'normal';\n break;\n case 'color':\n case 'text-shadow-color':\n case 'border-color':\n case 'box-shadow-color':\n obj.defaults = 'black';\n break;\n case 'text-align':\n obj.defaults = 'left';\n break;\n case 'border-style':\n obj.defaults = 'solid';\n break;\n case 'box-shadow-type':\n obj.defaults = '';\n break;\n case 'background-repeat':\n obj.defaults = 'repeat';\n break;\n case 'background-position':\n obj.defaults = 'left top';\n break;\n case 'background-attachment':\n obj.defaults = 'scroll';\n break;\n case 'transition-property':\n obj.defaults = 'width';\n break;\n case 'transition-duration':\n obj.defaults = '2';\n break;\n case 'transition-timing-function':\n obj.defaults = 'ease';\n break;\n case 'overflow':\n case 'overflow-x':\n case 'overflow-y':\n obj.defaults = 'visible';\n break;\n }\n\n /*\n * Add styleable dependency on other properties. Allows properties to be\n * dynamically hidden or shown based on values of other properties.\n *\n * Property will be styleable if all of the properties (keys) in the\n * requires object have any of the values specified in the array.\n */\n switch (prop) {\n case 'flex-direction':\n case 'flex-wrap':\n case 'justify-content':\n case 'align-items':\n case 'align-content':\n obj.requires = { display: ['flex'] };\n break;\n case 'order':\n case 'flex-basis':\n case 'flex-grow':\n case 'flex-shrink':\n case 'align-self':\n obj.requiresParent = { display: ['flex'] };\n break;\n }\n\n // Units\n switch (prop) {\n case 'top':\n case 'bottom':\n case 'margin-top':\n case 'margin-bottom':\n case 'padding-top':\n case 'padding-bottom':\n case 'min-height':\n case 'max-height':\n case 'height':\n obj.units = ['px', '%', 'vh'];\n break;\n case 'right':\n case 'left':\n case 'margin-right':\n case 'margin-left':\n case 'padding-right':\n case 'padding-left':\n case 'min-width':\n case 'max-width':\n case 'width':\n obj.units = ['px', '%', 'vw'];\n break;\n case 'flex-basis':\n obj.units = ['px', '%', 'vw', 'vh'];\n break;\n case 'text-shadow-v':\n case 'text-shadow-h':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n case 'box-shadow-h':\n case 'box-shadow-v':\n obj.units = ['px', '%'];\n break;\n case 'font-size':\n case 'letter-spacing':\n case 'line-height':\n obj.units = ['px', 'em', 'rem', '%'];\n break;\n case 'border-width':\n obj.units = ['px', 'em'];\n break;\n case 'box-shadow-blur':\n case 'box-shadow-spread':\n case 'perspective':\n obj.units = ['px'];\n break;\n case 'transition-duration':\n obj.units = ['s'];\n break;\n case 'transform-rotate-x':\n case 'transform-rotate-y':\n case 'transform-rotate-z':\n obj.units = ['deg'];\n break;\n }\n\n // Min/Max\n switch (prop) {\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n case 'min-height':\n case 'min-width':\n case 'max-height':\n case 'max-width':\n case 'width':\n case 'height':\n case 'font-size':\n case 'text-shadow-blur':\n case 'border-radius-c':\n case 'border-top-left-radius':\n case 'border-top-right-radius':\n case 'border-bottom-left-radius':\n case 'border-bottom-right-radius':\n case 'border-width':\n case 'box-shadow-blur':\n case 'transition-duration':\n case 'perspective':\n case 'flex-basis':\n obj.min = 0;\n break;\n }\n\n // Preview\n switch (prop) {\n case 'text-shadow':\n case 'box-shadow':\n case 'background':\n obj.preview = true;\n break;\n }\n\n // Detached\n switch (prop) {\n case 'background':\n obj.detached = true;\n break;\n }\n\n // Functions\n switch (prop) {\n case 'transform-rotate-x':\n obj.functionName = 'rotateX';\n break;\n case 'transform-rotate-y':\n obj.functionName = 'rotateY';\n break;\n case 'transform-rotate-z':\n obj.functionName = 'rotateZ';\n break;\n case 'transform-scale-x':\n obj.functionName = 'scaleX';\n break;\n case 'transform-scale-y':\n obj.functionName = 'scaleY';\n break;\n case 'transform-scale-z':\n obj.functionName = 'scaleZ';\n break;\n case 'background-image':\n obj.functionName = 'url';\n break;\n }\n\n // Options\n switch (prop) {\n case 'float':\n obj.list = [{ value: 'none' }, { value: 'left' }, { value: 'right' }];\n break;\n case 'display':\n obj.list = [\n { value: 'block' },\n { value: 'inline' },\n { value: 'inline-block' },\n { value: 'flex' },\n { value: 'none' }\n ];\n break;\n case 'flex-direction':\n obj.list = [\n { value: 'row' },\n { value: 'row-reverse' },\n { value: 'column' },\n { value: 'column-reverse' }\n ];\n break;\n case 'flex-wrap':\n obj.list = [\n { value: 'nowrap' },\n { value: 'wrap' },\n { value: 'wrap-reverse' }\n ];\n break;\n case 'justify-content':\n obj.list = [\n { value: 'flex-start' },\n { value: 'flex-end' },\n { value: 'center' },\n { value: 'space-between' },\n { value: 'space-around' },\n { value: 'space-evenly' }\n ];\n break;\n case 'align-items':\n obj.list = [\n { value: 'flex-start' },\n { value: 'flex-end' },\n { value: 'center' },\n { value: 'baseline' },\n { value: 'stretch' }\n ];\n break;\n case 'align-content':\n obj.list = [\n { value: 'flex-start' },\n { value: 'flex-end' },\n { value: 'center' },\n { value: 'space-between' },\n { value: 'space-around' },\n { value: 'stretch' }\n ];\n break;\n case 'align-self':\n obj.list = [\n { value: 'auto' },\n { value: 'flex-start' },\n { value: 'flex-end' },\n { value: 'center' },\n { value: 'baseline' },\n { value: 'stretch' }\n ];\n break;\n case 'position':\n obj.list = [\n { value: 'static' },\n { value: 'relative' },\n { value: 'absolute' },\n { value: 'fixed' }\n ];\n break;\n case 'font-family':\n var ss = ', sans-serif';\n var fonts = [\n 'Arial, Helvetica' + ss,\n 'Arial Black, Gadget' + ss,\n 'Brush Script MT' + ss,\n 'Comic Sans MS, cursive' + ss,\n 'Courier New, Courier, monospace',\n 'Georgia, serif',\n 'Helvetica, serif',\n 'Impact, Charcoal' + ss,\n 'Lucida Sans Unicode, Lucida Grande' + ss,\n 'Tahoma, Geneva' + ss,\n 'Times New Roman, Times, serif',\n 'Trebuchet MS, Helvetica' + ss,\n 'Verdana, Geneva' + ss\n ];\n obj.list = [];\n for (var j = 0, l = fonts.length; j < l; j++) {\n var font = {};\n font.value = fonts[j];\n font.name = fonts[j].split(',')[0];\n obj.list.push(font);\n }\n break;\n case 'font-weight':\n obj.list = [\n { value: '100', name: 'Thin' },\n { value: '200', name: 'Extra-Light' },\n { value: '300', name: 'Light' },\n { value: '400', name: 'Normal' },\n { value: '500', name: 'Medium' },\n { value: '600', name: 'Semi-Bold' },\n { value: '700', name: 'Bold' },\n { value: '800', name: 'Extra-Bold' },\n { value: '900', name: 'Ultra-Bold' }\n ];\n break;\n case 'text-align':\n obj.list = [\n { value: 'left' },\n { value: 'center' },\n { value: 'right' },\n { value: 'justify' }\n ];\n break;\n case 'border-style':\n obj.list = [\n { value: 'none' },\n { value: 'solid' },\n { value: 'dotted' },\n { value: 'dashed' },\n { value: 'double' },\n { value: 'groove' },\n { value: 'ridge' },\n { value: 'inset' },\n { value: 'outset' }\n ];\n break;\n case 'box-shadow-type':\n obj.list = [\n { value: '', name: 'Outside' },\n { value: 'inset', name: 'Inside' }\n ];\n break;\n case 'background-repeat':\n obj.list = [\n { value: 'repeat' },\n { value: 'repeat-x' },\n { value: 'repeat-y' },\n { value: 'no-repeat' }\n ];\n break;\n case 'background-position':\n obj.list = [\n { value: 'left top' },\n { value: 'left center' },\n { value: 'left bottom' },\n { value: 'right top' },\n { value: 'right center' },\n { value: 'right bottom' },\n { value: 'center top' },\n { value: 'center center' },\n { value: 'center bottom' }\n ];\n break;\n case 'background-attachment':\n obj.list = [\n { value: 'scroll' },\n { value: 'fixed' },\n { value: 'local' }\n ];\n break;\n case 'background-size':\n obj.list = [\n { value: 'auto' },\n { value: 'cover' },\n { value: 'contain' }\n ];\n break;\n case 'transition-property':\n obj.list = [\n { value: 'all' },\n { value: 'width' },\n { value: 'height' },\n { value: 'background-color' },\n { value: 'transform' },\n { value: 'box-shadow' },\n { value: 'opacity' }\n ];\n break;\n case 'transition-timing-function':\n obj.list = [\n { value: 'linear' },\n { value: 'ease' },\n { value: 'ease-in' },\n { value: 'ease-out' },\n { value: 'ease-in-out' }\n ];\n break;\n case 'cursor':\n obj.list = [\n { value: 'auto' },\n { value: 'pointer' },\n { value: 'copy' },\n { value: 'crosshair' },\n { value: 'grab' },\n { value: 'grabbing' },\n { value: 'help' },\n { value: 'move' },\n { value: 'text' }\n ];\n break;\n case 'overflow':\n case 'overflow-x':\n case 'overflow-y':\n obj.list = [\n { value: 'visible' },\n { value: 'hidden' },\n { value: 'scroll' },\n { value: 'auto' }\n ];\n break;\n }\n\n // Properties\n switch (prop) {\n case 'margin':\n obj.properties = this.build([\n 'margin-top',\n 'margin-right',\n 'margin-bottom',\n 'margin-left'\n ]);\n break;\n case 'padding':\n obj.properties = this.build([\n 'padding-top',\n 'padding-right',\n 'padding-bottom',\n 'padding-left'\n ]);\n break;\n case 'text-shadow':\n obj.properties = this.build([\n 'text-shadow-h',\n 'text-shadow-v',\n 'text-shadow-blur',\n 'text-shadow-color'\n ]);\n break;\n case 'border':\n obj.properties = this.build([\n 'border-width',\n 'border-style',\n 'border-color'\n ]);\n break;\n case 'border-radius':\n obj.properties = this.build([\n 'border-top-left-radius',\n 'border-top-right-radius',\n 'border-bottom-right-radius',\n 'border-bottom-left-radius'\n ]);\n break;\n case 'box-shadow':\n obj.properties = this.build([\n 'box-shadow-h',\n 'box-shadow-v',\n 'box-shadow-blur',\n 'box-shadow-spread',\n 'box-shadow-color',\n 'box-shadow-type'\n ]);\n break;\n case 'background':\n obj.properties = this.build([\n 'background-image',\n 'background-repeat',\n 'background-position',\n 'background-attachment',\n 'background-size'\n ]);\n break;\n case 'transition':\n obj.properties = this.build([\n 'transition-property',\n 'transition-duration',\n 'transition-timing-function'\n ]);\n break;\n case 'transform':\n obj.properties = this.build([\n 'transform-rotate-x',\n 'transform-rotate-y',\n 'transform-rotate-z',\n 'transform-scale-x',\n 'transform-scale-y',\n 'transform-scale-z'\n ]);\n break;\n }\n\n objs.push(obj);\n }\n\n return objs;\n }\n});\n","import Backbone from 'backbone';\nimport { extend } from 'underscore';\nimport Properties from './Properties';\nimport PropertyFactory from './PropertyFactory';\n\nexport default Backbone.Model.extend({\n defaults: {\n id: '',\n name: '',\n open: true,\n buildProps: '',\n extendBuilded: 1,\n properties: []\n },\n\n initialize(opts) {\n const o = opts || {};\n const builded = this.buildProperties(o.buildProps);\n const name = this.get('name') || '';\n let props = [];\n !this.get('id') && this.set('id', name.replace(/ /g, '_').toLowerCase());\n\n if (!builded) props = this.get('properties');\n else props = this.extendProperties(builded);\n\n const propsModel = new Properties(props);\n propsModel.sector = this;\n this.set('properties', propsModel);\n },\n\n /**\n * Extend properties\n * @param {Array} props Start properties\n * @param {Array} moProps Model props\n * @param {Boolean} ex Returns the same amount of passed model props\n * @return {Array} Final props\n * @private\n */\n extendProperties(props, moProps, ex) {\n var pLen = props.length;\n var mProps = moProps || this.get('properties');\n var ext = this.get('extendBuilded');\n var isolated = [];\n\n for (var i = 0, len = mProps.length; i < len; i++) {\n var mProp = mProps[i];\n var found = 0;\n\n for (var j = 0; j < pLen; j++) {\n var prop = props[j];\n if (mProp.property == prop.property || mProp.id == prop.property) {\n // Check for nested properties\n var mPProps = mProp.properties;\n if (mPProps && mPProps.length) {\n mProp.properties = this.extendProperties(\n prop.properties || [],\n mPProps,\n 1\n );\n }\n props[j] = ext ? extend(prop, mProp) : mProp;\n isolated[j] = props[j];\n found = 1;\n continue;\n }\n }\n\n if (!found) {\n props.push(mProp);\n isolated.push(mProp);\n }\n }\n\n return ex ? isolated.filter(i => i) : props;\n },\n\n /**\n * Build properties\n * @param {Array} propr Array of props as sting\n * @return {Array}\n * @private\n */\n buildProperties(props) {\n var r;\n var buildP = props || [];\n\n if (!buildP.length) return;\n\n if (!this.propFactory) this.propFactory = new PropertyFactory();\n\n r = this.propFactory.build(buildP);\n\n return r;\n }\n});\n","import Backbone from 'backbone';\nimport Sector from './Sector';\n\nexport default Backbone.Collection.extend({\n model: Sector\n});\n","import Backbone from 'backbone';\nimport { template } from 'underscore';\nimport PropertiesView from './PropertiesView';\n\nexport default Backbone.View.extend({\n template: template(`\n
title\" data-sector-title>\n caret\" class=\"fa\">\n <%= label %>\n
`),\n\n events: {\n 'click [data-sector-title]': 'toggle'\n },\n\n initialize(o) {\n this.config = o.config || {};\n this.em = this.config.em;\n this.pfx = this.config.stylePrefix || '';\n this.target = o.target || {};\n this.propTarget = o.propTarget || {};\n this.caretR = 'fa-caret-right';\n this.caretD = 'fa-caret-down';\n const model = this.model;\n this.listenTo(model, 'change:open', this.updateOpen);\n this.listenTo(model, 'updateVisibility', this.updateVisibility);\n this.listenTo(model, 'destroy remove', this.remove);\n },\n\n /**\n * If all properties are hidden this will hide the sector\n */\n updateVisibility() {\n var show;\n this.model.get('properties').each(prop => {\n if (prop.get('visible')) {\n show = 1;\n }\n });\n this.el.style.display = show ? 'block' : 'none';\n },\n\n /**\n * Update visibility\n */\n updateOpen() {\n if (this.model.get('open')) this.show();\n else this.hide();\n },\n\n /**\n * Show the content of the sector\n * */\n show() {\n this.$el.addClass(this.pfx + 'open');\n this.getPropertiesEl().style.display = '';\n this.$caret.removeClass(this.caretR).addClass(this.caretD);\n },\n\n /**\n * Hide the content of the sector\n * */\n hide() {\n this.$el.removeClass(this.pfx + 'open');\n this.getPropertiesEl().style.display = 'none';\n this.$caret.removeClass(this.caretD).addClass(this.caretR);\n },\n\n getPropertiesEl() {\n return this.$el.find(`.${this.pfx}properties`).get(0);\n },\n\n /**\n * Toggle visibility\n * */\n toggle(e) {\n var v = this.model.get('open') ? 0 : 1;\n this.model.set('open', v);\n },\n\n render() {\n const { pfx, model, em, $el } = this;\n const { id, name } = model.attributes;\n const label = (em && em.t(`styleManager.sectors.${id}`)) || name;\n $el.html(this.template({ pfx, label }));\n this.$caret = $el.find(`#${pfx}caret`);\n this.renderProperties();\n $el.attr('class', `${pfx}sector ${pfx}sector__${id} no-select`);\n this.updateOpen();\n return this;\n },\n\n renderProperties() {\n var objs = this.model.get('properties');\n\n if (objs) {\n var view = new PropertiesView({\n collection: objs,\n target: this.target,\n propTarget: this.propTarget,\n config: this.config\n });\n this.$el.append(view.render().el);\n }\n }\n});\n","import Backbone from 'backbone';\nimport { extend, isString, isArray } from 'underscore';\nimport { isTaggableNode } from 'utils/mixins';\nimport { appendAtIndex } from 'utils/dom';\nimport SectorView from './SectorView';\n\nconst helperCls = 'hc-state';\n\nexport default Backbone.View.extend({\n initialize(o = {}) {\n const config = o.config || {};\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.target = o.target || {};\n this.config = config;\n\n // The target that will emit events for properties\n const target = {};\n extend(target, Backbone.Events);\n const body = document.body;\n const dummy = document.createElement(`el-${new Date().getTime()}`);\n body.appendChild(dummy);\n target.computedDefault = { ...window.getComputedStyle(dummy) };\n body.removeChild(dummy);\n this.propTarget = target;\n const coll = this.collection;\n const events =\n 'component:toggled component:update:classes change:state change:device';\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.render);\n this.listenTo(this.target, events, this.targetUpdated);\n },\n\n /**\n * Add to collection\n * @param {Object} model Model\n * @return {Object}\n * @private\n * */\n addTo(model, coll, opts = {}) {\n this.addToCollection(model, null, opts);\n },\n\n toggleStateCls(targets = [], enable) {\n targets.forEach(trg => {\n const el = trg.getEl();\n el && el.classList[enable ? 'add' : 'remove'](helperCls);\n });\n },\n\n /**\n * Fired when target is updated\n * @private\n */\n targetUpdated(trg) {\n const em = this.target;\n const pt = this.propTarget;\n const targets = em.getSelectedAll();\n let model = em.getSelected();\n const mdToClear = trg && !!trg.toHTML ? trg : model;\n\n // Clean components\n mdToClear && this.toggleStateCls([mdToClear]);\n if (!model) return;\n\n const config = em.get('Config');\n const state = !config.devicePreviewMode ? em.get('state') : '';\n const { componentFirst } = em.get('SelectorManager').getConfig();\n const el = model.getEl();\n pt.helper = null;\n pt.targets = null;\n\n // Create computed style container\n if (el && isTaggableNode(el)) {\n const stateStr = state ? `:${state}` : null;\n pt.computed = window.getComputedStyle(el, stateStr);\n }\n\n // Create a new rule for the state as a helper\n const appendStateRule = (style = {}) => {\n const cc = em.get('CssComposer');\n const rules = cc.getAll();\n let helperRule = cc.getClassRule(helperCls);\n\n if (!helperRule) {\n helperRule = cc.setClassRule(helperCls);\n } else {\n // I will make it last again, otherwise it could be overridden\n rules.remove(helperRule);\n rules.add(helperRule);\n }\n\n helperRule.set('important', 1);\n helperRule.setStyle(style);\n pt.helper = helperRule;\n };\n\n model = em.get('StyleManager').getModelToStyle(model);\n\n if (state) {\n appendStateRule(model.getStyle());\n this.toggleStateCls(targets, 1);\n }\n\n pt.model = model;\n if (componentFirst) pt.targets = targets;\n pt.trigger('update');\n },\n\n /**\n * Select different target for the Style Manager.\n * It could be a Component, CSSRule, or a string of any CSS selector\n * @param {Component|CSSRule|String|Array} target\n * @return {Array} Array of Components/CSSRules\n */\n setTarget(target, opts = {}) {\n const em = this.target;\n const trgs = isArray(target) ? target : [target];\n const { targetIsClass, stylable } = opts;\n const models = [];\n\n trgs.forEach(target => {\n let model = target;\n\n if (isString(target)) {\n let rule;\n const rules = em.get('CssComposer').getAll();\n\n if (targetIsClass) {\n rule = rules.filter(\n rule => rule.get('selectors').getFullString() === target\n )[0];\n }\n\n if (!rule) {\n rule = rules.filter(rule => rule.get('selectorsAdd') === target)[0];\n }\n\n if (!rule) {\n rule = rules.add({ selectors: [], selectorsAdd: target });\n }\n\n stylable && rule.set({ stylable });\n model = rule;\n }\n\n models.push(model);\n });\n\n const pt = this.propTarget;\n pt.targets = models;\n pt.trigger('update');\n return models;\n },\n\n /**\n * Add new object to collection\n * @param {Object} model Model\n * @param {Object} fragmentEl collection\n * @return {Object} Object created\n * @private\n * */\n addToCollection(model, fragmentEl, opts = {}) {\n const { pfx, target, propTarget, config, el } = this;\n const appendTo = fragmentEl || el;\n const rendered = new SectorView({\n model,\n id: `${pfx}${model.get('id')}`,\n name: model.get('name'),\n properties: model.get('properties'),\n target,\n propTarget,\n config\n }).render().el;\n appendAtIndex(appendTo, rendered, opts.at);\n\n return rendered;\n },\n\n render() {\n const frag = document.createDocumentFragment();\n const $el = this.$el;\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n $el.empty();\n this.collection.each(model => this.addToCollection(model, frag));\n $el.append(frag);\n $el.addClass(`${pfx}sectors ${ppfx}one-bg ${ppfx}two-color`);\n return this;\n }\n});\n","/**\n * With Style Manager you build categories (called sectors) of CSS properties which could be used to customize the style of components.\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/style_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * styleManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const styleManager = editor.StyleManager;\n * ```\n *\n * * [getConfig](#getconfig)\n * * [addSector](#addsector)\n * * [getSector](#getsector)\n * * [removeSector](#removesector)\n * * [getSectors](#getsectors)\n * * [addProperty](#addproperty)\n * * [getProperty](#getproperty)\n * * [removeProperty](#removeproperty)\n * * [getProperties](#getproperties)\n * * [getModelToStyle](#getmodeltostyle)\n * * [addType](#addtype)\n * * [getType](#gettype)\n * * [getTypes](#gettypes)\n * * [createType](#createtype)\n *\n * @module StyleManager\n */\n\nimport { isElement } from 'underscore';\nimport defaults from './config/config';\nimport Sectors from './model/Sectors';\nimport Properties from './model/Properties';\nimport SectorsView from './view/SectorsView';\n\nexport default () => {\n var c = {};\n let properties;\n var sectors, SectView;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'StyleManager',\n\n /**\n * Get configuration object\n * @return {Object}\n */\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = { ...defaults, ...config };\n const ppfx = c.pStylePrefix;\n this.em = c.em;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n properties = new Properties();\n sectors = new Sectors([], c);\n SectView = new SectorsView({\n collection: sectors,\n target: c.em,\n config: c\n });\n\n return this;\n },\n\n onLoad() {\n sectors.add(c.sectors);\n },\n\n postRender() {\n const elTo = this.getConfig().appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render());\n }\n },\n\n /**\n * Add new sector to the collection. If the sector with the same id already exists,\n * that one will be returned\n * @param {string} id Sector id\n * @param {Object} sector Object representing sector\n * @param {string} [sector.name=''] Sector's label\n * @param {Boolean} [sector.open=true] Indicates if the sector should be opened\n * @param {Array} [sector.properties=[]] Array of properties\n * @param {Object} [options={}] Options\n * @return {Sector} Added Sector\n * @example\n * var sector = styleManager.addSector('mySector',{\n * name: 'My sector',\n * open: true,\n * properties: [{ name: 'My property'}]\n * }, { at: 0 });\n * // With `at: 0` we place the new sector at the beginning of the collection\n * */\n addSector(id, sector, opts = {}) {\n let result = this.getSector(id);\n\n if (!result) {\n sector.id = id;\n result = sectors.add(sector, opts);\n }\n\n return result;\n },\n\n /**\n * Get sector by id\n * @param {string} id Sector id\n * @return {Sector|null}\n * @example\n * var sector = styleManager.getSector('mySector');\n * */\n getSector(id, opts = {}) {\n const res = sectors.where({ id })[0];\n !res && opts.warn && this._logNoSector(id);\n return res;\n },\n\n /**\n * Remove a sector by id\n * @param {string} id Sector id\n * @return {Sector} Removed sector\n * @example\n * const removed = styleManager.removeSector('mySector');\n */\n removeSector(id) {\n return this.getSectors().remove(this.getSector(id, { warn: 1 }));\n },\n\n /**\n * Get all sectors\n * @return {Sectors} Collection of sectors\n * */\n getSectors() {\n return sectors;\n },\n\n /**\n * Add property to the sector identified by id\n * @param {string} sectorId Sector id\n * @param {Object} property Property object\n * @param {string} [property.name=''] Name of the property\n * @param {string} [property.property=''] CSS property, eg. `min-height`\n * @param {string} [property.type=''] Type of the property: integer | radio | select | color | file | composite | stack\n * @param {Array} [property.units=[]] Unit of measure available, eg. ['px','%','em']. Only for integer type\n * @param {string} [property.unit=''] Default selected unit from `units`. Only for integer type\n * @param {number} [property.min=null] Min possible value. Only for integer type\n * @param {number} [property.max=null] Max possible value. Only for integer type\n * @param {string} [property.defaults=''] Default value\n * @param {string} [property.info=''] Some description\n * @param {string} [property.icon=''] Class name. If exists no text will be displayed\n * @param {Boolean} [property.preview=false] Show layers preview. Only for stack type\n * @param {string} [property.functionName=''] Indicates if value need to be wrapped in some function, for istance `transform: rotate(90deg)`\n * @param {Array} [property.properties=[]] Nested properties for composite and stack type\n * @param {Array} [property.layers=[]] Layers for stack properties\n * @param {Array} [property.list=[]] List of possible options for radio and select types\n * @param {Object} [options={}] Options\n * @return {Property|null} Added Property or `null` in case sector doesn't exist\n * @example\n * var property = styleManager.addProperty('mySector',{\n * name: 'Minimum height',\n * property: 'min-height',\n * type: 'select',\n * defaults: '100px',\n * list: [{\n * value: '100px',\n * name: '100',\n * },{\n * value: '200px',\n * name: '200',\n * }],\n * }, { at: 0 });\n * // With `at: 0` we place the new property at the beginning of the collection\n */\n addProperty(sectorId, property, opts = {}) {\n const sector = this.getSector(sectorId, { warn: 1 });\n let prop = null;\n if (sector) prop = sector.get('properties').add(property, opts);\n\n return prop;\n },\n\n /**\n * Get property by its CSS name and sector id\n * @param {string} sectorId Sector id\n * @param {string} name CSS property name, eg. 'min-height'\n * @return {Property|null}\n * @example\n * var property = styleManager.getProperty('mySector','min-height');\n */\n getProperty(sectorId, name) {\n const sector = this.getSector(sectorId, { warn: 1 });\n let prop = null;\n\n if (sector) {\n prop = sector.get('properties').where({ property: name });\n prop = prop.length == 1 ? prop[0] : prop;\n }\n\n return prop;\n },\n\n /**\n * Remove a property from the sector\n * @param {string} sectorId Sector id\n * @param {string} name CSS property name, eg. 'min-height'\n * @return {Property} Removed property\n * @example\n * const property = styleManager.removeProperty('mySector', 'min-height');\n */\n removeProperty(sectorId, name) {\n const props = this.getProperties(sectorId);\n return props && props.remove(this.getProperty(sectorId, name));\n },\n\n /**\n * Get properties of the sector\n * @param {string} sectorId Sector id\n * @return {Properties} Collection of properties\n * @example\n * var properties = styleManager.getProperties('mySector');\n */\n getProperties(sectorId) {\n let props = null;\n const sector = this.getSector(sectorId, { warn: 1 });\n if (sector) props = sector.get('properties');\n\n return props;\n },\n\n /**\n * Get what to style inside Style Manager. If you select the component\n * without classes the entity is the Component itself and all changes will\n * go inside its 'style' property. Otherwise, if the selected component has\n * one or more classes, the function will return the corresponding CSS Rule\n * @param {Model} model\n * @return {Model}\n */\n getModelToStyle(model) {\n const em = c.em;\n const classes = model.get('classes');\n const id = model.getId();\n\n if (em) {\n const config = em.getConfig();\n const um = em.get('UndoManager');\n const cssC = em.get('CssComposer');\n const sm = em.get('SelectorManager');\n const smConf = sm ? sm.getConfig() : {};\n const state = !config.devicePreviewMode ? em.get('state') : '';\n const valid = classes.getStyleable();\n const hasClasses = valid.length;\n const opts = { state };\n let rule;\n\n // I stop undo manager here as after adding the CSSRule (generally after\n // selecting the component) and calling undo() it will remove the rule from\n // the collection, therefore updating it in style manager will not affect it\n // #268\n um.stop();\n\n if (hasClasses && !smConf.componentFirst) {\n const deviceW = em.getCurrentMedia();\n rule = cssC.get(valid, state, deviceW);\n\n if (!rule) {\n rule = cssC.add(valid, state, deviceW);\n }\n } else if (config.avoidInlineStyle) {\n rule = cssC.getIdRule(id, opts);\n !rule && (rule = cssC.setIdRule(id, {}, opts));\n if (model.is('wrapper')) rule.set('wrapper', 1);\n }\n\n rule && (model = rule);\n um.start();\n }\n\n return model;\n },\n\n /**\n * Add new property type\n * @param {string} id Type ID\n * @param {Object} definition Definition of the type. Each definition contains\n * `model` (business logic), `view` (presentation logic)\n * and `isType` function which recognize the type of the\n * passed entity\n *@example\n * styleManager.addType('my-type', {\n * model: {},\n * view: {},\n * isType: (value) => {\n * if (value && value.type == 'my-type') {\n * return value;\n * }\n * },\n * })\n */\n addType(id, definition) {\n properties.addType(id, definition);\n },\n\n /**\n * Get type\n * @param {string} id Type ID\n * @return {Object} Type definition\n */\n getType(id) {\n return properties.getType(id);\n },\n\n /**\n * Get all types\n * @return {Array}\n */\n getTypes() {\n return properties.getTypes();\n },\n\n /**\n * Create new property from type\n * @param {string} id Type ID\n * @param {Object} [options={}] Options\n * @param {Object} [options.model={}] Custom model object\n * @param {Object} [options.view={}] Custom view object\n * @return {PropertyView}\n * @example\n * const propView = styleManager.createType('integer', {\n * model: {units: ['px', 'rem']}\n * });\n * propView.render();\n * propView.model.on('change:value', ...);\n * someContainer.appendChild(propView.el);\n */\n createType(id, { model = {}, view = {} } = {}) {\n const type = this.getType(id);\n\n if (type) {\n return new type.view({\n model: new type.model(model),\n config: c,\n ...view\n });\n }\n },\n\n /**\n * Select different target for the Style Manager.\n * It could be a Component, CSSRule, or a string of any CSS selector\n * @param {Component|CSSRule|String} target\n * @return {Styleable} A Component or CSSRule\n */\n setTarget(target, opts) {\n return SectView.setTarget(target, opts);\n },\n\n getEmitter() {\n return SectView.propTarget;\n },\n\n /**\n * Render sectors and properties\n * @return {HTMLElement}\n * @private\n * */\n render() {\n return SectView.render().el;\n },\n\n _logNoSector(sectorId) {\n const { em } = this;\n em && em.logWarning(`'${sectorId}' sector not found`);\n }\n };\n};\n","export default {\n stylePrefix: '',\n\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n // Enable/Disable globally the possibility to sort layers\n sortable: 1,\n\n // Enable/Disable globally the possibility to hide layers\n hidable: 1,\n\n // Hide textnodes\n hideTextnode: 1,\n\n // Indicate a query string of the element to be selected as the root of layers.\n // By default the root is the wrapper\n root: '',\n\n // Indicates if the wrapper is visible in layers\n showWrapper: 1,\n\n // Show hovered components in canvas\n showHover: 1,\n\n // Scroll to selected component in Canvas when it's selected in Layers\n // true, false or `scrollIntoView`-like options,\n // `block: 'nearest'` avoids the issue of window scolling\n scrollCanvas: { behavior: 'smooth', block: 'nearest' },\n\n // Scroll to selected component in Layers when it's selected in Canvas\n // true, false or `scrollIntoView`-like options\n scrollLayers: { behavior: 'auto', block: 'nearest' },\n\n // Highlight when a layer component is hovered\n highlightHover: 1\n};\n","import defaults from './config/config';\nimport ItemView from './view/ItemView';\nimport { isElement } from 'underscore';\n\nexport default () => {\n let em;\n let layers;\n let config = {};\n\n return {\n name: 'LayerManager',\n\n init(opts = {}) {\n config = { ...defaults, ...opts };\n config.stylePrefix = opts.pStylePrefix;\n em = config.em;\n\n return this;\n },\n\n getConfig() {\n return config;\n },\n\n onLoad() {\n layers = new ItemView({\n level: 0,\n config,\n opened: config.opened || {},\n model: em.get('DomComponents').getWrapper()\n });\n em && em.on('component:selected', this.componentChanged);\n this.componentChanged();\n },\n\n postRender() {\n const elTo = config.appendTo;\n const root = config.root;\n root && this.setRoot(root);\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render());\n }\n },\n\n /**\n * Set new root for layers\n * @param {HTMLElement|Component|String} el Component to be set as the root\n * @return {self}\n */\n setRoot(el) {\n layers.setRoot(el);\n return this;\n },\n\n /**\n * Get the root of layers\n * @return {Component}\n */\n getRoot() {\n return layers.model;\n },\n\n /**\n * Return the view of layers\n * @return {View}\n */\n getAll() {\n return layers;\n },\n\n /**\n * Triggered when the selected component is changed\n * @private\n */\n componentChanged(selected, opts = {}) {\n if (opts.fromLayers) return;\n const opened = em.get('opened');\n const model = em.getSelected();\n const scroll = config.scrollLayers;\n let parent = model && model.collection ? model.collection.parent : null;\n for (let cid in opened) opened[cid].set('open', 0);\n\n while (parent) {\n parent.set('open', 1);\n opened[parent.cid] = parent;\n parent = parent.collection ? parent.collection.parent : null;\n }\n\n if (model && scroll) {\n const el = model.viewLayer && model.viewLayer.el;\n el && el.scrollIntoView(scroll);\n }\n },\n\n render() {\n return layers.render().el;\n }\n };\n};\n","/*!\n * Backbone.Undo.js v0.2\n * \n * Copyright (c)2013 Oliver Sartun\n * Released under the MIT License\n *\n * Documentation and full license available at\n * https://github.com/osartun/Backbone.Undo.js\n */\n\n\n(function (factory) {\n\tif (typeof define === \"function\" && define.amd) {\n\t\t// AMD support\n\t\tdefine([\"underscore\", \"backbone\"], factory);\n\t} else if (typeof exports !== 'undefined') {\n\t\t// CommonJS support\n\t\tmodule.exports = factory(\n\t\t\trequire(\"underscore\"),\n\t\t\trequire(\"backbone\")\n\t\t);\n\t} else {\n\t\t// Non-modular execution\n\t\tfactory(_, Backbone);\n }\n})(function (_, Backbone) {\n\n\tvar core_slice = Array.prototype.slice;\n\n\t/**\n\t * As call is faster than apply, this is a faster version of apply as it uses call.\n\t * \n\t * @param {Function} fn \tThe function to execute \n\t * @param {Object} ctx \tThe context the function should be called in\n\t * @param {Array} args \tThe array of arguments that should be applied to the function\n\t * @return Forwards whatever the called function returns\n\t */\n\tfunction apply (fn, ctx, args) {\n\t\treturn args.length <= 4 ?\n\t\t\tfn.call(ctx, args[0], args[1], args[2], args[3]) :\n\t\t\tfn.apply(ctx, args);\n\t}\n\n\t/**\n\t * Uses slice on an array or an array-like object.\n\t * \n\t * @param {Array|Object} \tarr \tThe array or array-like object.\n\t * @param {Number} \t\t[index]\tThe index from where the array should be sliced. Default is 0.\n\t * @return {Array} The sliced array\n\t */\n\tfunction slice (arr, index) {\n\t\treturn core_slice.call(arr, index);\n\t}\n\n\t/**\n\t * Checks if an object has one or more specific keys. The keys \n\t * don't have to be an owned property.\n\t * You can call this function either this way:\n\t * hasKeys(obj, [\"a\", \"b\", \"c\"])\n\t * or this way:\n\t * hasKeys(obj, \"a\", \"b\", \"c\")\n\t * \n\t * @param {Object} \tobj \tThe object to check on\n\t * @param {Array} \tkeys \tThe keys to check for\n\t * @return {Boolean} True, if the object has all those keys\n\t */\n\tfunction hasKeys (obj, keys) {\n\t\tif (obj == null) return false;\n\t\tif (!_.isArray(keys)) {\n\t\t\tkeys = slice(arguments, 1);\n\t\t}\n\t\treturn _.all(keys, function (key) {\n\t\t\treturn key in obj;\n\t\t});\n\t}\n\n\t/**\n\t * Returns a number that is unique per call stack. The number gets \n\t * changed after the call stack has been completely processed.\n\t * \n\t * @return {number} MagicFusionIndex\n\t */\n\tvar getMagicFusionIndex = (function () {\n\t\t// If you add several models to a collection or set several\n\t\t// attributes on a model all in sequence and yet all for\n\t\t// example in one function, then several Undo-Actions are\n\t\t// generated.\n\t\t// If you want to undo your last action only the last model\n\t\t// would be removed from the collection or the last set\n\t\t// attribute would be changed back to its previous value.\n\t\t// To prevent that we have to figure out a way to combine\n\t\t// all those actions that happened \"at the same time\". \n\t\t// Timestamps aren't exact enough. A complex routine could \n\t\t// run several milliseconds and in that time produce a lot \n\t\t// of actions with different timestamps.\n\t\t// Instead we take advantage of the single-threadedness of\n\t\t// JavaScript:\n\n\t\tvar callstackWasIndexed = false, magicFusionIndex = -1;\n\t\tfunction indexCycle() {\n\t\t\tmagicFusionIndex++;\n\t\t\tcallstackWasIndexed = true;\n\t\t\t_.defer(function () {\n\t\t\t\t// Here comes the magic. With a Timeout of 0 \n\t\t\t\t// milliseconds this function gets called whenever\n\t\t\t\t// the current callstack is completed\n\t\t\t\tcallstackWasIndexed = false;\n\t\t\t})\n\t\t}\n\t\treturn function () {\n\t\t\tif (!callstackWasIndexed) {\n\t\t\t\tindexCycle();\n\t\t\t}\n\t\t\treturn magicFusionIndex;\n\t\t}\n\t})();\n\n\t/**\n\t * To prevent binding a listener several times to one \n\t * object, we register the objects in an ObjectRegistry\n\t *\n\t * @constructor\n\t */\n\tfunction ObjectRegistry () {\n\t\t// This uses two different ways of storing\n\t\t// objects: In case the object has a cid\n\t\t// (which Backbone objects typically have)\n\t\t// it uses this cid as an index. That way\n\t\t// the Array's length attribute doesn't \n\t\t// change and the object isn't an item \n\t\t// in the array, but an object-property.\n\t\t// Otherwise it's added to the Array as an\n\t\t// item.\n\t\t// That way we can use the fast property-\n\t\t// lookup and only have to fall back to \n\t\t// iterating over the array in case \n\t\t// non-Backbone-objects are registered.\n\t\tthis.registeredObjects = [];\n\t\t// To return a list of all registered \n\t\t// objects in the 'get' method we have to\n\t\t// store the objects that have a cid in\n\t\t// an additional array. \n\t\tthis.cidIndexes = [];\n\t}\n\tObjectRegistry.prototype = {\n\t\t/**\n\t\t * Returns whether the object is already registered in this ObjectRegistry or not.\n\t\t * \n\t\t * @this \t{ObjectRegistry}\n\t\t * @param \t{Object} \t\t obj \tThe object to check\n\t\t * @return \t{Boolean} True if the object is already registered\n\t\t */\n\t\tisRegistered: function (obj) {\n\t\t\t// This is where we get a performance boost \n\t\t\t// by using the two different ways of storing \n\t\t\t// objects.\n\t\t\treturn obj && obj.cid ? this.registeredObjects[obj.cid] : _.contains(this.registeredObjects, obj);\n\t\t},\n\t\t/**\n\t\t * Registers an object in this ObjectRegistry.\n\t\t * \n\t\t * @this \t{ObjectRegistry}\n\t\t * @param \t{Object} \t\t obj \tThe object to register\n\t\t * @return \t{undefined}\n\t\t */\n\t\tregister: function (obj) {\n\t\t\tif (!this.isRegistered(obj)) {\n\t\t\t\tif (obj && obj.cid) {\n\t\t\t\t\tthis.registeredObjects[obj.cid] = obj;\n\t\t\t\t\tthis.cidIndexes.push(obj.cid);\n\t\t\t\t} else {\n\t\t\t\t\tthis.registeredObjects.push(obj);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\t/**\n\t\t * Unregisters an object from this ObjectRegistry.\n\t\t * \n\t\t * @this {ObjectRegistry}\n\t\t * @param {Object} obj The object to unregister\n\t\t * @return {undefined}\n\t\t */\n\t\tunregister: function (obj) {\n\t\t\tif (this.isRegistered(obj)) {\n\t\t\t\tif (obj && obj.cid) {\n\t\t\t\t\tdelete this.registeredObjects[obj.cid];\n\t\t\t\t\tthis.cidIndexes.splice(_.indexOf(this.cidIndexes, obj.cid), 1);\n\t\t\t\t} else {\n\t\t\t\t\tvar i = _.indexOf(this.registeredObjects, obj);\n\t\t\t\t\tthis.registeredObjects.splice(i, 1);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\t/**\n\t\t * Returns an array of all objects that are currently in this ObjectRegistry.\n\t\t * \n\t\t * @return {Array} An array of all the objects which are currently in the ObjectRegistry\n\t\t */\n\t\tget: function () {\n\t\t\treturn (_.map(this.cidIndexes, function (cid) {return this.registeredObjects[cid];}, this)).concat(this.registeredObjects);\n\t\t}\n\t}\n\n\t/**\n\t * Binds or unbinds the \"all\"-listener for one or more objects.\n\t * \n\t * @param {String} which \tEither \"on\" or \"off\"\n\t * @param {Object[]} objects \tArray of the objects on which the \"all\"-listener should be bound / unbound to\n\t * @param {Function} [fn] \t\tThe function that should be bound / unbound. Optional in case of \"off\"\n\t * @param {Object} [ctx] \tThe context the function should be called in\n\t * @return {undefined}\n\t */\n\tfunction onoff(which, objects, fn, ctx) {\n\t\tfor (var i = 0, l = objects.length, obj; i < l; i++) {\n\t\t\tobj = objects[i];\n\t\t\tif (!obj) continue;\n\t\t\tif (which === \"on\") {\n\t\t\t\tif (!ctx.objectRegistry.register(obj)) {\n\t\t\t\t\t// register returned false, so obj was already registered\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (!ctx.objectRegistry.unregister(obj)) {\n\t\t\t\t\t// unregister returned false, so obj wasn't registered\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (_.isFunction(obj[which])) {\n\t\t\t\tobj[which](\"all\", fn, ctx);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Calls the undo/redo-function for a specific action.\n\t * \n\t * @param {String} which \tEither \"undo\" or \"redo\"\n\t * @param {Object} action \tThe Action's attributes\n\t * @return {undefined}\n\t */\n\tfunction actionUndoRedo (which, action) {\n\t\tvar type = action.type, undoTypes = action.undoTypes, fn = !undoTypes[type] || undoTypes[type][which];\n\t\tif (_.isFunction(fn)) {\n\t\t\tfn(action.object, action.before, action.after, action.options);\n\t\t}\n\t}\n\n\t/**\n\t * The main undo/redo function.\n\t *\n\t * @param {String} \t\twhich \t Either \"undo\" or \"redo\"\n\t * @param {UndoManager} \tmanager\t The UndoManager-instance on which an \"undo\"/\"redo\"-Event is triggered afterwards\n\t * @param {UndoStack} \t\tstack \t The UndoStack on which we perform\n\t * @param {Boolean} \t\tmagic \t If true, undoes / redoes all actions with the same magicFusionIndex\n\t * @param {Boolean} \t\teverything If true, undoes / redoes every action that had been tracked\n\t * @return {undefined}\n\t */\n\tfunction managerUndoRedo (which, manager, stack, magic, everything) {\n\t\tif (stack.isCurrentlyUndoRedoing || \n\t\t\t(which === \"undo\" && stack.pointer === -1) ||\n\t\t\t(which === \"redo\" && stack.pointer === stack.length - 1)) {\n\t\t\t// We're either currently in an undo- / redo-process or \n\t\t\t// we reached the end of the stack\n\t\t\treturn;\n\t\t}\n\t\tstack.isCurrentlyUndoRedoing = true;\n\t\tvar action, actions, isUndo = which === \"undo\";\n\t\tif (everything) {\n\t\t\t// Undo / Redo all steps until you reach the stack's beginning / end\n\t\t\tactions = isUndo && stack.pointer === stack.length - 1 || // If at the stack's end calling undo\n\t\t\t\t\t !isUndo && stack.pointer === -1 ? // or at the stack's beginning calling redo\n\t\t\t\t\t _.clone(stack.models) : // => Take all the models. Otherwise:\n\t\t\t\t\t core_slice.apply(stack.models, isUndo ? [0, stack.pointer] : [stack.pointer, stack.length - 1]);\n\t\t} else {\n\t\t\t// Undo / Redo only one step\n\t\t\taction = stack.at(isUndo ? stack.pointer : stack.pointer + 1);\n\t\t\tactions = magic ? stack.where({\"magicFusionIndex\": action.get(\"magicFusionIndex\")}) : [action];\n\t\t}\n\t\t\n\t\tstack.pointer += (isUndo ? -1 : 1) * actions.length;\n\t\twhile (action = isUndo ? actions.pop() : actions.shift()) {\n\t\t\t// Here we're calling the Action's undo / redo method\n\t\t\taction[which]();\n\t\t}\n\t\tstack.isCurrentlyUndoRedoing = false;\n\n\t\tmanager.trigger(which, manager);\n\t}\n\n\t/**\n\t * Checks whether an UndoAction should be created or not. Therefore it checks\n\t * whether a \"condition\" property is set in the undoTypes-object of the specific\n\t * event type. If not, it returns true. If it's set and a boolean, it returns it.\n\t * If it's a function, it returns its result, converting it into a boolean. \n\t * Otherwise it returns true.\n\t * \n\t * @param {Object} \tundoTypesType \tThe object within the UndoTypes that holds the function for this event type (i.e. \"change\")\n\t * @param {Arguments} \targs \t\tThe arguments the \"condition\" function is called with\n\t * @return {Boolean} \tTrue, if an UndoAction should be created\n\t */\n\tfunction validateUndoActionCreation (undoTypesType, args) {\n\t\tvar condition = undoTypesType.condition, type = typeof condition;\n\t\treturn type === \"function\" ? !!apply(condition, undoTypesType, args) :\n\t\t\ttype === \"boolean\" ? condition : true;\n\t}\n\n\t/**\n\t * Adds an Undo-Action to the stack.\n\t * \n\t * @param {UndoStack} \t\tstack \t\tThe undostack the action should be added to.\n\t * @param {String} \t\t\ttype \t\tThe event type (i.e. \"change\")\n\t * @param {Arguments} \t\targs \t\tThe arguments passed to the undoTypes' \"on\"-handler\n\t * @param {OwnedUndoTypes} \tundoTypes \tThe undoTypes-object which has the \"on\"-handler\n\t * @return {undefined}\n\t */\n\tfunction addToStack(stack, type, args, undoTypes) {\n\t\tif (stack.track && !stack.isCurrentlyUndoRedoing && type in undoTypes &&\n\t\t\tvalidateUndoActionCreation(undoTypes[type], args)) {\n\t\t\t// An UndoAction should be created\n\t\t\tvar res = apply(undoTypes[type][\"on\"], undoTypes[type], args), diff;\n\t\t\tif (hasKeys(res, \"object\", \"before\", \"after\")) {\n\t\t\t\tres.type = type;\n\t\t\t\tres.magicFusionIndex = getMagicFusionIndex();\n\t\t\t\tres.undoTypes = undoTypes;\n\t\t\t\tif (stack.pointer < stack.length - 1) {\n\t\t\t\t\t// New Actions must always be added to the end of the stack.\n\t\t\t\t\t// If the pointer is not pointed to the last action in the\n\t\t\t\t\t// stack, presumably because actions were undone before, then\n\t\t\t\t\t// all following actions must be discarded\n\t\t\t\t\tvar diff = stack.length - stack.pointer - 1;\n\t\t\t\t\twhile (diff--) {\n\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstack.pointer = stack.length;\n\t\t\t\tstack.add(res);\n\t\t\t\tif (stack.length > stack.maximumStackLength) {\n\t\t\t\t\tstack.shift();\n\t\t\t\t\tstack.pointer--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\t/**\n\t * Predefined UndoTypes object with default handlers for the most common events.\n\t * @type {Object}\n\t */\n\tvar UndoTypes = {\n\t\t\"add\": {\n\t\t\t\"undo\": function (collection, ignore, model, options) {\n\t\t\t\t// Undo add = remove\n\t\t\t\tcollection.remove(model, options);\n\t\t\t},\n\t\t\t\"redo\": function (collection, ignore, model, options) {\n\t\t\t\t// Redo add = add\n\t\t\t\tif (options.index) {\n\t\t\t\t\toptions.at = options.index;\n\t\t\t\t}\n\t\t\t\tcollection.add(model, options);\n\t\t\t},\n\t\t\t\"on\": function (model, collection, options) {\n\t\t\t\treturn {\n\t\t\t\t\tobject: collection,\n\t\t\t\t\tbefore: undefined,\n\t\t\t\t\tafter: model,\n\t\t\t\t\toptions: _.clone(options)\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\t\"remove\": {\n\t\t\t\"undo\": function (collection, model, ignore, options) {\n\t\t\t\tif (\"index\" in options) {\n\t\t\t\t\toptions.at = options.index;\n\t\t\t\t}\n\t\t\t\tcollection.add(model, options);\n\t\t\t},\n\t\t\t\"redo\": function (collection, model, ignore, options) {\n\t\t\t\tcollection.remove(model, options);\n\t\t\t},\n\t\t\t\"on\": function (model, collection, options) {\n\t\t\t\treturn {\n\t\t\t\t\tobject: collection,\n\t\t\t\t\tbefore: model,\n\t\t\t\t\tafter: undefined,\n\t\t\t\t\toptions: _.clone(options)\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\t\"change\": {\n\t\t\t\"undo\": function (model, before, after, options) {\n\t\t\t\tif (_.isEmpty(before)) {\n\t\t\t\t\t_.each(_.keys(after), model.unset, model);\n\t\t\t\t} else {\n\t\t\t\t\tmodel.set(before);\n\t\t\t\t\tif (options && options.unsetData && options.unsetData.before && options.unsetData.before.length) {\n\t\t\t\t\t\t_.each(options.unsetData.before, model.unset, model);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"redo\": function (model, before, after, options) {\n\t\t\t\tif (_.isEmpty(after)) {\n\t\t\t\t\t_.each(_.keys(before), model.unset, model);\n\t\t\t\t} else {\n\t\t\t\t\tmodel.set(after);\n\t\t\t\t\tif (options && options.unsetData && options.unsetData.after && options.unsetData.after.length) {\n\t\t\t\t\t\t_.each(options.unsetData.after, model.unset, model);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"on\": function (model, options) {\n\t\t\t\tvar\n\t\t\t\tafterAttributes = model.changedAttributes(),\n\t\t\t\tkeysAfter = _.keys(afterAttributes),\n\t\t\t\tpreviousAttributes = _.pick(model.previousAttributes(), keysAfter),\n\t\t\t\tkeysPrevious = _.keys(previousAttributes),\n\t\t\t\tunsetData = (options || (options = {})).unsetData = {\n\t\t\t\t\tafter: [],\n\t\t\t\t\tbefore: []\n\t\t\t\t};\n\n\t\t\t\tif (keysAfter.length != keysPrevious.length) {\n\t\t\t\t\t// There are new attributes or old attributes have been unset\n\t\t\t\t\tif (keysAfter.length > keysPrevious.length) {\n\t\t\t\t\t\t// New attributes have been added\n\t\t\t\t\t\t_.each(keysAfter, function (val) {\n\t\t\t\t\t\t\tif (!(val in previousAttributes)) {\n\t\t\t\t\t\t\t\tunsetData.before.push(val);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, this);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Old attributes have been unset\n\t\t\t\t\t\t_.each(keysPrevious, function (val) {\n\t\t\t\t\t\t\tif (!(val in afterAttributes)) {\n\t\t\t\t\t\t\t\tunsetData.after.push(val);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tobject: model,\n\t\t\t\t\tbefore: previousAttributes,\n\t\t\t\t\tafter: afterAttributes,\n\t\t\t\t\toptions: _.clone(options)\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\t\"reset\": {\n\t\t\t\"undo\": function (collection, before, after) {\n\t\t\t\tcollection.reset(before);\n\t\t\t},\n\t\t\t\"redo\": function (collection, before, after) {\n\t\t\t\tcollection.reset(after);\n\t\t\t},\n\t\t\t\"on\": function (collection, options) {\n\t\t\t\treturn {\n\t\t\t\t\tobject: collection,\n\t\t\t\t\tbefore: options.previousModels,\n\t\t\t\t\tafter: _.clone(collection.models)\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Every UndoManager instance has an own undoTypes object\n\t * which is an instance of OwnedUndoTypes. OwnedUndoTypes' \n\t * prototype is the global UndoTypes object. Changes to the \n\t * global UndoTypes object take effect on every instance of\n\t * UndoManager as the object is its prototype. And yet every \n\t * local UndoTypes object can be changed individually.\n\t *\n\t * @constructor\n\t */\n\tfunction OwnedUndoTypes () {}\n\tOwnedUndoTypes.prototype = UndoTypes;\n\n\t/**\n\t * Adds, changes or removes an undo-type from an UndoTypes-object.\n\t * You can call it this way:\n\t * manipulateUndoType (1, \"reset\", {\"on\": function () {}}, undoTypes)\n\t * or this way to perform bulk actions:\n\t * manipulateUndoType (1, {\"reset\": {\"on\": function () {}}}, undoTypes)\n\t * In case of removing undo-types you can pass an Array for performing\n\t * bulk actions:\n\t * manipulateUndoType(2, [\"reset\", \"change\"], undoTypes)\n\t * \n\t * @param {Number} \t\t\t\t manipType \t\tIndicates the kind of action to execute: 0 for add, 1 for change, 2 for remove\n\t * @param {String|Object|Array} \t undoType \t\t\tThe type of undoType that should be added/changed/removed. Can be an object / array to perform bulk actions\n\t * @param {Object} \t\t\t\t [fns] \t\t\tObject with the functions to add / change. Is optional in case you passed an object as undoType that contains these functions\n\t * @param {OwnedUndoTypes|UndoTypes} undoTypesInstance The undoTypes object to act on\n\t * @return {undefined}\n\t */\n\tfunction manipulateUndoType (manipType, undoType, fns, undoTypesInstance) {\n\t\t// manipType, passed by the calling function\n\t\t// 0: add\n\t\t// 1: change\n\t\t// 2: remove\n\t\tif (typeof undoType === \"object\") {\n\t\t\t// bulk action. Iterate over this data.\n\t\t\treturn _.each(undoType, function (val, key) {\n\t\t\t\t\tif (manipType === 2) { // remove\n\t\t\t\t\t\t// undoType is an array\n\t\t\t\t\t\tmanipulateUndoType (manipType, val, fns, undoTypesInstance);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// undoType is an object\n\t\t\t\t\t\tmanipulateUndoType (manipType, key, val, fns);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\n\t\tswitch (manipType) {\n\t\t\tcase 0: // add\n\t\t\t\tif (hasKeys(fns, \"undo\", \"redo\", \"on\") && _.all(_.pick(fns, \"undo\", \"redo\", \"on\"), _.isFunction)) {\n\t\t\t\t\tundoTypesInstance[undoType] = fns;\n\t\t\t\t} \n\t\t\tbreak;\n\t\t\tcase 1: // change\n\t\t\t\tif (undoTypesInstance[undoType] && _.isObject(fns)) {\n\t\t\t\t\t// undoTypeInstance[undoType] may be a prototype's property\n\t\t\t\t\t// So, if we did this _.extend(undoTypeInstance[undoType], fns)\n\t\t\t\t\t// we would extend the object on the prototype which means\n\t\t\t\t\t// that this change would have a global effect\n\t\t\t\t\t// Instead we just want to manipulate this instance. That's why\n\t\t\t\t\t// we're doing this:\n\t\t\t\t\tundoTypesInstance[undoType] = _.extend({}, undoTypesInstance[undoType], fns);\n\t\t\t\t} \n\t\t\tbreak;\n\t\t\tcase 2: // remove\n\t\t\t\tdelete undoTypesInstance[undoType]; \n\t\t\tbreak;\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t * Instantiating \"Action\" creates the UndoActions that \n\t * are collected in an UndoStack. It holds all relevant \n\t * data to undo / redo an action and has an undo / redo \n\t * method.\n\t */\n\tvar Action = Backbone.Model.extend({\n\t\tdefaults: {\n\t\t\ttype: null, // \"add\", \"change\", \"reset\", etc.\n\t\t\tobject: null, // The object on which the action occurred\n\t\t\tbefore: null, // The previous values which were changed with this action\n\t\t\tafter: null, // The values after this action\n\t\t\tmagicFusionIndex: null // The magicFusionIndex helps to combine \n\t\t\t// all actions that occurred \"at the same time\" to undo/redo them altogether\n\t\t},\n\t\t/**\n\t\t * Undoes this action.\n\t\t * @param {OwnedUndoTypes|UndoTypes} undoTypes The undoTypes object which contains the \"undo\"-handler that should be used\n\t\t * @return {undefined}\n\t\t */\n\t\tundo: function (undoTypes) {\n\t\t\tactionUndoRedo(\"undo\", this.attributes);\n\t\t},\n\t\t/**\n\t\t * Redoes this action.\n\t\t * @param {OwnedUndoTypes|UndoTypes} undoTypes The undoTypes object which contains the \"redo\"-handler that should be used\n\t\t * @return {undefined}\n\t\t */\n\t\tredo: function (undoTypes) {\n\t\t\tactionUndoRedo(\"redo\", this.attributes);\n\t\t}\n\t}),\n\t/**\n\t * An UndoStack is a collection of UndoActions in \n\t * chronological order.\n\t */\n\tUndoStack = Backbone.Collection.extend({\n\t\tmodel: Action,\n\t\tpointer: -1, // The pointer indicates the index where we are located within the stack. We start at -1\n\t\ttrack: false,\n\t\tisCurrentlyUndoRedoing: false,\n\t\tmaximumStackLength: Infinity,\n\t\tsetMaxLength: function (val) {\n\t\t\tthis.maximumStackLength = val;\n\t\t}\n\t}),\n\t/**\n\t * An instance of UndoManager can keep track of \n\t * changes to objects and helps to undo them.\n\t */\n\tUndoManager = Backbone.Model.extend({\n\t\tdefaults: {\n\t\t\tmaximumStackLength: Infinity,\n\t\t\ttrack: false\n\t\t},\n\t\t/**\n\t\t * The constructor function.\n\t\t * @param {attr} \t\t[attr] Object with parameters. The available parameters are:\n\t\t * \t - maximumStackLength {number} \tSet the undo-stack's maximum size\n\t\t * - track \t\t\t\t{boolean}\tStart tracking changes right away\n\t\t * @return {undefined}\n\t\t */\n\t\tinitialize: function (attr) {\n\t\t\tthis.stack = new UndoStack;\n\t\t\tthis.objectRegistry = new ObjectRegistry();\n\t\t\tthis.undoTypes = new OwnedUndoTypes();\n\n\t\t\t// sync the maximumStackLength attribute with our stack\n\t\t\tthis.stack.setMaxLength(this.get(\"maximumStackLength\"));\n\t\t\tthis.on(\"change:maximumStackLength\", function (model, value) {\n\t\t\t\tthis.stack.setMaxLength(value);\n\t\t\t}, this);\n\n\t\t\t// Start tracking, if attr.track == true\n\t\t\tif (attr && attr.track) {\n\t\t\t\tthis.startTracking();\n\t\t\t}\n\n\t\t\t// Register objects passed in the \"register\" attribute\n\t\t\tif (attr && attr.register) {\n\t\t\t\tif (_.isArray(attr.register) || _.isArguments(attr.register)) {\n\t\t\t\t\tapply(this.register, this, attr.register);\n\t\t\t\t} else {\n\t\t\t\t\tthis.register(attr.register);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Starts tracking. Changes of registered objects won't be processed until you've called this function\n\t\t * @return {undefined}\n\t\t */\n\t\tstartTracking: function () {\n\t\t\tthis.set(\"track\", true);\n\t\t\tthis.stack.track = true;\n\t\t},\n\t\t/**\n\t\t * Stops tracking. Afterwards changes of registered objects won't be processed.\n\t\t * @return {undefined}\n\t\t */\n\t\tstopTracking: function () {\n\t\t\tthis.set(\"track\", false);\n\t\t\tthis.stack.track = false;\n\t\t},\n\t\t/**\n\t\t * Return the state of the tracking\n\t\t * @return {boolean}\n\t\t */\n\t\tisTracking: function () {\n\t\t\treturn this.get(\"track\");\n\t\t},\n\t\t/**\n\t\t * This is the \"all\"-handler which is bound to registered \n\t\t * objects. It creates an UndoAction from the event and adds \n\t\t * it to the stack.\n\t\t * \n\t\t * @param {String} \ttype \tThe event type\n\t\t * @return {undefined}\n\t\t */\n\t\t_addToStack: function (type) {\n\t\t\taddToStack(this.stack, type, slice(arguments, 1), this.undoTypes);\n\t\t},\n\t\t/**\n\t\t * Registers one or more objects to track their changes.\n\t\t * @param {...Object} \tobj \tThe object or objects of which changes should be tracked\n\t\t * @return {undefined}\n\t\t */\n\t\tregister: function () {\n\t\t\tonoff(\"on\", arguments, this._addToStack, this);\n\t\t},\n\t\t/**\n\t\t * Unregisters one or more objects.\n\t\t * @param {...Object} \tobj \tThe object or objects of which changes shouldn't be tracked any longer\n\t\t * @return {undefined}\n\t\t */\n\t\tunregister: function () {\n\t\t\tonoff(\"off\", arguments, this._addToStack, this);\n\t\t},\n\t\t/**\n\t\t * Unregisters all previously registered objects.\n\t\t * @return {undefined}\n\t\t */\n\t\tunregisterAll: function () {\n\t\t\tapply(this.unregister, this, this.objectRegistry.get());\n\t\t},\n\t\t/**\n\t\t * Undoes the last action or the last set of actions in case 'magic' is true.\n\t\t * @param {Boolean} \t[magic] \tIf true, all actions that happened basically at the same time are undone together\n\t\t * @return {undefined}\n\t\t */\n\t\tundo: function (magic) {\n\t\t\tmanagerUndoRedo(\"undo\", this, this.stack, magic);\n\t\t},\n\n\t\t/**\n\t\t * Undoes all actions ever tracked by the undo manager\n\t\t * @return {undefined}\n\t\t */\n\t\tundoAll: function () {\n\t\t\tmanagerUndoRedo(\"undo\", this, this.stack, false, true);\n\t\t},\n\n\t\t/**\n\t\t * Redoes a previously undone action or a set of actions.\n\t\t * @param {Boolean} \t[magic] \tIf true, all actions that happened basically at the same time are redone together\n\t\t * @return {undefined}\n\t\t */\n\t\tredo: function (magic) {\n\t\t\tmanagerUndoRedo(\"redo\", this, this.stack, magic);\n\t\t},\n\n\t\t/**\n\t\t * Redoes all actions ever tracked by the undo manager\n\t\t * @return {undefined}\n\t\t */\n\t\tredoAll: function () {\n\t\t\tmanagerUndoRedo(\"redo\", this, this.stack, false, true);\n\t\t},\n\t\t/**\n\t\t * Checks if there's an action in the stack that can be undone / redone\n\t\t * @param {String} \ttype \tEither \"undo\" or \"redo\"\n\t\t * @return {Boolean} True if there is a set of actions which can be undone / redone\n\t\t */\n\t\tisAvailable: function (type) {\n\t\t\tvar s = this.stack, l = s.length;\n\n\t\t\tswitch (type) {\n\t\t\t\tcase \"undo\": return l > 0 && s.pointer > -1;\n\t\t\t\tcase \"redo\": return l > 0 && s.pointer < l - 1;\n\t\t\t\tdefault: return false;\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Sets the stack-reference to the stack of another undoManager.\n\t\t * @param {UndoManager} \tundoManager \tThe undoManager whose stack-reference is set to this stack\n\t\t * @return {undefined}\n\t\t */\n\t\tmerge: function (undoManager) {\n\t\t\t// This sets the stack-reference to the stack of another \n\t\t\t// undoManager so that the stack of this other undoManager \n\t\t\t// is used by two different managers.\n\t\t\t// This enables to set up a main-undoManager and besides it\n\t\t\t// several others for special, exceptional cases (by using\n\t\t\t// instance-based custom UndoTypes). Models / collections \n\t\t\t// which need this special treatment are only registered at \n\t\t\t// those special undoManagers. Those special ones are then \n\t\t\t// merged into the main-undoManager to write on its stack. \n\t\t\t// That way it's easier to manage exceptional cases.\n\t\t\tvar args = _.isArray(undoManager) ? undoManager : slice(arguments), manager;\n\t\t\twhile (manager = args.pop()) {\n\t\t\t\tif (manager instanceof UndoManager &&\n\t\t\t\t\tmanager.stack instanceof UndoStack) {\n\t\t\t\t\t// set the stack reference to our stack\n\t\t\t\t\tmanager.stack = this.stack;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Add an UndoType to this specific UndoManager-instance.\n\t\t * @param {String} type The event this UndoType is made for\n\t\t * @param {Object} fns An object of functions that are called to generate the data for an UndoAction or to process it. Must have the properties \"undo\", \"redo\" and \"on\". Can have the property \"condition\".\n\t\t * @return {undefined}\n\t\t */\n\t\taddUndoType: function (type, fns) {\n\t\t\tmanipulateUndoType(0, type, fns, this.undoTypes);\n\t\t},\n\t\t/**\n\t\t * Overwrite properties of an existing UndoType for this specific UndoManager-instance.\n\t\t * @param {String} type The event the UndoType is made for\n\t\t * @param {Object} fns An object of functions that are called to generate the data for an UndoAction or to process it. It extends the existing object.\n\t\t * @return {undefined}\n\t\t */\n\t\tchangeUndoType: function (type, fns) {\n\t\t\tmanipulateUndoType(1, type, fns, this.undoTypes);\n\t\t},\n\t\t/**\n\t\t * Remove one or more UndoTypes of this specific UndoManager-instance to fall back to the global UndoTypes.\n\t\t * @param {String|Array} type The event the UndoType that should be removed is made for. You can also pass an array of events.\n\t\t * @return {undefined}\n\t\t */\n\t\tremoveUndoType: function (type) {\n\t\t\tmanipulateUndoType(2, type, undefined, this.undoTypes);\n\t\t},\n\n\t\t/**\n\t\t * Removes all actions from the stack.\n\t\t * @return {undefined}\n\t\t */\n\t\tclear: function() {\n\t\t\tthis.stack.reset();\n\t\t\tthis.stack.pointer = -1;\n\t\t}\n\t});\n\n\t_.extend(UndoManager, {\n\t\t/**\n\t\t * Change the UndoManager's default attributes\n\t\t * @param {Object} defaultAttributes An object with the new default values.\n\t\t * @return {undefined}\n\t\t */\n\t\tdefaults: function (defaultAttributes) {\n\t\t\t_.extend(UndoManager.prototype.defaults, defaultAttributes);\n\t\t},\n\t\t/**\n\t\t * Add an UndoType to the global UndoTypes-object.\n\t\t * @param {String} type The event this UndoType is made for\n\t\t * @param {Object} fns An object of functions that are called to generate the data for an UndoAction or to process it. Must have the properties \"undo\", \"redo\" and \"on\". Can have the property \"condition\".\n\t\t * @return {undefined}\n\t\t */\n\t\t\"addUndoType\": function (type, fns) {\n\t\t\tmanipulateUndoType(0, type, fns, UndoTypes);\n\t\t},\n\t\t/**\n\t\t * Overwrite properties of an existing UndoType in the global UndoTypes-object.\n\t\t * @param {String} type The event the UndoType is made for\n\t\t * @param {Object} fns An object of functions that are called to generate the data for an UndoAction or to process it. It extends the existing object.\n\t\t * @return {undefined}\n\t\t */\n\t\t\"changeUndoType\": function (type, fns) {\n\t\t\tmanipulateUndoType(1, type, fns, UndoTypes)\n\t\t},\n\t\t/**\n\t\t * Remove one or more UndoTypes of this specific UndoManager-instance to fall back to the global UndoTypes.\n\t\t * @param {String|Array} type The event the UndoType that should be removed is made for. You can also pass an array of events.\n\t\t * @return {undefined}\n\t\t */\n\t\t\"removeUndoType\": function (type) {\n\t\t\tmanipulateUndoType(2, type, undefined, UndoTypes);\n\t\t}\n\t})\n\n\treturn Backbone.UndoManager = UndoManager;\n\n});\n","/**\n * @this {Promise}\n */\nfunction finallyConstructor(callback) {\n var constructor = this.constructor;\n return this.then(\n function(value) {\n // @ts-ignore\n return constructor.resolve(callback()).then(function() {\n return value;\n });\n },\n function(reason) {\n // @ts-ignore\n return constructor.resolve(callback()).then(function() {\n // @ts-ignore\n return constructor.reject(reason);\n });\n }\n );\n}\n\nexport default finallyConstructor;\n","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}\n\nmodule.exports = _arrayWithoutHoles;","function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nmodule.exports = _nonIterableSpread;","/**\n * You can customize the initial state of the module from the editor initialization\n * ```js\n * const editor = grapesjs.init({\n * keymaps: {\n * // Object of keymaps\n * defaults: {\n * 'your-namespace:keymap-name' {\n * keys: '⌘+z, ctrl+z',\n * handler: 'some-command-id'\n * },\n * ...\n * }\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const keymaps = editor.Keymaps;\n * ```\n *\n * * [getConfig](#getconfig)\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getAll)\n * * [remove](#remove)\n * * [removeAll](#removeall)\n *\n * @module Keymaps\n */\n\nimport { isString } from 'underscore';\nimport keymaster from 'keymaster';\n\nexport default () => {\n let em;\n let config;\n const keymaps = {};\n const configDef = {\n defaults: {\n 'core:undo': {\n keys: '⌘+z, ctrl+z',\n handler: 'core:undo'\n },\n 'core:redo': {\n keys: '⌘+shift+z, ctrl+shift+z',\n handler: 'core:redo'\n },\n 'core:copy': {\n keys: '⌘+c, ctrl+c',\n handler: 'core:copy'\n },\n 'core:paste': {\n keys: '⌘+v, ctrl+v',\n handler: 'core:paste'\n },\n 'core:component-next': {\n keys: 's',\n handler: 'core:component-next'\n },\n 'core:component-prev': {\n keys: 'w',\n handler: 'core:component-prev'\n },\n 'core:component-enter': {\n keys: 'd',\n handler: 'core:component-enter'\n },\n 'core:component-exit': {\n keys: 'a',\n handler: 'core:component-exit'\n },\n 'core:component-delete': {\n keys: 'backspace, delete',\n handler: 'core:component-delete'\n }\n }\n };\n\n return {\n keymaster,\n\n name: 'Keymaps',\n\n /**\n * Get module configurations\n * @return {Object} Configuration object\n */\n getConfig() {\n return config;\n },\n\n /**\n * Initialize module\n * @param {Object} config Configurations\n * @private\n */\n init(opts = {}) {\n config = { ...configDef, ...opts };\n em = config.em;\n this.em = em;\n return this;\n },\n\n onLoad() {\n const defKeys = config.defaults;\n\n for (let id in defKeys) {\n const value = defKeys[id];\n this.add(id, value.keys, value.handler);\n }\n },\n\n /**\n * Add new keymap\n * @param {string} id Keymap id\n * @param {string} keys Keymap keys, eg. `ctrl+a`, `⌘+z, ctrl+z`\n * @param {Function|string} handler Keymap handler, might be a function\n * @param {Object} [opts={}] Options\n * @return {Object} Added keymap\n * or just a command id as a string\n * @example\n * // 'ns' is just a custom namespace\n * keymaps.add('ns:my-keymap', '⌘+j, ⌘+u, ctrl+j, alt+u', editor => {\n * console.log('do stuff');\n * });\n * // or\n * keymaps.add('ns:my-keymap', '⌘+s, ctrl+s', 'some-gjs-command');\n *\n * // listen to events\n * editor.on('keymap:emit', (id, shortcut, e) => {\n * // ...\n * })\n */\n add(id, keys, handler, opts = {}) {\n const { em } = this;\n const cmd = em.get('Commands');\n const editor = em.getEditor();\n const canvas = em.get('Canvas');\n const keymap = { id, keys, handler };\n const pk = keymaps[id];\n pk && this.remove(id);\n keymaps[id] = keymap;\n keymaster(keys, (e, h) => {\n // It's safer putting handlers resolution inside the callback\n const opt = { event: e, h };\n handler = isString(handler) ? cmd.get(handler) : handler;\n opts.prevent && canvas.getCanvasView().preventDefault(e);\n const ableTorun = !em.isEditing() && !editor.Canvas.isInputFocused();\n if (ableTorun || opts.force) {\n typeof handler == 'object'\n ? handler.run(editor, 0, opt)\n : handler(editor, 0, opt);\n const args = [id, h.shortcut, e];\n em.trigger('keymap:emit', ...args);\n em.trigger(`keymap:emit:${id}`, ...args);\n }\n });\n em.trigger('keymap:add', keymap);\n return keymap;\n },\n\n /**\n * Get the keymap by id\n * @param {string} id Keymap id\n * @return {Object} Keymap object\n * @example\n * keymaps.get('ns:my-keymap');\n * // -> {keys, handler};\n */\n get(id) {\n return keymaps[id];\n },\n\n /**\n * Get all keymaps\n * @return {Object}\n * @example\n * keymaps.getAll();\n * // -> {id1: {}, id2: {}};\n */\n getAll() {\n return keymaps;\n },\n\n /**\n * Remove the keymap by id\n * @param {string} id Keymap id\n * @return {Object} Removed keymap\n * @example\n * keymaps.remove('ns:my-keymap');\n * // -> {keys, handler};\n */\n remove(id) {\n const em = this.em;\n const keymap = this.get(id);\n\n if (keymap) {\n delete keymaps[id];\n keymaster.unbind(keymap.keys);\n em && em.trigger('keymap:remove', keymap);\n return keymap;\n }\n },\n\n /**\n * Remove all binded keymaps\n * @return {this}\n */\n removeAll() {\n Object.keys(keymaps).forEach(keymap => this.remove(keymap));\n return this;\n }\n };\n};\n","/**\n * This module allows to manage the stack of changes applied in canvas.\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const um = editor.UndoManager;\n * ```\n *\n * * [getConfig](#getconfig)\n * * [add](#add)\n * * [remove](#remove)\n * * [removeAll](#removeall)\n * * [start](#start)\n * * [stop](#stop)\n * * [undo](#undo)\n * * [undoAll](#undoall)\n * * [redo](#redo)\n * * [redoAll](#redoall)\n * * [hasUndo](#hasundo)\n * * [hasRedo](#hasredo)\n * * [getStack](#getstack)\n * * [clear](#clear)\n *\n * @module UndoManager\n */\n\nimport UndoManager from 'backbone-undo';\n\nexport default () => {\n let em;\n let um;\n let config;\n let beforeCache;\n const configDef = {};\n\n return {\n name: 'UndoManager',\n\n /**\n * Initialize module\n * @param {Object} config Configurations\n * @private\n */\n init(opts = {}) {\n config = { ...opts, ...configDef };\n em = config.em;\n this.em = em;\n um = new UndoManager({ track: true, register: [] });\n um.changeUndoType('change', { condition: false });\n um.changeUndoType('add', {\n on(model, collection, options = {}) {\n if (options.avoidStore) return;\n return {\n object: collection,\n before: undefined,\n after: model,\n options: { ...options }\n };\n }\n });\n um.changeUndoType('remove', {\n on(model, collection, options = {}) {\n if (options.avoidStore) return;\n return {\n object: collection,\n before: model,\n after: undefined,\n options: { ...options }\n };\n }\n });\n const customUndoType = {\n on(object, value, opt = {}) {\n !beforeCache && (beforeCache = object.previousAttributes());\n\n if (opt.avoidStore) {\n return;\n } else {\n const result = {\n object,\n before: beforeCache,\n after: object.toJSON()\n };\n beforeCache = null;\n return result;\n }\n },\n\n undo(model, bf, af, opt) {\n model.set(bf);\n },\n\n redo(model, bf, af, opt) {\n model.set(af);\n }\n };\n\n const events = ['style', 'attributes', 'content', 'src'];\n events.forEach(ev => um.addUndoType(`change:${ev}`, customUndoType));\n um.on('undo redo', () =>\n em.trigger('component:toggled change:canvasOffset')\n );\n ['undo', 'redo'].forEach(ev => um.on(ev, () => em.trigger(ev)));\n\n return this;\n },\n\n /**\n * Get module configurations\n * @return {Object} Configuration object\n * @example\n * const config = um.getConfig();\n * // { ... }\n */\n getConfig() {\n return config;\n },\n\n /**\n * Add an entity (Model/Collection) to track\n * Note: New Components and CSSRules will be added automatically\n * @param {Model|Collection} entity Entity to track\n * @return {this}\n * @example\n * um.add(someModelOrCollection);\n */\n add(entity) {\n um.register(entity);\n return this;\n },\n\n /**\n * Remove and stop tracking the entity (Model/Collection)\n * @param {Model|Collection} entity Entity to remove\n * @return {this}\n * @example\n * um.remove(someModelOrCollection);\n */\n remove(entity) {\n um.unregister(entity);\n return this;\n },\n\n /**\n * Remove all entities\n * @return {this}\n * @example\n * um.removeAll();\n */\n removeAll() {\n um.unregisterAll();\n return this;\n },\n\n /**\n * Start/resume tracking changes\n * @return {this}\n * @example\n * um.start();\n */\n start() {\n um.startTracking();\n return this;\n },\n\n /**\n * Stop tracking changes\n * @return {this}\n * @example\n * um.stop();\n */\n stop() {\n um.stopTracking();\n return this;\n },\n\n /**\n * Undo last change\n * @return {this}\n * @example\n * um.undo();\n */\n undo() {\n !em.isEditing() && um.undo(1);\n return this;\n },\n\n /**\n * Undo all changes\n * @return {this}\n * @example\n * um.undoAll();\n */\n undoAll() {\n um.undoAll();\n return this;\n },\n\n /**\n * Redo last change\n * @return {this}\n * @example\n * um.redo();\n */\n redo() {\n !em.isEditing() && um.redo(1);\n return this;\n },\n\n /**\n * Redo all changes\n * @return {this}\n * @example\n * um.redoAll();\n */\n redoAll() {\n um.redoAll();\n return this;\n },\n\n /**\n * Checks if exists an available undo\n * @return {Boolean}\n * @example\n * um.hasUndo();\n */\n hasUndo() {\n return um.isAvailable('undo');\n },\n\n /**\n * Checks if exists an available redo\n * @return {Boolean}\n * @example\n * um.hasRedo();\n */\n hasRedo() {\n return um.isAvailable('redo');\n },\n\n /**\n * Get stack of changes\n * @return {Collection}\n * @example\n * const stack = um.getStack();\n * stack.each(item => ...);\n */\n getStack() {\n return um.stack;\n },\n\n /**\n * Clear the stack\n * @return {this}\n * @example\n * um.clear();\n */\n clear() {\n um.clear();\n return this;\n },\n\n getInstance() {\n return um;\n }\n };\n};\n","var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a ` : '';\n return html;\n },\n\n /**\n * Returns CSS built inside canvas\n * @param {Object} [opts={}] Options\n * @return {string} CSS string\n * @private\n */\n getCss(opts = {}) {\n const config = this.config;\n const wrapperIsBody = config.wrapperIsBody;\n const avoidProt = opts.avoidProtected;\n const keepUnusedStyles = !isUndefined(opts.keepUnusedStyles)\n ? opts.keepUnusedStyles\n : config.keepUnusedStyles;\n const cssc = this.get('CssComposer');\n const wrp = this.get('DomComponents').getComponent();\n const protCss = !avoidProt ? config.protectedCss : '';\n\n return (\n protCss +\n this.get('CodeManager').getCode(wrp, 'css', {\n cssc,\n wrapperIsBody,\n keepUnusedStyles\n })\n );\n },\n\n /**\n * Returns JS of all components\n * @return {string} JS string\n * @private\n */\n getJs() {\n var wrp = this.get('DomComponents').getWrapper();\n return this.get('CodeManager')\n .getCode(wrp, 'js')\n .trim();\n },\n\n /**\n * Store data to the current storage\n * @param {Function} clb Callback function\n * @return {Object} Stored data\n * @private\n */\n store(clb) {\n var sm = this.get('StorageManager');\n var store = {};\n if (!sm) return;\n\n // Fetch what to store\n this.get('storables').forEach(m => {\n var obj = m.store(1);\n for (var el in obj) store[el] = obj[el];\n });\n\n sm.store(store, res => {\n clb && clb(res);\n this.set('changesCount', 0);\n this.trigger('storage:store', store);\n });\n\n return store;\n },\n\n /**\n * Load data from the current storage\n * @param {Function} clb Callback function\n * @private\n */\n load(clb = null) {\n this.getCacheLoad(1, res => {\n this.get('storables').forEach(module => module.load(res));\n clb && clb(res);\n });\n },\n\n /**\n * Returns cached load\n * @param {Boolean} force Force to reload\n * @param {Function} clb Callback function\n * @return {Object}\n * @private\n */\n getCacheLoad(force, clb) {\n if (this.cacheLoad && !force) return this.cacheLoad;\n const sm = this.get('StorageManager');\n const load = [];\n\n if (!sm) return {};\n\n this.get('storables').forEach(m => {\n let key = m.storageKey;\n key = isFunction(key) ? key() : key;\n const keys = isArray(key) ? key : [key];\n keys.forEach(k => load.push(k));\n });\n\n sm.load(load, res => {\n this.cacheLoad = res;\n clb && clb(res);\n setTimeout(() => this.trigger('storage:load', res));\n });\n },\n\n /**\n * Returns device model by name\n * @return {Device|null}\n * @private\n */\n getDeviceModel() {\n var name = this.get('device');\n return this.get('DeviceManager').get(name);\n },\n\n /**\n * Run default command if setted\n * @param {Object} [opts={}] Options\n * @private\n */\n runDefault(opts = {}) {\n var command = this.get('Commands').get(this.config.defaultCommand);\n if (!command || this.defaultRunning) return;\n command.stop(this, this, opts);\n command.run(this, this, opts);\n this.defaultRunning = 1;\n },\n\n /**\n * Stop default command\n * @param {Object} [opts={}] Options\n * @private\n */\n stopDefault(opts = {}) {\n var command = this.get('Commands').get(this.config.defaultCommand);\n if (!command) return;\n command.stop(this, this, opts);\n this.defaultRunning = 0;\n },\n\n /**\n * Update canvas dimensions and refresh data useful for tools positioning\n * @private\n */\n refreshCanvas() {\n this.set('canvasOffset', null);\n this.set('canvasOffset', this.get('Canvas').getOffset());\n },\n\n /**\n * Clear all selected stuf inside the window, sometimes is useful to call before\n * doing some dragging opearation\n * @param {Window} win If not passed the current one will be used\n * @private\n */\n clearSelection(win) {\n var w = win || window;\n w.getSelection().removeAllRanges();\n },\n\n /**\n * Get the current media text\n * @return {string}\n */\n getCurrentMedia() {\n const config = this.config;\n const device = this.getDeviceModel();\n const condition = config.mediaCondition;\n const preview = config.devicePreviewMode;\n const width = device && device.get('widthMedia');\n return device && width && !preview ? `(${condition}: ${width})` : '';\n },\n\n /**\n * Return the component wrapper\n * @return {Component}\n */\n getWrapper() {\n return this.get('DomComponents').getWrapper();\n },\n\n /**\n * Return the count of changes made to the content and not yet stored.\n * This count resets at any `store()`\n * @return {number}\n */\n getDirtyCount() {\n return this.get('changesCount');\n },\n\n getZoomDecimal() {\n return this.get('Canvas').getZoomDecimal();\n },\n\n setDragMode(value) {\n return this.set('dmode', value);\n },\n\n t(...args) {\n return this.get('I18n').t(...args);\n },\n\n /**\n * Returns true if the editor is in absolute mode\n * @returns {Boolean}\n */\n inAbsoluteMode() {\n return this.get('dmode') === 'absolute';\n },\n\n /**\n * Destroy editor\n */\n destroyAll() {\n const {\n DomComponents,\n CssComposer,\n UndoManager,\n Panels,\n Canvas,\n Keymaps,\n RichTextEditor\n } = this.attributes;\n DomComponents.clear();\n CssComposer.clear();\n UndoManager.clear().removeAll();\n Panels.getPanels().reset();\n Canvas.getCanvasView().remove();\n Keymaps.removeAll();\n RichTextEditor.destroy();\n this.view.remove();\n this.stopListening();\n $(this.config.el)\n .empty()\n .attr(this.attrsOrig);\n },\n\n setEditing(value) {\n this.set('editing', value);\n return this;\n },\n\n isEditing() {\n return !!this.get('editing');\n },\n\n log(msg, opts = {}) {\n const { ns, level = 'debug' } = opts;\n this.trigger('log', msg, opts);\n level && this.trigger(`log:${level}`, msg, opts);\n\n if (ns) {\n const logNs = `log-${ns}`;\n this.trigger(logNs, msg, opts);\n level && this.trigger(`${logNs}:${level}`, msg, opts);\n }\n },\n\n logInfo(msg, opts) {\n this.log(msg, { ...opts, level: 'info' });\n },\n\n logWarning(msg, opts) {\n this.log(msg, { ...opts, level: 'warning' });\n },\n\n logError(msg, opts) {\n this.log(msg, { ...opts, level: 'error' });\n },\n\n /**\n * Set/get data from the HTMLElement\n * @param {HTMLElement} el\n * @param {string} name Data name\n * @param {any} value Date value\n * @return {any}\n * @private\n */\n data(el, name, value) {\n const varName = '_gjs-data';\n\n if (!el[varName]) {\n el[varName] = {};\n }\n\n if (isUndefined(value)) {\n return el[varName][name];\n } else {\n el[varName][name] = value;\n }\n }\n});\n","import { isObject, isString, each, isUndefined } from 'underscore';\n\nexport default ({ $, Backbone }) => {\n if (Backbone) {\n const ViewProt = Backbone.View.prototype;\n const eventNsMap = {};\n ViewProt.eventNsMap = eventNsMap;\n\n ViewProt.delegate = function(eventName, selector, listener) {\n const vid = '.delegateEvents' + this.cid;\n this.$el.on(eventName, selector, listener);\n //return this;\n let eventMap = eventNsMap[vid];\n\n if (!eventMap) {\n eventMap = [];\n eventNsMap[vid] = eventMap;\n }\n\n eventMap.push({ eventName, selector, listener });\n return this;\n };\n\n ViewProt.undelegateEvents = function() {\n const vid = '.delegateEvents' + this.cid;\n if (this.$el) {\n //this.$el.off(); return this;\n let eventMap = eventNsMap[vid];\n\n if (eventMap) {\n eventMap.forEach(({ eventName, selector, listener }) => {\n this.$el.off(eventName);\n });\n }\n }\n return this;\n };\n\n ViewProt.undelegate = function(ev, sel, list) {\n const vid = '.delegateEvents' + this.cid;\n //this.$el.off(ev, sel, list); return this;\n let eventMap = eventNsMap[vid];\n\n if (eventMap) {\n eventMap.forEach(({ eventName, selector, listener }) => {\n if (eventName == ev && selector == sel) {\n this.$el.off(eventName);\n }\n });\n }\n\n return this;\n };\n }\n\n if ($ && $.prototype.constructor.name !== 'jQuery') {\n const fn = $.fn;\n\n const splitNamespace = function(name) {\n const namespaceArray = name.split('.');\n return name.indexOf('.') !== 0\n ? [namespaceArray[0], namespaceArray.slice(1)]\n : [null, namespaceArray];\n };\n\n const on = $.prototype.on;\n const off = $.prototype.off;\n const trigger = $.prototype.trigger;\n const offset = $.prototype.offset;\n const getEvents = eventName => eventName.split(/[,\\s]+/g);\n const getNamespaces = eventName => eventName.split('.');\n\n fn.on = function(eventName, delegate, callback, runOnce) {\n if (typeof eventName == 'string') {\n const events = getEvents(eventName);\n\n if (events.length == 1) {\n eventName = events[0];\n let namespaces = getNamespaces(eventName);\n\n if (eventName.indexOf('.') !== 0) {\n eventName = namespaces[0];\n }\n\n namespaces = namespaces.slice(1);\n\n if (namespaces.length) {\n //console.log('Found event with namespaces', namespaces, eventName, delegate, this);\n const cashNs = this.data('_cashNs') || [];\n // cashNs[namespace]\n this.data('_cashNs', namespaces); // for each ns need to store '.store' => eventName, delegate, callback\n }\n\n return on.call(this, eventName, delegate, callback, runOnce);\n } else {\n events.forEach(eventName =>\n this.on(eventName, delegate, callback, runOnce)\n );\n return this;\n }\n } else {\n return on.call(this, eventName, delegate, callback, runOnce);\n }\n };\n\n fn.off = function(eventName, callback) {\n if (typeof eventName == 'string') {\n const events = getEvents(eventName);\n\n if (events.length == 1) {\n eventName = events[0];\n let namespaces = getNamespaces(eventName);\n\n if (eventName.indexOf('.') !== 0) {\n eventName = namespaces[0];\n }\n\n namespaces = namespaces.slice(1);\n\n if (namespaces.length) {\n // Have to off only with the same namespace\n }\n\n return off.call(this, eventName, callback);\n } else {\n events.forEach(eventName => this.off(eventName, callback));\n return this;\n }\n } else {\n return off.call(this, eventName, callback);\n }\n };\n\n fn.trigger = function(eventName, data) {\n if (eventName instanceof $.Event) {\n return this.trigger(eventName.type, data);\n }\n\n if (typeof eventName == 'string') {\n const events = getEvents(eventName);\n\n if (events.length == 1) {\n eventName = events[0];\n let namespaces = getNamespaces(eventName);\n\n if (eventName.indexOf('.') !== 0) {\n eventName = namespaces[0];\n }\n\n namespaces = namespaces.slice(1);\n\n if (namespaces.length) {\n // have to trigger with same namespaces and eventName\n }\n\n return trigger.call(this, eventName, data);\n } else {\n events.forEach(eventName => this.trigger(eventName, data));\n return this;\n }\n } else {\n return trigger.call(this, eventName, data);\n }\n };\n\n fn.hide = function() {\n return this.css('display', 'none');\n };\n\n fn.show = function() {\n return this.css('display', 'block');\n };\n\n fn.focus = function() {\n const el = this.get(0);\n el && el.focus();\n return this;\n };\n\n // For SVGs in IE\n (fn.removeClass = function(c) {\n if (!arguments.length) {\n return this.attr('class', '');\n }\n const classes = isString(c) && c.match(/\\S+/g);\n return classes\n ? this.each(function(el) {\n each(classes, function(c) {\n if (el.classList) {\n el.classList.remove(c);\n } else {\n const val = el.className;\n const bval = el.className.baseVal;\n\n if (!isUndefined(bval)) {\n val.baseVal = bval.replace(c, '');\n } else {\n el.className = val.replace(c, '');\n }\n }\n });\n })\n : this;\n }),\n (fn.remove = function() {\n return this.each(node => {\n return node.parentNode && node.parentNode.removeChild(node);\n });\n }),\n // For spectrum compatibility\n (fn.bind = function(ev, h) {\n return this.on(ev, h);\n });\n\n fn.unbind = function(ev, h) {\n if (isObject(ev)) {\n for (let name in ev) {\n ev.hasOwnProperty(name) && this.off(name, ev[name]);\n }\n\n return this;\n } else {\n return this.off(ev, h);\n }\n };\n\n fn.click = function(h) {\n return h ? this.on('click', h) : this.trigger('click');\n };\n\n fn.change = function(h) {\n return h ? this.on('change', h) : this.trigger('change');\n };\n\n fn.keydown = function(h) {\n return h ? this.on('keydown', h) : this.trigger('keydown');\n };\n\n fn.delegate = function(selector, events, data, handler) {\n if (!handler) {\n handler = data;\n }\n\n return this.on(events, selector, function(e) {\n e.data = data;\n handler(e);\n });\n };\n\n fn.scrollLeft = function() {\n let el = this.get(0);\n el = el.nodeType == 9 ? el.defaultView : el;\n let win = el instanceof Window ? el : null;\n return win ? win.pageXOffset : el.scrollLeft || 0;\n };\n\n fn.scrollTop = function() {\n let el = this.get(0);\n el = el.nodeType == 9 ? el.defaultView : el;\n let win = el instanceof Window ? el : null;\n return win ? win.pageYOffset : el.scrollTop || 0;\n };\n\n fn.offset = function(coords) {\n let top, left;\n\n if (coords) {\n top = coords.top;\n left = coords.left;\n }\n\n if (typeof top != 'undefined') {\n this.css('top', `${top}px`);\n }\n if (typeof left != 'undefined') {\n this.css('left', `${left}px`);\n }\n\n return offset.call(this);\n };\n\n $.map = function(items, clb) {\n const ar = [];\n\n for (var i = 0; i < items.length; i++) {\n ar.push(clb(items[i], i));\n }\n\n return ar;\n };\n\n const indexOf = Array.prototype.indexOf;\n\n $.inArray = function(val, arr, i) {\n return arr == null ? -1 : indexOf.call(arr, val, i);\n };\n\n $.Event = function(src, props) {\n if (!(this instanceof $.Event)) {\n return new $.Event(src, props);\n }\n\n this.type = src;\n this.isDefaultPrevented = () => false;\n };\n }\n};\n","import Backbone from 'backbone';\nimport { appendStyles } from 'utils/mixins';\n\nconst $ = Backbone.$;\n\nexport default Backbone.View.extend({\n initialize() {\n const { model } = this;\n model.view = this;\n this.conf = model.config;\n this.pn = model.get('Panels');\n model.on('loaded', () => {\n this.pn.active();\n this.pn.disableButtons();\n model.runDefault();\n setTimeout(() => model.trigger('load', model.get('Editor')));\n });\n },\n\n render() {\n const { model, $el, conf } = this;\n const pfx = conf.stylePrefix;\n const contEl = $(conf.el || `body ${conf.container}`);\n appendStyles(conf.cssIcons, { unique: 1, prepand: 1 });\n $el.empty();\n\n if (conf.width) contEl.css('width', conf.width);\n if (conf.height) contEl.css('height', conf.height);\n\n $el.append(model.get('Canvas').render());\n $el.append(this.pn.render());\n $el.attr('class', `${pfx}editor ${pfx}one-bg ${pfx}two-color`);\n contEl\n .addClass(`${pfx}editor-cont`)\n .empty()\n .append($el);\n\n return this;\n }\n});\n","/**\n * Editor contains the top level API which you'll probably use to customize the editor or extend it with plugins.\n * You get the Editor instance on init method and you can pass options via its [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/editor/config/config.js)\n *\n * ```js\n * const editor = grapesjs.init({\n * // options\n * });\n * ```\n *\n * ## Available Events\n *\n * You can make use of available events in this way\n * ```js\n * editor.on('EVENT-NAME', (some, argument) => {\n * // do something\n * })\n * ```\n *\n * ### Components\n * * `component:create` - Component is created (only the model, is not yet mounted in the canvas), called after the init() method\n * * `component:mount` - Component is mounted to an element and rendered in canvas\n * * `component:add` - Triggered when a new component is added to the editor, the model is passed as an argument to the callback\n * * `component:remove` - Triggered when a component is removed, the model is passed as an argument to the callback\n * * `component:clone` - Triggered when a component is cloned, the new model is passed as an argument to the callback\n * * `component:update` - Triggered when a component is updated (moved, styled, etc.), the model is passed as an argument to the callback\n * * `component:update:{propertyName}` - Listen any property change, the model is passed as an argument to the callback\n * * `component:styleUpdate` - Triggered when the style of the component is updated, the model is passed as an argument to the callback\n * * `component:styleUpdate:{propertyName}` - Listen for a specific style property change, the model is passed as an argument to the callback\n * * `component:selected` - New component selected, the selected model is passed as an argument to the callback\n * * `component:deselected` - Component deselected, the deselected model is passed as an argument to the callback\n * * `component:toggled` - Component selection changed, toggled model is passed as an argument to the callback\n * * `component:type:add` - New component type added, the new type is passed as an argument to the callback\n * * `component:type:update` - Component type updated, the updated type is passed as an argument to the callback\n * ### Blocks\n * * `block:add` - New block added\n * * `block:remove` - Block removed\n * * `block:drag:start` - Started dragging block, model of the block is passed as an argument\n * * `block:drag` - Dragging block, the block's model and the drag event are passed as arguments\n * * `block:drag:stop` - Dragging of the block is stopped. As agruments for the callback you get, the dropped component model (if dropped successfully) and the model of the block\n * ### Assets\n * * `asset:add` - New asset added\n * * `asset:remove` - Asset removed\n * * `asset:upload:start` - Before the upload is started\n * * `asset:upload:end` - After the upload is ended\n * * `asset:upload:error` - On any error in upload, passes the error as an argument\n * * `asset:upload:response` - On upload response, passes the result as an argument\n * ### Keymaps\n * * `keymap:add` - New keymap added. The new keyamp object is passed as an argument\n * * `keymap:remove` - Keymap removed. The removed keyamp object is passed as an argument\n * * `keymap:emit` - Some keymap emitted, in arguments you get keymapId, shortcutUsed, Event\n * * `keymap:emit:{keymapId}` - `keymapId` emitted, in arguments you get keymapId, shortcutUsed, Event\n * ### Style Manager\n * * `styleManager:update:target` - The target (Component or CSSRule) is changed\n * * `styleManager:change` - Triggered on style property change from new selected component, the view of the property is passed as an argument to the callback\n * * `styleManager:change:{propertyName}` - As above but for a specific style property\n * ### Storages\n * * `storage:start` - Before the storage request is started\n * * `storage:start:store` - Before the store request. The object to store is passed as an argumnet (which you can edit)\n * * `storage:start:load` - Before the load request. Items to load are passed as an argumnet (which you can edit)\n * * `storage:load` - Triggered when something was loaded from the storage, loaded object passed as an argumnet\n * * `storage:store` - Triggered when something is stored to the storage, stored object passed as an argumnet\n * * `storage:end` - After the storage request is ended\n * * `storage:end:store` - After the store request\n * * `storage:end:load` - After the load request\n * * `storage:error` - On any error on storage request, passes the error as an argument\n * * `storage:error:store` - Error on store request, passes the error as an argument\n * * `storage:error:load` - Error on load request, passes the error as an argument\n * ### Canvas\n * * `canvas:dragenter` - When something is dragged inside the canvas, `DataTransfer` instance passed as an argument\n * * `canvas:dragover` - When something is dragging on canvas, `DataTransfer` instance passed as an argument\n * * `canvas:drop` - Something is dropped in canvas, `DataTransfer` instance and the dropped model are passed as arguments\n * * `canvas:dragend` - When a drag operation is ended, `DataTransfer` instance passed as an argument\n * * `canvas:dragdata` - On any dataTransfer parse, `DataTransfer` instance and the `result` are passed as arguments.\n * By changing `result.content` you're able to customize what is dropped\n * ### Selectors\n * * `selector:add` - New selector is add. Passes the new selector as an argument\n * * `selector:remove` - Selector removed. Passes the removed selector as an argument\n * * `selector:update` - Selector updated. Passes the updated selector as an argument\n * * `selector:state` - State changed. Passes the new state value as an argument\n * ### RTE\n * * `rte:enable` - RTE enabled. The view, on which RTE is enabled, is passed as an argument\n * * `rte:disable` - RTE disabled. The view, on which RTE is disabled, is passed as an argument\n * ### Modal\n * * `modal:open` - Modal is opened\n * * `modal:close` - Modal is closed\n * ### Commands\n * * `run:{commandName}` - Triggered when some command is called to run (eg. editor.runCommand('preview'))\n * * `stop:{commandName}` - Triggered when some command is called to stop (eg. editor.stopCommand('preview'))\n * * `run:{commandName}:before` - Triggered before the command is called\n * * `stop:{commandName}:before` - Triggered before the command is called to stop\n * * `abort:{commandName}` - Triggered when the command execution is aborted (`editor.on(`run:preview:before`, opts => opts.abort = 1);`)\n * * `run` - Triggered on run of any command. The id and the result are passed as arguments to the callback\n * * `stop` - Triggered on stop of any command. The id and the result are passed as arguments to the callback\n * ### General\n * * `canvasScroll` - Canvas is scrolled\n * * `update` - The structure of the template is updated (its HTML/CSS)\n * * `undo` - Undo executed\n * * `redo` - Redo executed\n * * `load` - Editor is loaded\n *\n * @module Editor\n */\nimport $ from 'cash-dom';\nimport defaults from './config/config';\nimport EditorModel from './model/Editor';\nimport EditorView from './view/EditorView';\n\nexport default (config = {}) => {\n const c = {\n ...defaults,\n ...config\n };\n\n c.pStylePrefix = c.stylePrefix;\n var em = new EditorModel(c);\n var editorView = new EditorView({\n model: em,\n config: c\n });\n\n return {\n $,\n\n /**\n * @property {EditorModel}\n * @private\n */\n editor: em,\n\n /**\n * @property {I18n}\n * @private\n */\n I18n: em.get('I18n'),\n\n /**\n * @property {DomComponents}\n * @private\n */\n DomComponents: em.get('DomComponents'),\n\n /**\n * @property {LayerManager}\n * @private\n */\n LayerManager: em.get('LayerManager'),\n\n /**\n * @property {CssComposer}\n * @private\n */\n CssComposer: em.get('CssComposer'),\n\n /**\n * @property {StorageManager}\n * @private\n */\n StorageManager: em.get('StorageManager'),\n\n /**\n * @property {AssetManager}\n * @private\n */\n AssetManager: em.get('AssetManager'),\n\n /**\n * @property {BlockManager}\n * @private\n */\n BlockManager: em.get('BlockManager'),\n\n /**\n * @property {TraitManager}\n * @private\n */\n TraitManager: em.get('TraitManager'),\n\n /**\n * @property {SelectorManager}\n * @private\n */\n SelectorManager: em.get('SelectorManager'),\n\n /**\n * @property {CodeManager}\n * @private\n */\n CodeManager: em.get('CodeManager'),\n\n /**\n * @property {Commands}\n * @private\n */\n Commands: em.get('Commands'),\n\n /**\n * @property {Keymaps}\n * @private\n */\n Keymaps: em.get('Keymaps'),\n\n /**\n * @property {Modal}\n * @private\n */\n Modal: em.get('Modal'),\n\n /**\n * @property {Panels}\n * @private\n */\n Panels: em.get('Panels'),\n\n /**\n * @property {StyleManager}\n * @private\n */\n StyleManager: em.get('StyleManager'),\n\n /**\n * @property {Canvas}\n * @private\n */\n Canvas: em.get('Canvas'),\n\n /**\n * @property {UndoManager}\n * @private\n */\n UndoManager: em.get('UndoManager'),\n\n /**\n * @property {DeviceManager}\n * @private\n */\n DeviceManager: em.get('DeviceManager'),\n\n /**\n * @property {RichTextEditor}\n * @private\n */\n RichTextEditor: em.get('RichTextEditor'),\n\n /**\n * @property {Parser}\n * @private\n */\n Parser: em.get('Parser'),\n\n /**\n * @property {Utils}\n * @private\n */\n Utils: em.get('Utils'),\n\n /**\n * @property {Utils}\n * @private\n */\n Config: em.get('Config'),\n\n /**\n * Initialize editor model\n * @return {this}\n * @private\n */\n init() {\n em.init(this);\n return this;\n },\n\n /**\n * Returns configuration object\n * @param {string} [prop] Property name\n * @return {any} Returns the configuration object or\n * the value of the specified property\n */\n getConfig(prop) {\n return em.getConfig(prop);\n },\n\n /**\n * Returns HTML built inside canvas\n * @return {string} HTML string\n */\n getHtml(opts) {\n return em.getHtml(opts);\n },\n\n /**\n * Returns CSS built inside canvas\n * @param {Object} [opts={}] Options\n * @param {Boolean} [opts.avoidProtected=false] Don't include protected CSS\n * @return {string} CSS string\n */\n getCss(opts) {\n return em.getCss(opts);\n },\n\n /**\n * Returns JS of all components\n * @return {string} JS string\n */\n getJs() {\n return em.getJs();\n },\n\n /**\n * Return the complete tree of components. Use `getWrapper` to include also the wrapper\n * @return {Components}\n */\n getComponents() {\n return em.get('DomComponents').getComponents();\n },\n\n /**\n * Return the wrapper and its all components\n * @return {Component}\n */\n getWrapper() {\n return em.get('DomComponents').getWrapper();\n },\n\n /**\n * Set components inside editor's canvas. This method overrides actual components\n * @param {Array|Object|string} components HTML string or components model\n * @return {this}\n * @example\n * editor.setComponents('
New component
');\n * // or\n * editor.setComponents({\n * type: 'text',\n * classes:['cls'],\n * content: 'New component'\n * });\n */\n setComponents(components) {\n em.setComponents(components);\n return this;\n },\n\n /**\n * Add components\n * @param {Array|Object|string} components HTML string or components model\n * @param {Object} opts Options\n * @param {Boolean} [opts.avoidUpdateStyle=false] If the HTML string contains styles,\n * by default, they will be created and, if already exist, updated. When this option\n * is true, styles already created will not be updated.\n * @return {Array}\n * @example\n * editor.addComponents('
New component
');\n * // or\n * editor.addComponents({\n * type: 'text',\n * classes:['cls'],\n * content: 'New component'\n * });\n */\n addComponents(components, opts) {\n return this.getWrapper().append(components, opts);\n },\n\n /**\n * Returns style in JSON format object\n * @return {Object}\n */\n getStyle() {\n return em.get('CssComposer').getAll();\n },\n\n /**\n * Set style inside editor's canvas. This method overrides actual style\n * @param {Array|Object|string} style CSS string or style model\n * @return {this}\n * @example\n * editor.setStyle('.cls{color: red}');\n * //or\n * editor.setStyle({\n * selectors: ['cls']\n * style: { color: 'red' }\n * });\n */\n setStyle(style) {\n em.setStyle(style);\n return this;\n },\n\n /**\n * Returns the last selected component, if there is one\n * @return {Model}\n */\n getSelected() {\n return em.getSelected();\n },\n\n /**\n * Returns an array of all selected components\n * @return {Array}\n */\n getSelectedAll() {\n return em.getSelectedAll();\n },\n\n /**\n * Get a stylable entity from the selected component.\n * If you select a component without classes the entity is the Component\n * itself and all changes will go inside its 'style' attribute. Otherwise,\n * if the selected component has one or more classes, the function will\n * return the corresponding CSS Rule\n * @return {Model}\n */\n getSelectedToStyle() {\n let selected = em.getSelected();\n\n if (selected) {\n return this.StyleManager.getModelToStyle(selected);\n }\n },\n\n /**\n * Select a component\n * @param {Component|HTMLElement} el Component to select\n * @param {Object} [opts] Options\n * @param {Boolean} [opts.scroll] Scroll canvas to the selected element\n * @return {this}\n * @example\n * // Select dropped block\n * editor.on('block:drag:stop', function(model) {\n * editor.select(model);\n * });\n */\n select(el, opts) {\n em.setSelected(el, opts);\n return this;\n },\n\n /**\n * Add component to selection\n * @param {Component|HTMLElement|Array} el Component to select\n * @return {this}\n * @example\n * editor.selectAdd(model);\n */\n selectAdd(el) {\n em.addSelected(el);\n return this;\n },\n\n /**\n * Remove component from selection\n * @param {Component|HTMLElement|Array} el Component to select\n * @return {this}\n * @example\n * editor.selectRemove(model);\n */\n selectRemove(el) {\n em.removeSelected(el);\n return this;\n },\n\n /**\n * Toggle component selection\n * @param {Component|HTMLElement|Array} el Component to select\n * @return {this}\n * @example\n * editor.selectToggle(model);\n */\n selectToggle(el) {\n em.toggleSelected(el);\n return this;\n },\n\n /**\n * Set device to the editor. If the device exists it will\n * change the canvas to the proper width\n * @param {string} name Name of the device\n * @return {this}\n * @example\n * editor.setDevice('Tablet');\n */\n setDevice(name) {\n em.set('device', name);\n return this;\n },\n\n /**\n * Return the actual active device\n * @return {string} Device name\n * @example\n * var device = editor.getDevice();\n * console.log(device);\n * // 'Tablet'\n */\n getDevice() {\n return em.get('device');\n },\n\n /**\n * Execute command\n * @param {string} id Command ID\n * @param {Object} options Custom options\n * @return {*} The return is defined by the command\n * @example\n * editor.runCommand('myCommand', {someValue: 1});\n */\n runCommand(id, options = {}) {\n return em.get('Commands').run(id, options);\n },\n\n /**\n * Stop the command if stop method was provided\n * @param {string} id Command ID\n * @param {Object} options Custom options\n * @return {*} The return is defined by the command\n * @example\n * editor.stopCommand('myCommand', {someValue: 1});\n */\n stopCommand(id, options = {}) {\n return em.get('Commands').stop(id, options);\n },\n\n /**\n * Store data to the current storage\n * @param {Function} clb Callback function\n * @return {Object} Stored data\n */\n store(clb) {\n return em.store(clb);\n },\n\n /**\n * Load data from the current storage\n * @param {Function} clb Callback function\n * @return {Object} Stored data\n */\n load(clb) {\n return em.load(clb);\n },\n\n /**\n * Returns container element. The one which was indicated as 'container'\n * on init method\n * @return {HTMLElement}\n */\n getContainer() {\n return c.el;\n },\n\n /**\n * Return the count of changes made to the content and not yet stored.\n * This count resets at any `store()`\n * @return {number}\n */\n getDirtyCount() {\n return em.getDirtyCount();\n },\n\n /**\n * Update editor dimensions and refresh data useful for positioning of tools\n *\n * This method could be useful when you update, for example, some position\n * of the editor element (eg. canvas, panels, etc.) with CSS, where without\n * refresh you'll get misleading position of tools (eg. rich text editor,\n * component highlighter, etc.)\n *\n * @private\n */\n refresh() {\n em.refreshCanvas();\n },\n\n /**\n * Replace the built-in Rich Text Editor with a custom one.\n * @param {Object} obj Custom RTE Interface\n * @example\n * editor.setCustomRte({\n * // Function for enabling custom RTE\n * // el is the HTMLElement of the double clicked Text Component\n * // rte is the same instance you have returned the first time you call\n * // enable(). This is useful if need to check if the RTE is already enabled so\n * // ion this case you'll need to return the RTE and the end of the function\n * enable: function(el, rte) {\n * rte = new MyCustomRte(el, {}); // this depends on the Custom RTE API\n * ...\n * return rte; // return the RTE instance\n * },\n *\n * // Disable the editor, called for example when you unfocus the Text Component\n * disable: function(el, rte) {\n * rte.blur(); // this depends on the Custom RTE API\n * }\n *\n * // Called when the Text Component is focused again. If you returned the RTE instance\n * // from the enable function, the enable won't be called again instead will call focus,\n * // in this case to avoid double binding of the editor\n * focus: function (el, rte) {\n * rte.focus(); // this depends on the Custom RTE API\n * }\n * });\n */\n setCustomRte(obj) {\n this.RichTextEditor.customRte = obj;\n },\n\n /**\n * Replace the default CSS parser with a custom one.\n * The parser function receives a CSS string as a parameter and expects\n * an array of CSSRule objects as a result. If you need to remove the\n * custom parser, pass `null` as the argument\n * @param {Function|null} parser Parser function\n * @return {this}\n * @example\n * editor.setCustomParserCss(css => {\n * const result = [];\n * // ... parse the CSS string\n * result.push({\n * selectors: '.someclass, div .otherclass',\n * style: { color: 'red' }\n * })\n * // ...\n * return result;\n * });\n */\n setCustomParserCss(parser) {\n this.Parser.getConfig().parserCss = parser;\n return this;\n },\n\n /**\n * Change the global drag mode of components.\n * To get more about this feature read: https://github.com/artf/grapesjs/issues/1936\n * @param {String} value Drag mode, options: 'absolute' | 'translate'\n * @returns {this}\n */\n setDragMode(value) {\n em.setDragMode(value);\n return this;\n },\n\n /**\n * Trigger event log message\n * @param {*} msg Message to log\n * @param {Object} [opts={}] Custom options\n * @param {String} [opts.ns=''] Namespace of the log (eg. to use in plugins)\n * @param {String} [opts.level='debug'] Level of the log, `debug`, `info`, `warning`, `error`\n * @return {this}\n * @example\n * editor.log('Something done!', { ns: 'from-plugin-x', level: 'info' });\n * // This will trigger following events\n * // `log`, `log:info`, `log-from-plugin-x`, `log-from-plugin-x:info`\n * // Callbacks of those events will always receive the message and\n * // options, as arguments, eg:\n * // editor.on('log:info', (msg, opts) => console.info(msg, opts))\n */\n log(msg, opts = {}) {\n em.log(msg, opts);\n return this;\n },\n\n /**\n * Translate label\n * @param {String} key Label to translate\n * @param {Object} [opts] Options for the translation\n * @param {Object} [opts.params] Params for the translation\n * @param {Boolean} [opts.noWarn] Avoid warnings in case of missing resources\n * @returns {String}\n * @example\n * editor.t('msg');\n * // use params\n * editor.t('msg2', { params: { test: 'hello' } });\n * // custom local\n * editor.t('msg2', { params: { test: 'hello' }, l: 'it' });\n */\n t(...args) {\n return em.t(...args);\n },\n\n /**\n * Attach event\n * @param {string} event Event name\n * @param {Function} callback Callback function\n * @return {this}\n */\n on(event, callback) {\n em.on(event, callback);\n return this;\n },\n\n /**\n * Attach event and detach it after the first run\n * @param {string} event Event name\n * @param {Function} callback Callback function\n * @return {this}\n */\n once(event, callback) {\n em.once(event, callback);\n return this;\n },\n\n /**\n * Detach event\n * @param {string} event Event name\n * @param {Function} callback Callback function\n * @return {this}\n */\n off(event, callback) {\n em.off(event, callback);\n return this;\n },\n\n /**\n * Trigger event\n * @param {string} event Event to trigger\n * @return {this}\n */\n trigger(event) {\n em.trigger.apply(em, arguments);\n return this;\n },\n\n /**\n * Destroy the editor\n */\n destroy() {\n return em.destroyAll();\n },\n\n /**\n * Returns editor element\n * @return {HTMLElement}\n * @private\n */\n getEl() {\n return editorView.el;\n },\n\n /**\n * Returns editor model\n * @return {Model}\n * @private\n */\n getModel() {\n return em;\n },\n\n /**\n * Render editor\n * @return {HTMLElement}\n */\n render() {\n // Do post render stuff after the iframe is loaded otherwise it'll\n // be empty during tests\n em.on('loaded', () => {\n this.UndoManager.clear();\n em.get('modules').forEach(module => {\n module.postRender && module.postRender(editorView);\n });\n });\n\n editorView.render();\n return editorView.el;\n }\n };\n};\n","export default {\n plugins: []\n};\n","/**\n * File made for IE/Edge support\n * https://github.com/artf/grapesjs/issues/214\n */\n\nexport default () => {\n /**\n * Check if IE/Edge\n * @return {Boolean}\n */\n const isIE = () => {\n let match;\n const agent = window.navigator.userAgent;\n const rules = [\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/]\n ];\n\n for (let i = 0; i < rules.length; i++) {\n const rule = rules[i];\n match = rule[1].exec(agent);\n if (match) break;\n }\n\n return !!match;\n };\n\n if (isIE()) {\n const originalCreateHTMLDocument =\n DOMImplementation.prototype.createHTMLDocument;\n DOMImplementation.prototype.createHTMLDocument = title => {\n if (!title) title = '';\n return originalCreateHTMLDocument.apply(document.implementation, [title]);\n };\n }\n};\n","import $ from 'cash-dom';\nimport Editor from './editor';\nimport { isElement, isFunction } from 'underscore';\nimport polyfills from 'utils/polyfills';\nimport PluginManager from './plugin_manager';\n\npolyfills();\n\nconst plugins = new PluginManager();\nconst editors = [];\nconst defaultConfig = {\n // If true renders editor on init\n autorender: 1,\n\n // Array of plugins to init\n plugins: [],\n\n // Custom options for plugins\n pluginsOpts: {}\n};\n\nexport default {\n $,\n\n editors,\n\n plugins,\n\n // Will be replaced on build\n version: '<# VERSION #>',\n\n /**\n * Initialize the editor with passed options\n * @param {Object} config Configuration object\n * @param {string|HTMLElement} config.container Selector which indicates where render the editor\n * @param {Boolean} [config.autorender=true] If true, auto-render the content\n * @param {Array} [config.plugins=[]] Array of plugins to execute on start\n * @param {Object} [config.pluginsOpts={}] Custom options for plugins\n * @return {Editor} Editor instance\n * @example\n * var editor = grapesjs.init({\n * container: '#myeditor',\n * components: '
Hello world
',\n * style: '.hello{color: red}',\n * })\n */\n init(config = {}) {\n const els = config.container;\n if (!els) throw new Error(\"'container' is required\");\n config = { ...defaultConfig, ...config };\n config.el = isElement(els) ? els : document.querySelector(els);\n const editor = new Editor(config).init();\n\n // Load plugins\n config.plugins.forEach(pluginId => {\n let plugin = plugins.get(pluginId);\n const plgOptions = config.pluginsOpts[pluginId] || {};\n\n // Try to search in global context\n if (!plugin) {\n const wplg = window[pluginId];\n plugin = wplg && wplg.default ? wplg.default : wplg;\n }\n\n if (plugin) {\n plugin(editor, plgOptions);\n } else if (isFunction(pluginId)) {\n pluginId(editor, plgOptions);\n } else {\n console.warn(`Plugin ${pluginId} not found`);\n }\n });\n\n // Execute `onLoad` on modules once all plugins are initialized.\n // A plugin might have extended/added some custom type so this\n // is a good point to load stuff like components, css rules, etc.\n editor.getModel().loadOnStart();\n config.autorender && editor.render();\n editors.push(editor);\n\n return editor;\n }\n};\n","import defaults from './config/config';\n\nexport default config => {\n var c = config || {};\n\n // Set default options\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var plugins = {};\n\n return {\n /**\n * Add new plugin. Plugins could not be overwritten\n * @param {string} id Plugin ID\n * @param {Function} plugin Function which contains all plugin logic\n * @return {Function} The plugin function\n * @example\n * PluginManager.add('some-plugin', function(editor){\n * editor.Commands.add('new-command', {\n * run: function(editor, senderBtn){\n * console.log('Executed new-command');\n * }\n * })\n * });\n */\n add(id, plugin) {\n if (plugins[id]) {\n return plugins[id];\n }\n\n plugins[id] = plugin;\n return plugin;\n },\n\n /**\n * Returns plugin by ID\n * @param {string} id Plugin ID\n * @return {Function|undefined} Plugin\n * @example\n * var plugin = PluginManager.get('some-plugin');\n * plugin(editor);\n */\n get(id) {\n return plugins[id];\n },\n\n /**\n * Returns object with all plugins\n * @return {Object}\n */\n getAll() {\n return plugins;\n }\n };\n};\n","export default {\n // Style prefix\n stylePrefix: 'cm-',\n\n inlineCss: false\n};\n","import Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n build(model, opts = {}) {\n const models = model.get('components');\n\n if (opts.exportWrapper) {\n return model.toHTML({\n ...(opts.wrapperIsBody && { tag: 'body' })\n });\n }\n\n return this.buildModels(models);\n },\n\n buildModels(models) {\n let code = '';\n models.each(model => {\n code += model.toHTML();\n });\n return code;\n }\n});\n","import Backbone from 'backbone';\nimport { isUndefined, each } from 'underscore';\n\nconst maxValue = Number.MAX_VALUE;\n\nexport default Backbone.Model.extend({\n initialize() {\n this.compCls = [];\n this.ids = [];\n },\n\n /**\n * Get CSS from a component\n * @param {Model} model\n * @return {String}\n */\n buildFromModel(model, opts = {}) {\n let code = '';\n const em = this.em;\n const avoidInline = em && em.getConfig('avoidInlineStyle');\n const style = model.styleToString();\n const classes = model.get('classes');\n const wrapperIsBody = opts.wrapperIsBody;\n const isWrapper = model.get('wrapper');\n this.ids.push(`#${model.getId()}`);\n\n // Let's know what classes I've found\n classes.each(model => this.compCls.push(model.getFullName()));\n\n if (!avoidInline && style) {\n let selector = `#${model.getId()}`;\n selector = wrapperIsBody && isWrapper ? 'body' : selector;\n code = `${selector}{${style}}`;\n }\n\n const components = model.components();\n components.each(model => (code += this.buildFromModel(model, opts)));\n return code;\n },\n\n build(model, opts = {}) {\n const cssc = opts.cssc;\n const em = opts.em || '';\n this.em = em;\n this.compCls = [];\n this.ids = [];\n var code = this.buildFromModel(model, opts);\n const clearStyles =\n isUndefined(opts.clearStyles) && em\n ? em.getConfig('clearStyles')\n : opts.clearStyles;\n\n if (cssc) {\n const rules = cssc.getAll();\n const atRules = {};\n const dump = [];\n\n rules.each(rule => {\n const atRule = rule.getAtRule();\n\n if (atRule) {\n const mRules = atRules[atRule];\n if (mRules) {\n mRules.push(rule);\n } else {\n atRules[atRule] = [rule];\n }\n return;\n }\n\n code += this.buildFromRule(rule, dump, opts);\n });\n\n this.sortMediaObject(atRules).forEach(item => {\n let rulesStr = '';\n const atRule = item.key;\n const mRules = item.value;\n\n mRules.forEach(rule => {\n const ruleStr = this.buildFromRule(rule, dump, opts);\n\n if (rule.get('singleAtRule')) {\n code += `${atRule}{${ruleStr}}`;\n } else {\n rulesStr += ruleStr;\n }\n });\n\n if (rulesStr) {\n code += `${atRule}{${rulesStr}}`;\n }\n });\n\n em && clearStyles && rules.remove(dump);\n }\n\n return code;\n },\n\n /**\n * Get CSS from the rule model\n * @param {Model} rule\n * @return {string} CSS string\n */\n buildFromRule(rule, dump, opts = {}) {\n let result = '';\n const selectorStrNoAdd = rule.selectorsToString({ skipAdd: 1 });\n const selectorsAdd = rule.get('selectorsAdd');\n const singleAtRule = rule.get('singleAtRule');\n let found;\n\n // This will not render a rule if there is no its component\n rule.get('selectors').each(selector => {\n const name = selector.getFullName();\n if (\n this.compCls.indexOf(name) >= 0 ||\n this.ids.indexOf(name) >= 0 ||\n opts.keepUnusedStyles\n ) {\n found = 1;\n }\n });\n\n if ((selectorStrNoAdd && found) || selectorsAdd || singleAtRule) {\n const block = rule.getDeclaration();\n block && (result += block);\n } else {\n dump.push(rule);\n }\n\n return result;\n },\n\n /**\n * Get the numeric length of the media query string\n * @param {String} mediaQuery Media query string\n * @return {Number}\n */\n getQueryLength(mediaQuery) {\n const length = /(-?\\d*\\.?\\d+)\\w{0,}/.exec(mediaQuery);\n if (!length) return maxValue;\n\n return parseFloat(length[1]);\n },\n\n /**\n * Return a sorted array from media query object\n * @param {Object} items\n * @return {Array}\n */\n sortMediaObject(items = {}) {\n const itemsArr = [];\n each(items, (value, key) => itemsArr.push({ key, value }));\n return itemsArr.sort((a, b) => {\n const isMobFirst = [a.key, b.key].every(\n mquery => mquery.indexOf('min-width') !== -1\n );\n const left = isMobFirst ? a.key : b.key;\n const right = isMobFirst ? b.key : a.key;\n return this.getQueryLength(left) - this.getQueryLength(right);\n });\n }\n});\n","import { each } from 'underscore';\nimport Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n /** @inheritdoc */\n build(model) {\n var json = model.toJSON();\n this.beforeEach(json);\n\n each(\n json,\n function(v, attr) {\n var obj = json[attr];\n if (obj instanceof Backbone.Model) {\n json[attr] = this.build(obj);\n } else if (obj instanceof Backbone.Collection) {\n var coll = obj;\n json[attr] = [];\n if (coll.length) {\n coll.each(function(el, index) {\n json[attr][index] = this.build(el);\n }, this);\n }\n }\n },\n this\n );\n\n return json;\n },\n\n /**\n * Execute on each object\n * @param {Object} obj\n */\n beforeEach(obj) {\n delete obj.status;\n }\n});\n","import { extend } from 'underscore';\nimport Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n mapModel(model) {\n var code = '';\n var script = model.get('script-export') || model.get('script');\n var type = model.get('type');\n var comps = model.get('components');\n var id = model.getId();\n\n if (script) {\n // If the component has scripts we need to expose his ID\n var attr = model.get('attributes');\n attr = extend({}, attr, { id });\n model.set('attributes', attr, { silent: 1 });\n var scrStr = model.getScriptString(script);\n\n // If the script was updated, I'll put its code in a separate container\n if (model.get('scriptUpdated')) {\n this.mapJs[type + '-' + id] = { ids: [id], code: scrStr };\n } else {\n var mapType = this.mapJs[type];\n\n if (mapType) {\n mapType.ids.push(id);\n } else {\n this.mapJs[type] = { ids: [id], code: scrStr };\n }\n }\n }\n\n comps.each(function(model) {\n code += this.mapModel(model);\n }, this);\n\n return code;\n },\n\n build(model) {\n this.mapJs = {};\n this.mapModel(model);\n\n var code = '';\n\n for (var type in this.mapJs) {\n var mapType = this.mapJs[type];\n var ids = '#' + mapType.ids.join(', #');\n code += `\n var items = document.querySelectorAll('${ids}');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){${mapType.code}}.bind(items[i]))();\n }`;\n }\n\n return code;\n }\n});\n","import { bindAll } from 'underscore';\nimport Backbone from 'backbone';\nimport CodeMirror from 'codemirror/lib/codemirror';\nimport 'codemirror/mode/htmlmixed/htmlmixed';\nimport 'codemirror/mode/css/css';\nimport 'codemirror-formatting';\n\nexport default Backbone.Model.extend({\n defaults: {\n input: '',\n label: '',\n codeName: '',\n theme: 'hopscotch',\n readOnly: true,\n lineNumbers: true\n },\n\n /** @inheritdoc */\n init(el) {\n bindAll(this, 'onChange');\n this.editor = CodeMirror.fromTextArea(el, {\n dragDrop: false,\n lineWrapping: true,\n mode: this.get('codeName'),\n ...this.attributes\n });\n this.element = el;\n this.editor.on('change', this.onChange);\n\n return this;\n },\n\n onChange() {\n this.trigger('update', this);\n },\n\n getEditor() {\n return this.editor;\n },\n\n /**\n * The element where the viewer is attached\n * @return {HTMLElement}\n */\n getElement() {\n return this.element;\n },\n\n /**\n * Set the element which contains the viewer attached.\n * Generally, it should be just a textarea, but some editor might require\n * a container for it some in that case this method can be used\n * @param {HTMLElement} el\n * @return {self}\n */\n setElement(el) {\n this.element = el;\n return this;\n },\n\n /**\n * Refresh the viewer\n * @return {self}\n */\n refresh() {\n this.getEditor().refresh();\n return this;\n },\n\n /**\n * Focus the viewer\n * @return {self}\n */\n focus() {\n this.getEditor().focus();\n return this;\n },\n\n getContent() {\n const ed = this.getEditor();\n return ed && ed.getValue();\n },\n\n /** @inheritdoc */\n setContent(v, opts = {}) {\n const { editor } = this;\n if (!editor) return;\n editor.setValue(v);\n\n if (editor.autoFormatRange) {\n CodeMirror.commands.selectAll(editor);\n editor.autoFormatRange(editor.getCursor(true), editor.getCursor(false));\n CodeMirror.commands.goDocStart(editor);\n }\n\n !opts.noRefresh && setTimeout(() => this.refresh());\n }\n});\n","import { template } from 'underscore';\nimport Backbone from 'backbone';\n\nexport default Backbone.View.extend({\n template: template(`\n
editor\" id=\"<%= pfx %><%= codeName %>\">\n \t
title\"><%= label %>
\n \t
code\">
\n
`),\n\n initialize(o) {\n this.config = o.config || {};\n this.pfx = this.config.stylePrefix;\n },\n\n render() {\n var obj = this.model.toJSON();\n obj.pfx = this.pfx;\n this.$el.html(this.template(obj));\n this.$el.attr('class', this.pfx + 'editor-c');\n this.$el.find('#' + this.pfx + 'code').append(this.model.get('input'));\n return this;\n }\n});\n","/**\n * - [addGenerator](#addgenerator)\n * - [getGenerator](#getgenerator)\n * - [getGenerators](#getgenerators)\n * - [addViewer](#addviewer)\n * - [getViewer](#getviewer)\n * - [getViewers](#getviewers)\n * - [updateViewer](#updateviewer)\n * - [getCode](#getcode)\n *\n *\n * Before using methods you should get first the module from the editor instance, in this way:\n *\n * ```js\n * var codeManager = editor.CodeManager;\n * ```\n *\n * @module CodeManager\n */\nimport { isUndefined } from 'underscore';\nimport defaults from './config/config';\nimport gHtml from './model/HtmlGenerator';\nimport gCss from './model/CssGenerator';\nimport gJson from './model/JsonGenerator';\nimport gJs from './model/JsGenerator';\nimport eCM from './model/CodeMirrorEditor';\nimport editorView from './view/EditorView';\n\nexport default () => {\n var c = {};\n var generators = {},\n defGenerators = {},\n viewers = {},\n defViewers = {};\n\n const defaultViewer = 'CodeMirror';\n\n return {\n getConfig() {\n return c;\n },\n\n config: c,\n\n EditorView: editorView,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'CodeManager',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n defGenerators.html = new gHtml();\n defGenerators.css = new gCss();\n defGenerators.json = new gJson();\n defGenerators.js = new gJs();\n defViewers.CodeMirror = new eCM();\n this.loadDefaultGenerators().loadDefaultViewers();\n\n return this;\n },\n\n /**\n * Add new code generator to the collection\n * @param {string} id Code generator ID\n * @param {Object} generator Code generator wrapper\n * @param {Function} generator.build Function that builds the code\n * @return {this}\n * @example\n * codeManager.addGenerator('html7',{\n * build: function(model){\n * return 'myCode';\n * }\n * });\n * */\n addGenerator(id, generator) {\n generators[id] = generator;\n return this;\n },\n\n /**\n * Get code generator by id\n * @param {string} id Code generator ID\n * @return {Object|null}\n * @example\n * var generator = codeManager.getGenerator('html7');\n * generator.build = function(model){\n * //extend\n * };\n * */\n getGenerator(id) {\n return generators[id] || null;\n },\n\n /**\n * Returns all code generators\n * @return {Array}\n * */\n getGenerators() {\n return generators;\n },\n\n /**\n * Add new code viewer\n * @param {string} id Code viewer ID\n * @param {Object} viewer Code viewer wrapper\n * @param {Function} viewer.init Set element on which viewer will be displayed\n * @param {Function} viewer.setContent Set content to the viewer\n * @return {this}\n * @example\n * codeManager.addViewer('ace',{\n * init: function(el){\n * var ace = require('ace-editor');\n * this.editor = ace.edit(el.id);\n * },\n * setContent: function(code){\n * this.editor.setValue(code);\n * }\n * });\n * */\n addViewer(id, viewer) {\n viewers[id] = viewer;\n return this;\n },\n\n /**\n * Get code viewer by id\n * @param {string} id Code viewer ID\n * @return {Object|null}\n * @example\n * var viewer = codeManager.getViewer('ace');\n * */\n getViewer(id) {\n return viewers[id] || null;\n },\n\n /**\n * Returns all code viewers\n * @return {Array}\n * */\n getViewers() {\n return viewers;\n },\n\n createViewer(opts = {}) {\n const type = !isUndefined(opts.type) ? opts.type : defaultViewer;\n const viewer = this.getViewer(type) && this.getViewer(type).clone();\n const cont = document.createElement('div');\n const txtarea = document.createElement('textarea');\n cont.appendChild(txtarea);\n viewer.set(opts);\n viewer.init(txtarea);\n viewer.setElement(cont);\n\n return viewer;\n },\n\n /**\n * Update code viewer content\n * @param {Object} viewer Viewer instance\n * @param {string} code Code string\n * @example\n * var AceViewer = codeManager.getViewer('ace');\n * // ...\n * var viewer = AceViewer.init(el);\n * // ...\n * codeManager.updateViewer(AceViewer, 'code');\n * */\n updateViewer(viewer, code) {\n viewer.setContent(code);\n },\n\n /**\n * Get code from model\n * @param {Object} model Any kind of model that will be passed to the build method of generator\n * @param {string} genId Code generator id\n * @param {Object} [opt] Options\n * @return {string}\n * @example\n * var codeStr = codeManager.getCode(model, 'html');\n * */\n getCode(model, genId, opt = {}) {\n opt.em = c.em;\n var generator = this.getGenerator(genId);\n return generator ? generator.build(model, opt) : '';\n },\n\n /**\n * Load default code generators\n * @return {this}\n * @private\n * */\n loadDefaultGenerators() {\n for (var id in defGenerators) this.addGenerator(id, defGenerators[id]);\n\n return this;\n },\n\n /**\n * Load default code viewers\n * @return {this}\n * @private\n * */\n loadDefaultViewers() {\n for (var id in defViewers) this.addViewer(id, defViewers[id]);\n\n return this;\n }\n };\n};\n","const swv = 'sw-visibility';\nconst expt = 'export-template';\nconst osm = 'open-sm';\nconst otm = 'open-tm';\nconst ola = 'open-layers';\nconst obl = 'open-blocks';\nconst ful = 'fullscreen';\nconst prv = 'preview';\n\nexport default {\n stylePrefix: 'pn-',\n\n // Default panels fa-sliders for features\n defaults: [\n {\n id: 'commands',\n buttons: [{}]\n },\n {\n id: 'options',\n buttons: [\n {\n active: true,\n id: swv,\n className: 'fa fa-square-o',\n command: swv,\n context: swv,\n attributes: { title: 'View components' }\n },\n {\n id: prv,\n className: 'fa fa-eye',\n command: prv,\n context: prv,\n attributes: { title: 'Preview' }\n },\n {\n id: ful,\n className: 'fa fa-arrows-alt',\n command: ful,\n context: ful,\n attributes: { title: 'Fullscreen' }\n },\n {\n id: expt,\n className: 'fa fa-code',\n command: expt,\n attributes: { title: 'View code' }\n }\n ]\n },\n {\n id: 'views',\n buttons: [\n {\n id: osm,\n className: 'fa fa-paint-brush',\n command: osm,\n active: true,\n togglable: 0,\n attributes: { title: 'Open Style Manager' }\n },\n {\n id: otm,\n className: 'fa fa-cog',\n command: otm,\n togglable: 0,\n attributes: { title: 'Settings' }\n },\n {\n id: ola,\n className: 'fa fa-bars',\n command: ola,\n togglable: 0,\n attributes: { title: 'Open Layer Manager' }\n },\n {\n id: obl,\n className: 'fa fa-th-large',\n command: obl,\n togglable: 0,\n attributes: { title: 'Open Blocks' }\n }\n ]\n }\n ],\n\n // Editor model\n em: null,\n\n // Delay before show children buttons (in milliseconds)\n delayBtnsShow: 300\n};\n","import Backbone from 'backbone';\nimport Buttons from './Buttons';\n\nexport default Backbone.Model.extend({\n defaults: {\n id: '',\n content: '',\n visible: true,\n buttons: [],\n attributes: {}\n },\n\n initialize(options) {\n this.btn = this.get('buttons') || [];\n this.buttons = new Buttons(this.btn);\n this.set('buttons', this.buttons);\n }\n});\n","import Backbone from 'backbone';\nimport Panel from './Panel';\n\nexport default Backbone.Collection.extend({\n model: Panel\n});\n","import Backbone from 'backbone';\nimport { isString, isObject, isFunction } from 'underscore';\n\nconst $ = Backbone.$;\n\nexport default Backbone.View.extend({\n tagName() {\n return this.model.get('tagName');\n },\n\n events: {\n click: 'clicked'\n },\n\n initialize(o) {\n var cls = this.model.get('className');\n this.config = o.config || {};\n this.em = this.config.em || {};\n const pfx = this.config.stylePrefix || '';\n const ppfx = this.config.pStylePrefix || '';\n this.pfx = pfx;\n this.ppfx = this.config.pStylePrefix || '';\n this.id = pfx + this.model.get('id');\n this.activeCls = `${pfx}active ${ppfx}four-color`;\n this.disableCls = `${ppfx}disabled`;\n this.btnsVisCls = `${pfx}visible`;\n this.className = pfx + 'btn' + (cls ? ' ' + cls : '');\n this.listenTo(this.model, 'change', this.render);\n this.listenTo(this.model, 'change:active updateActive', this.updateActive);\n this.listenTo(this.model, 'checkActive', this.checkActive);\n this.listenTo(this.model, 'change:bntsVis', this.updateBtnsVis);\n this.listenTo(this.model, 'change:attributes', this.updateAttributes);\n this.listenTo(this.model, 'change:className', this.updateClassName);\n this.listenTo(this.model, 'change:disable', this.updateDisable);\n\n if (this.em && this.em.get) this.commands = this.em.get('Commands');\n },\n\n /**\n * Updates class name of the button\n *\n * @return void\n * */\n updateClassName() {\n const { model, pfx } = this;\n const cls = model.get('className');\n const attrCls = model.get('attributes').class;\n const classStr = `${attrCls ? attrCls : ''} ${pfx}btn ${cls ? cls : ''}`;\n this.$el.attr('class', classStr.trim());\n },\n\n /**\n * Updates attributes of the button\n *\n * @return void\n * */\n updateAttributes() {\n const { em, model, $el } = this;\n const attr = model.get('attributes') || {};\n const title = em && em.t && em.t(`panels.buttons.titles.${model.id}`);\n $el.attr(attr);\n title && $el.attr({ title });\n\n this.updateClassName();\n },\n\n /**\n * Updates visibility of children buttons\n *\n * @return void\n * */\n updateBtnsVis() {\n if (!this.$buttons) return;\n\n if (this.model.get('bntsVis')) this.$buttons.addClass(this.btnsVisCls);\n else this.$buttons.removeClass(this.btnsVisCls);\n },\n\n /**\n * Update active status of the button\n *\n * @return void\n * */\n updateActive(opts = {}) {\n const { model, commands, $el, activeCls } = this;\n const { fromCollection } = opts;\n const context = model.get('context');\n const options = model.get('options');\n const commandName = model.get('command');\n let command = {};\n\n if (commands && isString(commandName)) {\n command = commands.get(commandName) || {};\n } else if (isFunction(commandName)) {\n command = commands.create({ run: commandName });\n } else if (commandName !== null && isObject(commandName)) {\n command = commands.create(commandName);\n }\n\n if (model.get('active')) {\n !fromCollection && model.collection.deactivateAll(context, model);\n model.set('active', true, { silent: true }).trigger('checkActive');\n commands.runCommand(command, { ...options, sender: model });\n\n // Disable button if the command has no stop method\n command.noStop && model.set('active', false);\n } else {\n $el.removeClass(activeCls);\n commands.stopCommand(command, { ...options, sender: model, force: 1 });\n }\n },\n\n updateDisable() {\n const { disableCls, model } = this;\n const disable = model.get('disable');\n this.$el[disable ? 'addClass' : 'removeClass'](disableCls);\n },\n\n /**\n * Update active style status\n *\n * @return void\n * */\n checkActive() {\n const { model, $el, activeCls } = this;\n model.get('active') ? $el.addClass(activeCls) : $el.removeClass(activeCls);\n },\n\n /**\n * Triggered when button is clicked\n * @param {Object} e Event\n *\n * @return void\n * */\n clicked(e) {\n if (this.model.get('bntsVis')) return;\n\n if (this.model.get('disable')) return;\n\n this.toogleActive();\n },\n\n toogleActive() {\n const { model } = this;\n const { active, togglable } = model.attributes;\n\n if (active && !togglable) return;\n\n model.set('active', !active);\n\n // If the stop is requested\n var command = this.em.get('Commands').get('select-comp');\n\n if (active) {\n if (model.get('runDefaultCommand')) this.em.runDefault();\n } else {\n if (model.get('stopDefaultCommand')) this.em.stopDefault();\n }\n },\n\n render() {\n const label = this.model.get('label');\n const { $el } = this;\n $el.empty();\n this.updateAttributes();\n label && $el.append(label);\n this.checkActive();\n this.updateDisable();\n\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport ButtonView from './ButtonView';\nimport { result } from 'underscore';\n\nexport default Backbone.View.extend({\n initialize(o) {\n this.opt = o || {};\n this.config = this.opt.config || {};\n this.pfx = this.config.stylePrefix || '';\n this.parentM = this.opt.parentM || null;\n this.listenTo(this.collection, 'add', this.addTo);\n this.listenTo(this.collection, 'reset remove', this.render);\n this.className = this.pfx + 'buttons';\n },\n\n /**\n * Add to collection\n * @param Object Model\n *\n * @return Object\n * */\n addTo(model) {\n this.addToCollection(model);\n },\n\n /**\n * Add new object to collection\n * @param Object Model\n * @param Object Fragment collection\n *\n * @return Object Object created\n * */\n addToCollection(model, fragmentEl) {\n var fragment = fragmentEl || null;\n var viewObject = ButtonView;\n\n var view = new viewObject({\n model,\n config: this.config,\n parentM: this.parentM\n });\n var rendered = view.render().el;\n\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n this.$el.append(rendered);\n }\n\n return rendered;\n },\n\n render() {\n var fragment = document.createDocumentFragment();\n this.$el.empty();\n\n this.collection.each(function(model) {\n this.addToCollection(model, fragment);\n }, this);\n\n this.$el.append(fragment);\n this.$el.attr('class', result(this, 'className'));\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport ButtonsView from './ButtonsView';\n\nexport default Backbone.View.extend({\n initialize(o) {\n const config = o.config || {};\n const model = this.model;\n this.config = config;\n this.pfx = config.stylePrefix || '';\n this.ppfx = config.pStylePrefix || '';\n this.buttons = model.get('buttons');\n this.className = this.pfx + 'panel';\n this.id = this.pfx + model.get('id');\n this.listenTo(model, 'change:appendContent', this.appendContent);\n this.listenTo(model, 'change:content', this.updateContent);\n this.listenTo(model, 'change:visible', this.toggleVisible);\n model.view = this;\n },\n\n /**\n * Append content of the panel\n * */\n appendContent() {\n this.$el.append(this.model.get('appendContent'));\n },\n\n /**\n * Update content\n * */\n updateContent() {\n this.$el.html(this.model.get('content'));\n },\n\n toggleVisible() {\n if (!this.model.get('visible')) {\n this.$el.addClass(`${this.ppfx}hidden`);\n return;\n }\n this.$el.removeClass(`${this.ppfx}hidden`);\n },\n\n attributes() {\n return this.model.get('attributes');\n },\n\n initResize() {\n const em = this.config.em;\n const editor = em ? em.get('Editor') : '';\n const resizable = this.model.get('resizable');\n\n if (editor && resizable) {\n var resz = resizable === true ? [1, 1, 1, 1] : resizable;\n var resLen = resz.length;\n var tc,\n cr,\n bc,\n cl = 0;\n\n // Choose which sides of the panel are resizable\n if (resLen == 2) {\n tc = resz[0];\n bc = resz[0];\n cr = resz[1];\n cl = resz[1];\n } else if (resLen == 4) {\n tc = resz[0];\n cr = resz[1];\n bc = resz[2];\n cl = resz[3];\n }\n\n var resizer = editor.Utils.Resizer.init({\n tc,\n cr,\n bc,\n cl,\n tl: 0,\n tr: 0,\n bl: 0,\n br: 0,\n appendTo: this.el,\n silentFrames: 1,\n avoidContainerUpdate: 1,\n prefix: editor.getConfig().stylePrefix,\n onEnd() {\n em && em.trigger('change:canvasOffset');\n },\n posFetcher: (el, { target }) => {\n const style = el.style;\n const config = resizer.getConfig();\n const keyWidth = config.keyWidth;\n const keyHeight = config.keyHeight;\n const rect = el.getBoundingClientRect();\n const forContainer = target == 'container';\n const styleWidth = style[keyWidth];\n const styleHeight = style[keyHeight];\n const width =\n styleWidth && !forContainer ? parseFloat(styleWidth) : rect.width;\n const height =\n styleHeight && !forContainer\n ? parseFloat(styleHeight)\n : rect.height;\n return {\n left: 0,\n top: 0,\n width,\n height\n };\n },\n ...resizable\n });\n resizer.blur = () => {};\n resizer.focus(this.el);\n }\n },\n\n render() {\n const $el = this.$el;\n const ppfx = this.ppfx;\n const cls = `${this.className} ${this.id} ${ppfx}one-bg ${ppfx}two-color`;\n $el.addClass(cls);\n\n if (this.buttons.length) {\n var buttons = new ButtonsView({\n collection: this.buttons,\n config: this.config\n });\n $el.append(buttons.render().el);\n }\n\n $el.append(this.model.get('content'));\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport PanelView from './PanelView';\n\nexport default Backbone.View.extend({\n initialize(o) {\n this.opt = o || {};\n this.config = this.opt.config || {};\n this.pfx = this.config.stylePrefix || '';\n const items = this.collection;\n this.listenTo(items, 'add', this.addTo);\n this.listenTo(items, 'reset', this.render);\n this.listenTo(items, 'remove', this.onRemove);\n this.className = this.pfx + 'panels';\n },\n\n onRemove(model) {\n const view = model.view;\n view && view.remove();\n },\n\n /**\n * Add to collection\n * @param Object Model\n *\n * @return Object\n * @private\n * */\n addTo(model) {\n this.addToCollection(model);\n },\n\n /**\n * Add new object to collection\n * @param Object Model\n * @param Object Fragment collection\n * @param integer Index of append\n *\n * @return Object Object created\n * @private\n * */\n addToCollection(model, fragmentEl) {\n const fragment = fragmentEl || null;\n const config = this.config;\n const el = model.get('el');\n const view = new PanelView({\n el,\n model,\n config\n });\n const rendered = view.render().el;\n const appendTo = model.get('appendTo');\n\n // Do nothing if the panel was requested to be another element\n if (el) {\n } else if (appendTo) {\n var appendEl = document.querySelector(appendTo);\n appendEl.appendChild(rendered);\n } else {\n if (fragment) {\n fragment.appendChild(rendered);\n } else {\n this.$el.append(rendered);\n }\n }\n\n view.initResize();\n return rendered;\n },\n\n render() {\n const $el = this.$el;\n const frag = document.createDocumentFragment();\n $el.empty();\n this.collection.each(model => this.addToCollection(model, frag));\n $el.append(frag);\n $el.attr('class', this.className);\n return this;\n }\n});\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/panels/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * panels: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const panelManager = editor.Panels;\n * ```\n *\n * * [addPanel](#addpanel)\n * * [addButton](#addbutton)\n * * [getButton](#getbutton)\n * * [getPanel](#getpanel)\n * * [getPanels](#getpanels)\n * * [getPanelsEl](#getpanelsel)\n * * [removePanel](#removepanel)\n * * [removeButton](#removebutton)\n *\n * @module Panels\n */\nimport defaults from './config/config';\nimport Panel from './model/Panel';\nimport Panels from './model/Panels';\nimport PanelView from './view/PanelView';\nimport PanelsView from './view/PanelsView';\n\nexport default () => {\n var c = {};\n var panels, PanelsViewObj;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Panels',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n panels = new Panels(c.defaults);\n PanelsViewObj = new PanelsView({\n collection: panels,\n config: c\n });\n return this;\n },\n\n /**\n * Returns the collection of panels\n * @return {Collection} Collection of panel\n */\n getPanels() {\n return panels;\n },\n\n /**\n * Returns panels element\n * @return {HTMLElement}\n */\n getPanelsEl() {\n return PanelsViewObj.el;\n },\n\n /**\n * Add new panel to the collection\n * @param {Object|Panel} panel Object with right properties or an instance of Panel\n * @return {Panel} Added panel. Useful in case passed argument was an Object\n * @example\n * var newPanel = panelManager.addPanel({\n * id: 'myNewPanel',\n * visible : true,\n * buttons : [...],\n * });\n */\n addPanel(panel) {\n return panels.add(panel);\n },\n\n /**\n * Remove a panel from the collection\n * @param {Object|Panel|String} panel Object with right properties or an instance of Panel or Painel id\n * @return {Panel} Removed panel. Useful in case passed argument was an Object\n * @example\n * const newPanel = panelManager.removePanel({\n * id: 'myNewPanel',\n * visible : true,\n * buttons : [...],\n * });\n *\n * const newPanel = panelManager.removePanel('myNewPanel');\n *\n */\n removePanel(panel) {\n return panels.remove(panel);\n },\n\n /**\n * Get panel by ID\n * @param {string} id Id string\n * @return {Panel|null}\n * @example\n * var myPanel = panelManager.getPanel('myNewPanel');\n */\n getPanel(id) {\n var res = panels.where({ id });\n return res.length ? res[0] : null;\n },\n\n /**\n * Add button to the panel\n * @param {string} panelId Panel's ID\n * @param {Object|Button} button Button object or instance of Button\n * @return {Button|null} Added button. Useful in case passed button was an Object\n * @example\n * var newButton = panelManager.addButton('myNewPanel',{\n * id: 'myNewButton',\n * className: 'someClass',\n * command: 'someCommand',\n * attributes: { title: 'Some title'},\n * active: false,\n * });\n * // It's also possible to pass the command as an object\n * // with .run and .stop methods\n * ...\n * command: {\n * run: function(editor) {\n * ...\n * },\n * stop: function(editor) {\n * ...\n * }\n * },\n * // Or simply like a function which will be evaluated as a single .run command\n * ...\n * command: function(editor) {\n * ...\n * }\n */\n addButton(panelId, button) {\n var pn = this.getPanel(panelId);\n return pn ? pn.get('buttons').add(button) : null;\n },\n\n /**\n * Remove button from the panel\n * @param {String} panelId Panel's ID\n * @param {String} buttonId Button's ID\n * @return {Button|null} Removed button.\n * @example\n * const removedButton = panelManager.addButton('myNewPanel',{\n * id: 'myNewButton',\n * className: 'someClass',\n * command: 'someCommand',\n * attributes: { title: 'Some title'},\n * active: false,\n * });\n *\n * const removedButton = panelManager.removeButton('myNewPanel', 'myNewButton');\n *\n */\n removeButton(panelId, button) {\n var pn = this.getPanel(panelId);\n return pn && pn.get('buttons').remove(button);\n },\n\n /**\n * Get button from the panel\n * @param {string} panelId Panel's ID\n * @param {string} id Button's ID\n * @return {Button|null}\n * @example\n * var button = panelManager.getButton('myPanel','myButton');\n */\n getButton(panelId, id) {\n var pn = this.getPanel(panelId);\n if (pn) {\n var res = pn.get('buttons').where({ id });\n return res.length ? res[0] : null;\n }\n return null;\n },\n\n /**\n * Render panels and buttons\n * @return {HTMLElement}\n * @private\n */\n render() {\n return PanelsViewObj.render().el;\n },\n\n /**\n * Active activable buttons\n * @private\n */\n active() {\n this.getPanels().each(p => {\n p.get('buttons').each(btn => {\n btn.get('active') && btn.trigger('updateActive');\n });\n });\n },\n\n /**\n * Disable buttons flagged as disabled\n * @private\n */\n disableButtons() {\n this.getPanels().each(p => {\n p.get('buttons').each(btn => {\n if (btn.get('disable')) btn.trigger('change:disable');\n });\n });\n },\n\n Panel\n };\n};\n","import Backbone from 'backbone';\nimport { bindAll } from 'underscore';\nimport {\n on,\n off,\n getElement,\n getKeyChar,\n isTextNode,\n getElRect\n} from 'utils/mixins';\nimport FrameView from './FrameView';\n\nconst $ = Backbone.$;\nlet timerZoom;\n\nexport default Backbone.View.extend({\n events: {\n wheel: 'onWheel'\n },\n\n template() {\n const { pfx } = this;\n return `\n
\n
\n `;\n },\n\n initialize(o) {\n bindAll(this, 'renderBody', 'onFrameScroll', 'clearOff', 'onKeyPress');\n on(window, 'scroll resize', this.clearOff);\n const { model } = this;\n this.config = o.config || {};\n this.em = this.config.em || {};\n this.pfx = this.config.stylePrefix || '';\n this.ppfx = this.config.pStylePrefix || '';\n this.className = this.config.stylePrefix + 'canvas';\n this.listenTo(this.em, 'change:canvasOffset', this.clearOff);\n this.listenTo(model, 'change:zoom change:x change:y', this.updateFrames);\n this.toggleListeners(1);\n this.frame = new FrameView({\n model: this.model.get('frame'),\n config: this.config\n });\n },\n\n remove() {\n Backbone.View.prototype.remove.apply(this, arguments);\n this.toggleListeners();\n },\n\n preventDefault(ev) {\n if (ev) {\n ev.preventDefault();\n ev._parentEvent && ev._parentEvent.preventDefault();\n }\n },\n\n toggleListeners(enable) {\n const method = enable ? 'on' : 'off';\n const methods = { on, off };\n methods[method](document, 'keypress', this.onKeyPress);\n },\n\n onKeyPress(ev) {\n const { em } = this;\n const key = getKeyChar(ev);\n\n if (key === ' ' && em.getZoomDecimal() !== 1) {\n this.preventDefault(ev);\n em.get('Editor').runCommand('core:canvas-move');\n }\n },\n\n onWheel(ev) {\n if ((ev.ctrlKey || ev.metaKey) && this.em.getConfig('multiFrames')) {\n this.preventDefault(ev);\n const { model } = this;\n const delta = Math.max(-1, Math.min(1, ev.wheelDelta || -ev.detail));\n const zoom = model.get('zoom');\n model.set('zoom', zoom + delta * 2);\n }\n },\n\n updateFrames(ev) {\n const { em, model } = this;\n const { x, y } = model.attributes;\n const zoom = this.getZoom();\n const defOpts = { preserveSelected: 1 };\n const mpl = zoom ? 1 / zoom : 1;\n this.framesArea.style.transform = `scale(${zoom}) translate(${x *\n mpl}px, ${y * mpl}px)`;\n this.clearOff();\n this.onFrameScroll();\n em.stopDefault(defOpts);\n em.trigger('canvas:update', ev);\n timerZoom && clearTimeout(timerZoom);\n timerZoom = setTimeout(() => em.runDefault(defOpts));\n },\n\n getZoom() {\n return this.em.getZoomDecimal();\n },\n\n /**\n * Checks if the element is visible in the canvas's viewport\n * @param {HTMLElement} el\n * @return {Boolean}\n */\n isElInViewport(el) {\n const rect = getElRect(getElement(el));\n const frameRect = this.getFrameOffset();\n const rTop = rect.top;\n const rLeft = rect.left;\n return (\n rTop >= 0 &&\n rLeft >= 0 &&\n rTop <= frameRect.height &&\n rLeft <= frameRect.width\n );\n },\n\n /**\n * Update tools position\n * @private\n */\n onFrameScroll() {\n var u = 'px';\n var body = this.frame.el.contentDocument.body;\n const zoom = this.getZoom();\n this.toolsEl.style.top = '-' + body.scrollTop * zoom + u;\n this.toolsEl.style.left = '-' + body.scrollLeft * zoom + u;\n this.em.trigger('canvasScroll');\n },\n\n /**\n * Insert scripts into head, it will call renderBody after all scripts loaded or failed\n * @private\n */\n renderScripts() {\n var frame = this.frame;\n var that = this;\n\n frame.el.onload = () => {\n var scripts = that.config.scripts.slice(0), // clone\n counter = 0;\n\n function appendScript(scripts) {\n if (scripts.length > 0) {\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = scripts.shift();\n script.onerror = script.onload = appendScript.bind(null, scripts);\n frame.el.contentDocument.head.appendChild(script);\n } else {\n that.renderBody();\n }\n }\n appendScript(scripts);\n };\n },\n\n /**\n * Render inside frame's body\n * @private\n */\n renderBody() {\n const { config, model } = this;\n const wrap = this.model.get('frame').get('wrapper');\n const em = config.em;\n\n if (wrap) {\n const Canvas = em.get('Canvas');\n const ppfx = this.ppfx;\n const body = $(Canvas.getBody());\n const head = $(Canvas.getDocument().head);\n const cssc = em.get('CssComposer');\n const conf = em.get('Config');\n let externalStyles = '';\n\n config.styles.forEach(style => {\n externalStyles += ``;\n });\n\n const colorWarn = '#ffca6f';\n\n // I need all this styles to make the editor work properly\n // Remove `html { height: 100%;}` from the baseCss as it gives jumpings\n // effects (on ENTER) with RTE like CKEditor (maybe some bug there?!?)\n // With `body {height: auto;}` jumps in CKEditor are removed but in\n // Firefox is impossible to drag stuff in empty canvas, so bring back\n // `body {height: 100%;}`.\n // For the moment I give the priority to Firefox as it might be\n // CKEditor's issue\n var frameCss = `\n ${em.config.baseCss || ''}\n\n .${ppfx}dashed *[data-highlightable] {\n outline: 1px dashed rgba(170,170,170,0.7);\n outline-offset: -2px;\n }\n\n .${ppfx}comp-selected {\n outline: 3px solid #3b97e3 !important;\n outline-offset: -3px;\n }\n\n .${ppfx}comp-selected-parent {\n outline: 2px solid ${colorWarn} !important\n }\n\n .${ppfx}no-select {\n user-select: none;\n -webkit-user-select:none;\n -moz-user-select: none;\n }\n\n .${ppfx}freezed {\n opacity: 0.5;\n pointer-events: none;\n }\n\n .${ppfx}no-pointer {\n pointer-events: none;\n }\n\n .${ppfx}plh-image {\n background: #f5f5f5;\n border: none;\n height: 100px;\n width: 100px;\n display: block;\n outline: 3px solid #ffca6f;\n cursor: pointer;\n outline-offset: -2px\n }\n\n .${ppfx}grabbing {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n .${ppfx}is__grabbing {\n overflow-x: hidden;\n }\n\n .${ppfx}is__grabbing,\n .${ppfx}is__grabbing * {\n cursor: grabbing !important;\n }\n\n ${conf.canvasCss || ''}\n ${conf.protectedCss || ''}\n `;\n\n if (externalStyles) {\n head.append(externalStyles);\n }\n\n body.append('');\n body.append(wrap.render()).append(cssc.render());\n body.append(this.getJsContainer());\n em.trigger('loaded');\n this.frame.el.contentWindow.onscroll = this.onFrameScroll;\n this.frame.updateOffset();\n\n // Avoid the default link behaviour in the canvas\n body.on(\n 'click',\n ev => ev && ev.target.tagName == 'A' && ev.preventDefault()\n );\n // Avoid the default form behaviour\n body.on('submit', ev => ev && ev.preventDefault());\n\n // When the iframe is focused the event dispatcher is not the same so\n // I need to delegate all events to the parent document\n const doc = document;\n const fdoc = this.frame.el.contentDocument;\n\n // Unfortunately just creating `KeyboardEvent(e.type, e)` is not enough,\n // the keyCode/which will be always `0`. Even if it's an old/deprecated\n // property keymaster (and many others) still use it... using `defineProperty`\n // hack seems the only way\n const createCustomEvent = (e, cls) => {\n let oEvent;\n try {\n oEvent = new window[cls](e.type, e);\n } catch (e) {\n oEvent = document.createEvent(cls);\n oEvent.initEvent(e.type, true, true);\n }\n oEvent.keyCodeVal = e.keyCode;\n oEvent._parentEvent = e;\n ['keyCode', 'which'].forEach(prop => {\n Object.defineProperty(oEvent, prop, {\n get() {\n return this.keyCodeVal;\n }\n });\n });\n return oEvent;\n };\n\n [\n { event: 'keydown keyup keypress', class: 'KeyboardEvent' },\n { event: 'wheel', class: 'WheelEvent' }\n ].forEach(obj =>\n obj.event.split(' ').forEach(event => {\n fdoc.addEventListener(event, e =>\n this.el.dispatchEvent(createCustomEvent(e, obj.class))\n );\n })\n );\n }\n },\n\n /**\n * Get the offset of the element\n * @param {HTMLElement} el\n * @return {Object}\n */\n offset(el) {\n var rect = getElRect(el);\n var docBody = el.ownerDocument.body;\n return {\n top: rect.top + docBody.scrollTop,\n left: rect.left + docBody.scrollLeft,\n width: rect.width,\n height: rect.height\n };\n },\n\n /**\n * Cleare cached offsets\n * @private\n */\n clearOff() {\n this.frmOff = null;\n this.cvsOff = null;\n },\n\n /**\n * Return frame offset\n * @return {Object}\n * @private\n */\n getFrameOffset(force = 0) {\n if (!this.frmOff || force) this.frmOff = this.offset(this.frame.el);\n return this.frmOff;\n },\n\n /**\n * Return canvas offset\n * @return {Object}\n * @private\n */\n getCanvasOffset() {\n if (!this.cvsOff) this.cvsOff = this.offset(this.el);\n return this.cvsOff;\n },\n\n /**\n * Returns element's data info\n * @param {HTMLElement} el\n * @return {Object}\n * @private\n */\n getElementPos(el, opts) {\n const zoom = this.getZoom();\n var opt = opts || {};\n var frmOff = this.getFrameOffset();\n var cvsOff = this.getCanvasOffset();\n var eo = this.offset(el);\n\n var frmTop = opt.avoidFrameOffset ? 0 : frmOff.top;\n var frmLeft = opt.avoidFrameOffset ? 0 : frmOff.left;\n\n const top = eo.top * zoom + frmTop - cvsOff.top;\n const left = eo.left * zoom + frmLeft - cvsOff.left;\n const height = eo.height * zoom;\n const width = eo.width * zoom;\n\n return { top, left, height, width, zoom, rect: eo };\n },\n\n /**\n * Returns element's offsets like margins and paddings\n * @param {HTMLElement} el\n * @return {Object}\n * @private\n */\n getElementOffsets(el) {\n if (!el || isTextNode(el)) return {};\n const result = {};\n const styles = window.getComputedStyle(el);\n [\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft'\n ].forEach(offset => {\n result[offset] = parseFloat(styles[offset]) * this.getZoom();\n });\n\n return result;\n },\n\n /**\n * Returns position data of the canvas element\n * @return {Object} obj Position object\n * @private\n */\n getPosition() {\n const doc = this.frame.el.contentDocument;\n if (!doc) return;\n const bEl = doc.body;\n const zoom = this.getZoom();\n const fo = this.getFrameOffset();\n const co = this.getCanvasOffset();\n\n return {\n top: fo.top + bEl.scrollTop * zoom - co.top,\n left: fo.left + bEl.scrollLeft * zoom - co.left,\n width: co.width,\n height: co.height\n };\n },\n\n /**\n * Update javascript of a specific component passed by its View\n * @param {View} view Component's View\n * @private\n */\n updateScript(view) {\n const model = view.model;\n const id = model.getId();\n\n if (!view.scriptContainer) {\n view.scriptContainer = $(`
`);\n this.getJsContainer().appendChild(view.scriptContainer.get(0));\n }\n\n view.el.id = id;\n view.scriptContainer.html('');\n // In editor, I make use of setTimeout as during the append process of elements\n // those will not be available immediately, therefore 'item' variable\n const script = document.createElement('script');\n script.innerHTML = `\n setTimeout(function() {\n var item = document.getElementById('${id}');\n if (!item) return;\n (function(){\n ${model.getScriptString()};\n }.bind(item))()\n }, 1);`;\n // #873\n // Adding setTimeout will make js components work on init of the editor\n setTimeout(() => view.scriptContainer.get(0).appendChild(script), 0);\n },\n\n /**\n * Get javascript container\n * @private\n */\n getJsContainer() {\n if (!this.jsContainer) {\n this.jsContainer = $(`
`).get(0);\n }\n return this.jsContainer;\n },\n\n render() {\n const { el, $el, ppfx, model } = this;\n this.wrapper = model.get('wrapper');\n $el.html(this.template());\n const $frames = $el.find('[data-frames]');\n this.framesArea = $frames.get(0);\n\n if (this.wrapper && typeof this.wrapper.render == 'function') {\n model.get('frame').set('wrapper', this.wrapper);\n $frames.append(this.frame.render().el);\n var frame = this.frame;\n if (this.config.scripts.length === 0) {\n frame.el.onload = this.renderBody;\n } else {\n this.renderScripts(); // will call renderBody later\n }\n }\n $el.find('[data-tools]').append(`\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n `);\n const toolsEl = el.querySelector(`#${ppfx}tools`);\n this.hlEl = el.querySelector(`.${ppfx}highlighter`);\n this.badgeEl = el.querySelector(`.${ppfx}badge`);\n this.placerEl = el.querySelector(`.${ppfx}placeholder`);\n this.ghostEl = el.querySelector(`.${ppfx}ghost`);\n this.toolbarEl = el.querySelector(`.${ppfx}toolbar`);\n this.resizerEl = el.querySelector(`.${ppfx}resizer`);\n this.offsetEl = el.querySelector(`.${ppfx}offset-v`);\n this.fixedOffsetEl = el.querySelector(`.${ppfx}offset-fixed-v`);\n this.toolsEl = toolsEl;\n this.el.className = this.className;\n return this;\n }\n});\n","/*\n This class makes the canvas droppable\n */\n\nimport { on } from 'utils/mixins';\nimport { bindAll, indexOf } from 'underscore';\n\nexport default class Droppable {\n constructor(em) {\n this.em = em;\n const el = em\n .get('DomComponents')\n .getWrapper()\n .getEl();\n this.el = el;\n this.counter = 0;\n bindAll(\n this,\n 'handleDragEnter',\n 'handleDragOver',\n 'handleDrop',\n 'handleDragLeave'\n );\n on(el, 'dragenter', this.handleDragEnter);\n on(el, 'dragover', this.handleDragOver);\n on(el, 'drop', this.handleDrop);\n on(el, 'dragleave', this.handleDragLeave);\n\n return this;\n }\n\n endDrop(cancel, ev) {\n const { em, dragStop } = this;\n this.counter = 0;\n this.over = 0;\n dragStop && dragStop(cancel);\n em.runDefault({ preserveSelected: 1 });\n em.trigger('canvas:dragend', ev);\n }\n\n handleDragLeave(ev) {\n this.updateCounter(-1, ev);\n }\n\n updateCounter(value, ev) {\n this.counter += value;\n this.counter === 0 && this.endDrop(1, ev);\n }\n\n handleDragEnter(ev) {\n const { em } = this;\n const dt = ev.dataTransfer;\n this.updateCounter(1, ev);\n if (this.over) return;\n this.over = 1;\n const utils = em.get('Utils');\n const canvas = em.get('Canvas');\n const container = canvas.getBody();\n // For security reason I can't read the drag data on dragenter, but\n // as I need it for the Sorter context I will use `dragContent` or just\n // any not empty element\n let content = em.get('dragContent') || '
';\n let dragStop, dragContent;\n em.stopDefault();\n\n if (em.inAbsoluteMode()) {\n const wrapper = em.get('DomComponents').getWrapper();\n const target = wrapper.append({})[0];\n const dragger = em.get('Commands').run('core:component-drag', {\n event: ev,\n guidesInfo: 1,\n center: 1,\n target,\n onEnd: (ev, dragger, { cancelled }) => {\n if (!cancelled) {\n const comp = wrapper.append(content)[0];\n const { left, top, position } = target.getStyle();\n comp.setStyle({ left, top, position });\n this.handleDragEnd(comp, dt);\n }\n target.remove();\n }\n });\n dragStop = cancel => dragger.stop(ev, { cancel });\n dragContent = cnt => (content = cnt);\n } else {\n const sorter = new utils.Sorter({\n em,\n wmargin: 1,\n nested: 1,\n canvasRelative: 1,\n direction: 'a',\n container,\n placer: canvas.getPlacerEl(),\n containerSel: '*',\n itemSel: '*',\n pfx: 'gjs-',\n onEndMove: model => this.handleDragEnd(model, dt),\n document: canvas.getFrameEl().contentDocument\n });\n sorter.setDropContent(content);\n sorter.startSort();\n this.sorter = sorter;\n dragStop = cancel => {\n cancel && (sorter.moved = 0);\n sorter.endMove();\n };\n dragContent = content => sorter.setDropContent(content);\n }\n\n this.dragStop = dragStop;\n this.dragContent = dragContent;\n em.trigger('canvas:dragenter', dt, content);\n }\n\n handleDragEnd(model, dt) {\n if (!model) return;\n const { em } = this;\n em.set('dragResult', model);\n em.trigger('canvas:drop', dt, model);\n }\n\n /**\n * Always need to have this handler active for enabling the drop\n * @param {Event} ev\n */\n handleDragOver(ev) {\n ev.preventDefault();\n this.em.trigger('canvas:dragover', ev);\n }\n\n handleDrop(ev) {\n ev.preventDefault();\n const { dragContent } = this;\n const dt = ev.dataTransfer;\n const content = this.getContentByData(dt).content;\n ev.target.style.border = '';\n content && dragContent && dragContent(content);\n this.endDrop(!content, ev);\n }\n\n getContentByData(dataTransfer) {\n const em = this.em;\n const types = dataTransfer.types;\n const files = dataTransfer.files || [];\n const dragContent = em.get('dragContent');\n let content = dataTransfer.getData('text');\n\n if (files.length) {\n content = [];\n for (let i = 0; i < files.length; i++) {\n const file = files[i];\n const type = file.type.split('/')[0];\n\n if (type == 'image') {\n content.push({\n type,\n file,\n attributes: { alt: file.name }\n });\n }\n }\n } else if (dragContent) {\n content = dragContent;\n } else if (indexOf(types, 'text/html') >= 0) {\n content = dataTransfer\n .getData('text/html')\n .replace(/<\\/?meta[^>]*>/g, '');\n } else if (indexOf(types, 'text/uri-list') >= 0) {\n content = {\n type: 'link',\n attributes: { href: content },\n content: content\n };\n } else if (indexOf(types, 'text/json') >= 0) {\n const json = dataTransfer.getData('text/json');\n json && (content = JSON.parse(json));\n }\n\n const result = { content };\n em.trigger('canvas:dragdata', dataTransfer, result);\n\n return result;\n }\n}\n","export default {\n stylePrefix: 'cv-',\n\n /*\n * Append external scripts to the `` of the iframe.\n * Be aware that these scripts will not be printed in the export code\n * @example\n * scripts: [ 'https://...1.js', 'https://...2.js' ]\n */\n scripts: [],\n\n /*\n * Append external styles to the `` of the iframe\n * Be aware that these styles will not be printed in the export code\n * @example\n * styles: [ 'https://...1.css', 'https://...2.css' ]\n */\n styles: [],\n\n /**\n * Add custom badge naming strategy\n * @example\n * customBadgeLabel: function(component) {\n * return component.getName();\n * }\n */\n customBadgeLabel: '',\n\n /**\n * Indicate when to start the auto scroll of the canvas on component/block dragging (value in px )\n */\n autoscrollLimit: 50,\n\n /**\n * When some textable component is selected and focused (eg. input or text component) the editor\n * stops some commands (eg. disables the copy/paste of components with CTRL+C/V to allow the copy/paste of the text).\n * This option allows to customize, by a selector, which element should not be considered textable\n */\n notTextable: ['button', 'a', 'input[type=checkbox]', 'input[type=radio]']\n};\n","import Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n defaults: {\n wrapper: '',\n width: '',\n height: '',\n head: '',\n attributes: {}\n },\n\n initialize() {\n this.set('head', []);\n },\n\n getHead() {\n return [...this.get('head')];\n },\n\n setHead(value) {\n return this.set('head', [...value]);\n },\n\n addHeadItem(item) {\n const head = this.getHead();\n head.push(item);\n this.setHead(head);\n },\n\n getHeadByAttr(attr, value, tag) {\n const head = this.getHead();\n return head.filter(\n item =>\n item.attributes &&\n item.attributes[attr] == value &&\n (!tag || tag === item.tag)\n )[0];\n },\n\n removeHeadByAttr(attr, value, tag) {\n const head = this.getHead();\n const item = this.getHeadByAttr(attr, value, tag);\n const index = head.indexOf(item);\n\n if (index >= 0) {\n head.splice(index, 1);\n this.setHead(head);\n }\n },\n\n addLink(href) {\n const tag = 'link';\n !this.getHeadByAttr('href', href, tag) &&\n this.addHeadItem({\n tag,\n attributes: {\n href,\n rel: 'stylesheet'\n }\n });\n },\n\n removeLink(href) {\n this.removeHeadByAttr('href', href, 'link');\n },\n\n addScript(src) {\n const tag = 'script';\n !this.getHeadByAttr('src', src, tag) &&\n this.addHeadItem({\n tag,\n attributes: { src }\n });\n },\n\n removeScript(src) {\n this.removeHeadByAttr('src', src, 'script');\n }\n});\n","import Backbone from 'backbone';\nimport Frame from './Frame';\n\nexport default Backbone.Model.extend({\n defaults: {\n frame: '',\n wrapper: '',\n rulers: false,\n zoom: 100,\n x: 0,\n y: 0\n },\n\n initialize(config = {}) {\n const { styles = [], scripts = [] } = config;\n const frame = new Frame();\n styles.forEach(style => frame.addLink(style));\n scripts.forEach(script => frame.addScript(script));\n this.set('frame', frame);\n this.listenTo(this, 'change:zoom', this.onZoomChange);\n },\n\n onZoomChange() {\n const zoom = this.get('zoom');\n zoom < 1 && this.set('zoom', 1);\n }\n});\n","import Backbone from 'backbone';\nimport { bindAll } from 'underscore';\nimport { appendVNodes, empty } from 'utils/dom';\n\nconst motionsEv =\n 'transitionend oTransitionEnd transitionend webkitTransitionEnd';\n\nexport default Backbone.View.extend({\n tagName: 'iframe',\n\n attributes: {\n allowfullscreen: 'allowfullscreen'\n },\n\n initialize(o) {\n bindAll(this, 'updateOffset');\n this.config = o.config || {};\n this.ppfx = this.config.pStylePrefix || '';\n this.em = this.config.em;\n this.listenTo(this.model, 'change:head', this.updateHead);\n this.listenTo(this.em, 'change:device', this.updateDim);\n },\n\n /**\n * Update `` content of the frame\n */\n updateHead() {\n const headEl = this.getHead();\n empty(headEl);\n appendVNodes(headEl, this.model.getHead());\n },\n\n /**\n * Update dimensions of the frame\n * @private\n */\n updateDim() {\n const { em, el, $el } = this;\n const { style } = el;\n const device = em.getDeviceModel();\n const currW = style.width || '';\n const currH = style.height || '';\n const newW = device ? device.get('width') : '';\n const newH = device ? device.get('height') : '';\n const noChanges = currW == newW && currH == newH;\n style.width = newW;\n style.height = newH;\n this.updateOffset();\n // Prevent fixed highlighting box which appears when on\n // component hover during the animation\n em.stopDefault({ preserveSelected: 1 });\n noChanges ? this.updateOffset() : $el.on(motionsEv, this.updateOffset);\n },\n\n updateOffset() {\n const em = this.em;\n const offset = em.get('Canvas').getOffset();\n em.set('canvasOffset', offset);\n em.runDefault({ preserveSelected: 1 });\n this.$el.off(motionsEv, this.updateOffset);\n },\n\n getDoc() {\n return this.$el.get(0).contentDocument;\n },\n\n getHead() {\n return this.getDoc().querySelector('head');\n },\n\n getBody() {\n return this.getDoc().querySelector('body');\n },\n\n getWrapper() {\n return this.$el.contents().find('body > div');\n },\n\n render() {\n this.$el.attr({ class: this.ppfx + 'frame' });\n return this;\n }\n});\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/canvas/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * canvas: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const canvas = editor.Canvas;\n * ```\n *\n * * [getConfig](#getconfig)\n * * [getElement](#getelement)\n * * [getFrameEl](#getframeel)\n * * [getWindow](#getwindow)\n * * [getDocument](#getdocument)\n * * [getBody](#getbody)\n * * [getWrapperEl](#getwrapperel)\n * * [setCustomBadgeLabel](#setcustombadgelabel)\n * * [hasFocus](#hasfocus)\n * * [scrollTo](#scrollto)\n * * [setZoom](#setzoom)\n * * [getZoom](#getzoom)\n *\n * @module Canvas\n */\n\nimport { on, off, hasDnd, getElement, getPointerEvent } from 'utils/mixins';\nimport Droppable from 'utils/Droppable';\nimport defaults from './config/config';\nimport Canvas from './model/Canvas';\nimport canvasView from './view/CanvasView';\n\nconst { requestAnimationFrame } = window;\n\nexport default () => {\n let c = {};\n let canvas;\n let frameRect;\n let CanvasView;\n\n return {\n /**\n * Used inside RTE\n * @private\n */\n getCanvasView() {\n return CanvasView;\n },\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Canvas',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config = {}) {\n c = {\n ...defaults,\n ...config\n };\n\n this.em = c.em;\n const ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n canvas = new Canvas(config);\n CanvasView = new canvasView({\n model: canvas,\n config: c\n });\n\n var cm = c.em.get('DomComponents');\n if (cm) this.setWrapper(cm);\n\n this.startAutoscroll = this.startAutoscroll.bind(this);\n this.stopAutoscroll = this.stopAutoscroll.bind(this);\n this.autoscroll = this.autoscroll.bind(this);\n this.updateClientY = this.updateClientY.bind(this);\n return this;\n },\n\n /**\n * Get the configuration object\n * @return {Object}\n */\n getConfig() {\n return c;\n },\n\n /**\n * Add wrapper\n * @param\t{Object}\twrp Wrapper\n * @private\n * */\n setWrapper(wrp) {\n canvas.set('wrapper', wrp);\n },\n\n /**\n * Get the canvas element\n * @return {HTMLElement}\n */\n getElement() {\n return CanvasView.el;\n },\n\n getFrame() {\n return canvas.get('frame');\n },\n\n /**\n * Get the iframe element of the canvas\n * @return {HTMLIFrameElement}\n */\n getFrameEl() {\n return CanvasView.frame.el;\n },\n\n /**\n * Get the window instance of the iframe element\n * @return {Window}\n */\n getWindow() {\n return this.getFrameEl().contentWindow;\n },\n\n /**\n * Get the document of the iframe element\n * @return {HTMLDocument}\n */\n getDocument() {\n return this.getFrameEl().contentDocument;\n },\n\n /**\n * Get the body of the iframe element\n * @return {HTMLBodyElement}\n */\n getBody() {\n const doc = this.getDocument();\n return doc && doc.body;\n },\n\n /**\n * Get the wrapper element containing all the components\n * @return {HTMLElement}\n */\n getWrapperEl() {\n const body = this.getBody();\n return body && body.querySelector('#wrapper');\n },\n\n /**\n * Returns element containing all canvas tools\n * @return {HTMLElement}\n * @private\n */\n getToolsEl() {\n return CanvasView.toolsEl;\n },\n\n /**\n * Returns highlighter element\n * @return {HTMLElement}\n * @private\n */\n getHighlighter() {\n return CanvasView.hlEl;\n },\n\n /**\n * Returns badge element\n * @return {HTMLElement}\n * @private\n */\n getBadgeEl() {\n return CanvasView.badgeEl;\n },\n\n /**\n * Returns placer element\n * @return {HTMLElement}\n * @private\n */\n getPlacerEl() {\n return CanvasView.placerEl;\n },\n\n /**\n * Returns ghost element\n * @return {HTMLElement}\n * @private\n */\n getGhostEl() {\n return CanvasView.ghostEl;\n },\n\n /**\n * Returns toolbar element\n * @return {HTMLElement}\n * @private\n */\n getToolbarEl() {\n return CanvasView.toolbarEl;\n },\n\n /**\n * Returns resizer element\n * @return {HTMLElement}\n * @private\n */\n getResizerEl() {\n return CanvasView.resizerEl;\n },\n\n /**\n * Returns offset viewer element\n * @return {HTMLElement}\n * @private\n */\n getOffsetViewerEl() {\n return CanvasView.offsetEl;\n },\n\n /**\n * Returns fixed offset viewer element\n * @return {HTMLElement}\n * @private\n */\n getFixedOffsetViewerEl() {\n return CanvasView.fixedOffsetEl;\n },\n\n /**\n * Render canvas\n * @private\n * */\n render() {\n return CanvasView.render().el;\n },\n\n /**\n * Get frame position\n * @return {Object}\n * @private\n */\n getOffset() {\n var frameOff = this.offset(this.getFrameEl());\n var canvasOff = this.offset(this.getElement());\n return {\n top: frameOff.top - canvasOff.top,\n left: frameOff.left - canvasOff.left\n };\n },\n\n /**\n * Get the offset of the passed component element\n * @param {HTMLElement} el\n * @return {Object}\n * @private\n */\n offset(el) {\n return CanvasView.offset(el);\n },\n\n /**\n * Set custom badge naming strategy\n * @param {Function} f\n * @example\n * canvas.setCustomBadgeLabel(function(component){\n * return component.getName();\n * });\n */\n setCustomBadgeLabel(f) {\n c.customBadgeLabel = f;\n },\n\n /**\n * Get element position relative to the canvas\n * @param {HTMLElement} el\n * @return {Object}\n * @private\n */\n getElementPos(el, opts) {\n return CanvasView.getElementPos(el, opts);\n },\n\n /**\n * Returns element's offsets like margins and paddings\n * @param {HTMLElement} el\n * @return {Object}\n * @private\n */\n getElementOffsets(el) {\n return CanvasView.getElementOffsets(el);\n },\n\n /**\n * Get canvas rectangular data\n * @returns {Object}\n */\n getRect() {\n const { top, left } = CanvasView.getPosition();\n return {\n ...CanvasView.getCanvasOffset(),\n topScroll: top,\n leftScroll: left\n };\n },\n\n /**\n * This method comes handy when you need to attach something like toolbars\n * to elements inside the canvas, dealing with all relative position,\n * offsets, etc. and returning as result the object with positions which are\n * viewable by the user (when the canvas is scrolled the top edge of the element\n * is not viewable by the user anymore so the new top edge is the one of the canvas)\n *\n * The target should be visible before being passed here as invisible elements\n * return empty string as width\n * @param {HTMLElement} target The target in this case could be the toolbar\n * @param {HTMLElement} element The element on which I'd attach the toolbar\n * @param {Object} options Custom options\n * @param {Boolean} options.toRight Set to true if you want the toolbar attached to the right\n * @return {Object}\n * @private\n */\n getTargetToElementDim(target, element, options = {}) {\n var opts = options || {};\n var canvasPos = CanvasView.getPosition();\n if (!canvasPos) return;\n var pos = opts.elPos || CanvasView.getElementPos(element);\n var toRight = options.toRight || 0;\n var targetHeight = opts.targetHeight || target.offsetHeight;\n var targetWidth = opts.targetWidth || target.offsetWidth;\n var eventToTrigger = opts.event || null;\n\n var elTop = pos.top - targetHeight;\n var elLeft = pos.left;\n elLeft += toRight ? pos.width : 0;\n elLeft = toRight ? elLeft - targetWidth : elLeft;\n\n var leftPos = elLeft < canvasPos.left ? canvasPos.left : elLeft;\n var topPos = elTop < canvasPos.top ? canvasPos.top : elTop;\n topPos = topPos > pos.top + pos.height ? pos.top + pos.height : topPos;\n\n var result = {\n top: topPos,\n left: leftPos,\n elementTop: pos.top,\n elementLeft: pos.left,\n elementWidth: pos.width,\n elementHeight: pos.height,\n targetWidth: target.offsetWidth,\n targetHeight: target.offsetHeight,\n canvasTop: canvasPos.top,\n canvasLeft: canvasPos.left,\n canvasWidth: canvasPos.width,\n canvasHeight: canvasPos.height\n };\n\n // In this way I can catch data and also change the position strategy\n if (eventToTrigger && c.em) {\n c.em.trigger(eventToTrigger, result);\n }\n\n return result;\n },\n\n /**\n * Instead of simply returning e.clientX and e.clientY this function\n * calculates also the offset based on the canvas. This is helpful when you\n * need to get X and Y position while moving between the editor area and\n * canvas area, which is in the iframe\n * @param {Event} e\n * @return {Object}\n * @private\n */\n getMouseRelativePos(e, options) {\n var opts = options || {};\n var addTop = 0;\n var addLeft = 0;\n var subWinOffset = opts.subWinOffset;\n var doc = e.target.ownerDocument;\n var win = doc.defaultView || doc.parentWindow;\n var frame = win.frameElement;\n var yOffset = subWinOffset ? win.pageYOffset : 0;\n var xOffset = subWinOffset ? win.pageXOffset : 0;\n\n if (frame) {\n var frameRect = frame.getBoundingClientRect();\n addTop = frameRect.top || 0;\n addLeft = frameRect.left || 0;\n }\n\n return {\n y: e.clientY + addTop - yOffset,\n x: e.clientX + addLeft - xOffset\n };\n },\n\n /**\n * X and Y mouse position relative to the canvas\n * @param {Event} ev\n * @return {Object}\n * @private\n */\n getMouseRelativeCanvas(ev) {\n const zoom = this.getZoomDecimal();\n const { top, left } = CanvasView.getPosition();\n\n return {\n y: ev.clientY * zoom + top,\n x: ev.clientX * zoom + left\n };\n },\n\n /**\n * Check if the canvas is focused\n * @return {Boolean}\n */\n hasFocus() {\n return this.getDocument().hasFocus();\n },\n\n /**\n * Detects if some input is focused (input elements, text components, etc.)\n * @return {Boolean}\n * @private\n */\n isInputFocused() {\n const doc = this.getDocument();\n const toIgnore = ['body', ...this.getConfig().notTextable];\n const focused = doc && doc.activeElement;\n\n return focused && !toIgnore.some(item => focused.matches(item));\n },\n\n /**\n * Scroll canvas to the element if it's not visible. The scrolling is\n * executed via `scrollIntoView` API and options of this method are\n * passed to it. For instance, you can scroll smoothly by using\n * `{ behavior: 'smooth' }`.\n * @param {HTMLElement|Component} el\n * @param {Object} [opts={}] Options, same as options for `scrollIntoView`\n * @param {Boolean} [opts.force=false] Force the scroll, even if the element is already visible\n * @example\n * const selected = editor.getSelected();\n * // Scroll smoothly (this behavior can be polyfilled)\n * canvas.scrollTo(selected, { behavior: 'smooth' });\n * // Force the scroll, even if the element is alredy visible\n * canvas.scrollTo(selected, { force: true });\n */\n scrollTo(el, opts = {}) {\n const elem = getElement(el);\n const cv = this.getCanvasView();\n if (!elem) return;\n\n if (!cv.isElInViewport(elem) || opts.force) {\n const opt =\n typeof opts === 'object'\n ? opts\n : { behavior: 'smooth', block: 'nearest' };\n elem.scrollIntoView(opt);\n }\n },\n\n /**\n * Start autoscroll\n * @private\n */\n startAutoscroll() {\n this.dragging = 1;\n let toListen = this.getScrollListeners();\n frameRect = CanvasView.getFrameOffset(1);\n\n // By detaching those from the stack avoid browsers lags\n // Noticeable with \"fast\" drag of blocks\n setTimeout(() => {\n on(toListen, 'mousemove dragover', this.updateClientY);\n on(toListen, 'mouseup', this.stopAutoscroll);\n requestAnimationFrame(this.autoscroll);\n }, 0);\n },\n\n updateClientY(ev) {\n ev.preventDefault();\n this.lastClientY = getPointerEvent(ev).clientY * this.getZoomDecimal();\n },\n\n /**\n * @private\n */\n autoscroll() {\n if (this.dragging) {\n let frameWindow = this.getFrameEl().contentWindow;\n let actualTop = frameWindow.document.body.scrollTop;\n let nextTop = actualTop;\n let clientY = this.lastClientY;\n let limitTop = this.getConfig().autoscrollLimit;\n let limitBottom = frameRect.height - limitTop;\n\n if (clientY < limitTop) {\n nextTop -= limitTop - clientY;\n }\n\n if (clientY > limitBottom) {\n nextTop += clientY - limitBottom;\n }\n\n frameWindow.scrollTo(0, nextTop);\n requestAnimationFrame(this.autoscroll);\n }\n },\n\n /**\n * Stop autoscroll\n * @private\n */\n stopAutoscroll() {\n this.dragging = 0;\n let toListen = this.getScrollListeners();\n off(toListen, 'mousemove dragover', this.updateClientY);\n off(toListen, 'mouseup', this.stopAutoscroll);\n },\n\n getScrollListeners() {\n return [this.getFrameEl().contentWindow];\n },\n\n postRender() {\n if (hasDnd(c.em)) this.droppable = new Droppable(c.em);\n },\n\n /**\n * Set zoom value\n * @param {Number} value The zoom value, from 0 to 100\n * @returns {this}\n */\n setZoom(value) {\n canvas.set('zoom', parseFloat(value));\n return this;\n },\n\n /**\n * Get zoom value\n * @returns {Number}\n */\n getZoom() {\n return parseFloat(canvas.get('zoom'));\n },\n\n getZoomDecimal() {\n return this.getZoom() / 100;\n },\n\n getZoomMultiplier() {\n const zoom = this.getZoomDecimal();\n return zoom ? 1 / zoom : 1;\n },\n\n /**\n * Returns wrapper element\n * @return {HTMLElement}\n * ????\n * @private\n */\n getFrameWrapperEl() {\n return CanvasView.frame.getWrapper();\n }\n };\n};\n","export default {\n // Style prefix\n stylePrefix: 'css-',\n\n // Custom CSS string to render on top\n staticRules: '',\n\n // Default CSS style\n rules: []\n};\n","import { map } from 'underscore';\nimport Backbone from 'backbone';\nimport Styleable from 'domain_abstract/model/Styleable';\nimport { isEmpty, forEach } from 'underscore';\nimport Selectors from 'selector_manager/model/Selectors';\n\nexport default Backbone.Model.extend(Styleable).extend({\n defaults: {\n // Css selectors\n selectors: {},\n\n // Additional string css selectors\n selectorsAdd: '',\n\n // Css properties style\n style: {},\n\n // On which device width this rule should be rendered, eg. @media (max-width: 1000px)\n mediaText: '',\n\n // State of the rule, eg: hover | pressed | focused\n state: '',\n\n // Indicates if the rule is stylable\n stylable: true,\n\n // Type of at-rule, eg. 'media', 'font-face', etc.\n atRuleType: '',\n\n // This particolar property is used only on at-rules, like 'page' or\n // 'font-face', where the block containes only style declarations\n singleAtRule: 0,\n\n // If true, sets '!important' on all properties\n // You can use an array to specify properties to set important\n // Used in view\n important: 0\n },\n\n initialize(c, opt = {}) {\n this.config = c || {};\n const em = opt.em;\n let selectors = this.config.selectors || [];\n this.em = em;\n\n if (em) {\n const sm = em.get('SelectorManager');\n const slct = [];\n selectors.forEach(selector => {\n slct.push(sm.add(selector));\n });\n selectors = slct;\n }\n\n this.set('selectors', new Selectors(selectors));\n },\n\n /**\n * Returns an at-rule statement if possible, eg. '@media (...)', '@keyframes'\n * @return {string}\n */\n getAtRule() {\n const type = this.get('atRuleType');\n const condition = this.get('mediaText');\n // Avoid breaks with the last condition\n const typeStr = type ? `@${type}` : condition ? '@media' : '';\n\n return typeStr + (condition && typeStr ? ` ${condition}` : '');\n },\n\n /**\n * Return selectors fo the rule as a string\n * @return {string}\n */\n selectorsToString(opts = {}) {\n const result = [];\n const { em } = this;\n const state = this.get('state');\n const wrapper = this.get('wrapper');\n const addSelector = this.get('selectorsAdd');\n const isBody = wrapper && em && em.getConfig('wrapperIsBody');\n const selectors = isBody ? 'body' : this.get('selectors').getFullString();\n const stateStr = state ? `:${state}` : '';\n selectors && result.push(`${selectors}${stateStr}`);\n addSelector && !opts.skipAdd && result.push(addSelector);\n return result.join(', ');\n },\n\n /**\n * Get declaration block\n * @param {Object} [opts={}] Options\n * @return {string}\n */\n getDeclaration(opts = {}) {\n let result = '';\n const selectors = this.selectorsToString();\n const style = this.styleToString(opts);\n const singleAtRule = this.get('singleAtRule');\n\n if ((selectors || singleAtRule) && style) {\n result = singleAtRule ? style : `${selectors}{${style}}`;\n }\n\n return result;\n },\n\n /**\n * Returns CSS string of the rule\n * @param {Object} [opts={}] Options\n * @return {string}\n */\n toCSS(opts = {}) {\n let result = '';\n const atRule = this.getAtRule();\n const block = this.getDeclaration(opts);\n block && (result = block);\n\n if (atRule && result) {\n result = `${atRule}{${result}}`;\n }\n\n return result;\n },\n\n toJSON(...args) {\n const obj = Backbone.Model.prototype.toJSON.apply(this, args);\n\n if (this.em.getConfig('avoidDefaults')) {\n const defaults = this.defaults;\n\n forEach(defaults, (value, key) => {\n if (obj[key] === value) {\n delete obj[key];\n }\n });\n\n if (isEmpty(obj.selectors)) delete obj.selectors;\n if (isEmpty(obj.style)) delete obj.style;\n }\n\n return obj;\n },\n\n /**\n * Compare the actual model with parameters\n * @param {Object} selectors Collection of selectors\n * @param {String} state Css rule state\n * @param {String} width For which device this style is oriented\n * @param {Object} ruleProps Other rule props\n * @return {Boolean}\n * @private\n */\n compare(selectors, state, width, ruleProps = {}) {\n var st = state || '';\n var wd = width || '';\n var selectorsAdd = ruleProps.selectorsAdd || '';\n var atRuleType = ruleProps.atRuleType || '';\n var cId = 'cid';\n //var a1 = _.pluck(selectors.models || selectors, cId);\n //var a2 = _.pluck(this.get('selectors').models, cId);\n if (!(selectors instanceof Array) && !selectors.models)\n selectors = [selectors];\n var a1 = map(selectors.models || selectors, model => model.get('name'));\n var a2 = map(this.get('selectors').models, model => model.get('name'));\n var f = false;\n\n if (a1.length !== a2.length) return f;\n\n for (var i = 0; i < a1.length; i++) {\n var re = 0;\n for (var j = 0; j < a2.length; j++) {\n if (a1[i] === a2[j]) re = 1;\n }\n if (re === 0) return f;\n }\n\n if (\n this.get('state') !== st ||\n this.get('mediaText') !== wd ||\n this.get('selectorsAdd') !== selectorsAdd ||\n this.get('atRuleType') !== atRuleType\n ) {\n return f;\n }\n\n return true;\n }\n});\n","import Backbone from 'backbone';\nimport CssRule from './CssRule';\n\nexport default Backbone.Collection.extend({\n initialize(models, opt) {\n // Inject editor\n if (opt && opt.em) this.editor = opt.em;\n\n // Not used\n this.model = (attrs, options) => {\n var model;\n\n if (!options.em && opt && opt.em) options.em = opt.em;\n\n switch (1) {\n default:\n model = new CssRule(attrs, options);\n }\n\n return model;\n };\n },\n\n add(models, opt = {}) {\n if (typeof models === 'string') {\n models = this.editor.get('Parser').parseCss(models);\n }\n opt.em = this.editor;\n return Backbone.Collection.prototype.add.apply(this, [models, opt]);\n }\n});\n","import Backbone from 'backbone';\n\nexport default Backbone.View.extend({\n tagName: 'style',\n\n initialize(o = {}) {\n this.config = o.config || {};\n const model = this.model;\n const toTrack = 'change:style change:state change:mediaText';\n this.listenTo(model, toTrack, this.render);\n this.listenTo(model, 'destroy remove', this.remove);\n this.listenTo(model.get('selectors'), 'change', this.render);\n },\n\n render() {\n const model = this.model;\n const important = model.get('important');\n this.el.innerHTML = this.model.toCSS({ important });\n return this;\n }\n});\n","import CssRuleView from './CssRuleView';\n\nexport default CssRuleView.extend({\n _createElement: function(tagName) {\n return document.createTextNode('');\n },\n\n render() {\n const model = this.model;\n const important = model.get('important');\n this.el.textContent = model.getDeclaration({ important });\n return this;\n }\n});\n","import Backbone from 'backbone';\nimport CssRuleView from './CssRuleView';\nimport CssGroupRuleView from './CssGroupRuleView';\n\nconst $ = Backbone.$;\n\nconst getBlockId = (pfx, order) =>\n `${pfx}${order ? `-${parseFloat(order)}` : ''}`;\n\nexport default Backbone.View.extend({\n initialize(o) {\n const config = o.config || {};\n this.atRules = {};\n this.config = config;\n this.em = config.em;\n this.pfx = config.stylePrefix || '';\n this.className = this.pfx + 'rules';\n const coll = this.collection;\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.render);\n },\n\n /**\n * Add to collection\n * @param {Object} model\n * @private\n * */\n addTo(model) {\n this.addToCollection(model);\n },\n\n /**\n * Add new object to collection\n * @param {Object} model\n * @param {Object} fragmentEl\n * @return {Object}\n * @private\n * */\n addToCollection(model, fragmentEl) {\n // If the render is not yet started\n if (!this.renderStarted) {\n return;\n }\n\n const fragment = fragmentEl || null;\n const { config } = this;\n const opts = { model, config };\n let rendered, view;\n\n // I have to render keyframes of the same name together\n // Unfortunately at the moment I didn't find the way of appending them\n // if not staticly, via appendData\n if (model.get('atRuleType') === 'keyframes') {\n const atRule = model.getAtRule();\n let atRuleEl = this.atRules[atRule];\n\n if (!atRuleEl) {\n const styleEl = document.createElement('style');\n atRuleEl = document.createTextNode('');\n styleEl.appendChild(document.createTextNode(`${atRule}{`));\n styleEl.appendChild(atRuleEl);\n styleEl.appendChild(document.createTextNode(`}`));\n this.atRules[atRule] = atRuleEl;\n rendered = styleEl;\n }\n\n view = new CssGroupRuleView(opts);\n atRuleEl.appendData(view.render().el.textContent);\n } else {\n view = new CssRuleView(opts);\n rendered = view.render().el;\n }\n\n const clsName = this.className;\n const mediaText = model.get('mediaText');\n const defaultBlockId = getBlockId(clsName);\n let blockId = defaultBlockId;\n\n // If the rule contains a media query it might have a different container\n // for it (eg. rules created with Device Manager)\n if (mediaText) {\n blockId = getBlockId(clsName, this.getMediaWidth(mediaText));\n }\n\n if (rendered) {\n const container = fragment || this.el;\n let contRules;\n\n // Try to find a specific container for the rule (if it\n // containes a media query), otherwise get the default one\n try {\n contRules = container.querySelector(`#${blockId}`);\n } catch (e) {}\n\n if (!contRules) {\n contRules = container.querySelector(`#${defaultBlockId}`);\n }\n\n contRules.appendChild(rendered);\n }\n\n return rendered;\n },\n\n getMediaWidth(mediaText) {\n return (\n mediaText &&\n mediaText\n .replace(`(${this.em.getConfig('mediaCondition')}: `, '')\n .replace(')', '')\n );\n },\n\n render() {\n this.renderStarted = 1;\n this.atRules = {};\n const { em, $el, className, collection } = this;\n const frag = document.createDocumentFragment();\n $el.empty();\n\n // Create devices related DOM structure, ensure also to have a default container\n const prs = em\n .get('DeviceManager')\n .getAll()\n .pluck('priority');\n prs.every(pr => pr) && prs.unshift(0);\n prs.forEach(pr =>\n $(`
`).appendTo(frag)\n );\n\n collection.each(model => this.addToCollection(model, frag));\n $el.append(frag);\n $el.attr('class', className);\n return this;\n }\n});\n","/**\n * This module contains and manage CSS rules for the template inside the canvas.\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/css_composer/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * cssComposer: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const cssComposer = editor.CssComposer;\n * ```\n *\n * * [load](#load)\n * * [store](#store)\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [clear](#clear)\n * * [setRule](#setrule)\n * * [getRule](#getrule)\n *\n * @module CssComposer\n */\n\nimport { isArray } from 'underscore';\nimport defaults from './config/config';\nimport CssRule from './model/CssRule';\nimport CssRules from './model/CssRules';\nimport CssRulesView from './view/CssRulesView';\nimport Selectors from 'selector_manager/model/Selectors';\nimport Selector from 'selector_manager/model/Selector';\n\nexport default () => {\n let em;\n var c = {};\n var rules, rulesView;\n\n return {\n Selectors,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'CssComposer',\n\n /**\n * Mandatory for the storage manager\n * @type {String}\n * @private\n */\n storageKey() {\n var keys = [];\n var smc = (c.stm && c.stm.getConfig()) || {};\n if (smc.storeCss) keys.push('css');\n if (smc.storeStyles) keys.push('styles');\n return keys;\n },\n\n /**\n * Initializes module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n var elStyle = (c.em && c.em.config.style) || '';\n c.rules = elStyle || c.rules;\n\n em = c.em;\n rules = new CssRules([], c);\n rulesView = new CssRulesView({\n collection: rules,\n config: c\n });\n return this;\n },\n\n /**\n * On load callback\n * @private\n */\n onLoad() {\n rules.add(c.rules);\n },\n\n /**\n * Do stuff after load\n * @param {Editor} em\n * @private\n */\n postLoad(em) {\n const ev = 'add remove';\n const rules = this.getAll();\n const um = em.get('UndoManager');\n um && um.add(rules);\n em.stopListening(rules, ev, this.handleChange);\n em.listenTo(rules, ev, this.handleChange);\n rules.each(rule => this.handleChange(rule, { avoidStore: 1 }));\n },\n\n /**\n * Handle rule changes\n * @private\n */\n handleChange(model, opts = {}) {\n const ev = 'change:style';\n const um = em.get('UndoManager');\n um && um.add(model);\n const handleUpdates = em.handleUpdates.bind(em);\n em.stopListening(model, ev, handleUpdates);\n em.listenTo(model, ev, handleUpdates);\n !opts.avoidStore && handleUpdates('', '', opts);\n },\n\n /**\n * Load data from the passed object, if the object is empty will try to fetch them\n * autonomously from the storage manager.\n * The fetched data will be added to the collection\n * @param {Object} data Object of data to load\n * @return {Object} Loaded rules\n */\n load(data) {\n var d = data || '';\n\n if (!d && c.stm) {\n d = c.em.getCacheLoad();\n }\n\n var obj = d.styles || '';\n\n if (d.styles) {\n try {\n obj = JSON.parse(d.styles);\n } catch (err) {}\n } else if (d.css) {\n obj = c.em.get('Parser').parseCss(d.css);\n }\n\n if (isArray(obj)) {\n obj.length && rules.reset(obj);\n } else if (obj) {\n rules.reset(obj);\n }\n\n return obj;\n },\n\n /**\n * Store data to the selected storage\n * @param {Boolean} noStore If true, won't store\n * @return {Object} Data to store\n */\n store(noStore) {\n if (!c.stm) return;\n var obj = {};\n var keys = this.storageKey();\n if (keys.indexOf('css') >= 0) obj.css = c.em.getCss();\n if (keys.indexOf('styles') >= 0) obj.styles = JSON.stringify(rules);\n if (!noStore) c.stm.store(obj);\n return obj;\n },\n\n /**\n * Add new rule to the collection, if not yet exists with the same selectors\n * @param {Array} selectors Array of selectors\n * @param {String} state Css rule state\n * @param {String} width For which device this style is oriented\n * @param {Object} opts Other options for the rule\n * @return {Model}\n * @example\n * var sm = editor.SelectorManager;\n * var sel1 = sm.add('myClass1');\n * var sel2 = sm.add('myClass2');\n * var rule = cssComposer.add([sel1, sel2], 'hover');\n * rule.set('style', {\n * width: '100px',\n * color: '#fff',\n * });\n * */\n add(selectors, state, width, opts = {}) {\n var s = state || '';\n var w = width || '';\n var opt = { ...opts };\n var rule = this.get(selectors, s, w, opt);\n\n // do not create rules that were found before\n // unless this is a single at-rule, for which multiple declarations\n // make sense (e.g. multiple `@font-type`s)\n if (rule && rule.config && !rule.config.singleAtRule) {\n return rule;\n } else {\n opt.state = s;\n opt.mediaText = w;\n opt.selectors = '';\n rule = new CssRule(opt, c);\n rule.get('selectors').add(selectors);\n rules.add(rule);\n return rule;\n }\n },\n\n /**\n * Get the rule\n * @param {Array} selectors Array of selectors\n * @param {String} state Css rule state\n * @param {String} width For which device this style is oriented\n * @param {Object} ruleProps Other rule props\n * @return {Model|null}\n * @example\n * var sm = editor.SelectorManager;\n * var sel1 = sm.add('myClass1');\n * var sel2 = sm.add('myClass2');\n * var rule = cssComposer.get([sel1, sel2], 'hover');\n * // Update the style\n * rule.set('style', {\n * width: '300px',\n * color: '#000',\n * });\n * */\n get(selectors, state, width, ruleProps) {\n var rule = null;\n rules.each(m => {\n if (rule) return;\n if (m.compare(selectors, state, width, ruleProps)) rule = m;\n });\n return rule;\n },\n\n /**\n * Get the collection of rules\n * @return {Collection}\n * */\n getAll() {\n return rules;\n },\n\n /**\n * Remove all rules\n * @return {this}\n */\n clear() {\n this.getAll().reset();\n return this;\n },\n\n /**\n * Add a raw collection of rule objects\n * This method overrides styles, in case, of already defined rule\n * @param {Array} data Array of rule objects, eg . [{selectors: ['class1'], style: {....}}, ..]\n * @param {Object} opts Options\n * @return {Array}\n * @private\n */\n addCollection(data, opts = {}) {\n var result = [];\n var d = data instanceof Array ? data : [data];\n\n for (var i = 0, l = d.length; i < l; i++) {\n var rule = d[i] || {};\n if (!rule.selectors) continue;\n var sm = c.em && c.em.get('SelectorManager');\n if (!sm) console.warn('Selector Manager not found');\n var sl = rule.selectors;\n var sels = sl instanceof Array ? sl : [sl];\n var newSels = [];\n\n for (var j = 0, le = sels.length; j < le; j++) {\n var selec = sm.add(sels[j]);\n newSels.push(selec);\n }\n\n var modelExists = this.get(newSels, rule.state, rule.mediaText, rule);\n var model = this.add(newSels, rule.state, rule.mediaText, rule);\n var updateStyle = !modelExists || !opts.avoidUpdateStyle;\n const style = rule.style || {};\n\n if (updateStyle) {\n let styleUpdate = opts.extend\n ? { ...model.get('style'), ...style }\n : style;\n model.set('style', styleUpdate);\n }\n\n result.push(model);\n }\n\n return result;\n },\n\n /**\n * Add/update the CSS rule with a generic selector\n * @param {string} selectors Selector, eg. '.myclass'\n * @param {Object} style Style properties and values\n * @param {Object} [opts={}] Additional properties\n * @param {String} [opts.atRuleType=''] At-rule type, eg. 'media'\n * @param {String} [opts.atRuleParams=''] At-rule parameters, eg. '(min-width: 500px)'\n * @return {CssRule} The new/updated rule\n * @example\n * // Simple class-based rule\n * const rule = cc.setRule('.class1.class2', { color: 'red' });\n * console.log(rule.toCSS()) // output: .class1.class2 { color: red }\n * // With state and other mixed selector\n * const rule = cc.setRule('.class1.class2:hover, div#myid', { color: 'red' });\n * // output: .class1.class2:hover, div#myid { color: red }\n * // With media\n * const rule = cc.setRule('.class1:hover', { color: 'red' }, {\n * atRuleType: 'media',\n * atRuleParams: '(min-width: 500px)',\n * });\n * // output: @media (min-width: 500px) { .class1:hover { color: red } }\n */\n setRule(selectors, style, opts = {}) {\n const { atRuleType, atRuleParams } = opts;\n const node = em.get('Parser').parserCss.checkNode({\n selectors,\n style\n })[0];\n const { state, selectorsAdd } = node;\n const sm = em.get('SelectorManager');\n const selector = sm.add(node.selectors);\n const rule = this.add(selector, state, atRuleParams, {\n selectorsAdd,\n atRule: atRuleType\n });\n rule.setStyle(style, opts);\n return rule;\n },\n\n /**\n * Get the CSS rule by a generic selector\n * @param {string} selectors Selector, eg. '.myclass:hover'\n * @param {String} [opts.atRuleType=''] At-rule type, eg. 'media'\n * @param {String} [opts.atRuleParams=''] At-rule parameters, eg. '(min-width: 500px)'\n * @return {CssRule}\n * @example\n * const rule = cc.getRule('.myclass1:hover');\n * const rule2 = cc.getRule('.myclass1:hover, div#myid');\n * const rule3 = cc.getRule('.myclass1', {\n * atRuleType: 'media',\n * atRuleParams: '(min-width: 500px)',\n * });\n */\n getRule(selectors, opts = {}) {\n const sm = em.get('SelectorManager');\n const node = em.get('Parser').parserCss.checkNode({ selectors })[0];\n const selector = sm.get(node.selectors);\n const { state, selectorsAdd } = node;\n const { atRuleType, atRuleParams } = opts;\n return (\n selector &&\n this.get(selector, state, atRuleParams, {\n selectorsAdd,\n atRule: atRuleType\n })\n );\n },\n\n /**\n * Add/update the CSS rule with id selector\n * @param {string} name Id selector name, eg. 'my-id'\n * @param {Object} style Style properties and values\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule} The new/updated rule\n * @private\n * @example\n * const rule = cc.setIdRule('myid', { color: 'red' });\n * const ruleHover = cc.setIdRule('myid', { color: 'blue' }, { state: 'hover' });\n * // This will add current CSS:\n * // #myid { color: red }\n * // #myid:hover { color: blue }\n */\n setIdRule(name, style = {}, opts = {}) {\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const sm = em.get('SelectorManager');\n const selector = sm.add({ name, type: Selector.TYPE_ID });\n const rule = this.add(selector, state, media);\n rule.setStyle(style, opts);\n return rule;\n },\n\n /**\n * Get the CSS rule by id selector\n * @param {string} name Id selector name, eg. 'my-id'\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule}\n * @private\n * @example\n * const rule = cc.getIdRule('myid');\n * const ruleHover = cc.setIdRule('myid', { state: 'hover' });\n */\n getIdRule(name, opts = {}) {\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const selector = em.get('SelectorManager').get(name, Selector.TYPE_ID);\n return selector && this.get(selector, state, media);\n },\n\n /**\n * Add/update the CSS rule with class selector\n * @param {string} name Class selector name, eg. 'my-class'\n * @param {Object} style Style properties and values\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule} The new/updated rule\n * @private\n * @example\n * const rule = cc.setClassRule('myclass', { color: 'red' });\n * const ruleHover = cc.setClassRule('myclass', { color: 'blue' }, { state: 'hover' });\n * // This will add current CSS:\n * // .myclass { color: red }\n * // .myclass:hover { color: blue }\n */\n setClassRule(name, style = {}, opts = {}) {\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const sm = em.get('SelectorManager');\n const selector = sm.add({ name, type: Selector.TYPE_CLASS });\n const rule = this.add(selector, state, media);\n rule.setStyle(style, opts);\n return rule;\n },\n\n /**\n * Get the CSS rule by class selector\n * @param {string} name Class selector name, eg. 'my-class'\n * @param {Object} [opts={}] Custom options, like `state` and `mediaText`\n * @return {CssRule}\n * @private\n * @example\n * const rule = cc.getClassRule('myclass');\n * const ruleHover = cc.getClassRule('myclass', { state: 'hover' });\n */\n getClassRule(name, opts = {}) {\n const state = opts.state || '';\n const media = opts.mediaText || em.getCurrentMedia();\n const selector = em.get('SelectorManager').get(name, Selector.TYPE_CLASS);\n return selector && this.get(selector, state, media);\n },\n\n /**\n * Render the block of CSS rules\n * @return {HTMLElement}\n * @private\n */\n render() {\n return rulesView.render().el;\n }\n };\n};\n","export default {\n devices: []\n};\n","import Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n idAttribute: 'name',\n\n defaults: {\n name: '',\n\n // Width to set for the editor iframe\n width: null,\n\n // Height to set for the editor iframe\n height: '',\n\n // The width which will be used in media queries,\n // If empty the width will be used\n widthMedia: null,\n\n // Setup the order of media queries\n priority: null\n },\n\n initialize() {\n this.get('widthMedia') === null &&\n this.set('widthMedia', this.get('width'));\n this.get('width') === null && this.set('width', this.get('widthMedia'));\n !this.get('priority') &&\n this.set('priority', parseFloat(this.get('widthMedia')) || 0);\n const toCheck = ['width', 'height', 'widthMedia'];\n toCheck.forEach(prop => this.checkUnit(prop));\n },\n\n checkUnit(prop) {\n const pr = this.get(prop) || '';\n const noUnit = (parseFloat(pr) || 0).toString() === pr.toString();\n noUnit && this.set(prop, `${pr}px`);\n }\n});\n","import Backbone from 'backbone';\nimport Device from './Device';\n\nexport default Backbone.Collection.extend({\n model: Device,\n\n comparator: (left, right) => {\n const max = Number.MAX_VALUE;\n return (right.get('priority') || max) - (left.get('priority') || max);\n },\n\n getSorted() {\n return this.sort();\n }\n});\n","import { template } from 'underscore';\nimport Backbone from 'backbone';\n\nexport default Backbone.View.extend({\n template: template(`\n
device-label\"><%= deviceLabel %>
\n
field <%= ppfx %>select\">\n input-holder\">\n \n \n
sel-arrow\">\n
d-s-arrow\">
\n
\n
\n `),\n\n events: {\n change: 'updateDevice'\n },\n\n initialize(o) {\n this.config = o.config || {};\n this.em = this.config.em;\n this.ppfx = this.config.pStylePrefix || '';\n this.events['click .' + this.ppfx + 'add-trasp'] = this.startAdd;\n this.listenTo(this.em, 'change:device', this.updateSelect);\n this.delegateEvents();\n },\n\n /**\n * Start adding new device\n * @return {[type]} [description]\n * @private\n */\n startAdd() {},\n\n /**\n * Update device of the editor\n * @private\n */\n updateDevice() {\n var em = this.em;\n if (em) {\n var devEl = this.devicesEl;\n var val = devEl ? devEl.val() : '';\n em.set('device', val);\n }\n },\n\n /**\n * Update select value on device update\n * @private\n */\n updateSelect() {\n var em = this.em;\n var devEl = this.devicesEl;\n if (em && em.getDeviceModel && devEl) {\n var device = em.getDeviceModel();\n var name = device ? device.get('name') : '';\n devEl.val(name);\n }\n },\n\n /**\n * Return devices options\n * @return {string} String of options\n * @private\n */\n getOptions() {\n const { collection, em } = this;\n let result = '';\n\n collection.each(device => {\n const { name, id } = device.attributes;\n const label = (em && em.t && em.t(`deviceManager.devices.${id}`)) || name;\n result += ``;\n });\n\n return result;\n },\n\n render() {\n const { em, ppfx, $el, el } = this;\n $el.html(\n this.template({\n ppfx,\n deviceLabel: em && em.t && em.t('deviceManager.device')\n })\n );\n this.devicesEl = $el.find(`.${ppfx}devices`);\n this.devicesEl.append(this.getOptions());\n el.className = `${ppfx}devices-c`;\n return this;\n }\n});\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/device_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * deviceManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const deviceManager = editor.DeviceManager;\n * ```\n *\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getAll)\n *\n * @module DeviceManager\n */\nimport defaults from './config/config';\nimport Devices from './model/Devices';\nimport DevicesView from './view/DevicesView';\n\nexport default () => {\n var c = {};\n var devices, view;\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'DeviceManager',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @param {Array} [config.devices=[]] Default devices\n * @example\n * ...\n * {\n * devices: [\n * {name: 'Desktop', width: ''}\n * {name: 'Tablet', width: '991px'}\n * ],\n * }\n * ...\n * @return {this}\n * @private\n */\n init(config) {\n c = config || {};\n for (var name in defaults) {\n if (!(name in c)) c[name] = defaults[name];\n }\n\n devices = new Devices();\n (c.devices || []).forEach(dv => this.add(dv.id || dv.name, dv.width, dv));\n view = new DevicesView({\n collection: devices,\n config: c\n });\n return this;\n },\n\n /**\n * Add new device to the collection. URLs are supposed to be unique\n * @param {String} id Device id\n * @param {String} width Width of the device\n * @param {Object} [opts] Custom options\n * @returns {Device} Added device\n * @example\n * deviceManager.add('tablet', '900px');\n * deviceManager.add('tablet2', '900px', {\n * height: '300px',\n * // At first, GrapesJS tries to localize the name by device id.\n * // In case is not found, the `name` property is used (or `id` if name is missing)\n * name: 'Tablet 2',\n * widthMedia: '810px', // the width that will be used for the CSS media\n * });\n */\n add(id, width, opts = {}) {\n const obj = {\n ...opts,\n id,\n name: opts.name || id,\n width: width\n };\n return devices.add(obj);\n },\n\n /**\n * Return device by name\n * @param {string} name Name of the device\n * @example\n * var device = deviceManager.get('Tablet');\n * console.log(JSON.stringify(device));\n * // {name: 'Tablet', width: '900px'}\n */\n get(name) {\n return devices.get(name);\n },\n\n /**\n * Return all devices\n * @return {Collection}\n * @example\n * var devices = deviceManager.getAll();\n * console.log(JSON.stringify(devices));\n * // [{name: 'Desktop', width: ''}, ...]\n */\n getAll() {\n return devices;\n },\n\n /**\n * Render devices\n * @return {string} HTML string\n * @private\n */\n render() {\n return view.render().el;\n }\n };\n};\n","export default {\n stylePrefix: 'mdl-',\n\n title: '',\n\n content: '',\n\n backdrop: true\n};\n","import Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n defaults: {\n title: '',\n content: '',\n open: false\n }\n});\n","import Backbone from 'backbone';\n\nexport default Backbone.View.extend({\n template({ pfx, ppfx, content, title }) {\n return `
\n
\n
${title}
\n
\n
\n
\n
${content}
\n
\n
\n
\n
`;\n },\n\n events: {\n click: 'onClick',\n 'click [data-close-modal]': 'hide'\n },\n\n initialize(o) {\n const model = this.model;\n const config = o.config || {};\n const pfx = config.stylePrefix || '';\n this.config = config;\n this.pfx = pfx;\n this.ppfx = config.pStylePrefix || '';\n this.listenTo(model, 'change:open', this.updateOpen);\n this.listenTo(model, 'change:title', this.updateTitle);\n this.listenTo(model, 'change:content', this.updateContent);\n },\n\n onClick(e) {\n const bkd = this.config.backdrop;\n bkd && e.target === this.el && this.hide();\n },\n\n /**\n * Returns collector element\n * @return {HTMLElement}\n * @private\n */\n getCollector() {\n if (!this.$collector)\n this.$collector = this.$el.find('.' + this.pfx + 'collector');\n return this.$collector;\n },\n\n /**\n * Returns content element\n * @return {HTMLElement}\n * @private\n */\n getContent() {\n const pfx = this.pfx;\n\n if (!this.$content) {\n this.$content = this.$el.find(`.${pfx}content #${pfx}c`);\n }\n\n return this.$content;\n },\n\n /**\n * Returns title element\n * @return {HTMLElement}\n * @private\n */\n getTitle() {\n if (!this.$title) this.$title = this.$el.find('.' + this.pfx + 'title');\n return this.$title.get(0);\n },\n\n /**\n * Update content\n * @private\n * */\n updateContent() {\n var content = this.getContent();\n const children = content.children();\n const coll = this.getCollector();\n const body = this.model.get('content');\n children.length && coll.append(children);\n content.empty().append(body);\n },\n\n /**\n * Update title\n * @private\n * */\n updateTitle() {\n var title = this.getTitle();\n if (title) title.innerHTML = this.model.get('title');\n },\n\n /**\n * Update open\n * @private\n * */\n updateOpen() {\n this.el.style.display = this.model.get('open') ? '' : 'none';\n },\n\n /**\n * Hide modal\n * @private\n * */\n hide() {\n this.model.set('open', 0);\n },\n\n /**\n * Show modal\n * @private\n * */\n show() {\n this.model.set('open', 1);\n },\n\n render() {\n const el = this.$el;\n const pfx = this.pfx;\n const ppfx = this.ppfx;\n const obj = this.model.toJSON();\n obj.pfx = this.pfx;\n obj.ppfx = this.ppfx;\n el.html(this.template(obj));\n el.attr('class', `${pfx}container`);\n this.updateOpen();\n return this;\n }\n});\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/modal_dialog/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * modal: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const modal = editor.Modal;\n * ```\n *\n * * [open](#open)\n * * [close](#close)\n * * [isOpen](#isopen)\n * * [setTitle](#settitle)\n * * [getTitle](#gettitle)\n * * [setContent](#setcontent)\n * * [getContent](#getcontent)\n * * [onceClose](#onceclose)\n * * [onceOpen](#onceopen)\n *\n * @module Modal\n */\n\nimport defaults from './config/config';\nimport ModalM from './model/Modal';\nimport ModalView from './view/ModalView';\n\nexport default () => {\n var c = {};\n var model, modal;\n\n const triggerEvent = (enable, em) => {\n em && em.trigger(`modal:${enable ? 'open' : 'close'}`);\n };\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Modal',\n\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config = {}) {\n c = {\n ...defaults,\n ...config\n };\n\n const em = c.em;\n this.em = em;\n var ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n model = new ModalM(c);\n model.on('change:open', (m, enb) => triggerEvent(enb, em));\n modal = new ModalView({\n model,\n config: c\n });\n\n return this;\n },\n\n postRender(view) {\n const el = view.model.getConfig().el || view.el;\n this.render().appendTo(el);\n },\n\n /**\n * Open the modal window\n * @param {Object} [opts={}] Options\n * @param {String|HTMLElement} [opts.title] Title to set for the modal\n * @param {String|HTMLElement} [opts.content] Content to set for the modal\n * @return {this}\n */\n open(opts = {}) {\n opts.title && this.setTitle(opts.title);\n opts.content && this.setContent(opts.content);\n modal.show();\n return this;\n },\n\n /**\n * Close the modal window\n * @return {this}\n */\n close() {\n modal.hide();\n return this;\n },\n\n /**\n * Execute callback when the modal will be closed.\n * The callback will be called one only time\n * @param {Function} clb\n * @returns {this}\n */\n onceClose(clb) {\n this.em.once('modal:close', clb);\n return this;\n },\n\n /**\n * Execute callback when the modal will be opened.\n * The callback will be called one only time\n * @param {Function} clb\n * @returns {this}\n */\n onceOpen(clb) {\n this.em.once('modal:open', clb);\n return this;\n },\n\n /**\n * Checks if the modal window is open\n * @return {Boolean}\n */\n isOpen() {\n return !!model.get('open');\n },\n\n /**\n * Set the title to the modal window\n * @param {string} title Title\n * @return {this}\n * @example\n * modal.setTitle('New title');\n */\n setTitle(title) {\n model.set('title', title);\n return this;\n },\n\n /**\n * Returns the title of the modal window\n * @return {string}\n */\n getTitle() {\n return model.get('title');\n },\n\n /**\n * Set the content of the modal window\n * @param {string|HTMLElement} content Content\n * @return {this}\n * @example\n * modal.setContent('
Some HTML content
');\n */\n setContent(content) {\n model.set('content', ' ');\n model.set('content', content);\n return this;\n },\n\n /**\n * Get the content of the modal window\n * @return {string}\n */\n getContent() {\n return model.get('content');\n },\n\n /**\n * Returns content element\n * @return {HTMLElement}\n * @private\n */\n getContentEl() {\n return modal.getContent().get(0);\n },\n\n /**\n * Returns modal model\n * @return {Model}\n * @private\n */\n getModel() {\n return model;\n },\n\n /**\n * Render the modal window\n * @return {HTMLElement}\n * @private\n */\n render() {\n return modal.render().$el;\n }\n };\n};\n","export default {\n textTags: ['br', 'b', 'i', 'u', 'a', 'ul', 'ol'],\n\n // Custom CSS parser\n parserCss: null,\n\n // Custom HTML parser\n parserHtml: null\n};\n","import { keys } from 'underscore';\n\n// At-rules\n// https://developer.mozilla.org/it/docs/Web/API/CSSRule#Type_constants\nconst atRules = {\n 4: 'media',\n 5: 'font-face',\n 6: 'page',\n 7: 'keyframes',\n 11: 'counter-style',\n 12: 'supports',\n 13: 'document',\n 14: 'font-feature-values',\n 15: 'viewport'\n};\nconst atRuleKeys = keys(atRules);\nconst singleAtRules = ['5', '6', '11', '15'];\nconst singleAtRulesNames = ['font-face', 'page', 'counter-style', 'viewport'];\n\n/**\n * Parse selector string to array.\n * Only classe based are valid as CSS rules inside editor, not valid\n * selectors will be dropped as additional\n * It's ok with the last part of the string as state (:hover, :active)\n * @param {string} str Selectors string\n * @return {Object}\n * @example\n * var res = parseSelector('.test1, .test1.test2, .test2 .test3');\n * console.log(res);\n * // {\n * //result: [['test1'], ['test1', 'test2']],\n * //add: ['.test2 .test3']\n * //}\n */\nexport const parseSelector = (str = '') => {\n const add = [];\n const result = [];\n const sels = str.split(',');\n\n for (var i = 0, len = sels.length; i < len; i++) {\n var sel = sels[i].trim();\n\n // Will accept only concatenated classes and last\n // class might be with state (eg. :hover), nothing else.\n // Can also accept SINGLE ID selectors, eg. `#myid`, `#myid:hover`\n // Composed are not valid: `#myid.some-class`, `#myid.some-class:hover`\n if (\n /^(\\.{1}[\\w\\-]+)+(:{1,2}[\\w\\-()]+)?$/gi.test(sel) ||\n /^(#{1}[\\w\\-]+){1}(:{1,2}[\\w\\-()]+)?$/gi.test(sel)\n ) {\n var cls = sel.split('.').filter(Boolean);\n result.push(cls);\n } else {\n add.push(sel);\n }\n }\n\n return {\n result,\n add\n };\n};\n\n/**\n * Parse style declarations of the node\n * @param {CSSRule} node\n * @return {Object}\n */\nexport const parseStyle = node => {\n const stl = node.style;\n const style = {};\n\n for (var i = 0, len = stl.length; i < len; i++) {\n const propName = stl[i];\n const propValue = stl.getPropertyValue(propName);\n const important = stl.getPropertyPriority(propName);\n style[propName] = `${propValue}${important ? ` !${important}` : ''}`;\n }\n\n return style;\n};\n\n/**\n * Get the condition when possible\n * @param {CSSRule} node\n * @return {string}\n */\nexport const parseCondition = node => {\n const condition =\n node.conditionText ||\n (node.media && node.media.mediaText) ||\n node.name ||\n node.selectorText ||\n '';\n return condition.trim();\n};\n\n/**\n * Create node for the editor\n * @param {Array} selectors Array containing strings of classes\n * @param {Object} style Key-value object of style declarations\n * @return {Object}\n */\nexport const createNode = (selectors, style = {}, opts = {}) => {\n const node = {};\n const selLen = selectors.length;\n const lastClass = selectors[selLen - 1];\n const stateArr = lastClass ? lastClass.split(/:(.+)/) : [];\n const state = stateArr[1];\n const { atRule, selectorsAdd, mediaText } = opts;\n const singleAtRule = singleAtRulesNames.indexOf(atRule) >= 0;\n singleAtRule && (node.singleAtRule = 1);\n atRule && (node.atRuleType = atRule);\n selectorsAdd && (node.selectorsAdd = selectorsAdd);\n mediaText && (node.mediaText = mediaText);\n\n // Isolate the state from selectors\n if (state) {\n selectors[selLen - 1] = stateArr[0];\n node.state = state;\n stateArr.splice(stateArr.length - 1, 1);\n }\n\n node.selectors = selectors;\n node.style = style;\n\n return node;\n};\n\n/**\n * Fetch data from node\n * @param {StyleSheet|CSSRule} el\n * @return {Array}\n */\nexport const parseNode = el => {\n var result = [];\n var nodes = el.cssRules || [];\n\n for (var i = 0, len = nodes.length; i < len; i++) {\n const node = nodes[i];\n const type = node.type.toString();\n let singleAtRule = 0;\n let atRuleType = '';\n let condition = '';\n // keyText is for CSSKeyframeRule\n let sels = node.selectorText || node.keyText;\n const isSingleAtRule = singleAtRules.indexOf(type) >= 0;\n\n // Check if the node is an at-rule\n if (isSingleAtRule) {\n singleAtRule = 1;\n atRuleType = atRules[type];\n condition = parseCondition(node);\n } else if (atRuleKeys.indexOf(type) >= 0) {\n var subRules = parseNode(node);\n condition = parseCondition(node);\n\n for (var s = 0, lens = subRules.length; s < lens; s++) {\n var subRule = subRules[s];\n condition && (subRule.mediaText = condition);\n subRule.atRuleType = atRules[type];\n }\n result = result.concat(subRules);\n }\n\n if (!sels && !isSingleAtRule) continue;\n const style = parseStyle(node);\n const selsParsed = parseSelector(sels);\n const selsAdd = selsParsed.add;\n sels = selsParsed.result;\n\n let lastRule;\n // For each group of selectors\n for (var k = 0, len3 = sels.length; k < len3; k++) {\n const model = createNode(sels[k], style, {\n atRule: atRules[type]\n });\n result.push(model);\n lastRule = model;\n }\n\n // Need to push somewhere not class-based selectors, if some rule was\n // created will push them there, otherwise will create a new rule\n if (selsAdd.length) {\n var selsAddStr = selsAdd.join(', ');\n if (lastRule) {\n lastRule.selectorsAdd = selsAddStr;\n } else {\n const model = {\n selectors: [],\n selectorsAdd: selsAddStr,\n style\n };\n singleAtRule && (model.singleAtRule = singleAtRule);\n atRuleType && (model.atRuleType = atRuleType);\n condition && (model.mediaText = condition);\n result.push(model);\n }\n }\n // console.log('LAST PUSH', result[result.length - 1]);\n }\n\n return result;\n};\n\n/**\n * Parse CSS string and return the array of objects\n * @param {String} str CSS string\n * @return {Array} Array of objects for the definition of CSSRules\n */\nexport default str => {\n const el = document.createElement('style');\n el.innerHTML = str;\n\n // There is no .sheet before adding it to the \n document.head.appendChild(el);\n const sheet = el.sheet;\n document.head.removeChild(el);\n\n return parseNode(sheet);\n};\n","import { isString } from 'underscore';\nimport BrowserCssParser, {\n parseSelector,\n createNode\n} from './BrowserParserCss';\n\nexport default (config = {}) => ({\n /**\n * Parse CSS string to a desired model object\n * @param {String} str CSS string\n * @return {Array}\n */\n parse(str) {\n let result = [];\n const { parserCss, em = {} } = config;\n const editor = em && em.get && em.get('Editor');\n const nodes = parserCss ? parserCss(str, editor) : BrowserCssParser(str);\n nodes.forEach(node => (result = result.concat(this.checkNode(node))));\n\n return result;\n },\n\n /**\n * Check the returned node from a custom parser and transforms it to\n * a valid object for the CSS composer\n * @return {[type]}\n */\n checkNode(node) {\n const { selectors, style } = node;\n\n if (isString(selectors)) {\n const nodes = [];\n const selsParsed = parseSelector(selectors);\n const classSets = selsParsed.result;\n const selectorsAdd = selsParsed.add.join(', ');\n const opts = {\n atRule: node.atRule,\n mediaText: node.params\n };\n\n if (classSets.length) {\n classSets.forEach(classSet => {\n nodes.push(createNode(classSet, style, opts));\n });\n } else {\n nodes.push(createNode([], style, opts));\n }\n\n if (selectorsAdd) {\n const lastNode = nodes[nodes.length - 1];\n lastNode.selectorsAdd = selectorsAdd;\n }\n\n node = nodes;\n }\n\n return node;\n }\n});\n","import defaults from './config/config';\nimport parserCss from './model/ParserCss';\nimport parserHtml from './model/ParserHtml';\n\nexport default () => {\n let conf = {};\n let pHtml, pCss;\n\n return {\n compTypes: '',\n\n parserCss: null,\n\n parserHtml: null,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Parser',\n\n /**\n * Get config object\n * @return {Object}\n */\n getConfig() {\n return conf;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @param {Array} [config.blocks=[]] Default blocks\n * @return {this}\n * @example\n * ...\n * {\n * blocks: [\n * {id:'h1-block' label: 'Heading', content:'

...

'},\n * ...\n * ],\n * }\n * ...\n */\n init(config = {}) {\n conf = { ...defaults, ...config };\n conf.Parser = this;\n pHtml = new parserHtml(conf);\n pCss = new parserCss(conf);\n this.em = conf.em;\n this.parserCss = pCss;\n this.parserHtml = pHtml;\n return this;\n },\n\n /**\n * Parse HTML string and return valid model\n * @param {string} str HTML string\n * @return {Object}\n */\n parseHtml(str) {\n const { em, compTypes } = this;\n pHtml.compTypes = em ? em.get('DomComponents').getTypes() : compTypes;\n return pHtml.parse(str, pCss);\n },\n\n /**\n * Parse CSS string and return valid model\n * @param {string} str CSS string\n * @return {Array}\n */\n parseCss(str) {\n return pCss.parse(str);\n }\n };\n};\n","export default {\n // Style prefix\n stylePrefix: 'clm-',\n\n // Specify the element to use as a container, string (query) or HTMLElement\n // With the empty value, nothing will be rendered\n appendTo: '',\n\n // Default selectors\n selectors: [],\n\n // States\n states: [{ name: 'hover' }, { name: 'active' }, { name: 'nth-of-type(2n)' }],\n\n // Custom selector name escaping strategy, eg.\n // name => name.replace(' ', '_')\n escapeName: 0,\n\n // Custom selected name strategy (the string you see after 'Selected')\n // ({ result, state, target }) => {\n // return `${result} - ID: ${target.getId()}`\n // }\n selectedName: 0,\n\n // Icon used to add new selector\n iconAdd:\n '',\n\n // Icon used to sync styles\n iconSync:\n '',\n\n // Icon to show when the selector is enabled\n iconTagOn:\n '',\n\n // Icon to show when the selector is disabled\n iconTagOff:\n '',\n\n // Icon used to remove the selector\n iconTagRemove:\n '',\n\n /**\n * Custom render function for the Select Manager\n * @example\n * render: ({ el, labelHead, labelStates, labelInfo, }) => {\n * // You can use the default `el` to extend/edit the current\n * // DOM element of the Selector Manager\n * const someEl = document.createElement('div');\n * // ...\n * el.appendChild(someEl);\n * // no need to return anything from the function\n *\n * // Create and return a new DOM element\n * const newEl = document.createElement('div');\n * // ...\n * return newEl;\n *\n * // Return an HTML string for a completely different layout.\n * // Use `data-*` attributes to make the module recognize some elements:\n * // `data-states` - Where to append state ``\n )\n );\n\n return result.join('');\n },\n\n /**\n * Add new model\n * @param {Object} model\n * @private\n */\n addNew(model) {\n this.addToClasses(model);\n },\n\n /**\n * Start tag creation\n * @param {Object} e\n * @private\n */\n startNewTag() {\n this.$addBtn.css({ display: 'none' });\n this.$input.show().focus();\n },\n\n /**\n * End tag creation\n * @param {Object} e\n * @private\n */\n endNewTag() {\n this.$addBtn.css({ display: '' });\n this.$input.hide().val('');\n },\n\n /**\n * Checks what to do on keyup event\n * @param {Object} e\n * @private\n */\n onInputKeyUp(e) {\n if (e.keyCode === 13) this.addNewTag(this.$input.val());\n else if (e.keyCode === 27) this.endNewTag();\n },\n\n checkStates() {\n const state = this.em.getState();\n const statesEl = this.getStates();\n statesEl && statesEl.val(state);\n },\n\n /**\n * Triggered when component is changed\n * @param {Object} e\n * @private\n */\n componentChanged: debounce(function({ targets } = {}) {\n this.updateSelection(targets);\n }),\n\n updateSelection(targets) {\n let trgs = targets || this.getTargets();\n trgs = isArray(trgs) ? trgs : [trgs];\n let selectors = [];\n\n if (trgs && trgs.length) {\n selectors = this.getCommonSelectors({ targets: trgs });\n this.checkSync({ validSelectors: selectors });\n }\n\n this.collection.reset(selectors);\n this.updateStateVis(trgs);\n\n return selectors;\n },\n\n getCommonSelectors({ targets, opts = {} } = {}) {\n const trgs = targets || this.getTargets();\n const selectors = trgs\n .map(tr => tr.getSelectors && tr.getSelectors().getValid(opts))\n .filter(i => i);\n return this._commonSelectors(...selectors);\n },\n\n _commonSelectors(...args) {\n if (!args.length) return [];\n if (args.length === 1) return args[0];\n if (args.length === 2)\n return args[0].filter(item => args[1].indexOf(item) >= 0);\n\n return args\n .slice(1)\n .reduce((acc, item) => this._commonSelectors(acc, item), args[0]);\n },\n\n checkSync: debounce(function() {\n const { $btnSyncEl, config, collection } = this;\n const target = this.getTarget();\n let hasStyle;\n\n if (target && config.componentFirst && collection.length) {\n const style = target.getStyle();\n hasStyle = !isEmpty(style);\n }\n\n $btnSyncEl && $btnSyncEl[hasStyle ? 'show' : 'hide']();\n }),\n\n getTarget() {\n return this.target.getSelected();\n },\n\n getTargets() {\n return this.target.getSelectedAll();\n },\n\n /**\n * Update states visibility. Hides states in case there is no tags\n * inside collection\n * @private\n */\n updateStateVis(target) {\n const em = this.em;\n const avoidInline = em && em.getConfig('avoidInlineStyle');\n const display = this.collection.length || avoidInline ? '' : 'none';\n this.getStatesC().css('display', display);\n this.updateSelector(target);\n },\n\n __handleStateChange() {\n this.updateSelector(this.getTargets());\n },\n\n /**\n * Update selector helper\n * @return {this}\n * @private\n */\n updateSelector(targets) {\n const elSel = this.el.querySelector('[data-selected]');\n const result = [];\n let trgs = targets || this.getTargets();\n trgs = isArray(trgs) ? trgs : [trgs];\n\n trgs.forEach(target => result.push(this.__getName(target)));\n elSel && (elSel.innerHTML = result.join(', '));\n this.checkStates();\n },\n\n __getName(target) {\n const { pfx, config, em } = this;\n const { selectedName, componentFirst } = config;\n let result;\n\n if (isString(target)) {\n result = `${target}`;\n } else {\n if (!target || !target.get) return;\n const selectors = target.getSelectors().getStyleable();\n const state = em.get('state');\n const idRes = target.getId\n ? `${target.getName()}#${target.getId()}`\n : '';\n result = this.collection.getFullString(selectors);\n result = result\n ? `${result}`\n : target.get('selectorsAdd') || idRes;\n result = componentFirst && idRes ? idRes : result;\n result += state ? `:${state}` : '';\n result = selectedName ? selectedName({ result, state, target }) : result;\n }\n\n return result && `${result}`;\n },\n\n /**\n * Triggered when the select with states is changed\n * @param {Object} e\n * @private\n */\n stateChanged(ev) {\n const { em } = this;\n const { value } = ev.target;\n em.set('state', value);\n },\n\n /**\n * Add new tag to collection, if possible, and to the component\n * @param {Object} e\n * @private\n */\n addNewTag(label) {\n const { em } = this;\n\n if (!label.trim()) return;\n\n if (em) {\n const sm = em.get('SelectorManager');\n const model = sm.add({ label });\n\n this.getTargets().forEach(target => {\n target.getSelectors().add(model);\n this.collection.add(model);\n this.updateStateVis();\n });\n }\n\n this.endNewTag();\n },\n\n /**\n * Add new object to collection\n * @param {Object} model Model\n * @param {Object} fragmentEl Fragment collection\n * @return {Object} Object created\n * @private\n * */\n addToClasses(model, fragmentEl = null) {\n const fragment = fragmentEl;\n const classes = this.getClasses();\n const rendered = new ClassTagView({\n model,\n config: this.config,\n coll: this.collection\n }).render().el;\n\n fragment ? fragment.appendChild(rendered) : classes.append(rendered);\n\n return rendered;\n },\n\n /**\n * Render the collection of classes\n * @private\n */\n renderClasses() {\n const frag = document.createDocumentFragment();\n const classes = this.getClasses();\n classes.empty();\n this.collection.each(model => this.addToClasses(model, frag));\n classes.append(frag);\n },\n\n /**\n * Return classes element\n * @return {HTMLElement}\n * @private\n */\n getClasses() {\n return this.$el.find('[data-selectors]');\n },\n\n /**\n * Return states element\n * @return {HTMLElement}\n * @private\n */\n getStates() {\n if (!this.$states) {\n const el = this.$el.find('[data-states]');\n this.$states = el[0] && el;\n }\n return this.$states;\n },\n\n /**\n * Return states container element\n * @return {HTMLElement}\n * @private\n */\n getStatesC() {\n if (!this.$statesC) this.$statesC = this.$el.find('#' + this.stateInputC);\n return this.$statesC;\n },\n\n render() {\n const { em, pfx, ppfx, config, $el, el } = this;\n const { render, iconSync, iconAdd } = config;\n const tmpOpts = {\n iconSync,\n iconAdd,\n labelHead: em.t('selectorManager.label'),\n labelStates: em.t('selectorManager.emptyState'),\n labelInfo: em.t('selectorManager.selected'),\n ppfx,\n pfx,\n el\n };\n $el.html(this.template(tmpOpts));\n const renderRes = render && render(tmpOpts);\n renderRes && renderRes !== el && $el.empty().append(renderRes);\n this.$input = $el.find('[data-input]');\n this.$addBtn = $el.find('[data-add]');\n this.$classes = $el.find('#' + pfx + 'tags-c');\n this.$btnSyncEl = $el.find('[data-sync-style]');\n this.$input.hide();\n const statesEl = this.getStates();\n statesEl && statesEl.append(this.getStateOptions());\n this.renderClasses();\n $el.attr('class', `${this.className} ${ppfx}one-bg ${ppfx}two-color`);\n return this;\n }\n});\n","/**\n * Selectors in GrapesJS are used in CSS Composer inside Rules and in Components as classes. To illustrate this concept let's take\n * a look at this code:\n *\n * ```css\n * span > #send-btn.btn{\n * ...\n * }\n * ```\n * ```html\n * \n * \n * \n * ```\n *\n * In this scenario we get:\n * * span -> selector of type `tag`\n * * send-btn -> selector of type `id`\n * * btn -> selector of type `class`\n *\n * So, for example, being `btn` the same class entity it'll be easier to refactor and track things.\n *\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/selector_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * selectorManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const selectorManager = editor.SelectorManager;\n * ```\n *\n * * [getConfig](#getconfig)\n * * [add](#add)\n * * [addClass](#addclass)\n * * [get](#get)\n * * [getAll](#getall)\n * * [setState](#setstate)\n * * [getState](#getstate)\n *\n * @module SelectorManager\n */\n\nimport { isString, isElement, isObject, isArray } from 'underscore';\nimport { isComponent, isRule } from 'utils/mixins';\nimport defaults from './config/config';\nimport Selector from './model/Selector';\nimport Selectors from './model/Selectors';\nimport ClassTagsView from './view/ClassTagsView';\n\nconst isId = str => isString(str) && str[0] == '#';\nconst isClass = str => isString(str) && str[0] == '.';\n\nexport default config => {\n var c = config || {};\n var selectors;\n\n return {\n Selector,\n\n Selectors,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'SelectorManager',\n\n /**\n * Get configuration object\n * @return {Object}\n */\n getConfig() {\n return c;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @return {this}\n * @private\n */\n init(conf = {}) {\n c = {\n ...defaults,\n ...conf\n };\n const em = c.em;\n const ppfx = c.pStylePrefix;\n this.em = em;\n\n if (ppfx) {\n c.stylePrefix = ppfx + c.stylePrefix;\n }\n\n this.selectorTags = new ClassTagsView({\n collection: new Selectors([], { em, config: c }),\n config: c\n });\n\n // Global selectors container\n selectors = new Selectors(c.selectors);\n selectors.on('add', model => em.trigger('selector:add', model));\n selectors.on('remove', model => em.trigger('selector:remove', model));\n selectors.on('change', model =>\n em.trigger(\n 'selector:update',\n model,\n model.previousAttributes(),\n model.changedAttributes()\n )\n );\n em.on('change:state', (m, value) => em.trigger('selector:state', value));\n\n return this;\n },\n\n postRender() {\n const elTo = this.getConfig().appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n el.appendChild(this.render([]));\n }\n },\n\n select(value, opts = {}) {\n const targets = Array.isArray(value) ? value : [value];\n const toSelect = this.em.get('StyleManager').setTarget(targets, opts);\n const res = toSelect\n .filter(i => i)\n .map(sel =>\n isComponent(sel)\n ? sel\n : isRule(sel) && !sel.get('selectorsAdd')\n ? sel\n : sel.getSelectorsString()\n );\n this.selectorTags.componentChanged({ targets: res });\n return this;\n },\n\n /**\n * Change the selector state\n * @param {String} value State value\n * @returns {this}\n * @example\n * selectorManager.setState('hover');\n */\n setState(value) {\n this.em.setState(value);\n return this;\n },\n\n /**\n * Get the current selector state\n * @returns {String}\n */\n getState() {\n return this.em.setState();\n },\n\n addSelector(name, opt = {}) {\n let opts = { ...opt };\n\n if (isObject(name)) {\n opts = name;\n } else {\n opts.name = name;\n }\n\n if (isId(opts.name)) {\n opts.name = opts.name.substr(1);\n opts.type = Selector.TYPE_ID;\n } else if (isClass(opts.name)) {\n opts.name = opts.name.substr(1);\n }\n\n if (opts.label && !opts.name) {\n opts.name = this.escapeName(opts.label);\n }\n\n const cname = opts.name;\n const selector = cname\n ? this.get(cname, opts.type)\n : selectors.where(opts)[0];\n\n if (!selector) {\n return selectors.add(opts, { config: c });\n }\n\n return selector;\n },\n\n getSelector(name, type = Selector.TYPE_CLASS) {\n if (isId(name)) {\n name = name.substr(1);\n type = Selector.TYPE_ID;\n } else if (isClass(name)) {\n name = name.substr(1);\n }\n\n return selectors.where({ name, type })[0];\n },\n\n /**\n * Add a new selector to collection if it's not already exists. Class type is a default one\n * @param {String|Array} name Selector/s name\n * @param {Object} opts Selector options\n * @param {String} [opts.label=''] Label for the selector, if it's not provided the label will be the same as the name\n * @param {String} [opts.type=1] Type of the selector. At the moment, only 'class' (1) is available\n * @return {Model|Array}\n * @example\n * const selector = selectorManager.add('selectorName');\n * // Same as\n * const selector = selectorManager.add('selectorName', {\n * type: 1,\n * label: 'selectorName'\n * });\n * // Multiple selectors\n * const selectors = selectorManager.add(['.class1', '.class2', '#id1']);\n * */\n add(name, opts = {}) {\n if (isArray(name)) {\n return name.map(item => this.addSelector(item, opts));\n } else {\n return this.addSelector(name, opts);\n }\n },\n\n /**\n * Add class selectors\n * @param {Array|string} classes Array or string of classes\n * @return {Array} Array of added selectors\n * @example\n * sm.addClass('class1');\n * sm.addClass('class1 class2');\n * sm.addClass(['class1', 'class2']);\n * // -> [SelectorObject, ...]\n */\n addClass(classes) {\n const added = [];\n\n if (isString(classes)) {\n classes = classes.trim().split(' ');\n }\n\n classes.forEach(name => added.push(this.addSelector(name)));\n return added;\n },\n\n /**\n * Get the selector by its name\n * @param {String|Array} name Selector name\n * @param {String} type Selector type\n * @return {Model|Array}\n * @example\n * const selector = selectorManager.get('selectorName');\n * // or get an array\n * const selectors = selectorManager.get(['class1', 'class2']);\n * */\n get(name, type) {\n if (isArray(name)) {\n const result = [];\n const selectors = name\n .map(item => this.getSelector(item))\n .filter(item => item);\n selectors.forEach(\n item => result.indexOf(item) < 0 && result.push(item)\n );\n return result;\n } else {\n return this.getSelector(name, type);\n }\n },\n\n /**\n * Get all selectors\n * @return {Collection}\n * */\n getAll() {\n return selectors;\n },\n\n /**\n * Return escaped selector name\n * @param {String} name Selector name to escape\n * @returns {String} Escaped name\n */\n escapeName(name) {\n const { escapeName } = c;\n return escapeName ? escapeName(name) : Selector.escapeName(name);\n },\n\n /**\n * Render class selectors. If an array of selectors is provided a new instance of the collection will be rendered\n * @param {Array} selectors\n * @return {HTMLElement}\n * @private\n */\n render(selectors) {\n if (selectors) {\n this.selectorTags = new ClassTagsView({\n collection: new Selectors(selectors),\n config: c\n });\n return this.selectorTags.render().el;\n } else return this.selectorTags.render().el;\n }\n };\n};\n","export default {\n // Prefix identifier that will be used inside storing and loading\n id: 'gjs-',\n\n // Enable/Disable autosaving\n autosave: 1,\n\n // Indicates if load data inside editor after init\n autoload: 1,\n\n // Indicates which storage to use. Available: local | remote\n type: 'local',\n\n // If autosave enabled, indicates how many steps (general changes to structure)\n // need to be done before save. Useful with remoteStorage to reduce remote calls\n stepsBeforeSave: 1,\n\n //Enable/Disable components model (JSON format)\n storeComponents: 1,\n\n //Enable/Disable styles model (JSON format)\n storeStyles: 1,\n\n //Enable/Disable saving HTML template\n storeHtml: 1,\n\n //Enable/Disable saving CSS template\n storeCss: 1,\n\n // ONLY FOR LOCAL STORAGE\n // If enabled, checks if browser supports Local Storage\n checkLocal: 1,\n\n // ONLY FOR REMOTE STORAGE\n // Custom parameters to pass with the remote storage request, eg. csrf token\n params: {},\n\n // Custom headers for the remote storage request\n headers: {},\n\n // Endpoint where to save all stuff\n urlStore: '',\n\n // Endpoint where to fetch data\n urlLoad: '',\n\n //Callback before request\n beforeSend(jqXHR, settings) {},\n\n //Callback after request\n onComplete(jqXHR, status) {},\n\n // set contentType paramater of $.ajax\n // true: application/json; charset=utf-8'\n // false: 'x-www-form-urlencoded'\n contentTypeJson: true,\n\n credentials: 'include',\n\n // Pass custom options to fetch API (remote storage)\n // You can pass a simple object: { someOption: 'someValue' }\n // or a function wich returns and object to add:\n // currentOpts => {\n // return currentOpts.method === 'post' ? { method: 'patch' } : {};\n // }\n fetchOptions: ''\n};\n","import Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n defaults: {\n checkLocal: true\n },\n\n /**\n * @private\n */\n store(data, clb) {\n this.checkStorageEnvironment();\n\n for (var key in data) localStorage.setItem(key, data[key]);\n\n if (typeof clb == 'function') {\n clb();\n }\n },\n\n /**\n * @private\n */\n load(keys, clb) {\n this.checkStorageEnvironment();\n var result = {};\n\n for (var i = 0, len = keys.length; i < len; i++) {\n var value = localStorage.getItem(keys[i]);\n if (value) result[keys[i]] = value;\n }\n\n if (typeof clb == 'function') {\n clb(result);\n }\n\n return result;\n },\n\n /**\n * @private\n */\n remove(keys) {\n this.checkStorageEnvironment();\n\n for (var i = 0, len = keys.length; i < len; i++)\n localStorage.removeItem(keys[i]);\n },\n\n /**\n * Check storage environment\n * @private\n * */\n checkStorageEnvironment() {\n if (this.get('checkLocal') && !localStorage)\n console.warn(\"Your browser doesn't support localStorage\");\n }\n});\n","import Backbone from 'backbone';\nimport fetch from 'utils/fetch';\nimport { isUndefined, isFunction } from 'underscore';\n\nexport default Backbone.Model.extend({\n fetch,\n\n defaults: {\n urlStore: '',\n urlLoad: '',\n params: {},\n beforeSend() {},\n onComplete() {},\n contentTypeJson: false,\n credentials: 'include',\n fetchOptions: ''\n },\n\n /**\n * Triggered before the request is started\n * @private\n */\n onStart() {\n const em = this.get('em');\n const before = this.get('beforeSend');\n before && before();\n },\n\n /**\n * Triggered on request error\n * @param {Object} err Error\n * @param {Function} [clbErr] Error callback\n * @private\n */\n onError(err, clbErr) {\n if (clbErr) {\n clbErr(err);\n } else {\n const em = this.get('em');\n console.error(err);\n em && em.trigger('storage:error', err);\n }\n },\n\n /**\n * Triggered on request response\n * @param {string} text Response text\n * @private\n */\n onResponse(text, clb) {\n const em = this.get('em');\n const complete = this.get('onComplete');\n const typeJson = this.get('contentTypeJson');\n const parsable = text && typeof text === 'string';\n const res = typeJson && parsable ? JSON.parse(text) : text;\n complete && complete(res);\n clb && clb(res);\n em && em.trigger('storage:response', res);\n },\n\n store(data, clb, clbErr) {\n const body = {};\n\n for (let key in data) {\n body[key] = data[key];\n }\n\n this.request(this.get('urlStore'), { body }, clb, clbErr);\n },\n\n load(keys, clb, clbErr) {\n this.request(this.get('urlLoad'), { method: 'get' }, clb, clbErr);\n },\n\n /**\n * Execute remote request\n * @param {string} url Url\n * @param {Object} [opts={}] Options\n * @param {Function} [clb=null] Callback\n * @param {Function} [clbErr=null] Error callback\n * @private\n */\n request(url, opts = {}, clb = null, clbErr = null) {\n const typeJson = this.get('contentTypeJson');\n const headers = this.get('headers') || {};\n const params = this.get('params');\n const reqHead = 'X-Requested-With';\n const typeHead = 'Content-Type';\n const bodyObj = opts.body || {};\n let fetchOptions;\n let body;\n\n for (let param in params) {\n bodyObj[param] = params[param];\n }\n\n if (isUndefined(headers[reqHead])) {\n headers[reqHead] = 'XMLHttpRequest';\n }\n\n // With `fetch`, have to send FormData without any 'Content-Type'\n // https://stackoverflow.com/questions/39280438/fetch-missing-boundary-in-multipart-form-data-post\n\n if (isUndefined(headers[typeHead]) && typeJson) {\n headers[typeHead] = 'application/json; charset=utf-8';\n }\n\n if (typeJson) {\n body = JSON.stringify(bodyObj);\n } else {\n body = new FormData();\n\n for (let bodyKey in bodyObj) {\n body.append(bodyKey, bodyObj[bodyKey]);\n }\n }\n fetchOptions = {\n method: opts.method || 'post',\n credentials: this.get('credentials'),\n headers\n };\n\n // Body should only be included on POST method\n if (fetchOptions.method === 'post') {\n fetchOptions.body = body;\n }\n\n const fetchOpts = this.get('fetchOptions') || {};\n const addOpts = isFunction(fetchOpts)\n ? fetchOpts(fetchOptions)\n : fetchOptions;\n\n this.onStart();\n this.fetch(url, {\n ...fetchOptions,\n ...(addOpts || {})\n })\n .then(res =>\n ((res.status / 200) | 0) == 1\n ? res.text()\n : res.text().then(text => Promise.reject(text))\n )\n .then(text => this.onResponse(text, clb))\n .catch(err => this.onError(err, clbErr));\n }\n});\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/storage_manager/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * storageManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const storageManager = editor.StorageManager;\n * ```\n *\n * * [getConfig](#getconfig)\n * * [isAutosave](#isautosave)\n * * [setAutosave](#setautosave)\n * * [getStepsBeforeSave](#getstepsbeforesave)\n * * [setStepsBeforeSave](#setstepsbeforesave)\n * * [setStepsBeforeSave](#setstepsbeforesave)\n * * [getStorages](#getstorages)\n * * [getCurrent](#getcurrent)\n * * [getCurrentStorage](#getcurrentstorage)\n * * [setCurrent](#setcurrent)\n * * [add](#add)\n * * [get](#get)\n * * [store](#store)\n * * [load](#load)\n *\n * @module StorageManager\n */\n\nimport defaults from './config/config';\nimport LocalStorage from './model/LocalStorage';\nimport RemoteStorage from './model/RemoteStorage';\n\nexport default () => {\n var c = {};\n let em;\n var storages = {};\n var defaultStorages = {};\n const eventStart = 'storage:start';\n const eventEnd = 'storage:end';\n const eventError = 'storage:error';\n\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'StorageManager',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @param {string} [config.id='gjs-'] The prefix for the fields, useful to differentiate storing/loading\n * with multiple editors on the same page. For example, in local storage, the item of HTML will be saved like 'gjs-html'\n * @param {Boolean} [config.autosave=true] Indicates if autosave mode is enabled, works in conjunction with stepsBeforeSave\n * @param {number} [config.stepsBeforeSave=1] If autosave enabled, indicates how many steps/changes are necessary\n * before autosave is triggered\n * @param {string} [config.type='local'] Default storage type. Available: 'local' | 'remote' | ''(do not store)\n * @private\n * @example\n * ...\n * {\n * autosave: false,\n * type: 'remote',\n * }\n * ...\n */\n init(config = {}) {\n c = { ...defaults, ...config };\n em = c.em;\n if (c._disable) c.type = 0;\n defaultStorages.remote = new RemoteStorage(c);\n defaultStorages.local = new LocalStorage(c);\n c.currentStorage = c.type;\n this.loadDefaultProviders().setCurrent(c.type);\n return this;\n },\n\n /**\n * Get configuration object\n * @return {Object}\n * */\n getConfig() {\n return c;\n },\n\n /**\n * Checks if autosave is enabled\n * @return {Boolean}\n * */\n isAutosave() {\n return !!c.autosave;\n },\n\n /**\n * Set autosave value\n * @param {Boolean} v\n * @return {this}\n * */\n setAutosave(v) {\n c.autosave = !!v;\n return this;\n },\n\n /**\n * Returns number of steps required before trigger autosave\n * @return {number}\n * */\n getStepsBeforeSave() {\n return c.stepsBeforeSave;\n },\n\n /**\n * Set steps required before trigger autosave\n * @param {number} v\n * @return {this}\n * */\n setStepsBeforeSave(v) {\n c.stepsBeforeSave = v;\n return this;\n },\n\n /**\n * Add new storage\n * @param {string} id Storage ID\n * @param {Object} storage Storage wrapper\n * @param {Function} storage.load Load method\n * @param {Function} storage.store Store method\n * @return {this}\n * @example\n * storageManager.add('local2', {\n * load: function(keys, clb, clbErr) {\n * var res = {};\n * for (var i = 0, len = keys.length; i < len; i++){\n * var v = localStorage.getItem(keys[i]);\n * if(v) res[keys[i]] = v;\n * }\n * clb(res); // might be called inside some async method\n * // In case of errors...\n * // clbErr('Went something wrong');\n * },\n * store: function(data, clb, clbErr) {\n * for(var key in data)\n * localStorage.setItem(key, data[key]);\n * clb(); // might be called inside some async method\n * }\n * });\n * */\n add(id, storage) {\n storages[id] = storage;\n return this;\n },\n\n /**\n * Returns storage by id\n * @param {string} id Storage ID\n * @return {Object|null}\n * */\n get(id) {\n return storages[id] || null;\n },\n\n /**\n * Returns all storages\n * @return {Array}\n * */\n getStorages() {\n return storages;\n },\n\n /**\n * Returns current storage type\n * @return {string}\n * */\n getCurrent() {\n return c.currentStorage;\n },\n\n /**\n * Set current storage type\n * @param {string} id Storage ID\n * @return {this}\n * */\n setCurrent(id) {\n c.currentStorage = id;\n return this;\n },\n\n /**\n * Store key-value resources in the current storage\n * @param {Object} data Data in key-value format, eg. {item1: value1, item2: value2}\n * @param {Function} clb Callback function\n * @return {Object|null}\n * @example\n * storageManager.store({item1: value1, item2: value2});\n * */\n store(data, clb) {\n const st = this.get(this.getCurrent());\n const toStore = {};\n this.onStart('store', data);\n\n for (let key in data) {\n toStore[c.id + key] = data[key];\n }\n\n return st\n ? st.store(\n toStore,\n res => {\n clb && clb(res);\n this.onEnd('store', res);\n },\n err => {\n this.onError('store', err);\n }\n )\n : null;\n },\n\n /**\n * Load resource from the current storage by keys\n * @param {string|Array} keys Keys to load\n * @param {Function} clb Callback function\n * @example\n * storageManager.load(['item1', 'item2'], res => {\n * // res -> {item1: value1, item2: value2}\n * });\n * storageManager.load('item1', res => {\n * // res -> {item1: value1}\n * });\n * */\n load(keys, clb) {\n var st = this.get(this.getCurrent());\n var keysF = [];\n var result = {};\n\n if (typeof keys === 'string') keys = [keys];\n this.onStart('load', keys);\n\n for (var i = 0, len = keys.length; i < len; i++) {\n keysF.push(c.id + keys[i]);\n }\n\n if (st) {\n st.load(\n keysF,\n res => {\n // Restore keys name\n var reg = new RegExp('^' + c.id + '');\n for (var itemKey in res) {\n var itemKeyR = itemKey.replace(reg, '');\n result[itemKeyR] = res[itemKey];\n }\n\n clb && clb(result);\n this.onEnd('load', result);\n },\n err => {\n clb && clb(result);\n this.onError('load', err);\n }\n );\n } else {\n clb && clb(result);\n }\n },\n\n /**\n * Load default storages\n * @return {this}\n * @private\n * */\n loadDefaultProviders() {\n for (var id in defaultStorages) this.add(id, defaultStorages[id]);\n return this;\n },\n\n /**\n * Get current storage\n * @return {Storage}\n * */\n getCurrentStorage() {\n return this.get(this.getCurrent());\n },\n\n /**\n * On start callback\n * @private\n */\n onStart(ctx, data) {\n if (em) {\n em.trigger(eventStart);\n ctx && em.trigger(`${eventStart}:${ctx}`, data);\n }\n },\n\n /**\n * On end callback\n * @private\n */\n onEnd(ctx, data) {\n if (em) {\n em.trigger(eventEnd);\n ctx && em.trigger(`${eventEnd}:${ctx}`, data);\n }\n },\n\n /**\n * On error callback\n * @private\n */\n onError(ctx, data) {\n if (em) {\n em.trigger(eventError, data);\n ctx && em.trigger(`${eventError}:${ctx}`, data);\n this.onEnd(ctx, data);\n }\n },\n\n /**\n * Check if autoload is possible\n * @return {Boolean}\n * @private\n * */\n canAutoload() {\n const storage = this.getCurrentStorage();\n return storage && this.getConfig().autoload;\n }\n };\n};\n","import Backbone from 'backbone';\nimport {\n isString,\n isFunction,\n isArray,\n result,\n each,\n bindAll\n} from 'underscore';\nimport {\n on,\n off,\n matches,\n getElement,\n getPointerEvent,\n isTextNode,\n getModel\n} from 'utils/mixins';\nconst $ = Backbone.$;\n\nexport default Backbone.View.extend({\n initialize(opt) {\n this.opt = opt || {};\n bindAll(\n this,\n 'startSort',\n 'onMove',\n 'endMove',\n 'rollback',\n 'updateOffset',\n 'moveDragHelper'\n );\n var o = opt || {};\n this.elT = 0;\n this.elL = 0;\n this.borderOffset = o.borderOffset || 10;\n\n var el = o.container;\n this.el = typeof el === 'string' ? document.querySelector(el) : el;\n this.$el = $(this.el);\n\n this.containerSel = o.containerSel || 'div';\n this.itemSel = o.itemSel || 'div';\n this.draggable = o.draggable || true;\n this.nested = o.nested || 0;\n this.pfx = o.pfx || '';\n this.ppfx = o.ppfx || '';\n this.freezeClass = o.freezeClass || this.pfx + 'freezed';\n this.onStart = o.onStart || '';\n this.onEndMove = o.onEndMove || '';\n this.direction = o.direction || 'v'; // v (vertical), h (horizontal), a (auto)\n this.onMoveClb = o.onMove || '';\n this.relative = o.relative || 0;\n this.ignoreViewChildren = o.ignoreViewChildren || 0;\n this.ignoreModels = o.ignoreModels || 0;\n this.plh = o.placer || '';\n // Frame offset\n this.wmargin = o.wmargin || 0;\n this.offTop = o.offsetTop || 0;\n this.offLeft = o.offsetLeft || 0;\n this.document = o.document || document;\n this.$document = $(this.document);\n this.dropContent = null;\n this.em = o.em || '';\n this.dragHelper = null;\n this.canvasRelative = o.canvasRelative || 0;\n this.selectOnEnd = !o.avoidSelectOnEnd;\n this.scale = o.scale;\n this.activeTextModel = null;\n\n if (this.em && this.em.on) {\n this.em.on('change:canvasOffset', this.updateOffset);\n this.updateOffset();\n }\n },\n\n getScale() {\n return result(this, scale) || 1;\n },\n\n getContainerEl() {\n if (!this.el) {\n var el = this.opt.container;\n this.el = typeof el === 'string' ? document.querySelector(el) : el;\n this.$el = $(this.el);\n }\n return this.el;\n },\n\n getDocuments() {\n const em = this.em;\n const canvasDoc = em && em.get('Canvas').getBody().ownerDocument;\n const docs = [document];\n canvasDoc && docs.push(canvasDoc);\n return docs;\n },\n\n /**\n * Triggered when the offset of the editro is changed\n */\n updateOffset() {\n const offset = this.em.get('canvasOffset') || {};\n this.offTop = offset.top;\n this.offLeft = offset.left;\n },\n\n /**\n * Set content to drop\n * @param {String|Object} content\n */\n setDropContent(content) {\n this.dropModel = null;\n this.dropContent = content;\n },\n\n updateTextViewCursorPosition(e) {\n const Canvas = this.em.get('Canvas');\n const targetDoc = Canvas.getDocument();\n let range = null;\n\n if (targetDoc.caretRangeFromPoint) {\n // Chrome\n const poiner = getPointerEvent(e);\n range = targetDoc.caretRangeFromPoint(poiner.clientX, poiner.clientY);\n } else if (e.rangeParent) {\n // Firefox\n range = targetDoc.createRange();\n range.setStart(e.rangeParent, e.rangeOffset);\n }\n\n const sel = Canvas.getWindow().getSelection();\n Canvas.getFrameEl().focus();\n sel.removeAllRanges();\n range && sel.addRange(range);\n },\n\n setContentEditable(model, mode) {\n if (model) {\n const el = model.getEl();\n if (el.contentEditable != mode) el.contentEditable = mode;\n }\n },\n\n /**\n * Toggle cursor while sorting\n * @param {Boolean} active\n */\n toggleSortCursor(active) {\n var em = this.em;\n var body = document.body;\n var pfx = this.ppfx || this.pfx;\n var sortCls = pfx + 'grabbing';\n var emBody = em ? em.get('Canvas').getBody() : '';\n\n // Avoid updating body className as it causes a huge repaint\n // Noticeable with \"fast\" drag of blocks\n if (active) {\n em && em.get('Canvas').startAutoscroll();\n //body.className += ' ' + sortCls;\n //if (em) emBody.className += ' ' + sortCls;\n } else {\n em && em.get('Canvas').stopAutoscroll();\n //body.className = body.className.replace(sortCls, '').trim();\n //if(em) emBody.className = emBody.className.replace(sortCls, '').trim();\n }\n },\n\n /**\n * Set drag helper\n * @param {HTMLElement} el\n * @param {Event} event\n */\n setDragHelper(el, event) {\n const ev = event || '';\n const clonedEl = el.cloneNode(1);\n const rect = el.getBoundingClientRect();\n const computed = getComputedStyle(el);\n let style = '';\n\n for (var i = 0; i < computed.length; i++) {\n const prop = computed[i];\n style += `${prop}:${computed.getPropertyValue(prop)};`;\n }\n\n document.body.appendChild(clonedEl);\n clonedEl.className += ` ${this.pfx}bdrag`;\n clonedEl.setAttribute('style', style);\n this.dragHelper = clonedEl;\n clonedEl.style.width = `${rect.width}px`;\n clonedEl.style.height = `${rect.height}px`;\n ev && this.moveDragHelper(ev);\n\n // Listen mouse move events\n if (this.em) {\n $(this.em.get('Canvas').getBody().ownerDocument)\n .off('mousemove', this.moveDragHelper)\n .on('mousemove', this.moveDragHelper);\n }\n $(document)\n .off('mousemove', this.moveDragHelper)\n .on('mousemove', this.moveDragHelper);\n },\n\n /**\n * Update the position of the helper\n * @param {Event} e\n */\n moveDragHelper(e) {\n const doc = e.target.ownerDocument;\n\n if (!this.dragHelper || !doc) {\n return;\n }\n\n let posY = e.pageY;\n let posX = e.pageX;\n let addTop = 0;\n let addLeft = 0;\n const window = doc.defaultView || doc.parentWindow;\n const frame = window.frameElement;\n const dragHelperStyle = this.dragHelper.style;\n\n // If frame is present that means mouse has moved over the editor's canvas,\n // which is rendered inside the iframe and the mouse move event comes from\n // the iframe, not the parent window. Mouse position relative to the frame's\n // parent window needs to account for the frame's position relative to the\n // parent window.\n if (frame) {\n const frameRect = frame.getBoundingClientRect();\n addTop = frameRect.top + document.documentElement.scrollTop;\n addLeft = frameRect.left + document.documentElement.scrollLeft;\n posY = e.clientY;\n posX = e.clientX;\n }\n\n dragHelperStyle.top = posY + addTop + 'px';\n dragHelperStyle.left = posX + addLeft + 'px';\n },\n\n /**\n * Returns true if the element matches with selector\n * @param {Element} el\n * @param {String} selector\n * @return {Boolean}\n */\n matches(el, selector, useBody) {\n return matches.call(el, selector);\n },\n\n /**\n * Closest parent\n * @param {Element} el\n * @param {String} selector\n * @return {Element|null}\n */\n closest(el, selector) {\n if (!el) return;\n var elem = el.parentNode;\n while (elem && elem.nodeType === 1) {\n if (this.matches(elem, selector)) return elem;\n elem = elem.parentNode;\n }\n return null;\n },\n\n /**\n * Get the offset of the element\n * @param {HTMLElement} el\n * @return {Object}\n */\n offset(el) {\n var rect = el.getBoundingClientRect();\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n };\n },\n\n /**\n * Create placeholder\n * @return {HTMLElement}\n */\n createPlaceholder() {\n var pfx = this.pfx;\n var el = document.createElement('div');\n var ins = document.createElement('div');\n el.className = pfx + 'placeholder';\n el.style.display = 'none';\n el.style['pointer-events'] = 'none';\n ins.className = pfx + 'placeholder-int';\n el.appendChild(ins);\n return el;\n },\n\n /**\n * Picking component to move\n * @param {HTMLElement} src\n * */\n startSort(src) {\n const em = this.em;\n const itemSel = this.itemSel;\n const contSel = this.containerSel;\n const container = this.getContainerEl();\n const docs = this.getDocuments();\n const onStart = this.onStart;\n let srcModel;\n let plh = this.plh;\n this.dropModel = null;\n this.moved = 0;\n\n // Check if the start element is a valid one, if not get the\n // closest valid one\n if (src && !this.matches(src, `${itemSel}, ${contSel}`)) {\n src = this.closest(src, itemSel);\n }\n\n this.eV = src;\n\n // Create placeholder if not yet exists\n if (!plh) {\n plh = this.createPlaceholder();\n container.appendChild(plh);\n this.plh = plh;\n }\n\n if (src) {\n srcModel = this.getSourceModel(src);\n srcModel && srcModel.set && srcModel.set('status', 'freezed');\n this.srcModel = srcModel;\n }\n\n on(container, 'mousemove dragover', this.onMove);\n on(docs, 'mouseup dragend touchend', this.endMove);\n on(docs, 'keydown', this.rollback);\n onStart && onStart();\n\n // Avoid strange effects on dragging\n em && em.clearSelection();\n this.toggleSortCursor(1);\n\n em && em.trigger('sorter:drag:start', src, srcModel);\n },\n\n /**\n * Get the model from HTMLElement target\n * @return {Model|null}\n */\n getTargetModel(el) {\n let elem = el || this.target;\n return $(elem).data('model');\n },\n\n /**\n * Get the model of the current source element (element to drag)\n * @return {Model}\n */\n getSourceModel(source, { target, avoidChildren = 1 } = {}) {\n const { em, eV } = this;\n const src = source || eV;\n let { dropModel, dropContent } = this;\n const isTextable = src =>\n src &&\n target &&\n src.opt &&\n src.opt.avoidChildren &&\n this.isTextableActive(src, target);\n\n if (dropContent && em) {\n if (isTextable(dropModel)) {\n dropModel = null;\n }\n\n if (!dropModel) {\n const comps = em.get('DomComponents').getComponents();\n const opts = {\n avoidChildren,\n avoidStore: 1,\n avoidUpdateStyle: 1\n };\n const tempModel = comps.add(dropContent, { ...opts, temporary: 1 });\n dropModel = comps.remove(tempModel, opts);\n dropModel = dropModel instanceof Array ? dropModel[0] : dropModel;\n this.dropModel = dropModel;\n\n if (isTextable(dropModel)) {\n return this.getSourceModel(src, { target, avoidChildren: 0 });\n }\n }\n\n return dropModel;\n }\n\n return src && $(src).data('model');\n },\n\n /**\n * Highlight target\n * @param {Model|null} model\n */\n selectTargetModel(model) {\n if (model instanceof Backbone.Collection) {\n return;\n }\n\n const { targetModel } = this;\n\n // Reset the previous model but not if it's the same as the source\n // https://github.com/artf/grapesjs/issues/2478#issuecomment-570314736\n if (targetModel && targetModel !== this.srcModel) {\n targetModel.set('status', '');\n }\n\n if (model && model.set) {\n model.set('status', 'selected-parent');\n this.targetModel = model;\n }\n },\n\n /**\n * During move\n * @param {Event} e\n * */\n onMove(e) {\n const ev = e;\n const { em, onMoveClb, plh } = this;\n this.moved = 1;\n\n // Turn placeholder visibile\n var dsp = plh.style.display;\n if (!dsp || dsp === 'none') plh.style.display = 'block';\n\n // Cache all necessary positions\n var eO = this.offset(this.el);\n this.elT = this.wmargin ? Math.abs(eO.top) : eO.top;\n this.elL = this.wmargin ? Math.abs(eO.left) : eO.left;\n var rY = e.pageY - this.elT + this.el.scrollTop;\n var rX = e.pageX - this.elL + this.el.scrollLeft;\n\n if (this.canvasRelative && em) {\n var mousePos = em.get('Canvas').getMouseRelativeCanvas(e);\n rX = mousePos.x;\n rY = mousePos.y;\n }\n\n this.rX = rX;\n this.rY = rY;\n this.eventMove = e;\n\n //var targetNew = this.getTargetFromEl(e.target);\n const sourceModel = this.getSourceModel();\n const dims = this.dimsFromTarget(e.target, rX, rY);\n const target = this.target;\n const targetModel = target && this.getTargetModel(target);\n this.selectTargetModel(targetModel);\n if (!targetModel) plh.style.display = 'none';\n if (!target) return;\n\n this.lastDims = dims;\n const pos = this.findPosition(dims, rX, rY);\n\n if (this.isTextableActive(sourceModel, targetModel)) {\n this.activeTextModel = targetModel;\n this.setContentEditable(targetModel, true);\n\n plh.style.display = 'none';\n this.lastPos = pos;\n this.updateTextViewCursorPosition(ev);\n } else {\n this.disableTextable();\n this.activeTextModel = null;\n\n // If there is a significant changes with the pointer\n if (\n !this.lastPos ||\n (this.lastPos.index != pos.index || this.lastPos.method != pos.method)\n ) {\n this.movePlaceholder(this.plh, dims, pos, this.prevTargetDim);\n if (!this.$plh) this.$plh = $(this.plh);\n\n // With canvasRelative the offset is calculated automatically for\n // each element\n if (!this.canvasRelative) {\n if (this.offTop) this.$plh.css('top', '+=' + this.offTop + 'px');\n if (this.offLeft) this.$plh.css('left', '+=' + this.offLeft + 'px');\n }\n\n this.lastPos = pos;\n }\n }\n\n isFunction(onMoveClb) && onMoveClb(e);\n\n em &&\n em.trigger('sorter:drag', {\n target,\n targetModel,\n sourceModel,\n dims,\n pos,\n x: rX,\n y: rY\n });\n },\n\n isTextableActive(src, trg) {\n return src && src.get && src.get('textable') && trg && trg.is('text');\n },\n\n disableTextable() {\n const { activeTextModel } = this;\n activeTextModel && activeTextModel.getView().disableEditing();\n },\n\n /**\n * Returns true if the elements is in flow, so is not in flow where\n * for example the component is with float:left\n * @param {HTMLElement} el\n * @param {HTMLElement} parent\n * @return {Boolean}\n * @private\n * */\n isInFlow(el, parent) {\n if (!el) return false;\n\n parent = parent || document.body;\n var ch = -1,\n h;\n var elem = el;\n h = elem.offsetHeight;\n if (/*h < ch || */ !this.styleInFlow(elem, parent)) return false;\n else return true;\n },\n\n /**\n * Check if el has style to be in flow\n * @param {HTMLElement} el\n * @param {HTMLElement} parent\n * @return {Boolean}\n * @private\n */\n styleInFlow(el, parent) {\n if (isTextNode(el)) return;\n const style = el.style || {};\n const $el = $(el);\n const $parent = parent && $(parent);\n\n if (style.overflow && style.overflow !== 'visible') return;\n if ($el.css('float') !== 'none') return;\n if (\n $parent &&\n $parent.css('display') == 'flex' &&\n $parent.css('flex-direction') !== 'column'\n )\n return;\n switch (style.position) {\n case 'static':\n case 'relative':\n case '':\n break;\n default:\n return;\n }\n switch (el.tagName) {\n case 'TR':\n case 'TBODY':\n case 'THEAD':\n case 'TFOOT':\n return true;\n }\n switch ($el.css('display')) {\n case 'block':\n case 'list-item':\n case 'table':\n case 'flex':\n return true;\n }\n return;\n },\n\n /**\n * Check if the target is valid with the actual source\n * @param {HTMLElement} trg\n * @return {Boolean}\n */\n validTarget(trg, src) {\n const trgModel = this.getTargetModel(trg);\n const srcModel = this.getSourceModel(src, { target: trgModel });\n src = srcModel && srcModel.view && srcModel.view.el;\n trg = trgModel && trgModel.view && trgModel.view.el;\n let result = {\n valid: true,\n src,\n srcModel,\n trg,\n trgModel\n };\n\n if (!src || !trg) {\n result.valid = false;\n return result;\n }\n\n // check if the source is draggable in target\n let draggable = srcModel.get('draggable');\n draggable = draggable instanceof Array ? draggable.join(', ') : draggable;\n result.dragInfo = draggable;\n draggable = isString(draggable) ? this.matches(trg, draggable) : draggable;\n result.draggable = draggable;\n\n // Check if the target could accept the source\n let droppable = trgModel.get('droppable');\n droppable = droppable instanceof Backbone.Collection ? 1 : droppable;\n droppable = droppable instanceof Array ? droppable.join(', ') : droppable;\n result.dropInfo = droppable;\n droppable = isString(droppable) ? this.matches(src, droppable) : droppable;\n droppable =\n draggable && this.isTextableActive(srcModel, trgModel) ? 1 : droppable;\n result.droppable = droppable;\n\n if (!droppable || !draggable) {\n result.valid = false;\n }\n\n return result;\n },\n\n /**\n * Get dimensions of nodes relative to the coordinates\n * @param {HTMLElement} target\n * @param {number} rX Relative X position\n * @param {number} rY Relative Y position\n * @return {Array}\n */\n dimsFromTarget(target, rX, rY) {\n const em = this.em;\n var dims = [];\n\n if (!target) {\n return dims;\n }\n\n // Select the first valuable target\n if (!this.matches(target, `${this.itemSel}, ${this.containerSel}`)) {\n target = this.closest(target, this.itemSel);\n }\n\n // If draggable is an array the target will be one of those\n if (this.draggable instanceof Array) {\n target = this.closest(target, this.draggable.join(','));\n }\n\n if (!target) {\n return dims;\n }\n\n // Check if the target is different from the previous one\n if (this.prevTarget && this.prevTarget != target) {\n this.prevTarget = null;\n }\n\n // New target found\n if (!this.prevTarget) {\n this.targetP = this.closest(target, this.containerSel);\n\n // Check if the source is valid with the target\n let validResult = this.validTarget(target);\n em && em.trigger('sorter:drag:validation', validResult);\n\n if (!validResult.valid && this.targetP) {\n return this.dimsFromTarget(this.targetP, rX, rY);\n }\n\n this.prevTarget = target;\n this.prevTargetDim = this.getDim(target);\n this.cacheDimsP = this.getChildrenDim(this.targetP);\n this.cacheDims = this.getChildrenDim(target);\n }\n\n // If the target is the previous one will return the cached dims\n if (this.prevTarget == target) dims = this.cacheDims;\n\n // Target when I will drop element to sort\n this.target = this.prevTarget;\n\n // Generally, on any new target the poiner enters inside its area and\n // triggers nearBorders(), so have to take care of this\n if (\n this.nearBorders(this.prevTargetDim, rX, rY) ||\n (!this.nested && !this.cacheDims.length)\n ) {\n const targetParent = this.targetP;\n\n if (targetParent && this.validTarget(targetParent).valid) {\n dims = this.cacheDimsP;\n this.target = targetParent;\n }\n }\n\n this.lastPos = null;\n return dims;\n },\n\n /**\n * Get valid target from element\n * This method should replace dimsFromTarget()\n * @param {HTMLElement} el\n * @return {HTMLElement}\n */\n getTargetFromEl(el) {\n let target = el;\n let targetParent;\n let targetPrev = this.targetPrev;\n const em = this.em;\n const containerSel = this.containerSel;\n const itemSel = this.itemSel;\n\n // Select the first valuable target\n if (!this.matches(target, `${itemSel}, ${containerSel}`)) {\n target = this.closest(target, itemSel);\n }\n\n // If draggable is an array the target will be one of those\n // TODO check if this options is used somewhere\n if (this.draggable instanceof Array) {\n target = this.closest(target, this.draggable.join(','));\n }\n\n // Check if the target is different from the previous one\n if (targetPrev && targetPrev != target) {\n this.targetPrev = '';\n }\n\n // New target found\n if (!this.targetPrev) {\n targetParent = this.closest(target, containerSel);\n\n // If the current target is not valid (src/trg reasons) try with\n // the parent one (if exists)\n const validResult = this.validTarget(target);\n em && em.trigger('sorter:drag:validation', validResult);\n\n if (!validResult.valid && targetParent) {\n return this.getTargetFromEl(targetParent);\n }\n\n this.targetPrev = target;\n }\n\n // Generally, on any new target the poiner enters inside its area and\n // triggers nearBorders(), so have to take care of this\n if (this.nearElBorders(target)) {\n targetParent = this.closest(target, containerSel);\n\n if (targetParent && this.validTarget(targetParent).valid) {\n target = targetParent;\n }\n }\n\n return target;\n },\n\n /**\n * Check if the current pointer is neare to element borders\n * @return {Boolen}\n */\n nearElBorders(el) {\n const off = 10;\n const rect = el.getBoundingClientRect();\n const body = el.ownerDocument.body;\n const { x, y } = this.getCurrentPos();\n const top = rect.top + body.scrollTop;\n const left = rect.left + body.scrollLeft;\n const width = rect.width;\n const height = rect.height;\n\n if (\n y < top + off || // near top edge\n y > top + height - off || // near bottom edge\n x < left + off || // near left edge\n x > left + width - off // near right edge\n ) {\n return 1;\n }\n },\n\n getCurrentPos() {\n const ev = this.eventMove;\n const x = ev.pageX || 0;\n const y = ev.pageY || 0;\n return { x, y };\n },\n\n /**\n * Returns dimensions and positions about the element\n * @param {HTMLElement} el\n * @return {Array}\n */\n getDim(el) {\n const { em, canvasRelative } = this;\n var top, left, height, width;\n\n if (canvasRelative && em) {\n const canvas = em.get('Canvas');\n const pos = canvas.getElementPos(el);\n const elOffsets = canvas.getElementOffsets(el);\n top = pos.top - elOffsets.marginTop;\n left = pos.left - elOffsets.marginLeft;\n height = pos.height + elOffsets.marginTop + elOffsets.marginBottom;\n width = pos.width + elOffsets.marginLeft + elOffsets.marginRight;\n } else {\n var o = this.offset(el);\n top = this.relative\n ? el.offsetTop\n : o.top - (this.wmargin ? -1 : 1) * this.elT;\n left = this.relative\n ? el.offsetLeft\n : o.left - (this.wmargin ? -1 : 1) * this.elL;\n height = el.offsetHeight;\n width = el.offsetWidth;\n }\n\n return [top, left, height, width];\n },\n\n /**\n * Get children dimensions\n * @param {HTMLELement} el Element root\n * @retun {Array}\n * */\n getChildrenDim(trg) {\n const dims = [];\n if (!trg) return dims;\n\n // Get children based on getChildrenContainer\n const trgModel = this.getTargetModel(trg);\n if (trgModel && trgModel.view && !this.ignoreViewChildren) {\n trg = trgModel.view.getChildrenContainer();\n }\n\n each(trg.children, (el, i) => {\n const model = getModel(el, $);\n const elIndex = model && model.index ? model.index() : i;\n\n if (!isTextNode(el) && !this.matches(el, this.itemSel)) {\n return;\n }\n\n const dim = this.getDim(el);\n let dir = this.direction;\n\n if (dir == 'v') dir = true;\n else if (dir == 'h') dir = false;\n else dir = this.isInFlow(el, trg);\n\n dim.push(dir, el, elIndex);\n dims.push(dim);\n });\n\n return dims;\n },\n\n /**\n * Check if the coordinates are near to the borders\n * @param {Array} dim\n * @param {number} rX Relative X position\n * @param {number} rY Relative Y position\n * @return {Boolean}\n * */\n nearBorders(dim, rX, rY) {\n var result = 0;\n var off = this.borderOffset;\n var x = rX || 0;\n var y = rY || 0;\n var t = dim[0];\n var l = dim[1];\n var h = dim[2];\n var w = dim[3];\n if (t + off > y || y > t + h - off || l + off > x || x > l + w - off)\n result = 1;\n\n return !!result;\n },\n\n /**\n * Find the position based on passed dimensions and coordinates\n * @param {Array} dims Dimensions of nodes to parse\n * @param {number} posX X coordindate\n * @param {number} posY Y coordindate\n * @retun {Object}\n * */\n findPosition(dims, posX, posY) {\n var result = { index: 0, indexEl: 0, method: 'before' };\n var leftLimit = 0,\n xLimit = 0,\n dimRight = 0,\n yLimit = 0,\n xCenter = 0,\n yCenter = 0,\n dimDown = 0,\n dim = 0;\n // Each dim is: Top, Left, Height, Width\n for (var i = 0, len = dims.length; i < len; i++) {\n dim = dims[i];\n // Right position of the element. Left + Width\n dimRight = dim[1] + dim[3];\n // Bottom position of the element. Top + Height\n dimDown = dim[0] + dim[2];\n // X center position of the element. Left + (Width / 2)\n xCenter = dim[1] + dim[3] / 2;\n // Y center position of the element. Top + (Height / 2)\n yCenter = dim[0] + dim[2] / 2;\n // Skip if over the limits\n if (\n (xLimit && dim[1] > xLimit) ||\n (yLimit && yCenter >= yLimit) || // >= avoid issue with clearfixes\n (leftLimit && dimRight < leftLimit)\n )\n continue;\n result.index = i;\n result.indexEl = dim[6];\n // If it's not in flow (like 'float' element)\n if (!dim[4]) {\n if (posY < dimDown) yLimit = dimDown;\n //If x lefter than center\n if (posX < xCenter) {\n xLimit = xCenter;\n result.method = 'before';\n } else {\n leftLimit = xCenter;\n result.method = 'after';\n }\n } else {\n // If y upper than center\n if (posY < yCenter) {\n result.method = 'before';\n break;\n } else result.method = 'after'; // After last element\n }\n }\n return result;\n },\n\n /**\n * Updates the position of the placeholder\n * @param {HTMLElement} phl\n * @param {Array} dims\n * @param {Object} pos Position object\n * @param {Array} trgDim target dimensions\n * */\n movePlaceholder(plh, dims, pos, trgDim) {\n var marg = 0,\n t = 0,\n l = 0,\n w = 0,\n h = 0,\n un = 'px',\n margI = 5,\n brdCol = '#62c462',\n brd = 3,\n method = pos.method;\n var elDim = dims[pos.index];\n plh.style.borderColor = 'transparent ' + brdCol;\n plh.style.borderWidth = brd + un + ' ' + (brd + 2) + un;\n plh.style.margin = '-' + brd + 'px 0 0';\n if (elDim) {\n // If it's not in flow (like 'float' element)\n if (!elDim[4]) {\n w = 'auto';\n h = elDim[2] - marg * 2 + un;\n t = elDim[0] + marg;\n l = method == 'before' ? elDim[1] - marg : elDim[1] + elDim[3] - marg;\n plh.style.borderColor = brdCol + ' transparent';\n plh.style.borderWidth = brd + 2 + un + ' ' + brd + un;\n plh.style.margin = '0 0 0 -' + brd + 'px';\n } else {\n w = elDim[3] + un;\n h = 'auto';\n t = method == 'before' ? elDim[0] - marg : elDim[0] + elDim[2] - marg;\n l = elDim[1];\n }\n } else {\n if (!this.nested) {\n plh.style.display = 'none';\n return;\n }\n if (trgDim) {\n t = trgDim[0] + margI;\n l = trgDim[1] + margI;\n w = parseInt(trgDim[3]) - margI * 2 + un;\n h = 'auto';\n }\n }\n plh.style.top = t + un;\n plh.style.left = l + un;\n if (w) plh.style.width = w;\n if (h) plh.style.height = h;\n },\n\n /**\n * Leave item\n * @param event\n *\n * @return void\n * */\n endMove(e) {\n const moved = [null];\n const docs = this.getDocuments();\n const container = this.getContainerEl();\n const onEndMove = this.onEndMove;\n const { target, lastPos } = this;\n off(container, 'mousemove dragover', this.onMove);\n off(docs, 'mouseup dragend touchend', this.endMove);\n off(docs, 'keydown', this.rollback);\n this.plh.style.display = 'none';\n let src = this.eV;\n\n if (src && this.selectOnEnd) {\n var srcModel = this.getSourceModel();\n if (srcModel && srcModel.set) {\n srcModel.set('status', '');\n srcModel.set('status', 'selected');\n }\n }\n\n if (this.moved) {\n const toMove = this.toMove;\n const toMoveArr = isArray(toMove) ? toMove : toMove ? [toMove] : [src];\n toMoveArr.forEach(model => {\n moved.push(this.move(target, model, lastPos));\n });\n }\n\n if (this.plh) this.plh.style.display = 'none';\n var dragHelper = this.dragHelper;\n\n if (dragHelper) {\n dragHelper.parentNode.removeChild(dragHelper);\n this.dragHelper = null;\n }\n\n this.disableTextable();\n this.selectTargetModel();\n this.toggleSortCursor();\n\n this.toMove = null;\n isFunction(onEndMove) && moved.forEach(m => onEndMove(m, this));\n },\n\n /**\n * Move component to new position\n * @param {HTMLElement} dst Destination target\n * @param {HTMLElement} src Element to move\n * @param {Object} pos Object with position coordinates\n * */\n move(dst, src, pos) {\n const { em, activeTextModel, dropContent } = this;\n const srcEl = getElement(src);\n em && em.trigger('component:dragEnd:before', dst, srcEl, pos); // @depricated\n var warns = [];\n var index = pos.indexEl;\n var modelToDrop, modelTemp, created;\n var validResult = this.validTarget(dst, srcEl);\n var targetCollection = $(dst).data('collection');\n var model = validResult.srcModel;\n var droppable = validResult.droppable;\n var draggable = validResult.draggable;\n var dropInfo = validResult.dropInfo;\n var dragInfo = validResult.dragInfo;\n const { trgModel } = validResult;\n droppable = trgModel instanceof Backbone.Collection ? 1 : droppable;\n const isTextableActive = this.isTextableActive(model, trgModel);\n\n if (targetCollection && droppable && draggable) {\n index = pos.method === 'after' ? index + 1 : index;\n var opts = { at: index, noIncrement: 1 };\n\n if (!dropContent) {\n // Putting `avoidStore` here will make the UndoManager behave wrong\n opts.temporary = 1;\n modelTemp = targetCollection.add({}, { ...opts });\n\n if (model.collection) {\n modelToDrop = model.collection.remove(model, { temporary: 1 });\n }\n } else {\n modelToDrop = dropContent;\n opts.silent = false;\n opts.avoidUpdateStyle = 1;\n }\n\n if (isTextableActive) {\n const viewActive = activeTextModel.getView();\n activeTextModel.trigger('active');\n const { activeRte } = viewActive;\n const modelEl = model.getEl();\n delete model.opt.temporary;\n model.getView().render();\n modelEl.setAttribute('data-gjs-textable', 'true');\n const { outerHTML } = modelEl;\n activeRte.insertHTML && activeRte.insertHTML(outerHTML);\n } else {\n created = targetCollection.add(modelToDrop, opts);\n }\n\n if (!dropContent) {\n targetCollection.remove(modelTemp);\n } else {\n this.dropContent = null;\n }\n\n // This will cause to recalculate children dimensions\n this.prevTarget = null;\n } else {\n if (!targetCollection) {\n warns.push('Target collection not found');\n }\n\n if (!droppable) {\n warns.push(`Target is not droppable, accepts [${dropInfo}]`);\n }\n\n if (!draggable) {\n warns.push(`Component not draggable, acceptable by [${dragInfo}]`);\n }\n\n console.warn('Invalid target position: ' + warns.join(', '));\n }\n\n em && em.trigger('component:dragEnd', targetCollection, modelToDrop, warns); // @depricated\n em &&\n em.trigger('sorter:drag:end', {\n targetCollection,\n modelToDrop,\n warns,\n validResult,\n dst,\n srcEl\n });\n\n return created;\n },\n\n /**\n * Rollback to previous situation\n * @param {Event}\n * @param {Bool} Indicates if rollback in anycase\n * */\n rollback(e) {\n off(this.getDocuments(), 'keydown', this.rollback);\n const key = e.which || e.keyCode;\n\n if (key == 27) {\n this.moved = 0;\n this.endMove();\n }\n }\n});\n","import { bindAll, defaults, isFunction, each } from 'underscore';\nimport { on, off, normalizeFloat } from 'utils/mixins';\n\nvar defaultOpts = {\n // Function which returns custom X and Y coordinates of the mouse\n mousePosFetcher: null,\n // Indicates custom target updating strategy\n updateTarget: null,\n // Function which gets HTMLElement as an arg and returns it relative position\n ratioDefault: 0,\n posFetcher: null,\n onStart: null,\n onMove: null,\n onEnd: null,\n\n // Resize unit step\n step: 1,\n\n // Minimum dimension\n minDim: 32,\n\n // Maximum dimension\n maxDim: '',\n\n // Unit used for height resizing\n unitHeight: 'px',\n\n // Unit used for width resizing\n unitWidth: 'px',\n\n // The key used for height resizing\n keyHeight: 'height',\n\n // The key used for width resizing\n keyWidth: 'width',\n\n // If true, will override unitHeight and unitWidth, on start, with units\n // from the current focused element (currently used only in SelectComponent)\n currentUnit: 1,\n\n // With this option active the mousemove event won't be altered when\n // the pointer comes over iframes\n silentFrames: 0,\n\n // If true the container of handlers won't be updated\n avoidContainerUpdate: 0,\n\n // If height is 'auto', this setting will preserve it and only update width\n keepAutoHeight: false,\n\n // If width is 'auto', this setting will preserve it and only update height\n keepAutoWidth: false,\n\n // When keepAutoHeight is true and the height has the value 'auto', this is set to true and height isn't updated\n autoHeight: false,\n\n // When keepAutoWidth is true and the width has the value 'auto', this is set to true and width isn't updated\n autoWidth: false,\n\n // Handlers\n tl: 1, // Top left\n tc: 1, // Top center\n tr: 1, // Top right\n cl: 1, // Center left\n cr: 1, // Center right\n bl: 1, // Bottom left\n bc: 1, // Bottom center\n br: 1 // Bottom right\n};\n\nvar createHandler = (name, opts) => {\n var pfx = opts.prefix || '';\n var el = document.createElement('i');\n el.className = pfx + 'resizer-h ' + pfx + 'resizer-h-' + name;\n el.setAttribute('data-' + pfx + 'handler', name);\n return el;\n};\n\nvar getBoundingRect = (el, win) => {\n var w = win || window;\n var rect = el.getBoundingClientRect();\n return {\n left: rect.left + w.pageXOffset,\n top: rect.top + w.pageYOffset,\n width: rect.width,\n height: rect.height\n };\n};\n\nclass Resizer {\n /**\n * Init the Resizer with options\n * @param {Object} options\n */\n constructor(opts = {}) {\n this.setOptions(opts);\n bindAll(this, 'handleKeyDown', 'handleMouseDown', 'move', 'stop');\n return this;\n }\n\n /**\n * Get current connfiguration options\n * @return {Object}\n */\n getConfig() {\n return this.opts;\n }\n\n /**\n * Setup options\n * @param {Object} options\n */\n setOptions(options = {}) {\n this.opts = defaults(options, defaultOpts);\n this.setup();\n }\n\n /**\n * Setup resizer\n */\n setup() {\n const opts = this.opts;\n const pfx = opts.prefix || '';\n const appendTo = opts.appendTo || document.body;\n let container = this.container;\n\n // Create container if not yet exist\n if (!container) {\n container = document.createElement('div');\n container.className = `${pfx}resizer-c`;\n appendTo.appendChild(container);\n this.container = container;\n }\n\n while (container.firstChild) {\n container.removeChild(container.firstChild);\n }\n\n // Create handlers\n const handlers = {};\n ['tl', 'tc', 'tr', 'cl', 'cr', 'bl', 'bc', 'br'].forEach(\n hdl => (handlers[hdl] = opts[hdl] ? createHandler(hdl, opts) : '')\n );\n\n for (let n in handlers) {\n const handler = handlers[n];\n handler && container.appendChild(handler);\n }\n\n this.handlers = handlers;\n this.mousePosFetcher = opts.mousePosFetcher;\n this.updateTarget = opts.updateTarget;\n this.posFetcher = opts.posFetcher;\n this.onStart = opts.onStart;\n this.onMove = opts.onMove;\n this.onEnd = opts.onEnd;\n }\n\n /**\n * Toggle iframes pointer event\n * @param {Boolean} silent If true, iframes will be silented\n */\n toggleFrames(silent) {\n if (this.opts.silentFrames) {\n const frames = document.querySelectorAll('iframe');\n each(frames, frame => (frame.style.pointerEvents = silent ? 'none' : ''));\n }\n }\n\n /**\n * Detects if the passed element is a resize handler\n * @param {HTMLElement} el\n * @return {Boolean}\n */\n isHandler(el) {\n var handlers = this.handlers;\n\n for (var n in handlers) {\n if (handlers[n] === el) return true;\n }\n\n return false;\n }\n\n /**\n * Returns the focused element\n * @return {HTMLElement}\n */\n getFocusedEl() {\n return this.el;\n }\n\n /**\n * Returns documents\n */\n getDocumentEl() {\n return [this.el.ownerDocument, document];\n }\n\n /**\n * Return element position\n * @param {HTMLElement} el\n * @param {Object} opts Custom options\n * @return {Object}\n */\n getElementPos(el, opts = {}) {\n var posFetcher = this.posFetcher || '';\n return posFetcher ? posFetcher(el, opts) : getBoundingRect(el);\n }\n\n /**\n * Focus resizer on the element, attaches handlers to it\n * @param {HTMLElement} el\n */\n focus(el) {\n // Avoid focusing on already focused element\n if (el && el === this.el) {\n return;\n }\n\n this.el = el;\n this.updateContainer({ forceShow: 1 });\n on(this.getDocumentEl(), 'mousedown', this.handleMouseDown);\n }\n\n /**\n * Blur from element\n */\n blur() {\n this.container.style.display = 'none';\n\n if (this.el) {\n off(this.getDocumentEl(), 'mousedown', this.handleMouseDown);\n this.el = null;\n }\n }\n\n /**\n * Start resizing\n * @param {Event} e\n */\n start(e) {\n //Right or middel click\n if (e.button !== 0) return;\n e.preventDefault();\n e.stopPropagation();\n const el = this.el;\n const resizer = this;\n const config = this.opts || {};\n var attrName = 'data-' + config.prefix + 'handler';\n var rect = this.getElementPos(el, { target: 'el' });\n this.handlerAttr = e.target.getAttribute(attrName);\n this.clickedHandler = e.target;\n this.startDim = {\n t: rect.top,\n l: rect.left,\n w: rect.width,\n h: rect.height\n };\n this.rectDim = {\n t: rect.top,\n l: rect.left,\n w: rect.width,\n h: rect.height\n };\n this.startPos = {\n x: e.clientX,\n y: e.clientY\n };\n\n // Listen events\n var doc = this.getDocumentEl();\n on(doc, 'mousemove', this.move);\n on(doc, 'keydown', this.handleKeyDown);\n on(doc, 'mouseup', this.stop);\n isFunction(this.onStart) &&\n this.onStart(e, { docs: doc, config, el, resizer });\n this.toggleFrames(1);\n this.move(e);\n }\n\n /**\n * While resizing\n * @param {Event} e\n */\n move(e) {\n const onMove = this.onMove;\n var mouseFetch = this.mousePosFetcher;\n var currentPos = mouseFetch\n ? mouseFetch(e)\n : {\n x: e.clientX,\n y: e.clientY\n };\n\n this.currentPos = currentPos;\n this.delta = {\n x: currentPos.x - this.startPos.x,\n y: currentPos.y - this.startPos.y\n };\n this.keys = {\n shift: e.shiftKey,\n ctrl: e.ctrlKey,\n alt: e.altKey\n };\n\n this.rectDim = this.calc(this);\n this.updateRect(0);\n\n // Move callback\n onMove && onMove(e);\n\n // In case the mouse button was released outside of the window\n if (e.which === 0) {\n this.stop(e);\n }\n }\n\n /**\n * Stop resizing\n * @param {Event} e\n */\n stop(e) {\n const config = this.opts;\n var doc = this.getDocumentEl();\n off(doc, 'mousemove', this.move);\n off(doc, 'keydown', this.handleKeyDown);\n off(doc, 'mouseup', this.stop);\n this.updateRect(1);\n this.toggleFrames();\n isFunction(this.onEnd) && this.onEnd(e, { docs: doc, config });\n }\n\n /**\n * Update rect\n */\n updateRect(store) {\n const el = this.el;\n const resizer = this;\n const config = this.opts;\n const rect = this.rectDim;\n const updateTarget = this.updateTarget;\n const selectedHandler = this.getSelectedHandler();\n const { unitHeight, unitWidth, keyWidth, keyHeight } = config;\n\n // Use custom updating strategy if requested\n if (isFunction(updateTarget)) {\n updateTarget(el, rect, {\n store,\n selectedHandler,\n resizer,\n config\n });\n } else {\n const elStyle = el.style;\n elStyle[keyWidth] = rect.w + unitWidth;\n elStyle[keyHeight] = rect.h + unitHeight;\n }\n\n this.updateContainer();\n }\n\n updateContainer(opt = {}) {\n const { opts, container, el } = this;\n const { style } = container;\n\n if (!opts.avoidContainerUpdate && el) {\n const toUpdate = ['left', 'top', 'width', 'height'];\n const rectEl = this.getElementPos(el, { target: 'container' });\n toUpdate.forEach(pos => (style[pos] = `${rectEl[pos]}px`));\n if (opt.forceShow) style.display = 'block';\n }\n }\n\n /**\n * Get selected handler name\n * @return {string}\n */\n getSelectedHandler() {\n var handlers = this.handlers;\n\n if (!this.selectedHandler) {\n return;\n }\n\n for (let n in handlers) {\n if (handlers[n] === this.selectedHandler) return n;\n }\n }\n\n /**\n * Handle ESC key\n * @param {Event} e\n */\n handleKeyDown(e) {\n if (e.keyCode === 27) {\n // Rollback to initial dimensions\n this.rectDim = this.startDim;\n this.stop(e);\n }\n }\n\n /**\n * Handle mousedown to check if it's possible to start resizing\n * @param {Event} e\n */\n handleMouseDown(e) {\n var el = e.target;\n if (this.isHandler(el)) {\n this.selectedHandler = el;\n this.start(e);\n } else if (el !== this.el) {\n this.selectedHandler = '';\n this.blur();\n }\n }\n\n /**\n * All positioning logic\n * @return {Object}\n */\n calc(data) {\n let value;\n const opts = this.opts || {};\n const step = opts.step;\n const startDim = this.startDim;\n const minDim = opts.minDim;\n const maxDim = opts.maxDim;\n const deltaX = data.delta.x;\n const deltaY = data.delta.y;\n const startW = startDim.w;\n const startH = startDim.h;\n var box = {\n t: 0,\n l: 0,\n w: startW,\n h: startH\n };\n\n if (!data) return;\n\n var attr = data.handlerAttr;\n if (~attr.indexOf('r')) {\n value = normalizeFloat(startW + deltaX * step, step);\n value = Math.max(minDim, value);\n maxDim && (value = Math.min(maxDim, value));\n box.w = value;\n }\n if (~attr.indexOf('b')) {\n value = normalizeFloat(startH + deltaY * step, step);\n value = Math.max(minDim, value);\n maxDim && (value = Math.min(maxDim, value));\n box.h = value;\n }\n if (~attr.indexOf('l')) {\n value = normalizeFloat(startW - deltaX * step, step);\n value = Math.max(minDim, value);\n maxDim && (value = Math.min(maxDim, value));\n box.w = value;\n }\n if (~attr.indexOf('t')) {\n value = normalizeFloat(startH - deltaY * step, step);\n value = Math.max(minDim, value);\n maxDim && (value = Math.min(maxDim, value));\n box.h = value;\n }\n\n // Enforce aspect ratio (unless shift key is being held)\n var ratioActive = opts.ratioDefault ? !data.keys.shift : data.keys.shift;\n if (attr.indexOf('c') < 0 && ratioActive) {\n var ratio = startDim.w / startDim.h;\n if (box.w / box.h > ratio) {\n box.h = Math.round(box.w / ratio);\n } else {\n box.w = Math.round(box.h * ratio);\n }\n }\n\n if (~attr.indexOf('l')) {\n box.l = startDim.w - box.w;\n }\n if (~attr.indexOf('t')) {\n box.t = startDim.h - box.h;\n }\n\n return box;\n }\n}\n\nexport default {\n init(opts) {\n return new Resizer(opts);\n }\n};\n","import Dragger from './Dragger';\nimport Sorter from './Sorter';\nimport Resizer from './Resizer';\n\nexport default () => {\n return {\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Utils',\n\n /**\n * Initialize module\n */\n init() {\n return this;\n },\n\n Sorter,\n Resizer,\n Dragger\n };\n};\n","// The initial version of this RTE was borrowed from https://github.com/jaredreich/pell\n// and adapted to the GrapesJS's need\n\nimport { on, off } from 'utils/mixins';\n\nconst RTE_KEY = '_rte';\n\nconst btnState = {\n ACTIVE: 1,\n INACTIVE: 0,\n DISABLED: -1\n};\nconst isValidAnchor = rte => {\n const anchor = rte.selection().anchorNode;\n const parentNode = anchor && anchor.parentNode;\n const nextSibling = anchor && anchor.nextSibling;\n return (\n (parentNode && parentNode.nodeName == 'A') ||\n (nextSibling && nextSibling.nodeName == 'A')\n );\n};\nconst defActions = {\n bold: {\n name: 'bold',\n icon: 'B',\n attributes: { title: 'Bold' },\n result: rte => rte.exec('bold')\n },\n italic: {\n name: 'italic',\n icon: 'I',\n attributes: { title: 'Italic' },\n result: rte => rte.exec('italic')\n },\n underline: {\n name: 'underline',\n icon: 'U',\n attributes: { title: 'Underline' },\n result: rte => rte.exec('underline')\n },\n strikethrough: {\n name: 'strikethrough',\n icon: 'S',\n attributes: { title: 'Strike-through' },\n result: rte => rte.exec('strikeThrough')\n },\n link: {\n icon: ``,\n name: 'link',\n attributes: {\n style: 'font-size:1.4rem;padding:0 4px 2px;',\n title: 'Link'\n },\n state: (rte, doc) => {\n if (rte && rte.selection()) {\n return isValidAnchor(rte) ? btnState.ACTIVE : btnState.INACTIVE;\n } else {\n return btnState.INACTIVE;\n }\n },\n result: rte => {\n if (isValidAnchor(rte)) {\n rte.exec('unlink');\n } else {\n rte.insertHTML(`${rte.selection()}`);\n }\n }\n }\n};\n\nexport default class RichTextEditor {\n constructor(settings = {}) {\n const el = settings.el;\n\n if (el[RTE_KEY]) {\n return el[RTE_KEY];\n }\n\n el[RTE_KEY] = this;\n this.setEl(el);\n this.updateActiveActions = this.updateActiveActions.bind(this);\n\n const settAct = settings.actions || [];\n settAct.forEach((action, i) => {\n if (typeof action === 'string') {\n action = defActions[action];\n } else if (defActions[action.name]) {\n action = { ...defActions[action.name], ...action };\n }\n settAct[i] = action;\n });\n const actions = settAct.length\n ? settAct\n : Object.keys(defActions).map(action => defActions[action]);\n\n settings.classes = {\n ...{\n actionbar: 'actionbar',\n button: 'action',\n active: 'active',\n disabled: 'disabled',\n inactive: 'inactive'\n },\n ...settings.classes\n };\n\n const classes = settings.classes;\n let actionbar = settings.actionbar;\n this.actionbar = actionbar;\n this.settings = settings;\n this.classes = classes;\n this.actions = actions;\n\n if (!actionbar) {\n const actionbarCont = settings.actionbarContainer;\n actionbar = document.createElement('div');\n actionbar.className = classes.actionbar;\n actionbarCont.appendChild(actionbar);\n this.actionbar = actionbar;\n actions.forEach(action => this.addAction(action));\n }\n\n settings.styleWithCSS && this.exec('styleWithCSS');\n this.syncActions();\n\n return this;\n }\n\n destroy() {\n this.el = 0;\n this.doc = 0;\n this.actionbar = 0;\n this.settings = {};\n this.classes = {};\n this.actions = [];\n }\n\n setEl(el) {\n this.el = el;\n this.doc = el.ownerDocument;\n }\n\n updateActiveActions() {\n this.getActions().forEach(action => {\n const btn = action.btn;\n const update = action.update;\n const { active, inactive, disabled } = { ...this.classes };\n const state = action.state;\n const name = action.name;\n const doc = this.doc;\n btn.className = btn.className.replace(active, '').trim();\n btn.className = btn.className.replace(inactive, '').trim();\n btn.className = btn.className.replace(disabled, '').trim();\n\n // if there is a state function, which depicts the state,\n // i.e. `active`, `disabled`, then call it\n if (state) {\n switch (state(this, doc)) {\n case btnState.ACTIVE:\n btn.className += ` ${active}`;\n break;\n case btnState.INACTIVE:\n btn.className += ` ${inactive}`;\n break;\n case btnState.DISABLED:\n btn.className += ` ${disabled}`;\n break;\n }\n } else {\n // otherwise default to checking if the name command is supported & enabled\n if (doc.queryCommandSupported(name) && doc.queryCommandState(name)) {\n btn.className += ` ${active}`;\n }\n }\n update && update(this, action);\n });\n }\n\n enable() {\n if (this.enabled) {\n return this;\n }\n\n this.actionbarEl().style.display = '';\n this.el.contentEditable = true;\n on(this.el, 'mouseup keyup', this.updateActiveActions);\n this.syncActions();\n this.updateActiveActions();\n this.el.focus();\n this.enabled = 1;\n return this;\n }\n\n disable() {\n this.actionbarEl().style.display = 'none';\n this.el.contentEditable = false;\n off(this.el, 'mouseup keyup', this.updateActiveActions);\n this.enabled = 0;\n return this;\n }\n\n /**\n * Sync actions with the current RTE\n */\n syncActions() {\n this.getActions().forEach(action => {\n if (this.settings.actionbar) {\n if (\n !action.state ||\n (action.state && action.state(this, this.doc) >= 0)\n ) {\n const event = action.event || 'click';\n action.btn[`on${event}`] = e => {\n action.result(this, action);\n this.updateActiveActions();\n };\n }\n }\n });\n }\n\n /**\n * Add new action to the actionbar\n * @param {Object} action\n * @param {Object} [opts={}]\n */\n addAction(action, opts = {}) {\n const sync = opts.sync;\n const btn = document.createElement('span');\n const icon = action.icon;\n const attr = action.attributes || {};\n btn.className = this.classes.button;\n action.btn = btn;\n\n for (let key in attr) {\n btn.setAttribute(key, attr[key]);\n }\n\n if (typeof icon == 'string') {\n btn.innerHTML = icon;\n } else {\n btn.appendChild(icon);\n }\n\n this.actionbarEl().appendChild(btn);\n\n if (sync) {\n this.actions.push(action);\n this.syncActions();\n }\n }\n\n /**\n * Get the array of current actions\n * @return {Array}\n */\n getActions() {\n return this.actions;\n }\n\n /**\n * Returns the Selection instance\n * @return {Selection}\n */\n selection() {\n return this.doc.getSelection();\n }\n\n /**\n * Execute the command\n * @param {string} command Command name\n * @param {any} [value=null Command's arguments\n */\n exec(command, value = null) {\n this.doc.execCommand(command, false, value);\n }\n\n /**\n * Get the actionbar element\n * @return {HTMLElement}\n */\n actionbarEl() {\n return this.actionbar;\n }\n\n /**\n * Set custom HTML to the selection, useful as the default 'insertHTML' command\n * doesn't work in the same way on all browsers\n * @param {string} value HTML string\n */\n insertHTML(value) {\n let lastNode;\n const doc = this.doc;\n const sel = doc.getSelection();\n\n if (sel && sel.rangeCount) {\n const node = doc.createElement('div');\n const range = sel.getRangeAt(0);\n range.deleteContents();\n node.innerHTML = value;\n Array.prototype.slice.call(node.childNodes).forEach(nd => {\n range.insertNode(nd);\n lastNode = nd;\n });\n\n sel.removeAllRanges();\n sel.addRange(range);\n this.el.focus();\n }\n }\n}\n","export default {\n stylePrefix: 'rte-',\n\n // If true, moves the toolbar below the element when the top canvas\n // edge is reached\n adjustToolbar: 1,\n\n // Default RTE actions\n actions: ['bold', 'italic', 'underline', 'strikethrough', 'link']\n};\n","/**\n * This module allows to customize the built-in toolbar of the Rich Text Editor and use commands from the [HTML Editing APIs](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand).\n * It's highly recommended to keep this toolbar as small as possible, especially from styling commands (eg. 'fontSize') and leave this task to the Style Manager\n *\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/rich_text_editor/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * richTextEditor: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const rte = editor.RichTextEditor;\n * ```\n *\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [remove](#remove)\n * * [getToolbarEl](#gettoolbarel)\n *\n * @module RichTextEditor\n */\n\nimport RichTextEditor from './model/RichTextEditor';\nimport { on, off } from 'utils/mixins';\nimport defaults from './config/config';\n\nexport default () => {\n let config = {};\n let toolbar, actions, lastEl, globalRte;\n\n const hideToolbar = () => {\n const style = toolbar.style;\n const size = '-1000px';\n style.top = size;\n style.left = size;\n style.display = 'none';\n };\n\n return {\n customRte: null,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'RichTextEditor',\n\n getConfig() {\n return config;\n },\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} opts Options\n * @private\n */\n init(opts = {}) {\n config = {\n ...defaults,\n ...opts\n };\n const ppfx = config.pStylePrefix;\n\n if (ppfx) {\n config.stylePrefix = ppfx + config.stylePrefix;\n }\n\n this.pfx = config.stylePrefix;\n actions = config.actions || [];\n toolbar = document.createElement('div');\n toolbar.className = `${ppfx}rte-toolbar ${ppfx}one-bg`;\n globalRte = this.initRte(document.createElement('div'));\n\n //Avoid closing on toolbar clicking\n on(toolbar, 'mousedown', e => e.stopPropagation());\n return this;\n },\n\n destroy() {\n const { customRte } = this;\n globalRte && globalRte.destroy();\n customRte && customRte.destroy && customRte.destroy();\n toolbar = 0;\n globalRte = 0;\n this.actionbar = 0;\n this.actions = 0;\n },\n\n /**\n * Post render callback\n * @param {View} ev\n * @private\n */\n postRender(ev) {\n const canvas = ev.model.get('Canvas');\n toolbar.style.pointerEvents = 'all';\n hideToolbar();\n canvas.getToolsEl().appendChild(toolbar);\n },\n\n /**\n * Init the built-in RTE\n * @param {HTMLElement} el\n * @return {RichTextEditor}\n * @private\n */\n initRte(el) {\n const pfx = this.pfx;\n const actionbarContainer = toolbar;\n const actionbar = this.actionbar;\n const actions = this.actions || [...config.actions];\n const classes = {\n actionbar: `${pfx}actionbar`,\n button: `${pfx}action`,\n active: `${pfx}active`,\n inactive: `${pfx}inactive`,\n disabled: `${pfx}disabled`\n };\n const rte = new RichTextEditor({\n el,\n classes,\n actions,\n actionbar,\n actionbarContainer\n });\n globalRte && globalRte.setEl(el);\n\n if (rte.actionbar) {\n this.actionbar = rte.actionbar;\n }\n\n if (rte.actions) {\n this.actions = rte.actions;\n }\n\n return rte;\n },\n\n /**\n * Add a new action to the built-in RTE toolbar\n * @param {string} name Action name\n * @param {Object} action Action options\n * @example\n * rte.add('bold', {\n * icon: 'B',\n * attributes: {title: 'Bold'},\n * result: rte => rte.exec('bold')\n * });\n * rte.add('link', {\n * icon: document.getElementById('t'),\n * attributes: {title: 'Link',}\n * // Example on it's easy to wrap a selected content\n * result: rte => rte.insertHTML(`${rte.selection()}`)\n * });\n * // An example with fontSize\n * rte.add('fontSize', {\n * icon: ``,\n * // Bind the 'result' on 'change' listener\n * event: 'change',\n * result: (rte, action) => rte.exec('fontSize', action.btn.firstChild.value),\n * // Callback on any input change (mousedown, keydown, etc..)\n * update: (rte, action) => {\n * const value = rte.doc.queryCommandValue(action.name);\n * if (value != 'false') { // value is a string\n * action.btn.firstChild.value = value;\n * }\n * }\n * })\n * // An example with state\n * const isValidAnchor = (rte) => {\n * // a utility function to help determine if the selected is a valid anchor node\n * const anchor = rte.selection().anchorNode;\n * const parentNode = anchor && anchor.parentNode;\n * const nextSibling = anchor && anchor.nextSibling;\n * return (parentNode && parentNode.nodeName == 'A') || (nextSibling && nextSibling.nodeName == 'A')\n * }\n * rte.add('toggleAnchor', {\n * icon: ``,\n * state: (rte, doc) => {\n * if (rte && rte.selection()) {\n * // `btnState` is a integer, -1 for disabled, 0 for inactive, 1 for active\n * return isValidAnchor(rte) ? btnState.ACTIVE : btnState.INACTIVE;\n * } else {\n * return btnState.INACTIVE;\n * }\n * },\n * result: (rte, action) => {\n * if (isValidAnchor(rte)) {\n * rte.exec('unlink');\n * } else {\n * rte.insertHTML(`${rte.selection()}`);\n * }\n * }\n * })\n */\n add(name, action = {}) {\n action.name = name;\n globalRte.addAction(action, { sync: 1 });\n },\n\n /**\n * Get the action by its name\n * @param {string} name Action name\n * @return {Object}\n * @example\n * const action = rte.get('bold');\n * // {name: 'bold', ...}\n */\n get(name) {\n let result;\n globalRte.getActions().forEach(action => {\n if (action.name == name) {\n result = action;\n }\n });\n return result;\n },\n\n /**\n * Get all actions\n * @return {Array}\n */\n getAll() {\n return globalRte.getActions();\n },\n\n /**\n * Remove the action from the toolbar\n * @param {string} name\n * @return {Object} Removed action\n * @example\n * const action = rte.remove('bold');\n * // {name: 'bold', ...}\n */\n remove(name) {\n const actions = this.getAll();\n const action = this.get(name);\n\n if (action) {\n const btn = action.btn;\n const index = actions.indexOf(action);\n btn.parentNode.removeChild(btn);\n actions.splice(index, 1);\n }\n\n return action;\n },\n\n /**\n * Get the toolbar element\n * @return {HTMLElement}\n */\n getToolbarEl() {\n return toolbar;\n },\n\n /**\n * Triggered when the offset of the editor is changed\n * @private\n */\n updatePosition() {\n const un = 'px';\n const canvas = config.em.get('Canvas');\n const pos = canvas.getTargetToElementDim(toolbar, lastEl, {\n event: 'rteToolbarPosUpdate'\n });\n\n if (pos) {\n if (config.adjustToolbar) {\n const frameOffset = canvas.getCanvasView().getFrameOffset();\n // Move the toolbar down when the top canvas edge is reached\n if (\n pos.top <= pos.canvasTop &&\n !(pos.elementHeight + pos.targetHeight >= frameOffset.height)\n ) {\n pos.top = pos.elementTop + pos.elementHeight;\n }\n }\n\n const toolbarStyle = toolbar.style;\n toolbarStyle.top = pos.top + un;\n toolbarStyle.left = pos.left + un;\n }\n },\n\n /**\n * Enable rich text editor on the element\n * @param {View} view Component view\n * @param {Object} rte The instance of already defined RTE\n * @private\n * */\n enable(view, rte) {\n lastEl = view.el;\n const em = config.em;\n const el = view.getChildrenContainer();\n const customRte = this.customRte;\n\n toolbar.style.display = '';\n rte = customRte ? customRte.enable(el, rte) : this.initRte(el).enable();\n\n if (em) {\n setTimeout(this.updatePosition.bind(this), 0);\n const event = 'change:canvasOffset canvasScroll';\n em.off(event, this.updatePosition, this);\n em.on(event, this.updatePosition, this);\n em.trigger('rte:enable', view, rte);\n }\n\n return rte;\n },\n\n /**\n * Unbind rich text editor from the element\n * @param {View} view\n * @param {Object} rte The instance of already defined RTE\n * @private\n * */\n disable(view, rte) {\n const em = config.em;\n const customRte = this.customRte;\n var el = view.getChildrenContainer();\n\n if (customRte) {\n customRte.disable(el, rte);\n } else {\n rte && rte.disable();\n }\n\n hideToolbar();\n em && em.trigger('rte:disable', view, rte);\n }\n };\n};\n","const traitInputAttr = { placeholder: 'eg. Text here' };\n\nexport default {\n assetManager: {\n addButton: 'Add image',\n inputPlh: 'http://path/to/the/image.jpg',\n modalTitle: 'Select Image',\n uploadTitle: 'Drop files here or click to upload'\n },\n // Here just as a reference, GrapesJS core doesn't contain any block,\n // so this should be omitted from other local files\n blockManager: {\n labels: {\n // 'block-id': 'Block Label',\n },\n categories: {\n // 'category-id': 'Category Label',\n }\n },\n domComponents: {\n names: {\n '': 'Box',\n wrapper: 'Body',\n text: 'Text',\n comment: 'Comment',\n image: 'Image',\n video: 'Video',\n label: 'Label',\n link: 'Link',\n map: 'Map',\n tfoot: 'Table foot',\n tbody: 'Table body',\n thead: 'Table head',\n table: 'Table',\n row: 'Table row',\n cell: 'Table cell'\n }\n },\n deviceManager: {\n device: 'Device',\n devices: {\n desktop: 'Desktop',\n tablet: 'Tablet',\n mobileLandscape: 'Mobile Landscape',\n mobilePortrait: 'Mobile Portrait'\n }\n },\n panels: {\n buttons: {\n titles: {\n preview: 'Preview',\n fullscreen: 'Fullscreen',\n 'sw-visibility': 'View components',\n 'export-template': 'View code',\n 'open-sm': 'Open Style Manager',\n 'open-tm': 'Settings',\n 'open-layers': 'Open Layer Manager',\n 'open-blocks': 'Open Blocks'\n }\n }\n },\n selectorManager: {\n label: 'Classes',\n selected: 'Selected',\n emptyState: '- State -',\n states: {\n hover: 'Hover',\n active: 'Click',\n 'nth-of-type(2n)': 'Even/Odd'\n }\n },\n styleManager: {\n empty: 'Select an element before using Style Manager',\n layer: 'Layer',\n fileButton: 'Images',\n sectors: {\n general: 'General',\n layout: 'Layout',\n typography: 'Typography',\n decorations: 'Decorations',\n extra: 'Extra',\n flex: 'Flex',\n dimension: 'Dimension'\n },\n // The core library generates the name by their `property` name\n properties: {\n // float: 'Float',\n }\n },\n traitManager: {\n empty: 'Select an element before using Trait Manager',\n label: 'Component settings',\n traits: {\n // The core library generates the name by their `name` property\n labels: {\n // id: 'Id',\n // alt: 'Alt',\n // title: 'Title',\n // href: 'Href',\n },\n // In a simple trait, like text input, these are used on input attributes\n attributes: {\n id: traitInputAttr,\n alt: traitInputAttr,\n title: traitInputAttr,\n href: { placeholder: 'eg. https://google.com' }\n },\n // In a trait like select, these are used to translate option names\n options: {\n target: {\n false: 'This window',\n _blank: 'New window'\n }\n }\n }\n }\n};\n","import en from './locale/en';\n\nexport default {\n // Locale value\n locale: 'en',\n\n // Fallback locale\n localeFallback: 'en',\n\n // Detect locale by checking browser language\n detectLocale: 1,\n\n // Show warnings when some of the i18n resources are missing\n debug: 0,\n\n // Messages to translate\n messages: {\n en\n }\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/i18n/config.js)\n * ```js\n * const editor = grapesjs.init({\n * i18n: {\n * locale: 'en',\n * localeFallback: 'en',\n * messages: {\n * it: { hello: 'Ciao', ... },\n * ...\n * }\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const i18n = editor.I18n;\n * ```\n *\n * ### Events\n * * `i18n:add` - New set of messages is added\n * * `i18n:update` - The set of messages is updated\n * * `i18n:locale` - Locale changed\n *\n * @module I18n\n */\nimport { isUndefined, isString } from 'underscore';\nimport config from './config';\n\nconst isObj = el => !Array.isArray(el) && el !== null && typeof el === 'object';\n\nconst deepAssign = (...args) => {\n const target = { ...args[0] };\n\n for (let i = 1; i < args.length; i++) {\n const source = { ...args[i] };\n\n for (let key in source) {\n const targValue = target[key];\n const srcValue = source[key];\n\n if (isObj(targValue) && isObj(srcValue)) {\n target[key] = deepAssign(targValue, srcValue);\n } else {\n target[key] = srcValue;\n }\n }\n }\n\n return target;\n};\n\nexport default () => {\n return {\n name: 'I18n',\n\n config,\n\n /**\n * Initialize module\n * @param {Object} config Configurations\n * @private\n */\n init(opts = {}) {\n this.config = {\n ...config,\n ...opts,\n messages: {\n ...config.messages,\n ...(opts.messages || {})\n }\n };\n\n if (this.config.detectLocale) {\n this.config.locale = this._localLang();\n }\n\n this.em = opts.em;\n return this;\n },\n\n /**\n * Get module configurations\n * @returns {Object} Configuration object\n */\n getConfig() {\n return this.config;\n },\n\n /**\n * Update current locale\n * @param {String} locale Locale value\n * @returns {this}\n * @example\n * i18n.setLocale('it');\n */\n setLocale(locale) {\n const { em, config } = this;\n const evObj = { value: locale, valuePrev: config.locale };\n em && em.trigger('i18n:locale', evObj);\n config.locale = locale;\n return this;\n },\n\n /**\n * Get current locale\n * @returns {String} Current locale value\n */\n getLocale() {\n return this.config.locale;\n },\n\n /**\n * Get all messages\n * @param {String} [lang] Specify the language of messages to return\n * @param {Object} [opts] Options\n * @param {Boolean} [opts.debug] Show warnings in case of missing language\n * @returns {Object}\n * @example\n * i18n.getMessages();\n * // -> { en: { hello: '...' }, ... }\n * i18n.getMessages('en');\n * // -> { hello: '...' }\n */\n getMessages(lang, opts = {}) {\n const { messages } = this.config;\n lang &&\n !messages[lang] &&\n this._debug(`'${lang}' i18n lang not found`, opts);\n return lang ? messages[lang] : messages;\n },\n\n /**\n * Set new set of messages\n * @param {Object} msg Set of messages\n * @returns {this}\n * @example\n * i18n.getMessages();\n * // -> { en: { msg1: 'Msg 1', msg2: 'Msg 2', } }\n * i18n.setMessages({ en: { msg2: 'Msg 2 up', msg3: 'Msg 3', } });\n * // Set replaced\n * i18n.getMessages();\n * // -> { en: { msg2: 'Msg 2 up', msg3: 'Msg 3', } }\n */\n setMessages(msg) {\n const { em, config } = this;\n config.messages = msg;\n em && em.trigger('i18n:update', msg);\n return this;\n },\n\n /**\n * Update messages\n * @param {Object} msg Set of messages to add\n * @returns {this}\n * @example\n * i18n.getMessages();\n * // -> { en: { msg1: 'Msg 1', msg2: 'Msg 2', } }\n * i18n.addMessages({ en: { msg2: 'Msg 2 up', msg3: 'Msg 3', } });\n * // Set updated\n * i18n.getMessages();\n * // -> { en: { msg1: 'Msg 1', msg2: 'Msg 2 up', msg3: 'Msg 3', } }\n */\n addMessages(msg) {\n const { em } = this;\n const { messages } = this.config;\n em && em.trigger('i18n:add', msg);\n this.setMessages(deepAssign(messages, msg));\n\n return this;\n },\n\n /**\n * Translate the locale message\n * @param {String} key Label to translate\n * @param {Object} [opts] Options for the translation\n * @param {Object} [opts.params] Params for the translation\n * @param {Boolean} [opts.debug] Show warnings in case of missing resources\n * @returns {String}\n * @example\n * obj.setMessages({\n * en: { msg: 'Msg', msg2: 'Msg {test}'},\n * it: { msg2: 'Msg {test} it'},\n * });\n * obj.t('msg');\n * // -> outputs `Msg`\n * obj.t('msg2', { params: { test: 'hello' } }); // use params\n * // -> outputs `Msg hello`\n * obj.t('msg2', { l: 'it', params: { test: 'hello' } }); // custom local\n * // -> outputs `Msg hello it`\n */\n t(key, opts = {}) {\n const { config } = this;\n const param = opts.params || {};\n const locale = opts.l || this.getLocale();\n const localeFlb = opts.lFlb || config.localeFallback;\n let result = this._getMsg(key, locale, opts);\n\n // Try with fallback\n if (!result) result = this._getMsg(key, localeFlb, opts);\n\n !result &&\n this._debug(`'${key}' i18n key not found in '${locale}' lang`, opts);\n result =\n result && isString(result) ? this._addParams(result, param) : result;\n\n return result;\n },\n\n _localLang() {\n const nav = window.navigator || {};\n const lang = nav.language || nav.userLanguage;\n return lang ? lang.split('-')[0] : 'en';\n },\n\n _addParams(str, params) {\n const reg = new RegExp(`\\{([\\\\w\\\\d-]*)\\}`, 'g');\n return str.replace(reg, (m, val) => params[val] || '').trim();\n },\n\n _getMsg(key, locale, opts = {}) {\n const msgSet = this.getMessages(locale, opts);\n\n // Lang set is missing\n if (!msgSet) return;\n\n let result = msgSet[key];\n\n // Check for nested getter\n if (!result && key.indexOf('.') > 0) {\n result = key.split('.').reduce((lang, key) => {\n if (isUndefined(lang)) return;\n return lang[key];\n }, msgSet);\n }\n\n return result;\n },\n\n _debug(str, opts = {}) {\n const { em, config } = this;\n (opts.debug || config.debug) && em && em.logWarning(str);\n }\n };\n};\n","export default {\n stylePrefix: 'com-',\n\n // Default array of commands\n defaults: [],\n\n // If true, stateful commands (with `run` and `stop` methods) can't be runned multiple times.\n // So, if the command is already active, running it again will not execute the `run` method\n strict: 1\n};\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/artf/grapesjs/blob/master/src/commands/config/config.js)\n * ```js\n * const editor = grapesjs.init({\n * commands: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const commands = editor.Commands;\n * ```\n *\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [extend](#extend)\n * * [has](#has)\n * * [run](#run)\n * * [stop](#stop)\n * * [isActive](#isactive)\n * * [getActive](#getactive)\n *\n * @module Commands\n */\n\nimport { isFunction, includes } from 'underscore';\nimport CommandAbstract from './view/CommandAbstract';\nimport defaults from './config/config';\n\nexport default () => {\n let em;\n let c = {};\n const commands = {};\n const defaultCommands = {};\n const active = {};\n const commandsDef = [\n ['preview', 'Preview', 'preview'],\n ['resize', 'Resize', 'resize'],\n ['fullscreen', 'Fullscreen', 'fullscreen'],\n ['copy', 'CopyComponent'],\n ['paste', 'PasteComponent'],\n ['canvas-move', 'CanvasMove'],\n ['canvas-clear', 'CanvasClear'],\n ['open-code', 'ExportTemplate', 'export-template'],\n ['open-layers', 'OpenLayers', 'open-layers'],\n ['open-styles', 'OpenStyleManager', 'open-sm'],\n ['open-traits', 'OpenTraitManager', 'open-tm'],\n ['open-blocks', 'OpenBlocks', 'open-blocks'],\n ['open-assets', 'OpenAssets', 'open-assets'],\n ['component-select', 'SelectComponent', 'select-comp'],\n ['component-outline', 'SwitchVisibility', 'sw-visibility'],\n ['component-offset', 'ShowOffset', 'show-offset'],\n ['component-move', 'MoveComponent', 'move-comp'],\n ['component-next', 'ComponentNext'],\n ['component-prev', 'ComponentPrev'],\n ['component-enter', 'ComponentEnter'],\n ['component-exit', 'ComponentExit', 'select-parent'],\n ['component-delete', 'ComponentDelete'],\n ['component-style-clear', 'ComponentStyleClear'],\n ['component-drag', 'ComponentDrag']\n ];\n\n // Need it here as it would be used below\n const add = function(id, obj) {\n if (isFunction(obj)) obj = { run: obj };\n if (!obj.stop) obj.noStop = 1;\n delete obj.initialize;\n obj.id = id;\n commands[id] = CommandAbstract.extend(obj);\n return this;\n };\n\n return {\n CommandAbstract,\n\n /**\n * Name of the module\n * @type {String}\n * @private\n */\n name: 'Commands',\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n init(config = {}) {\n c = {\n ...defaults,\n ...config\n };\n em = c.em;\n const ppfx = c.pStylePrefix;\n if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;\n\n // Load commands passed via configuration\n for (let k in c.defaults) {\n const obj = c.defaults[k];\n if (obj.id) this.add(obj.id, obj);\n }\n\n defaultCommands['tlb-delete'] = {\n run(ed) {\n return ed.runCommand('core:component-delete');\n }\n };\n\n defaultCommands['tlb-clone'] = {\n run(ed) {\n ed.runCommand('core:copy');\n ed.runCommand('core:paste');\n }\n };\n\n defaultCommands['tlb-move'] = {\n run(ed, sender, opts = {}) {\n let dragger;\n const em = ed.getModel();\n const event = opts && opts.event;\n const { target } = opts;\n const sel = target || ed.getSelected();\n const selAll = target ? [target] : [...ed.getSelectedAll()];\n const nativeDrag = event && event.type == 'dragstart';\n const defComOptions = { preserveSelected: 1 };\n const modes = ['absolute', 'translate'];\n const hideTlb = () => em.stopDefault(defComOptions);\n selAll.forEach(sel => sel.trigger('disable'));\n\n // Dirty patch to prevent parent selection on drop (in absolute mode)\n em.set('_cmpDrag', 1);\n\n if (!sel || !sel.get('draggable')) {\n console.warn('The element is not draggable');\n return;\n }\n\n const mode = sel.get('dmode') || em.get('dmode');\n\n // Without setTimeout the ghost image disappears\n nativeDrag ? setTimeout(hideTlb, 0) : hideTlb();\n\n const onEnd = (e, opts) => {\n em.runDefault(defComOptions);\n selAll.forEach(sel => sel.set('status', 'selected'));\n ed.select(selAll);\n sel.emitUpdate();\n };\n\n if (includes(modes, mode)) {\n // TODO move grabbing func in editor/canvas from the Sorter\n dragger = ed.runCommand('core:component-drag', {\n guidesInfo: 1,\n mode,\n target: sel,\n onEnd,\n event\n });\n } else {\n if (nativeDrag) {\n event.dataTransfer.setDragImage(sel.view.el, 0, 0);\n //sel.set('status', 'freezed');\n }\n\n const cmdMove = ed.Commands.get('move-comp');\n cmdMove.onEndMoveFromModel = onEnd;\n cmdMove.initSorterFromModels(selAll);\n }\n\n selAll.forEach(sel => sel.set('status', 'freezed-selected'));\n }\n };\n\n // Core commands\n defaultCommands['core:undo'] = e => e.UndoManager.undo();\n defaultCommands['core:redo'] = e => e.UndoManager.redo();\n commandsDef.forEach(item => {\n const oldCmd = item[2];\n const cmd = require(`./view/${item[1]}`).default;\n const cmdName = `core:${item[0]}`;\n defaultCommands[cmdName] = cmd;\n if (oldCmd) {\n defaultCommands[oldCmd] = cmd;\n // Propogate old commands (can be removed once we stop to call old commands)\n ['run', 'stop'].forEach(name => {\n em.on(`${name}:${oldCmd}`, (...args) =>\n em.trigger(`${name}:${cmdName}`, ...args)\n );\n });\n }\n });\n\n if (c.em) c.model = c.em.get('Canvas');\n\n this.loadDefaultCommands();\n\n return this;\n },\n\n /**\n * Add new command to the collection\n * @param\t{string} id Command's ID\n * @param\t{Object|Function} command Object representing your command,\n * By passing just a function it's intended as a stateless command\n * (just like passing an object with only `run` method).\n * @return {this}\n * @example\n * commands.add('myCommand', {\n * \trun(editor, sender) {\n * \t\talert('Hello world!');\n * \t},\n * \tstop(editor, sender) {\n * \t},\n * });\n * // As a function\n * commands.add('myCommand2', editor => { ... });\n * */\n add,\n\n /**\n * Get command by ID\n * @param\t{string}\tid Command's ID\n * @return {Object} Object representing the command\n * @example\n * var myCommand = commands.get('myCommand');\n * myCommand.run();\n * */\n get(id) {\n let el = commands[id];\n\n if (isFunction(el)) {\n el = new el(c);\n commands[id] = el;\n } else if (!el) {\n em.logWarning(`'${id}' command not found`);\n }\n\n return el;\n },\n\n /**\n * Extend the command. The command to extend should be defined as an object\n * @param\t{string}\tid Command's ID\n * @param {Object} Object with the new command functions\n * @returns {this}\n * @example\n * commands.extend('old-command', {\n * someInnerFunction() {\n * // ...\n * }\n * });\n * */\n extend(id, cmd = {}) {\n const command = this.get(id);\n if (command) {\n const cmdObj = {\n ...command.constructor.prototype,\n ...cmd\n };\n this.add(id, cmdObj);\n // Extend also old name commands if exist\n const oldCmd = commandsDef.filter(\n cmd => `core:${cmd[0]}` === id && cmd[2]\n )[0];\n oldCmd && this.add(oldCmd[2], cmdObj);\n }\n return this;\n },\n\n /**\n * Check if command exists\n * @param\t{string}\tid Command's ID\n * @return {Boolean}\n * */\n has(id) {\n return !!commands[id];\n },\n\n /**\n * Get an object containing all the commands\n * @return {Object}\n */\n getAll() {\n return commands;\n },\n\n /**\n * Execute the command\n * @param {String} id Command ID\n * @param {Object} [options={}] Options\n * @return {*} The return is defined by the command\n * @example\n * commands.run('myCommand', { someOption: 1 });\n */\n run(id, options = {}) {\n return this.runCommand(this.get(id), options);\n },\n\n /**\n * Stop the command\n * @param {String} id Command ID\n * @param {Object} [options={}] Options\n * @return {*} The return is defined by the command\n * @example\n * commands.stop('myCommand', { someOption: 1 });\n */\n stop(id, options = {}) {\n return this.stopCommand(this.get(id), options);\n },\n\n /**\n * Check if the command is active. You activate commands with `run`\n * and disable them with `stop`. If the command was created without `stop`\n * method it can't be registered as active\n * @param {String} id Command id\n * @return {Boolean}\n * @example\n * const cId = 'some-command';\n * commands.run(cId);\n * commands.isActive(cId);\n * // -> true\n * commands.stop(cId);\n * commands.isActive(cId);\n * // -> false\n */\n isActive(id) {\n return this.getActive().hasOwnProperty(id);\n },\n\n /**\n * Get all active commands\n * @return {Object}\n * @example\n * console.log(commands.getActive());\n * // -> { someCommand: itsLastReturn, anotherOne: ... };\n */\n getActive() {\n return active;\n },\n\n /**\n * Load default commands\n * @return {this}\n * @private\n * */\n loadDefaultCommands() {\n for (var id in defaultCommands) {\n this.add(id, defaultCommands[id]);\n }\n\n return this;\n },\n\n /**\n * Run command via its object\n * @param {Object} command\n * @param {Object} options\n * @return {*} Result of the command\n * @private\n */\n runCommand(command, options = {}) {\n let result;\n\n if (command && command.run) {\n const id = command.id;\n const editor = em.get('Editor');\n\n if (!this.isActive(id) || options.force || !c.strict) {\n result = command.callRun(editor, options);\n if (id && command.stop && !command.noStop && !options.abort) {\n active[id] = result;\n }\n }\n }\n\n return result;\n },\n\n /**\n * Stop the command\n * @param {Object} command\n * @param {Object} options\n * @return {*} Result of the command\n * @private\n */\n stopCommand(command, options = {}) {\n let result;\n\n if (command && command.run) {\n const id = command.id;\n const editor = em.get('Editor');\n\n if (this.isActive(id) || options.force || !c.strict) {\n if (id) delete active[id];\n result = command.callStop(editor, options);\n }\n }\n\n return result;\n },\n\n /**\n * Create anonymous Command instance\n * @param {Object} command Command object\n * @return {Command}\n * @private\n * */\n create(command) {\n if (!command.stop) command.noStop = 1;\n const cmd = CommandAbstract.extend(command);\n return new cmd(c);\n }\n };\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/Assets/library/js/grapesjs-mjml.min.js b/Assets/library/js/grapesjs-mjml.min.js deleted file mode 100644 index b8dc013be73..00000000000 --- a/Assets/library/js/grapesjs-mjml.min.js +++ /dev/null @@ -1,34 +0,0 @@ -!function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["grapesjs-mjml"]=t():e["grapesjs-mjml"]=t()}(window,(function(){return function(e){var t={};function __webpack_require__(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,r){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(r,n,function(t){return e[t]}.bind(null,n));return r},__webpack_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=847)}([function(e,t){"function"==typeof Object.create?e.exports=function inherits(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function inherits(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,r){e.exports={default:r(375),__esModule:!0}},function(e,t,r){"use strict";t.__esModule=!0;var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(133));t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,n.default)(t))&&"function"!=typeof t?e:t}},function(e,t,r){"use strict";t.__esModule=!0;var n=_interopRequireDefault(r(393)),i=_interopRequireDefault(r(397)),a=_interopRequireDefault(r(133));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,a.default)(t)));e.prototype=(0,i.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(n.default?(0,n.default)(e,t):e.__proto__=t)}},function(e,t,r){var n=r(9),i=n.Buffer;function copyProps(e,t){for(var r in e)t[r]=e[r]}function SafeBuffer(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(copyProps(n,t),t.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(i.prototype),copyProps(i,SafeBuffer),SafeBuffer.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},SafeBuffer.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},SafeBuffer.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},SafeBuffer.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";t.__esModule=!0;var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(222));t.default=function(){function defineProperties(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{},o="",s=[];"string"==typeof a.skeleton&&(a.skeleton=r(722)("."===a.skeleton.charAt(0)?f.default.resolve(e.cwd(),a.skeleton):a.skeleton));var u=a.beautify,c=void 0!==u&&u,v=a.fonts,O=void 0===v?{"Open Sans":"https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,700","Droid Sans":"https://fonts.googleapis.com/css?family=Droid+Sans:300,400,500,700",Lato:"https://fonts.googleapis.com/css?family=Lato:300,400,500,700",Roboto:"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700",Ubuntu:"https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700"}:v,C=a.keepComments,j=a.minify,R=void 0!==j&&j,M=a.minifyOptions,T=void 0===M?{}:M,D=a.juiceOptions,B=void 0===D?{}:D,I=a.juicePreserveTags,P=void 0===I?null:I,L=a.skeleton,N=void 0===L?A.default:L,q=a.validationLevel,U=void 0===q?"soft":q,F=a.filePath,z=void 0===F?".":F,W=a.mjmlConfigPath,H=void 0===W?null:W,V=a.noMigrateWarn,K=void 0!==V&&V;H&&(0,k.default)(H,m.registerComponent);"string"==typeof t&&(t=(0,g.default)(t,{keepComments:C,components:y.default,filePath:z}));t=(0,b.handleMjml3)(t,{noMigrateWarn:K});var G={backgroundColor:"",breakpoint:"480px",classes:{},classesDefault:{},defaultAttributes:{},fonts:O,inlineStyle:[],headStyle:{},componentsHeadStyle:[],headRaw:[],mediaQueries:{},preview:"",style:[],title:"",forceOWADesktop:"desktop"===(0,l.get)(t,"attributes.owa","mobile"),lang:(0,l.get)(t,"attributes.lang")},$={components:y.default,initializeType:S.initializeType};switch(U){case"skip":break;case"strict":if((s=(0,_.default)(t,$)).length>0)throw new E("ValidationError: \n "+s.map((function(e){return e.formattedMessage})).join("\n"),s);break;case"soft":default:s=(0,_.default)(t,$)}var Y=(0,l.find)(t.children,{tagName:"mj-body"}),Z=(0,l.find)(t.children,{tagName:"mj-head"}),J=function _processing(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;if(e){var n=(0,m.initComponent)({name:e.tagName,initialDatas:(0,i.default)({},r(e),{context:t})});if(null!==n){if("handler"in n)return n.handler();if("render"in n)return n.render()}}},X=function applyAttributes(e){return function parse(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.attributes,n=e.tagName,a=e.children,o=(0,l.get)(e.attributes,"mj-class","").split(" "),s=(0,l.reduce)(o,(function(e,t){var r=G.classes[t],n={};return e["css-class"]&&(0,l.get)(r,"css-class")&&(n={"css-class":e["css-class"]+" "+r["css-class"]}),(0,i.default)({},e,r,n)}),{}),u=(0,l.reduce)(t.split(" "),(function(e,t){return(0,i.default)({},e,(0,l.get)(G.classesDefault,t+"."+n))}),{}),c=(0,l.get)(r,"mj-class",t);return(0,i.default)({},e,{attributes:(0,i.default)({},G.defaultAttributes[n],s,u,(0,l.omit)(r,["mj-class"])),globalAttributes:(0,i.default)({},G.defaultAttributes["mj-all"]),children:(0,l.map)(a,(function(e){return parse(e,c)}))})}(e)},Q={addMediaQuery:function addMediaQuery(e,t){var r=t.parsedWidth,n=t.unit;G.mediaQueries[e]="{ width:"+r+n+" !important; max-width: "+r+n+"; }"},addHeadStyle:function addHeadStyle(e,t){G.headStyle[e]=t},addComponentHeadSyle:function addComponentHeadSyle(e){G.componentsHeadStyle.push(e)},setBackgroundColor:function setBackgroundColor(e){G.backgroundColor=e},processing:function processing(e,t){return J(e,t,X)}},ee={add:function add(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a1?(0,l.isObject)(G[e][r[0]])?G[e][r[0]]=(0,i.default)({},G[e][r[0]],r[1]):G[e][r[0]]=r[1]:G[e]=r[0]}}};G.headRaw=J(Z,ee),o=J(Y,Q,X),R&&"false"!==R&&(o=(0,x.default)(o));o=N((0,i.default)({content:o},G)),G.inlineStyle.length>0&&(P&&(0,l.each)(P,(function(e,t){p.default.codeBlocks[t]=e})),o=(0,p.default)(o,(0,i.default)({applyStyleTags:!1,extraCss:G.inlineStyle.join(""),insertPreservedExtraCss:!1,removeStyleTags:!1},B)));o=c&&"false"!==c?(0,d.html)(o,{indent_size:2,wrap_attributes_indent_size:2,max_preserve_newline:0,preserve_newlines:!1}):o,R&&"false"!==R&&(o=(0,h.minify)(o,(0,i.default)({collapseWhitespace:!0,minifyCSS:!1,caseSensitive:!0,removeEmptyAttributes:!0},T)));return{html:o=(0,w.default)(o),errors:s}};var c=r(400);Object.defineProperty(t,"BodyComponent",{enumerable:!0,get:function get(){return c.BodyComponent}}),Object.defineProperty(t,"HeadComponent",{enumerable:!0,get:function get(){return c.HeadComponent}});var l=r(16),f=_interopRequireDefault(r(25)),p=_interopRequireDefault(r(571)),d=r(282),h=r(603),g=_interopRequireDefault(r(136)),_=_interopRequireDefault(r(193)),b=r(712),m=r(172),y=_interopRequireDefault(m),v=_interopRequireDefault(r(714)),w=_interopRequireDefault(r(715)),x=_interopRequireDefault(r(716)),A=_interopRequireDefault(r(717)),S=r(38),k=_interopRequireDefault(r(721));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var E=function(e){function ValidationError(e,t){(0,o.default)(this,ValidationError);var r=(0,s.default)(this,(ValidationError.__proto__||(0,a.default)(ValidationError)).call(this,e));return r.errors=t,r}return(0,u.default)(ValidationError,e),ValidationError}(Error);(0,k.default)(e.cwd(),m.registerComponent),t.components=y.default,t.initComponent=m.initComponent,t.registerComponent=m.registerComponent,t.suffixCssClasses=v.default,t.handleMjmlConfig=k.default,t.initializeType=S.initializeType}).call(this,r(11))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";(function(e){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -var n=r(417),i=r(418),a=r(140);function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(e,t){if(kMaxLength()=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|e}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(e).length;default:if(n)return utf8ToBytes(e).length;t=(""+t).toLowerCase(),n=!0}}function slowToString(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return hexSlice(this,t,r);case"utf8":case"utf-8":return utf8Slice(this,t,r);case"ascii":return asciiSlice(this,t,r);case"latin1":case"binary":return latin1Slice(this,t,r);case"base64":return base64Slice(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function swap(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function bidirectionalIndexOf(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,i);if("number"==typeof t)return t&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,r,n,i){var a,o=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}function read(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=r;as&&(r=s-u),a=r;a>=0;a--){for(var l=!0,f=0;fi&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function base64Slice(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function utf8Slice(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:l>223?3:l>191?2:1;if(i+p<=r)switch(p){case 1:l<128&&(f=l);break;case 2:128==(192&(a=e[i+1]))&&(c=(31&l)<<6|63&a)>127&&(f=c);break;case 3:a=e[i+1],s=e[i+2],128==(192&a)&&128==(192&s)&&(c=(15&l)<<12|(63&a)<<6|63&s)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:a=e[i+1],s=e[i+2],u=e[i+3],128==(192&a)&&128==(192&s)&&128==(192&u)&&(c=(15&l)<<18|(63&a)<<12|(63&s)<<6|63&u)>65535&&c<1114112&&(f=c)}null===f?(f=65533,p=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=p}return function decodeCodePointsArray(e){var t=e.length;if(t<=o)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},Buffer.prototype.compare=function compare(e,t,r,n,i){if(!Buffer.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),u=this.slice(n,i),c=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return hexWrite(this,e,t,r);case"utf8":case"utf-8":return utf8Write(this,e,t,r);case"ascii":return asciiWrite(this,e,t,r);case"latin1":case"binary":return latin1Write(this,e,t,r);case"base64":return base64Write(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var o=4096;function asciiSlice(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function checkInt(e,t,r,n,i,a){if(!Buffer.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function objectWriteUInt16(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function objectWriteUInt32(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function checkIEEE754(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(e,t,r,n,a){return a||checkIEEE754(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,a){return a||checkIEEE754(e,0,r,8),i.write(e,t,r,n,52,8),r+8}Buffer.prototype.slice=function slice(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},Buffer.prototype.readUInt8=function readUInt8(e,t){return t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUInt16LE=function readUInt16LE(e,t){return t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUInt16BE=function readUInt16BE(e,t){return t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUInt32LE=function readUInt32LE(e,t){return t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUInt32BE=function readUInt32BE(e,t){return t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function readIntLE(e,t,r){e|=0,t|=0,r||checkOffset(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function readIntBE(e,t,r){e|=0,t|=0,r||checkOffset(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},Buffer.prototype.readInt8=function readInt8(e,t){return t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function readInt16LE(e,t){t||checkOffset(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function readInt16BE(e,t){t||checkOffset(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function readInt32LE(e,t){return t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(e,t){return t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function readFloatLE(e,t){return t||checkOffset(e,4,this.length),i.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(e,t){return t||checkOffset(e,4,this.length),i.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(e,t){return t||checkOffset(e,8,this.length),i.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(e,t){return t||checkOffset(e,8,this.length),i.read(this,e,!1,52,8)},Buffer.prototype.writeUIntLE=function writeUIntLE(e,t,r,n){(e=+e,t|=0,r|=0,n)||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},Buffer.prototype.writeUInt8=function writeUInt8(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Buffer.prototype.writeUInt16LE=function writeUInt16LE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):objectWriteUInt16(this,e,t,!0),t+2},Buffer.prototype.writeUInt16BE=function writeUInt16BE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):objectWriteUInt16(this,e,t,!1),t+2},Buffer.prototype.writeUInt32LE=function writeUInt32LE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):objectWriteUInt32(this,e,t,!0),t+4},Buffer.prototype.writeUInt32BE=function writeUInt32BE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):objectWriteUInt32(this,e,t,!1),t+4},Buffer.prototype.writeIntLE=function writeIntLE(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},Buffer.prototype.writeIntBE=function writeIntBE(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},Buffer.prototype.writeInt8=function writeInt8(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function writeInt16LE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):objectWriteUInt16(this,e,t,!0),t+2},Buffer.prototype.writeInt16BE=function writeInt16BE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):objectWriteUInt16(this,e,t,!1),t+2},Buffer.prototype.writeInt32LE=function writeInt32LE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):objectWriteUInt32(this,e,t,!0),t+4},Buffer.prototype.writeInt32BE=function writeInt32BE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):objectWriteUInt32(this,e,t,!1),t+4},Buffer.prototype.writeFloatLE=function writeFloatLE(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function writeFloatBE(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function copy(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(a<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function base64ToBytes(e){return n.toByteArray(function base64clean(e){if((e=function stringtrim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(s,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function blitBuffer(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(8))},function(e,t){e.exports={AT_RULE:"at-rule",AT_RULE_BLOCK:"at-rule-block",AT_RULE_BLOCK_SCOPE:"at-rule-block-scope",COMMENT:"comment",NESTED_BLOCK:"nested-block",NESTED_BLOCK_SCOPE:"nested-block-scope",PROPERTY:"property",PROPERTY_BLOCK:"property-block",PROPERTY_NAME:"property-name",PROPERTY_VALUE:"property-value",RAW:"raw",RULE:"rule",RULE_SCOPE:"rule-scope"}},function(e,t){var r,n,i=e.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(r===setTimeout)return setTimeout(e,0);if((r===defaultSetTimout||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){r=defaultSetTimout}try{n="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){n=defaultClearTimeout}}();var a,o=[],s=!1,u=-1;function cleanUpNextTick(){s&&a&&(s=!1,a.length?o=a.concat(o):u=-1,o.length&&drainQueue())}function drainQueue(){if(!s){var e=runTimeout(cleanUpNextTick);s=!0;for(var t=o.length;t;){for(a=o,o=[];++u1)for(var r=1;r=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function parseBase(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o=49?s-49+10:s>=17?s-17+10:s}return i}BN.isBN=function isBN(e){return e instanceof BN||null!==e&&"object"==typeof e&&e.constructor.wordSize===BN.wordSize&&Array.isArray(e.words)},BN.max=function max(e,t){return e.cmp(t)>0?e:t},BN.min=function min(e,t){return e.cmp(t)<0?e:t},BN.prototype._init=function init(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),assert(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},BN.prototype._initNumber=function _initNumber(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(assert(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},BN.prototype._initArray=function _initArray(e,t,r){if(assert("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[i]|=a<>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);else if("le"===r)for(n=0,i=0;n>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);return this.strip()},BN.prototype._parseHex=function _parseHex(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=parseHex(e,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==t&&(i=parseHex(e,t,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},BN.prototype._parseBase=function _parseBase(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function _normSign(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},BN.prototype.inspect=function inspect(){return(this.red?""};var i=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],a=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],o=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function smallMulTo(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,p=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=p;d++){var h=c-d|0;l+=(o=(i=0|e.words[h])*(a=0|t.words[d])+f)/67108864|0,f=67108863&o}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}BN.prototype.toString=function toString(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,s=0,u=0;u>>24-n&16777215)||u!==this.length-1?i[6-l.length]+l+r:l+r,(n+=2)>=26&&(n-=26,u--)}for(0!==s&&(r=s.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var f=a[e],p=o[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var h=d.modn(p).toString(e);r=(d=d.idivn(p)).isZero()?h+r:i[f-h.length]+h+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function toNumber(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},BN.prototype.toJSON=function toJSON(){return this.toString(16)},BN.prototype.toBuffer=function toBuffer(e,t){return assert(void 0!==n),this.toArrayLike(n,e,t)},BN.prototype.toArray=function toArray(e,t){return this.toArrayLike(Array,e,t)},BN.prototype.toArrayLike=function toArrayLike(e,t,r){var n=this.byteLength(),i=r||Math.max(1,n);assert(n<=i,"byte array longer than desired length"),assert(i>0,"Requested array length <= 0"),this.strip();var a,o,s="le"===t,u=new e(i),c=this.clone();if(s){for(o=0;!c.isZero();o++)a=c.andln(255),c.iushrn(8),u[o]=a;for(;o=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},BN.prototype._zeroBits=function _zeroBits(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},BN.prototype.bitLength=function bitLength(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},BN.prototype.uor=function uor(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},BN.prototype.iuand=function iuand(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},BN.prototype.uand=function uand(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},BN.prototype.iuxor=function iuxor(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},BN.prototype.uxor=function uxor(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},BN.prototype.inotn=function inotn(e){assert("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},BN.prototype.notn=function notn(e){return this.clone().inotn(e)},BN.prototype.setn=function setn(e,t){assert("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},BN.prototype.isub=function isub(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==a&&o>26,this.words[o]=67108863&t;if(0===a&&o>>13,d=0|o[1],h=8191&d,g=d>>>13,_=0|o[2],b=8191&_,m=_>>>13,y=0|o[3],v=8191&y,w=y>>>13,x=0|o[4],A=8191&x,S=x>>>13,k=0|o[5],E=8191&k,O=k>>>13,C=0|o[6],j=8191&C,R=C>>>13,M=0|o[7],T=8191&M,D=M>>>13,B=0|o[8],I=8191&B,P=B>>>13,L=0|o[9],N=8191&L,q=L>>>13,U=0|s[0],F=8191&U,z=U>>>13,W=0|s[1],H=8191&W,V=W>>>13,K=0|s[2],G=8191&K,$=K>>>13,Y=0|s[3],Z=8191&Y,J=Y>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,pe=le>>>13,de=0|s[9],he=8191&de,ge=de>>>13;r.negative=e.negative^t.negative,r.length=19;var _e=(c+(n=Math.imul(f,F))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(p,F)|0))<<13)|0;c=((a=Math.imul(p,z))+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(h,F),i=(i=Math.imul(h,z))+Math.imul(g,F)|0,a=Math.imul(g,z);var be=(c+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,V)|0)+Math.imul(p,H)|0))<<13)|0;c=((a=a+Math.imul(p,V)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(b,F),i=(i=Math.imul(b,z))+Math.imul(m,F)|0,a=Math.imul(m,z),n=n+Math.imul(h,H)|0,i=(i=i+Math.imul(h,V)|0)+Math.imul(g,H)|0,a=a+Math.imul(g,V)|0;var me=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,$)|0)+Math.imul(p,G)|0))<<13)|0;c=((a=a+Math.imul(p,$)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(v,F),i=(i=Math.imul(v,z))+Math.imul(w,F)|0,a=Math.imul(w,z),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,V)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,V)|0,n=n+Math.imul(h,G)|0,i=(i=i+Math.imul(h,$)|0)+Math.imul(g,G)|0,a=a+Math.imul(g,$)|0;var ye=(c+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(p,Z)|0))<<13)|0;c=((a=a+Math.imul(p,J)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(A,F),i=(i=Math.imul(A,z))+Math.imul(S,F)|0,a=Math.imul(S,z),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(w,H)|0,a=a+Math.imul(w,V)|0,n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,$)|0)+Math.imul(m,G)|0,a=a+Math.imul(m,$)|0,n=n+Math.imul(h,Z)|0,i=(i=i+Math.imul(h,J)|0)+Math.imul(g,Z)|0,a=a+Math.imul(g,J)|0;var ve=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(p,Q)|0))<<13)|0;c=((a=a+Math.imul(p,ee)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(E,F),i=(i=Math.imul(E,z))+Math.imul(O,F)|0,a=Math.imul(O,z),n=n+Math.imul(A,H)|0,i=(i=i+Math.imul(A,V)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,V)|0,n=n+Math.imul(v,G)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(w,G)|0,a=a+Math.imul(w,$)|0,n=n+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,J)|0,n=n+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(g,Q)|0,a=a+Math.imul(g,ee)|0;var we=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(p,re)|0))<<13)|0;c=((a=a+Math.imul(p,ne)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(j,F),i=(i=Math.imul(j,z))+Math.imul(R,F)|0,a=Math.imul(R,z),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(O,H)|0,a=a+Math.imul(O,V)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,$)|0)+Math.imul(S,G)|0,a=a+Math.imul(S,$)|0,n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(w,Z)|0,a=a+Math.imul(w,J)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(h,re)|0,i=(i=i+Math.imul(h,ne)|0)+Math.imul(g,re)|0,a=a+Math.imul(g,ne)|0;var xe=(c+(n=n+Math.imul(f,ae)|0)|0)+((8191&(i=(i=i+Math.imul(f,oe)|0)+Math.imul(p,ae)|0))<<13)|0;c=((a=a+Math.imul(p,oe)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,F),i=(i=Math.imul(T,z))+Math.imul(D,F)|0,a=Math.imul(D,z),n=n+Math.imul(j,H)|0,i=(i=i+Math.imul(j,V)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,V)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(O,G)|0,a=a+Math.imul(O,$)|0,n=n+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(S,Z)|0,a=a+Math.imul(S,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,n=n+Math.imul(h,ae)|0,i=(i=i+Math.imul(h,oe)|0)+Math.imul(g,ae)|0,a=a+Math.imul(g,oe)|0;var Ae=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(p,ue)|0))<<13)|0;c=((a=a+Math.imul(p,ce)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(I,F),i=(i=Math.imul(I,z))+Math.imul(P,F)|0,a=Math.imul(P,z),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(D,H)|0,a=a+Math.imul(D,V)|0,n=n+Math.imul(j,G)|0,i=(i=i+Math.imul(j,$)|0)+Math.imul(R,G)|0,a=a+Math.imul(R,$)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(O,Z)|0,a=a+Math.imul(O,J)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(w,re)|0,a=a+Math.imul(w,ne)|0,n=n+Math.imul(b,ae)|0,i=(i=i+Math.imul(b,oe)|0)+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,n=n+Math.imul(h,ue)|0,i=(i=i+Math.imul(h,ce)|0)+Math.imul(g,ue)|0,a=a+Math.imul(g,ce)|0;var Se=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,pe)|0)+Math.imul(p,fe)|0))<<13)|0;c=((a=a+Math.imul(p,pe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,F),i=(i=Math.imul(N,z))+Math.imul(q,F)|0,a=Math.imul(q,z),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(P,H)|0,a=a+Math.imul(P,V)|0,n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(D,G)|0,a=a+Math.imul(D,$)|0,n=n+Math.imul(j,Z)|0,i=(i=i+Math.imul(j,J)|0)+Math.imul(R,Z)|0,a=a+Math.imul(R,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(O,Q)|0,a=a+Math.imul(O,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(v,ae)|0,i=(i=i+Math.imul(v,oe)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,oe)|0,n=n+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(m,ue)|0,a=a+Math.imul(m,ce)|0,n=n+Math.imul(h,fe)|0,i=(i=i+Math.imul(h,pe)|0)+Math.imul(g,fe)|0,a=a+Math.imul(g,pe)|0;var ke=(c+(n=n+Math.imul(f,he)|0)|0)+((8191&(i=(i=i+Math.imul(f,ge)|0)+Math.imul(p,he)|0))<<13)|0;c=((a=a+Math.imul(p,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(N,H),i=(i=Math.imul(N,V))+Math.imul(q,H)|0,a=Math.imul(q,V),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(P,G)|0,a=a+Math.imul(P,$)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(D,Z)|0,a=a+Math.imul(D,J)|0,n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(O,re)|0,a=a+Math.imul(O,ne)|0,n=n+Math.imul(A,ae)|0,i=(i=i+Math.imul(A,oe)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,ce)|0)+Math.imul(w,ue)|0,a=a+Math.imul(w,ce)|0,n=n+Math.imul(b,fe)|0,i=(i=i+Math.imul(b,pe)|0)+Math.imul(m,fe)|0,a=a+Math.imul(m,pe)|0;var Ee=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,ge)|0)+Math.imul(g,he)|0))<<13)|0;c=((a=a+Math.imul(g,ge)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,G),i=(i=Math.imul(N,$))+Math.imul(q,G)|0,a=Math.imul(q,$),n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(P,Z)|0,a=a+Math.imul(P,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(D,Q)|0,a=a+Math.imul(D,ee)|0,n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(E,ae)|0,i=(i=i+Math.imul(E,oe)|0)+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,n=n+Math.imul(A,ue)|0,i=(i=i+Math.imul(A,ce)|0)+Math.imul(S,ue)|0,a=a+Math.imul(S,ce)|0,n=n+Math.imul(v,fe)|0,i=(i=i+Math.imul(v,pe)|0)+Math.imul(w,fe)|0,a=a+Math.imul(w,pe)|0;var Oe=(c+(n=n+Math.imul(b,he)|0)|0)+((8191&(i=(i=i+Math.imul(b,ge)|0)+Math.imul(m,he)|0))<<13)|0;c=((a=a+Math.imul(m,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(N,Z),i=(i=Math.imul(N,J))+Math.imul(q,Z)|0,a=Math.imul(q,J),n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(P,Q)|0,a=a+Math.imul(P,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(D,re)|0,a=a+Math.imul(D,ne)|0,n=n+Math.imul(j,ae)|0,i=(i=i+Math.imul(j,oe)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(O,ue)|0,a=a+Math.imul(O,ce)|0,n=n+Math.imul(A,fe)|0,i=(i=i+Math.imul(A,pe)|0)+Math.imul(S,fe)|0,a=a+Math.imul(S,pe)|0;var Ce=(c+(n=n+Math.imul(v,he)|0)|0)+((8191&(i=(i=i+Math.imul(v,ge)|0)+Math.imul(w,he)|0))<<13)|0;c=((a=a+Math.imul(w,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,ee))+Math.imul(q,Q)|0,a=Math.imul(q,ee),n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(P,re)|0,a=a+Math.imul(P,ne)|0,n=n+Math.imul(T,ae)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(D,ae)|0,a=a+Math.imul(D,oe)|0,n=n+Math.imul(j,ue)|0,i=(i=i+Math.imul(j,ce)|0)+Math.imul(R,ue)|0,a=a+Math.imul(R,ce)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,pe)|0)+Math.imul(O,fe)|0,a=a+Math.imul(O,pe)|0;var je=(c+(n=n+Math.imul(A,he)|0)|0)+((8191&(i=(i=i+Math.imul(A,ge)|0)+Math.imul(S,he)|0))<<13)|0;c=((a=a+Math.imul(S,ge)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(N,re),i=(i=Math.imul(N,ne))+Math.imul(q,re)|0,a=Math.imul(q,ne),n=n+Math.imul(I,ae)|0,i=(i=i+Math.imul(I,oe)|0)+Math.imul(P,ae)|0,a=a+Math.imul(P,oe)|0,n=n+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(D,ue)|0,a=a+Math.imul(D,ce)|0,n=n+Math.imul(j,fe)|0,i=(i=i+Math.imul(j,pe)|0)+Math.imul(R,fe)|0,a=a+Math.imul(R,pe)|0;var Re=(c+(n=n+Math.imul(E,he)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(O,he)|0))<<13)|0;c=((a=a+Math.imul(O,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(N,ae),i=(i=Math.imul(N,oe))+Math.imul(q,ae)|0,a=Math.imul(q,oe),n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(P,ue)|0,a=a+Math.imul(P,ce)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,pe)|0)+Math.imul(D,fe)|0,a=a+Math.imul(D,pe)|0;var Me=(c+(n=n+Math.imul(j,he)|0)|0)+((8191&(i=(i=i+Math.imul(j,ge)|0)+Math.imul(R,he)|0))<<13)|0;c=((a=a+Math.imul(R,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(N,ue),i=(i=Math.imul(N,ce))+Math.imul(q,ue)|0,a=Math.imul(q,ce),n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,pe)|0)+Math.imul(P,fe)|0,a=a+Math.imul(P,pe)|0;var Te=(c+(n=n+Math.imul(T,he)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(D,he)|0))<<13)|0;c=((a=a+Math.imul(D,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(N,fe),i=(i=Math.imul(N,pe))+Math.imul(q,fe)|0,a=Math.imul(q,pe);var De=(c+(n=n+Math.imul(I,he)|0)|0)+((8191&(i=(i=i+Math.imul(I,ge)|0)+Math.imul(P,he)|0))<<13)|0;c=((a=a+Math.imul(P,ge)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863;var Be=(c+(n=Math.imul(N,he))|0)+((8191&(i=(i=Math.imul(N,ge))+Math.imul(q,he)|0))<<13)|0;return c=((a=Math.imul(q,ge))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=_e,u[1]=be,u[2]=me,u[3]=ye,u[4]=ve,u[5]=we,u[6]=xe,u[7]=Ae,u[8]=Se,u[9]=ke,u[10]=Ee,u[11]=Oe,u[12]=Ce,u[13]=je,u[14]=Re,u[15]=Me,u[16]=Te,u[17]=De,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function jumboMulTo(e,t,r){return(new FFTM).mulp(e,t,r)}function FFTM(e,t){this.x=e,this.y=t}Math.imul||(s=smallMulTo),BN.prototype.mulTo=function mulTo(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?s(this,e,t):r<63?smallMulTo(this,e,t):r<1024?function bigMulTo(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):jumboMulTo(this,e,t)},FFTM.prototype.makeRBT=function makeRBT(e){for(var t=new Array(e),r=BN.prototype._countBits(e)-1,n=0;n>=1;return n},FFTM.prototype.permute=function permute(e,t,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*a+1]=8191&i,i>>>=13;for(a=2*t;a>=26,t+=n/67108864|0,t+=i>>>26,this.words[r]=67108863&i}return 0!==t&&(this.words[r]=t,this.length++),this},BN.prototype.muln=function muln(e){return this.clone().imuln(e)},BN.prototype.sqr=function sqr(){return this.mul(this)},BN.prototype.isqr=function isqr(){return this.imul(this.clone())},BN.prototype.pow=function pow(e){var t=function toBitArray(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new BN(1);for(var r=this,n=0;n=0);var t,r=e%26,n=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=n);u--){var l=0|this.words[u];this.words[u]=c<<26-i|l>>>i,c=l&o}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},BN.prototype.ishrn=function ishrn(e,t,r){return assert(0===this.negative),this.iushrn(e,t,r)},BN.prototype.shln=function shln(e){return this.clone().ishln(e)},BN.prototype.ushln=function ushln(e){return this.clone().iushln(e)},BN.prototype.shrn=function shrn(e){return this.clone().ishrn(e)},BN.prototype.ushrn=function ushrn(e){return this.clone().iushrn(e)},BN.prototype.testn=function testn(e){assert("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<=0);var t=e%26,r=(e-t)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},BN.prototype.isubn=function isubn(e){if(assert("number"==typeof e),assert(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[n+r]=67108863&i}for(;n>26,this.words[n+r]=67108863&i;if(0===o)return this.strip();for(assert(-1===o),o=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this.strip()},BN.prototype._wordDiv=function _wordDiv(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var o,s=n.length-i.length;if("mod"!==t){(o=new BN(null)).length=s+1,o.words=new Array(o.length);for(var u=0;u=0;l--){var f=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(i,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);o&&(o.words[l]=f)}return o&&o.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:o||null,mod:n}},BN.prototype.divmod=function divmod(e,t,r){return assert(!e.isZero()),this.isZero()?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(n=a.div.neg()),"div"!==t&&(i=a.mod.neg(),r&&0!==i.negative&&i.iadd(e)),{div:n,mod:i}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(n=a.div.neg()),{div:n,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(i=a.mod.neg(),r&&0!==i.negative&&i.isub(e)),{div:a.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new BN(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new BN(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new BN(this.modn(e.words[0]))}:this._wordDiv(e,t);var n,i,a},BN.prototype.div=function div(e){return this.divmod(e,"div",!1).div},BN.prototype.mod=function mod(e){return this.divmod(e,"mod",!1).mod},BN.prototype.umod=function umod(e){return this.divmod(e,"mod",!0).mod},BN.prototype.divRound=function divRound(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},BN.prototype.modn=function modn(e){assert(e<=67108863);for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},BN.prototype.idivn=function idivn(e){assert(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t;this.words[r]=n/e|0,t=n%e}return this.strip()},BN.prototype.divn=function divn(e){return this.clone().idivn(e)},BN.prototype.egcd=function egcd(e){assert(0===e.negative),assert(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new BN(1),i=new BN(0),a=new BN(0),o=new BN(1),s=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++s;for(var u=r.clone(),c=t.clone();!t.isZero();){for(var l=0,f=1;0==(t.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(u),i.isub(c)),n.iushrn(1),i.iushrn(1);for(var p=0,d=1;0==(r.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(u),o.isub(c)),a.iushrn(1),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(a),i.isub(o)):(r.isub(t),a.isub(n),o.isub(i))}return{a:a,b:o,gcd:r.iushln(s)}},BN.prototype._invmp=function _invmp(e){assert(0===e.negative),assert(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,i=new BN(1),a=new BN(0),o=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var s=0,u=1;0==(t.words[0]&u)&&s<26;++s,u<<=1);if(s>0)for(t.iushrn(s);s-- >0;)i.isOdd()&&i.iadd(o),i.iushrn(1);for(var c=0,l=1;0==(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(o),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a)):(r.isub(t),a.isub(i))}return(n=0===t.cmpn(1)?i:a).cmpn(0)<0&&n.iadd(e),n},BN.prototype.gcd=function gcd(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},BN.prototype.invm=function invm(e){return this.egcd(e).a.umod(e)},BN.prototype.isEven=function isEven(){return 0==(1&this.words[0])},BN.prototype.isOdd=function isOdd(){return 1==(1&this.words[0])},BN.prototype.andln=function andln(e){return this.words[0]&e},BN.prototype.bincn=function bincn(e){assert("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<>>26,o&=67108863,this.words[a]=o}return 0!==i&&(this.words[a]=i,this.length++),this},BN.prototype.isZero=function isZero(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function cmpn(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),assert(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},BN.prototype.gtn=function gtn(e){return 1===this.cmpn(e)},BN.prototype.gt=function gt(e){return 1===this.cmp(e)},BN.prototype.gten=function gten(e){return this.cmpn(e)>=0},BN.prototype.gte=function gte(e){return this.cmp(e)>=0},BN.prototype.ltn=function ltn(e){return-1===this.cmpn(e)},BN.prototype.lt=function lt(e){return-1===this.cmp(e)},BN.prototype.lten=function lten(e){return this.cmpn(e)<=0},BN.prototype.lte=function lte(e){return this.cmp(e)<=0},BN.prototype.eqn=function eqn(e){return 0===this.cmpn(e)},BN.prototype.eq=function eq(e){return 0===this.cmp(e)},BN.red=function red(e){return new Red(e)},BN.prototype.toRed=function toRed(e){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},BN.prototype.fromRed=function fromRed(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function _forceRed(e){return this.red=e,this},BN.prototype.forceRed=function forceRed(e){return assert(!this.red,"Already a number in reduction context"),this._forceRed(e)},BN.prototype.redAdd=function redAdd(e){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},BN.prototype.redIAdd=function redIAdd(e){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},BN.prototype.redSub=function redSub(e){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},BN.prototype.redISub=function redISub(e){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},BN.prototype.redShl=function redShl(e){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},BN.prototype.redMul=function redMul(e){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},BN.prototype.redIMul=function redIMul(e){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},BN.prototype.redSqr=function redSqr(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function redISqr(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function redSqrt(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function redInvm(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function redNeg(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function redPow(e){return assert(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var u={k256:null,p224:null,p192:null,p25519:null};function MPrime(e,t){this.name=e,this.p=new BN(t,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(e){if("string"==typeof e){var t=BN._prime(e);this.m=t.p,this.prime=t}else assert(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function Mont(e){Red.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}MPrime.prototype._tmp=function _tmp(){var e=new BN(null);return e.words=new Array(Math.ceil(this.n/13)),e},MPrime.prototype.ireduce=function ireduce(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},MPrime.prototype.split=function split(e,t){e.iushrn(this.n,0,t)},MPrime.prototype.imulK=function imulK(e){return e.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function split(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},K256.prototype.imulK=function imulK(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},BN._prime=function prime(e){if(u[e])return u[e];var prime;if("k256"===e)prime=new K256;else if("p224"===e)prime=new P224;else if("p192"===e)prime=new P192;else{if("p25519"!==e)throw new Error("Unknown prime "+e);prime=new P25519}return u[e]=prime,prime},Red.prototype._verify1=function _verify1(e){assert(0===e.negative,"red works only with positives"),assert(e.red,"red works only with red numbers")},Red.prototype._verify2=function _verify2(e,t){assert(0==(e.negative|t.negative),"red works only with positives"),assert(e.red&&e.red===t.red,"red works only with red numbers")},Red.prototype.imod=function imod(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},Red.prototype.neg=function neg(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},Red.prototype.add=function add(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},Red.prototype.iadd=function iadd(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},Red.prototype.sub=function sub(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},Red.prototype.isub=function isub(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},Red.prototype.shl=function shl(e,t){return this._verify1(e),this.imod(e.ushln(t))},Red.prototype.imul=function imul(e,t){return this._verify2(e,t),this.imod(e.imul(t))},Red.prototype.mul=function mul(e,t){return this._verify2(e,t),this.imod(e.mul(t))},Red.prototype.isqr=function isqr(e){return this.imul(e,e.clone())},Red.prototype.sqr=function sqr(e){return this.mul(e,e)},Red.prototype.sqrt=function sqrt(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(assert(t%2==1),3===t){var r=this.m.add(new BN(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),i=0;!n.isZero()&&0===n.andln(1);)i++,n.iushrn(1);assert(!n.isZero());var a=new BN(1).toRed(this),o=a.redNeg(),s=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new BN(2*u*u).toRed(this);0!==this.pow(u,s).cmp(o);)u.redIAdd(o);for(var c=this.pow(u,n),l=this.pow(e,n.addn(1).iushrn(1)),f=this.pow(e,n),p=i;0!==f.cmp(a);){for(var d=f,h=0;0!==d.cmp(a);h++)d=d.redSqr();assert(h=0;n--){for(var u=t.words[n],c=s-1;c>=0;c--){var l=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++o||0===n&&0===c)&&(i=this.mul(i,r[a]),o=0,a=0)):o=0}s=26}return i},Red.prototype.convertTo=function convertTo(e){var t=e.umod(this.m);return t===e?t.clone():t},Red.prototype.convertFrom=function convertFrom(e){var t=e.clone();return t.red=null,t},BN.mont=function mont(e){return new Mont(e)},inherits(Mont,Red),Mont.prototype.convertTo=function convertTo(e){return this.imod(e.ushln(this.shift))},Mont.prototype.convertFrom=function convertFrom(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},Mont.prototype.imul=function imul(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},Mont.prototype.mul=function mul(e,t){if(e.isZero()||t.isZero())return new BN(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},Mont.prototype.invm=function invm(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(18)(e))},function(e,t,r){"use strict";t.__esModule=!0;var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(371));t.default=n.default||function(e){for(var t=1;t - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(){var a,o=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="__lodash_hash_undefined__",l=500,f="__lodash_placeholder__",p=1,d=2,h=4,g=1,_=2,b=1,m=2,y=4,v=8,w=16,x=32,A=64,S=128,k=256,E=512,O=30,C="...",j=800,R=16,M=1,T=2,D=1/0,B=9007199254740991,I=17976931348623157e292,P=NaN,L=4294967295,N=L-1,q=L>>>1,U=[["ary",S],["bind",b],["bindKey",m],["curry",v],["curryRight",w],["flip",E],["partial",x],["partialRight",A],["rearg",k]],F="[object Arguments]",z="[object Array]",W="[object AsyncFunction]",H="[object Boolean]",V="[object Date]",K="[object DOMException]",G="[object Error]",$="[object Function]",Y="[object GeneratorFunction]",Z="[object Map]",J="[object Number]",X="[object Null]",Q="[object Object]",ee="[object Proxy]",te="[object RegExp]",re="[object Set]",ne="[object String]",ie="[object Symbol]",ae="[object Undefined]",oe="[object WeakMap]",se="[object WeakSet]",ue="[object ArrayBuffer]",ce="[object DataView]",le="[object Float32Array]",fe="[object Float64Array]",pe="[object Int8Array]",de="[object Int16Array]",he="[object Int32Array]",ge="[object Uint8Array]",_e="[object Uint8ClampedArray]",be="[object Uint16Array]",me="[object Uint32Array]",ye=/\b__p \+= '';/g,ve=/\b(__p \+=) '' \+/g,we=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xe=/&(?:amp|lt|gt|quot|#39);/g,Ae=/[&<>"']/g,Se=RegExp(xe.source),ke=RegExp(Ae.source),Ee=/<%-([\s\S]+?)%>/g,Oe=/<%([\s\S]+?)%>/g,Ce=/<%=([\s\S]+?)%>/g,je=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Re=/^\w*$/,Me=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Te=/[\\^$.*+?()[\]{}|]/g,De=RegExp(Te.source),Be=/^\s+|\s+$/g,Ie=/^\s+/,Pe=/\s+$/,Le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ne=/\{\n\/\* \[wrapped with (.+)\] \*/,qe=/,? & /,Ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Fe=/\\(\\)?/g,ze=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,We=/\w*$/,He=/^[-+]0x[0-9a-f]+$/i,Ve=/^0b[01]+$/i,Ke=/^\[object .+?Constructor\]$/,Ge=/^0o[0-7]+$/i,$e=/^(?:0|[1-9]\d*)$/,Ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ze=/($^)/,Je=/['\n\r\u2028\u2029\\]/g,Xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Qe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",et="[\\ud800-\\udfff]",tt="["+Qe+"]",rt="["+Xe+"]",nt="\\d+",it="[\\u2700-\\u27bf]",at="[a-z\\xdf-\\xf6\\xf8-\\xff]",ot="[^\\ud800-\\udfff"+Qe+nt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",st="\\ud83c[\\udffb-\\udfff]",ut="[^\\ud800-\\udfff]",ct="(?:\\ud83c[\\udde6-\\uddff]){2}",lt="[\\ud800-\\udbff][\\udc00-\\udfff]",ft="[A-Z\\xc0-\\xd6\\xd8-\\xde]",pt="(?:"+at+"|"+ot+")",dt="(?:"+ft+"|"+ot+")",ht="(?:"+rt+"|"+st+")"+"?",gt="[\\ufe0e\\ufe0f]?"+ht+("(?:\\u200d(?:"+[ut,ct,lt].join("|")+")[\\ufe0e\\ufe0f]?"+ht+")*"),_t="(?:"+[it,ct,lt].join("|")+")"+gt,bt="(?:"+[ut+rt+"?",rt,ct,lt,et].join("|")+")",mt=RegExp("['’]","g"),yt=RegExp(rt,"g"),vt=RegExp(st+"(?="+st+")|"+bt+gt,"g"),wt=RegExp([ft+"?"+at+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[tt,ft,"$"].join("|")+")",dt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[tt,ft+pt,"$"].join("|")+")",ft+"?"+pt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ft+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",nt,_t].join("|"),"g"),xt=RegExp("[\\u200d\\ud800-\\udfff"+Xe+"\\ufe0e\\ufe0f]"),At=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,St=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],kt=-1,Et={};Et[le]=Et[fe]=Et[pe]=Et[de]=Et[he]=Et[ge]=Et[_e]=Et[be]=Et[me]=!0,Et[F]=Et[z]=Et[ue]=Et[H]=Et[ce]=Et[V]=Et[G]=Et[$]=Et[Z]=Et[J]=Et[Q]=Et[te]=Et[re]=Et[ne]=Et[oe]=!1;var Ot={};Ot[F]=Ot[z]=Ot[ue]=Ot[ce]=Ot[H]=Ot[V]=Ot[le]=Ot[fe]=Ot[pe]=Ot[de]=Ot[he]=Ot[Z]=Ot[J]=Ot[Q]=Ot[te]=Ot[re]=Ot[ne]=Ot[ie]=Ot[ge]=Ot[_e]=Ot[be]=Ot[me]=!0,Ot[G]=Ot[$]=Ot[oe]=!1;var Ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jt=parseFloat,Rt=parseInt,Mt="object"==typeof e&&e&&e.Object===Object&&e,Tt="object"==typeof self&&self&&self.Object===Object&&self,Dt=Mt||Tt||Function("return this")(),Bt=t&&!t.nodeType&&t,It=Bt&&"object"==typeof n&&n&&!n.nodeType&&n,Pt=It&&It.exports===Bt,Lt=Pt&&Mt.process,Nt=function(){try{var e=It&&It.require&&It.require("util").types;return e||Lt&&Lt.binding&&Lt.binding("util")}catch(e){}}(),qt=Nt&&Nt.isArrayBuffer,Ut=Nt&&Nt.isDate,Ft=Nt&&Nt.isMap,zt=Nt&&Nt.isRegExp,Wt=Nt&&Nt.isSet,Ht=Nt&&Nt.isTypedArray;function apply(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function arrayAggregator(e,t,r,n){for(var i=-1,a=null==e?0:e.length;++i-1}function arrayIncludesWith(e,t,r){for(var n=-1,i=null==e?0:e.length;++n-1;);return r}function charsEndIndex(e,t){for(var r=e.length;r--&&baseIndexOf(t,e[r],0)>-1;);return r}var Kt=basePropertyOf({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Gt=basePropertyOf({"&":"&","<":"<",">":">",'"':""","'":"'"});function escapeStringChar(e){return"\\"+Ct[e]}function hasUnicode(e){return xt.test(e)}function mapToArray(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function overArg(e,t){return function(r){return e(t(r))}}function replaceHolders(e,t){for(var r=-1,n=e.length,i=0,a=[];++r",""":'"',"'":"'"});var Yt=function runInContext(e){var t,r=(e=null==e?Dt:Yt.defaults(Dt.Object(),e,Yt.pick(Dt,St))).Array,n=e.Date,i=e.Error,Xe=e.Function,Qe=e.Math,et=e.Object,tt=e.RegExp,rt=e.String,nt=e.TypeError,it=r.prototype,at=Xe.prototype,ot=et.prototype,st=e["__core-js_shared__"],ut=at.toString,ct=ot.hasOwnProperty,lt=0,ft=(t=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"",pt=ot.toString,dt=ut.call(et),ht=Dt._,gt=tt("^"+ut.call(ct).replace(Te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_t=Pt?e.Buffer:a,bt=e.Symbol,vt=e.Uint8Array,xt=_t?_t.allocUnsafe:a,Ct=overArg(et.getPrototypeOf,et),Mt=et.create,Tt=ot.propertyIsEnumerable,Bt=it.splice,It=bt?bt.isConcatSpreadable:a,Lt=bt?bt.iterator:a,Nt=bt?bt.toStringTag:a,Vt=function(){try{var e=getNative(et,"defineProperty");return e({},"",{}),e}catch(e){}}(),Zt=e.clearTimeout!==Dt.clearTimeout&&e.clearTimeout,Jt=n&&n.now!==Dt.Date.now&&n.now,Xt=e.setTimeout!==Dt.setTimeout&&e.setTimeout,Qt=Qe.ceil,er=Qe.floor,tr=et.getOwnPropertySymbols,rr=_t?_t.isBuffer:a,nr=e.isFinite,ir=it.join,ar=overArg(et.keys,et),or=Qe.max,sr=Qe.min,ur=n.now,cr=e.parseInt,lr=Qe.random,fr=it.reverse,pr=getNative(e,"DataView"),dr=getNative(e,"Map"),hr=getNative(e,"Promise"),gr=getNative(e,"Set"),_r=getNative(e,"WeakMap"),br=getNative(et,"create"),mr=_r&&new _r,yr={},vr=toSource(pr),wr=toSource(dr),xr=toSource(hr),Ar=toSource(gr),Sr=toSource(_r),kr=bt?bt.prototype:a,Er=kr?kr.valueOf:a,Or=kr?kr.toString:a;function lodash(e){if(isObjectLike(e)&&!Tn(e)&&!(e instanceof LazyWrapper)){if(e instanceof LodashWrapper)return e;if(ct.call(e,"__wrapped__"))return wrapperClone(e)}return new LodashWrapper(e)}var Cr=function(){function object(){}return function(e){if(!isObject(e))return{};if(Mt)return Mt(e);object.prototype=e;var t=new object;return object.prototype=a,t}}();function baseLodash(){}function LodashWrapper(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=a}function LazyWrapper(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=L,this.__views__=[]}function Hash(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function baseClone(e,t,r,n,i,o){var s,u=t&p,c=t&d,l=t&h;if(r&&(s=i?r(e,n,i,o):r(e)),s!==a)return s;if(!isObject(e))return e;var f=Tn(e);if(f){if(s=function initCloneArray(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&ct.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!u)return copyArray(e,s)}else{var g=Fr(e),_=g==$||g==Y;if(Bn(e))return cloneBuffer(e,u);if(g==Q||g==F||_&&!i){if(s=c||_?{}:initCloneObject(e),!u)return c?function copySymbolsIn(e,t){return copyObject(e,Ur(e),t)}(e,function baseAssignIn(e,t){return e&©Object(t,keysIn(t),e)}(s,e)):function copySymbols(e,t){return copyObject(e,qr(e),t)}(e,baseAssign(s,e))}else{if(!Ot[g])return i?e:{};s=function initCloneByTag(e,t,r){var n=e.constructor;switch(t){case ue:return cloneArrayBuffer(e);case H:case V:return new n(+e);case ce:return function cloneDataView(e,t){var r=t?cloneArrayBuffer(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case le:case fe:case pe:case de:case he:case ge:case _e:case be:case me:return cloneTypedArray(e,r);case Z:return new n;case J:case ne:return new n(e);case te:return function cloneRegExp(e){var t=new e.constructor(e.source,We.exec(e));return t.lastIndex=e.lastIndex,t}(e);case re:return new n;case ie:return function cloneSymbol(e){return Er?et(Er.call(e)):{}}(e)}}(e,g,u)}}o||(o=new Stack);var b=o.get(e);if(b)return b;o.set(e,s),Nn(e)?e.forEach((function(n){s.add(baseClone(n,t,r,n,e,o))})):Pn(e)&&e.forEach((function(n,i){s.set(i,baseClone(n,t,r,i,e,o))}));var m=f?a:(l?c?getAllKeysIn:getAllKeys:c?keysIn:keys)(e);return arrayEach(m||e,(function(n,i){m&&(n=e[i=n]),assignValue(s,i,baseClone(n,t,r,i,e,o))})),s}function baseConformsTo(e,t,r){var n=r.length;if(null==e)return!n;for(e=et(e);n--;){var i=r[n],o=t[i],s=e[i];if(s===a&&!(i in e)||!o(s))return!1}return!0}function baseDelay(e,t,r){if("function"!=typeof e)throw new nt(u);return Hr((function(){e.apply(a,r)}),t)}function baseDifference(e,t,r,n){var i=-1,a=arrayIncludes,s=!0,u=e.length,c=[],l=t.length;if(!u)return c;r&&(t=arrayMap(t,baseUnary(r))),n?(a=arrayIncludesWith,s=!1):t.length>=o&&(a=cacheHas,s=!1,t=new SetCache(t));e:for(;++i-1},ListCache.prototype.set=function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},MapCache.prototype.clear=function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(dr||ListCache),string:new Hash}},MapCache.prototype.delete=function mapCacheDelete(e){var t=getMapData(this,e).delete(e);return this.size-=t?1:0,t},MapCache.prototype.get=function mapCacheGet(e){return getMapData(this,e).get(e)},MapCache.prototype.has=function mapCacheHas(e){return getMapData(this,e).has(e)},MapCache.prototype.set=function mapCacheSet(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},SetCache.prototype.add=SetCache.prototype.push=function setCacheAdd(e){return this.__data__.set(e,c),this},SetCache.prototype.has=function setCacheHas(e){return this.__data__.has(e)},Stack.prototype.clear=function stackClear(){this.__data__=new ListCache,this.size=0},Stack.prototype.delete=function stackDelete(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Stack.prototype.get=function stackGet(e){return this.__data__.get(e)},Stack.prototype.has=function stackHas(e){return this.__data__.has(e)},Stack.prototype.set=function stackSet(e,t){var r=this.__data__;if(r instanceof ListCache){var n=r.__data__;if(!dr||n.length0&&r(s)?t>1?baseFlatten(s,t-1,r,n,i):arrayPush(i,s):n||(i[i.length]=s)}return i}var Mr=createBaseFor(),Tr=createBaseFor(!0);function baseForOwn(e,t){return e&&Mr(e,t,keys)}function baseForOwnRight(e,t){return e&&Tr(e,t,keys)}function baseFunctions(e,t){return arrayFilter(t,(function(t){return isFunction(e[t])}))}function baseGet(e,t){for(var r=0,n=(t=castPath(t,e)).length;null!=e&&rt}function baseHas(e,t){return null!=e&&ct.call(e,t)}function baseHasIn(e,t){return null!=e&&t in et(e)}function baseIntersection(e,t,n){for(var i=n?arrayIncludesWith:arrayIncludes,o=e[0].length,s=e.length,u=s,c=r(s),l=1/0,f=[];u--;){var p=e[u];u&&t&&(p=arrayMap(p,baseUnary(t))),l=sr(p.length,l),c[u]=!n&&(t||o>=120&&p.length>=120)?new SetCache(u&&p):a}p=e[0];var d=-1,h=c[0];e:for(;++d=s)return u;var c=r[n];return u*("desc"==c?-1:1)}}return e.index-t.index}(e,t,r)}))}function basePickBy(e,t,r){for(var n=-1,i=t.length,a={};++n-1;)s!==e&&Bt.call(s,u,1),Bt.call(e,u,1);return e}function basePullAt(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==a){var a=i;isIndex(i)?Bt.call(e,i,1):baseUnset(e,i)}}return e}function baseRandom(e,t){return e+er(lr()*(t-e+1))}function baseRepeat(e,t){var r="";if(!e||t<1||t>B)return r;do{t%2&&(r+=e),(t=er(t/2))&&(e+=e)}while(t);return r}function baseRest(e,t){return Vr(overRest(e,t,identity),e+"")}function baseSample(e){return arraySample(values(e))}function baseSampleSize(e,t){var r=values(e);return shuffleSelf(r,baseClamp(t,0,r.length))}function baseSet(e,t,r,n){if(!isObject(e))return e;for(var i=-1,o=(t=castPath(t,e)).length,s=o-1,u=e;null!=u&&++ia?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=r(a);++i>>1,o=e[a];null!==o&&!isSymbol(o)&&(r?o<=t:o=o){var l=t?null:Lr(e);if(l)return setToArray(l);s=!1,i=cacheHas,c=new SetCache}else c=t?[]:u;e:for(;++n=n?e:baseSlice(e,t,r)}var Pr=Zt||function(e){return Dt.clearTimeout(e)};function cloneBuffer(e,t){if(t)return e.slice();var r=e.length,n=xt?xt(r):new e.constructor(r);return e.copy(n),n}function cloneArrayBuffer(e){var t=new e.constructor(e.byteLength);return new vt(t).set(new vt(e)),t}function cloneTypedArray(e,t){var r=t?cloneArrayBuffer(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function compareAscending(e,t){if(e!==t){var r=e!==a,n=null===e,i=e==e,o=isSymbol(e),s=t!==a,u=null===t,c=t==t,l=isSymbol(t);if(!u&&!l&&!o&&e>t||o&&s&&c&&!u&&!l||n&&s&&c||!r&&c||!i)return 1;if(!n&&!o&&!l&&e1?r[i-1]:a,s=i>2?r[2]:a;for(o=e.length>3&&"function"==typeof o?(i--,o):a,s&&isIterateeCall(r[0],r[1],s)&&(o=i<3?a:o,i=1),t=et(t);++n-1?i[o?t[s]:s]:a}}function createFlow(e){return flatRest((function(t){var r=t.length,n=r,i=LodashWrapper.prototype.thru;for(e&&t.reverse();n--;){var o=t[n];if("function"!=typeof o)throw new nt(u);if(i&&!s&&"wrapper"==getFuncName(o))var s=new LodashWrapper([],!0)}for(n=s?n:r;++n1&&m.reverse(),p&&lu))return!1;var l=o.get(e);if(l&&o.get(t))return l==t;var f=-1,p=!0,d=r&_?new SetCache:a;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(Le,"{\n/* [wrapped with "+t+"] */\n")}(n,function updateWrapDetails(e,t){return arrayEach(U,(function(r){var n="_."+r[0];t&r[1]&&!arrayIncludes(e,n)&&e.push(n)})),e.sort()}(function getWrapDetails(e){var t=e.match(Ne);return t?t[1].split(qe):[]}(n),r)))}function shortOut(e){var t=0,r=0;return function(){var n=ur(),i=R-(n-r);if(r=n,i>0){if(++t>=j)return arguments[0]}else t=0;return e.apply(a,arguments)}}function shuffleSelf(e,t){var r=-1,n=e.length,i=n-1;for(t=t===a?n:t;++r1?e[t-1]:a;return r="function"==typeof r?(e.pop(),r):a,unzipWith(e,r)}));function chain(e){var t=lodash(e);return t.__chain__=!0,t}function thru(e,t){return t(e)}var fn=flatRest((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return baseAt(t,e)};return!(t>1||this.__actions__.length)&&n instanceof LazyWrapper&&isIndex(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:thru,args:[i],thisArg:a}),new LodashWrapper(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(a),e}))):this.thru(i)}));var pn=createAggregator((function(e,t,r){ct.call(e,r)?++e[r]:baseAssignValue(e,r,1)}));var dn=createFind(findIndex),hn=createFind(findLastIndex);function forEach(e,t){return(Tn(e)?arrayEach:jr)(e,getIteratee(t,3))}function forEachRight(e,t){return(Tn(e)?arrayEachRight:Rr)(e,getIteratee(t,3))}var gn=createAggregator((function(e,t,r){ct.call(e,r)?e[r].push(t):baseAssignValue(e,r,[t])}));var _n=baseRest((function(e,t,n){var i=-1,a="function"==typeof t,o=isArrayLike(e)?r(e.length):[];return jr(e,(function(e){o[++i]=a?apply(t,e,n):baseInvoke(e,t,n)})),o})),bn=createAggregator((function(e,t,r){baseAssignValue(e,r,t)}));function map(e,t){return(Tn(e)?arrayMap:baseMap)(e,getIteratee(t,3))}var mn=createAggregator((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var yn=baseRest((function(e,t){if(null==e)return[];var r=t.length;return r>1&&isIterateeCall(e,t[0],t[1])?t=[]:r>2&&isIterateeCall(t[0],t[1],t[2])&&(t=[t[0]]),baseOrderBy(e,baseFlatten(t,1),[])})),vn=Jt||function(){return Dt.Date.now()};function ary(e,t,r){return t=r?a:t,t=e&&null==t?e.length:t,createWrap(e,S,a,a,a,a,t)}function before(e,t){var r;if("function"!=typeof t)throw new nt(u);return e=toInteger(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=a),r}}var wn=baseRest((function(e,t,r){var n=b;if(r.length){var i=replaceHolders(r,getHolder(wn));n|=x}return createWrap(e,n,t,r,i)})),xn=baseRest((function(e,t,r){var n=b|m;if(r.length){var i=replaceHolders(r,getHolder(xn));n|=x}return createWrap(t,n,e,r,i)}));function debounce(e,t,r){var n,i,o,s,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof e)throw new nt(u);function invokeFunc(t){var r=n,o=i;return n=i=a,f=t,s=e.apply(o,r)}function shouldInvoke(e){var r=e-l;return l===a||r>=t||r<0||d&&e-f>=o}function timerExpired(){var e=vn();if(shouldInvoke(e))return trailingEdge(e);c=Hr(timerExpired,function remainingWait(e){var r=t-(e-l);return d?sr(r,o-(e-f)):r}(e))}function trailingEdge(e){return c=a,h&&n?invokeFunc(e):(n=i=a,s)}function debounced(){var e=vn(),r=shouldInvoke(e);if(n=arguments,i=this,l=e,r){if(c===a)return function leadingEdge(e){return f=e,c=Hr(timerExpired,t),p?invokeFunc(e):s}(l);if(d)return Pr(c),c=Hr(timerExpired,t),invokeFunc(l)}return c===a&&(c=Hr(timerExpired,t)),s}return t=toNumber(t)||0,isObject(r)&&(p=!!r.leading,o=(d="maxWait"in r)?or(toNumber(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h),debounced.cancel=function cancel(){c!==a&&Pr(c),f=0,n=l=i=c=a},debounced.flush=function flush(){return c===a?s:trailingEdge(vn())},debounced}var An=baseRest((function(e,t){return baseDelay(e,1,t)})),Sn=baseRest((function(e,t,r){return baseDelay(e,toNumber(t)||0,r)}));function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new nt(u);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(memoize.Cache||MapCache),r}function negate(e){if("function"!=typeof e)throw new nt(u);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}memoize.Cache=MapCache;var kn=Ir((function(e,t){var r=(t=1==t.length&&Tn(t[0])?arrayMap(t[0],baseUnary(getIteratee())):arrayMap(baseFlatten(t,1),baseUnary(getIteratee()))).length;return baseRest((function(n){for(var i=-1,a=sr(n.length,r);++i=t})),Mn=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike(e)&&ct.call(e,"callee")&&!Tt.call(e,"callee")},Tn=r.isArray,Dn=qt?baseUnary(qt):function baseIsArrayBuffer(e){return isObjectLike(e)&&baseGetTag(e)==ue};function isArrayLike(e){return null!=e&&isLength(e.length)&&!isFunction(e)}function isArrayLikeObject(e){return isObjectLike(e)&&isArrayLike(e)}var Bn=rr||stubFalse,In=Ut?baseUnary(Ut):function baseIsDate(e){return isObjectLike(e)&&baseGetTag(e)==V};function isError(e){if(!isObjectLike(e))return!1;var t=baseGetTag(e);return t==G||t==K||"string"==typeof e.message&&"string"==typeof e.name&&!isPlainObject(e)}function isFunction(e){if(!isObject(e))return!1;var t=baseGetTag(e);return t==$||t==Y||t==W||t==ee}function isInteger(e){return"number"==typeof e&&e==toInteger(e)}function isLength(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=B}function isObject(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function isObjectLike(e){return null!=e&&"object"==typeof e}var Pn=Ft?baseUnary(Ft):function baseIsMap(e){return isObjectLike(e)&&Fr(e)==Z};function isNumber(e){return"number"==typeof e||isObjectLike(e)&&baseGetTag(e)==J}function isPlainObject(e){if(!isObjectLike(e)||baseGetTag(e)!=Q)return!1;var t=Ct(e);if(null===t)return!0;var r=ct.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ut.call(r)==dt}var Ln=zt?baseUnary(zt):function baseIsRegExp(e){return isObjectLike(e)&&baseGetTag(e)==te};var Nn=Wt?baseUnary(Wt):function baseIsSet(e){return isObjectLike(e)&&Fr(e)==re};function isString(e){return"string"==typeof e||!Tn(e)&&isObjectLike(e)&&baseGetTag(e)==ne}function isSymbol(e){return"symbol"==typeof e||isObjectLike(e)&&baseGetTag(e)==ie}var qn=Ht?baseUnary(Ht):function baseIsTypedArray(e){return isObjectLike(e)&&isLength(e.length)&&!!Et[baseGetTag(e)]};var Un=createRelationalOperation(baseLt),Fn=createRelationalOperation((function(e,t){return e<=t}));function toArray(e){if(!e)return[];if(isArrayLike(e))return isString(e)?stringToArray(e):copyArray(e);if(Lt&&e[Lt])return function iteratorToArray(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Lt]());var t=Fr(e);return(t==Z?mapToArray:t==re?setToArray:values)(e)}function toFinite(e){return e?(e=toNumber(e))===D||e===-D?(e<0?-1:1)*I:e==e?e:0:0===e?e:0}function toInteger(e){var t=toFinite(e),r=t%1;return t==t?r?t-r:t:0}function toLength(e){return e?baseClamp(toInteger(e),0,L):0}function toNumber(e){if("number"==typeof e)return e;if(isSymbol(e))return P;if(isObject(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=isObject(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Be,"");var r=Ve.test(e);return r||Ge.test(e)?Rt(e.slice(2),r?2:8):He.test(e)?P:+e}function toPlainObject(e){return copyObject(e,keysIn(e))}function toString(e){return null==e?"":baseToString(e)}var zn=createAssigner((function(e,t){if(isPrototype(t)||isArrayLike(t))copyObject(t,keys(t),e);else for(var r in t)ct.call(t,r)&&assignValue(e,r,t[r])})),Wn=createAssigner((function(e,t){copyObject(t,keysIn(t),e)})),Hn=createAssigner((function(e,t,r,n){copyObject(t,keysIn(t),e,n)})),Vn=createAssigner((function(e,t,r,n){copyObject(t,keys(t),e,n)})),Kn=flatRest(baseAt);var Gn=baseRest((function(e,t){e=et(e);var r=-1,n=t.length,i=n>2?t[2]:a;for(i&&isIterateeCall(t[0],t[1],i)&&(n=1);++r1),t})),copyObject(e,getAllKeysIn(e),r),n&&(r=baseClone(r,p|d|h,customOmitClone));for(var i=t.length;i--;)baseUnset(r,t[i]);return r}));var ti=flatRest((function(e,t){return null==e?{}:function basePick(e,t){return basePickBy(e,t,(function(t,r){return hasIn(e,r)}))}(e,t)}));function pickBy(e,t){if(null==e)return{};var r=arrayMap(getAllKeysIn(e),(function(e){return[e]}));return t=getIteratee(t),basePickBy(e,r,(function(e,r){return t(e,r[0])}))}var ri=createToPairs(keys),ni=createToPairs(keysIn);function values(e){return null==e?[]:baseValues(e,keys(e))}var ii=createCompounder((function(e,t,r){return t=t.toLowerCase(),e+(r?capitalize(t):t)}));function capitalize(e){return fi(toString(e).toLowerCase())}function deburr(e){return(e=toString(e))&&e.replace(Ye,Kt).replace(yt,"")}var ai=createCompounder((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),oi=createCompounder((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),si=createCaseFirst("toLowerCase");var ui=createCompounder((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var ci=createCompounder((function(e,t,r){return e+(r?" ":"")+fi(t)}));var li=createCompounder((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),fi=createCaseFirst("toUpperCase");function words(e,t,r){return e=toString(e),(t=r?a:t)===a?function hasUnicodeWord(e){return At.test(e)}(e)?function unicodeWords(e){return e.match(wt)||[]}(e):function asciiWords(e){return e.match(Ue)||[]}(e):e.match(t)||[]}var pi=baseRest((function(e,t){try{return apply(e,a,t)}catch(e){return isError(e)?e:new i(e)}})),di=flatRest((function(e,t){return arrayEach(t,(function(t){t=toKey(t),baseAssignValue(e,t,wn(e[t],e))})),e}));function constant(e){return function(){return e}}var hi=createFlow(),gi=createFlow(!0);function identity(e){return e}function iteratee(e){return baseIteratee("function"==typeof e?e:baseClone(e,p))}var _i=baseRest((function(e,t){return function(r){return baseInvoke(r,e,t)}})),bi=baseRest((function(e,t){return function(r){return baseInvoke(e,r,t)}}));function mixin(e,t,r){var n=keys(t),i=baseFunctions(t,n);null!=r||isObject(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=baseFunctions(t,keys(t)));var a=!(isObject(r)&&"chain"in r&&!r.chain),o=isFunction(e);return arrayEach(i,(function(r){var n=t[r];e[r]=n,o&&(e.prototype[r]=function(){var t=this.__chain__;if(a||t){var r=e(this.__wrapped__),i=r.__actions__=copyArray(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,arrayPush([this.value()],arguments))})})),e}function noop(){}var mi=createOver(arrayMap),yi=createOver(arrayEvery),vi=createOver(arraySome);function property(e){return isKey(e)?baseProperty(toKey(e)):function basePropertyDeep(e){return function(t){return baseGet(t,e)}}(e)}var wi=createRange(),xi=createRange(!0);function stubArray(){return[]}function stubFalse(){return!1}var Ai=createMathOperation((function(e,t){return e+t}),0),Si=createRound("ceil"),ki=createMathOperation((function(e,t){return e/t}),1),Ei=createRound("floor");var Oi,Ci=createMathOperation((function(e,t){return e*t}),1),ji=createRound("round"),Ri=createMathOperation((function(e,t){return e-t}),0);return lodash.after=function after(e,t){if("function"!=typeof t)throw new nt(u);return e=toInteger(e),function(){if(--e<1)return t.apply(this,arguments)}},lodash.ary=ary,lodash.assign=zn,lodash.assignIn=Wn,lodash.assignInWith=Hn,lodash.assignWith=Vn,lodash.at=Kn,lodash.before=before,lodash.bind=wn,lodash.bindAll=di,lodash.bindKey=xn,lodash.castArray=function castArray(){if(!arguments.length)return[];var e=arguments[0];return Tn(e)?e:[e]},lodash.chain=chain,lodash.chunk=function chunk(e,t,n){t=(n?isIterateeCall(e,t,n):t===a)?1:or(toInteger(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,u=r(Qt(i/t));oi?0:i+r),(n=n===a||n>i?i:toInteger(n))<0&&(n+=i),n=r>n?0:toLength(n);r>>0)?(e=toString(e))&&("string"==typeof t||null!=t&&!Ln(t))&&!(t=baseToString(t))&&hasUnicode(e)?castSlice(stringToArray(e),0,r):e.split(t,r):[]},lodash.spread=function spread(e,t){if("function"!=typeof e)throw new nt(u);return t=null==t?0:or(toInteger(t),0),baseRest((function(r){var n=r[t],i=castSlice(r,0,t);return n&&arrayPush(i,n),apply(e,this,i)}))},lodash.tail=function tail(e){var t=null==e?0:e.length;return t?baseSlice(e,1,t):[]},lodash.take=function take(e,t,r){return e&&e.length?baseSlice(e,0,(t=r||t===a?1:toInteger(t))<0?0:t):[]},lodash.takeRight=function takeRight(e,t,r){var n=null==e?0:e.length;return n?baseSlice(e,(t=n-(t=r||t===a?1:toInteger(t)))<0?0:t,n):[]},lodash.takeRightWhile=function takeRightWhile(e,t){return e&&e.length?baseWhile(e,getIteratee(t,3),!1,!0):[]},lodash.takeWhile=function takeWhile(e,t){return e&&e.length?baseWhile(e,getIteratee(t,3)):[]},lodash.tap=function tap(e,t){return t(e),e},lodash.throttle=function throttle(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new nt(u);return isObject(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),debounce(e,t,{leading:n,maxWait:t,trailing:i})},lodash.thru=thru,lodash.toArray=toArray,lodash.toPairs=ri,lodash.toPairsIn=ni,lodash.toPath=function toPath(e){return Tn(e)?arrayMap(e,toKey):isSymbol(e)?[e]:copyArray(Kr(toString(e)))},lodash.toPlainObject=toPlainObject,lodash.transform=function transform(e,t,r){var n=Tn(e),i=n||Bn(e)||qn(e);if(t=getIteratee(t,4),null==r){var a=e&&e.constructor;r=i?n?new a:[]:isObject(e)&&isFunction(a)?Cr(Ct(e)):{}}return(i?arrayEach:baseForOwn)(e,(function(e,n,i){return t(r,e,n,i)})),r},lodash.unary=function unary(e){return ary(e,1)},lodash.union=tn,lodash.unionBy=rn,lodash.unionWith=nn,lodash.uniq=function uniq(e){return e&&e.length?baseUniq(e):[]},lodash.uniqBy=function uniqBy(e,t){return e&&e.length?baseUniq(e,getIteratee(t,2)):[]},lodash.uniqWith=function uniqWith(e,t){return t="function"==typeof t?t:a,e&&e.length?baseUniq(e,a,t):[]},lodash.unset=function unset(e,t){return null==e||baseUnset(e,t)},lodash.unzip=unzip,lodash.unzipWith=unzipWith,lodash.update=function update(e,t,r){return null==e?e:baseUpdate(e,t,castFunction(r))},lodash.updateWith=function updateWith(e,t,r,n){return n="function"==typeof n?n:a,null==e?e:baseUpdate(e,t,castFunction(r),n)},lodash.values=values,lodash.valuesIn=function valuesIn(e){return null==e?[]:baseValues(e,keysIn(e))},lodash.without=an,lodash.words=words,lodash.wrap=function wrap(e,t){return En(castFunction(t),e)},lodash.xor=on,lodash.xorBy=sn,lodash.xorWith=un,lodash.zip=cn,lodash.zipObject=function zipObject(e,t){return baseZipObject(e||[],t||[],assignValue)},lodash.zipObjectDeep=function zipObjectDeep(e,t){return baseZipObject(e||[],t||[],baseSet)},lodash.zipWith=ln,lodash.entries=ri,lodash.entriesIn=ni,lodash.extend=Wn,lodash.extendWith=Hn,mixin(lodash,lodash),lodash.add=Ai,lodash.attempt=pi,lodash.camelCase=ii,lodash.capitalize=capitalize,lodash.ceil=Si,lodash.clamp=function clamp(e,t,r){return r===a&&(r=t,t=a),r!==a&&(r=(r=toNumber(r))==r?r:0),t!==a&&(t=(t=toNumber(t))==t?t:0),baseClamp(toNumber(e),t,r)},lodash.clone=function clone(e){return baseClone(e,h)},lodash.cloneDeep=function cloneDeep(e){return baseClone(e,p|h)},lodash.cloneDeepWith=function cloneDeepWith(e,t){return baseClone(e,p|h,t="function"==typeof t?t:a)},lodash.cloneWith=function cloneWith(e,t){return baseClone(e,h,t="function"==typeof t?t:a)},lodash.conformsTo=function conformsTo(e,t){return null==t||baseConformsTo(e,t,keys(t))},lodash.deburr=deburr,lodash.defaultTo=function defaultTo(e,t){return null==e||e!=e?t:e},lodash.divide=ki,lodash.endsWith=function endsWith(e,t,r){e=toString(e),t=baseToString(t);var n=e.length,i=r=r===a?n:baseClamp(toInteger(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},lodash.eq=eq,lodash.escape=function escape(e){return(e=toString(e))&&ke.test(e)?e.replace(Ae,Gt):e},lodash.escapeRegExp=function escapeRegExp(e){return(e=toString(e))&&De.test(e)?e.replace(Te,"\\$&"):e},lodash.every=function every(e,t,r){var n=Tn(e)?arrayEvery:baseEvery;return r&&isIterateeCall(e,t,r)&&(t=a),n(e,getIteratee(t,3))},lodash.find=dn,lodash.findIndex=findIndex,lodash.findKey=function findKey(e,t){return baseFindKey(e,getIteratee(t,3),baseForOwn)},lodash.findLast=hn,lodash.findLastIndex=findLastIndex,lodash.findLastKey=function findLastKey(e,t){return baseFindKey(e,getIteratee(t,3),baseForOwnRight)},lodash.floor=Ei,lodash.forEach=forEach,lodash.forEachRight=forEachRight,lodash.forIn=function forIn(e,t){return null==e?e:Mr(e,getIteratee(t,3),keysIn)},lodash.forInRight=function forInRight(e,t){return null==e?e:Tr(e,getIteratee(t,3),keysIn)},lodash.forOwn=function forOwn(e,t){return e&&baseForOwn(e,getIteratee(t,3))},lodash.forOwnRight=function forOwnRight(e,t){return e&&baseForOwnRight(e,getIteratee(t,3))},lodash.get=get,lodash.gt=jn,lodash.gte=Rn,lodash.has=function has(e,t){return null!=e&&hasPath(e,t,baseHas)},lodash.hasIn=hasIn,lodash.head=head,lodash.identity=identity,lodash.includes=function includes(e,t,r,n){e=isArrayLike(e)?e:values(e),r=r&&!n?toInteger(r):0;var i=e.length;return r<0&&(r=or(i+r,0)),isString(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&baseIndexOf(e,t,r)>-1},lodash.indexOf=function indexOf(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:toInteger(r);return i<0&&(i=or(n+i,0)),baseIndexOf(e,t,i)},lodash.inRange=function inRange(e,t,r){return t=toFinite(t),r===a?(r=t,t=0):r=toFinite(r),function baseInRange(e,t,r){return e>=sr(t,r)&&e=-B&&e<=B},lodash.isSet=Nn,lodash.isString=isString,lodash.isSymbol=isSymbol,lodash.isTypedArray=qn,lodash.isUndefined=function isUndefined(e){return e===a},lodash.isWeakMap=function isWeakMap(e){return isObjectLike(e)&&Fr(e)==oe},lodash.isWeakSet=function isWeakSet(e){return isObjectLike(e)&&baseGetTag(e)==se},lodash.join=function join(e,t){return null==e?"":ir.call(e,t)},lodash.kebabCase=ai,lodash.last=last,lodash.lastIndexOf=function lastIndexOf(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return r!==a&&(i=(i=toInteger(r))<0?or(n+i,0):sr(i,n-1)),t==t?function strictLastIndexOf(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):baseFindIndex(e,baseIsNaN,i,!0)},lodash.lowerCase=oi,lodash.lowerFirst=si,lodash.lt=Un,lodash.lte=Fn,lodash.max=function max(e){return e&&e.length?baseExtremum(e,identity,baseGt):a},lodash.maxBy=function maxBy(e,t){return e&&e.length?baseExtremum(e,getIteratee(t,2),baseGt):a},lodash.mean=function mean(e){return baseMean(e,identity)},lodash.meanBy=function meanBy(e,t){return baseMean(e,getIteratee(t,2))},lodash.min=function min(e){return e&&e.length?baseExtremum(e,identity,baseLt):a},lodash.minBy=function minBy(e,t){return e&&e.length?baseExtremum(e,getIteratee(t,2),baseLt):a},lodash.stubArray=stubArray,lodash.stubFalse=stubFalse,lodash.stubObject=function stubObject(){return{}},lodash.stubString=function stubString(){return""},lodash.stubTrue=function stubTrue(){return!0},lodash.multiply=Ci,lodash.nth=function nth(e,t){return e&&e.length?baseNth(e,toInteger(t)):a},lodash.noConflict=function noConflict(){return Dt._===this&&(Dt._=ht),this},lodash.noop=noop,lodash.now=vn,lodash.pad=function pad(e,t,r){e=toString(e);var n=(t=toInteger(t))?stringSize(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return createPadding(er(i),r)+e+createPadding(Qt(i),r)},lodash.padEnd=function padEnd(e,t,r){e=toString(e);var n=(t=toInteger(t))?stringSize(e):0;return t&&nt){var n=e;e=t,t=n}if(r||e%1||t%1){var i=lr();return sr(e+i*(t-e+jt("1e-"+((i+"").length-1))),t)}return baseRandom(e,t)},lodash.reduce=function reduce(e,t,r){var n=Tn(e)?arrayReduce:baseReduce,i=arguments.length<3;return n(e,getIteratee(t,4),r,i,jr)},lodash.reduceRight=function reduceRight(e,t,r){var n=Tn(e)?arrayReduceRight:baseReduce,i=arguments.length<3;return n(e,getIteratee(t,4),r,i,Rr)},lodash.repeat=function repeat(e,t,r){return t=(r?isIterateeCall(e,t,r):t===a)?1:toInteger(t),baseRepeat(toString(e),t)},lodash.replace=function replace(){var e=arguments,t=toString(e[0]);return e.length<3?t:t.replace(e[1],e[2])},lodash.result=function result(e,t,r){var n=-1,i=(t=castPath(t,e)).length;for(i||(i=1,e=a);++nB)return[];var r=L,n=sr(e,L);t=getIteratee(t),e-=L;for(var i=baseTimes(n,t);++r=o)return e;var u=r-stringSize(n);if(u<1)return n;var c=s?castSlice(s,0,u).join(""):e.slice(0,u);if(i===a)return c+n;if(s&&(u+=c.length-u),Ln(i)){if(e.slice(u).search(i)){var l,f=c;for(i.global||(i=tt(i.source,toString(We.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var p=l.index;c=c.slice(0,p===a?u:p)}}else if(e.indexOf(baseToString(i),u)!=u){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+n},lodash.unescape=function unescape(e){return(e=toString(e))&&Se.test(e)?e.replace(xe,$t):e},lodash.uniqueId=function uniqueId(e){var t=++lt;return toString(e)+t},lodash.upperCase=li,lodash.upperFirst=fi,lodash.each=forEach,lodash.eachRight=forEachRight,lodash.first=head,mixin(lodash,(Oi={},baseForOwn(lodash,(function(e,t){ct.call(lodash.prototype,t)||(Oi[t]=e)})),Oi),{chain:!1}),lodash.VERSION="4.17.15",arrayEach(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){lodash[e].placeholder=lodash})),arrayEach(["drop","take"],(function(e,t){LazyWrapper.prototype[e]=function(r){r=r===a?1:or(toInteger(r),0);var n=this.__filtered__&&!t?new LazyWrapper(this):this.clone();return n.__filtered__?n.__takeCount__=sr(r,n.__takeCount__):n.__views__.push({size:sr(r,L),type:e+(n.__dir__<0?"Right":"")}),n},LazyWrapper.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),arrayEach(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=r==M||3==r;LazyWrapper.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:getIteratee(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),arrayEach(["head","last"],(function(e,t){var r="take"+(t?"Right":"");LazyWrapper.prototype[e]=function(){return this[r](1).value()[0]}})),arrayEach(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");LazyWrapper.prototype[e]=function(){return this.__filtered__?new LazyWrapper(this):this[r](1)}})),LazyWrapper.prototype.compact=function(){return this.filter(identity)},LazyWrapper.prototype.find=function(e){return this.filter(e).head()},LazyWrapper.prototype.findLast=function(e){return this.reverse().find(e)},LazyWrapper.prototype.invokeMap=baseRest((function(e,t){return"function"==typeof e?new LazyWrapper(this):this.map((function(r){return baseInvoke(r,e,t)}))})),LazyWrapper.prototype.reject=function(e){return this.filter(negate(getIteratee(e)))},LazyWrapper.prototype.slice=function(e,t){e=toInteger(e);var r=this;return r.__filtered__&&(e>0||t<0)?new LazyWrapper(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==a&&(r=(t=toInteger(t))<0?r.dropRight(-t):r.take(t-e)),r)},LazyWrapper.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},LazyWrapper.prototype.toArray=function(){return this.take(L)},baseForOwn(LazyWrapper.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=lodash[n?"take"+("last"==t?"Right":""):t],o=n||/^find/.test(t);i&&(lodash.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,u=t instanceof LazyWrapper,c=s[0],l=u||Tn(t),f=function(e){var t=i.apply(lodash,arrayPush([e],s));return n&&p?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=o&&!p,g=u&&!d;if(!o&&l){t=g?t:new LazyWrapper(this);var _=e.apply(t,s);return _.__actions__.push({func:thru,args:[f],thisArg:a}),new LodashWrapper(_,p)}return h&&g?e.apply(this,s):(_=this.thru(f),h?n?_.value()[0]:_.value():_)})})),arrayEach(["pop","push","shift","sort","splice","unshift"],(function(e){var t=it[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);lodash.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Tn(i)?i:[],e)}return this[r]((function(r){return t.apply(Tn(r)?r:[],e)}))}})),baseForOwn(LazyWrapper.prototype,(function(e,t){var r=lodash[t];if(r){var n=r.name+"";ct.call(yr,n)||(yr[n]=[]),yr[n].push({name:t,func:r})}})),yr[createHybrid(a,m).name]=[{name:"wrapper",func:a}],LazyWrapper.prototype.clone=function lazyClone(){var e=new LazyWrapper(this.__wrapped__);return e.__actions__=copyArray(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=copyArray(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=copyArray(this.__views__),e},LazyWrapper.prototype.reverse=function lazyReverse(){if(this.__filtered__){var e=new LazyWrapper(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},LazyWrapper.prototype.value=function lazyValue(){var e=this.__wrapped__.value(),t=this.__dir__,r=Tn(e),n=t<0,i=r?e.length:0,a=function getView(e,t,r){var n=-1,i=r.length;for(;++n=this.__values__.length;return{done:e,value:e?a:this.__values__[this.__index__++]}},lodash.prototype.plant=function wrapperPlant(e){for(var t,r=this;r instanceof baseLodash;){var n=wrapperClone(r);n.__index__=0,n.__values__=a,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},lodash.prototype.reverse=function wrapperReverse(){var e=this.__wrapped__;if(e instanceof LazyWrapper){var t=e;return this.__actions__.length&&(t=new LazyWrapper(this)),(t=t.reverse()).__actions__.push({func:thru,args:[reverse],thisArg:a}),new LodashWrapper(t,this.__chain__)}return this.thru(reverse)},lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__)},lodash.prototype.first=lodash.prototype.head,Lt&&(lodash.prototype[Lt]=function wrapperToIterator(){return this}),lodash}();Dt._=Yt,(i=function(){return Yt}.call(t,r,t,n))===a||(n.exports=i)}).call(this)}).call(this,r(8),r(18)(e))},function(e,t){e.exports={ASTERISK:"*",AT:"@",BACK_SLASH:"\\",CARRIAGE_RETURN:"\r",CLOSE_CURLY_BRACKET:"}",CLOSE_ROUND_BRACKET:")",CLOSE_SQUARE_BRACKET:"]",COLON:":",COMMA:",",DOUBLE_QUOTE:'"',EXCLAMATION:"!",FORWARD_SLASH:"/",INTERNAL:"-clean-css-",NEW_LINE_NIX:"\n",OPEN_CURLY_BRACKET:"{",OPEN_ROUND_BRACKET:"(",OPEN_SQUARE_BRACKET:"[",SEMICOLON:";",SINGLE_QUOTE:"'",SPACE:" ",TAB:"\t",UNDERSCORE:"_"}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){var n=r(230),i="object"==typeof self&&self&&self.Object===Object&&self,a=n||i||Function("return this")();e.exports=a},function(e,t){var r=e.exports={version:"2.6.9"};"number"==typeof __e&&(__e=r)},function(e,t){e.exports=function isObjectLike(e){return null!=e&&"object"==typeof e}},function(e,t){function assert(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=assert,assert.equal=function assertEqual(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";var n=t,i=r(14),a=r(22),o=r(337);n.assert=a,n.toArray=o.toArray,n.zero2=o.zero2,n.toHex=o.toHex,n.encode=o.encode,n.getNAF=function getNAF(e,t){for(var r=[],n=1<=0;){var a;if(i.isOdd()){var o=i.andln(n-1);a=o>(n>>1)-1?(n>>1)-o:o,i.isubn(a)}else a=0;r.push(a);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,u=1;u0||t.cmpn(-i)>0;){var a,o,s,u=e.andln(3)+n&3,c=t.andln(3)+i&3;if(3===u&&(u=-1),3===c&&(c=-1),0==(1&u))a=0;else a=3!==(s=e.andln(7)+n&7)&&5!==s||2!==c?u:-u;if(r[0].push(a),0==(1&c))o=0;else o=3!==(s=t.andln(7)+i&7)&&5!==s||2!==u?c:-c;r[1].push(o),2*n===a+1&&(n=1-n),2*i===o+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function cachedProperty(e,t,r){var n="_"+t;e.prototype[t]=function cachedProperty(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function parseBytes(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function intFromLE(e){return new i(e,"hex","le")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7),i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n),a=r(193),o=r(723),s=r(726),u=r(805),c=r(815);(0,n.registerComponent)(r(818)),(0,n.registerComponent)(r(819)),(0,n.registerComponent)(r(820)),(0,n.registerComponent)(r(829)),(0,n.registerComponent)(r(830)),(0,n.registerComponent)(r(831)),(0,n.registerComponent)(r(832)),(0,n.registerComponent)(r(833)),(0,n.registerComponent)(r(834)),(0,n.registerComponent)(r(836)),(0,n.registerComponent)(r(837)),(0,n.registerComponent)(r(838)),(0,n.registerComponent)(r(839)),(0,n.registerComponent)(r(840)),(0,n.registerComponent)(r(841)),(0,n.registerComponent)(r(354)),(0,n.registerComponent)(r(842)),(0,n.registerComponent)(r(843)),(0,n.registerComponent)(r(844)),(0,n.registerComponent)(r(845)),(0,n.registerComponent)(o.Social),(0,n.registerComponent)(o.SocialElement),(0,n.registerComponent)(s.Navbar),(0,n.registerComponent)(s.NavbarLink),(0,n.registerComponent)(c.Accordion),(0,n.registerComponent)(c.AccordionElement),(0,n.registerComponent)(c.AccordionText),(0,n.registerComponent)(c.AccordionTitle),(0,n.registerComponent)(u.Carousel),(0,n.registerComponent)(u.CarouselImage),(0,a.registerDependencies)(r(846)),t.default=i.default,e.exports=t.default},function(e,t,r){(function(e){function normalizeArray(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function filter(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!r;n--){var i=n>=0?arguments[n]:e.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");i&&(t=i+"/"+t,r="/"===i.charAt(0))}return(r?"/":"")+(t=normalizeArray(filter(t.split("/"),(function(e){return!!e})),!r).join("/"))||"."},t.normalize=function(e){var n=t.isAbsolute(e),i="/"===r(e,-1);return(e=normalizeArray(filter(e.split("/"),(function(e){return!!e})),!n).join("/"))||n||(e="."),e&&i&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(filter(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,r){function trim(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var n=trim(e.split("/")),i=trim(r.split("/")),a=Math.min(n.length,i.length),o=a,s=0;s=1;--a)if(47===(t=e.charCodeAt(a))){if(!i){n=a;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var r=function basename(e){"string"!=typeof e&&(e+="");var t,r=0,n=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){r=t+1;break}}else-1===n&&(i=!1,n=t+1);return-1===n?"":e.slice(r,n)}(e);return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,r=0,n=-1,i=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===n&&(i=!1,n=o+1),46===s?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){r=o+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===r+1?"":e.slice(t,n)};var r="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,r(11))},function(e,t,r){var n=r(129)("wks"),i=r(94),a=r(34).Symbol,o="function"==typeof a;(e.exports=function(e){return n[e]||(n[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=n},function(e,t){e.exports=function isObject(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){(function(e){function objectToString(e){return Object.prototype.toString.call(e)}t.isArray=function isArray(e){return Array.isArray?Array.isArray(e):"[object Array]"===objectToString(e)},t.isBoolean=function isBoolean(e){return"boolean"==typeof e},t.isNull=function isNull(e){return null===e},t.isNullOrUndefined=function isNullOrUndefined(e){return null==e},t.isNumber=function isNumber(e){return"number"==typeof e},t.isString=function isString(e){return"string"==typeof e},t.isSymbol=function isSymbol(e){return"symbol"==typeof e},t.isUndefined=function isUndefined(e){return void 0===e},t.isRegExp=function isRegExp(e){return"[object RegExp]"===objectToString(e)},t.isObject=function isObject(e){return"object"==typeof e&&null!==e},t.isDate=function isDate(e){return"[object Date]"===objectToString(e)},t.isError=function isError(e){return"[object Error]"===objectToString(e)||e instanceof Error},t.isFunction=function isFunction(e){return"function"==typeof e},t.isPrimitive=function isPrimitive(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,r(9).Buffer)},function(e,t,r){"use strict";var n=r(22),i=r(0);function isSurrogatePair(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function htonl(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function zero2(e){return 1===e.length?"0"+e:e}function zero8(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function toArray(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):isSurrogatePair(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return o},t.split32=function split32(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},t.rotr32=function rotr32(e,t){return e>>>t|e<<32-t},t.rotl32=function rotl32(e,t){return e<>>32-t},t.sum32=function sum32(e,t){return e+t>>>0},t.sum32_3=function sum32_3(e,t,r){return e+t+r>>>0},t.sum32_4=function sum32_4(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function sum32_5(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function sum64(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a>>0,e[t+1]=a},t.sum64_hi=function sum64_hi(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function sum64_lo(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function sum64_4_hi(e,t,r,n,i,a,o,s){var u=0,c=t;return u+=(c=c+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function sum64_4_lo(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},t.sum64_5_hi=function sum64_5_hi(e,t,r,n,i,a,o,s,u,c){var l=0,f=t;return l+=(f=f+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function sum64_5_lo(e,t,r,n,i,a,o,s,u,c){return t+n+a+s+c>>>0},t.rotr64_hi=function rotr64_hi(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function rotr64_lo(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function shr64_hi(e,t,r){return e>>>r},t.shr64_lo=function shr64_lo(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){var n=r(422),i=r(470),a=r(77),o=r(12),s=r(478);e.exports=function baseIteratee(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?o(e)?i(e[0],e[1]):n(e):s(e)}},function(e,t,r){var n=r(240),i=r(242),a=r(45);e.exports=function keys(e){return a(e)?n(e):i(e)}},function(e,t,r){"use strict";var n=r(652),i=r(653);function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=urlParse,t.resolve=function urlResolve(e,t){return urlParse(e,!1,!0).resolve(t)},t.resolveObject=function urlResolveObject(e,t){return e?urlParse(e,!1,!0).resolveObject(t):t},t.format=function urlFormat(e){i.isString(e)&&(e=urlParse(e));return e instanceof Url?e.format():Url.prototype.format.call(e)},t.Url=Url;var a=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),l=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=r(654);function urlParse(e,t,r){if(e&&i.isObject(e)&&e instanceof Url)return e;var n=new Url;return n.parse(e,t,r),n}Url.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),u=-1!==o&&o127?D+="x":D+=T[B];if(!D.match(p)){var P=R.slice(0,O),L=R.slice(O+1),N=T.match(d);N&&(P.push(N[1]),L.unshift(N[2])),L.length&&(y="/"+L.join(".")+y),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),j||(this.hostname=n.toASCII(this.hostname));var q=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+q,this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!h[x])for(O=0,M=c.length;O0)&&r.host.split("@"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift());return r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!x.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var S=x.slice(-1)[0],k=(r.host||e.host||x.length>1)&&("."===S||".."===S)||""===S,E=0,O=x.length;O>=0;O--)"."===(S=x[O])?x.splice(O,1):".."===S?(x.splice(O,1),E++):E&&(x.splice(O,1),E--);if(!v&&!w)for(;E--;E)x.unshift("..");!v||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),k&&"/"!==x.join("/").substr(-1)&&x.push("");var C,j=""===x[0]||x[0]&&"/"===x[0].charAt(0);A&&(r.hostname=r.host=j?"":x.length?x.shift():"",(C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift()));return(v=v||r.host&&x.length)&&!j&&x.unshift(""),x.length?r.pathname=x.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},Url.prototype.parseHost=function(){var e=this.host,t=o.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){var n=r(34),i=r(20),a=r(124),o=r(50),s=r(42),u=function(e,t,r){var c,l,f,p=e&u.F,d=e&u.G,h=e&u.S,g=e&u.P,_=e&u.B,b=e&u.W,m=d?i:i[t]||(i[t]={}),y=m.prototype,v=d?n:h?n[t]:(n[t]||{}).prototype;for(c in d&&(r=t),r)(l=!p&&v&&void 0!==v[c])&&s(m,c)||(f=l?v[c]:r[c],m[c]=d&&"function"!=typeof v[c]?r[c]:_&&l?a(f,n):b&&v[c]==f?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):g&&"function"==typeof f?a(Function.call,f):f,g&&((m.virtual||(m.virtual={}))[c]=f,e&u.R&&y&&!y[c]&&o(y,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){var n=r(51),i=r(212),a=r(125),o=Object.defineProperty;t.f=r(36)?Object.defineProperty:function defineProperty(e,t,r){if(n(e),t=a(t,!0),n(r),i)try{return o(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){e.exports=!r(53)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(60),i=r(435),a=r(436),o="[object Null]",s="[object Undefined]",u=n?n.toStringTag:void 0;e.exports=function baseGetTag(e){return null==e?void 0===e?s:o:u&&u in Object(e)?i(e):a(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.initializeType=t.types=void 0;var n=_interopRequireDefault(r(1)),i=_interopRequireDefault(r(6)),a=_interopRequireDefault(r(551)),o=_interopRequireDefault(r(249)),s=_interopRequireDefault(r(553));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var u=t.types={},c=(t.initializeType=function initializeType(e){if(u[e])return u[e];var t=((0,o.default)(s.default,(function(t){return!!e.match(t.matcher)}))||{}).typeConstructor;if(!t)throw new Error("No type found for "+e);return u[e]=t(e),u[e]},function(){function Type(e){(0,n.default)(this,Type),this.value=e}return(0,i.default)(Type,[{key:"isValid",value:function isValid(){var e=this;return(0,a.default)(this.matchers,(function(t){return(""+e.value).match(t)}))}},{key:"getErrorMessage",value:function getErrorMessage(){if(!this.isValid())return(this.constructor.errorMessage||"has invalid value: "+this.value+" for type "+this.constructor.name+" ").replace(/\$value/g,this.value)}},{key:"getValue",value:function getValue(){return this.value}}],[{key:"check",value:function check(e){return!!e.match(this.constructor.typeChecker)}}]),Type}());t.default=c},function(e,t,r){var n=r(284).roundingPrecisionFrom,i=r(66),a={Zero:"0",One:"1",Two:"2"},o={};o[a.Zero]={},o[a.One]={cleanupCharsets:!0,normalizeUrls:!0,optimizeBackground:!0,optimizeBorderRadius:!0,optimizeFilter:!0,optimizeFontWeight:!0,optimizeOutline:!0,removeEmpty:!0,removeNegativePaddings:!0,removeQuotes:!0,removeWhitespace:!0,replaceMultipleZeros:!0,replaceTimeUnits:!0,replaceZeroUnits:!0,roundingPrecision:n(void 0),selectorsSortingMethod:"standard",specialComments:"all",tidyAtRules:!0,tidyBlockScopes:!0,tidySelectors:!0,transform:function noop(){}},o[a.Two]={mergeAdjacentRules:!0,mergeIntoShorthands:!0,mergeMedia:!0,mergeNonAdjacentRules:!0,mergeSemantically:!1,overrideProperties:!0,removeEmpty:!0,reduceNonAdjacentRules:!0,removeDuplicateFontRules:!0,removeDuplicateMediaBlocks:!0,removeDuplicateRules:!0,removeUnusedAtRules:!1,restructureRules:!1,skipProperties:[]};var s="*",u="all",c="false",l="off",f="true",p="on",d=",",h=";",g=":";function defaults(e,t){var r,n=i(o[e],{});for(r in n)"boolean"==typeof n[r]&&(n[r]=t);return n}function normalizeValue(e){switch(e){case c:case l:return!1;case f:case p:return!0;default:return e}}function covertToHash(e,t){return e.split(h).reduce((function(e,r){var n=r.split(g),a=n[0],o=normalizeValue(n[1]);return s==a||u==a?e=i(e,defaults(t,o)):e[a]=o,e}),{})}e.exports={OptimizationLevel:a,optimizationLevelFrom:function optimizationLevelFrom(e){var t=i(o,{}),r=a.Zero,c=a.One,l=a.Two;return void 0===e?(delete t[l],t):("string"==typeof e&&(e=parseInt(e)),"number"==typeof e&&e===parseInt(l)?t:"number"==typeof e&&e===parseInt(c)?(delete t[l],t):"number"==typeof e&&e===parseInt(r)?(delete t[l],delete t[c],t):("object"==typeof e&&(e=function covertValuesToHashes(e){var t,r,n=i(e,{});for(r=0;r<=2;r++)(t=""+r)in n&&(void 0===n[t]||!1===n[t])&&delete n[t],t in n&&!0===n[t]&&(n[t]={}),t in n&&"string"==typeof n[t]&&(n[t]=covertToHash(n[t],t));return n}(e)),c in e&&"roundingPrecision"in e[c]&&(e[c].roundingPrecision=n(e[c].roundingPrecision)),l in e&&"skipProperties"in e[l]&&"string"==typeof e[l].skipProperties&&(e[l].skipProperties=e[l].skipProperties.split(d)),(r in e||c in e||l in e)&&(t[r]=i(t[r],e[r])),c in e&&s in e[c]&&(t[c]=i(t[c],defaults(c,normalizeValue(e[c][s]))),delete e[c][s]),c in e&&u in e[c]&&(t[c]=i(t[c],defaults(c,normalizeValue(e[c][u]))),delete e[c][u]),c in e||l in e?t[c]=i(t[c],e[c]):delete t[c],l in e&&s in e[l]&&(t[l]=i(t[l],defaults(l,normalizeValue(e[l][s]))),delete e[l][s]),l in e&&u in e[l]&&(t[l]=i(t[l],defaults(l,normalizeValue(e[l][u]))),delete e[l][u]),l in e?t[l]=i(t[l],e[l]):delete t[l],t))}}},function(e,t,r){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function nextTick(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function afterTickOne(){e.call(null,r)}));case 3:return t.nextTick((function afterTickTwo(){e.call(null,r,n)}));case 4:return t.nextTick((function afterTickThree(){e.call(null,r,n,i)}));default:for(a=new Array(s-1),o=0;o1&&void 0!==arguments[1]&&arguments[1];return"\n "+(t?o:n)+"\n "+e+"\n "+(t?u:a)+"\n "},t.msoConditionalTag=function msoConditionalTag(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"\n "+(t?s:i)+"\n "+e+"\n "+(t?u:a)+"\n "};var n=t.startConditionalTag="\x3c!--[if mso | IE]>",i=t.startMsoConditionalTag="\x3c!--[if mso]>",a=t.endConditionalTag="\x3c!--\x3e",s=t.startMsoNegationConditionalTag="\x3c!--[if !mso>\x3c!--\x3e",u=t.endNegationConditionalTag="\x3c!--1&&void 0!==arguments[1]?arguments[1]:{}).parseFloatToInt,r=void 0===t||t,i=n.exec(e.toString())[1],a={default:parseInt,px:parseInt,"%":r?parseInt:parseFloat};return{parsedWidth:(a[i]||a.default)(e),unit:i||"px"}};var n=/[\d.,]*(\D*)$/;e.exports=t.default},function(e,t,r){var n=r(35),i=r(72);e.exports=r(36)?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){var n=r(52);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){var n=r(216),i=r(123);e.exports=function(e){return n(i(e))}},function(e,t,r){var n=r(123);e.exports=function(e){return Object(n(e))}},function(e,t,r){var n=r(223),i=r(227);function defineProp(t,r){return delete e.exports[t],e.exports[t]=r,r}e.exports={Parser:n,Tokenizer:r(224),ElementType:r(58),DomHandler:i,get FeedHandler(){return defineProp("FeedHandler",r(405))},get Stream(){return defineProp("Stream",r(415))},get WritableStream(){return defineProp("WritableStream",r(229))},get ProxyHandler(){return defineProp("ProxyHandler",r(419))},get DomUtils(){return defineProp("DomUtils",r(43))},get CollectingHandler(){return defineProp("CollectingHandler",r(420))},DefaultHandler:i,get RssHandler(){return defineProp("RssHandler",this.FeedHandler)},parseDOM:function(e,t){var r=new i(t);return new n(r,t).end(e),r.dom},parseFeed:function(t,r){var i=new e.exports.FeedHandler(r);return new n(i,r).end(t),i.dom},createDomStream:function(e,t,r){var a=new i(e,t,r);return new n(a,t)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},function(e,t,r){"use strict";var n,i="object"==typeof Reflect?Reflect:null,a=i&&"function"==typeof i.apply?i.apply:function ReflectApply(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function ReflectOwnKeys(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function ReflectOwnKeys(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function NumberIsNaN(e){return e!=e};function EventEmitter(){EventEmitter.init.call(this)}e.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var s=10;function $getMaxListeners(e){return void 0===e._maxListeners?EventEmitter.defaultMaxListeners:e._maxListeners}function _addListener(e,t,r,n){var i,a,o;if("function"!=typeof r)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r);if(void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"==typeof o?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=$getMaxListeners(e))>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,function ProcessEmitWarning(e){console&&console.warn&&console.warn(e)}(s)}return e}function onceWrapper(){for(var e=[],t=0;t0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)a(u,this,t);else{var c=u.length,l=arrayClone(u,c);for(r=0;r=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function spliceOne(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},EventEmitter.prototype.listeners=function listeners(e){return _listeners(this,e,!0)},EventEmitter.prototype.rawListeners=function rawListeners(e){return _listeners(this,e,!1)},EventEmitter.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):listenerCount.call(e,t)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?n(this._events):[]}},function(e,t){e.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(e){return"tag"===e.type||"script"===e.type||"style"===e.type}}},function(e,t,r){"use strict";var n=r(5).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function StringDecoder(e){var t;switch(this.encoding=function normalizeEncoding(e){var t=function _normalizeEncoding(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,t=4;break;case"utf8":this.fillLast=utf8FillLast,t=4;break;case"base64":this.text=base64Text,this.end=base64End,t=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function utf8CheckByte(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed,r=function utf8CheckExtraBytes(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function utf16Text(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function base64End(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}t.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},StringDecoder.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){var n=r(19).Symbol;e.exports=n},function(e,t,r){var n=r(37),i=r(21),a="[object Symbol]";e.exports=function isSymbol(e){return"symbol"==typeof e||i(e)&&n(e)==a}},function(e,t,r){var n=r(474);e.exports=function toString(e){return null==e?"":n(e)}},function(e,t,r){var n=r(61),i=1/0;e.exports=function toKey(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},function(e,t,r){var n=r(248);e.exports=function toInteger(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},function(e,t,r){"use strict";t.__esModule=!0;var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(222));t.default=function(e,t,r){return t in e?(0,n.default)(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t){e.exports=function override(e,t){var r,n,i,a={};for(r in e)i=e[r],Array.isArray(i)?a[r]=i.slice(0):a[r]="object"==typeof i&&null!==i?override(i,{}):i;for(n in t)i=t[n],n in a&&Array.isArray(i)?a[n]=i.slice(0):a[n]=n in a&&"object"==typeof i&&null!==i?override(a[n],i):i;return a}},function(e,t,r){var n=r(183),i=r(17),a=r(10),o={ASTERISK:"*",BACKSLASH:"\\",BANG:"!",BANG_SUFFIX_PATTERN:/!\w+$/,IMPORTANT_TOKEN:"!important",IMPORTANT_TOKEN_PATTERN:new RegExp("!important$","i"),IMPORTANT_WORD:"important",IMPORTANT_WORD_PATTERN:new RegExp("important$","i"),SUFFIX_BANG_PATTERN:/!$/,UNDERSCORE:"_",VARIABLE_REFERENCE_PATTERN:/var\(--.+\)$/};function someVariableReferences(e){var t,r,n;for(t=2,r=e.length;t0&&!i[1].match(o.IMPORTANT_WORD_PATTERN)&&o.BANG_SUFFIX_PATTERN.test(i[1])?t=[n.BANG]:i[1].indexOf(o.BACKSLASH)>0&&i[1].indexOf(o.BACKSLASH)==i[1].length-o.BACKSLASH.length-1?t=[n.BACKSLASH,i[1].substring(i[1].indexOf(o.BACKSLASH)+1)]:0===i[1].indexOf(o.BACKSLASH)&&2==i[1].length&&(t=[n.BACKSLASH,i[1].substring(1)]):t=[n.BANG],t}(e);return r[0]==n.ASTERISK||r[0]==n.UNDERSCORE?function stripPrefixHack(e){e[1][1]=e[1][1].substring(1)}(e):r[0]!=n.BACKSLASH&&r[0]!=n.BANG||function stripSuffixHack(e,t){var r=e[e.length-1];r[1]=r[1].substring(0,r[1].indexOf(t[0]==n.BACKSLASH?o.BACKSLASH:o.BANG)).trim(),0===r[1].length&&e.pop()}(e,r),{block:e[2]&&e[2][0]==a.PROPERTY_BLOCK,components:[],dirty:!1,hack:r,important:t,name:e[1][1],multiplex:e.length>3&&isMultiplex(e),position:0,shorthand:!1,unused:!1,value:e.slice(2)}}e.exports={all:function wrapAll(e,t,r){var n,i,o,s=[];for(o=e.length-1;o>=0;o--)(i=e[o])[0]==a.PROPERTY&&(!t&&someVariableReferences(i)||r&&r.indexOf(i[1][1])>-1||((n=wrapSingle(i)).all=e,n.position=o,s.unshift(n)));return s},single:wrapSingle}},function(e,t,r){"use strict";var n=r(40),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=Duplex;var a=r(28);a.inherits=r(0);var o=r(295),s=r(298);a.inherits(Duplex,o);for(var u=i(s.prototype),c=0;ca)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(e);if(e>0)if(e>i)for(var u=0;u=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},Hash.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=Hash},function(e,t,r){"use strict";t.__esModule=!0;var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(355));t.default=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t)[^>]*$|#([\w\-]*)$)/;t.isHtml=function(e){if("<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3)return!0;var t=o.exec(e);return!(!t||!t[1])}},function(e,t){e.exports={trueFunc:function trueFunc(){return!0},falseFunc:function falseFunc(){return!1}}},function(e,t,r){var n=r(183),i=r(17),a="*",o="\\",s="!important",u="_",c="!ie";function restoreImportant(e){e.value[e.value.length-1][1]+=s}function restoreHack(e){e.hack[0]==n.UNDERSCORE?e.name=u+e.name:e.hack[0]==n.ASTERISK?e.name=a+e.name:e.hack[0]==n.BACKSLASH?e.value[e.value.length-1][1]+=o+e.hack[1]:e.hack[0]==n.BANG&&(e.value[e.value.length-1][1]+=i.SPACE+c)}e.exports=function restoreFromOptimizing(e,t){var r,n,i,a;for(a=e.length-1;a>=0;a--)(r=e[a]).unused||(r.dirty||r.important||r.hack)&&(t?(n=t(r),r.value=n):n=r.value,r.important&&restoreImportant(r),r.hack&&restoreHack(r),"all"in r&&((i=r.all[r.position])[1][1]=r.name,i.splice(2,i.length-1),Array.prototype.push.apply(i,n)))}},function(e,t){t.getArg=function getArg(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function urlParse(e){var t=e.match(r);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function urlGenerate(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function normalize(e){var r=e,n=urlParse(e);if(n){if(!n.path)return e;r=n.path}for(var i,a=t.isAbsolute(r),o=r.split(/\/+/),s=0,u=o.length-1;u>=0;u--)"."===(i=o[u])?o.splice(u,1):".."===i?s++:s>0&&(""===i?(o.splice(u+1,s),s=0):(o.splice(u,2),s--));return""===(r=o.join("/"))&&(r=a?"/":"."),n?(n.path=r,urlGenerate(n)):r}function join(e,t){""===e&&(e="."),""===t&&(t=".");var r=urlParse(t),i=urlParse(e);if(i&&(e=i.path||"/"),r&&!r.scheme)return i&&(r.scheme=i.scheme),urlGenerate(r);if(r||t.match(n))return t;if(i&&!i.host&&!i.path)return i.host=t,urlGenerate(i);var a="/"===t.charAt(0)?t:normalize(e.replace(/\/+$/,"")+"/"+t);return i?(i.path=a,urlGenerate(i)):a}t.urlParse=urlParse,t.urlGenerate=urlGenerate,t.normalize=normalize,t.join=join,t.isAbsolute=function(e){return"/"===e.charAt(0)||r.test(e)},t.relative=function relative(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var i=!("__proto__"in Object.create(null));function identity(e){return e}function isProtoString(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function strcmp(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=i?identity:function toSetString(e){return isProtoString(e)?"$"+e:e},t.fromSetString=i?identity:function fromSetString(e){return isProtoString(e)?e.slice(1):e},t.compareByOriginalPositions=function compareByOriginalPositions(e,t,r){var n=strcmp(e.source,t.source);return 0!==n?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)||r?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:0!==(n=e.generatedLine-t.generatedLine)?n:strcmp(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function compareByGeneratedPositionsDeflated(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)||r?n:0!==(n=strcmp(e.source,t.source))?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)?n:strcmp(e.name,t.name)},t.compareByGeneratedPositionsInflated=function compareByGeneratedPositionsInflated(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=strcmp(e.source,t.source))?r:0!==(r=e.originalLine-t.originalLine)?r:0!==(r=e.originalColumn-t.originalColumn)?r:strcmp(e.name,t.name)},t.parseSourceMapInput=function parseSourceMapInput(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function computeSourceURL(e,t,r){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),r){var n=urlParse(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}t=join(urlGenerate(n),t)}return normalize(t)}},function(e,t){var r=/^(\w+:\/\/|\/\/)/;e.exports=function isRemoteResource(e){return r.test(e)}},function(e,t,r){"use strict";function formatInclude(e){var t=e.includedIn;return t&&t.length?", included at "+t.slice().reverse().map((function(e){return"line "+e.line+" of file "+e.file})).join(", itself included at "):""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function ruleError(e,t){var r=t.line,n=t.tagName,i=t.absoluteFilePath;return{line:r,message:e,tagName:n,formattedMessage:"Line "+r+" of "+i+formatInclude(t)+" ("+n+") — "+e}},e.exports=t.default},function(e,t,r){"use strict";var n=r(0),i=r(195),a=r(200),o=r(201),s=r(41);function Hash(e){s.call(this,"digest"),this._hash=e}n(Hash,s),Hash.prototype._update=function(e){this._hash.update(e)},Hash.prototype._final=function(){return this._hash.digest()},e.exports=function createHash(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new a:new Hash(o(e))}},function(e,t,r){(function(t){e.exports=function xor(e,r){for(var n=Math.min(e.length,r.length),i=new t(n),a=0;a=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a-1&&e%1==0&&e",r)[0];return i.type="root",t.update(n,i),i}).evaluate=function(e,t){return"string"==typeof e||n.isBuffer(e)?i.parseDOM(e,t):e},t.update=function(e,t){Array.isArray(e)||(e=[e]),t?t.children=e:t=null;for(var r=0;r-1&&e%1==0&&e-1&&e%1==0&&e<=r}(e.length)&&!function isFunction(e){var t=function isObject(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return t==i||t==a}(e)}function keys(e){return isArrayLike(e)?arrayLikeKeys(e):baseKeys(e)}function identity(e){return e}e.exports=function forEach(e,t){return(h(e)?arrayEach:p)(e,"function"==typeof t?t:identity)}},function(e,t,r){var n=r(612).EOL,i=r(66),a={AfterAtRule:"afterAtRule",AfterBlockBegins:"afterBlockBegins",AfterBlockEnds:"afterBlockEnds",AfterComment:"afterComment",AfterProperty:"afterProperty",AfterRuleBegins:"afterRuleBegins",AfterRuleEnds:"afterRuleEnds",BeforeBlockEnds:"beforeBlockEnds",BetweenSelectors:"betweenSelectors"},o={CarriageReturnLineFeed:"\r\n",LineFeed:"\n",System:n},s={Space:" ",Tab:"\t"},u={AroundSelectorRelation:"aroundSelectorRelation",BeforeBlockBegins:"beforeBlockBegins",BeforeValue:"beforeValue"},c={breaks:breaks(!1),breakWith:o.System,indentBy:0,indentWith:s.Space,spaces:spaces(!1),wrapAt:!1,semicolonAfterLastProperty:!1},l="beautify",f="keep-breaks",p=";",d=":",h=",",g="=",_="false",b="off",m="true",y="on";function breaks(e){var t={};return t[a.AfterAtRule]=e,t[a.AfterBlockBegins]=e,t[a.AfterBlockEnds]=e,t[a.AfterComment]=e,t[a.AfterProperty]=e,t[a.AfterRuleBegins]=e,t[a.AfterRuleEnds]=e,t[a.BeforeBlockEnds]=e,t[a.BetweenSelectors]=e,t}function spaces(e){var t={};return t[u.AroundSelectorRelation]=e,t[u.BeforeBlockBegins]=e,t[u.BeforeValue]=e,t}function mapBreakWith(e){switch(e){case"windows":case"crlf":case o.CarriageReturnLineFeed:return o.CarriageReturnLineFeed;case"unix":case"lf":case o.LineFeed:return o.LineFeed;default:return n}}function mapIndentWith(e){switch(e){case"space":return s.Space;case"tab":return s.Tab;default:return e}}e.exports={Breaks:a,Spaces:u,formatFrom:function formatFrom(e){return void 0!==e&&!1!==e&&("object"==typeof e&&"breakWith"in e&&(e=i(e,{breakWith:mapBreakWith(e.breakWith)})),"object"==typeof e&&"indentBy"in e&&(e=i(e,{indentBy:parseInt(e.indentBy)})),"object"==typeof e&&"indentWith"in e&&(e=i(e,{indentWith:mapIndentWith(e.indentWith)})),"object"==typeof e?i(c,e):"object"==typeof e?i(c,e):"string"==typeof e&&e==l?i(c,{breaks:breaks(!0),indentBy:2,spaces:spaces(!0)}):"string"==typeof e&&e==f?i(c,{breaks:{afterAtRule:!0,afterBlockBegins:!0,afterBlockEnds:!0,afterComment:!0,afterRuleEnds:!0,beforeBlockEnds:!0}}):"string"==typeof e?i(c,function toHash(e){return e.split(p).reduce((function(e,t){var r=t.split(d),n=r[0],i=r[1];return"breaks"==n||"spaces"==n?e[n]=function hashValuesToHash(e){return e.split(h).reduce((function(e,t){var r=t.split(g),n=r[0],i=r[1];return e[n]=function normalizeValue(e){switch(e){case _:case b:return!1;case m:case y:return!0;default:return e}}(i),e}),{})}(i):"indentBy"==n||"wrapAt"==n?e[n]=parseInt(i):"indentWith"==n?e[n]=mapIndentWith(i):"breakWith"==n&&(e[n]=mapBreakWith(i)),e}),{})}(e)):c)}}},function(e,t){e.exports=function formatPosition(e){var t=e[0],r=e[1],n=e[2];return n?n+":"+t+":"+r:t+":"+r}},function(e,t,r){var n=r(17),i=r(184),a=/\/deep\//,o=/^::/,s=":not",u=[":dir",":lang",":not",":nth-child",":nth-last-child",":nth-last-of-type",":nth-of-type"],c=/[>\+~]/,l=[":after",":before",":first-letter",":first-line",":lang"],f=["::after","::before","::first-letter","::first-line"],p={DOUBLE_QUOTE:"double-quote",SINGLE_QUOTE:"single-quote",ROOT:"root"};function isDeepSelector(e){return a.test(e)}function extractPseudoFrom(e){var t,r,i,a,o,s,u=[],l=[],f=p.ROOT,d=0,h=!1,g=!1;for(o=0,s=e.length;o0&&h&&u.push(l.join("")),u}function areMergeable(e,t,r,i,a){return function areAllowed(e,t,r){var i,a,o,s;for(o=0,s=e.length;o-1?i.substring(0,i.indexOf(n.OPEN_ROUND_BRACKET)):i,-1===t.indexOf(a)&&-1===r.indexOf(a))return!1;return!0}(t,r,i)&&function needArguments(e){var t,r,i,a,o,s;for(o=0,s=e.length;o-1)?t.substring(0,i):t,a&&-1==u.indexOf(r))return!1;if(!a&&u.indexOf(r)>-1)return!1}return!0}(t)&&(t.length<2||!function someIncorrectlyChained(e,t){var r,i,a,o,u,c,l,f,p=0;for(l=0,f=t.length;l-1?r.substring(0,r.indexOf(n.OPEN_ROUND_BRACKET)):r,c=a.indexOf(n.OPEN_ROUND_BRACKET)>-1?a.substring(0,a.indexOf(n.OPEN_ROUND_BRACKET)):a,u!=s||c!=s))return!0;return!1}(e,t))&&(t.length<2||a&&function allMixable(e){var t,r,n,i=0;for(r=0,n=e.length;r-1?1:0:i+=l.indexOf(t)>-1?1:0,i>1)return!1;var a;return!0}(t))}e.exports=function isMergeable(e,t,r,a){var o,s,u,c=i(e,n.COMMA);for(s=0,u=c.length;s-1&&!areMergeable(o,extractPseudoFrom(o),t,r,a))return!1;return!0}},function(e,t,r){var n=r(617),i=r(622),a=r(186),o=r(187),s=r(67).all,u=r(283),c=r(84),l=r(39).OptimizationLevel;e.exports=function optimizeProperties(e,t,r,f){var p,d,h,g=f.options.level[l.Two],_=s(e,!1,g.skipProperties);for(a(_,f.validator,f.warnings),d=0,h=_.length;d=0;r--){var n=shallow(e.components[r]);n.value=e.components[r].value.slice(0),t.components.unshift(n)}return t.dirty=!0,t.value=e.value.slice(0),t},shallow:shallow}},function(e,t,r){var n=r(289),i=r(628),a=/align\-items|box\-align|box\-pack|flex|justify/,o=/^border\-(top|right|bottom|left|color|style|width|radius)/;function canReorderSingle(e,t,r){var s=e[0],u=e[1],c=e[2],l=e[5],f=e[6],p=t[0],d=t[1],h=t[2],g=t[5],_=t[6];return!("font"==s&&"line-height"==p||"font"==p&&"line-height"==s)&&((!a.test(s)||!a.test(p))&&(!(c==h&&unprefixed(s)==unprefixed(p)&&vendorPrefixed(s)^vendorPrefixed(p))&&(("border"!=c||!o.test(h)||!("border"==s||s==h||u!=d&&sameBorderComponent(s,p)))&&(("border"!=h||!o.test(c)||!("border"==p||p==c||u!=d&&sameBorderComponent(s,p)))&&(("border"!=c||"border"!=h||s==p||!(isSideBorder(s)&&isStyleBorder(p)||isStyleBorder(s)&&isSideBorder(p)))&&(c!=h||(!(s!=p||c!=h||u!=d&&!function withDifferentVendorPrefix(e,t){return vendorPrefixed(e)&&vendorPrefixed(t)&&e.split("-")[1]!=t.split("-")[2]}(u,d))||(s!=p&&c==h&&s!=c&&p!=h||(s!=p&&c==h&&u==d||(!(!_||!f||inheritable(c)||inheritable(h)||n(g,l,!1))||!i(l,g,r)))))))))))}function vendorPrefixed(e){return/^\-(?:moz|webkit|ms|o)\-/.test(e)}function unprefixed(e){return e.replace(/^\-(?:moz|webkit|ms|o)\-/,"")}function sameBorderComponent(e,t){return e.split("-").pop()==t.split("-").pop()}function isSideBorder(e){return"border-top"==e||"border-right"==e||"border-bottom"==e||"border-left"==e}function isStyleBorder(e){return"border-color"==e||"border-style"==e||"border-width"==e}function inheritable(e){return"font"==e||"line-height"==e||"list-style"==e}e.exports={canReorder:function canReorder(e,t,r){for(var n=t.length-1;n>=0;n--)for(var i=e.length-1;i>=0;i--)if(!canReorderSingle(e[i],t[n],r))return!1;return!0},canReorderSingle:canReorderSingle}},function(e,t){var r=/^\/\//;e.exports=function hasProtocol(e){return!r.test(e)}},function(e,t,r){var n=r(5).Buffer;function asUInt32Array(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i>>24]^l[h>>>16&255]^f[g>>>8&255]^p[255&_]^t[b++],o=c[h>>>24]^l[g>>>16&255]^f[_>>>8&255]^p[255&d]^t[b++],s=c[g>>>24]^l[_>>>16&255]^f[d>>>8&255]^p[255&h]^t[b++],u=c[_>>>24]^l[d>>>16&255]^f[h>>>8&255]^p[255&g]^t[b++],d=a,h=o,g=s,_=u;return a=(n[d>>>24]<<24|n[h>>>16&255]<<16|n[g>>>8&255]<<8|n[255&_])^t[b++],o=(n[h>>>24]<<24|n[g>>>16&255]<<16|n[_>>>8&255]<<8|n[255&d])^t[b++],s=(n[g>>>24]<<24|n[_>>>16&255]<<16|n[d>>>8&255]<<8|n[255&h])^t[b++],u=(n[_>>>24]<<24|n[d>>>16&255]<<16|n[h>>>8&255]<<8|n[255&g])^t[b++],[a>>>=0,o>>>=0,s>>>=0,u>>>=0]}var i=[0,1,2,4,8,16,32,64,128,27,54],a=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],a=[[],[],[],[]],o=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[o]=c,n[c]=o;var l=e[o],f=e[l],p=e[f],d=257*e[c]^16843008*c;i[0][o]=d<<24|d>>>8,i[1][o]=d<<16|d>>>16,i[2][o]=d<<8|d>>>24,i[3][o]=d,d=16843009*p^65537*f^257*l^16843008*o,a[0][c]=d<<24|d>>>8,a[1][c]=d<<16|d>>>16,a[2][c]=d<<8|d>>>24,a[3][c]=d,0===o?o=s=1:(o=l^e[e[e[p^l]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:a}}();function AES(e){this._key=asUInt32Array(e),this._reset()}AES.blockSize=16,AES.keySize=32,AES.prototype.blockSize=AES.blockSize,AES.prototype.keySize=AES.keySize,AES.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),o=[],s=0;s>>24,u=a.SBOX[u>>>24]<<24|a.SBOX[u>>>16&255]<<16|a.SBOX[u>>>8&255]<<8|a.SBOX[255&u],u^=i[s/t|0]<<24):t>6&&s%t==4&&(u=a.SBOX[u>>>24]<<24|a.SBOX[u>>>16&255]<<16|a.SBOX[u>>>8&255]<<8|a.SBOX[255&u]),o[s]=o[s-t]^u}for(var c=[],l=0;l>>24]]^a.INV_SUB_MIX[1][a.SBOX[p>>>16&255]]^a.INV_SUB_MIX[2][a.SBOX[p>>>8&255]]^a.INV_SUB_MIX[3][a.SBOX[255&p]]}this._nRounds=r,this._keySchedule=o,this._invKeySchedule=c},AES.prototype.encryptBlockRaw=function(e){return cryptBlock(e=asUInt32Array(e),this._keySchedule,a.SUB_MIX,a.SBOX,this._nRounds)},AES.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},AES.prototype.decryptBlock=function(e){var t=(e=asUInt32Array(e))[1];e[1]=e[3],e[3]=t;var r=cryptBlock(e,this._invKeySchedule,a.INV_SUB_MIX,a.INV_SBOX,this._nRounds),i=n.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i},AES.prototype.scrub=function(){scrubVec(this._keySchedule),scrubVec(this._invKeySchedule),scrubVec(this._key)},e.exports.AES=AES},function(e,t,r){var n=r(5).Buffer,i=r(195);e.exports=function EVP_BytesToKey(e,t,r,a){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var o=r/8,s=n.alloc(o),u=n.alloc(a||0),c=n.alloc(0);o>0||a>0;){var l=new i;l.update(c),l.update(e),t&&l.update(t),c=l.digest();var f=0;if(o>0){var p=s.length-o;f=Math.min(o,c.length),c.copy(s,p,0,f),o-=f}if(f0){var d=u.length-a,h=Math.min(a,c.length-f);c.copy(u,d,f,f+h),a-=h}}return c.fill(0),{key:s,iv:u}}},function(e,t,r){"use strict";var n=r(14),i=r(23),a=i.getNAF,o=i.getJSF,s=i.assert;function BaseCurve(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function BasePoint(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=BaseCurve,BaseCurve.prototype.point=function point(){throw new Error("Not implemented")},BaseCurve.prototype.validate=function validate(){throw new Error("Not implemented")},BaseCurve.prototype._fixedNafMul=function _fixedNafMul(e,t){s(e.precomputed);var r=e._getDoubles(),n=a(t,1),i=(1<=u;t--)c=(c<<1)+n[t];o.push(c)}for(var l=this.jpoint(null,null,null),f=this.jpoint(null,null,null),p=i;p>0;p--){for(u=0;u=0;c--){for(t=0;c>=0&&0===o[c];c--)t++;if(c>=0&&t++,u=u.dblp(t),c<0)break;var l=o[c];s(0!==l),u="affine"===e.type?l>0?u.mixedAdd(i[l-1>>1]):u.mixedAdd(i[-l-1>>1].neg()):l>0?u.add(i[l-1>>1]):u.add(i[-l-1>>1].neg())}return"affine"===e.type?u.toP():u},BaseCurve.prototype._wnafMulAdd=function _wnafMulAdd(e,t,r,n,i){for(var s=this._wnafT1,u=this._wnafT2,c=this._wnafT3,l=0,f=0;f=1;f-=2){var d=f-1,h=f;if(1===s[d]&&1===s[h]){var g=[t[d],null,null,t[h]];0===t[d].y.cmp(t[h].y)?(g[1]=t[d].add(t[h]),g[2]=t[d].toJ().mixedAdd(t[h].neg())):0===t[d].y.cmp(t[h].y.redNeg())?(g[1]=t[d].toJ().mixedAdd(t[h]),g[2]=t[d].add(t[h].neg())):(g[1]=t[d].toJ().mixedAdd(t[h]),g[2]=t[d].toJ().mixedAdd(t[h].neg()));var _=[-3,-1,-5,-7,0,7,5,1,3],b=o(r[d],r[h]);l=Math.max(b[0].length,l),c[d]=new Array(l),c[h]=new Array(l);for(var m=0;m=0;f--){for(var A=0;f>=0;){var S=!0;for(m=0;m=0&&A++,w=w.dblp(A),f<0)break;for(m=0;m0?k=u[m][E-1>>1]:E<0&&(k=u[m][-E-1>>1].neg()),w="affine"===k.type?w.mixedAdd(k):w.add(k))}}for(f=0;f=Math.ceil((e.bitLength()+1)/t.step)},BasePoint.prototype._getDoubles=function _getDoubles(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i0?n:r)(e)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){var n=r(358);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,r){var n=r(52);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,r){var n=r(51),i=r(360),a=r(130),o=r(128)("IE_PROTO"),s=function(){},u=function(){var e,t=r(213)("iframe"),n=a.length;for(t.style.display="none",r(363).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(" + + diff --git a/Demo/helloWorld/style.css b/Demo/helloWorld/style.css new file mode 100644 index 00000000000..93414c6a51d --- /dev/null +++ b/Demo/helloWorld/style.css @@ -0,0 +1,11 @@ +/* Let's highlight canvas boundaries */ +#gjs { + border: 3px solid #444; + } + + /* Reset some default styling */ + .gjs-cv-canvas { + top: 0; + width: 100%; + height: 100%; + } \ No newline at end of file diff --git a/Demo/mautic/index.html b/Demo/mautic/index.html new file mode 100644 index 00000000000..1b0112dffde --- /dev/null +++ b/Demo/mautic/index.html @@ -0,0 +1,86 @@ + + + + + + + + + + Hello Mautic + + + +
+
+ +

HTML

+ +

MJML

+ +

Assets

+ +

Builder Url

+ +

dynamicContentPrototype

+
+ +
+ Top | + Launch page | + Launch emailform HTML + Launch emailform MJML + + + diff --git a/EventSubscriber/AssetsSubscriber.php b/EventSubscriber/AssetsSubscriber.php index c8a744dcd0e..c761022da76 100644 --- a/EventSubscriber/AssetsSubscriber.php +++ b/EventSubscriber/AssetsSubscriber.php @@ -41,13 +41,7 @@ public function injectAssets(CustomAssetsEvent $assetsEvent) return; } if ($this->config->isPublished()) { - $assetsEvent->addScript('plugins/GrapesJsBuilderBundle/Assets/library/js/builder.js'); - $assetsEvent->addScript('plugins/GrapesJsBuilderBundle/Assets/library/js/grapes.min.js'); - $assetsEvent->addScript('plugins/GrapesJsBuilderBundle/Assets/library/js/grapesjs-preset-newsletter.min.js'); - $assetsEvent->addScript('plugins/GrapesJsBuilderBundle/Assets/library/js/grapesjs-preset-webpage.min.js'); - $assetsEvent->addScript('plugins/GrapesJsBuilderBundle/Assets/library/js/grapesjs-mjml.min.js'); - $assetsEvent->addScript('plugins/GrapesJsBuilderBundle/Assets/library/js/grapesjs-parser-postcss.min.js'); - $assetsEvent->addScript('plugins/GrapesJsBuilderBundle/Assets/library/js/grapesjs-preset-mautic.min.js'); + $assetsEvent->addScript('plugins/GrapesJsBuilderBundle/Assets/library/js/dist/builder.js'); $assetsEvent->addStylesheet('plugins/GrapesJsBuilderBundle/Assets/library/css/builder.css'); $assetsEvent->addStylesheet('plugins/GrapesJsBuilderBundle/Assets/library/css/grapes.min.css'); diff --git a/Helper/FileManager.php b/Helper/FileManager.php index 5bbfccbae0d..8fcb77ac03f 100644 --- a/Helper/FileManager.php +++ b/Helper/FileManager.php @@ -141,12 +141,13 @@ public function getImages() $finder = new Finder(); $finder->files()->in($uploadDir); - + foreach ($finder as $file) { if ($size = @getimagesize($this->getCompleteFilePath($file->getFilename()))) { $files[] = [ 'src' => $this->getFullUrl($file->getFilename()), 'width' => $size[0], + 'type' => 'image', 'height' => $size[1], ]; } else { diff --git a/README.md b/README.md index 5ada59198d4..ba0a9a686ed 100644 --- a/README.md +++ b/README.md @@ -115,3 +115,49 @@ We are going to delete the branch for the Mautic 2.x Plugin on February 28th 202 If you feel the need to develop the existing 2.x branch further, please fork it and develop it on your own repo. Here is the link to the 2.x Branch with the work done so far: https://github.com/mautic/plugin-grapesjs-builder/tree/master + +------------------------------------------------------------------- + +## Code +### Setup +```bash +npm install +``` + +#### Configure babel, eslint, prettier +use the template files provided. E.g. .eslintrc.temp + +### How to test standalone +```bash +npm run start-helloWorld +or +npm run start-mautic +``` + +In order for start-mautic to work a running ddev container has to be present. +If you are on some other development environment you need to update some paths in Demo/mautic/index.html + +### How to build for production +```bash +npm run build +``` + +## Code Architecture + +There is the JS code in the Assets/libarary folder. This handles the bootstrapping and management. + +In addition there is the mautic preset. This handles the basic Mautic specific code. The general idea is that this preset repo can be used as a base for various Mautic builder plugins. E.g one where the RTE ediotor is the CKEditor, or where we have some very customer specific functionality. +``` +- It's a pack of configurable feautures: +- Adds the function to edit source code +- Extends the original image and add a confirm dialog before removing it +- Add the option to hide/show the Layers Manager +- Add the option to enable/disable the import code button +- Moves the Settings panel inside Style Manager panel +- Opens the Block Manager at launch +- Replace Rich Text Editor by Froala used in Mautic (add token support) +- Add Dynamic Content Block for HTML used in Mautic +``` + +## Sources +[New builder documentation resources](https://docs.google.com/document/d/1gdyojOM-K-Otk2iPo92qennjw3yKvdd6VUjToGzFgC0/edit#heading=h.akyer7a3p06t) diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000000..cdabbabe7aa --- /dev/null +++ b/package-lock.json @@ -0,0 +1,17307 @@ +{ + "name": "grapesjsbuilderbundle", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "grapesjsbuilderbundle", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "grapesjs": "^0.16.44", + "grapesjs-mjml": "^0.4.2", + "grapesjs-parser-postcss": "^0.1.1", +<<<<<<< Updated upstream +======= + "grapesjs-plugin-ckeditor": "^0.0.10", +>>>>>>> Stashed changes + "grapesjs-preset-mautic": "github:mautic/grapesjs-preset-mautic#master", + "grapesjs-preset-newsletter": "^0.2.20", + "grapesjs-preset-webpage": "^0.1.11" + }, + "devDependencies": { + "@babel/cli": "^7.12.16", + "@babel/core": "^7.12.16", + "@babel/plugin-proposal-class-properties": "^7.12.13", + "@babel/plugin-transform-runtime": "^7.12.15", + "babel-eslint": "^10.1.0", + "eslint": "^7.20.0", + "eslint-config-airbnb": "^18.2.1", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-jsx-a11y": "^6.4.1", + "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-react": "^7.22.0", + "eslint-plugin-react-hooks": "^1.7.0", + "parcel-bundler": "^1.12.4", + "prettier": "^2.2.1" + } + }, + "node_modules/@babel/cli": { + "version": "7.12.16", + "dev": true, + "license": "MIT", + "dependencies": { + "commander": "^4.0.1", + "convert-source-map": "^1.1.0", + "fs-readdir-recursive": "^1.1.0", + "glob": "^7.0.0", + "lodash": "^4.17.19", + "make-dir": "^2.1.0", + "slash": "^2.0.0", + "source-map": "^0.5.0" + }, + "bin": { + "babel": "bin/babel.js", + "babel-external-helpers": "bin/babel-external-helpers.js" + }, + "optionalDependencies": { + "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents", + "chokidar": "^3.4.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/cli/node_modules/anymatch": { + "version": "3.1.1", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@babel/cli/node_modules/binary-extensions": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@babel/cli/node_modules/braces": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@babel/cli/node_modules/chokidar": { + "version": "3.5.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.1" + } + }, + "node_modules/@babel/cli/node_modules/commander": { + "version": "4.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/@babel/cli/node_modules/fill-range": { + "version": "7.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@babel/cli/node_modules/fsevents": { + "version": "2.3.2", + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/@babel/cli/node_modules/is-binary-path": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@babel/cli/node_modules/is-number": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/@babel/cli/node_modules/readdirp": { + "version": "3.5.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/@babel/cli/node_modules/slash": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/@babel/cli/node_modules/source-map": { + "version": "0.5.7", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@babel/cli/node_modules/to-regex-range": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.12.11", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.12.13", + "dev": true, + "license": "MIT" + }, + "node_modules/@babel/core": { + "version": "7.12.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.12.15", + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helpers": "^7.12.13", + "@babel/parser": "^7.12.16", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/@babel/code-frame": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.12.13" + } + }, + "node_modules/@babel/core/node_modules/json5": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "5.7.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@babel/core/node_modules/source-map": { + "version": "0.5.7", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.12.15", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.12.13", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "node_modules/@babel/generator/node_modules/source-map": { + "version": "0.5.7", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-explode-assignable-expression": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.12.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.12.13", + "@babel/helper-validator-option": "^7.12.16", + "browserslist": "^4.14.5", + "semver": "^5.5.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "5.7.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.12.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-member-expression-to-functions": "^7.12.16", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/helper-replace-supers": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.12.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.12.13", + "regexpu-core": "^4.7.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-explode-assignable-expression": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-get-function-arity": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-get-function-arity": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.12.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-replace-supers": "^7.12.13", + "@babel/helper-simple-access": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/helper-validator-identifier": "^7.12.11", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13", + "lodash": "^4.17.19" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.12.13", + "dev": true, + "license": "MIT" + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-wrap-function": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.12.13", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.12.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.12.1" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.12.11", + "dev": true, + "license": "MIT" + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.12.16", + "dev": true, + "license": "MIT" + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-function-name": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helpers": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/highlight": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.12.16", + "dev": true, + "license": "MIT", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-proposal-async-generator-functions": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-remap-async-to-generator": "^7.12.13", + "@babel/plugin-syntax-async-generators": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-properties": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-dynamic-import": { + "version": "7.12.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-dynamic-import": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-export-namespace-from": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-json-strings": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-json-strings": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-numeric-separator": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-transform-parameters": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-catch-binding": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-chaining": { + "version": "7.12.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", + "@babel/plugin-syntax-optional-chaining": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-methods": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-unicode-property-regex": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-flow": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-remap-async-to-generator": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-replace-supers": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "globals": "^11.1.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-classes/node_modules/globals": { + "version": "11.12.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-flow-strip-types": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-flow": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-simple-access": "^7.12.13", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-hoist-variables": "^7.12.13", + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-validator-identifier": "^7.12.11", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-replace-supers": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx": { + "version": "7.12.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-jsx": "^7.12.13", + "@babel/types": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerator-transform": "^0.14.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime": { + "version": "7.12.15", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "semver": "^5.5.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime/node_modules/semver": { + "version": "5.7.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.12.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.12.13", + "@babel/helper-compilation-targets": "^7.12.16", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-validator-option": "^7.12.16", + "@babel/plugin-proposal-async-generator-functions": "^7.12.13", + "@babel/plugin-proposal-class-properties": "^7.12.13", + "@babel/plugin-proposal-dynamic-import": "^7.12.16", + "@babel/plugin-proposal-export-namespace-from": "^7.12.13", + "@babel/plugin-proposal-json-strings": "^7.12.13", + "@babel/plugin-proposal-logical-assignment-operators": "^7.12.13", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.13", + "@babel/plugin-proposal-numeric-separator": "^7.12.13", + "@babel/plugin-proposal-object-rest-spread": "^7.12.13", + "@babel/plugin-proposal-optional-catch-binding": "^7.12.13", + "@babel/plugin-proposal-optional-chaining": "^7.12.16", + "@babel/plugin-proposal-private-methods": "^7.12.13", + "@babel/plugin-proposal-unicode-property-regex": "^7.12.13", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.12.13", + "@babel/plugin-transform-arrow-functions": "^7.12.13", + "@babel/plugin-transform-async-to-generator": "^7.12.13", + "@babel/plugin-transform-block-scoped-functions": "^7.12.13", + "@babel/plugin-transform-block-scoping": "^7.12.13", + "@babel/plugin-transform-classes": "^7.12.13", + "@babel/plugin-transform-computed-properties": "^7.12.13", + "@babel/plugin-transform-destructuring": "^7.12.13", + "@babel/plugin-transform-dotall-regex": "^7.12.13", + "@babel/plugin-transform-duplicate-keys": "^7.12.13", + "@babel/plugin-transform-exponentiation-operator": "^7.12.13", + "@babel/plugin-transform-for-of": "^7.12.13", + "@babel/plugin-transform-function-name": "^7.12.13", + "@babel/plugin-transform-literals": "^7.12.13", + "@babel/plugin-transform-member-expression-literals": "^7.12.13", + "@babel/plugin-transform-modules-amd": "^7.12.13", + "@babel/plugin-transform-modules-commonjs": "^7.12.13", + "@babel/plugin-transform-modules-systemjs": "^7.12.13", + "@babel/plugin-transform-modules-umd": "^7.12.13", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.13", + "@babel/plugin-transform-new-target": "^7.12.13", + "@babel/plugin-transform-object-super": "^7.12.13", + "@babel/plugin-transform-parameters": "^7.12.13", + "@babel/plugin-transform-property-literals": "^7.12.13", + "@babel/plugin-transform-regenerator": "^7.12.13", + "@babel/plugin-transform-reserved-words": "^7.12.13", + "@babel/plugin-transform-shorthand-properties": "^7.12.13", + "@babel/plugin-transform-spread": "^7.12.13", + "@babel/plugin-transform-sticky-regex": "^7.12.13", + "@babel/plugin-transform-template-literals": "^7.12.13", + "@babel/plugin-transform-typeof-symbol": "^7.12.13", + "@babel/plugin-transform-unicode-escapes": "^7.12.13", + "@babel/plugin-transform-unicode-regex": "^7.12.13", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.12.13", + "core-js-compat": "^3.8.0", + "semver": "^5.5.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/semver": { + "version": "5.7.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.13.4" + } + }, + "node_modules/@babel/runtime-corejs3": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "core-js-pure": "^3.0.0", + "regenerator-runtime": "^0.13.4" + } + }, + "node_modules/@babel/template": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/template/node_modules/@babel/code-frame": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.12.13" + } + }, + "node_modules/@babel/traverse": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.12.13", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/code-frame": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.12.13" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "0.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "lodash": "^4.17.20", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/@iarna/toml": { + "version": "2.2.5", + "dev": true, + "license": "ISC" + }, + "node_modules/@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@nicolo-ribaudo/chokidar-2": { + "version": "2.1.8-no-fsevents", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "node_modules/@nicolo-ribaudo/chokidar-2/node_modules/glob-parent": { + "version": "3.1.0", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/@nicolo-ribaudo/chokidar-2/node_modules/glob-parent/node_modules/is-glob": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "1.1.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/@parcel/fs": { + "version": "1.11.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/utils": "^1.11.0", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.2" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/@parcel/fs/node_modules/rimraf": { + "version": "2.7.1", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/@parcel/logger": { + "version": "1.11.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/workers": "^1.11.0", + "chalk": "^2.1.0", + "grapheme-breaker": "^0.3.2", + "ora": "^2.1.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/@parcel/logger/node_modules/ansi-regex": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/@parcel/logger/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@parcel/logger/node_modules/strip-ansi": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@parcel/utils": { + "version": "1.11.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/@parcel/watcher": { + "version": "1.12.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/utils": "^1.11.0", + "chokidar": "^2.1.5" + } + }, + "node_modules/@parcel/workers": { + "version": "1.11.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@parcel/utils": "^1.11.0", + "physical-cpu-count": "^2.0.0" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/q": { + "version": "1.5.4", + "dev": true, + "license": "MIT" + }, + "node_modules/abab": { + "version": "2.0.5", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/acorn": { + "version": "7.4.1", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-globals": { + "version": "4.3.4", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^6.0.1", + "acorn-walk": "^6.0.1" + } + }, + "node_modules/acorn-globals/node_modules/acorn": { + "version": "6.4.2", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.1", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "6.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/alphanum-sort": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ansi-to-html": { + "version": "0.6.14", + "dev": true, + "license": "MIT", + "dependencies": { + "entities": "^1.1.2" + }, + "bin": { + "ansi-to-html": "bin/ansi-to-html" + }, + "engines": { + "node": "*" + } + }, + "node_modules/anymatch": { + "version": "2.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "node_modules/anymatch/node_modules/normalize-path": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/aria-query": { + "version": "4.2.2", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime": "^7.10.2", + "@babel/runtime-corejs3": "^7.10.2" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/arr-diff": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-equal": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/array-includes": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1", + "get-intrinsic": "^1.0.1", + "is-string": "^1.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-unique": { + "version": "0.3.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.2.4", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.2.4", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1", + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/asn1": { + "version": "0.2.4", + "license": "MIT", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/asn1.js": { + "version": "5.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.11.9", + "dev": true, + "license": "MIT" + }, + "node_modules/assert": { + "version": "1.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "object-assign": "^4.1.1", + "util": "0.10.3" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/assert/node_modules/inherits": { + "version": "2.0.1", + "dev": true, + "license": "ISC" + }, + "node_modules/assert/node_modules/util": { + "version": "0.10.3", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "2.0.1" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ast-types-flow": { + "version": "0.0.7", + "dev": true, + "license": "ISC" + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "3.2.0", + "license": "MIT" + }, + "node_modules/async-each": { + "version": "1.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/async-limiter": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "license": "MIT" + }, + "node_modules/atob": { + "version": "2.1.2", + "dev": true, + "license": "(MIT OR Apache-2.0)", + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.11.0", + "license": "MIT" + }, + "node_modules/axe-core": { + "version": "4.1.2", + "dev": true, + "license": "MPL-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/axobject-query": { + "version": "2.2.0", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/babel-eslint": { + "version": "10.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0", + "eslint-visitor-keys": "^1.0.0", + "resolve": "^1.12.0" + }, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "eslint": ">= 4.12.1" + } + }, + "node_modules/babel-eslint/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "dev": true, + "license": "MIT", + "dependencies": { + "object.assign": "^4.1.0" + } + }, + "node_modules/babel-runtime": { + "version": "6.26.0", + "dev": true, + "license": "MIT", + "dependencies": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "node_modules/babel-runtime/node_modules/regenerator-runtime": { + "version": "0.11.1", + "dev": true, + "license": "MIT" + }, + "node_modules/babel-types": { + "version": "6.26.0", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "node_modules/babel-types/node_modules/to-fast-properties": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babylon-walk": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.11.6", + "babel-types": "^6.15.0", + "lodash.clone": "^4.5.0" + } + }, + "node_modules/backbone": { + "version": "1.3.3", + "license": "MIT", + "dependencies": { + "underscore": ">=1.8.3" + } + }, + "node_modules/backbone-undo": { + "version": "0.2.5", + "license": "MIT license", + "dependencies": { + "backbone": "1.0.0 - 1.2.1", + "underscore": "1.4.4 - 1.8.3" + } + }, + "node_modules/backbone-undo/node_modules/backbone": { + "version": "1.2.1", + "license": "MIT", + "dependencies": { + "underscore": ">=1.7.0" + } + }, + "node_modules/backbone-undo/node_modules/underscore": { + "version": "1.8.3", + "license": "MIT" + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/base": { + "version": "0.11.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/is-descriptor": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "license": "BSD-3-Clause", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/binary-extensions": { + "version": "1.13.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bn.js": { + "version": "5.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/boolbase": { + "version": "1.0.0", + "license": "ISC" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "2.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/brfs": { + "version": "1.6.1", + "dev": true, + "license": "MIT", + "dependencies": { + "quote-stream": "^1.0.1", + "resolve": "^1.1.5", + "static-module": "^2.2.0", + "through2": "^2.0.0" + }, + "bin": { + "brfs": "bin/cmd.js" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/browser-process-hrtime": { + "version": "1.0.0", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/browserify-cipher": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/browserify-des": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/browserify-rsa": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "node_modules/browserify-sign": { + "version": "4.2.1", + "dev": true, + "license": "ISC", + "dependencies": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "node_modules/browserify-sign/node_modules/readable-stream": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/browserify-sign/node_modules/safe-buffer": { + "version": "5.2.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/browserify-zlib": { + "version": "0.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "pako": "~1.0.5" + } + }, + "node_modules/browserify-zlib/node_modules/pako": { + "version": "1.0.11", + "dev": true, + "license": "(MIT AND Zlib)" + }, + "node_modules/browserslist": { + "version": "4.16.3", + "dev": true, + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001181", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.649", + "escalade": "^3.1.1", + "node-releases": "^1.1.70" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/buffer": { + "version": "4.9.2", + "dev": true, + "license": "MIT", + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "node_modules/buffer-equal": { + "version": "0.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.1", + "dev": true, + "license": "MIT" + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/builtin-status-codes": { + "version": "3.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/cache-base": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-me-maybe": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/caller-callsite": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/caller-callsite/node_modules/callsites": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/caller-path": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "caller-callsite": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-api": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001187", + "dev": true, + "license": "CC-BY-4.0" + }, + "node_modules/caseless": { + "version": "0.12.0", + "license": "Apache-2.0" + }, + "node_modules/cash-dom": { + "version": "2.3.9", + "license": "MIT" + }, + "node_modules/chalk": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/chalk/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/chalk/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/chalk/node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cheerio": { + "version": "0.22.0", + "license": "MIT", + "dependencies": { + "css-select": "~1.2.0", + "dom-serializer": "~0.1.0", + "entities": "~1.1.1", + "htmlparser2": "^3.9.1", + "lodash.assignin": "^4.0.9", + "lodash.bind": "^4.1.4", + "lodash.defaults": "^4.0.1", + "lodash.filter": "^4.4.0", + "lodash.flatten": "^4.2.0", + "lodash.foreach": "^4.3.0", + "lodash.map": "^4.4.0", + "lodash.merge": "^4.4.0", + "lodash.pick": "^4.2.1", + "lodash.reduce": "^4.4.0", + "lodash.reject": "^4.4.0", + "lodash.some": "^4.4.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cheerio/node_modules/css-select": { + "version": "1.2.0", + "license": "BSD-like", + "dependencies": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "node_modules/cheerio/node_modules/css-what": { + "version": "2.1.3", + "license": "BSD-2-Clause", + "engines": { + "node": "*" + } + }, + "node_modules/cheerio/node_modules/dom-serializer": { + "version": "0.1.1", + "license": "MIT", + "dependencies": { + "domelementtype": "^1.3.0", + "entities": "^1.1.1" + } + }, + "node_modules/cheerio/node_modules/domutils": { + "version": "1.5.1", + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/chokidar": { + "version": "2.1.8", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "optionalDependencies": { + "fsevents": "^1.2.7" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "3.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/chokidar/node_modules/glob-parent/node_modules/is-glob": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/class-utils": { + "version": "0.3.6", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cli-cursor": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-spinners": { + "version": "1.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/clone": { + "version": "2.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/coa": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/q": "^1.5.1", + "chalk": "^2.4.1", + "q": "^1.1.2" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/coa/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/codemirror": { + "version": "5.59.2", + "license": "MIT" + }, + "node_modules/codemirror-formatting": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color": { + "version": "3.1.3", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.1", + "color-string": "^1.5.4" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "license": "MIT" + }, + "node_modules/color-string": { + "version": "1.5.4", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/colorette": { + "version": "1.2.1", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/command-exists": { + "version": "1.2.9", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "2.20.3", + "license": "MIT" + }, + "node_modules/component-emitter": { + "version": "1.3.0", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "dev": true, + "engines": [ + "node >= 0.8" + ], + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/confusing-browser-globals": { + "version": "1.0.10", + "dev": true, + "license": "MIT" + }, + "node_modules/console-browserify": { + "version": "1.2.0", + "dev": true + }, + "node_modules/constants-browserify": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/contains-path": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/convert-source-map": { + "version": "1.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/core-js": { + "version": "2.6.12", + "dev": true, + "hasInstallScript": true, + "license": "MIT" + }, + "node_modules/core-js-compat": { + "version": "3.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.16.1", + "semver": "7.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-js-compat/node_modules/semver": { + "version": "7.0.0", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/core-js-pure": { + "version": "3.8.3", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/cosmiconfig": { + "version": "5.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cosmiconfig/node_modules/import-fresh": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cosmiconfig/node_modules/parse-json": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cosmiconfig/node_modules/resolve-from": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/create-ecdh": { + "version": "4.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "node_modules/create-ecdh/node_modules/bn.js": { + "version": "4.11.9", + "dev": true, + "license": "MIT" + }, + "node_modules/create-hash": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "dev": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-browserify": { + "version": "3.12.0", + "dev": true, + "license": "MIT", + "dependencies": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + }, + "engines": { + "node": "*" + } + }, + "node_modules/css-color-names": { + "version": "0.0.4", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/css-declaration-sorter": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss": "^7.0.1", + "timsort": "^0.3.0" + }, + "engines": { + "node": ">4" + } + }, + "node_modules/css-modules-loader-core": { + "version": "1.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "icss-replace-symbols": "1.1.0", + "postcss": "6.0.1", + "postcss-modules-extract-imports": "1.1.0", + "postcss-modules-local-by-default": "1.2.0", + "postcss-modules-scope": "1.1.0", + "postcss-modules-values": "1.3.0" + } + }, + "node_modules/css-modules-loader-core/node_modules/ansi-regex": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/css-modules-loader-core/node_modules/ansi-styles": { + "version": "2.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/css-modules-loader-core/node_modules/chalk": { + "version": "1.1.3", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/css-modules-loader-core/node_modules/chalk/node_modules/supports-color": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/css-modules-loader-core/node_modules/has-flag": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/css-modules-loader-core/node_modules/postcss": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^1.1.3", + "source-map": "^0.5.6", + "supports-color": "^3.2.3" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/css-modules-loader-core/node_modules/source-map": { + "version": "0.5.7", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/css-modules-loader-core/node_modules/strip-ansi": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/css-modules-loader-core/node_modules/supports-color": { + "version": "3.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^1.0.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/css-select": { + "version": "2.1.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^3.2.1", + "domutils": "^1.7.0", + "nth-check": "^1.0.2" + } + }, + "node_modules/css-select-base-adapter": { + "version": "0.1.1", + "dev": true, + "license": "MIT" + }, + "node_modules/css-selector-tokenizer": { + "version": "0.7.3", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "fastparse": "^1.1.2" + } + }, + "node_modules/css-tree": { + "version": "1.0.0-alpha.37", + "dev": true, + "license": "MIT", + "dependencies": { + "mdn-data": "2.0.4", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/css-what": { + "version": "3.4.2", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cssnano": { + "version": "4.1.10", + "dev": true, + "license": "MIT", + "dependencies": { + "cosmiconfig": "^5.0.0", + "cssnano-preset-default": "^4.0.7", + "is-resolvable": "^1.0.0", + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/cssnano-preset-default": { + "version": "4.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "css-declaration-sorter": "^4.0.1", + "cssnano-util-raw-cache": "^4.0.1", + "postcss": "^7.0.0", + "postcss-calc": "^7.0.1", + "postcss-colormin": "^4.0.3", + "postcss-convert-values": "^4.0.1", + "postcss-discard-comments": "^4.0.2", + "postcss-discard-duplicates": "^4.0.2", + "postcss-discard-empty": "^4.0.1", + "postcss-discard-overridden": "^4.0.1", + "postcss-merge-longhand": "^4.0.11", + "postcss-merge-rules": "^4.0.3", + "postcss-minify-font-values": "^4.0.2", + "postcss-minify-gradients": "^4.0.2", + "postcss-minify-params": "^4.0.2", + "postcss-minify-selectors": "^4.0.2", + "postcss-normalize-charset": "^4.0.1", + "postcss-normalize-display-values": "^4.0.2", + "postcss-normalize-positions": "^4.0.2", + "postcss-normalize-repeat-style": "^4.0.2", + "postcss-normalize-string": "^4.0.2", + "postcss-normalize-timing-functions": "^4.0.2", + "postcss-normalize-unicode": "^4.0.1", + "postcss-normalize-url": "^4.0.1", + "postcss-normalize-whitespace": "^4.0.2", + "postcss-ordered-values": "^4.1.2", + "postcss-reduce-initial": "^4.0.3", + "postcss-reduce-transforms": "^4.0.2", + "postcss-svgo": "^4.0.2", + "postcss-unique-selectors": "^4.0.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/cssnano-util-get-arguments": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/cssnano-util-get-match": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/cssnano-util-raw-cache": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/cssnano-util-same-parent": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/csso": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "css-tree": "^1.1.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/csso/node_modules/css-tree": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/csso/node_modules/mdn-data": { + "version": "2.0.14", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/cssom": { + "version": "0.3.8", + "dev": true, + "license": "MIT" + }, + "node_modules/cssstyle": { + "version": "1.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "cssom": "0.3.x" + } + }, + "node_modules/damerau-levenshtein": { + "version": "1.0.6", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/dashdash": { + "version": "1.14.1", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/data-urls": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "abab": "^2.0.0", + "whatwg-mimetype": "^2.2.0", + "whatwg-url": "^7.0.0" + } + }, + "node_modules/datauri": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "image-size": "^0.7.3", + "mimer": "^1.0.0" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/deasync": { + "version": "0.1.21", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "bindings": "^1.5.0", + "node-addon-api": "^1.7.1" + }, + "engines": { + "node": ">=0.11.0" + } + }, + "node_modules/debug": { + "version": "4.3.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/deep-extend": { + "version": "0.5.1", + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/defaults": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + } + }, + "node_modules/defaults/node_modules/clone": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/define-properties": { + "version": "1.1.3", + "dev": true, + "license": "MIT", + "dependencies": { + "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property/node_modules/is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property/node_modules/is-descriptor": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/des.js": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/destroy": { + "version": "1.0.4", + "dev": true, + "license": "MIT" + }, + "node_modules/diffie-hellman": { + "version": "5.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/diffie-hellman/node_modules/bn.js": { + "version": "4.11.9", + "dev": true, + "license": "MIT" + }, + "node_modules/doctrine": { + "version": "3.0.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dom-serializer": { + "version": "0.2.2", + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + } + }, + "node_modules/dom-serializer/node_modules/domelementtype": { + "version": "2.1.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/dom-serializer/node_modules/entities": { + "version": "2.2.0", + "license": "BSD-2-Clause", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/domain-browser": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4", + "npm": ">=1.2" + } + }, + "node_modules/domelementtype": { + "version": "1.3.1", + "license": "BSD-2-Clause" + }, + "node_modules/domexception": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "webidl-conversions": "^4.0.2" + } + }, + "node_modules/domhandler": { + "version": "2.4.2", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "1" + } + }, + "node_modules/domutils": { + "version": "1.7.0", + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/dot-prop": { + "version": "5.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-obj": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dotenv": { + "version": "5.0.1", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.6.0" + } + }, + "node_modules/dotenv-expand": { + "version": "5.1.0", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/duplexer2": { + "version": "0.1.4", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "readable-stream": "^2.0.2" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "license": "MIT", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "dev": true, + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.3.664", + "dev": true, + "license": "ISC" + }, + "node_modules/elliptic": { + "version": "6.5.4", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.11.9", + "dev": true, + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/enquirer": { + "version": "2.3.6", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/entities": { + "version": "1.1.2", + "license": "BSD-2-Clause" + }, + "node_modules/envinfo": { + "version": "7.7.4", + "dev": true, + "license": "MIT", + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.18.0-next.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.1", + "object-inspect": "^1.9.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.3", + "string.prototype.trimstart": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/escodegen": { + "version": "1.9.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/escodegen/node_modules/esprima": { + "version": "3.1.3", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/escodegen/node_modules/levn": { + "version": "0.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/optionator": { + "version": "0.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/prelude-ls": { + "version": "1.1.2", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/type-check": { + "version": "0.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint": { + "version": "7.20.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.3.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "file-entry-cache": "^6.0.0", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.20", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-airbnb": { + "version": "18.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-config-airbnb-base": "^14.2.1", + "object.assign": "^4.1.2", + "object.entries": "^1.1.2" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "eslint": "^5.16.0 || ^6.8.0 || ^7.2.0", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-jsx-a11y": "^6.4.1", + "eslint-plugin-react": "^7.21.5", + "eslint-plugin-react-hooks": "^4 || ^3 || ^2.3.0 || ^1.7.0" + } + }, + "node_modules/eslint-config-airbnb-base": { + "version": "14.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.2" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "eslint": "^5.16.0 || ^6.8.0 || ^7.2.0", + "eslint-plugin-import": "^2.22.1" + } + }, + "node_modules/eslint-config-prettier": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.4", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^2.6.9", + "resolve": "^1.13.1" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "2.6.9", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint-module-utils": { + "version": "2.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^2.6.9", + "pkg-dir": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "2.6.9", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/eslint-module-utils/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint-plugin-import": { + "version": "2.22.1", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.1", + "array.prototype.flat": "^1.2.3", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.4", + "eslint-module-utils": "^2.6.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.1", + "read-pkg-up": "^2.0.0", + "resolve": "^1.17.0", + "tsconfig-paths": "^3.9.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "2.6.9", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "1.5.0", + "dev": true, + "dependencies": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint-plugin-jsx-a11y": { + "version": "6.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.11.2", + "aria-query": "^4.2.2", + "array-includes": "^3.1.1", + "ast-types-flow": "^0.0.7", + "axe-core": "^4.0.2", + "axobject-query": "^2.2.0", + "damerau-levenshtein": "^1.0.6", + "emoji-regex": "^9.0.0", + "has": "^1.0.3", + "jsx-ast-utils": "^3.1.0", + "language-tags": "^1.0.5" + }, + "engines": { + "node": ">=4.0" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7" + } + }, + "node_modules/eslint-plugin-jsx-a11y/node_modules/emoji-regex": { + "version": "9.2.1", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint-plugin-prettier": { + "version": "3.3.1", + "dev": true, + "license": "MIT", + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "peerDependencies": { + "eslint": ">=5.0.0", + "prettier": ">=1.13.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-react": { + "version": "7.22.0", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.1", + "array.prototype.flatmap": "^1.2.3", + "doctrine": "^2.1.0", + "has": "^1.0.3", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "object.entries": "^1.1.2", + "object.fromentries": "^2.0.2", + "object.values": "^1.1.1", + "prop-types": "^15.7.2", + "resolve": "^1.18.1", + "string.prototype.matchall": "^4.0.2" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7" + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "1.7.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=7" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" + } + }, + "node_modules/eslint-plugin-react/node_modules/doctrine": { + "version": "2.1.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "2.0.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10" + } + }, + "node_modules/espree": { + "version": "7.3.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.2.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.2.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/events": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/debug": { + "version": "2.6.9", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/extend-shallow": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/extend": { + "version": "3.0.2", + "license": "MIT" + }, + "node_modules/extend-shallow": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend-shallow/node_modules/is-extendable": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob": { + "version": "2.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/extend-shallow": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/is-descriptor": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT" + }, + "node_modules/falafel": { + "version": "2.2.4", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^7.1.1", + "foreach": "^2.0.5", + "isarray": "^2.0.1", + "object-keys": "^1.0.6" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/falafel/node_modules/isarray": { + "version": "2.0.5", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "license": "MIT" + }, + "node_modules/fast-diff": { + "version": "1.2.0", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/fast-glob": { + "version": "2.2.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.1.2", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.3", + "micromatch": "^3.1.10" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "3.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent/node_modules/is-glob": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "dev": true, + "license": "MIT" + }, + "node_modules/fastparse": { + "version": "1.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/file-entry-cache": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/file-saver": { + "version": "1.3.8", + "license": "MIT" + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/filesize": { + "version": "3.6.1", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/fill-range": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/find-up": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.1.1", + "dev": true, + "license": "ISC" + }, + "node_modules/for-in": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/foreach": { + "version": "2.0.5", + "dev": true, + "license": "MIT" + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-readdir-recursive": { + "version": "1.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "1.2.13", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "dev": true, + "license": "MIT" + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-port": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.1", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.3.0", + "dev": true, + "license": "BSD" + }, + "node_modules/globals": { + "version": "12.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.6", + "dev": true, + "license": "ISC" + }, + "node_modules/grapesjs": { + "version": "0.16.44", + "license": "BSD-3-Clause", + "dependencies": { + "backbone": "1.3.3", + "backbone-undo": "^0.2.5", + "cash-dom": "^2.3.9", + "codemirror": "^5.58.2", + "codemirror-formatting": "^1.0.0", + "keymaster": "^1.6.2", + "promise-polyfill": "^8.1.3", + "spectrum-colorpicker": "^1.8.0", + "underscore": "^1.9.1" + } + }, + "node_modules/grapesjs-aviary": { + "version": "0.1.2", + "license": "BSD-3-Clause", + "peerDependencies": { + "grapesjs": "0.x" + } + }, + "node_modules/grapesjs-blocks-basic": { + "version": "0.1.8", + "license": "BSD-3-Clause", + "peerDependencies": { + "grapesjs": "0.x" + } + }, + "node_modules/grapesjs-component-countdown": { + "version": "0.1.3", + "license": "BSD-3-Clause", + "peerDependencies": { + "grapesjs": "0.x" + } + }, + "node_modules/grapesjs-mjml": { + "version": "0.4.2", + "license": "BSD-3-Clause", + "dependencies": { + "mjml-browser": "^4.8.0" + } + }, + "node_modules/grapesjs-navbar": { + "version": "0.1.5", + "license": "BSD-3-Clause", + "peerDependencies": { + "grapesjs": "0.x" + } + }, + "node_modules/grapesjs-parser-postcss": { + "version": "0.1.1", + "license": "BSD-3-Clause", + "dependencies": { + "postcss": "^7.0.2" + } + }, + "node_modules/grapesjs-plugin-export": { + "version": "0.1.5", + "license": "BSD-3-Clause", + "dependencies": { + "file-saver": "^1.3.2", + "jszip": "^3.0.0" + }, + "peerDependencies": { + "grapesjs": "0.x" + } + }, + "node_modules/grapesjs-plugin-filestack": { + "version": "0.1.1", + "license": "BSD-3-Clause", + "peerDependencies": { + "grapesjs": "0.x" + } + }, + "node_modules/grapesjs-plugin-forms": { + "version": "0.3.6", + "license": "BSD-3-Clause", + "peerDependencies": { + "grapesjs": "0.x" + } + }, + "node_modules/grapesjs-preset-mautic": { + "version": "1.0.0", + "resolved": "git+ssh://git@github.com/mautic/grapesjs-preset-mautic.git#4aa6bce08079f8993d7d18584a54f20d18997fb6", + "license": "MIT" + }, + "node_modules/grapesjs-preset-newsletter": { + "version": "0.2.20", + "license": "BSD-3-Clause", + "dependencies": { + "juice": "^4.1.1" + } + }, + "node_modules/grapesjs-preset-webpage": { + "version": "0.1.11", + "license": "BSD-3-Clause", + "dependencies": { + "grapesjs-aviary": "^0.1.2", + "grapesjs-blocks-basic": "^0.1.7", + "grapesjs-component-countdown": "^0.1.2", + "grapesjs-navbar": "^0.1.5", + "grapesjs-plugin-export": "^0.1.5", + "grapesjs-plugin-filestack": "^0.1.1", + "grapesjs-plugin-forms": "^0.3.5" + }, + "peerDependencies": { + "grapesjs": "0.x" + } + }, + "node_modules/grapheme-breaker": { + "version": "0.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "brfs": "^1.2.0", + "unicode-trie": "^0.3.1" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "license": "ISC", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "license": "MIT", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-ansi/node_modules/ansi-regex": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-value": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash-base/node_modules/readable-stream": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/hash-base/node_modules/safe-buffer": { + "version": "5.2.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/hash.js": { + "version": "1.1.7", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hex-color-regex": { + "version": "1.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.8", + "dev": true, + "license": "ISC" + }, + "node_modules/hsl-regex": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/hsla-regex": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/html-comment-regex": { + "version": "1.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/html-encoding-sniffer": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-encoding": "^1.0.1" + } + }, + "node_modules/html-tags": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/htmlnano": { + "version": "0.2.8", + "dev": true, + "license": "MIT", + "dependencies": { + "cssnano": "^4.1.10", + "posthtml": "^0.13.4", + "posthtml-render": "^1.3.0", + "purgecss": "^2.3.0", + "relateurl": "^0.2.7", + "srcset": "^3.0.0", + "svgo": "^1.3.2", + "terser": "^4.8.0", + "timsort": "^0.3.0", + "uncss": "^0.17.3" + } + }, + "node_modules/htmlnano/node_modules/posthtml": { + "version": "0.13.4", + "dev": true, + "license": "MIT", + "dependencies": { + "posthtml-parser": "^0.5.0", + "posthtml-render": "^1.2.3" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/htmlnano/node_modules/posthtml-parser": { + "version": "0.5.3", + "dev": true, + "license": "MIT", + "dependencies": { + "htmlparser2": "^3.9.2" + }, + "engines": { + "node": ">=10.0.0" + }, + "funding": { + "type": "patreon", + "url": "https://opencollective.com/posthtml" + } + }, + "node_modules/htmlnano/node_modules/terser": { + "version": "4.8.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/htmlparser2": { + "version": "3.10.1", + "license": "MIT", + "dependencies": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "node_modules/htmlparser2/node_modules/readable-stream": { + "version": "3.6.0", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/http-errors": { + "version": "1.7.3", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-signature": { + "version": "1.2.0", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/https-browserify": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/icss-replace-symbols": { + "version": "1.1.0", + "dev": true, + "license": "ISC" + }, + "node_modules/ieee754": { + "version": "1.2.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "4.0.6", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/image-size": { + "version": "0.7.5", + "license": "MIT", + "bin": { + "image-size": "bin/image-size.js" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/immediate": { + "version": "3.0.6", + "license": "MIT" + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indexes-of": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "license": "ISC" + }, + "node_modules/internal-slot": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-absolute-url": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "dev": true, + "license": "MIT" + }, + "node_modules/is-binary-path": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "dev": true, + "license": "MIT" + }, + "node_modules/is-callable": { + "version": "1.2.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-color-stop": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "css-color-names": "^0.0.4", + "hex-color-regex": "^1.1.0", + "hsl-regex": "^1.0.0", + "hsla-regex": "^1.0.0", + "rgb-regex": "^1.0.1", + "rgba-regex": "^1.0.0" + } + }, + "node_modules/is-core-module": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-date-object": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-descriptor/node_modules/kind-of": { + "version": "5.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-directory": { + "version": "0.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-html": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "html-tags": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-obj": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-regex": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-symbols": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-resolvable": { + "version": "1.1.0", + "dev": true, + "license": "ISC" + }, + "node_modules/is-string": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-svg": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "html-comment-regex": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-symbol": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/is-url": { + "version": "1.2.4", + "dev": true, + "license": "MIT" + }, + "node_modules/is-windows": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "license": "ISC" + }, + "node_modules/isobject": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isstream": { + "version": "0.1.2", + "license": "MIT" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "license": "MIT" + }, + "node_modules/jsdom": { + "version": "14.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "abab": "^2.0.0", + "acorn": "^6.0.4", + "acorn-globals": "^4.3.0", + "array-equal": "^1.0.0", + "cssom": "^0.3.4", + "cssstyle": "^1.1.1", + "data-urls": "^1.1.0", + "domexception": "^1.0.1", + "escodegen": "^1.11.0", + "html-encoding-sniffer": "^1.0.2", + "nwsapi": "^2.1.3", + "parse5": "5.1.0", + "pn": "^1.1.0", + "request": "^2.88.0", + "request-promise-native": "^1.0.5", + "saxes": "^3.1.9", + "symbol-tree": "^3.2.2", + "tough-cookie": "^2.5.0", + "w3c-hr-time": "^1.0.1", + "w3c-xmlserializer": "^1.1.2", + "webidl-conversions": "^4.0.2", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^7.0.0", + "ws": "^6.1.2", + "xml-name-validator": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jsdom/node_modules/acorn": { + "version": "6.4.2", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/jsdom/node_modules/escodegen": { + "version": "1.14.3", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/jsdom/node_modules/levn": { + "version": "0.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/jsdom/node_modules/optionator": { + "version": "0.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/jsdom/node_modules/prelude-ls": { + "version": "1.1.2", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/jsdom/node_modules/type-check": { + "version": "0.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/jsdom/node_modules/ws": { + "version": "6.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "async-limiter": "~1.0.0" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema": { + "version": "0.2.3" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "license": "ISC" + }, + "node_modules/json5": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsprim": { + "version": "1.4.1", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "node_modules/jsx-ast-utils": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.2", + "object.assign": "^4.1.2" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/jszip": { + "version": "3.6.0", + "license": "(MIT OR GPL-3.0)", + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "set-immediate-shim": "~1.0.1" + } + }, + "node_modules/jszip/node_modules/pako": { + "version": "1.0.11", + "license": "(MIT AND Zlib)" + }, + "node_modules/juice": { + "version": "4.3.2", + "license": "MIT", + "dependencies": { + "cheerio": "^0.22.0", + "commander": "^2.15.1", + "cross-spawn": "^5.1.0", + "deep-extend": "^0.5.1", + "mensch": "^0.3.3", + "slick": "^1.12.2", + "web-resource-inliner": "^4.2.1" + }, + "bin": { + "juice": "bin/juice" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/juice/node_modules/cross-spawn": { + "version": "5.1.0", + "license": "MIT", + "dependencies": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "node_modules/juice/node_modules/lru-cache": { + "version": "4.1.5", + "license": "ISC", + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/juice/node_modules/shebang-command": { + "version": "1.2.0", + "license": "MIT", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/juice/node_modules/shebang-regex": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/juice/node_modules/which": { + "version": "1.3.1", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/juice/node_modules/yallist": { + "version": "2.1.2", + "license": "ISC" + }, + "node_modules/keymaster": { + "version": "1.6.2" + }, + "node_modules/kind-of": { + "version": "6.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/language-subtag-registry": { + "version": "0.3.21", + "dev": true, + "license": "ODC-By-1.0" + }, + "node_modules/language-tags": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "language-subtag-registry": "~0.3.2" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, + "node_modules/load-json-file": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/locate-path": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/lodash": { + "version": "4.17.20", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.assignin": { + "version": "4.2.0", + "license": "MIT" + }, + "node_modules/lodash.bind": { + "version": "4.2.1", + "license": "MIT" + }, + "node_modules/lodash.clone": { + "version": "4.5.0", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "license": "MIT" + }, + "node_modules/lodash.filter": { + "version": "4.6.0", + "license": "MIT" + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "license": "MIT" + }, + "node_modules/lodash.foreach": { + "version": "4.5.0", + "license": "MIT" + }, + "node_modules/lodash.map": { + "version": "4.6.0", + "license": "MIT" + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "license": "MIT" + }, + "node_modules/lodash.pick": { + "version": "4.4.0", + "license": "MIT" + }, + "node_modules/lodash.reduce": { + "version": "4.6.0", + "license": "MIT" + }, + "node_modules/lodash.reject": { + "version": "4.6.0", + "license": "MIT" + }, + "node_modules/lodash.some": { + "version": "4.6.0", + "license": "MIT" + }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.unescape": { + "version": "4.0.1", + "license": "MIT" + }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "dev": true, + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/magic-string": { + "version": "0.22.5", + "dev": true, + "license": "MIT", + "dependencies": { + "vlq": "^0.2.2" + } + }, + "node_modules/make-dir": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/make-dir/node_modules/pify": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "5.7.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-visit": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/md5.js": { + "version": "1.3.5", + "dev": true, + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/mdn-data": { + "version": "2.0.4", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/mensch": { + "version": "0.3.4", + "license": "MIT" + }, + "node_modules/merge-source-map": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "source-map": "^0.5.6" + } + }, + "node_modules/merge-source-map/node_modules/source-map": { + "version": "0.5.7", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "3.1.10", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/miller-rabin": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/miller-rabin/node_modules/bn.js": { + "version": "4.11.9", + "dev": true, + "license": "MIT" + }, + "node_modules/mime": { + "version": "1.6.0", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.45.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.28", + "license": "MIT", + "dependencies": { + "mime-db": "1.45.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimer": { + "version": "1.1.0", + "license": "MIT", + "bin": { + "mimer": "bin/mimer" + }, + "engines": { + "node": ">= 6.0" + } + }, + "node_modules/mimic-fn": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "dev": true, + "license": "ISC" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/minimatch": { + "version": "3.0.4", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "dev": true, + "license": "MIT" + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mjml-browser": { + "version": "4.8.1", + "license": "MIT" + }, + "node_modules/mkdirp": { + "version": "0.5.5", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/nan": { + "version": "2.14.2", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "dev": true, + "license": "MIT" + }, + "node_modules/nice-try": { + "version": "1.0.5", + "dev": true, + "license": "MIT" + }, + "node_modules/node-addon-api": { + "version": "1.7.2", + "dev": true, + "license": "MIT" + }, + "node_modules/node-forge": { + "version": "0.7.6", + "dev": true, + "license": "(BSD-3-Clause OR GPL-2.0)", + "engines": { + "node": "*" + } + }, + "node_modules/node-libs-browser": { + "version": "2.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.1", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "^1.0.1" + } + }, + "node_modules/node-libs-browser/node_modules/punycode": { + "version": "1.4.1", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "1.1.70", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-url": { + "version": "3.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/nth-check": { + "version": "1.0.2", + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "~1.0.0" + } + }, + "node_modules/nwsapi": { + "version": "2.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.9.0", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.assign": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.3", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1", + "has": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1", + "has": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.getownpropertydescriptors": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.values": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1", + "has": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/opn": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-wsl": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ora": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.3.1", + "cli-cursor": "^2.1.0", + "cli-spinners": "^1.1.0", + "log-symbols": "^2.2.0", + "strip-ansi": "^4.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ora/node_modules/ansi-regex": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ora/node_modules/strip-ansi": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/os-browserify": { + "version": "0.3.0", + "dev": true, + "license": "MIT" + }, + "node_modules/p-limit": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-locate": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-try": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/pako": { + "version": "0.2.9", + "dev": true, + "license": "MIT" + }, + "node_modules/parcel-bundler": { + "version": "1.12.4", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@babel/core": "^7.4.4", + "@babel/generator": "^7.4.4", + "@babel/parser": "^7.4.4", + "@babel/plugin-transform-flow-strip-types": "^7.4.4", + "@babel/plugin-transform-modules-commonjs": "^7.4.4", + "@babel/plugin-transform-react-jsx": "^7.0.0", + "@babel/preset-env": "^7.4.4", + "@babel/runtime": "^7.4.4", + "@babel/template": "^7.4.4", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4", + "@iarna/toml": "^2.2.0", + "@parcel/fs": "^1.11.0", + "@parcel/logger": "^1.11.1", + "@parcel/utils": "^1.11.0", + "@parcel/watcher": "^1.12.1", + "@parcel/workers": "^1.11.0", + "ansi-to-html": "^0.6.4", + "babylon-walk": "^1.0.2", + "browserslist": "^4.1.0", + "chalk": "^2.1.0", + "clone": "^2.1.1", + "command-exists": "^1.2.6", + "commander": "^2.11.0", + "core-js": "^2.6.5", + "cross-spawn": "^6.0.4", + "css-modules-loader-core": "^1.1.0", + "cssnano": "^4.0.0", + "deasync": "^0.1.14", + "dotenv": "^5.0.0", + "dotenv-expand": "^5.1.0", + "envinfo": "^7.3.1", + "fast-glob": "^2.2.2", + "filesize": "^3.6.0", + "get-port": "^3.2.0", + "htmlnano": "^0.2.2", + "is-glob": "^4.0.0", + "is-url": "^1.2.2", + "js-yaml": "^3.10.0", + "json5": "^1.0.1", + "micromatch": "^3.0.4", + "mkdirp": "^0.5.1", + "node-forge": "^0.7.1", + "node-libs-browser": "^2.0.0", + "opn": "^5.1.0", + "postcss": "^7.0.11", + "postcss-value-parser": "^3.3.1", + "posthtml": "^0.11.2", + "posthtml-parser": "^0.4.0", + "posthtml-render": "^1.1.3", + "resolve": "^1.4.0", + "semver": "^5.4.1", + "serialize-to-js": "^3.0.0", + "serve-static": "^1.12.4", + "source-map": "0.6.1", + "terser": "^3.7.3", + "v8-compile-cache": "^2.0.0", + "ws": "^5.1.1" + }, + "bin": { + "parcel": "bin/cli.js" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/parcel-bundler/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/parcel-bundler/node_modules/cross-spawn": { + "version": "6.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/parcel-bundler/node_modules/path-key": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/parcel-bundler/node_modules/semver": { + "version": "5.7.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/parcel-bundler/node_modules/shebang-command": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parcel-bundler/node_modules/shebang-regex": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parcel-bundler/node_modules/which": { + "version": "1.3.1", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-asn1": { + "version": "5.1.6", + "dev": true, + "license": "ISC", + "dependencies": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/parse-json": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "error-ex": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse5": { + "version": "5.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/parseurl": { + "version": "1.3.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-browserify": { + "version": "0.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/path-dirname": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/path-exists": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.6", + "dev": true, + "license": "MIT" + }, + "node_modules/path-type": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "pify": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pbkdf2": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "license": "MIT" + }, + "node_modules/physical-cpu-count": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.2.2", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pkg-dir": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pn": { + "version": "1.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss": { + "version": "7.0.35", + "license": "MIT", + "dependencies": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/postcss-calc": { + "version": "7.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss": "^7.0.27", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.2" + } + }, + "node_modules/postcss-calc/node_modules/postcss-value-parser": { + "version": "4.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/postcss-colormin": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.0.0", + "color": "^3.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-convert-values": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-discard-comments": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-discard-duplicates": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-discard-empty": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-discard-overridden": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-merge-longhand": { + "version": "4.0.11", + "dev": true, + "license": "MIT", + "dependencies": { + "css-color-names": "0.0.4", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "stylehacks": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-merge-rules": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.0.0", + "caniuse-api": "^3.0.0", + "cssnano-util-same-parent": "^4.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0", + "vendors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-merge-rules/node_modules/postcss-selector-parser": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/postcss-minify-font-values": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-minify-gradients": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cssnano-util-get-arguments": "^4.0.0", + "is-color-stop": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-minify-params": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "alphanum-sort": "^1.0.0", + "browserslist": "^4.0.0", + "cssnano-util-get-arguments": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "uniqs": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-minify-selectors": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "alphanum-sort": "^1.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-minify-selectors/node_modules/postcss-selector-parser": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/postcss-modules-extract-imports": { + "version": "1.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "postcss": "^6.0.1" + } + }, + "node_modules/postcss-modules-extract-imports/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-modules-extract-imports/node_modules/postcss": { + "version": "6.0.23", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/postcss-modules-local-by-default": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "css-selector-tokenizer": "^0.7.0", + "postcss": "^6.0.1" + } + }, + "node_modules/postcss-modules-local-by-default/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-modules-local-by-default/node_modules/postcss": { + "version": "6.0.23", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/postcss-modules-scope": { + "version": "1.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "css-selector-tokenizer": "^0.7.0", + "postcss": "^6.0.1" + } + }, + "node_modules/postcss-modules-scope/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-modules-scope/node_modules/postcss": { + "version": "6.0.23", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/postcss-modules-values": { + "version": "1.3.0", + "dev": true, + "license": "ISC", + "dependencies": { + "icss-replace-symbols": "^1.1.0", + "postcss": "^6.0.1" + } + }, + "node_modules/postcss-modules-values/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-modules-values/node_modules/postcss": { + "version": "6.0.23", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/postcss-normalize-charset": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-display-values": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-positions": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cssnano-util-get-arguments": "^4.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-repeat-style": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cssnano-util-get-arguments": "^4.0.0", + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-string": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-timing-functions": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-unicode": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-url": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-absolute-url": "^2.0.0", + "normalize-url": "^3.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-whitespace": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-ordered-values": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cssnano-util-get-arguments": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-reduce-initial": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.0.0", + "caniuse-api": "^3.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-reduce-transforms": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cssnano-util-get-match": "^4.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-svgo": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-svg": "^3.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "svgo": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-unique-selectors": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "alphanum-sort": "^1.0.0", + "postcss": "^7.0.0", + "uniqs": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-value-parser": { + "version": "3.3.1", + "dev": true, + "license": "MIT" + }, + "node_modules/postcss/node_modules/chalk": { + "version": "2.4.2", + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss/node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss/node_modules/supports-color": { + "version": "6.1.0", + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/posthtml": { + "version": "0.11.6", + "dev": true, + "license": "MIT", + "dependencies": { + "posthtml-parser": "^0.4.1", + "posthtml-render": "^1.1.5" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/posthtml-parser": { + "version": "0.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "htmlparser2": "^3.9.2" + } + }, + "node_modules/posthtml-render": { + "version": "1.4.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.2.1", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/process": { + "version": "0.11.10", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "license": "MIT" + }, + "node_modules/progress": { + "version": "2.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/promise-polyfill": { + "version": "8.2.0", + "license": "MIT" + }, + "node_modules/prop-types": { + "version": "15.7.2", + "dev": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "node_modules/pseudomap": { + "version": "1.0.2", + "license": "ISC" + }, + "node_modules/psl": { + "version": "1.8.0", + "license": "MIT" + }, + "node_modules/public-encrypt": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/public-encrypt/node_modules/bn.js": { + "version": "4.11.9", + "dev": true, + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.1.1", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/purgecss": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "commander": "^5.0.0", + "glob": "^7.0.0", + "postcss": "7.0.32", + "postcss-selector-parser": "^6.0.2" + }, + "bin": { + "purgecss": "bin/purgecss" + } + }, + "node_modules/purgecss/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/purgecss/node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/purgecss/node_modules/commander": { + "version": "5.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/purgecss/node_modules/postcss": { + "version": "7.0.32", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + }, + "node_modules/purgecss/node_modules/supports-color": { + "version": "6.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/q": { + "version": "1.5.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.0", + "teleport": ">=0.2.0" + } + }, + "node_modules/qs": { + "version": "6.5.2", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/querystring": { + "version": "0.2.0", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/querystring-es3": { + "version": "0.2.1", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/quote-stream": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-equal": "0.0.1", + "minimist": "^1.1.3", + "through2": "^2.0.0" + }, + "bin": { + "quote-stream": "bin/cmd.js" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/randomfill": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/react-is": { + "version": "16.13.1", + "dev": true, + "license": "MIT" + }, + "node_modules/read-pkg": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "2.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/regenerate": { + "version": "1.4.2", + "dev": true, + "license": "MIT" + }, + "node_modules/regenerate-unicode-properties": { + "version": "8.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerate": "^1.4.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.13.7", + "dev": true, + "license": "MIT" + }, + "node_modules/regenerator-transform": { + "version": "0.14.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.3.1", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexpp": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/regexpu-core": { + "version": "4.7.1", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.5.2", + "dev": true, + "license": "MIT" + }, + "node_modules/regjsparser": { + "version": "0.6.7", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/relateurl": { + "version": "0.2.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "dev": true, + "license": "ISC" + }, + "node_modules/repeat-element": { + "version": "1.1.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/request": { + "version": "2.88.2", + "license": "Apache-2.0", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request-promise-core": { + "version": "1.1.4", + "dev": true, + "license": "ISC", + "dependencies": { + "lodash": "^4.17.19" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, + "node_modules/request-promise-native": { + "version": "1.0.9", + "dev": true, + "license": "ISC", + "dependencies": { + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + }, + "engines": { + "node": ">=0.12.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.20.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "dev": true, + "license": "MIT" + }, + "node_modules/restore-cursor": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ret": { + "version": "0.1.15", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12" + } + }, + "node_modules/rgb-regex": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/rgba-regex": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/rimraf": { + "version": "3.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "license": "MIT" + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/sax": { + "version": "1.2.4", + "dev": true, + "license": "ISC" + }, + "node_modules/saxes": { + "version": "3.1.11", + "dev": true, + "license": "ISC", + "dependencies": { + "xmlchars": "^2.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/semver": { + "version": "7.3.4", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.17.1", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.1", + "dev": true, + "license": "MIT" + }, + "node_modules/serialize-to-js": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/serve-static": { + "version": "1.14.1", + "dev": true, + "license": "MIT", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-immediate-shim": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/extend-shallow": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "dev": true, + "license": "MIT" + }, + "node_modules/setprototypeof": { + "version": "1.1.1", + "dev": true, + "license": "ISC" + }, + "node_modules/sha.js": { + "version": "2.4.11", + "dev": true, + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shallow-copy": { + "version": "0.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.3", + "dev": true, + "license": "ISC" + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/simple-swizzle/node_modules/is-arrayish": { + "version": "0.3.2", + "dev": true, + "license": "MIT" + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/slick": { + "version": "1.12.2", + "license": "MIT (http://mootools.net/license.txt)", + "engines": { + "node": "*" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "dev": true, + "license": "MIT", + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-descriptor": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/debug": { + "version": "2.6.9", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/extend-shallow": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/snapdragon/node_modules/source-map": { + "version": "0.5.7", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "dev": true, + "license": "MIT", + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.19", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "dev": true, + "license": "MIT" + }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.7", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/spectrum-colorpicker": { + "version": "1.8.1", + "license": "MIT" + }, + "node_modules/split-string": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/srcset": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/sshpk": { + "version": "1.16.1", + "license": "MIT", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stable": { + "version": "0.1.8", + "dev": true, + "license": "MIT" + }, + "node_modules/static-eval": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "escodegen": "^1.11.1" + } + }, + "node_modules/static-eval/node_modules/escodegen": { + "version": "1.14.3", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/static-eval/node_modules/levn": { + "version": "0.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/static-eval/node_modules/optionator": { + "version": "0.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/static-eval/node_modules/prelude-ls": { + "version": "1.1.2", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/static-eval/node_modules/type-check": { + "version": "0.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/static-extend": { + "version": "0.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-module": { + "version": "2.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "concat-stream": "~1.6.0", + "convert-source-map": "^1.5.1", + "duplexer2": "~0.1.4", + "escodegen": "~1.9.0", + "falafel": "^2.1.0", + "has": "^1.0.1", + "magic-string": "^0.22.4", + "merge-source-map": "1.0.4", + "object-inspect": "~1.4.0", + "quote-stream": "~1.0.2", + "readable-stream": "~2.3.3", + "shallow-copy": "~0.0.1", + "static-eval": "^2.0.0", + "through2": "~2.0.3" + } + }, + "node_modules/static-module/node_modules/object-inspect": { + "version": "1.4.1", + "dev": true, + "license": "MIT" + }, + "node_modules/statuses": { + "version": "1.5.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/stealthy-require": { + "version": "1.1.1", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stream-browserify": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "node_modules/stream-http": { + "version": "2.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.matchall": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1", + "has-symbols": "^1.0.1", + "internal-slot": "^1.0.2", + "regexp.prototype.flags": "^1.3.0", + "side-channel": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stylehacks": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/stylehacks/node_modules/postcss-selector-parser": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/svgo": { + "version": "1.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.4.1", + "coa": "^2.0.2", + "css-select": "^2.0.0", + "css-select-base-adapter": "^0.1.1", + "css-tree": "1.0.0-alpha.37", + "csso": "^4.0.2", + "js-yaml": "^3.13.1", + "mkdirp": "~0.5.1", + "object.values": "^1.1.0", + "sax": "~1.2.4", + "stable": "^0.1.8", + "unquote": "~1.1.1", + "util.promisify": "~1.0.0" + }, + "bin": { + "svgo": "bin/svgo" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/svgo/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "dev": true, + "license": "MIT" + }, + "node_modules/table": { + "version": "6.0.7", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "7.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/terser": { + "version": "3.17.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "commander": "^2.19.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.10" + }, + "bin": { + "terser": "bin/uglifyjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/through2": { + "version": "2.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/timers-browserify": { + "version": "2.0.12", + "dev": true, + "license": "MIT", + "dependencies": { + "setimmediate": "^1.0.4" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/timsort": { + "version": "0.3.0", + "dev": true, + "license": "MIT" + }, + "node_modules/tiny-inflate": { + "version": "1.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/to-arraybuffer": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tr46": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.9.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tty-browserify": { + "version": "0.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "license": "Unlicense" + }, + "node_modules/type-check": { + "version": "0.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.8.1", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "dev": true, + "license": "MIT" + }, + "node_modules/uncss": { + "version": "0.17.3", + "dev": true, + "license": "MIT", + "dependencies": { + "commander": "^2.20.0", + "glob": "^7.1.4", + "is-absolute-url": "^3.0.1", + "is-html": "^1.1.0", + "jsdom": "^14.1.0", + "lodash": "^4.17.15", + "postcss": "^7.0.17", + "postcss-selector-parser": "6.0.2", + "request": "^2.88.0" + }, + "bin": { + "uncss": "bin/uncss" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/uncss/node_modules/is-absolute-url": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/uncss/node_modules/postcss-selector-parser": { + "version": "6.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/underscore": { + "version": "1.12.0", + "license": "MIT" + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-trie": { + "version": "0.3.1", + "dev": true, + "license": "MIT", + "dependencies": { + "pako": "^0.2.5", + "tiny-inflate": "^1.0.0" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/uniq": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/uniqs": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/unquote": { + "version": "1.1.1", + "dev": true, + "license": "MIT" + }, + "node_modules/unset-value": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "dev": true, + "license": "MIT", + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/upath": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4", + "yarn": "*" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/url": { + "version": "0.11.0", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "dev": true, + "license": "MIT" + }, + "node_modules/use": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util": { + "version": "0.11.1", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "2.0.3" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/util.promisify": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.2", + "has-symbols": "^1.0.1", + "object.getownpropertydescriptors": "^2.1.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/util.promisify/node_modules/es-abstract": { + "version": "1.17.7", + "dev": true, + "license": "MIT", + "dependencies": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/util/node_modules/inherits": { + "version": "2.0.3", + "dev": true, + "license": "ISC" + }, + "node_modules/uuid": { + "version": "3.4.0", + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/v8-compile-cache": { + "version": "2.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/valid-data-url": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/vendors": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/vlq": { + "version": "0.2.3", + "dev": true, + "license": "MIT" + }, + "node_modules/vm-browserify": { + "version": "1.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/w3c-hr-time": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "browser-process-hrtime": "^1.0.0" + } + }, + "node_modules/w3c-xmlserializer": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "domexception": "^1.0.1", + "webidl-conversions": "^4.0.2", + "xml-name-validator": "^3.0.0" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/web-resource-inliner": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "async": "^3.1.0", + "chalk": "^2.4.2", + "datauri": "^2.0.0", + "htmlparser2": "^4.0.0", + "lodash.unescape": "^4.0.1", + "request": "^2.88.0", + "safer-buffer": "^2.1.2", + "valid-data-url": "^2.0.0", + "xtend": "^4.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/web-resource-inliner/node_modules/chalk": { + "version": "2.4.2", + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/web-resource-inliner/node_modules/dom-serializer": { + "version": "1.2.0", + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/web-resource-inliner/node_modules/dom-serializer/node_modules/domhandler": { + "version": "4.0.0", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.1.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/web-resource-inliner/node_modules/domelementtype": { + "version": "2.1.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/web-resource-inliner/node_modules/domhandler": { + "version": "3.3.0", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.0.1" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/web-resource-inliner/node_modules/domutils": { + "version": "2.4.4", + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/web-resource-inliner/node_modules/domutils/node_modules/domhandler": { + "version": "4.0.0", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.1.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/web-resource-inliner/node_modules/entities": { + "version": "2.2.0", + "license": "BSD-2-Clause", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/web-resource-inliner/node_modules/htmlparser2": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^3.0.0", + "domutils": "^2.0.0", + "entities": "^2.0.0" + } + }, + "node_modules/webidl-conversions": { + "version": "4.0.2", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-encoding": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "iconv-lite": "0.4.24" + } + }, + "node_modules/whatwg-mimetype": { + "version": "2.3.0", + "dev": true, + "license": "MIT" + }, + "node_modules/whatwg-url": { + "version": "7.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "node_modules/which": { + "version": "2.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "license": "ISC" + }, + "node_modules/ws": { + "version": "5.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "async-limiter": "~1.0.0" + } + }, + "node_modules/xml-name-validator": { + "version": "3.0.0", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/xtend": { + "version": "4.0.2", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "license": "ISC" + } + }, + "dependencies": { + "@babel/cli": { + "version": "7.12.16", + "dev": true, + "requires": { + "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents", + "chokidar": "^3.4.0", + "commander": "^4.0.1", + "convert-source-map": "^1.1.0", + "fs-readdir-recursive": "^1.1.0", + "glob": "^7.0.0", + "lodash": "^4.17.19", + "make-dir": "^2.1.0", + "slash": "^2.0.0", + "source-map": "^0.5.0" + }, + "dependencies": { + "anymatch": { + "version": "3.1.1", + "dev": true, + "optional": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.2.0", + "dev": true, + "optional": true + }, + "braces": { + "version": "3.0.2", + "dev": true, + "optional": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "chokidar": { + "version": "3.5.1", + "dev": true, + "optional": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.3.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + } + }, + "commander": { + "version": "4.1.1", + "dev": true + }, + "fill-range": { + "version": "7.0.1", + "dev": true, + "optional": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.3.2", + "dev": true, + "optional": true + }, + "is-binary-path": { + "version": "2.1.0", + "dev": true, + "optional": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-number": { + "version": "7.0.0", + "dev": true, + "optional": true + }, + "readdirp": { + "version": "3.5.0", + "dev": true, + "optional": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "slash": { + "version": "2.0.0", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "dev": true, + "optional": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "@babel/code-frame": { + "version": "7.12.11", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/compat-data": { + "version": "7.12.13", + "dev": true + }, + "@babel/core": { + "version": "7.12.16", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.12.15", + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helpers": "^7.12.13", + "@babel/parser": "^7.12.16", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/highlight": "^7.12.13" + } + }, + "json5": { + "version": "2.2.0", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "semver": { + "version": "5.7.1", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.12.15", + "dev": true, + "requires": { + "@babel/types": "^7.12.13", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "dev": true + } + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.12.16", + "dev": true, + "requires": { + "@babel/compat-data": "^7.12.13", + "@babel/helper-validator-option": "^7.12.16", + "browserslist": "^4.14.5", + "semver": "^5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "dev": true + } + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.12.16", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-member-expression-to-functions": "^7.12.16", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/helper-replace-supers": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.12.16", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.12.13", + "regexpu-core": "^4.7.1" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-function-name": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.12.16", + "dev": true, + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-module-imports": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-module-transforms": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-replace-supers": "^7.12.13", + "@babel/helper-simple-access": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/helper-validator-identifier": "^7.12.11", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13", + "lodash": "^4.17.19" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.12.13", + "dev": true + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-wrap-function": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-replace-supers": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.12.13", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-simple-access": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.12.1", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.12.16", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "@babel/helpers": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "@babel/highlight": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + } + } + }, + "@babel/parser": { + "version": "7.12.16", + "dev": true + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-remap-async-to-generator": "^7.12.13", + "@babel/plugin-syntax-async-generators": "^7.8.0" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.12.16", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-dynamic-import": "^7.8.0" + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-json-strings": "^7.8.0" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-transform-parameters": "^7.12.13" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.12.16", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", + "@babel/plugin-syntax-optional-chaining": "^7.8.0" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-flow": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-jsx": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-remap-async-to-generator": "^7.12.13" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-replace-supers": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "globals": "^11.1.0" + }, + "dependencies": { + "globals": { + "version": "11.12.0", + "dev": true + } + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-flow-strip-types": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-flow": "^7.12.13" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-simple-access": "^7.12.13", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.12.13", + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-validator-identifier": "^7.12.11", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.12.13" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-replace-supers": "^7.12.13" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-react-jsx": { + "version": "7.12.16", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-jsx": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.12.13", + "dev": true, + "requires": { + "regenerator-transform": "^0.14.2" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-runtime": { + "version": "7.12.15", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "semver": "^5.5.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "dev": true + } + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/preset-env": { + "version": "7.12.16", + "dev": true, + "requires": { + "@babel/compat-data": "^7.12.13", + "@babel/helper-compilation-targets": "^7.12.16", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-validator-option": "^7.12.16", + "@babel/plugin-proposal-async-generator-functions": "^7.12.13", + "@babel/plugin-proposal-class-properties": "^7.12.13", + "@babel/plugin-proposal-dynamic-import": "^7.12.16", + "@babel/plugin-proposal-export-namespace-from": "^7.12.13", + "@babel/plugin-proposal-json-strings": "^7.12.13", + "@babel/plugin-proposal-logical-assignment-operators": "^7.12.13", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.13", + "@babel/plugin-proposal-numeric-separator": "^7.12.13", + "@babel/plugin-proposal-object-rest-spread": "^7.12.13", + "@babel/plugin-proposal-optional-catch-binding": "^7.12.13", + "@babel/plugin-proposal-optional-chaining": "^7.12.16", + "@babel/plugin-proposal-private-methods": "^7.12.13", + "@babel/plugin-proposal-unicode-property-regex": "^7.12.13", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.12.13", + "@babel/plugin-transform-arrow-functions": "^7.12.13", + "@babel/plugin-transform-async-to-generator": "^7.12.13", + "@babel/plugin-transform-block-scoped-functions": "^7.12.13", + "@babel/plugin-transform-block-scoping": "^7.12.13", + "@babel/plugin-transform-classes": "^7.12.13", + "@babel/plugin-transform-computed-properties": "^7.12.13", + "@babel/plugin-transform-destructuring": "^7.12.13", + "@babel/plugin-transform-dotall-regex": "^7.12.13", + "@babel/plugin-transform-duplicate-keys": "^7.12.13", + "@babel/plugin-transform-exponentiation-operator": "^7.12.13", + "@babel/plugin-transform-for-of": "^7.12.13", + "@babel/plugin-transform-function-name": "^7.12.13", + "@babel/plugin-transform-literals": "^7.12.13", + "@babel/plugin-transform-member-expression-literals": "^7.12.13", + "@babel/plugin-transform-modules-amd": "^7.12.13", + "@babel/plugin-transform-modules-commonjs": "^7.12.13", + "@babel/plugin-transform-modules-systemjs": "^7.12.13", + "@babel/plugin-transform-modules-umd": "^7.12.13", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.13", + "@babel/plugin-transform-new-target": "^7.12.13", + "@babel/plugin-transform-object-super": "^7.12.13", + "@babel/plugin-transform-parameters": "^7.12.13", + "@babel/plugin-transform-property-literals": "^7.12.13", + "@babel/plugin-transform-regenerator": "^7.12.13", + "@babel/plugin-transform-reserved-words": "^7.12.13", + "@babel/plugin-transform-shorthand-properties": "^7.12.13", + "@babel/plugin-transform-spread": "^7.12.13", + "@babel/plugin-transform-sticky-regex": "^7.12.13", + "@babel/plugin-transform-template-literals": "^7.12.13", + "@babel/plugin-transform-typeof-symbol": "^7.12.13", + "@babel/plugin-transform-unicode-escapes": "^7.12.13", + "@babel/plugin-transform-unicode-regex": "^7.12.13", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.12.13", + "core-js-compat": "^3.8.0", + "semver": "^5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "dev": true + } + } + }, + "@babel/preset-modules": { + "version": "0.1.4", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/runtime": { + "version": "7.12.13", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/runtime-corejs3": { + "version": "7.12.13", + "dev": true, + "requires": { + "core-js-pure": "^3.0.0", + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/highlight": "^7.12.13" + } + } + } + }, + "@babel/traverse": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.12.13", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/highlight": "^7.12.13" + } + }, + "globals": { + "version": "11.12.0", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.12.13", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "@eslint/eslintrc": { + "version": "0.3.0", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "lodash": "^4.17.20", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + } + }, + "@iarna/toml": { + "version": "2.2.5", + "dev": true + }, + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "dev": true, + "requires": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + } + }, + "@nicolo-ribaudo/chokidar-2": { + "version": "2.1.8-no-fsevents", + "dev": true, + "optional": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "dependencies": { + "glob-parent": { + "version": "3.1.0", + "dev": true, + "optional": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + } + } + }, + "@nodelib/fs.stat": { + "version": "1.1.3", + "dev": true + }, + "@parcel/fs": { + "version": "1.11.0", + "dev": true, + "requires": { + "@parcel/utils": "^1.11.0", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.2" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "@parcel/logger": { + "version": "1.11.1", + "dev": true, + "requires": { + "@parcel/workers": "^1.11.0", + "chalk": "^2.1.0", + "grapheme-breaker": "^0.3.2", + "ora": "^2.1.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "@parcel/utils": { + "version": "1.11.0", + "dev": true + }, + "@parcel/watcher": { + "version": "1.12.1", + "dev": true, + "requires": { + "@parcel/utils": "^1.11.0", + "chokidar": "^2.1.5" + } + }, + "@parcel/workers": { + "version": "1.11.0", + "dev": true, + "requires": { + "@parcel/utils": "^1.11.0", + "physical-cpu-count": "^2.0.0" + } + }, + "@types/json5": { + "version": "0.0.29", + "dev": true + }, + "@types/q": { + "version": "1.5.4", + "dev": true + }, + "abab": { + "version": "2.0.5", + "dev": true + }, + "acorn": { + "version": "7.4.1", + "dev": true + }, + "acorn-globals": { + "version": "4.3.4", + "dev": true, + "requires": { + "acorn": "^6.0.1", + "acorn-walk": "^6.0.1" + }, + "dependencies": { + "acorn": { + "version": "6.4.2", + "dev": true + } + } + }, + "acorn-jsx": { + "version": "5.3.1", + "dev": true, + "requires": {} + }, + "acorn-walk": { + "version": "6.2.0", + "dev": true + }, + "ajv": { + "version": "6.12.6", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "alphanum-sort": { + "version": "1.0.2", + "dev": true + }, + "ansi-colors": { + "version": "4.1.1", + "dev": true + }, + "ansi-regex": { + "version": "5.0.0", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "requires": { + "color-convert": "^1.9.0" + } + }, + "ansi-to-html": { + "version": "0.6.14", + "dev": true, + "requires": { + "entities": "^1.1.2" + } + }, + "anymatch": { + "version": "2.0.0", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "argparse": { + "version": "1.0.10", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "aria-query": { + "version": "4.2.2", + "dev": true, + "requires": { + "@babel/runtime": "^7.10.2", + "@babel/runtime-corejs3": "^7.10.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "dev": true + }, + "array-equal": { + "version": "1.0.0", + "dev": true + }, + "array-includes": { + "version": "3.1.2", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1", + "get-intrinsic": "^1.0.1", + "is-string": "^1.0.5" + } + }, + "array-unique": { + "version": "0.3.2", + "dev": true + }, + "array.prototype.flat": { + "version": "1.2.4", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" + } + }, + "array.prototype.flatmap": { + "version": "1.2.4", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1", + "function-bind": "^1.1.1" + } + }, + "asn1": { + "version": "0.2.4", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "5.4.1", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "dev": true + } + } + }, + "assert": { + "version": "1.5.0", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "dev": true + }, + "util": { + "version": "0.10.3", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assert-plus": { + "version": "1.0.0" + }, + "assign-symbols": { + "version": "1.0.0", + "dev": true + }, + "ast-types-flow": { + "version": "0.0.7", + "dev": true + }, + "astral-regex": { + "version": "2.0.0", + "dev": true + }, + "async": { + "version": "3.2.0" + }, + "async-each": { + "version": "1.0.3", + "dev": true + }, + "async-limiter": { + "version": "1.0.1", + "dev": true + }, + "asynckit": { + "version": "0.4.0" + }, + "atob": { + "version": "2.1.2", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0" + }, + "aws4": { + "version": "1.11.0" + }, + "axe-core": { + "version": "4.1.2", + "dev": true + }, + "axobject-query": { + "version": "2.2.0", + "dev": true + }, + "babel-eslint": { + "version": "10.1.0", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0", + "eslint-visitor-keys": "^1.0.0", + "resolve": "^1.12.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "dev": true + } + } + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, + "babel-runtime": { + "version": "6.26.0", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.11.1", + "dev": true + } + } + }, + "babel-types": { + "version": "6.26.0", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + }, + "dependencies": { + "to-fast-properties": { + "version": "1.0.3", + "dev": true + } + } + }, + "babylon-walk": { + "version": "1.0.2", + "dev": true, + "requires": { + "babel-runtime": "^6.11.6", + "babel-types": "^6.15.0", + "lodash.clone": "^4.5.0" + } + }, + "backbone": { + "version": "1.3.3", + "requires": { + "underscore": ">=1.8.3" + } + }, + "backbone-undo": { + "version": "0.2.5", + "requires": { + "backbone": "1.0.0 - 1.2.1", + "underscore": "1.4.4 - 1.8.3" + }, + "dependencies": { + "backbone": { + "version": "1.2.1", + "requires": { + "underscore": ">=1.7.0" + } + }, + "underscore": { + "version": "1.8.3" + } + } + }, + "balanced-match": { + "version": "1.0.0", + "dev": true + }, + "base": { + "version": "0.11.2", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.5.1", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "binary-extensions": { + "version": "1.13.1", + "dev": true + }, + "bindings": { + "version": "1.5.0", + "dev": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bn.js": { + "version": "5.1.3", + "dev": true + }, + "boolbase": { + "version": "1.0.0" + }, + "brace-expansion": { + "version": "1.1.11", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brfs": { + "version": "1.6.1", + "dev": true, + "requires": { + "quote-stream": "^1.0.1", + "resolve": "^1.1.5", + "static-module": "^2.2.0", + "through2": "^2.0.0" + } + }, + "brorand": { + "version": "1.1.0", + "dev": true + }, + "browser-process-hrtime": { + "version": "1.0.0", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.1.0", + "dev": true, + "requires": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.2.1", + "dev": true, + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "dev": true + } + } + }, + "browserify-zlib": { + "version": "0.2.0", + "dev": true, + "requires": { + "pako": "~1.0.5" + }, + "dependencies": { + "pako": { + "version": "1.0.11", + "dev": true + } + } + }, + "browserslist": { + "version": "4.16.3", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001181", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.649", + "escalade": "^3.1.1", + "node-releases": "^1.1.70" + } + }, + "buffer": { + "version": "4.9.2", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-equal": { + "version": "0.0.1", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "call-bind": { + "version": "1.0.2", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "call-me-maybe": { + "version": "1.0.1", + "dev": true + }, + "caller-callsite": { + "version": "2.0.0", + "dev": true, + "requires": { + "callsites": "^2.0.0" + }, + "dependencies": { + "callsites": { + "version": "2.0.0", + "dev": true + } + } + }, + "caller-path": { + "version": "2.0.0", + "dev": true, + "requires": { + "caller-callsite": "^2.0.0" + } + }, + "callsites": { + "version": "3.1.0", + "dev": true + }, + "caniuse-api": { + "version": "3.0.0", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "caniuse-lite": { + "version": "1.0.30001187", + "dev": true + }, + "caseless": { + "version": "0.12.0" + }, + "cash-dom": { + "version": "2.3.9" + }, + "chalk": { + "version": "4.1.0", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "cheerio": { + "version": "0.22.0", + "requires": { + "css-select": "~1.2.0", + "dom-serializer": "~0.1.0", + "entities": "~1.1.1", + "htmlparser2": "^3.9.1", + "lodash.assignin": "^4.0.9", + "lodash.bind": "^4.1.4", + "lodash.defaults": "^4.0.1", + "lodash.filter": "^4.4.0", + "lodash.flatten": "^4.2.0", + "lodash.foreach": "^4.3.0", + "lodash.map": "^4.4.0", + "lodash.merge": "^4.4.0", + "lodash.pick": "^4.2.1", + "lodash.reduce": "^4.4.0", + "lodash.reject": "^4.4.0", + "lodash.some": "^4.4.0" + }, + "dependencies": { + "css-select": { + "version": "1.2.0", + "requires": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "css-what": { + "version": "2.1.3" + }, + "dom-serializer": { + "version": "0.1.1", + "requires": { + "domelementtype": "^1.3.0", + "entities": "^1.1.1" + } + }, + "domutils": { + "version": "1.5.1", + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + } + } + }, + "chokidar": { + "version": "2.1.8", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "dependencies": { + "glob-parent": { + "version": "3.1.0", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + } + } + }, + "cipher-base": { + "version": "1.0.4", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-utils": { + "version": "0.3.6", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cli-cursor": { + "version": "2.1.0", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-spinners": { + "version": "1.3.1", + "dev": true + }, + "clone": { + "version": "2.1.2", + "dev": true + }, + "coa": { + "version": "2.0.2", + "dev": true, + "requires": { + "@types/q": "^1.5.1", + "chalk": "^2.4.1", + "q": "^1.1.2" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + } + } + }, + "codemirror": { + "version": "5.59.2" + }, + "codemirror-formatting": { + "version": "1.0.0" + }, + "collection-visit": { + "version": "1.0.0", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color": { + "version": "3.1.3", + "dev": true, + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.4" + } + }, + "color-convert": { + "version": "1.9.3", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3" + }, + "color-string": { + "version": "1.5.4", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "colorette": { + "version": "1.2.1", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "command-exists": { + "version": "1.2.9", + "dev": true + }, + "commander": { + "version": "2.20.3" + }, + "component-emitter": { + "version": "1.3.0", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "confusing-browser-globals": { + "version": "1.0.10", + "dev": true + }, + "console-browserify": { + "version": "1.2.0", + "dev": true + }, + "constants-browserify": { + "version": "1.0.0", + "dev": true + }, + "contains-path": { + "version": "0.1.0", + "dev": true + }, + "convert-source-map": { + "version": "1.7.0", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "dev": true + }, + "core-js": { + "version": "2.6.12", + "dev": true + }, + "core-js-compat": { + "version": "3.8.3", + "dev": true, + "requires": { + "browserslist": "^4.16.1", + "semver": "7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "dev": true + } + } + }, + "core-js-pure": { + "version": "3.8.3", + "dev": true + }, + "core-util-is": { + "version": "1.0.2" + }, + "cosmiconfig": { + "version": "5.2.1", + "dev": true, + "requires": { + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" + }, + "dependencies": { + "import-fresh": { + "version": "2.0.0", + "dev": true, + "requires": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "resolve-from": { + "version": "3.0.0", + "dev": true + } + } + }, + "create-ecdh": { + "version": "4.0.4", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "dev": true + } + } + }, + "create-hash": { + "version": "1.2.0", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "7.0.3", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "css-color-names": { + "version": "0.0.4", + "dev": true + }, + "css-declaration-sorter": { + "version": "4.0.1", + "dev": true, + "requires": { + "postcss": "^7.0.1", + "timsort": "^0.3.0" + } + }, + "css-modules-loader-core": { + "version": "1.1.0", + "dev": true, + "requires": { + "icss-replace-symbols": "1.1.0", + "postcss": "6.0.1", + "postcss-modules-extract-imports": "1.1.0", + "postcss-modules-local-by-default": "1.2.0", + "postcss-modules-scope": "1.1.0", + "postcss-modules-values": "1.3.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "dev": true + } + } + }, + "has-flag": { + "version": "1.0.0", + "dev": true + }, + "postcss": { + "version": "6.0.1", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "source-map": "^0.5.6", + "supports-color": "^3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "3.2.3", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "css-select": { + "version": "2.1.0", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^3.2.1", + "domutils": "^1.7.0", + "nth-check": "^1.0.2" + } + }, + "css-select-base-adapter": { + "version": "0.1.1", + "dev": true + }, + "css-selector-tokenizer": { + "version": "0.7.3", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "fastparse": "^1.1.2" + } + }, + "css-tree": { + "version": "1.0.0-alpha.37", + "dev": true, + "requires": { + "mdn-data": "2.0.4", + "source-map": "^0.6.1" + } + }, + "css-what": { + "version": "3.4.2", + "dev": true + }, + "cssesc": { + "version": "3.0.0", + "dev": true + }, + "cssnano": { + "version": "4.1.10", + "dev": true, + "requires": { + "cosmiconfig": "^5.0.0", + "cssnano-preset-default": "^4.0.7", + "is-resolvable": "^1.0.0", + "postcss": "^7.0.0" + } + }, + "cssnano-preset-default": { + "version": "4.0.7", + "dev": true, + "requires": { + "css-declaration-sorter": "^4.0.1", + "cssnano-util-raw-cache": "^4.0.1", + "postcss": "^7.0.0", + "postcss-calc": "^7.0.1", + "postcss-colormin": "^4.0.3", + "postcss-convert-values": "^4.0.1", + "postcss-discard-comments": "^4.0.2", + "postcss-discard-duplicates": "^4.0.2", + "postcss-discard-empty": "^4.0.1", + "postcss-discard-overridden": "^4.0.1", + "postcss-merge-longhand": "^4.0.11", + "postcss-merge-rules": "^4.0.3", + "postcss-minify-font-values": "^4.0.2", + "postcss-minify-gradients": "^4.0.2", + "postcss-minify-params": "^4.0.2", + "postcss-minify-selectors": "^4.0.2", + "postcss-normalize-charset": "^4.0.1", + "postcss-normalize-display-values": "^4.0.2", + "postcss-normalize-positions": "^4.0.2", + "postcss-normalize-repeat-style": "^4.0.2", + "postcss-normalize-string": "^4.0.2", + "postcss-normalize-timing-functions": "^4.0.2", + "postcss-normalize-unicode": "^4.0.1", + "postcss-normalize-url": "^4.0.1", + "postcss-normalize-whitespace": "^4.0.2", + "postcss-ordered-values": "^4.1.2", + "postcss-reduce-initial": "^4.0.3", + "postcss-reduce-transforms": "^4.0.2", + "postcss-svgo": "^4.0.2", + "postcss-unique-selectors": "^4.0.1" + } + }, + "cssnano-util-get-arguments": { + "version": "4.0.0", + "dev": true + }, + "cssnano-util-get-match": { + "version": "4.0.0", + "dev": true + }, + "cssnano-util-raw-cache": { + "version": "4.0.1", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "cssnano-util-same-parent": { + "version": "4.0.1", + "dev": true + }, + "csso": { + "version": "4.2.0", + "dev": true, + "requires": { + "css-tree": "^1.1.2" + }, + "dependencies": { + "css-tree": { + "version": "1.1.2", + "dev": true, + "requires": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + } + }, + "mdn-data": { + "version": "2.0.14", + "dev": true + } + } + }, + "cssom": { + "version": "0.3.8", + "dev": true + }, + "cssstyle": { + "version": "1.4.0", + "dev": true, + "requires": { + "cssom": "0.3.x" + } + }, + "damerau-levenshtein": { + "version": "1.0.6", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "data-urls": { + "version": "1.1.0", + "dev": true, + "requires": { + "abab": "^2.0.0", + "whatwg-mimetype": "^2.2.0", + "whatwg-url": "^7.0.0" + } + }, + "datauri": { + "version": "2.0.0", + "requires": { + "image-size": "^0.7.3", + "mimer": "^1.0.0" + } + }, + "deasync": { + "version": "0.1.21", + "dev": true, + "requires": { + "bindings": "^1.5.0", + "node-addon-api": "^1.7.1" + } + }, + "debug": { + "version": "4.3.1", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "decode-uri-component": { + "version": "0.2.0", + "dev": true + }, + "deep-extend": { + "version": "0.5.1" + }, + "deep-is": { + "version": "0.1.3", + "dev": true + }, + "defaults": { + "version": "1.0.3", + "dev": true, + "requires": { + "clone": "^1.0.2" + }, + "dependencies": { + "clone": { + "version": "1.0.4", + "dev": true + } + } + }, + "define-properties": { + "version": "1.1.3", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0" + }, + "depd": { + "version": "1.1.2", + "dev": true + }, + "des.js": { + "version": "1.0.1", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "dev": true + } + } + }, + "doctrine": { + "version": "3.0.0", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "dom-serializer": { + "version": "0.2.2", + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.1.0" + }, + "entities": { + "version": "2.2.0" + } + } + }, + "domain-browser": { + "version": "1.2.0", + "dev": true + }, + "domelementtype": { + "version": "1.3.1" + }, + "domexception": { + "version": "1.0.1", + "dev": true, + "requires": { + "webidl-conversions": "^4.0.2" + } + }, + "domhandler": { + "version": "2.4.2", + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.7.0", + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "dot-prop": { + "version": "5.3.0", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + }, + "dotenv": { + "version": "5.0.1", + "dev": true + }, + "dotenv-expand": { + "version": "5.1.0", + "dev": true + }, + "duplexer2": { + "version": "0.1.4", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.664", + "dev": true + }, + "elliptic": { + "version": "6.5.4", + "dev": true, + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "dev": true + } + } + }, + "emoji-regex": { + "version": "8.0.0", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "dev": true + }, + "enquirer": { + "version": "2.3.6", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "entities": { + "version": "1.1.2" + }, + "envinfo": { + "version": "7.7.4", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.18.0-next.2", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.1", + "object-inspect": "^1.9.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.3", + "string.prototype.trimstart": "^1.0.3" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escalade": { + "version": "3.1.1", + "dev": true + }, + "escape-html": { + "version": "1.0.3", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5" + }, + "escodegen": { + "version": "1.9.1", + "dev": true, + "requires": { + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "dev": true + }, + "levn": { + "version": "0.3.0", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "optionator": { + "version": "0.8.3", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "prelude-ls": { + "version": "1.1.2", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + } + } + }, + "eslint": { + "version": "7.20.0", + "dev": true, + "requires": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.3.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "file-entry-cache": "^6.0.0", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.20", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + } + }, + "eslint-config-airbnb": { + "version": "18.2.1", + "dev": true, + "requires": { + "eslint-config-airbnb-base": "^14.2.1", + "object.assign": "^4.1.2", + "object.entries": "^1.1.2" + } + }, + "eslint-config-airbnb-base": { + "version": "14.2.1", + "dev": true, + "requires": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.2" + } + }, + "eslint-config-prettier": { + "version": "7.2.0", + "dev": true, + "requires": {} + }, + "eslint-import-resolver-node": { + "version": "0.3.4", + "dev": true, + "requires": { + "debug": "^2.6.9", + "resolve": "^1.13.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "dev": true + } + } + }, + "eslint-module-utils": { + "version": "2.6.0", + "dev": true, + "requires": { + "debug": "^2.6.9", + "pkg-dir": "^2.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "dev": true + } + } + }, + "eslint-plugin-import": { + "version": "2.22.1", + "dev": true, + "requires": { + "array-includes": "^3.1.1", + "array.prototype.flat": "^1.2.3", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.4", + "eslint-module-utils": "^2.6.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.1", + "read-pkg-up": "^2.0.0", + "resolve": "^1.17.0", + "tsconfig-paths": "^3.9.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "1.5.0", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "dev": true + } + } + }, + "eslint-plugin-jsx-a11y": { + "version": "6.4.1", + "dev": true, + "requires": { + "@babel/runtime": "^7.11.2", + "aria-query": "^4.2.2", + "array-includes": "^3.1.1", + "ast-types-flow": "^0.0.7", + "axe-core": "^4.0.2", + "axobject-query": "^2.2.0", + "damerau-levenshtein": "^1.0.6", + "emoji-regex": "^9.0.0", + "has": "^1.0.3", + "jsx-ast-utils": "^3.1.0", + "language-tags": "^1.0.5" + }, + "dependencies": { + "emoji-regex": { + "version": "9.2.1", + "dev": true + } + } + }, + "eslint-plugin-prettier": { + "version": "3.3.1", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-plugin-react": { + "version": "7.22.0", + "dev": true, + "requires": { + "array-includes": "^3.1.1", + "array.prototype.flatmap": "^1.2.3", + "doctrine": "^2.1.0", + "has": "^1.0.3", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "object.entries": "^1.1.2", + "object.fromentries": "^2.0.2", + "object.values": "^1.1.1", + "prop-types": "^15.7.2", + "resolve": "^1.18.1", + "string.prototype.matchall": "^4.0.2" + }, + "dependencies": { + "doctrine": { + "version": "2.1.0", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + } + } + }, + "eslint-plugin-react-hooks": { + "version": "1.7.0", + "dev": true, + "requires": {} + }, + "eslint-scope": { + "version": "5.1.1", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.1.0", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "2.0.0", + "dev": true + }, + "espree": { + "version": "7.3.1", + "dev": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "dev": true + } + } + }, + "esprima": { + "version": "4.0.1", + "dev": true + }, + "esquery": { + "version": "1.4.0", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "dev": true + }, + "etag": { + "version": "1.8.1", + "dev": true + }, + "events": { + "version": "3.2.0", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "expand-brackets": { + "version": "2.1.4", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "dev": true + } + } + }, + "extend": { + "version": "3.0.2" + }, + "extend-shallow": { + "version": "3.0.2", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "extsprintf": { + "version": "1.3.0" + }, + "falafel": { + "version": "2.2.4", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "foreach": "^2.0.5", + "isarray": "^2.0.1", + "object-keys": "^1.0.6" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "dev": true + } + } + }, + "fast-deep-equal": { + "version": "3.1.3" + }, + "fast-diff": { + "version": "1.2.0", + "dev": true + }, + "fast-glob": { + "version": "2.2.7", + "dev": true, + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.1.2", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.3", + "micromatch": "^3.1.10" + }, + "dependencies": { + "glob-parent": { + "version": "3.1.0", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0" + }, + "fast-levenshtein": { + "version": "2.0.6", + "dev": true + }, + "fastparse": { + "version": "1.1.2", + "dev": true + }, + "file-entry-cache": { + "version": "6.0.0", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "file-saver": { + "version": "1.3.8" + }, + "file-uri-to-path": { + "version": "1.0.0", + "dev": true + }, + "filesize": { + "version": "3.6.1", + "dev": true + }, + "fill-range": { + "version": "4.0.0", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-up": { + "version": "2.1.0", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "flat-cache": { + "version": "3.0.4", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.1.1", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "dev": true + }, + "foreach": { + "version": "2.0.5", + "dev": true + }, + "forever-agent": { + "version": "0.6.1" + }, + "form-data": { + "version": "2.3.3", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "dev": true + }, + "fs-readdir-recursive": { + "version": "1.1.0", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "dev": true + }, + "fsevents": { + "version": "1.2.13", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, + "function-bind": { + "version": "1.1.1", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-port": { + "version": "3.2.0", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.6", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.1", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "glob-to-regexp": { + "version": "0.3.0", + "dev": true + }, + "globals": { + "version": "12.4.0", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "graceful-fs": { + "version": "4.2.6", + "dev": true + }, + "grapesjs": { + "version": "0.16.44", + "requires": { + "backbone": "1.3.3", + "backbone-undo": "^0.2.5", + "cash-dom": "^2.3.9", + "codemirror": "^5.58.2", + "codemirror-formatting": "^1.0.0", + "keymaster": "^1.6.2", + "promise-polyfill": "^8.1.3", + "spectrum-colorpicker": "^1.8.0", + "underscore": "^1.9.1" + } + }, + "grapesjs-aviary": { + "version": "0.1.2", + "requires": {} + }, + "grapesjs-blocks-basic": { + "version": "0.1.8", + "requires": {} + }, + "grapesjs-component-countdown": { + "version": "0.1.3", + "requires": {} + }, + "grapesjs-mjml": { + "version": "0.4.2", + "requires": { + "mjml-browser": "^4.8.0" + } + }, + "grapesjs-navbar": { + "version": "0.1.5", + "requires": {} + }, + "grapesjs-parser-postcss": { + "version": "0.1.1", + "requires": { + "postcss": "^7.0.2" + } + }, + "grapesjs-plugin-export": { + "version": "0.1.5", + "requires": { + "file-saver": "^1.3.2", + "jszip": "^3.0.0" + } + }, + "grapesjs-plugin-filestack": { + "version": "0.1.1", + "requires": {} + }, + "grapesjs-plugin-forms": { + "version": "0.3.6", + "requires": {} + }, + "grapesjs-preset-mautic": { + "version": "git+ssh://git@github.com/mautic/grapesjs-preset-mautic.git#4aa6bce08079f8993d7d18584a54f20d18997fb6", + "from": "grapesjs-preset-mautic@github:mautic/grapesjs-preset-mautic#master" + }, + "grapesjs-preset-newsletter": { + "version": "0.2.20", + "requires": { + "juice": "^4.1.1" + } + }, + "grapesjs-preset-webpage": { + "version": "0.1.11", + "requires": { + "grapesjs-aviary": "^0.1.2", + "grapesjs-blocks-basic": "^0.1.7", + "grapesjs-component-countdown": "^0.1.2", + "grapesjs-navbar": "^0.1.5", + "grapesjs-plugin-export": "^0.1.5", + "grapesjs-plugin-filestack": "^0.1.1", + "grapesjs-plugin-forms": "^0.3.5" + } + }, + "grapheme-breaker": { + "version": "0.3.2", + "dev": true, + "requires": { + "brfs": "^1.2.0", + "unicode-trie": "^0.3.1" + } + }, + "har-schema": { + "version": "2.0.0" + }, + "har-validator": { + "version": "5.1.5", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "dev": true + } + } + }, + "has-flag": { + "version": "3.0.0" + }, + "has-symbols": { + "version": "1.0.1", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.1.0", + "dev": true, + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "dev": true + } + } + }, + "hash.js": { + "version": "1.1.7", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hex-color-regex": { + "version": "1.1.0", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.8.8", + "dev": true + }, + "hsl-regex": { + "version": "1.0.0", + "dev": true + }, + "hsla-regex": { + "version": "1.0.0", + "dev": true + }, + "html-comment-regex": { + "version": "1.1.2", + "dev": true + }, + "html-encoding-sniffer": { + "version": "1.0.2", + "dev": true, + "requires": { + "whatwg-encoding": "^1.0.1" + } + }, + "html-tags": { + "version": "1.2.0", + "dev": true + }, + "htmlnano": { + "version": "0.2.8", + "dev": true, + "requires": { + "cssnano": "^4.1.10", + "posthtml": "^0.13.4", + "posthtml-render": "^1.3.0", + "purgecss": "^2.3.0", + "relateurl": "^0.2.7", + "srcset": "^3.0.0", + "svgo": "^1.3.2", + "terser": "^4.8.0", + "timsort": "^0.3.0", + "uncss": "^0.17.3" + }, + "dependencies": { + "posthtml": { + "version": "0.13.4", + "dev": true, + "requires": { + "posthtml-parser": "^0.5.0", + "posthtml-render": "^1.2.3" + } + }, + "posthtml-parser": { + "version": "0.5.3", + "dev": true, + "requires": { + "htmlparser2": "^3.9.2" + } + }, + "terser": { + "version": "4.8.0", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + } + } + } + }, + "htmlparser2": { + "version": "3.10.1", + "requires": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "http-errors": { + "version": "1.7.3", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "http-signature": { + "version": "1.2.0", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-browserify": { + "version": "1.0.0", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "icss-replace-symbols": { + "version": "1.1.0", + "dev": true + }, + "ieee754": { + "version": "1.2.1", + "dev": true + }, + "ignore": { + "version": "4.0.6", + "dev": true + }, + "image-size": { + "version": "0.7.5" + }, + "immediate": { + "version": "3.0.6" + }, + "import-fresh": { + "version": "3.3.0", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "dev": true + }, + "indexes-of": { + "version": "1.0.1", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4" + }, + "internal-slot": { + "version": "1.0.3", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, + "is-absolute-url": { + "version": "2.1.0", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "dev": true + }, + "is-callable": { + "version": "1.2.3", + "dev": true + }, + "is-color-stop": { + "version": "1.1.0", + "dev": true, + "requires": { + "css-color-names": "^0.0.4", + "hex-color-regex": "^1.1.0", + "hsl-regex": "^1.0.0", + "hsla-regex": "^1.0.0", + "rgb-regex": "^1.0.1", + "rgba-regex": "^1.0.0" + } + }, + "is-core-module": { + "version": "2.2.0", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-date-object": { + "version": "1.0.2", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "dev": true + } + } + }, + "is-directory": { + "version": "0.3.1", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-html": { + "version": "1.1.0", + "dev": true, + "requires": { + "html-tags": "^1.0.0" + } + }, + "is-negative-zero": { + "version": "2.0.1", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-obj": { + "version": "2.0.0", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-regex": { + "version": "1.1.2", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-symbols": "^1.0.1" + } + }, + "is-resolvable": { + "version": "1.1.0", + "dev": true + }, + "is-string": { + "version": "1.0.5", + "dev": true + }, + "is-svg": { + "version": "3.0.0", + "dev": true, + "requires": { + "html-comment-regex": "^1.1.0" + } + }, + "is-symbol": { + "version": "1.0.3", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0" + }, + "is-url": { + "version": "1.2.4", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "dev": true + }, + "isarray": { + "version": "1.0.0" + }, + "isexe": { + "version": "2.0.0" + }, + "isobject": { + "version": "3.0.1", + "dev": true + }, + "isstream": { + "version": "0.1.2" + }, + "js-tokens": { + "version": "4.0.0", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1" + }, + "jsdom": { + "version": "14.1.0", + "dev": true, + "requires": { + "abab": "^2.0.0", + "acorn": "^6.0.4", + "acorn-globals": "^4.3.0", + "array-equal": "^1.0.0", + "cssom": "^0.3.4", + "cssstyle": "^1.1.1", + "data-urls": "^1.1.0", + "domexception": "^1.0.1", + "escodegen": "^1.11.0", + "html-encoding-sniffer": "^1.0.2", + "nwsapi": "^2.1.3", + "parse5": "5.1.0", + "pn": "^1.1.0", + "request": "^2.88.0", + "request-promise-native": "^1.0.5", + "saxes": "^3.1.9", + "symbol-tree": "^3.2.2", + "tough-cookie": "^2.5.0", + "w3c-hr-time": "^1.0.1", + "w3c-xmlserializer": "^1.1.2", + "webidl-conversions": "^4.0.2", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^7.0.0", + "ws": "^6.1.2", + "xml-name-validator": "^3.0.0" + }, + "dependencies": { + "acorn": { + "version": "6.4.2", + "dev": true + }, + "escodegen": { + "version": "1.14.3", + "dev": true, + "requires": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + } + }, + "levn": { + "version": "0.3.0", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "optionator": { + "version": "0.8.3", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "prelude-ls": { + "version": "1.1.2", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "ws": { + "version": "6.2.1", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } + } + } + }, + "jsesc": { + "version": "2.5.2", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "dev": true + }, + "json-schema": { + "version": "0.2.3" + }, + "json-schema-traverse": { + "version": "0.4.1" + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1" + }, + "json5": { + "version": "1.0.1", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "jsprim": { + "version": "1.4.1", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jsx-ast-utils": { + "version": "3.2.0", + "dev": true, + "requires": { + "array-includes": "^3.1.2", + "object.assign": "^4.1.2" + } + }, + "jszip": { + "version": "3.6.0", + "requires": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "set-immediate-shim": "~1.0.1" + }, + "dependencies": { + "pako": { + "version": "1.0.11" + } + } + }, + "juice": { + "version": "4.3.2", + "requires": { + "cheerio": "^0.22.0", + "commander": "^2.15.1", + "cross-spawn": "^5.1.0", + "deep-extend": "^0.5.1", + "mensch": "^0.3.3", + "slick": "^1.12.2", + "web-resource-inliner": "^4.2.1" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "lru-cache": { + "version": "4.1.5", + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "shebang-command": { + "version": "1.2.0", + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0" + }, + "which": { + "version": "1.3.1", + "requires": { + "isexe": "^2.0.0" + } + }, + "yallist": { + "version": "2.1.2" + } + } + }, + "keymaster": { + "version": "1.6.2" + }, + "kind-of": { + "version": "6.0.3", + "dev": true + }, + "language-subtag-registry": { + "version": "0.3.21", + "dev": true + }, + "language-tags": { + "version": "1.0.5", + "dev": true, + "requires": { + "language-subtag-registry": "~0.3.2" + } + }, + "levn": { + "version": "0.4.1", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lie": { + "version": "3.3.0", + "requires": { + "immediate": "~3.0.5" + } + }, + "load-json-file": { + "version": "2.0.0", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "dev": true + }, + "lodash.assignin": { + "version": "4.2.0" + }, + "lodash.bind": { + "version": "4.2.1" + }, + "lodash.clone": { + "version": "4.5.0", + "dev": true + }, + "lodash.defaults": { + "version": "4.2.0" + }, + "lodash.filter": { + "version": "4.6.0" + }, + "lodash.flatten": { + "version": "4.4.0" + }, + "lodash.foreach": { + "version": "4.5.0" + }, + "lodash.map": { + "version": "4.6.0" + }, + "lodash.memoize": { + "version": "4.1.2", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2" + }, + "lodash.pick": { + "version": "4.4.0" + }, + "lodash.reduce": { + "version": "4.6.0" + }, + "lodash.reject": { + "version": "4.6.0" + }, + "lodash.some": { + "version": "4.6.0" + }, + "lodash.sortby": { + "version": "4.7.0", + "dev": true + }, + "lodash.unescape": { + "version": "4.0.1" + }, + "lodash.uniq": { + "version": "4.5.0", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "dev": true, + "requires": { + "chalk": "^2.0.1" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + } + } + }, + "loose-envify": { + "version": "1.4.0", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lru-cache": { + "version": "6.0.0", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "magic-string": { + "version": "0.22.5", + "dev": true, + "requires": { + "vlq": "^0.2.2" + } + }, + "make-dir": { + "version": "2.1.0", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "dev": true + }, + "semver": { + "version": "5.7.1", + "dev": true + } + } + }, + "map-cache": { + "version": "0.2.2", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.5", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "mdn-data": { + "version": "2.0.4", + "dev": true + }, + "mensch": { + "version": "0.3.4" + }, + "merge-source-map": { + "version": "1.0.4", + "dev": true, + "requires": { + "source-map": "^0.5.6" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "dev": true + } + } + }, + "merge2": { + "version": "1.4.1", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "dev": true + } + } + }, + "mime": { + "version": "1.6.0", + "dev": true + }, + "mime-db": { + "version": "1.45.0" + }, + "mime-types": { + "version": "2.1.28", + "requires": { + "mime-db": "1.45.0" + } + }, + "mimer": { + "version": "1.1.0" + }, + "mimic-fn": { + "version": "1.2.0", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "dev": true + }, + "mixin-deep": { + "version": "1.3.2", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mjml-browser": { + "version": "4.8.1" + }, + "mkdirp": { + "version": "0.5.5", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "ms": { + "version": "2.1.2", + "dev": true + }, + "nan": { + "version": "2.14.2", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "natural-compare": { + "version": "1.4.0", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "dev": true + }, + "node-addon-api": { + "version": "1.7.2", + "dev": true + }, + "node-forge": { + "version": "0.7.6", + "dev": true + }, + "node-libs-browser": { + "version": "2.2.1", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.1", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "^1.0.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "dev": true + } + } + }, + "node-releases": { + "version": "1.1.70", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "dev": true + } + } + }, + "normalize-path": { + "version": "3.0.0", + "dev": true + }, + "normalize-url": { + "version": "3.3.0", + "dev": true + }, + "nth-check": { + "version": "1.0.2", + "requires": { + "boolbase": "~1.0.0" + } + }, + "nwsapi": { + "version": "2.2.0", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0" + }, + "object-assign": { + "version": "4.1.1", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-inspect": { + "version": "1.9.0", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.2", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.entries": { + "version": "1.1.3", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1", + "has": "^1.0.3" + } + }, + "object.fromentries": { + "version": "2.0.3", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1", + "has": "^1.0.3" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.1", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" + } + }, + "object.pick": { + "version": "1.3.0", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "object.values": { + "version": "1.1.2", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1", + "has": "^1.0.3" + } + }, + "on-finished": { + "version": "2.3.0", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "opn": { + "version": "5.5.0", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "optionator": { + "version": "0.9.1", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "ora": { + "version": "2.1.0", + "dev": true, + "requires": { + "chalk": "^2.3.1", + "cli-cursor": "^2.1.0", + "cli-spinners": "^1.1.0", + "log-symbols": "^2.2.0", + "strip-ansi": "^4.0.0", + "wcwidth": "^1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "os-browserify": { + "version": "0.3.0", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "dev": true + }, + "pako": { + "version": "0.2.9", + "dev": true + }, + "parcel-bundler": { + "version": "1.12.4", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/core": "^7.4.4", + "@babel/generator": "^7.4.4", + "@babel/parser": "^7.4.4", + "@babel/plugin-transform-flow-strip-types": "^7.4.4", + "@babel/plugin-transform-modules-commonjs": "^7.4.4", + "@babel/plugin-transform-react-jsx": "^7.0.0", + "@babel/preset-env": "^7.4.4", + "@babel/runtime": "^7.4.4", + "@babel/template": "^7.4.4", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4", + "@iarna/toml": "^2.2.0", + "@parcel/fs": "^1.11.0", + "@parcel/logger": "^1.11.1", + "@parcel/utils": "^1.11.0", + "@parcel/watcher": "^1.12.1", + "@parcel/workers": "^1.11.0", + "ansi-to-html": "^0.6.4", + "babylon-walk": "^1.0.2", + "browserslist": "^4.1.0", + "chalk": "^2.1.0", + "clone": "^2.1.1", + "command-exists": "^1.2.6", + "commander": "^2.11.0", + "core-js": "^2.6.5", + "cross-spawn": "^6.0.4", + "css-modules-loader-core": "^1.1.0", + "cssnano": "^4.0.0", + "deasync": "^0.1.14", + "dotenv": "^5.0.0", + "dotenv-expand": "^5.1.0", + "envinfo": "^7.3.1", + "fast-glob": "^2.2.2", + "filesize": "^3.6.0", + "get-port": "^3.2.0", + "htmlnano": "^0.2.2", + "is-glob": "^4.0.0", + "is-url": "^1.2.2", + "js-yaml": "^3.10.0", + "json5": "^1.0.1", + "micromatch": "^3.0.4", + "mkdirp": "^0.5.1", + "node-forge": "^0.7.1", + "node-libs-browser": "^2.0.0", + "opn": "^5.1.0", + "postcss": "^7.0.11", + "postcss-value-parser": "^3.3.1", + "posthtml": "^0.11.2", + "posthtml-parser": "^0.4.0", + "posthtml-render": "^1.1.3", + "resolve": "^1.4.0", + "semver": "^5.4.1", + "serialize-to-js": "^3.0.0", + "serve-static": "^1.12.4", + "source-map": "0.6.1", + "terser": "^3.7.3", + "v8-compile-cache": "^2.0.0", + "ws": "^5.1.1" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "path-key": { + "version": "2.0.1", + "dev": true + }, + "semver": { + "version": "5.7.1", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "dev": true + }, + "which": { + "version": "1.3.1", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "parent-module": { + "version": "1.0.1", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-asn1": { + "version": "5.1.6", + "dev": true, + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-json": { + "version": "2.2.0", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse5": { + "version": "5.1.0", + "dev": true + }, + "parseurl": { + "version": "1.3.3", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "dev": true + }, + "path-browserify": { + "version": "0.0.1", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "dev": true + }, + "path-type": { + "version": "2.0.0", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "pbkdf2": { + "version": "3.1.1", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "performance-now": { + "version": "2.1.0" + }, + "physical-cpu-count": { + "version": "2.0.0", + "dev": true + }, + "picomatch": { + "version": "2.2.2", + "dev": true, + "optional": true + }, + "pify": { + "version": "2.3.0", + "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "pn": { + "version": "1.1.0", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "dev": true + }, + "postcss": { + "version": "7.0.35", + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "supports-color": { + "version": "6.1.0", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-calc": { + "version": "7.0.5", + "dev": true, + "requires": { + "postcss": "^7.0.27", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.2" + }, + "dependencies": { + "postcss-value-parser": { + "version": "4.1.0", + "dev": true + } + } + }, + "postcss-colormin": { + "version": "4.0.3", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "color": "^3.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-convert-values": { + "version": "4.0.1", + "dev": true, + "requires": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-discard-comments": { + "version": "4.0.2", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-discard-duplicates": { + "version": "4.0.2", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-discard-empty": { + "version": "4.0.1", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-discard-overridden": { + "version": "4.0.1", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-merge-longhand": { + "version": "4.0.11", + "dev": true, + "requires": { + "css-color-names": "0.0.4", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "stylehacks": "^4.0.0" + } + }, + "postcss-merge-rules": { + "version": "4.0.3", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-api": "^3.0.0", + "cssnano-util-same-parent": "^4.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0", + "vendors": "^1.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.2", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "postcss-minify-font-values": { + "version": "4.0.2", + "dev": true, + "requires": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-minify-gradients": { + "version": "4.0.2", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "is-color-stop": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-minify-params": { + "version": "4.0.2", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "browserslist": "^4.0.0", + "cssnano-util-get-arguments": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "uniqs": "^2.0.0" + } + }, + "postcss-minify-selectors": { + "version": "4.0.2", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.2", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "postcss-modules-extract-imports": { + "version": "1.1.0", + "dev": true, + "requires": { + "postcss": "^6.0.1" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "postcss": { + "version": "6.0.23", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + } + } + }, + "postcss-modules-local-by-default": { + "version": "1.2.0", + "dev": true, + "requires": { + "css-selector-tokenizer": "^0.7.0", + "postcss": "^6.0.1" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "postcss": { + "version": "6.0.23", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + } + } + }, + "postcss-modules-scope": { + "version": "1.1.0", + "dev": true, + "requires": { + "css-selector-tokenizer": "^0.7.0", + "postcss": "^6.0.1" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "postcss": { + "version": "6.0.23", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + } + } + }, + "postcss-modules-values": { + "version": "1.3.0", + "dev": true, + "requires": { + "icss-replace-symbols": "^1.1.0", + "postcss": "^6.0.1" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "postcss": { + "version": "6.0.23", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + } + } + }, + "postcss-normalize-charset": { + "version": "4.0.1", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-normalize-display-values": { + "version": "4.0.2", + "dev": true, + "requires": { + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-normalize-positions": { + "version": "4.0.2", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-normalize-repeat-style": { + "version": "4.0.2", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-normalize-string": { + "version": "4.0.2", + "dev": true, + "requires": { + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-normalize-timing-functions": { + "version": "4.0.2", + "dev": true, + "requires": { + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-normalize-unicode": { + "version": "4.0.1", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-normalize-url": { + "version": "4.0.1", + "dev": true, + "requires": { + "is-absolute-url": "^2.0.0", + "normalize-url": "^3.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-normalize-whitespace": { + "version": "4.0.2", + "dev": true, + "requires": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-ordered-values": { + "version": "4.1.2", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-reduce-initial": { + "version": "4.0.3", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-api": "^3.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0" + } + }, + "postcss-reduce-transforms": { + "version": "4.0.2", + "dev": true, + "requires": { + "cssnano-util-get-match": "^4.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-selector-parser": { + "version": "6.0.4", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1", + "util-deprecate": "^1.0.2" + } + }, + "postcss-svgo": { + "version": "4.0.2", + "dev": true, + "requires": { + "is-svg": "^3.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "svgo": "^1.0.0" + } + }, + "postcss-unique-selectors": { + "version": "4.0.1", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "postcss": "^7.0.0", + "uniqs": "^2.0.0" + } + }, + "postcss-value-parser": { + "version": "3.3.1", + "dev": true + }, + "posthtml": { + "version": "0.11.6", + "dev": true, + "requires": { + "posthtml-parser": "^0.4.1", + "posthtml-render": "^1.1.5" + } + }, + "posthtml-parser": { + "version": "0.4.2", + "dev": true, + "requires": { + "htmlparser2": "^3.9.2" + } + }, + "posthtml-render": { + "version": "1.4.0", + "dev": true + }, + "prelude-ls": { + "version": "1.2.1", + "dev": true + }, + "prettier": { + "version": "2.2.1", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, + "process": { + "version": "0.11.10", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1" + }, + "progress": { + "version": "2.0.3", + "dev": true + }, + "promise-polyfill": { + "version": "8.2.0" + }, + "prop-types": { + "version": "15.7.2", + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "pseudomap": { + "version": "1.0.2" + }, + "psl": { + "version": "1.8.0" + }, + "public-encrypt": { + "version": "4.0.3", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "dev": true + } + } + }, + "punycode": { + "version": "2.1.1" + }, + "purgecss": { + "version": "2.3.0", + "dev": true, + "requires": { + "commander": "^5.0.0", + "glob": "^7.0.0", + "postcss": "7.0.32", + "postcss-selector-parser": "^6.0.2" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "commander": { + "version": "5.1.0", + "dev": true + }, + "postcss": { + "version": "7.0.32", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "q": { + "version": "1.5.1", + "dev": true + }, + "qs": { + "version": "6.5.2" + }, + "querystring": { + "version": "0.2.0", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "dev": true + }, + "quote-stream": { + "version": "1.0.2", + "dev": true, + "requires": { + "buffer-equal": "0.0.1", + "minimist": "^1.1.3", + "through2": "^2.0.0" + } + }, + "randombytes": { + "version": "2.1.0", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.1", + "dev": true + }, + "react-is": { + "version": "16.13.1", + "dev": true + }, + "read-pkg": { + "version": "2.0.0", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } + }, + "readable-stream": { + "version": "2.3.7", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "regenerate": { + "version": "1.4.2", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "8.2.0", + "dev": true, + "requires": { + "regenerate": "^1.4.0" + } + }, + "regenerator-runtime": { + "version": "0.13.7", + "dev": true + }, + "regenerator-transform": { + "version": "0.14.5", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.4" + } + }, + "regex-not": { + "version": "1.0.2", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexp.prototype.flags": { + "version": "1.3.1", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "regexpp": { + "version": "3.1.0", + "dev": true + }, + "regexpu-core": { + "version": "4.7.1", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.2.0" + } + }, + "regjsgen": { + "version": "0.5.2", + "dev": true + }, + "regjsparser": { + "version": "0.6.7", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "dev": true + } + } + }, + "relateurl": { + "version": "0.2.7", + "dev": true + }, + "remove-trailing-separator": { + "version": "1.1.0", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "dev": true + }, + "request": { + "version": "2.88.2", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "request-promise-core": { + "version": "1.1.4", + "dev": true, + "requires": { + "lodash": "^4.17.19" + } + }, + "request-promise-native": { + "version": "1.0.9", + "dev": true, + "requires": { + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + } + }, + "require-from-string": { + "version": "2.0.2", + "dev": true + }, + "resolve": { + "version": "1.20.0", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "4.0.0", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "dev": true + }, + "rgb-regex": { + "version": "1.0.1", + "dev": true + }, + "rgba-regex": { + "version": "1.0.0", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2" + }, + "safe-regex": { + "version": "1.1.0", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2" + }, + "sax": { + "version": "1.2.4", + "dev": true + }, + "saxes": { + "version": "3.1.11", + "dev": true, + "requires": { + "xmlchars": "^2.1.1" + } + }, + "semver": { + "version": "7.3.4", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "send": { + "version": "0.17.1", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "dev": true + } + } + }, + "ms": { + "version": "2.1.1", + "dev": true + } + } + }, + "serialize-to-js": { + "version": "3.1.1", + "dev": true + }, + "serve-static": { + "version": "1.14.1", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "set-immediate-shim": { + "version": "1.0.1" + }, + "set-value": { + "version": "2.0.1", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "dev": true + }, + "setprototypeof": { + "version": "1.1.1", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shallow-copy": { + "version": "0.0.1", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "dev": true + }, + "side-channel": { + "version": "1.0.4", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "signal-exit": { + "version": "3.0.3", + "dev": true + }, + "simple-swizzle": { + "version": "0.2.2", + "dev": true, + "requires": { + "is-arrayish": "^0.3.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.3.2", + "dev": true + } + } + }, + "slice-ansi": { + "version": "4.0.0", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "dev": true + } + } + }, + "slick": { + "version": "1.12.2" + }, + "snapdragon": { + "version": "0.8.2", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-map": { + "version": "0.6.1" + }, + "source-map-resolve": { + "version": "0.5.3", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.19", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "source-map-url": { + "version": "0.4.1", + "dev": true + }, + "spdx-correct": { + "version": "3.1.1", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.7", + "dev": true + }, + "spectrum-colorpicker": { + "version": "1.8.1" + }, + "split-string": { + "version": "3.1.0", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "dev": true + }, + "srcset": { + "version": "3.0.0", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stable": { + "version": "0.1.8", + "dev": true + }, + "static-eval": { + "version": "2.1.0", + "dev": true, + "requires": { + "escodegen": "^1.11.1" + }, + "dependencies": { + "escodegen": { + "version": "1.14.3", + "dev": true, + "requires": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + } + }, + "levn": { + "version": "0.3.0", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "optionator": { + "version": "0.8.3", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "prelude-ls": { + "version": "1.1.2", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + } + } + }, + "static-extend": { + "version": "0.1.2", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "static-module": { + "version": "2.2.5", + "dev": true, + "requires": { + "concat-stream": "~1.6.0", + "convert-source-map": "^1.5.1", + "duplexer2": "~0.1.4", + "escodegen": "~1.9.0", + "falafel": "^2.1.0", + "has": "^1.0.1", + "magic-string": "^0.22.4", + "merge-source-map": "1.0.4", + "object-inspect": "~1.4.0", + "quote-stream": "~1.0.2", + "readable-stream": "~2.3.3", + "shallow-copy": "~0.0.1", + "static-eval": "^2.0.0", + "through2": "~2.0.3" + }, + "dependencies": { + "object-inspect": { + "version": "1.4.1", + "dev": true + } + } + }, + "statuses": { + "version": "1.5.0", + "dev": true + }, + "stealthy-require": { + "version": "1.1.1", + "dev": true + }, + "stream-browserify": { + "version": "2.0.2", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-http": { + "version": "2.8.3", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "string-width": { + "version": "4.2.0", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "string.prototype.matchall": { + "version": "4.0.3", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1", + "has-symbols": "^1.0.1", + "internal-slot": "^1.0.2", + "regexp.prototype.flags": "^1.3.0", + "side-channel": "^1.0.3" + } + }, + "string.prototype.trimend": { + "version": "1.0.3", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.3", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } + }, + "strip-ansi": { + "version": "6.0.0", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "dev": true + }, + "stylehacks": { + "version": "4.0.3", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.2", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "supports-color": { + "version": "5.5.0", + "requires": { + "has-flag": "^3.0.0" + } + }, + "svgo": { + "version": "1.3.2", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "coa": "^2.0.2", + "css-select": "^2.0.0", + "css-select-base-adapter": "^0.1.1", + "css-tree": "1.0.0-alpha.37", + "csso": "^4.0.2", + "js-yaml": "^3.13.1", + "mkdirp": "~0.5.1", + "object.values": "^1.1.0", + "sax": "~1.2.4", + "stable": "^0.1.8", + "unquote": "~1.1.1", + "util.promisify": "~1.0.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + } + } + }, + "symbol-tree": { + "version": "3.2.4", + "dev": true + }, + "table": { + "version": "6.0.7", + "dev": true, + "requires": { + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" + }, + "dependencies": { + "ajv": { + "version": "7.1.0", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "dev": true + } + } + }, + "terser": { + "version": "3.17.0", + "dev": true, + "requires": { + "commander": "^2.19.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.10" + } + }, + "text-table": { + "version": "0.2.0", + "dev": true + }, + "through2": { + "version": "2.0.5", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "timers-browserify": { + "version": "2.0.12", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "timsort": { + "version": "0.3.0", + "dev": true + }, + "tiny-inflate": { + "version": "1.0.3", + "dev": true + }, + "to-arraybuffer": { + "version": "1.0.1", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "toidentifier": { + "version": "1.0.0", + "dev": true + }, + "tough-cookie": { + "version": "2.5.0", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tr46": { + "version": "1.0.1", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "tsconfig-paths": { + "version": "3.9.0", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, + "tty-browserify": { + "version": "0.0.0", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5" + }, + "type-check": { + "version": "0.4.0", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.8.1", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "dev": true + }, + "uncss": { + "version": "0.17.3", + "dev": true, + "requires": { + "commander": "^2.20.0", + "glob": "^7.1.4", + "is-absolute-url": "^3.0.1", + "is-html": "^1.1.0", + "jsdom": "^14.1.0", + "lodash": "^4.17.15", + "postcss": "^7.0.17", + "postcss-selector-parser": "6.0.2", + "request": "^2.88.0" + }, + "dependencies": { + "is-absolute-url": { + "version": "3.0.3", + "dev": true + }, + "postcss-selector-parser": { + "version": "6.0.2", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "underscore": { + "version": "1.12.0" + }, + "unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "1.0.4", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "1.2.0", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "1.1.0", + "dev": true + }, + "unicode-trie": { + "version": "0.3.1", + "dev": true, + "requires": { + "pako": "^0.2.5", + "tiny-inflate": "^1.0.0" + } + }, + "union-value": { + "version": "1.0.1", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "uniq": { + "version": "1.0.1", + "dev": true + }, + "uniqs": { + "version": "2.0.0", + "dev": true + }, + "unquote": { + "version": "1.1.1", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "dev": true + } + } + }, + "upath": { + "version": "1.2.0", + "dev": true + }, + "uri-js": { + "version": "4.4.1", + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "dev": true + }, + "url": { + "version": "0.11.0", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "dev": true + } + } + }, + "use": { + "version": "3.1.1", + "dev": true + }, + "util": { + "version": "0.11.1", + "dev": true, + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2" + }, + "util.promisify": { + "version": "1.0.1", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.2", + "has-symbols": "^1.0.1", + "object.getownpropertydescriptors": "^2.1.0" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.7", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + } + } + }, + "uuid": { + "version": "3.4.0" + }, + "v8-compile-cache": { + "version": "2.2.0", + "dev": true + }, + "valid-data-url": { + "version": "2.0.0" + }, + "validate-npm-package-license": { + "version": "3.0.4", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "vendors": { + "version": "1.0.4", + "dev": true + }, + "verror": { + "version": "1.10.0", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vlq": { + "version": "0.2.3", + "dev": true + }, + "vm-browserify": { + "version": "1.1.2", + "dev": true + }, + "w3c-hr-time": { + "version": "1.0.2", + "dev": true, + "requires": { + "browser-process-hrtime": "^1.0.0" + } + }, + "w3c-xmlserializer": { + "version": "1.1.2", + "dev": true, + "requires": { + "domexception": "^1.0.1", + "webidl-conversions": "^4.0.2", + "xml-name-validator": "^3.0.0" + } + }, + "wcwidth": { + "version": "1.0.1", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "web-resource-inliner": { + "version": "4.3.4", + "requires": { + "async": "^3.1.0", + "chalk": "^2.4.2", + "datauri": "^2.0.0", + "htmlparser2": "^4.0.0", + "lodash.unescape": "^4.0.1", + "request": "^2.88.0", + "safer-buffer": "^2.1.2", + "valid-data-url": "^2.0.0", + "xtend": "^4.0.2" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "dom-serializer": { + "version": "1.2.0", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "entities": "^2.0.0" + }, + "dependencies": { + "domhandler": { + "version": "4.0.0", + "requires": { + "domelementtype": "^2.1.0" + } + } + } + }, + "domelementtype": { + "version": "2.1.0" + }, + "domhandler": { + "version": "3.3.0", + "requires": { + "domelementtype": "^2.0.1" + } + }, + "domutils": { + "version": "2.4.4", + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0" + }, + "dependencies": { + "domhandler": { + "version": "4.0.0", + "requires": { + "domelementtype": "^2.1.0" + } + } + } + }, + "entities": { + "version": "2.2.0" + }, + "htmlparser2": { + "version": "4.1.0", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^3.0.0", + "domutils": "^2.0.0", + "entities": "^2.0.0" + } + } + } + }, + "webidl-conversions": { + "version": "4.0.2", + "dev": true + }, + "whatwg-encoding": { + "version": "1.0.5", + "dev": true, + "requires": { + "iconv-lite": "0.4.24" + } + }, + "whatwg-mimetype": { + "version": "2.3.0", + "dev": true + }, + "whatwg-url": { + "version": "7.1.0", + "dev": true, + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "which": { + "version": "2.0.2", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "dev": true + }, + "ws": { + "version": "5.2.2", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } + }, + "xml-name-validator": { + "version": "3.0.0", + "dev": true + }, + "xmlchars": { + "version": "2.2.0", + "dev": true + }, + "xtend": { + "version": "4.0.2" + }, + "yallist": { + "version": "4.0.0", + "dev": true + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000000..264756a7ced --- /dev/null +++ b/package.json @@ -0,0 +1,51 @@ +{ + "name": "grapesjsbuilderbundle", + "version": "1.0.0", + "description": "⚠️ This Plugin is still Beta! It works great already and we're developing it actively! Please use it and report everything inside the \"Issues\" here in Github. ⚠️", + "main": "index.js", + "scripts": { + "build": "parcel build Assets/library/js/builder.js --out-dir Assets/library/js/dist", + "build-dev": "NODE_ENV=development parcel build Assets/library/js/builder.js --out-dir Assets/library/js/dist --no-minify ", + "lint": "eslint Assets/library/js/", + "prettier": "node_modules/.bin/prettier -w Assets/library/js/", + "prettier-check": "node_modules/.bin/prettier -c Assets/library/js/", + "start-helloWorld": "parcel Demo/helloWorld/index.html", + "start-mautic": "cp -r Demo/data dist && parcel Demo/mautic/index.html", + "update-mautic-preset": "npm uninstall grapesjs-preset-mautic && npm install mautic/grapesjs-preset-mautic#master" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/mautic/plugin-grapesjs-builder.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/mautic/plugin-grapesjs-builder/issues" + }, + "homepage": "https://github.com/mautic/plugin-grapesjs-builder#readme", + "dependencies": { + "grapesjs": "^0.16.44", + "grapesjs-mjml": "^0.4.2", + "grapesjs-parser-postcss": "^0.1.1", + "grapesjs-preset-mautic": "github:mautic/grapesjs-preset-mautic#master", + "grapesjs-preset-newsletter": "^0.2.20", + "grapesjs-preset-webpage": "^0.1.11" + }, + "devDependencies": { + "@babel/cli": "^7.12.16", + "@babel/core": "^7.12.16", + "@babel/plugin-proposal-class-properties": "^7.12.13", + "@babel/plugin-transform-runtime": "^7.12.15", + "babel-eslint": "^10.1.0", + "eslint": "^7.20.0", + "eslint-config-airbnb": "^18.2.1", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-jsx-a11y": "^6.4.1", + "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-react": "^7.22.0", + "eslint-plugin-react-hooks": "^1.7.0", + "parcel-bundler": "^1.12.4", + "prettier": "^2.2.1" + } +}