diff --git a/.githooks/commit-msg b/.githooks/commit-msg
deleted file mode 100644
index 6e93a5b7540..00000000000
--- a/.githooks/commit-msg
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-# set all strings to UTF-8
-LC_CTYPE=en_US.utf8
-
-# regex to validate the commit message against
-commit_regex='(^([+]{1}[ ]{1}(\(API\)|\(CMS\)|\(Check\-in\)|\(Communication\)|\(Connection\)|\(Core\)|\(CRM\)|\(Engagement\)|\(Event\)|\(Farm\)|\(Finance\)|\(Group\)|\(Lava\)|\(Mobile\)|\(Prayer\)|\(Reporting\)|\(Workflow\)|\(Other\)){1}[ ]{1}(Add*|Fix*|Improv*|Updat*){1}[\s\S][^\n]+(\. (\(Fix(es|ed) \#[0-9]+\))$|[\w]\.$){1})|^([-]{1}[ ]{1}[\s\S][^\n]+)){1}|^(Merge+.+)|^(Revert+.+)|^(Cherry+.+)'
-error_message_1="Your commit message should be a single-line and in one of the following formats:"
-error_message_2=" [Github Issue/PR Fix]: + (Domain) Add/Fix/Improve/Update Text. (Fixes #0000)"
-error_message_3=" [Public release note]: + (Domain) Add/Fix/Improve/Update Text."
-error_message_4=" [Internal commit msg]: - Text"
-guide_link=" See commit guidelines: https://triumph.slab.com/posts/developer-codex-current-orig-y3tqutbv#h5nco-committing-code"
-
-if ! grep -r -n -H -P "$commit_regex" "$1"; then
- echo "${error_message_1}" >&2
- echo "${error_message_2}" >&2
- echo "${error_message_3}" >&2
- echo "${error_message_4}" >&2
- echo "${guide_link}" >&2
- exit 1
-fi
\ No newline at end of file
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index f2733466b63..309140867cc 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,5 +1,6 @@
+## DESCRIPTION
-## Notice
+### What does this PR do, or why is it needed?
**In case you are submitting a non bug-fix-PR, we highly recommend you to engage in a PR discussion first.**
@@ -13,46 +14,18 @@ With the PR discussion we can assess your proposed changes before you start work
3. Have one of our core developers make the changes for you. This may be the case if the change involves intricate tasks like an EF migration or something similar.
-## Proposed Changes
+## TODO
-
-Fixes: #
+- [ ] Review code through the lens of being concise, simple, and well-documented
+- [ ] Manual QA to ensure the changes look/behave as expected
-## Types of changes
-
-What types of changes does your code introduce to Rock?
-_Put an `x` in the boxes that apply_
-
-- [ ] Bugfix (non-breaking change which fixes an issue)
-- [ ] New feature (non-breaking change which adds functionality, which has been approved by the core team)
-- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
-
-## Checklist
-
-_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
-
-- [ ] This is a single-commit PR. (If not, please squash your commit and re-submit it.)
-- [ ] I verified my PR does not include whitespace/formatting changes -- because if it does it will be closed without merging.
-- [ ] I have read the [Contributing to Rock](https://github.com/SparkDevNetwork/Rock/blob/master/.github/CONTRIBUTING.md) doc
-- [ ] By contributing code, I agree to license my contribution under the [Rock Community License Agreement](https://www.rockrms.com/license)
-- [ ] Unit tests pass locally with my changes
-- [ ] I have added any required [unit tests](https://github.com/SparkDevNetwork/Rock/blob/develop/Rock.Tests.UnitTests/README.md) or [integration tests](https://github.com/SparkDevNetwork/Rock/blob/develop/Rock.Tests.Integration/README.md) that prove my fix is effective or that my feature works
-- [ ] I have included updated language for the [Rock Documentation](https://www.rockrms.com/Learn/Documentation) (if appropriate)
-
-## Further comments
-
-
-## Documentation
-
-
-## Migrations
-If your pull request requires a migration, please *exclude the migration from the Rock.Migration project*, but submit it with your pull request. Please add a note to your pull request that provides a heads up that a migration file is present.
+> The purpose of PR Review is to _improve the quality of the software._
diff --git a/.gitignore b/.gitignore
index 5322c8bdd61..9e6e49846a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,53 +1,53 @@
-#file types
-_ReSharper.*
-*.resharper
-*.DS_Store
-*.tlog
-*.vsp
-*.psess
-*.v11.suo
-*.user
-*.suo
-#*.Framework.XML
-
-#specific files
-web.[Cc]onnectionStrings.config
-app.[Cc]onnectionStrings.config
-desktop.ini
-Rock.XML
-Quartz.xml
-StyleCop.Cache
-
-#build artifacts
-**/[Bb]in/[Dd]ebug
-**/[Bb]in/[Rr]elease
-**/[Oo]bj/[Dd]ebug
-**/[Oo]bj/[Rr]elease
-**/[Oo]bj/*.nuget.*
-**/[Oo]bj/project.assets.json
-
-#specific folders
-RockWeb/Cache/*
-RockWeb/Content/ASM_Thumbnails
-RockWeb/App_Data/PackageStaging
-RockWeb/App_Data/MobileAppBundles
-RockWeb/Obsidian/
-RockWeb/Scripts/Rock/UI/structuredcontenteditor/
-/scaffolding.config
-*.sln.GhostDoc.xml
-.vs/
-.vshistory/
-.localhistory/
-.vshistory/
-TestResults/
-
-Packages/*
-
-# javascript deps
-node_modules
-.cache
-*.map
-/packages/
-/Installers/CheckScannerInstall/UpgradeLog.htm
-/Installers/CheckScannerInstall/UpgradeLog2.htm
-/Installers/CheckScannerInstall_2017/CheckScannerInstall
+#file types
+_ReSharper.*
+*.resharper
+*.DS_Store
+*.tlog
+*.vsp
+*.psess
+*.v11.suo
+*.user
+*.suo
+#*.Framework.XML
+
+#specific files
+web.[Cc]onnectionStrings.config
+app.[Cc]onnectionStrings.config
+desktop.ini
+Rock.XML
+Quartz.xml
+StyleCop.Cache
+
+#build artifacts
+**/[Bb]in/[Dd]ebug
+**/[Bb]in/[Rr]elease
+**/[Oo]bj/[Dd]ebug
+**/[Oo]bj/[Rr]elease
+**/[Oo]bj/*.nuget.*
+**/[Oo]bj/project.assets.json
+
+#specific folders
+RockWeb/Cache/*
+RockWeb/Content/ASM_Thumbnails
+RockWeb/App_Data/PackageStaging
+RockWeb/App_Data/MobileAppBundles
+RockWeb/Obsidian/
+RockWeb/Scripts/Rock/UI/structuredcontenteditor/
+/scaffolding.config
+*.sln.GhostDoc.xml
+.vs/
+.vshistory/
+.localhistory/
+.vshistory/
+TestResults/
+
+Packages/*
+
+# javascript deps
+node_modules
+.cache
+*.map
+/packages/
+/Installers/CheckScannerInstall/UpgradeLog.htm
+/Installers/CheckScannerInstall/UpgradeLog2.htm
+/Installers/CheckScannerInstall_2017/CheckScannerInstall
diff --git a/.mergify.yml b/.mergify.yml
new file mode 100644
index 00000000000..8f56ac32b6a
--- /dev/null
+++ b/.mergify.yml
@@ -0,0 +1,16 @@
+pull_request_rules:
+ - name: automatic merge when CI passes, 1 review, and 1 label
+ conditions:
+ - label=merge
+ - label!=blocked
+ actions:
+ merge:
+ method: merge
+ strict: smart
+
+
+ - name: delete head branch after merge
+ conditions:
+ - merged
+ actions:
+ delete_head_branch: {}
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000000..8e59bf91142
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,92 @@
+# Contributing to Rock
+
+This is NewSpring's open-source fork for Rock RMS. This project is currently being used in production at [https://rock.newspring.cc](https://rock.newspring.cc).
+
+If you're interested in how it works, check out [RockRMS.com](http://rockrms.com). This document details how you can contribute.
+
+**Table of Contents**
+
+[How does NewSpring Web work?](#how-we-work)
+
+[How can I contribute?](#how-you-can-contribute)
+ * [Find known issues](#find-known-issues)
+ * [Report a new issue](#report-a-new-issue)
+ * [Recommend a new feature](#recommend-a-new-feature)
+ * [Pull requests](#pull-requests)
+
+[What styles should I use?](#style-guide)
+ * [Git](#git)
+ * [Code](#code)
+
+[How can I get in touch?](#get-in-touch)
+
+[What license does this use?](#license)
+
+## How we work
+
+Our team works 100% off of Github, and it should always remain updated with what is currently in active development.
+
+### Pull Requests
+
+We work extensively from pull requests and are constantly monitoring new PR's.
+
+When considering pull requests, we may require more than one person to sign off, so these might take up to a week.
+
+## How you can contribute
+
+One way you can contribute is by tackling known issues. Another way is submitting a new bug or feature request.
+
+### Find Known Issues
+
+We use [GitHub Issues](../../issues) for our public bugs. We keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new task, try to make sure your problem doesn't already exist.
+
+### Report a New Issue
+
+The best way to get a bug fixed is to provide an example case of where the problem is occurring. Images or videos of the failure occurring is beneficial where applicable.
+
+If you think you have a solution to a bug and would like to fix it, please let us know. We can hopefully provide recommendations, as well as let you know if the bug is in fact intended behavior.
+
+### Recommend a new feature
+
+We track feature requests using [GitHub Issues](../../issues). If you would like to begin a discussion about a new or improved feature, open a new issue.
+
+### Pull requests
+
+When working to fix bugs or add features, we recommend opening a pull request early so we can comment on it or request any changes early on.
+
+We also recommend that you work off of open issues, and let us know on them what you will be working on for the same reason.
+
+**Please submit your pull request on the `master` branch**.
+
+## Style Guide
+
+### Git
+
+#### Issues
+- Before opening an issue, search existing issues and closed issues for any current or past discussion about your topic.
+
+#### Commits and commit messages
+- Try to limit each commit to one bugfix or one logical change.
+- Commits messages should be short and clear.
+- Feel free to reference issues and pull requests in commit messages.
+
+#### Pull Requests
+- Refer to the [above instructions](#pull-requests) on what to do before opening a pull request.
+
+### Code
+
+#### General
+
+* **Most important: Look around.** Match the style you see used in the rest of the project.
+* Follow the [Rock coding standards](https://github.com/SparkDevNetwork/Rock/wiki/Coding-standards).
+* Use 4 spaces for indentation (no tabs)
+* Submit "Attractive" code. This means your variables are human readable, methods are named for what they do, etc.
+
+## Get in Touch
+
+* Hit us up on [Twitter](https://twitter.com/newspringweb)
+* Reach out to the [team](https://github.com/orgs/NewSpring/people).
+
+## License
+
+By contributing to Rock, you agree that your contributions will be licensed under its [MIT license](./LICENSE.md).
diff --git a/FreeSpace.bat b/FreeSpace.bat
new file mode 100644
index 00000000000..51b51b6511c
--- /dev/null
+++ b/FreeSpace.bat
@@ -0,0 +1,14 @@
+@echo off
+
+del /s /q c:\windows\softwaredistribution\download\*
+
+del /s /q %temp%\*
+
+dism.exe /online /Cleanup-Image /StartComponentCleanup
+dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
+
+echo When you press enter, a defrag will start on the C drive. Hit Ctrl + C now to cancel.
+
+pause
+
+defrag c:
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 00000000000..b2ea8c935c1
--- /dev/null
+++ b/README.md
@@ -0,0 +1,242 @@
+
+
+[](https://ci.appveyor.com/project/NewSpring/rock/branch/master)
+
+Rock RMS is a Relationship Management System (RMS) and plugin-friendly framework
+written as an ASP.NET 4.5 C# web application. It uses Entity Framework 6.1,
+jQuery, Bootstrap 3, and other open source libraries.
+
+The following guide documents how NewSpring Web uses and deploys Rock.
+
+Quick links:
+
+- [Getting Started](#getting-started)
+- [Primary Differences](#primary-differences)
+- [New Environments](#new-environments)
+- [Running Rock](#running-rock)
+- [Deploy Process](#deploy-process)
+- [Learn More](#learn-more)
+- [Community](#community)
+- [License](#license)
+
+## Getting Started
+
+Take a peek at the Rock [Developer 101](http://www.rockrms.com/Rock/Developer/BookContent/16/16) book to get started. Some more information can be found on the [wiki](../../wiki).
+
+If you're completely new to .NET, C# and SQL Server, you may want to read through [this overview](http://www.hanselman.com/blog/WhatNETDevelopersOughtToKnowToStartIn2017.aspx). If you're completely new to Github and Git, read through the [Contribution](./CONTRIBUTING.md) guidelines.
+
+
+## Primary Differences
+
+We try our best to stay in sync with the [base repository](https://github.com/SparkDevNetwork/Rock); however, we have a few primary differences:
+
+#### Repo Size
+
+If you clone the base repository, you'll notice that there are a _LOT_ of binary files. This doesn't work so well for quick build and deployment times (even with caching certain folders). So we've removed the following folders to reduce the overall size:
+
+- `./Applications`
+- `./Checkin Labels`
+- `./Installers`
+- `./packages`
+
+Applications and Installers can be downloaded through the Rock Shop (for production) or from the base repo (for debugging/development). We don't use the stock Check-in Labels; all our labels can be found [here](https://github.com/NewSpring/rock-attended-checkin/tree/master/Checkin%20Labels). Packages are automatically downloaded in production or development via Nuget.
+
+#### Deploy Configuration
+
+We use [Appveyor](https://www.appveyor.com/) to do continuous deployment to different environments. It's fast, free (for one build at a time), and relatively easy to set up. We depend on [Node/Norma](https://github.com/NewSpring/Norma) to add plugins to the build and [MSBuild](https://msdn.microsoft.com/en-us/library/dd393573.aspx) to compile the entire solution. You'll notice the following files in our repo:
+
+- [./appveyor.yml](./appveyor.yml)
+
+ This file contains all the build settings for AppVeyor. You can use Appveyor's UI instead, but you won't be able to track changes (especially helpful if something breaks). Formatting wise, Appveyor requires all spaces in this file (no tabs!).
+
+- [./Norma](./Norma)
+
+ This file contains the build settings for Norma, such as plugins to download, files to copy, etc.
+
+- [./package.json](./package.json)
+
+ This file contains all the dependencies for Norma.
+
+- [./RockWeb/app_offline-template.htm](./RockWeb/app_offline-template.htm)
+
+ This file displays a helpful user message while Rock is upgrading or rebooting. This file exists in core but has been heavily customized with NewSpring branding.
+
+- [./RockWeb/before-deploy.ps1](./RockWeb/before-deploy.ps1)
+
+ This file specifies what should happen before a deploy, such as saving web.config and setting the "Rock is restarting" message.
+
+- [./RockWeb/deploy.ps1](./RockWeb/deploy.ps1)
+
+ This file specifies what should happen during a deploy, such as setting permissions, and restoring web.config.
+
+- [./RockWeb/web.config](./RockWeb/web.config)
+
+ For security reasons our deploy process ignores any Github changes to the web.config. If there's an update in the Spark repo, you'll need to manually copy that change to each server. Keep in mind that any change to `web.config` will restart IIS.
+
+#### Dev Environment
+
+We have a lot of systems running in production: some we're proud of, and some we're not. We also have a [native app](https://github.com/NewSpring/Holtzman) for iOS, Android, Windows, and others. That means we often need to test systems (including Rock) from non-Windows environments. We've customized a couple things to make testing a little more friendly:
+
+- [./Rock.sln](./Rock.sln)
+
+ This file contains links to all the projects necessary for Rock to run, as well as links to any [plugin projects](#custom-plugins). Note that if a plugin isn't downloaded locally, Visual Studio will gracefully ignore the reference. `Rock.sln` also specifies the name and URL of the web project.
+
+ `Note: We changed the Rock website name and URL to be http://rock.dev instead of RockWeb with a URL of http://localhost:6229. This allows us to load and debug Rock cross-platform. See `[New Environments](#new-environments)` for more details.`
+
+#### Custom Plugins
+
+We've written a [few plugins](https://github.com/NewSpring?utf8=✓&q=rock-) for Rock, including a [CyberSource](https://github.com/NewSpring/rock-cybersource) gateway, a [CacheBreak](https://github.com/NewSpring/rock-cache-sync) project for API's, and an [Attended Check-in](https://github.com/NewSpring/rock-attended-checkin) module. We store plugins at the same folder level as Rock, then reference them in [./Rock.sln](./Rock.sln) with a relative path (`..\rock-cache-sync\cc.newspring.CacheBreak.csproj`).
+
+The following list details other minor blocks or packages we've added:
+
+- [Plugins\All Staff Live](./RockWeb/Plugins/cc_newspring/Blocks/AllStaffLive)
+
+ This block displays a video feed on our internal homepage for weekly staff meetings.
+
+- [Plugins\Dashboard Widget](./RockWeb/Plugins/cc_newspring/Blocks/Dashboards)
+
+ This block displays metric values using a Liquid template for staff dashboards.
+
+- [Plugins\Headings](./RockWeb/Plugins/cc_newspring/Blocks/Headings)
+
+ This block adds headings to a layout with the option to set a column size.
+
+- [Plugins\Metrics](./RockWeb/Plugins/cc_newspring/Blocks/Metrics)
+
+ This block displays metric values or comparisons on a dashboard based on Campus, Group, Date, or Schedule context.
+
+- [Plugins\Ooyala](./RockWeb/Plugins/cc_newspring/Blocks/Video)
+
+ This block loads the Ooyala video player for a specific video content ID.
+
+- [Plugins\Sentry Test](./RockWeb/Plugins/cc_newspring/Blocks/Sentry)
+
+ We use [Sentry](https://sentry.io) for additional error reporting from Rock, and this block allows you to send a custom error to test your config. The specific C# library we use is called [SharpRaven](https://www.nuget.org/packages/SharpRaven). We've added dependencies for Sentry/SharpRaven throughout Rock, including [Rock.csproj](./Rock/Rock.csproj), [RockBlock.cs](./Rock/Web/UI/RockBlock.cs), and the [API Exception Log](.//Rock.Rest/Controllers/ExceptionLogsController.Partial.cs).
+
+- [Plugins\Workflow Alert](./RockWeb/Plugins/cc_newspring/Blocks/WorkflowAlert)
+
+ This block displays a [bell icon](http://fontawesome.io/icon/bell-o/) next for each logged-in user when they have workflows to complete.
+
+#### WebAPI Upgrade
+
+In order to fully support Twilio and other API calls, we upgraded the `Microsoft.AspNet.WebApi` packages to version 5.2.3. The core version of Rock is at 5.2.2.
+
+
+## New Environments
+
+If you were already given a VMDK, most of these steps should be completed. Also, this guide assumes you'll be running Rock inside a Windows environment, either as a VM or dual-boot. If that's not the case, [talk to us](https://twitter.com/newspringweb) because we'd love to optimize our development/deployment strategy.
+
+- Create a new Windows 10 x64 machine
+- Select an existing hard disk (VMDK)
+- Set minimum CPU processors to 2
+- Set minimum RAM at 4GB
+- Download [Git](https://git-scm.com/downloads) (includes Git Bash ❤️)
+- Update your [git config](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) using Git Bash
+- Create your first [Pull Request](../../pulls)
+- Download [Visual Studio Community](https://www.visualstudio.com/vs/community/) (free)
+- Import the recommended [Visual Studio settings](./.vs/VisualStudio.vssettings)
+- Download SQL Server: LocalDB (free), [Express](https://www.microsoft.com/en-us/sql-server/sql-server-editions-express) (free), or Standard (not free)
+- Download [SQL Server Management Studio](https://msdn.microsoft.com/en-us/library/mt238290.aspx) (free)
+- Install some helpful plugins: [CodeMaid](https://visualstudiogallery.msdn.microsoft.com/76293c4d-8c16-4f4a-aee6-21f83a571496), [GhostDoc](https://visualstudiogallery.msdn.microsoft.com/46A20578-F0D5-4B1E-B55D-F001A6345748) and [Gulp](https://webtooling.visualstudio.com/task-runners/gulp/)
+
+If you haven't already experienced the joy of developing in Visual Studio with IIS, we'd highly recommend it: faster build times, easier debugging, cross-platform browsing, and bypassing the occasional VS insanity. You'll need to set up an IIS site pointed at [./RockWeb](./RockWeb), your database has to [be configured](http://logicalread.solarwinds.com/sql-server-express-as-a-production-database/) for IIS requests, and Visual Studio has to run as Administrator (so you can attach to IIS when debugging).
+
+If you don't want to go the IIS route or prefer to use Visual Studio for everything, you can still get cross-platform browsing with some [trickery](http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx). You'll also want to set a static IP on your VM and add a `hosts` reference to `rock.dev` with that IP.
+
+
+## Running Rock
+
+The VMDK file you should've received can be run in VirtualBox, Fusion, or Parallels. If you're wondering what settings you should use, go back to [New Environments](#new-environments).
+
+Our Rock version is hosted at `http://rock.dev` and you can use IIS Manager to control access to it.
+
+If you need to debug code, open Visual Studio and attach to `w3wp.exe`. If you don't need to debug, you can develop themes or change Block code in the running site: [./RockWeb](./RockWeb).
+
+#### Connections
+
+`./RockWeb/web.connectionstrings.config` defines your database attachments, although only one can be active (comment out the others). The only connection you'll probably need is `localhost\SQL`. If you're using SQL Server LocalDB, the Server property will be something like `(localdb)\ProjectsV13`.
+
+`Note: If you get an error running Nuget or starting the Rock project, make sure RockWeb is set as the startup project (Solution Explorer will display it in bold).`
+
+Here's a sample connection string:
+```
+
+
+
+
+
+```
+
+#### Migrations
+
+If you need to build or update a new database, look for the Nuget Package Manager Console and enter this command: `update-database -ProjectName 'Rock.Migrations'`. Note that if you had any Nuget updates while Visual Studio was open, you'll need to reload Visual Studio to successfully run the Package Manager Console.
+
+Alternatively, [follow the guide](http://shouldertheboulder.com/Article?id=368) to set your own migration shortcut. This will use the connection defined in `web.connectionstrings.config` to build or upgrade your database.
+
+#### Maintenance
+
+Eventually you'll need to run [./FreeSpace.bat](./FreeSpace.bat) to clear out old files and keep your Windows install trimmed down. This will also defrag your unused space, which allows you to shrink the disk from Fusion/VirtualBox after you shut the OS down.
+
+
+## Deploy Process
+
+We actively develop against our Rock fork and occasionally "cherry pick" changes from core, instead of waiting for the official or beta releases. While this does mean we get faster features or bugfixes, we're also some of the first to find out about breaking changes.
+
+We follow the below process to verify changes don't cause issues in production:
+
+####1) Review recent changes in [Spark/pre-alpha-release](https://github.com/SparkDevNetwork/Rock/tree/pre-alpha-release).
+
+This branch is typically the last phase in the development cycle before a Rock release (develop -> pre-alpha-spark -> pre-alpha-release -> hotfix / master release). Click [here](../../compare/pre-alpha-release...SparkDevNetwork:pre-alpha-release) to start a PR to [NewSpring/pre-alpha-release](../../tree/pre-alpha-release).
+
+You'll want to be sensitive to the following changes:
+- Migrations (will require downtime and typically can't be rolled back)
+- Check-in or workflow actions (could make for Sunday surprises, and not the good kind)
+- Model or ModelService updates (can affect performance)
+
+####2) Fix code merge conflicts and test any migrations against a local database.
+
+Since we've modified [multiple files](#primary-differences), you'll need to make sure changes (theirs or ours) aren't accidentally overwritten. You'll also want to test migrations against a recent copy of our database so that any Sites, Blocks, or Attributes we may have tweaked don't cause dependency problems.
+
+####3) Merge [NewSpring/pre-alpha-release](../../tree/pre-alpha-release) into [NewSpring/alpha](../../tree/alpha).
+
+Alpha is our "did anything break?" environment and is set to automatically deploy when code is committed. Click [here](../../compare/alpha...NewSpring:pre-alpha-release) to start the PR to [NewSpring/alpha](../../tree/alpha).
+
+####4) Merge [NewSpring/alpha](../../tree/alpha) into [NewSpring/beta](../../tree/beta) and deploy.
+
+Beta is our "does everything work?" environment and does *not* automatically deploy when code is committed. Click [here](../../compare/beta...NewSpring:alpha) to start the PR to [NewSpring/beta](../../tree/beta).
+
+####5) Document all feature changes for the Web Operations team to review.
+
+If you reviewed well in step one, you'll have a list of changes to send for testing on Beta. You'll want to document the default behavior as well as expected error states. You may also need to clarify where the new or updated feature lives.
+
+####6) After Operations signoff, merge [NewSpring/beta](../../tree/beta) into [NewSpring/master](../../tree/master) and deploy.
+
+Master is our "go live" environment and does *not* automatically deploy. After a successful build, you'll need to trigger a deploy from Appveyor during planned or co-ordinated downtime.
+
+####7) Clear cache on newly deployed servers.
+
+It's a good idea to clear cache on the Rock and Check-in servers after a deploy, so that any changes to Sites, Blocks, or Attributes are immediately present. Theoretically IIS should pick up those changes after a restart, but it occasionally doesn't.
+
+
+## Learn More
+
+Jump over to our [Rock website](http://www.rockrms.com/) to find out more. You can also:
+
+- [Read our blog](http://www.rockrms.com/Rock/Connect)
+- [Follow us on Twitter](http://www.twitter.com/therockrms)
+- [Like us on Facebook](http://www.facebook.com/therockrms)
+- [Read the community Q & A](http://www.rockrms.com/Rock/Ask)
+- [Subscribe to our newsletter](http://www.rockrms.com/Rock/Subscribe)
+
+
+## Community
+
+Rock is crafted by a community of developers led by the [Spark Development Network](http://www.sparkdevnetwork.com/). You can join us on the forums at [Rock RMS](http://www.rockrms.com/Rock/Ask) or on our [Slack channel](http://rockrms.com/slack).
+
+
+## License
+
+Rock is released under the open-source [Rock Community License](http://www.rockrms.com/license).
diff --git a/Rock.Checkr/App.config b/Rock.Checkr/App.config
index bda403d519c..aed6ddf1db0 100644
--- a/Rock.Checkr/App.config
+++ b/Rock.Checkr/App.config
@@ -1,7 +1,7 @@
-
+
diff --git a/Rock.Client/CodeGenerated/FinancialStatementTemplate.cs b/Rock.Client/CodeGenerated/FinancialStatementTemplate.cs
index da8acc51059..062afe279a1 100644
--- a/Rock.Client/CodeGenerated/FinancialStatementTemplate.cs
+++ b/Rock.Client/CodeGenerated/FinancialStatementTemplate.cs
@@ -128,12 +128,12 @@ public partial class FinancialStatementTemplate : FinancialStatementTemplateEnti
public BinaryFile LogoBinaryFile { get; set; }
///
- /// NOTE: Attributes are only populated when ?loadAttributes is specified. Options for loadAttributes are true, false, 'simple', 'expanded'
+ /// NOTE: Attributes are only populated when ?loadAttributes is specified. Options for loadAttributes are true, false, 'simple', 'expanded'
///
public Dictionary Attributes { get; set; }
///
- /// NOTE: AttributeValues are only populated when ?loadAttributes is specified. Options for loadAttributes are true, false, 'simple', 'expanded'
+ /// NOTE: AttributeValues are only populated when ?loadAttributes is specified. Options for loadAttributes are true, false, 'simple', 'expanded'
///
public Dictionary AttributeValues { get; set; }
}
diff --git a/Rock.Client/CodeGenerated/Person.cs b/Rock.Client/CodeGenerated/Person.cs
index 6cecedf31be..a3be3e1b5bf 100644
--- a/Rock.Client/CodeGenerated/Person.cs
+++ b/Rock.Client/CodeGenerated/Person.cs
@@ -97,6 +97,9 @@ public partial class PersonEntity
///
public int? GivingGroupId { get; set; }
+ ///
+ public string GivingId { get; set; }
+
///
public int GivingLeaderId { get; set; }
@@ -263,6 +266,7 @@ public void CopyPropertiesFrom( Person source )
this.ForeignKey = source.ForeignKey;
this.Gender = source.Gender;
this.GivingGroupId = source.GivingGroupId;
+ this.GivingId = source.GivingId;
this.GivingLeaderId = source.GivingLeaderId;
this.GradeOffset = source.GradeOffset;
this.GraduationYear = source.GraduationYear;
diff --git a/Rock.Client/Rock.Client.csproj b/Rock.Client/Rock.Client.csproj
index 593a8a1bb1b..f2d5c9e213b 100644
--- a/Rock.Client/Rock.Client.csproj
+++ b/Rock.Client/Rock.Client.csproj
@@ -361,7 +361,7 @@
-
diff --git a/Rock.Migrations/Migrations/202105112104432_CodeGenerated_0511.Designer.cs b/Rock.Migrations/Migrations/202105112104432_CodeGenerated_0511.Designer.cs
new file mode 100644
index 00000000000..daf75d0c863
--- /dev/null
+++ b/Rock.Migrations/Migrations/202105112104432_CodeGenerated_0511.Designer.cs
@@ -0,0 +1,29 @@
+//
+namespace Rock.Migrations
+{
+ using System.CodeDom.Compiler;
+ using System.Data.Entity.Migrations;
+ using System.Data.Entity.Migrations.Infrastructure;
+ using System.Resources;
+
+ [GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
+ public sealed partial class CodeGenerated_0511 : IMigrationMetadata
+ {
+ private readonly ResourceManager Resources = new ResourceManager(typeof(GivingAnalyticsUpdates));
+
+ string IMigrationMetadata.Id
+ {
+ get { return "202105112104432_CodeGenerated_0511"; }
+ }
+
+ string IMigrationMetadata.Source
+ {
+ get { return null; }
+ }
+
+ string IMigrationMetadata.Target
+ {
+ get { return Resources.GetString("Target"); }
+ }
+ }
+}
diff --git a/Rock.Migrations/Migrations/202105112104432_CodeGenerated_0511.cs b/Rock.Migrations/Migrations/202105112104432_CodeGenerated_0511.cs
new file mode 100644
index 00000000000..7d887b92b48
--- /dev/null
+++ b/Rock.Migrations/Migrations/202105112104432_CodeGenerated_0511.cs
@@ -0,0 +1,79 @@
+//
+// Copyright by the Spark Development Network
+//
+// Licensed under the Rock Community License (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.rockrms.com/license
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+namespace Rock.Migrations
+{
+ using System;
+ using System.Data.Entity.Migrations;
+
+ ///
+ ///
+ ///
+ public partial class CodeGenerated_0511 : Rock.Migrations.RockMigration
+ {
+ ///
+ /// Operations to be performed during the upgrade process.
+ ///
+ public override void Up()
+ {
+
+ // Add/Update BlockType Financial Statement Template Detail
+ RockMigrationHelper.UpdateBlockType("Financial Statement Template Detail","Displays the details of the statement template.","~/Blocks/Finance/FinancialStatementTemplateDetail.ascx","Finance","230D14B7-27C1-4968-B479-7A2A784DF173");
+
+ // Add/Update BlockType Financial Statement Template List
+ RockMigrationHelper.UpdateBlockType("Financial Statement Template List","Block used to list statement templates.","~/Blocks/Finance/FinancialStatementTemplateList.ascx","Finance","E4332C68-4848-4FA5-99EC-A1CED7F136E3");
+
+ // Attribute for BlockType: Personal Step List:Show Start Date Column
+ RockMigrationHelper.AddOrUpdateBlockTypeAttribute( "5D5EB7BA-A9CE-4801-8168-6CA8ECD354D4", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Show Start Date Column", "ShowStartedDateColumn", "Show Start Date Column", @"Should the step start date be shown on the grid and card display?", 6, @"True", "6DA865D9-90F6-4887-B78D-896BE13B052B" );
+
+ // Attribute for BlockType: Financial Statement Template List:core.EnableDefaultWorkflowLauncher
+ RockMigrationHelper.AddOrUpdateBlockTypeAttribute( "E4332C68-4848-4FA5-99EC-A1CED7F136E3", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "core.EnableDefaultWorkflowLauncher", "core.EnableDefaultWorkflowLauncher", "core.EnableDefaultWorkflowLauncher", @"", 0, @"True", "67768ACD-2D6E-4319-96D0-60F9444C4DCF" );
+
+ // Attribute for BlockType: Financial Statement Template List:Detail Page
+ RockMigrationHelper.AddOrUpdateBlockTypeAttribute( "E4332C68-4848-4FA5-99EC-A1CED7F136E3", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Detail Page", "DetailPage", "Detail Page", @"", 0, @"", "D969C71E-A01E-402A-9424-4F21890F85B3" );
+
+ // Attribute for BlockType: Financial Statement Template List:core.CustomActionsConfigs
+ RockMigrationHelper.AddOrUpdateBlockTypeAttribute( "E4332C68-4848-4FA5-99EC-A1CED7F136E3", "9C204CD0-1233-41C5-818A-C5DA439445AA", "core.CustomActionsConfigs", "core.CustomActionsConfigs", "core.CustomActionsConfigs", @"", 0, @"", "8F230C83-FB02-4BBD-A351-3627F3393102" );
+
+ }
+
+ ///
+ /// Operations to be performed during the downgrade process.
+ ///
+ public override void Down()
+ {
+
+ // core.EnableDefaultWorkflowLauncher Attribute for BlockType: Financial Statement Template List
+ RockMigrationHelper.DeleteAttribute("67768ACD-2D6E-4319-96D0-60F9444C4DCF");
+
+ // core.CustomActionsConfigs Attribute for BlockType: Financial Statement Template List
+ RockMigrationHelper.DeleteAttribute("8F230C83-FB02-4BBD-A351-3627F3393102");
+
+ // Detail Page Attribute for BlockType: Financial Statement Template List
+ RockMigrationHelper.DeleteAttribute("D969C71E-A01E-402A-9424-4F21890F85B3");
+
+ // Show Start Date Column Attribute for BlockType: Personal Step List
+ RockMigrationHelper.DeleteAttribute("6DA865D9-90F6-4887-B78D-896BE13B052B");
+
+ // Delete BlockType Financial Statement Template List
+ RockMigrationHelper.DeleteBlockType("E4332C68-4848-4FA5-99EC-A1CED7F136E3"); // Financial Statement Template List
+
+ // Delete BlockType Financial Statement Template Detail
+ RockMigrationHelper.DeleteBlockType("230D14B7-27C1-4968-B479-7A2A784DF173"); // Financial Statement Template Detail
+
+ }
+ }
+}
diff --git a/Rock.Migrations/Migrations/202105112104432_CodeGenerated_0511.resx b/Rock.Migrations/Migrations/202105112104432_CodeGenerated_0511.resx
new file mode 100644
index 00000000000..6c121c4dba6
--- /dev/null
+++ b/Rock.Migrations/Migrations/202105112104432_CodeGenerated_0511.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ dbo
+
+
\ No newline at end of file
diff --git a/Rock.MyWell/app.config b/Rock.MyWell/app.config
index f3c84a5e827..0a3705fa180 100644
--- a/Rock.MyWell/app.config
+++ b/Rock.MyWell/app.config
@@ -1,7 +1,7 @@
-
+
diff --git a/Rock.PayFlowPro/app.config b/Rock.PayFlowPro/app.config
index bda403d519c..aed6ddf1db0 100644
--- a/Rock.PayFlowPro/app.config
+++ b/Rock.PayFlowPro/app.config
@@ -1,7 +1,7 @@
-
+
diff --git a/Rock.Rest/App.config b/Rock.Rest/App.config
index 71ae8dd04d1..cb4634860bc 100644
--- a/Rock.Rest/App.config
+++ b/Rock.Rest/App.config
@@ -1,7 +1,7 @@
-
+
diff --git a/Rock.Rest/Controllers/DataViewsController.Partial.cs b/Rock.Rest/Controllers/DataViewsController.Partial.cs
new file mode 100644
index 00000000000..1f817da052e
--- /dev/null
+++ b/Rock.Rest/Controllers/DataViewsController.Partial.cs
@@ -0,0 +1,68 @@
+//
+// Copyright by the Spark Development Network
+//
+// Licensed under the Rock Community License (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.rockrms.com/license
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+
+using System.Linq;
+using System.Web.Http;
+using System.Web.Http.OData;
+
+using Rock.Data;
+using Rock.Model;
+using Rock.Rest.Filters;
+
+namespace Rock.Rest.Controllers
+{
+ ///
+ /// DataViews REST API
+ ///
+ public partial class DataViewsController
+ {
+ #region DataViewByPerson
+
+ ///
+ /// Returns a list of dataviews that a person is a part of
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ [EnableQuery]
+ [Authenticate, Secured]
+ [System.Web.Http.Route( "api/DataViews/GetPersistedDataViewsForEntity/{entityTypeId}/{entityId}" )]
+ public IQueryable GetPersistedDataViewsForEntity( int entityTypeId, int entityId, System.Guid? categoryGuid = null, int categoryId = 0 )
+ {
+ var rockContext = new RockContext();
+ // Get the data view guids from the DataViewPersistedValues table that the Person Id is a part of
+ var persistedValuesQuery = rockContext.DataViewPersistedValues.Where( a => a.EntityId == entityId && a.DataView.EntityTypeId == entityTypeId );
+ IQueryable dataViewList = persistedValuesQuery.Select( a => a.DataView );
+ if ( categoryGuid != null )
+ {
+ dataViewList = dataViewList.Where( a => a.Category.Guid == categoryGuid );
+ }
+ if ( categoryId != 0 )
+ {
+ dataViewList = dataViewList.Where( a => a.CategoryId == categoryId );
+ }
+
+ // Return DataView as IQueryable
+ return dataViewList;
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Rock.Rest/Controllers/GroupFinderController.cs b/Rock.Rest/Controllers/GroupFinderController.cs
new file mode 100644
index 00000000000..6cbcf2d4d2f
--- /dev/null
+++ b/Rock.Rest/Controllers/GroupFinderController.cs
@@ -0,0 +1,318 @@
+//
+// Copyright by the Spark Development Network
+//
+// Licensed under the Rock Community License (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.rockrms.com/license
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+using System;
+using System.Collections.Generic;
+using System.Data.Entity.Spatial;
+using System.Linq;
+using System.Net;
+using System.Web.Http;
+using System.Web.Http.OData;
+using Rock;
+using Rock.Data;
+using Rock.Model;
+using Rock.Rest.Filters;
+using Rock.Web.Cache;
+
+namespace Rock.Rest.Controllers
+{
+ ///
+ /// Group Finder API
+ ///
+ public class GroupFinderController : ApiControllerBase
+ {
+ ///
+ /// Returns a list of all groups querying primarily based on the postal code and then sort based on distance from
+ /// a given zip code to the meeting location of a group.
+ ///
+ /// The postal code.
+ /// The group type id
+ /// The comma seperated representation of the group schedules.
+ /// The comma seperated representation of the group campuses.
+ /// The list of tags
+ /// The Childcare value.
+ ///
+ /// Returns the list of all groups.
+ ///
+ [HttpGet]
+ [EnableQuery]
+ [Authenticate, Secured]
+ [System.Web.Http.Route("api/GroupFinder")]
+ public IQueryable GetGroups(int postalCode, int groupTypeId, string schedules = null, string campuses = null, string tags = null, bool? kidFriendly = null)
+ {
+ var groupList = new List();
+
+ using (var rockContext = new RockContext())
+ {
+ var mapCoordinate = new LocationService(rockContext).GetMapCoordinateFromPostalCode(postalCode.ToString());
+ if (mapCoordinate == null)
+ {
+ throw new HttpResponseException(HttpStatusCode.BadRequest);
+ }
+
+ var groups = new GroupService(rockContext).Queryable().Where(a => a.GroupTypeId == groupTypeId && a.IsActive == true && a.IsPublic == true && a.IsArchived == false);
+
+ if (schedules.IsNotNullOrWhiteSpace())
+ {
+ var dayOfWeeks = schedules.SplitDelimitedValues(false).Select(a => a.ConvertToEnumOrNull()).Where(a => a.HasValue).ToList();
+ groups = groups.Where(a => a.Schedule.WeeklyDayOfWeek.HasValue && dayOfWeeks.Contains(a.Schedule.WeeklyDayOfWeek));
+ }
+
+ if (campuses.IsNotNullOrWhiteSpace())
+ {
+ var campusIds = campuses.SplitDelimitedValues().AsIntegerList();
+ groups = groups.Where(a => a.CampusId.HasValue && campusIds.Contains(a.CampusId.Value));
+ }
+
+ foreach (var group in groups)
+ {
+ group.LoadAttributes(rockContext);
+ var childcare = group.GetAttributeValue("Childcare").AsBoolean();
+
+ if (tags.IsNotNullOrWhiteSpace())
+ {
+ var tagValues = tags.SplitDelimitedValues(false);
+ var groupTags = group.AttributeValues["Tags"].ValueFormatted.SplitDelimitedValues(false).Union(group.AttributeValues["Category"].ValueFormatted.SplitDelimitedValues(false));
+ if (!groupTags.Any(a => tagValues.Contains(a, StringComparer.OrdinalIgnoreCase)))
+ {
+ continue;
+ }
+ }
+
+ if (!kidFriendly.HasValue || (kidFriendly.HasValue && childcare == kidFriendly.Value))
+ {
+ var meetingLocationTypeId = DefinedValueCache.Get(Rock.SystemGuid.DefinedValue.GROUP_LOCATION_TYPE_MEETING_LOCATION).Id;
+
+ var smallGroup = new SmallGroup()
+ {
+ IsActive = group.IsActive,
+ IsPublic = group.IsPublic,
+ IsArchived = group.IsArchived,
+ Description = group.Description,
+ Guid = group.Guid,
+ Id = group.Id,
+ KidFriendly = childcare,
+ Name = group.Name,
+ Campus = group.Campus?.Name,
+ CampusId = group.CampusId,
+ Schedule = group.Schedule?.FriendlyScheduleText
+ };
+
+ var location = group.GroupLocations.Where(a => a.GroupLocationTypeValueId == meetingLocationTypeId).Select(a => a.Location).FirstOrDefault();
+ if (location != null && location.GeoPoint != null)
+ {
+
+ smallGroup.GroupLocation = new MapCoordinate()
+ {
+ Latitude = location.Latitude,
+ Longitude = location.Longitude
+ };
+ string geoText = string.Format("POINT({0} {1})", mapCoordinate.Longitude, mapCoordinate.Latitude);
+ DbGeography geoPoint = DbGeography.FromText(geoText);
+ var distance = location.GeoPoint.Distance(geoPoint);
+
+ if (distance.HasValue)
+ {
+ smallGroup.Distance = Math.Round(distance.Value * 0.00062137, 2);
+ }
+ }
+
+ if (group.AttributeValues.ContainsKey("Topic"))
+ {
+ smallGroup.Topic = group.AttributeValues["Topic"].ValueFormatted;
+ }
+
+ var ageRange = group.GetAttributeValue("AgeRange").SplitDelimitedValues(false);
+ if (ageRange.Length == 2)
+ {
+ smallGroup.AgeRange = ageRange.Select(a => a.AsInteger()).OrderBy(a => a).ToArray();
+ }
+
+ if (group.AttributeValues.ContainsKey("Tags"))
+ {
+ smallGroup.Tags = group.AttributeValues["Tags"].ValueFormatted.SplitDelimitedValues(false);
+ }
+
+ if (group.AttributeValues.ContainsKey("GroupPhoto"))
+ {
+ smallGroup.Photo = group.AttributeValues["GroupPhoto"].ValueFormatted;
+ }
+
+ if (group.AttributeValues.ContainsKey("Type"))
+ {
+ smallGroup.Type = group.AttributeValues["Type"].ValueFormatted;
+ }
+
+ groupList.Add(smallGroup);
+ }
+ }
+ }
+ return groupList.OrderBy(a => a.Distance.GetValueOrDefault(double.MaxValue)).AsQueryable();
+ }
+
+ ///
+ ///
+ ///
+ public class SmallGroup
+ {
+
+ ///
+ /// Gets or sets the IsActive
+ ///
+ ///
+ /// The status of this group.
+ ///
+ public bool IsActive { get; set; }
+
+ ///
+ /// Gets or sets IsPublic
+ ///
+ ///
+ /// The public/private status of this group.
+ ///
+ public bool IsPublic { get; set; }
+
+ ///
+ /// Gets or sets IsArchived
+ ///
+ ///
+ /// The archived status of this group.
+ ///
+ public bool IsArchived { get; set; }
+
+ ///
+ /// Gets or sets the group identifier.
+ ///
+ ///
+ /// The group identifier.
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// Gets or sets the Name of the Group. This property is required.
+ ///
+ ///
+ /// A representing the name of the Group.
+ ///
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the description of the group.
+ ///
+ ///
+ /// A representing the description of the group.
+ ///
+ public string Description { get; set; }
+
+ ///
+ /// Gets or sets a value that is a guaranteed unique identifier for the group.
+ ///
+ ///
+ /// A value that will uniquely identify the Group.
+ ///
+ public Guid Guid { get; set; }
+
+ ///
+ /// Gets or sets the distance of the group meeting location and postal code.
+ ///
+ ///
+ /// The distance of the group meeting location and postal code.
+ ///
+ public double? Distance { get; set; }
+
+ ///
+ /// Gets or sets the kid friendly.
+ ///
+ ///
+ /// The kid friendly.
+ ///
+ public bool KidFriendly { get; set; }
+
+ ///
+ /// Gets or sets the group location.
+ ///
+ ///
+ /// The group location.
+ ///
+ public MapCoordinate GroupLocation { get; set; }
+
+ ///
+ /// Gets or sets the topic.
+ ///
+ ///
+ /// The topic.
+ ///
+ public string Topic { get; set; }
+
+ ///
+ /// Gets or sets the campus name.
+ ///
+ ///
+ /// The campus name.
+ ///
+ public string Campus { get; set; }
+
+ ///
+ /// Gets or sets the campus identifier.
+ ///
+ ///
+ /// The campus identifier.
+ ///
+ public int? CampusId { get; set; }
+
+ ///
+ /// Gets or sets the age range.
+ ///
+ ///
+ /// The age range.
+ ///
+ public int[] AgeRange { get; set; }
+
+ ///
+ /// Gets or sets the photo.
+ ///
+ ///
+ /// The photo.
+ ///
+ public string Photo { get; set; }
+
+ ///
+ /// Gets or sets the schedule.
+ ///
+ ///
+ /// The schedule.
+ ///
+ public string Schedule { get; set; }
+
+ ///
+ /// Gets or sets the tags.
+ ///
+ ///
+ /// The tags.
+ ///
+ public string[] Tags { get; set; }
+
+ ///
+ /// Gets or sets the type.
+ ///
+ ///
+ /// The type.
+ ///
+ public string Type { get; set; }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Rock.Security.Authentication.Auth0/app.config b/Rock.Security.Authentication.Auth0/app.config
index 4a3a7820572..98c3282f93b 100644
--- a/Rock.Security.Authentication.Auth0/app.config
+++ b/Rock.Security.Authentication.Auth0/app.config
@@ -1,7 +1,7 @@
-
+
diff --git a/Rock.SendGrid/App.config b/Rock.SendGrid/App.config
index bda403d519c..aed6ddf1db0 100644
--- a/Rock.SendGrid/App.config
+++ b/Rock.SendGrid/App.config
@@ -1,7 +1,7 @@
-
+
diff --git a/Rock.Slingshot/app.config b/Rock.Slingshot/app.config
index eb42d37ebec..e8088d425bd 100644
--- a/Rock.Slingshot/app.config
+++ b/Rock.Slingshot/app.config
@@ -1,7 +1,7 @@
-
+
diff --git a/Rock.StatementGenerator/Rest/Obsolete/StatementGeneratorFinancialTransactionsController.cs b/Rock.StatementGenerator/Rest/Obsolete/StatementGeneratorFinancialTransactionsController.cs
index 82ebf90b7de..5bb50647d2e 100644
--- a/Rock.StatementGenerator/Rest/Obsolete/StatementGeneratorFinancialTransactionsController.cs
+++ b/Rock.StatementGenerator/Rest/Obsolete/StatementGeneratorFinancialTransactionsController.cs
@@ -100,9 +100,9 @@ public List GetStatementGeneratorRecipients( [FromB
GroupId = a.Value
} ).Distinct();
- // Get Persons and their GroupId(s) that do not have GivingGroupId and have transactions that match the filter.
- // These are the persons that give as individuals vs as part of a group. We need the Groups (families they belong to) in order
- // to determine which address(es) the statements need to be mailed to
+ // Get Persons and their GroupId(s) that do not have GivingGroupId and have transactions that match the filter.
+ // These are the persons that give as individuals vs as part of a group. We need the Groups (families they belong to) in order
+ // to determine which address(es) the statements need to be mailed to
var groupTypeIdFamily = GroupTypeCache.GetFamilyGroupType().Id;
var groupMembersQry = new GroupMemberService( rockContext ).Queryable( true ).Where( m => m.Group.GroupTypeId == groupTypeIdFamily );
@@ -668,10 +668,10 @@ private static StatementGeneratorRecipientResult GenerateStatementGeneratorRecip
//// Pledges but organized by Account (in case more than one pledge goes to the same account)
//// NOTE: In the case of multiple pledges to the same account (just in case they accidently or intentionally had multiple pledges to the same account)
//// -- Date Range
- //// -- StartDate: Earliest StartDate of all the pledges for that account
+ //// -- StartDate: Earliest StartDate of all the pledges for that account
//// -- EndDate: Lastest EndDate of all the pledges for that account
//// -- Amount Pledged: Sum of all Pledges to that account
- //// -- Amount Given:
+ //// -- Amount Given:
//// -- The sum of transaction amounts to that account between
//// -- Start Date: Earliest Start Date of all the pledges to that account
//// -- End Date: Whatever is earlier (Statement End Date or Pledges' End Date)
diff --git a/Rock.StatementGenerator/app.config b/Rock.StatementGenerator/app.config
index 1b1cdeb9cac..44fbb66a41b 100644
--- a/Rock.StatementGenerator/app.config
+++ b/Rock.StatementGenerator/app.config
@@ -1,7 +1,7 @@
-
+
diff --git a/Rock.Tests.Integration/Modules/Core/Lava/Commands/SqlTests.cs b/Rock.Tests.Integration/Modules/Core/Lava/Commands/SqlTests.cs
index 40efe20ae65..fd205f88c26 100644
--- a/Rock.Tests.Integration/Modules/Core/Lava/Commands/SqlTests.cs
+++ b/Rock.Tests.Integration/Modules/Core/Lava/Commands/SqlTests.cs
@@ -201,7 +201,7 @@ public void SqlSelectShortTimeoutShouldFail()
var lavaScript = @"{% sql timeout:'10' %}
WAITFOR DELAY '00:00:20';
- SELECT TOP 5 *
+ SELECT TOP 5 *
FROM Person
{% endsql %}
@@ -229,7 +229,7 @@ public void SqlSelectLongTimeoutShouldPass()
var lavaScript = @"{% sql timeout:'40' %}
WAITFOR DELAY '00:00:35';
- SELECT TOP 5 *
+ SELECT TOP 5 *
FROM Person
{% endsql %}
@@ -255,7 +255,7 @@ public void SqlSelectNoTimeoutShouldPass()
{
var lavaScript = @"{% sql %}
- SELECT TOP 5 *
+ SELECT TOP 5 *
FROM Person
{% endsql %}
@@ -283,7 +283,7 @@ public void SqlSelectNoTimeoutButQueryLongerThen30SecondsShouldFail()
var lavaScript = @"{% sql %}
WAITFOR DELAY '00:00:35';
- SELECT TOP 5 *
+ SELECT TOP 5 *
FROM Person
{% endsql %}
diff --git a/Rock.Tests.Integration/Modules/Core/Lava/FileSystem/LavaFileSystemTests.cs b/Rock.Tests.Integration/Modules/Core/Lava/FileSystem/LavaFileSystemTests.cs
index 31a1bfeff5d..7c93d93775c 100644
--- a/Rock.Tests.Integration/Modules/Core/Lava/FileSystem/LavaFileSystemTests.cs
+++ b/Rock.Tests.Integration/Modules/Core/Lava/FileSystem/LavaFileSystemTests.cs
@@ -155,7 +155,7 @@ private MockFileProvider GetMockFileProvider()
// Add a lava template that references merge fields from the outer template.
var contactDetailsTemplate = @"
Mobile: {{ mobilePhone }}
-Home: {{ homePhone }}
+Home: {{ homePhone }}
Work: {{ workPhone }}
Email: {{ email }}
";
diff --git a/Rock.Tests.Integration/Modules/Core/Lava/LavaIntegrationTestHelper.cs b/Rock.Tests.Integration/Modules/Core/Lava/LavaIntegrationTestHelper.cs
index 36c9acac7be..40bed4a2187 100644
--- a/Rock.Tests.Integration/Modules/Core/Lava/LavaIntegrationTestHelper.cs
+++ b/Rock.Tests.Integration/Modules/Core/Lava/LavaIntegrationTestHelper.cs
@@ -517,7 +517,6 @@ public string GetTemplateOutput( ILavaEngine engine, string inputTemplate, LavaD
return result.Text;
}
-
///
/// Process the specified input template and return the result.
///
diff --git a/Rock.Tests.Performance/app.config b/Rock.Tests.Performance/app.config
index 344c2ee84c4..69a84f571cb 100644
--- a/Rock.Tests.Performance/app.config
+++ b/Rock.Tests.Performance/app.config
@@ -18,7 +18,6 @@
-
@@ -59,7 +58,7 @@
-
+
@@ -95,7 +94,7 @@
-
+
@@ -103,7 +102,7 @@
-
+
@@ -115,7 +114,7 @@
-
+
@@ -143,38 +142,10 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Rock.Tests.UnitTests/Rock.Tests.UnitTests.csproj b/Rock.Tests.UnitTests/Rock.Tests.UnitTests.csproj
index 1fdf1576912..94b8da921d7 100644
--- a/Rock.Tests.UnitTests/Rock.Tests.UnitTests.csproj
+++ b/Rock.Tests.UnitTests/Rock.Tests.UnitTests.csproj
@@ -267,7 +267,7 @@
-
diff --git a/Rock.Update/App.config b/Rock.Update/App.config
index 56a52364c4b..56dd7b986a9 100644
--- a/Rock.Update/App.config
+++ b/Rock.Update/App.config
@@ -1,7 +1,7 @@
-
+
diff --git a/Rock.Version/AssemblySharedInfo.cs b/Rock.Version/AssemblySharedInfo.cs
index e31e423b833..e985cc64959 100644
--- a/Rock.Version/AssemblySharedInfo.cs
+++ b/Rock.Version/AssemblySharedInfo.cs
@@ -16,15 +16,15 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-//
+//
// This code was generated by a tool. Any changes made manually will be lost
// the next time this code is regenerated.
-//
+//
//
//
using System.Reflection;
-// General Information about an assembly is controlled through the following
+// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyDescription( "Rock RMS Core Assembly. Rock RMS is a community supported open-source Church Management System that provides innovative features to churches of all sizes." )]
@@ -36,7 +36,7 @@
[assembly: AssemblyConfiguration( "" )]
// WARNING: Before you monkey with any of these values
-// make sure you read "The bottom line:" in this article:
+// make sure you read "The bottom line:" in this article:
// http://stackoverflow.com/questions/64602/what-are-differences-between-assemblyversion-assemblyfileversion-and-assemblyin
// The AssemblyVersion number should change only when we are
@@ -46,9 +46,9 @@
[assembly: AssemblyFileVersion( "1.17.0.5" )]
-// This is the "official" product name that will be shown to people.
+// This is the "official" product name that will be shown to people.
// It's shown in the SystemInfo details and perhaps the RockUpdate page.
[assembly: AssemblyInformationalVersion( "Rock McKinley 17.0" )]
-
+
diff --git a/Rock.WebStartup/RockApplicationStartupHelper.cs b/Rock.WebStartup/RockApplicationStartupHelper.cs
index dac27533cd1..a972edf322c 100644
--- a/Rock.WebStartup/RockApplicationStartupHelper.cs
+++ b/Rock.WebStartup/RockApplicationStartupHelper.cs
@@ -1183,4 +1183,4 @@ private static Assembly AppDomain_AssemblyResolve( object sender, ResolveEventAr
return null;
}
}
-}
+}
\ No newline at end of file
diff --git a/Rock.sln b/Rock.sln
index 76911cce02e..0fd02aab98f 100644
--- a/Rock.sln
+++ b/Rock.sln
@@ -1,13 +1,9 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.3.32804.467
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.32002.261
MinimumVisualStudioVersion = 10.0.40219.1
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "RockWeb", "RockWeb\", "{E43B5D55-BED0-4E74-BF97-9327F9A9D656}"
- ProjectSection(ProjectDependencies) = postProject
- {11ACFF28-4199-450B-8A43-F59ADEF63A99} = {11ACFF28-4199-450B-8A43-F59ADEF63A99}
- {A4FB4B9B-3564-4C25-938C-4350A9515B24} = {A4FB4B9B-3564-4C25-938C-4350A9515B24}
- EndProjectSection
ProjectSection(WebsiteProperties) = preProject
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.7.2"
ProjectReferences = "{185a31d7-3037-4dae-8797-0459849a84bd}|Rock.dll;{d6b19c0d-da5e-4f75-8001-04ded86b741f}|Rock.Mailgun.dll;{f3692909-952d-4c4a-b2d2-d90d0083cf53}|Rock.NMI.dll;{a005d091-140e-4ec4-bcdf-cf7d42bb702c}|Rock.PayFlowPro.dll;{add1edd0-a4cb-4e82-b6ad-6ad1d556deae}|Rock.Rest.dll;{6fe0930c-6832-4c2f-8a76-d4e4a2d80ddf}|Rock.Version.dll;{1f5956f2-2b0f-49b8-aaf1-2cc28f01426a}|Rock.SignNow.dll;{69AC175C-3997-4514-8C9E-5D24811928C2}|SignNowSDK.dll;{c1dd2402-5fb2-411e-bf8d-5d9cb3a58e8b}|Rock.Slingshot.dll;{962944DE-8BF4-4175-B55A-E75CF7918272}|Rock.Slingshot.Model.dll;{42edf2dd-5284-4b64-93c3-5186619d2b14}|Rock.StatementGenerator.dll;{5055f482-72c7-4cc9-8ed0-a77090c777db}|Rock.Security.Authentication.Auth0.dll;{515e22e4-4b9b-4886-8477-e5b312b75eb4}|Rock.WebStartup.dll;{94a5f880-31ae-4889-b9be-ba1fdc258e83}|Rock.Checkr.dll;{cadd9206-2c6b-42e4-b20b-2dfc3eb4d6d4}|Rock.DownhillCss.dll;{13711bed-69dd-4182-9bb5-b3c9a4de32df}|Rock.MyWell.dll;{205f439a-2ccc-42c1-b1ab-09e1b629d88c}|Rock.SendGrid.dll;{8ccb8e2a-073c-48cb-b31a-621ec5430a42}|Rock.Oidc.dll;{37E293DD-F282-4A34-91FA-5FB8503D5672}|Rock.Lava.dll;{8820CD93-70EE-496D-B17B-0C4C68DD4957}|Rock.Lava.Shared.dll;{50174698-828B-49FB-8DD6-6F9D1B4651A4}|Rock.Common.Web.dll;{13568622-324E-4493-B605-C9896E725D30}|Rock.Common.dll;{00EDCB8D-EF33-459C-AD62-02876BD24DFF}|DotLiquid.dll;{b62b27c8-1f77-43cf-8ee7-30de7f93facd}|Rock.Update.dll;{E8C5F154-201F-4C67-BCDC-34787DEFFEAE}|Rock.Blocks.dll;{05baaf85-9c53-4ccd-a535-036427b0df72}|Rock.ViewModels.dll;{79AA470A-DC63-4CB4-B0B6-77285F60C69B}|Rock.Lava.DotLiquid.dll;{AFCE6F84-BF3A-4182-A816-8FB47AFC0305}|Rock.Lava.Fluid.dll;{61DECE2B-0434-435E-8D65-49A4FDF98365}|Rock.Enums.dll;{704740D8-B539-4560-9F8C-681670C9D6AD}|Rock.Migrations.dll;{bab8bf5e-6457-4668-adf1-b917100ba7cd}|Rock.AI.OpenAI.dll;"
@@ -28,6 +24,10 @@ Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "RockWeb", "RockWeb\", "{E43
VWDPort = "6229"
SlnRelativePath = "RockWeb\"
EndProjectSection
+ ProjectSection(ProjectDependencies) = postProject
+ {11ACFF28-4199-450B-8A43-F59ADEF63A99} = {11ACFF28-4199-450B-8A43-F59ADEF63A99}
+ {A4FB4B9B-3564-4C25-938C-4350A9515B24} = {A4FB4B9B-3564-4C25-938C-4350A9515B24}
+ EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotLiquid", "DotLiquid\DotLiquid.csproj", "{00EDCB8D-EF33-459C-AD62-02876BD24DFF}"
EndProject
@@ -124,6 +124,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rock.Tests.Performance", "R
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rock.AI.OpenAI", "Rock.AI.OpenAI\Rock.AI.OpenAI.csproj", "{BAB8BF5E-6457-4668-ADF1-B917100BA7CD}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "apollosProject.OneSignal", "..\apollos-onesignal\apollosProject.OneSignal.csproj", "{237D789F-52EF-48EF-A213-8D2284A6DE6F}"
+ ProjectSection(ProjectDependencies) = postProject
+ {13568622-324E-4493-B605-C9896E725D30} = {13568622-324E-4493-B605-C9896E725D30}
+ {185A31D7-3037-4DAE-8797-0459849A84BD} = {185A31D7-3037-4DAE-8797-0459849A84BD}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -294,6 +300,10 @@ Global
{BAB8BF5E-6457-4668-ADF1-B917100BA7CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BAB8BF5E-6457-4668-ADF1-B917100BA7CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BAB8BF5E-6457-4668-ADF1-B917100BA7CD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {237D789F-52EF-48EF-A213-8D2284A6DE6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {237D789F-52EF-48EF-A213-8D2284A6DE6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {237D789F-52EF-48EF-A213-8D2284A6DE6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {237D789F-52EF-48EF-A213-8D2284A6DE6F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Rock/CheckIn/CheckInBlock.cs b/Rock/CheckIn/CheckInBlock.cs
index 5a938cd0eef..9cc972ed7c4 100644
--- a/Rock/CheckIn/CheckInBlock.cs
+++ b/Rock/CheckIn/CheckInBlock.cs
@@ -131,12 +131,12 @@ protected static class LavaMergeFieldName
public const string Individual = "Individual";
///
- /// Lava Merge field 'SelectedArea'
+ /// Lava Merge field 'SelectedArea'
///
public const string SelectedArea = "SelectedArea";
///
- /// Lava Merge field 'SelectedGroup'
+ /// Lava Merge field 'SelectedGroup'
///
public const string SelectedGroup = "SelectedGroup";
@@ -329,7 +329,7 @@ public struct CheckInCookie
}
///
- /// Gets a value indicating whether the kiosk has active group types and locations that
+ /// Gets a value indicating whether the kiosk has active group types and locations that
/// are open for check-in or check-out.
///
///
@@ -578,7 +578,7 @@ protected virtual List ProcessSelection( Rock.Web.UI.Controls.ModalAlert
///
/// Processes the selection, save state and navigates to the next page if no errors
- /// are encountered during processing the activity.
+ /// are encountered during processing the activity.
///
/// The modal alert control to show if errors occur.
/// A condition that must be met after processing
@@ -891,7 +891,7 @@ public virtual bool RequiresSelection( bool backingUp )
///
/// Loads a check-in block to determine if it will require a selection or not. This is used to find the
- /// next page/block that does require a selection so that user can be redirected once to that block,
+ /// next page/block that does require a selection so that user can be redirected once to that block,
/// rather than just continuously redirected to next/previous page blocks and possibly exceeding the maximum
/// number of redirects.
///
diff --git a/Rock/Communication/Transport/OneSignal.cs b/Rock/Communication/Transport/OneSignal.cs
new file mode 100644
index 00000000000..c3023254f4c
--- /dev/null
+++ b/Rock/Communication/Transport/OneSignal.cs
@@ -0,0 +1,287 @@
+//
+// Copyright by the Spark Development Network
+//
+// Licensed under the Rock Community License (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.rockrms.com/license
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.ComponentModel.Composition;
+using System.Linq;
+using System.Net.Mail;
+
+using Rock.Attribute;
+using Rock.Data;
+using Rock.Model;
+using Rock.Web.Cache;
+using Apollos.OneSignal.RestAPIv3.Client;
+using Apollos.OneSignal.RestAPIv3.Client.Resources;
+using Apollos.OneSignal.RestAPIv3.Client.Resources.Notifications;
+
+namespace Rock.Communication.Transport
+{
+ ///
+ /// Communication transport for sending push notifications using OneSignal
+ ///
+ [Description( "Sends a communication through OneSignal API" )]
+ [Export( typeof( TransportComponent ) )]
+ [ExportMetadata( "ComponentName", "OneSignal" )]
+ [TextField( "AppId", "The App Id for your OneSignal account", true, "", "", 1 )]
+ [TextField( "RestAPIKey", "The Rest API key for your OneSignal account", true, "", "", 2)]
+ class OneSignal : TransportComponent
+ {
+
+ ///
+ /// Sends the specified rock message.
+ ///
+ /// The rock message.
+ /// The medium entity type identifier.
+ /// The medium attributes.
+ /// The error messages.
+ ///
+ public override bool Send( RockMessage rockMessage, int mediumEntityTypeId, Dictionary mediumAttributes, out List errorMessages )
+ {
+ errorMessages = new List();
+
+ var pushMessage = rockMessage as RockPushMessage;
+ if ( pushMessage != null )
+ {
+ // Common Merge Field
+ var mergeFields = Lava.LavaHelper.GetCommonMergeFields( null, rockMessage.CurrentPerson );
+ foreach ( var mergeField in rockMessage.AdditionalMergeFields )
+ {
+ mergeFields.AddOrReplace( mergeField.Key, mergeField.Value );
+ }
+
+ var recipients = rockMessage.GetRecipients();
+ RockContext rockContext = new RockContext();
+
+ if ( pushMessage.SendSeperatelyToEachRecipient )
+ {
+ foreach ( var recipient in recipients )
+ {
+ try
+ {
+ foreach ( var mergeField in mergeFields )
+ {
+ recipient.MergeFields.AddOrIgnore( mergeField.Key, mergeField.Value );
+ }
+ Person recipientPerson = ( Person ) recipient.MergeFields.GetValueOrNull( "Person" );
+ string personAliasId = recipientPerson.Aliases.FirstOrDefault().Id.ToString();
+ PushMessage( new List { personAliasId }, pushMessage, recipient.MergeFields );
+ }
+ catch ( Exception ex )
+ {
+ errorMessages.Add( ex.Message );
+ ExceptionLogService.LogException( ex, null );
+ }
+ }
+ }
+ else
+ {
+ try
+ {
+ foreach( var recipient in recipients )
+ {
+ Person recipientPerson = (Person)mergeFields.GetValueOrNull("Person");
+ string personAliasId = recipientPerson.Aliases.FirstOrDefault().Id.ToString();
+ recipient.MergeFields.Add("PersonAliasId", personAliasId);
+ }
+ PushMessage( recipients.Select( r => r.MergeFields.GetValueOrNull("PersonAliasId").ToString() ).ToList(), pushMessage, mergeFields );
+ }
+ catch ( Exception ex )
+ {
+ errorMessages.Add( ex.Message );
+ ExceptionLogService.LogException( ex, null );
+ }
+ }
+ }
+
+ return !errorMessages.Any();
+
+ }
+
+ ///
+ /// Sends the specified communication from the Communication Wizard in Rock.
+ ///
+ /// The communication.
+ /// The medium entity type identifier.
+ /// The medium attributes.
+ ///
+ public override void Send( Model.Communication communication, int mediumEntityTypeId, Dictionary mediumAttributes )
+ {
+ using ( var communicationRockContext = new RockContext() )
+ {
+ // Requery the Communication
+ communication = new CommunicationService( communicationRockContext )
+ .Queryable( "CreatedByPersonAlias.Person" )
+ .FirstOrDefault( c => c.Id == communication.Id );
+
+ bool hasPendingRecipients;
+ if ( communication != null &&
+ communication.Status == Model.CommunicationStatus.Approved &&
+ ( !communication.FutureSendDateTime.HasValue || communication.FutureSendDateTime.Value.CompareTo( RockDateTime.Now ) <= 0 ) )
+ {
+ var qryRecipients = new CommunicationRecipientService( communicationRockContext ).Queryable();
+ hasPendingRecipients = qryRecipients
+ .Where( r =>
+ r.CommunicationId == communication.Id &&
+ r.Status == Model.CommunicationRecipientStatus.Pending &&
+ r.MediumEntityTypeId.HasValue &&
+ r.MediumEntityTypeId.Value == mediumEntityTypeId )
+ .Any();
+ }
+ else
+ {
+ hasPendingRecipients = false;
+ }
+
+ if ( hasPendingRecipients )
+ {
+ var currentPerson = communication.CreatedByPersonAlias?.Person;
+ var globalAttributes = GlobalAttributesCache.Get();
+ string publicAppRoot = globalAttributes.GetValue( "PublicApplicationRoot" ).EnsureTrailingForwardslash();
+ var mergeFields = Lava.LavaHelper.GetCommonMergeFields( null, currentPerson );
+
+ var personEntityTypeId = EntityTypeCache.Get( "Rock.Model.Person" ).Id;
+ var communicationEntityTypeId = EntityTypeCache.Get( "Rock.Model.Communication" ).Id;
+ var communicationCategoryId = CategoryCache.Get( Rock.SystemGuid.Category.HISTORY_PERSON_COMMUNICATIONS.AsGuid(), communicationRockContext ).Id;
+
+ bool recipientFound = true;
+ while ( recipientFound )
+ {
+ // make a new rockContext per recipient
+ var recipientRockContext = new RockContext();
+ var recipient = Model.Communication.GetNextPending( communication.Id, mediumEntityTypeId, recipientRockContext );
+ if (recipient != null)
+ {
+ if (ValidRecipient(recipient, communication.IsBulkCommunication))
+ {
+ if ( recipient.PersonAliasId.HasValue )
+ {
+ try
+ {
+ var mergeObjects = recipient.CommunicationMergeValues(mergeFields);
+ var message = ResolveText(communication.PushMessage, currentPerson, communication.EnabledLavaCommands, mergeObjects, publicAppRoot);
+ var title = ResolveText(communication.PushTitle, currentPerson, communication.EnabledLavaCommands, mergeObjects, publicAppRoot);
+ var sound = ResolveText( communication.PushSound, currentPerson, communication.EnabledLavaCommands, mergeObjects, publicAppRoot );
+ var data = ResolveText(communication.PushData, currentPerson, communication.EnabledLavaCommands, mergeFields, publicAppRoot);
+ var jsonData = Newtonsoft.Json.JsonConvert.DeserializeObject(data);
+ var url = jsonData.Url;
+ string appId = GetAttributeValue("AppId");
+ string restApiKey = GetAttributeValue("RestAPIKey");
+ OneSignalClient client = new OneSignalClient(restApiKey);
+
+ var options = new NotificationCreateOptions
+ {
+ AppId = new Guid(appId),
+ IncludeExternalUserIds = new List { recipient.PersonAliasId.ToString() }
+ };
+
+ options.Headings.Add(LanguageCodes.English, title);
+ options.Contents.Add(LanguageCodes.English, message);
+ options.Url = url;
+ NotificationCreateResult response = client.Notifications.Create(options);
+
+ bool failed = !string.IsNullOrWhiteSpace(response.Error);
+
+ var status = failed ? CommunicationRecipientStatus.Failed : CommunicationRecipientStatus.Delivered;
+
+ if (failed)
+ {
+ recipient.StatusNote = "OneSignal failed to notify devices";
+ }
+ else
+ {
+ recipient.SendDateTime = RockDateTime.Now;
+ }
+
+ recipient.Status = status;
+ recipient.TransportEntityTypeName = this.GetType().FullName;
+ recipient.UniqueMessageId = response.Id;
+
+ try
+ {
+ var historyService = new HistoryService(recipientRockContext);
+ historyService.Add(new History
+ {
+ CreatedByPersonAliasId = communication.SenderPersonAliasId,
+ EntityTypeId = personEntityTypeId,
+ CategoryId = communicationCategoryId,
+ EntityId = recipient.PersonAlias.PersonId,
+ Verb = History.HistoryVerb.Sent.ConvertToString().ToUpper(),
+ ChangeType = History.HistoryChangeType.Record.ToString(),
+ ValueName = "Push Notification",
+ Caption = message.Truncate(200),
+ RelatedEntityTypeId = communicationEntityTypeId,
+ RelatedEntityId = communication.Id
+ });
+ }
+ catch (Exception ex)
+ {
+ ExceptionLogService.LogException(ex, null);
+ }
+
+ }
+ catch (Exception ex)
+ {
+ recipient.Status = CommunicationRecipientStatus.Failed;
+ recipient.StatusNote = "OneSignal Exception: " + ex.Message;
+ }
+ }
+ }
+
+ recipientRockContext.SaveChanges();
+ }
+ else
+ {
+ recipientFound = false;
+ }
+ }
+ }
+ }
+ }
+
+ ///
+ /// Pushes the message.
+ ///
+ /// The sender.
+ /// To.
+ /// The email message.
+ /// The merge fields.
+ //private void PushMessage( Sender sender, List to, RockPushMessage pushMessage, Dictionary mergeFields )
+ private void PushMessage( List to, RockPushMessage pushMessage, Dictionary mergeFields )
+ {
+ string title = ResolveText( pushMessage.Title, pushMessage.CurrentPerson, pushMessage.EnabledLavaCommands, mergeFields, pushMessage.AppRoot, pushMessage.ThemeRoot );
+ string sound = ResolveText( pushMessage.Sound, pushMessage.CurrentPerson, pushMessage.EnabledLavaCommands, mergeFields, pushMessage.AppRoot, pushMessage.ThemeRoot );
+ string message = ResolveText( pushMessage.Message, pushMessage.CurrentPerson, pushMessage.EnabledLavaCommands, mergeFields, pushMessage.AppRoot, pushMessage.ThemeRoot );
+ string url = ResolveText(pushMessage.Data.Url, pushMessage.CurrentPerson, pushMessage.EnabledLavaCommands, mergeFields, pushMessage.AppRoot, pushMessage.ThemeRoot);
+ string appId = GetAttributeValue( "AppId" );
+ string restApiKey = GetAttributeValue( "RestAPIKey" );
+ OneSignalClient client = new OneSignalClient( restApiKey );
+
+ var options = new NotificationCreateOptions
+ {
+ AppId = new Guid( appId ),
+ IncludeExternalUserIds = to
+ };
+
+ options.Headings.Add(LanguageCodes.English, title );
+ options.Contents.Add(LanguageCodes.English, message );
+ options.Url = url;
+ client.Notifications.Create(options );
+
+ }
+ }
+}
diff --git a/Rock/Finance/StatementTemplate/ReportSetting.cs b/Rock/Finance/StatementTemplate/ReportSetting.cs
new file mode 100644
index 00000000000..109af264b68
--- /dev/null
+++ b/Rock/Finance/StatementTemplate/ReportSetting.cs
@@ -0,0 +1,168 @@
+//
+// Copyright by the Spark Development Network
+//
+// Licensed under the Rock Community License (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.rockrms.com/license
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Rock.Finance.ReportSetting
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ [Serializable]
+ public class ReportSetting
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ReportSetting()
+ {
+ this.TransactionSetting = new TransactionSetting();
+ this.PledgeSetting = new PledgeSetting();
+ this.PDFObjectSettings = new Dictionary();
+ }
+
+ ///
+ /// Gets or sets the transaction settings.
+ ///
+ ///
+ /// The transaction settings.
+ ///
+ public TransactionSetting TransactionSetting { get; set; }
+
+ ///
+ /// Gets or sets the pledge settings.
+ ///
+ ///
+ /// The pledge settings.
+ ///
+ public PledgeSetting PledgeSetting { get; set; }
+
+ ///
+ /// Gets or sets the dictionary of Key,Value for PDF Object Settings.
+ ///
+ ///
+ /// The Dictionary of Key,Value for PDF Object Settings.
+ ///
+ public Dictionary PDFObjectSettings { get; set; }
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public class TransactionSetting
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public TransactionSetting()
+ {
+ AccountIds = new List();
+ CurrencyTypesForCashGiftIds = new List();
+ CurrencyTypesForNonCashIds = new List();
+ TransactionTypeIds = new List();
+ }
+
+ ///
+ /// Gets or sets the account identifiers.
+ ///
+ ///
+ /// The account identifiers.
+ ///
+ public List AccountIds { get; set; }
+
+ ///
+ /// Gets or sets the currency types for cash gifts.
+ ///
+ ///
+ /// The currency types for cash gifts.
+ ///
+ public List CurrencyTypesForCashGiftIds { get; set; }
+
+ ///
+ /// Gets or sets the currency types for non-cash gifts.
+ ///
+ ///
+ /// The currency types for non-cash gifts.
+ ///
+ public List CurrencyTypesForNonCashIds { get; set; }
+
+ ///
+ /// Gets or sets the transaction types.
+ ///
+ ///
+ /// The transaction types.
+ ///
+ public List TransactionTypeIds { get; set; }
+
+ ///
+ /// Gets or sets a value indicating whether refunded transaction should be hidden.
+ ///
+ ///
+ /// true if refunded transaction should be hidden; otherwise, false.
+ ///
+ public bool HideRefundedTransaction { get; set; }
+
+ ///
+ /// Gets or sets a value indicating whether corrected transaction on same date should be hidden.
+ ///
+ ///
+ /// true if corrected transaction on same date should be hidden; otherwise, false.
+ ///
+ public bool HideCorrectedTransactionOnSameData { get; set; }
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public class PledgeSetting
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public PledgeSetting()
+ {
+ AccountIds = new List();
+ }
+
+ ///
+ /// Gets or sets the account identifiers.
+ ///
+ ///
+ /// The account identifiers.
+ ///
+ public List AccountIds { get; set; }
+
+ ///
+ /// Gets or sets a value indicating whether gifts to child accounts should be included.
+ ///
+ ///
+ /// true if [include gifts to child accounts]; otherwise, false.
+ ///
+ public bool IncludeGiftsToChildAccounts { get; set; }
+
+ ///
+ /// Gets or sets a value indicating whether non-cash gifts should be included.
+ ///
+ ///
+ /// true if [include non-cash gifts]; otherwise, false.
+ ///
+ public bool IncludeNonCashGifts { get; set; }
+ }
+}
diff --git a/Rock/Jobs/SyncMedia.cs b/Rock/Jobs/SyncMedia.cs
index 80a62b2fbfc..3211fd21d0e 100644
--- a/Rock/Jobs/SyncMedia.cs
+++ b/Rock/Jobs/SyncMedia.cs
@@ -53,7 +53,7 @@ private static class AttributeKey
public const string LimitFullSyncToOnceADay = "LimitFullSyncToOnceADay";
}
- ///
+ ///
/// Empty constructor for job initialization.
///
public SyncMedia()
diff --git a/Rock/Lava/Filters/LavaFilters.cs b/Rock/Lava/Filters/LavaFilters.cs
index 2d57b46fde4..a7c7ee54275 100644
--- a/Rock/Lava/Filters/LavaFilters.cs
+++ b/Rock/Lava/Filters/LavaFilters.cs
@@ -2781,7 +2781,7 @@ public static object AppendFollowing( ILavaRenderContext context, object dataObj
}
else
{
- // if the dataObject is neither a single IEntity or a list if IEntity, it is probably from a PersistedDataset
+ // if the dataObject is neither a single IEntity or a list if IEntity, it is probably from a PersistedDataset
if ( isCollection )
{
IEnumerable dataObjectAsCollection = dataObject as IEnumerable;
@@ -3011,7 +3011,7 @@ public static object FilterNotFollowed( ILavaRenderContext context, object dataO
}
///
- ///
+ ///
///
private enum FollowFilterType
{
diff --git a/Rock/Utility/ExtensionMethods/LavaLibraryExtensions.cs b/Rock/Utility/ExtensionMethods/LavaLibraryExtensions.cs
index a4cb05aed03..271f4ef153b 100644
--- a/Rock/Utility/ExtensionMethods/LavaLibraryExtensions.cs
+++ b/Rock/Utility/ExtensionMethods/LavaLibraryExtensions.cs
@@ -57,7 +57,7 @@ public static string GetLavaDataObjectInfo( this object lavaObject, RockContext
int maxWaitMS = 10000;
- System.Web.HttpContext taskContext = System.Web.HttpContext.Current;
+ System.Web.HttpContext taskContext = System.Web.HttpContext.Current;
var formatLavaTask = new Task( () =>
{
System.Web.HttpContext.Current = taskContext;
@@ -196,7 +196,7 @@ private static object GetLavaDataObjectChildInfo( this object myObject, int leve
foreach ( var key in liquidObject.AvailableKeys )
{
- // Ignore the person property of the person's primary alias (prevent unnecessary recursion)
+ // Ignore the person property of the person's primary alias (prevent unnecessary recursion)
if ( key == "Person" && parentElement.Contains( ".PrimaryAlias" ) )
{
result.AddOrIgnore( key, string.Empty );
diff --git a/RockWeb/.well-known/acme-challenge/configcheck b/RockWeb/.well-known/acme-challenge/configcheck
new file mode 100644
index 00000000000..5ab7bff4dcd
--- /dev/null
+++ b/RockWeb/.well-known/acme-challenge/configcheck
@@ -0,0 +1 @@
+Extensionless File Config Test - OK
\ No newline at end of file
diff --git a/RockWeb/.well-known/apple-app-site-association b/RockWeb/.well-known/apple-app-site-association
new file mode 100644
index 00000000000..d8de598a37c
--- /dev/null
+++ b/RockWeb/.well-known/apple-app-site-association
@@ -0,0 +1,46 @@
+{
+ "applinks": {
+ "apps": [],
+ "details": [
+ {
+ "appID": "7TM8C6252Z.com.subsplashstudio31.NewSpring-Church",
+ "components": [
+ {
+ "/": "/articles/*"
+ },
+ {
+ "/": "/devotionals/*"
+ },
+ {
+ "/": "/devotionals/*/*"
+ },
+ {
+ "/": "/stories/*"
+ },
+ {
+ "/": "/sermons/*"
+ },
+ {
+ "/": "/sermons/*/*"
+ },
+ {
+ "/": "/news/*"
+ },
+ {
+ "/": "/staff/news/*"
+ }
+ ],
+ "paths": [
+ "/articles/*",
+ "/devotionals/*",
+ "/devotionals/*/*",
+ "/stories/*",
+ "/sermons/*",
+ "/sermons/*/*",
+ "/news/*",
+ "/staff/news/*"
+ ]
+ }
+ ]
+ }
+}
diff --git a/RockWeb/.well-known/assetlinks.json b/RockWeb/.well-known/assetlinks.json
new file mode 100644
index 00000000000..f0df1081058
--- /dev/null
+++ b/RockWeb/.well-known/assetlinks.json
@@ -0,0 +1,12 @@
+[
+ {
+ "relation": ["delegate_permission/common.handle_all_urls"],
+ "target": {
+ "namespace": "android_app",
+ "package_name": "cc.newspring.newspringapp",
+ "sha256_cert_fingerprints": [
+ "2D:C1:2D:18:D9:3A:2C:90:06:E7:68:00:EB:8C:43:EA:04:BF:44:A1:0E:AD:35:00:DE:E9:81:E6:6D:8D:31:9B"
+ ]
+ }
+ }
+]
diff --git a/RockWeb/App_Data/TriumphTech-WebAgility/RedirectorRules.json b/RockWeb/App_Data/TriumphTech-WebAgility/RedirectorRules.json
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/RockWeb/App_Data/TriumphTech-WebAgility/RequestHeaderRules.json b/RockWeb/App_Data/TriumphTech-WebAgility/RequestHeaderRules.json
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/RockWeb/App_Data/TriumphTech-WebAgility/ResponseHeaderRules.json b/RockWeb/App_Data/TriumphTech-WebAgility/ResponseHeaderRules.json
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/RockWeb/Assets/Lava/MyWorkflowsSortable.lava b/RockWeb/Assets/Lava/MyWorkflowsSortable.lava
index 23348f14cb1..5171d18bccd 100644
--- a/RockWeb/Assets/Lava/MyWorkflowsSortable.lava
+++ b/RockWeb/Assets/Lava/MyWorkflowsSortable.lava
@@ -40,7 +40,7 @@
{% if Role == 0 %}
{% comment %}Role is 'Assigned To', go to WorkflowEntry page {% endcomment %}
- {{ action.Activity.Workflow.Name }} ({{ action.Activity.ActivityType.Name }})
+ {{ action.Activity.Workflow.Name }}
{% else %}
{% comment %}Role is 'Initiated', go to Workflow Detail page {% endcomment %}
{{ action.Activity.Workflow.Name }}
diff --git a/RockWeb/Blocks/CheckIn/GroupSelect.ascx.cs b/RockWeb/Blocks/CheckIn/GroupSelect.ascx.cs
index 9311fdf7ca5..9d7877adbdb 100644
--- a/RockWeb/Blocks/CheckIn/GroupSelect.ascx.cs
+++ b/RockWeb/Blocks/CheckIn/GroupSelect.ascx.cs
@@ -25,7 +25,7 @@
using Rock;
using Rock.Attribute;
using Rock.CheckIn;
-using Rock.Model;
+using Rock.Model;
namespace RockWeb.Blocks.CheckIn
{
diff --git a/RockWeb/Blocks/CheckIn/GroupTypeSelect.ascx.cs b/RockWeb/Blocks/CheckIn/GroupTypeSelect.ascx.cs
index d73a758473c..3517a2e66c3 100644
--- a/RockWeb/Blocks/CheckIn/GroupTypeSelect.ascx.cs
+++ b/RockWeb/Blocks/CheckIn/GroupTypeSelect.ascx.cs
@@ -40,7 +40,7 @@ namespace RockWeb.Blocks.CheckIn
Description = "Select this option if end-user should never see screen to select group types, all group types will automatically be selected and all the groups in all types will be available.",
DefaultBooleanValue = false,
Order = 8 )]
-
+
[TextField( "Caption",
Key = AttributeKey.Caption,
IsRequired = false,
diff --git a/RockWeb/Blocks/CheckIn/LocationSelect.ascx.cs b/RockWeb/Blocks/CheckIn/LocationSelect.ascx.cs
index 1054f819c48..b8506e7d4b2 100644
--- a/RockWeb/Blocks/CheckIn/LocationSelect.ascx.cs
+++ b/RockWeb/Blocks/CheckIn/LocationSelect.ascx.cs
@@ -78,7 +78,7 @@ public partial class LocationSelect : CheckInBlockMultiPerson
public const string MultiPersonFirstPage = CheckInBlockMultiPerson.AttributeKey.MultiPersonFirstPage;
public const string MultiPersonDonePage = CheckInBlockMultiPerson.AttributeKey.MultiPersonDonePage;
}
-
+
///
/// Determines if the block requires that a selection be made. This is used to determine if user should
/// be redirected to this block or not.
@@ -263,7 +263,7 @@ protected override void OnLoad( EventArgs e )
{
pnlNoOptions.Visible = true;
rSelection.Visible = false;
- lNoOptions.Text = string.Format( GetAttributeValue( AttributeKey.NoOptionMessage ),
+ lNoOptions.Text = string.Format( GetAttributeValue( AttributeKey.NoOptionMessage ),
person.Person.NickName,
person.CurrentSchedule != null ? person.CurrentSchedule.ToString() : "this time" );
}
@@ -313,7 +313,7 @@ private string GetTitleText()
var locationSelectHeaderLavaTemplate = CurrentCheckInState.CheckInType.LocationSelectHeaderLavaTemplate ?? string.Empty;
return locationSelectHeaderLavaTemplate.ResolveMergeFields( mergeFields );
}
-
+
///
/// Handles the ItemCommand event of the rSelection control.
///
@@ -402,7 +402,7 @@ protected void lbCancel_Click( object sender, EventArgs e )
protected string FormatCount( int locationId )
{
if ( CurrentCheckInType != null && CurrentCheckInType.DisplayLocationCount )
- {
+ {
return string.Format( " Count: {0}", KioskLocationAttendance.Get( locationId ).CurrentCount );
}
diff --git a/RockWeb/Blocks/CheckIn/TimeSelect.ascx.cs b/RockWeb/Blocks/CheckIn/TimeSelect.ascx.cs
index c96b64323a3..2e785a7421b 100644
--- a/RockWeb/Blocks/CheckIn/TimeSelect.ascx.cs
+++ b/RockWeb/Blocks/CheckIn/TimeSelect.ascx.cs
@@ -110,7 +110,7 @@ protected override void OnLoad( EventArgs e )
lbSelect.Attributes.Add( "data-loading-text", "Loading..." );
}
else
- {
+ {
CheckInPerson person = CurrentCheckInState.CheckIn.Families.Where( f => f.Selected ).SelectMany( f => f.People.Where( p => p.Selected ) ).FirstOrDefault();
CheckInGroup group = null;
CheckInLocation location = null;
@@ -230,7 +230,7 @@ private string GetTitleText()
var selectedLocation = selectedGroup?.Locations.Where( l => l.Selected ).FirstOrDefault()?.Location;
var selectedIndividuals = CurrentCheckInState.CheckIn.CurrentFamily.People.Where( p => p.Selected == true ).Select( p => p.Person );
-
+
var mergeFields = new Dictionary
{
{ LavaMergeFieldName.Family, CurrentCheckInState.CheckIn.CurrentFamily.Group },
@@ -249,7 +249,7 @@ protected void lbSelect_Click( object sender, EventArgs e )
if ( KioskCurrentlyActive )
{
var schedules = new List();
- bool validateSelection = false;
+ bool validateSelection = false;
var selectedIDs = hfTimes.Value.SplitDelimitedValues().AsIntegerList();
if ( CurrentCheckInType != null && CurrentCheckInType.TypeOfCheckin == TypeOfCheckin.Family )
diff --git a/RockWeb/Blocks/Cms/ContentChannelView.ascx.cs b/RockWeb/Blocks/Cms/ContentChannelView.ascx.cs
index f1a6916bf52..7f7014e020f 100644
--- a/RockWeb/Blocks/Cms/ContentChannelView.ascx.cs
+++ b/RockWeb/Blocks/Cms/ContentChannelView.ascx.cs
@@ -426,7 +426,7 @@ protected void lbSave_Click( object sender, EventArgs e )
if ( !dataViewFilter.IsValid )
{
- // Controls will render the error messages
+ // Controls will render the error messages
return;
}
@@ -554,7 +554,7 @@ protected void groupControl_DeleteGroupClick( object sender, EventArgs e )
///
protected override void ShowSettings()
{
- // Switch does not automatically initialize again after a partial-postback. This script
+ // Switch does not automatically initialize again after a partial-postback. This script
// looks for any switch elements that have not been initialized and re-initializes them.
string script = @"
$(document).ready(function() {
@@ -630,7 +630,7 @@ protected override void ShowSettings()
///
/// Shows the content channel item or items. If an output cache duration is set,
- /// the content will attempt to be fetched from cache unless any of the following
+ /// the content will attempt to be fetched from cache unless any of the following
/// settings are enabled or set:
/// * MergeContent (bool)
/// * SetPageTitle (bool)
@@ -665,7 +665,7 @@ private void ShowView()
string metaImageAttributeValue = GetAttributeValue( AttributeKey.MetaImageAttribute );
int pageNumber = PageParameter( PageParameterKey.Page ).AsIntegerOrNull() ?? 1;
- // Try fetching from cache if it's OK to do so.
+ // Try fetching from cache if it's OK to do so.
// For now, we'll only cache if pagination is page 1. When our cache supports caching as a region (set)
// we can then cache all pages and call ClearRegion if the block settings change.
if ( OutputCacheDuration.HasValue && OutputCacheDuration.Value > 0 && pageNumber == 1 &&
@@ -985,7 +985,7 @@ private Template GetTemplate()
#endregion
///
- /// Gets the content channel items from the item-cache (if there), or from
+ /// Gets the content channel items from the item-cache (if there), or from
/// the configured Channel and any given Item id or filter in the query string
/// if QueryParameterFiltering is enabled.
///
@@ -1412,7 +1412,7 @@ List statuses
* - In DataViewDetail this would determine what type of Comparison Control to use (Drop Down, just the word 'is', etc). In the case of a DropDown, the first
* one in the drop down is the default comparison type.
* - In DynamicReport, the Comparison control is not visible, so that always ends up using the default comparison type of that IFieldType.
- *
+ *
* So for ContentChannelView, we'll use the exact same way to determine the Comparison type (use the first/default comparison type that the field type supports.
*/
@@ -1864,7 +1864,7 @@ public List GetCurrentPageItems( List al
}
///
- ///
+ ///
///
public class PaginationPage : RockDynamic
{
diff --git a/RockWeb/Blocks/Groups/GroupFinder.ascx.cs b/RockWeb/Blocks/Groups/GroupFinder.ascx.cs
index 925829f8f12..7e324980a72 100644
--- a/RockWeb/Blocks/Groups/GroupFinder.ascx.cs
+++ b/RockWeb/Blocks/Groups/GroupFinder.ascx.cs
@@ -310,7 +310,7 @@ private static class AttributeKey
private static class AttributeDefaultLava
{
public const string MapInfo = @"
-
{{ Group.Name }}
+
{{ Group.Name }}
{% for attribute in Group.AttributeValues %}
@@ -954,7 +954,7 @@ private void ShowView()
}
else
{
- // Hide the search button and show the results immediately since there is
+ // Hide the search button and show the results immediately since there is
// no filter criteria to be entered
phFilterControls.Visible = false;
btnSearch.Visible = GetAttributeValue( AttributeKey.DisplayCampusFilter ).AsBoolean();
@@ -981,7 +981,7 @@ private void ShowView()
///
private void BindAttributes()
{
- // Parse the attribute filters
+ // Parse the attribute filters
AttributeFilters = new List();
foreach ( string attr in GetAttributeValue( AttributeKey.AttributeFilters ).SplitDelimitedValues() )
{
@@ -996,7 +996,7 @@ private void BindAttributes()
}
}
- // Parse the attribute filters
+ // Parse the attribute filters
AttributeColumns = new List();
foreach ( string attr in GetAttributeValue( AttributeKey.AttributeColumns ).SplitDelimitedValues() )
{
@@ -1331,7 +1331,7 @@ will be returned across Group Types.
If we don't do this, when the Admin adds attributes from two different Group Types and then the user enters data
for both attributes they would get no results because Attribute A from Group Type A doesn't exists in Group Type B.
-
+
Reason: Queries across Group Types
*/
var filters = new Dictionary();
@@ -1908,7 +1908,7 @@ private void Map( MapItem location, List fences, List groups )
var locationData = {0};
var fenceData = {1};
- var groupData = {2};
+ var groupData = {2};
var markerScale = 1;
var allMarkers = [];
@@ -1924,7 +1924,7 @@ private void Map( MapItem location, List fences, List groups )
var min = .999999;
var max = 1.000001;
-
+
initializeMap();
function initializeMap() {{
@@ -1992,7 +1992,7 @@ function initializeMap() {{
info_window: marker.info_window,
}});
- if ( updatedMarker.info_window != null ) {{
+ if ( updatedMarker.info_window != null ) {{
google.maps.event.addListener(updatedMarker, 'click', (function (marker) {{
return function () {{
openInfoWindow(marker);
@@ -2000,7 +2000,7 @@ function initializeMap() {{
}})(updatedMarker));
}}
- if ( updatedMarker.id && updatedMarker.id > 0 ) {{
+ if ( updatedMarker.id && updatedMarker.id > 0 ) {{
google.maps.event.addListener(updatedMarker, 'mouseover', (function (marker) {{
return function () {{
$(""tr[datakey='"" + marker.id + ""']"").addClass('row-highlight');
@@ -2076,7 +2076,7 @@ function addMapItem( i, mapItem, color ) {{
var items = [];
- if (mapItem.Point) {{
+ if (mapItem.Point) {{
var position = new google.maps.LatLng(mapItem.Point.Latitude, mapItem.Point.Longitude);
bounds.extend(position);
@@ -2109,11 +2109,11 @@ function addMapItem( i, mapItem, color ) {{
icon: pinImage,
info_window: mapItem.InfoWindow,
}});
-
+
items.push(marker);
allMarkers.push(marker);
- if ( mapItem.InfoWindow != null ) {{
+ if ( mapItem.InfoWindow != null ) {{
google.maps.event.addListener(marker, 'click', (function (marker, i) {{
return function () {{
openInfoWindow(marker);
@@ -2121,7 +2121,7 @@ function addMapItem( i, mapItem, color ) {{
}})(marker, i));
}}
- if ( mapItem.EntityId && mapItem.EntityId > 0 ) {{
+ if ( mapItem.EntityId && mapItem.EntityId > 0 ) {{
google.maps.event.addListener(marker, 'mouseover', (function (marker, i) {{
return function () {{
$(""tr[datakey='"" + mapItem.EntityId + ""']"").addClass('row-highlight');
@@ -2166,7 +2166,7 @@ function addMapItem( i, mapItem, color ) {{
polyBounds.extend(polygonPoints[j]);
}}
- if ( mapItem.InfoWindow != null ) {{
+ if ( mapItem.InfoWindow != null ) {{
google.maps.event.addListener(polygon, 'click', (function (polygon, i) {{
return function () {{
infoWindow.setContent( $('').html(mapItem.InfoWindow).text() );
@@ -2180,7 +2180,7 @@ function addMapItem( i, mapItem, color ) {{
return items;
}}
-
+
function setAllMap(markers, map) {{
for (var i = 0; i < markers.length; i++) {{
markers[i].setMap(map);
@@ -2206,7 +2206,7 @@ function getNextPolygonColor() {{
}}
function adjustOverlappedMarkers() {{
-
+
if (allMarkers.length > 1) {{
for(i=0; i < allMarkers.length-1; i++) {{
var marker1 = allMarkers[i];
diff --git a/RockWeb/Blocks/Groups/GroupTypeMap.ascx.cs b/RockWeb/Blocks/Groups/GroupTypeMap.ascx.cs
index 5cf19eddd5d..263c9af2f9c 100644
--- a/RockWeb/Blocks/Groups/GroupTypeMap.ascx.cs
+++ b/RockWeb/Blocks/Groups/GroupTypeMap.ascx.cs
@@ -220,7 +220,7 @@ private void Map()
ILavaTemplate lavaTemplate = null;
if ( LavaService.RockLiquidIsEnabled )
- {
+ {
if ( GetAttributeValue( "ShowMapInfoWindow" ).AsBoolean() )
{
template = LavaHelper.CreateDotLiquidTemplate( GetAttributeValue( "InfoWindowContents" ).Trim() );
diff --git a/RockWeb/Content/BottomTriangle.svg b/RockWeb/Content/BottomTriangle.svg
new file mode 100644
index 00000000000..916f1cf5d09
--- /dev/null
+++ b/RockWeb/Content/BottomTriangle.svg
@@ -0,0 +1,3 @@
+
diff --git a/RockWeb/Scripts/Rock/UI/structuredcontenteditor/editor-tools.js b/RockWeb/Scripts/Rock/UI/structuredcontenteditor/editor-tools.js
new file mode 100644
index 00000000000..199128128b0
--- /dev/null
+++ b/RockWeb/Scripts/Rock/UI/structuredcontenteditor/editor-tools.js
@@ -0,0 +1,74 @@
+(()=>{var e={8309:e=>{window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=6)}([function(e,t,n){var r=n(1);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(3)(r,o),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(2)(!1)).push([e.i,".cdx-checklist {\n gap: 6px;\n display: flex;\n flex-direction: column;\n}\n\n .cdx-checklist__item {\n display: flex;\n box-sizing: content-box;\n align-items: flex-start;\n }\n\n .cdx-checklist__item-text {\n outline: none;\n flex-grow: 1;\n line-height: 1.57em;\n }\n\n .cdx-checklist__item-checkbox {\n width: 22px;\n height: 22px;\n display: flex;\n align-items: center;\n margin-right: 8px;\n margin-top: calc(1.57em/2 - 22px/2);\n cursor: pointer;\n }\n\n .cdx-checklist__item-checkbox svg {\n opacity: 0;\n height: 20px;\n width: 20px;\n position: absolute;\n left: -1px;\n top: -1px;\n max-height: 20px;\n }\n\n @media (hover: hover) {\n .cdx-checklist__item-checkbox:not(.cdx-checklist__item-checkbox--no-hover):hover .cdx-checklist__item-checkbox-check svg {\n opacity: 1;\n }\n }\n\n .cdx-checklist__item-checkbox-check {\n cursor: pointer;\n display: inline-block;\n flex-shrink: 0;\n position: relative;\n width: 20px;\n height: 20px;\n box-sizing: border-box;\n margin-left: 0;\n border-radius: 5px;\n border: 1px solid #C9C9C9;\n background: #fff;\n }\n\n .cdx-checklist__item-checkbox-check::before {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n border-radius: 100%;\n background-color: #369FFF;\n visibility: hidden;\n pointer-events: none;\n transform: scale(1);\n transition: transform 400ms ease-out, opacity 400ms;\n }\n\n @media (hover: hover) {\n .cdx-checklist__item--checked .cdx-checklist__item-checkbox:not(.cdx-checklist__item--checked .cdx-checklist__item-checkbox--no-hover):hover .cdx-checklist__item-checkbox-check {\n background: #0059AB;\n border-color: #0059AB;\n }\n }\n\n .cdx-checklist__item--checked .cdx-checklist__item-checkbox-check {\n background: #369FFF;\n border-color: #369FFF;\n }\n\n .cdx-checklist__item--checked .cdx-checklist__item-checkbox-check svg {\n opacity: 1;\n }\n\n .cdx-checklist__item--checked .cdx-checklist__item-checkbox-check svg path {\n stroke: #fff;\n }\n\n .cdx-checklist__item--checked .cdx-checklist__item-checkbox-check::before {\n opacity: 0;\n visibility: visible;\n transform: scale(2.5);\n }\n",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",o=e[3];if(!o)return r;if(t&&"function"==typeof btoa){var i=(n=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=o.sources.map((function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"}));return[r].concat(a).concat([i]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o=0&&d.splice(t,1)}function g(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),b(t,e.attrs),m(e,t),t}function b(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function y(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=u++;n=c||(c=g(t)),r=x.bind(null,n,a,!1),o=x.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",b(t,e.attrs),m(e,t),t}(t),r=k.bind(null,n,t),o=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),r=A.bind(null,n),o=function(){v(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return h(n,t),function(e){for(var r=[],o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=document.createElement(e);for(var a in Array.isArray(n)?(t=i.classList).add.apply(t,o(n)):n&&i.classList.add(n),r)i[a]=r[a];return i}function l(e){return e.innerHTML.replace(" "," ").trim()}function c(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=document.createRange(),o=window.getSelection();r.selectNodeContents(e),void 0!==n&&(r.setStart(e,n),r.setEnd(e,n)),r.collapse(t),o.removeAllRanges(),o.addRange(r)}function u(e,t){for(var n=0;n',title:"Checklist"}}},{key:"conversionConfig",get:function(){return{export:function(e){return e.items.map((function(e){return e.text})).join(". ")},import:function(e){return{items:[{text:e,checked:!1}]}}}}}]),d(e,[{key:"render",value:function(){var e=this;return this._elements.wrapper=s("div",[this.CSS.baseBlock,this.CSS.wrapper]),this.data.items||(this.data.items=[{text:"",checked:!1}]),this.data.items.forEach((function(t){var n=e.createChecklistItem(t);e._elements.wrapper.appendChild(n)})),this.readOnly||(this._elements.wrapper.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:e.enterPressed(t);break;case 8:e.backspace(t)}}),!1),this._elements.wrapper.addEventListener("click",(function(t){e.toggleCheckbox(t)}))),this._elements.wrapper}},{key:"save",value:function(){var e=this,t=this.items.map((function(t){return{text:l(e.getItemInput(t)),checked:t.classList.contains(e.CSS.itemChecked)}}));return{items:t=t.filter((function(e){return 0!==e.text.trim().length}))}}},{key:"validate",value:function(e){return!!e.items.length}},{key:"toggleCheckbox",value:function(e){var t=this,n=e.target.closest(".".concat(this.CSS.item)),r=n.querySelector(".".concat(this.CSS.checkboxContainer));r.contains(e.target)&&(n.classList.toggle(this.CSS.itemChecked),r.classList.add(this.CSS.noHover),r.addEventListener("mouseleave",(function(){return t.removeSpecialHoverBehavior(r)}),{once:!0}))}},{key:"createChecklistItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=s("div",this.CSS.item),n=s("span",this.CSS.checkbox),o=s("div",this.CSS.checkboxContainer),i=s("div",this.CSS.textField,{innerHTML:e.text?e.text:"",contentEditable:!this.readOnly});return e.checked&&t.classList.add(this.CSS.itemChecked),n.innerHTML=r,o.appendChild(n),t.appendChild(o),t.appendChild(i),t}},{key:"enterPressed",value:function(e){e.preventDefault();var t=this.items,n=document.activeElement.closest(".".concat(this.CSS.item));if(t.indexOf(n)===t.length-1&&0===l(this.getItemInput(n)).length){var r=this.api.blocks.getCurrentBlockIndex();return n.remove(),this.api.blocks.insert(),void this.api.caret.setToBlock(r+1)}var o,i,s=(o=a(),(i=document.createElement("div")).appendChild(o),i.innerHTML),u=this.createChecklistItem({text:s,checked:!1});this._elements.wrapper.insertBefore(u,n.nextSibling),c(this.getItemInput(u),!0)}},{key:"backspace",value:function(e){var t=e.target.closest(".".concat(this.CSS.item)),n=this.items.indexOf(t),r=this.items[n-1];if(r&&0===window.getSelection().focusOffset){e.preventDefault();var o=a(),i=this.getItemInput(r),s=i.childNodes.length;i.appendChild(o),c(i,void 0,s),t.remove()}}},{key:"removeSpecialHoverBehavior",value:function(e){e.classList.remove(this.CSS.noHover)}},{key:"getItemInput",value:function(e){return e.querySelector(".".concat(this.CSS.textField))}},{key:"CSS",get:function(){return{baseBlock:this.api.styles.block,wrapper:"cdx-checklist",item:"cdx-checklist__item",itemChecked:"cdx-checklist__item--checked",noHover:"cdx-checklist__item-checkbox--no-hover",checkbox:"cdx-checklist__item-checkbox-check",textField:"cdx-checklist__item-text",checkboxContainer:"cdx-checklist__item-checkbox"}}},{key:"items",get:function(){return Array.from(this._elements.wrapper.querySelectorAll(".".concat(this.CSS.item)))}}]),e}()}]).default},4787:e=>{window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=4)}([function(e,t,n){var r=n(1),o=n(2);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function s(e){for(var t=-1,n=0;n0;)t-=1,n=e.substr(t,1);return"\n"===n&&(t+=1),t}(i,o);if(" "!==i.substr(a,2))return;n.value=i.substring(0,a)+i.substring(a+2),t=o-2}else t=o+2,n.value=i.substring(0,o)+" "+i.substring(o);n.setSelectionRange(t,t)}},{key:"data",get:function(){return this._data},set:function(e){this._data=e,this.nodes.textarea&&(this.nodes.textarea.textContent=e.code)}}],[{key:"toolbox",get:function(){return{icon:'',title:"Code"}}},{key:"DEFAULT_PLACEHOLDER",get:function(){return"Enter a code"}},{key:"pasteConfig",get:function(){return{tags:["pre"]}}},{key:"sanitize",get:function(){return{code:!0}}}]),e}()}]).default},6689:e=>{window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=5)}([function(e,t,n){var r=n(1);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(3)(r,o),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(2)(!1)).push([e.i,'.ce-delimiter {\n line-height: 1.6em;\n width: 100%;\n text-align: center;\n}\n\n.ce-delimiter:before {\n display: inline-block;\n content: "***";\n font-size: 30px;\n line-height: 65px;\n height: 30px;\n letter-spacing: 0.2em;\n}',""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",o=e[3];if(!o)return r;if(t&&"function"==typeof btoa){var i=(n=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=o.sources.map((function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"}));return[r].concat(a).concat([i]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o=0&&u.splice(t,1)}function v(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),g(t,e.attrs),p(e,t),t}function g(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=c++;n=l||(l=v(t)),r=C.bind(null,n,a,!1),o=C.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",g(t,e.attrs),p(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=d(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),o=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),r=function(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){m(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return f(n,t),function(e){for(var r=[],o=0;o',title:"Delimiter"}}}]),e}()}]).default},2534:e=>{window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=14)}([function(e,t,n){var r=n(5),o=n(6),i=n(7),a=n(9);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n=0?r=setTimeout(l,t-c):(r=null,n||(s=e.apply(i,o),i=o=null))}null==t&&(t=100);var c=function(){i=this,o=arguments,a=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(s=e.apply(i,o),i=o=null),s};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(s=e.apply(i,o),i=o=null,clearTimeout(r),r=null)},c}n.debounce=n,e.exports=n},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}},function(e,t,n){var r=n(8);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n?title=0&byline=0",html:'',height:320,width:580},youtube:{regex:/(?:https?:\/\/)?(?:www\.)?(?:(?:youtu\.be\/)|(?:youtube\.com)\/(?:v\/|u\/\w\/|embed\/|watch))(?:(?:\?v=)?([^#&?=]*))?((?:[?&]\w*=\w*)*)/,embedUrl:"https://www.youtube.com/embed/<%= remote_id %>",html:'',height:320,width:580,id:function(e){var t=a()(e,2),n=t[0],r=t[1];if(!r&&n)return n;var o={start:"start",end:"end",t:"start",time_continue:"start",list:"list"};return r=r.slice(1).split("&").map((function(e){var t=e.split("="),r=a()(t,2),i=r[0],s=r[1];return n||"v"!==i?o[i]?"LL"===s||s.startsWith("RDMM")||s.startsWith("FL")?null:"".concat(o[i],"=").concat(s):null:(n=s,null)})).filter((function(e){return!!e})),n+"?"+r.join("&")}},coub:{regex:/https?:\/\/coub\.com\/view\/([^\/\?\&]+)/,embedUrl:"https://coub.com/embed/<%= remote_id %>",html:'',height:320,width:580},vine:{regex:/https?:\/\/vine\.co\/v\/([^\/\?\&]+)/,embedUrl:"https://vine.co/v/<%= remote_id %>/embed/simple/",html:'',height:320,width:580},imgur:{regex:/https?:\/\/(?:i\.)?imgur\.com.*\/([a-zA-Z0-9]+)(?:\.gifv)?/,embedUrl:"http://imgur.com/<%= remote_id %>/embed",html:'',height:500,width:540},gfycat:{regex:/https?:\/\/gfycat\.com(?:\/detail)?\/([a-zA-Z]+)/,embedUrl:"https://gfycat.com/ifr/<%= remote_id %>",html:"",height:436,width:580},"twitch-channel":{regex:/https?:\/\/www\.twitch\.tv\/([^\/\?\&]*)\/?$/,embedUrl:"https://player.twitch.tv/?channel=<%= remote_id %>",html:'',height:366,width:600},"twitch-video":{regex:/https?:\/\/www\.twitch\.tv\/(?:[^\/\?\&]*\/v|videos)\/([0-9]*)/,embedUrl:"https://player.twitch.tv/?video=v<%= remote_id %>",html:'',height:366,width:600},"yandex-music-album":{regex:/https?:\/\/music\.yandex\.ru\/album\/([0-9]*)\/?$/,embedUrl:"https://music.yandex.ru/iframe/#album/<%= remote_id %>/",html:'',height:400,width:540},"yandex-music-track":{regex:/https?:\/\/music\.yandex\.ru\/album\/([0-9]*)\/track\/([0-9]*)/,embedUrl:"https://music.yandex.ru/iframe/#track/<%= remote_id %>/",html:'',height:100,width:540,id:function(e){return e.join("/")}},"yandex-music-playlist":{regex:/https?:\/\/music\.yandex\.ru\/users\/([^\/\?\&]*)\/playlists\/([0-9]*)/,embedUrl:"https://music.yandex.ru/iframe/#playlist/<%= remote_id %>/show/cover/description/",html:'',height:400,width:540,id:function(e){return e.join("/")}},codepen:{regex:/https?:\/\/codepen\.io\/([^\/\?\&]*)\/pen\/([^\/\?\&]*)/,embedUrl:"https://codepen.io/<%= remote_id %>?height=300&theme-id=0&default-tab=css,result&embed-version=2",html:"",height:300,width:600,id:function(e){return e.join("/embed/")}},instagram:{regex:/https?:\/\/www\.instagram\.com\/p\/([^\/\?\&]+)\/?.*/,embedUrl:"https://www.instagram.com/p/<%= remote_id %>/embed",html:'',height:505,width:400},twitter:{regex:/^https?:\/\/twitter\.com\/(?:#!\/)?(\w+)\/status(?:es)?\/(\d+?.*)?$/,embedUrl:"https://twitframe.com/show?url=https://twitter.com/<%= remote_id %>",html:'',height:300,width:600,id:function(e){return e.join("/status/")}},pinterest:{regex:/https?:\/\/([^\/\?\&]*).pinterest.com\/pin\/([^\/\?\&]*)\/?$/,embedUrl:"https://assets.pinterest.com/ext/embed.html?id=<%= remote_id %>",html:"",id:function(e){return e[1]}},facebook:{regex:/https?:\/\/www.facebook.com\/([^\/\?\&]*)\/(.*)/,embedUrl:"https://www.facebook.com/plugins/post.php?href=https://www.facebook.com/<%= remote_id %>&width=500",html:"",id:function(e){return e.join("/")}},aparat:{regex:/(?:http[s]?:\/\/)?(?:www.)?aparat\.com\/v\/([^\/\?\&]+)\/?/,embedUrl:"https://www.aparat.com/video/video/embed/videohash/<%= remote_id %>/vt/frame",html:'',height:300,width:600},miro:{regex:/https:\/\/miro.com\/\S+(\S{12})\/(\S+)?/,embedUrl:"https://miro.com/app/live-embed/<%= remote_id %>",html:''}},f=(n(10),n(4)),h=function(){function e(t){var n=t.data,r=t.api,o=t.readOnly;l()(this,e),this.api=r,this._data={},this.element=null,this.readOnly=o,this.data=n}return u()(e,[{key:"render",value:function(){var t=this;if(!this.data.service){var n=document.createElement("div");return this.element=n,n}var r=e.services[this.data.service].html,o=document.createElement("div"),i=document.createElement("div"),a=document.createElement("template"),s=this.createPreloader();o.classList.add(this.CSS.baseClass,this.CSS.container,this.CSS.containerLoading),i.classList.add(this.CSS.input,this.CSS.caption),o.appendChild(s),i.contentEditable=!this.readOnly,i.dataset.placeholder=this.api.i18n.t("Enter a caption"),i.innerHTML=this.data.caption||"",a.innerHTML=r,a.content.firstChild.setAttribute("src",this.data.embed),a.content.firstChild.classList.add(this.CSS.content);var l=this.embedIsReady(o);return o.appendChild(a.content.firstChild),o.appendChild(i),l.then((function(){o.classList.remove(t.CSS.containerLoading)})),this.element=o,o}},{key:"createPreloader",value:function(){var e=document.createElement("preloader"),t=document.createElement("div");return t.textContent=this.data.source,e.classList.add(this.CSS.preloader),t.classList.add(this.CSS.url),e.appendChild(t),e}},{key:"save",value:function(){return this.data}},{key:"onPaste",value:function(t){var n=t.detail,r=n.key,o=n.data,i=e.services[r],a=i.regex,s=i.embedUrl,l=i.width,c=i.height,u=i.id,d=void 0===u?function(e){return e.shift()}:u,f=a.exec(o).slice(1),h=s.replace(/<%= remote_id %>/g,d(f));this.data={service:r,source:o,embed:h,width:l,height:c}}},{key:"embedIsReady",value:function(e){var t=null;return new Promise((function(n,r){(t=new MutationObserver(Object(f.debounce)(n,450))).observe(e,{childList:!0,subtree:!0})})).then((function(){t.disconnect()}))}},{key:"data",set:function(e){if(!(e instanceof Object))throw Error("Embed Tool data should be object");var t=e.service,n=e.source,r=e.embed,o=e.width,i=e.height,a=e.caption,s=void 0===a?"":a;this._data={service:t||this.data.service,source:n||this.data.source,embed:r||this.data.embed,width:o||this.data.width,height:i||this.data.height,caption:s||this.data.caption||""};var l=this.element;l&&l.parentNode.replaceChild(this.render(),l)},get:function(){if(this.element){var e=this.element.querySelector(".".concat(this.api.styles.input));this._data.caption=e?e.innerHTML:""}return this._data}},{key:"CSS",get:function(){return{baseClass:this.api.styles.block,input:this.api.styles.input,container:"embed-tool",containerLoading:"embed-tool--loading",preloader:"embed-tool__preloader",caption:"embed-tool__caption",url:"embed-tool__url",content:"embed-tool__content"}}}],[{key:"prepare",value:function(t){var n=t.config,r=(void 0===n?{}:n).services,i=void 0===r?{}:r,s=Object.entries(d),l=Object.entries(i).filter((function(e){var t=a()(e,2),n=(t[0],t[1]);return"boolean"==typeof n&&!0===n})).map((function(e){return a()(e,1)[0]})),c=Object.entries(i).filter((function(e){var t=a()(e,2),n=(t[0],t[1]);return"object"===o()(n)})).filter((function(t){var n=a()(t,2),r=(n[0],n[1]);return e.checkServiceConfig(r)})).map((function(e){var t=a()(e,2),n=t[0],r=t[1];return[n,{regex:r.regex,embedUrl:r.embedUrl,html:r.html,height:r.height,width:r.width,id:r.id}]}));l.length&&(s=s.filter((function(e){var t=a()(e,1)[0];return l.includes(t)}))),s=s.concat(c),e.services=s.reduce((function(e,t){var n=a()(t,2),r=n[0],o=n[1];return r in e?(e[r]=Object.assign({},e[r],o),e):(e[r]=o,e)}),{}),e.patterns=s.reduce((function(e,t){var n=a()(t,2),r=n[0],o=n[1];return e[r]=o.regex,e}),{})}},{key:"checkServiceConfig",value:function(e){var t=e.regex,n=e.embedUrl,r=e.html,o=e.height,i=e.width,a=e.id,s=t&&t instanceof RegExp&&n&&"string"==typeof n&&r&&"string"==typeof r;return(s=(s=s&&(void 0===a||a instanceof Function))&&(void 0===o||Number.isFinite(o)))&&(void 0===i||Number.isFinite(i))}},{key:"pasteConfig",get:function(){return{patterns:e.patterns}}},{key:"isReadOnlySupported",get:function(){return!0}}]),e}()}]).default},4919:e=>{window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=5)}([function(e,t,n){var r=n(1);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(3)(r,o),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(2)(!1)).push([e.i,"/**\n * Plugin styles\n */\n.ce-header {\n padding: 0.6em 0 3px;\n margin: 0;\n line-height: 1.25em;\n outline: none;\n}\n\n.ce-header p,\n.ce-header div{\n padding: 0 !important;\n margin: 0 !important;\n}\n\n/**\n * Styles for Plugin icon in Toolbar\n */\n.ce-header__icon {}\n\n.ce-header[contentEditable=true][data-placeholder]::before{\n position: absolute;\n content: attr(data-placeholder);\n color: #707684;\n font-weight: normal;\n display: none;\n cursor: text;\n}\n\n.ce-header[contentEditable=true][data-placeholder]:empty::before {\n display: block;\n}\n\n.ce-header[contentEditable=true][data-placeholder]:empty:focus::before {\n display: none;\n}\n",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",o=e[3];if(!o)return r;if(t&&"function"==typeof btoa){var i=(n=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=o.sources.map((function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"}));return[r].concat(a).concat([i]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o=0&&d.splice(t,1)}function g(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),b(t,e.attrs),m(e,t),t}function b(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function y(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=u++;n=c||(c=g(t)),r=x.bind(null,n,a,!1),o=x.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",b(t,e.attrs),m(e,t),t}(t),r=k.bind(null,n,t),o=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),r=A.bind(null,n),o=function(){v(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return h(n,t),function(e){for(var r=[],o=0;o',title:"Heading"}}}],(n=[{key:"normalizeData",value:function(e){var t={};return"object"!==r(e)&&(e={}),t.text=e.text||"",t.level=parseInt(e.level)||this.defaultLevel.number,t}},{key:"render",value:function(){return this._element}},{key:"renderSettings",value:function(){var e=this;return this.levels.map((function(t){return{icon:t.svg,label:e.api.i18n.t("Heading ".concat(t.number)),onActivate:function(){return e.setLevel(t.number)},closeOnActivate:!0,isActive:e.currentLevel.number===t.number}}))}},{key:"setLevel",value:function(e){this.data={level:e,text:this.data.text}}},{key:"merge",value:function(e){var t={text:this.data.text+e.text,level:this.data.level};this.data=t}},{key:"validate",value:function(e){return""!==e.text.trim()}},{key:"save",value:function(e){return{text:e.innerHTML,level:this.currentLevel.number}}},{key:"getTag",value:function(){var e=document.createElement(this.currentLevel.tag);return e.innerHTML=this._data.text||"",e.classList.add(this._CSS.wrapper),e.contentEditable=this.readOnly?"false":"true",e.dataset.placeholder=this.api.i18n.t(this._settings.placeholder||""),e}},{key:"onPaste",value:function(e){var t=e.detail.data,n=this.defaultLevel.number;switch(t.tagName){case"H1":n=1;break;case"H2":n=2;break;case"H3":n=3;break;case"H4":n=4;break;case"H5":n=5;break;case"H6":n=6}this._settings.levels&&(n=this._settings.levels.reduce((function(e,t){return Math.abs(t-n)'},{number:2,tag:"H2",svg:''},{number:3,tag:"H3",svg:''},{number:4,tag:"H4",svg:''},{number:5,tag:"H5",svg:''},{number:6,tag:"H6",svg:''}];return this._settings.levels?t.filter((function(t){return e._settings.levels.includes(t.number)})):t}}])&&o(t.prototype,n),i&&o(t,i),e}()}]).default},1854:e=>{
+/*!
+ * Image tool
+ *
+ * @version 2.8.1
+ *
+ * @package https://github.com/editor-js/image
+ * @licence MIT
+ * @author CodeX
+ */
+window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=9)}([function(e,t){function n(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(e.url&&"string"!=typeof e.url)throw new Error("Url must be a string");if(e.url=e.url||"",e.method&&"string"!=typeof e.method)throw new Error("`method` must be a string or null");if(e.method=e.method?e.method.toUpperCase():"GET",e.headers&&"object"!==r(e.headers))throw new Error("`headers` must be an object or null");if(e.headers=e.headers||{},e.type&&("string"!=typeof e.type||!Object.values(o).includes(e.type)))throw new Error("`type` must be taken from module's «contentType» library");if(e.progress&&"function"!=typeof e.progress)throw new Error("`progress` must be a function or null");if(e.progress=e.progress||function(e){},e.beforeSend=e.beforeSend||function(e){},e.ratio&&"number"!=typeof e.ratio)throw new Error("`ratio` must be a number");if(e.ratio<0||e.ratio>100)throw new Error("`ratio` must be in a 0-100 interval");if(e.ratio=e.ratio||90,e.accept&&"string"!=typeof e.accept)throw new Error("`accept` must be a string with a list of allowed mime-types");if(e.accept=e.accept||"*/*",e.multiple&&"boolean"!=typeof e.multiple)throw new Error("`multiple` must be a true or false");if(e.multiple=e.multiple||!1,e.fieldName&&"string"!=typeof e.fieldName)throw new Error("`fieldName` must be a string");return e.fieldName=e.fieldName||"files",e},l=function(e){switch(e.method){case"GET":var t=c(e.data,o.URLENCODED);delete e.data,e.url=/\?/.test(e.url)?e.url+"&"+t:e.url+"?"+t;break;case"POST":case"PUT":case"DELETE":case"UPDATE":var n=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).type||o.JSON}(e);(d.isFormData(e.data)||d.isFormElement(e.data))&&(n=o.FORM),e.data=c(e.data,n),n!==f.contentType.FORM&&(e.headers["content-type"]=n)}return e},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(arguments.length>1?arguments[1]:void 0){case o.URLENCODED:return d.urlEncode(e);case o.JSON:return d.jsonEncode(e);case o.FORM:return d.formEncode(e);default:return e}},u=function(e){return e>=200&&e<300},{contentType:o={URLENCODED:"application/x-www-form-urlencoded; charset=utf-8",FORM:"multipart/form-data",JSON:"application/json; charset=utf-8"},request:i,get:function(e){return e.method="GET",i(e)},post:a,transport:function(e){return e=s(e),d.selectFiles(e).then((function(t){for(var n=new FormData,r=0;r=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(6),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(this,n(0))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,l=1,c={},u=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){p(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(o=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(p,0,e)},f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1)for(var n=1;n HTMLElement")}},{key:"isObject",value:function(e){return"[object Object]"===Object.prototype.toString.call(e)}},{key:"isFormData",value:function(e){return e instanceof FormData}},{key:"isFormElement",value:function(e){return e instanceof HTMLFormElement}},{key:"selectFiles",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(t,n){var r=document.createElement("INPUT");r.type="file",e.multiple&&r.setAttribute("multiple","multiple"),e.accept&&r.setAttribute("accept",e.accept),r.style.display="none",document.body.appendChild(r),r.addEventListener("change",(function(e){var n=e.target.files;t(n),document.body.removeChild(r)}),!1),r.click()}))}},{key:"parseHeaders",value:function(e){var t=e.trim().split(/[\r\n]+/),n={};return t.forEach((function(e){var t=e.split(": "),r=t.shift(),o=t.join(": ");r&&(n[r]=o)})),n}}])&&r(e,t),e}()},function(e,t){var n=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape).replace(/%20/g,"+")},r=function(e,t,o,i){return t=t||null,o=o||"&",i=i||null,e?function(e){for(var t=new Array,n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(s&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){var r=n(12),o=n(13);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var i=(r(o,{insert:"head",singleton:!1}),o.locals?o.locals:{});e.exports=i},function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function s(e){for(var t=-1,n=0;n1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=document.createElement(e);for(var i in Array.isArray(n)?(t=o.classList).add.apply(t,h()(n)):n&&o.classList.add(n),r)o[i]=r[i];return o}var m=function(){function e(t){var n=t.api,r=t.config,o=t.onSelectFile,i=t.readOnly;l()(this,e),this.api=n,this.config=r,this.onSelectFile=o,this.readOnly=i,this.nodes={wrapper:p("div",[this.CSS.baseClass,this.CSS.wrapper]),imageContainer:p("div",[this.CSS.imageContainer]),fileButton:this.createFileButton(),imageEl:void 0,imagePreloader:p("div",this.CSS.imagePreloader),caption:p("div",[this.CSS.input,this.CSS.caption],{contentEditable:!this.readOnly})},this.nodes.caption.dataset.placeholder=this.config.captionPlaceholder,this.nodes.imageContainer.appendChild(this.nodes.imagePreloader),this.nodes.wrapper.appendChild(this.nodes.imageContainer),this.nodes.wrapper.appendChild(this.nodes.caption),this.nodes.wrapper.appendChild(this.nodes.fileButton)}return u()(e,[{key:"render",value:function(t){return t.file&&0!==Object.keys(t.file).length?this.toggleStatus(e.status.UPLOADING):this.toggleStatus(e.status.EMPTY),this.nodes.wrapper}},{key:"createFileButton",value:function(){var e=this,t=p("div",[this.CSS.button]);return t.innerHTML=this.config.buttonContent||"".concat(d," ").concat(this.api.i18n.t("Select an Image")),t.addEventListener("click",(function(){e.onSelectFile()})),t}},{key:"showPreloader",value:function(t){this.nodes.imagePreloader.style.backgroundImage="url(".concat(t,")"),this.toggleStatus(e.status.UPLOADING)}},{key:"hidePreloader",value:function(){this.nodes.imagePreloader.style.backgroundImage="",this.toggleStatus(e.status.EMPTY)}},{key:"fillImage",value:function(t){var n=this,r=/\.mp4$/.test(t)?"VIDEO":"IMG",o={src:t},i="load";"VIDEO"===r&&(o.autoplay=!0,o.loop=!0,o.muted=!0,o.playsinline=!0,i="loadeddata"),this.nodes.imageEl=p(r,this.CSS.imageEl,o),this.nodes.imageEl.addEventListener(i,(function(){n.toggleStatus(e.status.FILLED),n.nodes.imagePreloader&&(n.nodes.imagePreloader.style.backgroundImage="")})),this.nodes.imageContainer.appendChild(this.nodes.imageEl)}},{key:"fillCaption",value:function(e){this.nodes.caption&&(this.nodes.caption.innerHTML=e)}},{key:"toggleStatus",value:function(t){for(var n in e.status)Object.prototype.hasOwnProperty.call(e.status,n)&&this.nodes.wrapper.classList.toggle("".concat(this.CSS.wrapper,"--").concat(e.status[n]),t===e.status[n])}},{key:"applyTune",value:function(e,t){this.nodes.wrapper.classList.toggle("".concat(this.CSS.wrapper,"--").concat(e),t)}},{key:"CSS",get:function(){return{baseClass:this.api.styles.block,loading:this.api.styles.loader,input:this.api.styles.input,button:this.api.styles.button,wrapper:"image-tool",imageContainer:"image-tool__image",imagePreloader:"image-tool__image-preloader",imageEl:"image-tool__image-picture",caption:"image-tool__caption"}}}],[{key:"status",get:function(){return{EMPTY:"empty",UPLOADING:"loading",FILLED:"filled"}}}]),e}(),v=n(8),g=n.n(v),b=n(1),y=n.n(b);function w(e){return e&&"function"==typeof e.then}var C=function(){function e(t){var n=t.config,r=t.onUpload,o=t.onError;l()(this,e),this.config=n,this.onUpload=r,this.onError=o}return u()(e,[{key:"uploadSelectedFile",value:function(e){var t=this,n=e.onPreview,r=function(e){var t=new FileReader;t.readAsDataURL(e),t.onload=function(e){n(e.target.result)}};(this.config.uploader&&"function"==typeof this.config.uploader.uploadByFile?y.a.selectFiles({accept:this.config.types}).then((function(e){r(e[0]);var n=t.config.uploader.uploadByFile(e[0]);return w(n)||console.warn("Custom uploader method uploadByFile should return a Promise"),n})):y.a.transport({url:this.config.endpoints.byFile,data:this.config.additionalRequestData,accept:this.config.types,headers:this.config.additionalRequestHeaders,beforeSend:function(e){r(e[0])},fieldName:this.config.field}).then((function(e){return e.body}))).then((function(e){t.onUpload(e)})).catch((function(e){t.onError(e)}))}},{key:"uploadByUrl",value:function(e){var t,n=this;this.config.uploader&&"function"==typeof this.config.uploader.uploadByUrl?w(t=this.config.uploader.uploadByUrl(e))||console.warn("Custom uploader method uploadByUrl should return a Promise"):t=y.a.post({url:this.config.endpoints.byUrl,data:Object.assign({url:e},this.config.additionalRequestData),type:y.a.contentType.JSON,headers:this.config.additionalRequestHeaders}).then((function(e){return e.body})),t.then((function(e){n.onUpload(e)})).catch((function(e){n.onError(e)}))}},{key:"uploadByFile",value:function(e,t){var n,r=this,o=t.onPreview,i=new FileReader;if(i.readAsDataURL(e),i.onload=function(e){o(e.target.result)},this.config.uploader&&"function"==typeof this.config.uploader.uploadByFile)w(n=this.config.uploader.uploadByFile(e))||console.warn("Custom uploader method uploadByFile should return a Promise");else{var a=new FormData;a.append(this.config.field,e),this.config.additionalRequestData&&Object.keys(this.config.additionalRequestData).length&&Object.entries(this.config.additionalRequestData).forEach((function(e){var t=g()(e,2),n=t[0],r=t[1];a.append(n,r)})),n=y.a.post({url:this.config.endpoints.byFile,data:a,type:y.a.contentType.JSON,headers:this.config.additionalRequestHeaders}).then((function(e){return e.body}))}n.then((function(e){r.onUpload(e)})).catch((function(e){r.onError(e)}))}}]),e}(),x=function(){function e(t){var n=this,r=t.data,o=t.config,i=t.api,a=t.readOnly;l()(this,e),this.api=i,this.readOnly=a,this.config={endpoints:o.endpoints||"",additionalRequestData:o.additionalRequestData||{},additionalRequestHeaders:o.additionalRequestHeaders||{},field:o.field||"image",types:o.types||"image/*",captionPlaceholder:this.api.i18n.t(o.captionPlaceholder||"Caption"),buttonContent:o.buttonContent||"",uploader:o.uploader||void 0,actions:o.actions||[]},this.uploader=new C({config:this.config,onUpload:function(e){return n.onUpload(e)},onError:function(e){return n.uploadingFailed(e)}}),this.ui=new m({api:i,config:this.config,onSelectFile:function(){n.uploader.uploadSelectedFile({onPreview:function(e){n.ui.showPreloader(e)}})},readOnly:a}),this._data={},this.data=r}var t;return u()(e,null,[{key:"isReadOnlySupported",get:function(){return!0}},{key:"toolbox",get:function(){return{icon:d,title:"Image"}}},{key:"tunes",get:function(){return[{name:"withBorder",icon:'',title:"With border",toggle:!0},{name:"stretched",icon:'',title:"Stretch image",toggle:!0},{name:"withBackground",icon:'',title:"With background",toggle:!0}]}}]),u()(e,[{key:"render",value:function(){return this.ui.render(this.data)}},{key:"validate",value:function(e){return e.file&&e.file.url}},{key:"save",value:function(){var e=this.ui.nodes.caption;return this._data.caption=e.innerHTML,this.data}},{key:"renderSettings",value:function(){var t=this;return e.tunes.concat(this.config.actions).map((function(e){return{icon:e.icon,label:t.api.i18n.t(e.title),name:e.name,toggle:e.toggle,isActive:t.data[e.name],onActivate:function(){"function"!=typeof e.action?t.tuneToggled(e.name):e.action(e.name)}}}))}},{key:"appendCallback",value:function(){this.ui.nodes.fileButton.click()}},{key:"onPaste",value:(t=a()(o.a.mark((function e(t){var n,r,i,a,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next="tag"===e.t0?3:"pattern"===e.t0?15:"file"===e.t0?18:21;break;case 3:if(n=t.detail.data,!/^blob:/.test(n.src)){e.next=13;break}return e.next=7,fetch(n.src);case 7:return r=e.sent,e.next=10,r.blob();case 10:return i=e.sent,this.uploadFile(i),e.abrupt("break",21);case 13:return this.uploadUrl(n.src),e.abrupt("break",21);case 15:return a=t.detail.data,this.uploadUrl(a),e.abrupt("break",21);case 18:return s=t.detail.file,this.uploadFile(s),e.abrupt("break",21);case 21:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"onUpload",value:function(e){e.success&&e.file?this.image=e.file:this.uploadingFailed("incorrect response: "+JSON.stringify(e))}},{key:"uploadingFailed",value:function(e){console.log("Image Tool: uploading failed because of",e),this.api.notifier.show({message:this.api.i18n.t("Couldn’t upload image. Please try another."),style:"error"}),this.ui.hidePreloader()}},{key:"tuneToggled",value:function(e){this.setTune(e,!this._data[e])}},{key:"setTune",value:function(e,t){var n=this;this._data[e]=t,this.ui.applyTune(e,t),"stretched"===e&&Promise.resolve().then((function(){var e=n.api.blocks.getCurrentBlockIndex();n.api.blocks.stretchBlock(e,t)})).catch((function(e){console.error(e)}))}},{key:"uploadFile",value:function(e){var t=this;this.uploader.uploadByFile(e,{onPreview:function(e){t.ui.showPreloader(e)}})}},{key:"uploadUrl",value:function(e){this.ui.showPreloader(e),this.uploader.uploadByUrl(e)}},{key:"data",set:function(t){var n=this;this.image=t.file,this._data.caption=t.caption||"",this.ui.fillCaption(this._data.caption),e.tunes.forEach((function(e){var r=e.name,o=void 0!==t[r]&&(!0===t[r]||"true"===t[r]);n.setTune(r,o)}))},get:function(){return this._data}},{key:"image",set:function(e){this._data.file=e||{},e&&e.url&&this.ui.fillImage(e.url)}}],[{key:"pasteConfig",get:function(){return{tags:[{img:{src:!0}}],patterns:{image:/https?:\/\/\S+\.(gif|jpe?g|tiff|png|svg|webp)(\?[a-z0-9=]*)?$/i},files:{mimeTypes:["image/*"]}}}}]),e}();
+/**
+ * Image Tool for the Editor.js
+ *
+ * @author CodeX
+ * @license MIT
+ * @see {@link https://github.com/editor-js/image}
+ *
+ * To developers.
+ * To simplify Tool structure, we split it to 4 parts:
+ * 1) index.js — main Tool's interface, public API and methods for working with data
+ * 2) uploader.js — module that has methods for sending files via AJAX: from device, by URL or File pasting
+ * 3) ui.js — module for UI manipulations: render, showing preloader, etc
+ * 4) tunes.js — working with Block Tunes: render buttons, handle clicks
+ *
+ * For debug purposes there is a testing server
+ * that can save uploaded files and return a Response {@link UploadResponseFormat}
+ *
+ * $ node dev/server.js
+ *
+ * It will expose 8008 port, so you can pass http://localhost:8008 with the Tools config:
+ *
+ * image: {
+ * class: ImageTool,
+ * config: {
+ * endpoints: {
+ * byFile: 'http://localhost:8008/uploadFile',
+ * byUrl: 'http://localhost:8008/fetchUrl',
+ * }
+ * },
+ * },
+ */}]).default},3023:e=>{window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=5)}([function(e,t,n){var r=n(1);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(3)(r,o),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(2)(!1)).push([e.i,".inline-code {\n background: rgba(250, 239, 240, 0.78);\n color: #b44437;\n padding: 3px 4px;\n border-radius: 5px;\n margin: 0 1px;\n font-family: inherit;\n font-size: 0.86em;\n font-weight: 500;\n letter-spacing: 0.3px;\n}\n",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",o=e[3];if(!o)return r;if(t&&"function"==typeof btoa){var i=(n=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=o.sources.map((function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"}));return[r].concat(a).concat([i]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o=0&&u.splice(t,1)}function v(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),g(t,e.attrs),p(e,t),t}function g(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=c++;n=l||(l=v(t)),r=C.bind(null,n,a,!1),o=C.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",g(t,e.attrs),p(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=d(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),o=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),r=function(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){m(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return f(n,t),function(e){for(var r=[],o=0;o'}}],[{key:"isInline",get:function(){return!0}},{key:"sanitize",get:function(){return{code:{class:e.CSS}}}}]),e}()}]).default},5547:e=>{window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=5)}([function(e,t,n){var r=n(1);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(3)(r,o),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(2)(!1)).push([e.i,".cdx-marker {\n background: rgba(245,235,111,0.29);\n padding: 3px 0;\n}",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",o=e[3];if(!o)return r;if(t&&"function"==typeof btoa){var i=(n=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=o.sources.map((function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"}));return[r].concat(a).concat([i]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o=0&&u.splice(t,1)}function v(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),g(t,e.attrs),p(e,t),t}function g(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=c++;n=l||(l=v(t)),r=C.bind(null,n,a,!1),o=C.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",g(t,e.attrs),p(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=d(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),o=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),r=function(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){m(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return f(n,t),function(e){for(var r=[],o=0;o'}}],[{key:"isInline",get:function(){return!0}},{key:"sanitize",get:function(){return{mark:{class:e.CSS}}}}]),e}()}]).default},9257:e=>{self,e.exports=(()=>{"use strict";var e={384:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(645),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,'.cdx-nested-list {\n margin: 0;\n padding: 0;\n outline: none;\n counter-reset: item;\n list-style: none;\n}\n\n .cdx-nested-list__item {\n line-height: 1.6em;\n display: flex;\n margin: 2px 0;\n }\n\n .cdx-nested-list__item [contenteditable]{\n outline: none;\n }\n\n .cdx-nested-list__item-body {\n flex-grow: 2;\n }\n\n .cdx-nested-list__item-content,\n .cdx-nested-list__item-children {\n flex-basis: 100%;\n }\n\n .cdx-nested-list__item-content {\n word-break: break-word;\n white-space: pre-wrap;\n }\n\n .cdx-nested-list__item-children {}\n\n .cdx-nested-list__item::before {\n counter-increment: item;\n margin-right: 5px;\n white-space: nowrap;\n }\n\n .cdx-nested-list--ordered > .cdx-nested-list__item::before {\n content: counters(item, ".") ". ";\n }\n\n .cdx-nested-list--unordered > .cdx-nested-list__item::before {\n content: "•";\n }\n\n .cdx-nested-list__settings {\n display: flex;\n }\n\n .cdx-nested-list__settings .cdx-settings-button {\n width: 50%;\n }\n',""]);const i=o},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i{var r,o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function a(e){for(var t=-1,n=0;n{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{function e(e,t=null,n={}){const r=document.createElement(e);Array.isArray(t)?r.classList.add(...t):t&&r.classList.add(t);for(const e in n)r[e]=n[e];return r}function t(t){const n=e("div");return n.appendChild(t),n.innerHTML}function o(e){let t;return e.nodeType!==Node.ELEMENT_NODE?t=e.textContent:(t=e.innerHTML,t=t.replaceAll(" ","")),0===t.trim().length}n.d(r,{default:()=>u});class i{constructor(){this.savedFakeCaret=void 0}save(){const t=i.range,n=e("span");n.hidden=!0,t.insertNode(n),this.savedFakeCaret=n}restore(){if(!this.savedFakeCaret)return;const e=window.getSelection(),t=new Range;t.setStartAfter(this.savedFakeCaret),t.setEndAfter(this.savedFakeCaret),e.removeAllRanges(),e.addRange(t),setTimeout((()=>{this.savedFakeCaret.remove()}),150)}static get range(){const e=window.getSelection();return e&&e.rangeCount?e.getRangeAt(0):null}static extractFragmentFromCaretPositionTillTheEnd(){const e=window.getSelection();if(!e.rangeCount)return;const t=e.getRangeAt(0);let n=t.startContainer;n.nodeType!==Node.ELEMENT_NODE&&(n=n.parentNode);const r=n.closest("[contenteditable]");t.deleteContents();const o=t.cloneRange();return o.selectNodeContents(r),o.setStart(t.endContainer,t.endOffset),o.extractContents()}static focus(e,t=!0){const n=document.createRange(),r=window.getSelection();n.selectNodeContents(e),n.collapse(t),r.removeAllRanges(),r.addRange(n)}static isAtStart(){const e=window.getSelection();if(e.focusOffset>0)return!1;const t=e.focusNode;return i.getHigherLevelSiblings(t,"left").every((e=>o(e)))}static getHigherLevelSiblings(e,t="left"){let n=e;const r=[];for(;n.parentNode&&"true"!==n.parentNode.contentEditable;)n=n.parentNode;const o="left"===t?"previousSibling":"nextSibling";for(;n[o];)n=n[o],r.push(n);return r}}const a='';var s=n(379),l=n.n(s),c=n(384);l()(c.Z,{insert:"head",singleton:!1}),c.Z.locals;class u{static get isReadOnlySupported(){return!0}static get enableLineBreaks(){return!0}static get toolbox(){return{icon:a,title:"List"}}constructor({data:e,config:t,api:n,readOnly:r}){this.nodes={wrapper:null},this.api=n,this.readOnly=r,this.config=t,this.defaultListStyle="ordered"===this.config.defaultStyle?"ordered":"unordered";const o={style:this.defaultListStyle,items:[]};this.data=e&&Object.keys(e).length?e:o,this.caret=new i}render(){return this.nodes.wrapper=this.makeListWrapper(this.data.style,[this.CSS.baseBlock]),this.data.items.length?this.appendItems(this.data.items,this.nodes.wrapper):this.appendItems([{content:"",items:[]}],this.nodes.wrapper),this.readOnly||this.nodes.wrapper.addEventListener("keydown",(e=>{switch(e.key){case"Enter":this.enterPressed(e);break;case"Backspace":this.backspace(e);break;case"Tab":e.shiftKey?this.shiftTab(e):this.addTab(e)}}),!1),this.nodes.wrapper}renderSettings(){return[{name:"unordered",label:this.api.i18n.t("Unordered"),icon:''},{name:"ordered",label:this.api.i18n.t("Ordered"),icon:a}].map((e=>({name:e.name,icon:e.icon,label:e.label,isActive:this.data.style===e.name,closeOnActivate:!0,onActivate:()=>{this.listStyle=e.name}})))}static get pasteConfig(){return{tags:["OL","UL","LI"]}}onPaste(e){const t=e.detail.data;this.data=this.pasteHandler(t);const n=this.nodes.wrapper;n&&n.parentNode.replaceChild(this.render(),n)}pasteHandler(e){const{tagName:t}=e;let n,r;switch(t){case"OL":n="ordered",r="ol";break;case"UL":case"LI":n="unordered",r="ul"}const o={style:n,items:[]},i=e=>Array.from(e.querySelectorAll(":scope > li")).map((e=>{const t=e.querySelector(`:scope > ${r}`),n=t?i(t):[];return{content:e?.firstChild?.textContent||"",items:n}}));return o.items=i(e),o}appendItems(e,t){e.forEach((e=>{const n=this.createItem(e.content,e.items);t.appendChild(n)}))}createItem(t,n=[]){const r=e("li",this.CSS.item),o=e("div",this.CSS.itemBody),i=e("div",this.CSS.itemContent,{innerHTML:t,contentEditable:!this.readOnly});return o.appendChild(i),r.appendChild(o),n&&n.length>0&&this.addChildrenList(r,n),r}save(){const e=t=>Array.from(t.querySelectorAll(`:scope > .${this.CSS.item}`)).map((t=>{const n=t.querySelector(`.${this.CSS.itemChildren}`);return{content:this.getItemContent(t),items:n?e(n):[]}}));return{style:this.data.style,items:e(this.nodes.wrapper)}}addChildrenList(e,t){const n=e.querySelector(`.${this.CSS.itemBody}`),r=this.makeListWrapper(void 0,[this.CSS.itemChildren]);this.appendItems(t,r),n.appendChild(r)}makeListWrapper(t=this.listStyle,n=[]){const r="ordered"===t?"ol":"ul",o="ordered"===t?this.CSS.wrapperOrdered:this.CSS.wrapperUnordered;return n.push(o),e(r,[this.CSS.wrapper,...n])}get CSS(){return{baseBlock:this.api.styles.block,wrapper:"cdx-nested-list",wrapperOrdered:"cdx-nested-list--ordered",wrapperUnordered:"cdx-nested-list--unordered",item:"cdx-nested-list__item",itemBody:"cdx-nested-list__item-body",itemContent:"cdx-nested-list__item-content",itemChildren:"cdx-nested-list__item-children",settingsWrapper:"cdx-nested-list__settings",settingsButton:this.api.styles.settingsButton,settingsButtonActive:this.api.styles.settingsButtonActive}}get listStyle(){return this.data.style||this.defaultListStyle}set listStyle(e){const t=Array.from(this.nodes.wrapper.querySelectorAll(`.${this.CSS.wrapper}`));t.push(this.nodes.wrapper),t.forEach((t=>{t.classList.toggle(this.CSS.wrapperUnordered,"unordered"===e),t.classList.toggle(this.CSS.wrapperOrdered,"ordered"===e)})),this.data.style=e}get currentItem(){let e=window.getSelection().anchorNode;return e.nodeType!==Node.ELEMENT_NODE&&(e=e.parentNode),e.closest(`.${this.CSS.item}`)}enterPressed(e){const n=this.currentItem;e.stopPropagation(),e.preventDefault();const r=0===this.getItemContent(n).trim().length,o=n.parentNode===this.nodes.wrapper,a=null===n.nextElementSibling;if(o&&a&&r)return void this.getOutOfList();if(a&&r)return void this.unshiftItem();const s=t(i.extractFragmentFromCaretPositionTillTheEnd()),l=n.querySelector(`.${this.CSS.itemChildren}`),c=this.createItem(s,void 0);l&&Array.from(l.querySelectorAll(`.${this.CSS.item}`)).length>0?l.prepend(c):n.after(c),this.focusItem(c)}unshiftItem(){const e=this.currentItem,t=e.parentNode.closest(`.${this.CSS.item}`);if(!t)return;this.caret.save(),t.after(e),this.caret.restore();const n=t.querySelector(`.${this.CSS.itemChildren}`);0===n.children.length&&n.remove()}getItemContent(e){const t=e.querySelector(`.${this.CSS.itemContent}`);return o(t)?"":t.innerHTML}focusItem(e,t=!0){const n=e.querySelector(`.${this.CSS.itemContent}`);i.focus(n,t)}getOutOfList(){this.currentItem.remove(),this.api.blocks.insert(),this.api.caret.setToBlock(this.api.blocks.getCurrentBlockIndex())}backspace(e){if(!i.isAtStart())return;e.preventDefault();const n=this.currentItem,r=n.previousSibling,o=n.parentNode.closest(`.${this.CSS.item}`);if(!r&&!o)return;let a;if(e.stopPropagation(),r){const e=r.querySelectorAll(`.${this.CSS.item}`);a=Array.from(e).pop()||r}else a=o;const s=t(i.extractFragmentFromCaretPositionTillTheEnd()),l=a.querySelector(`.${this.CSS.itemContent}`);i.focus(l,!1),this.caret.save(),l.insertAdjacentHTML("beforeend",s);let c=n.querySelectorAll(`.${this.CSS.itemChildren} > .${this.CSS.item}`);c=Array.from(c),c=c.filter((e=>e.parentNode.closest(`.${this.CSS.item}`)===n)),c.reverse().forEach((e=>{r?a.after(e):n.after(e)})),n.remove(),this.caret.restore()}addTab(e){e.stopPropagation(),e.preventDefault();const t=this.currentItem,n=t.previousSibling;if(!n)return;const r=n.querySelector(`.${this.CSS.itemChildren}`);if(this.caret.save(),r)r.appendChild(t);else{const e=this.makeListWrapper(void 0,[this.CSS.itemChildren]),r=n.querySelector(`.${this.CSS.itemBody}`);e.appendChild(t),r.appendChild(e)}this.caret.restore()}shiftTab(e){e.stopPropagation(),e.preventDefault(),this.unshiftItem()}static joinRecursive(e){return e.items.map((e=>`${e.content} ${u.joinRecursive(e)}`)).join("")}static get conversionConfig(){return{export:e=>u.joinRecursive(e),import:e=>({items:[{content:e,items:[]}],style:"unordered"})}}}})(),r.default})()},3058:e=>{window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=5)}([function(e,t,n){var r=n(1);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(3)(r,o),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(2)(!1)).push([e.i,".cdx-quote-icon svg {\n transform: rotate(180deg);\n}\n\n.cdx-quote {\n margin: 0;\n}\n\n.cdx-quote__text {\n min-height: 158px;\n margin-bottom: 10px;\n}\n\n.cdx-quote__caption {}\n\n.cdx-quote [contentEditable=true][data-placeholder]::before{\n position: absolute;\n content: attr(data-placeholder);\n color: #707684;\n font-weight: normal;\n opacity: 0;\n}\n\n.cdx-quote [contentEditable=true][data-placeholder]:empty::before {\n opacity: 1;\n}\n\n.cdx-quote [contentEditable=true][data-placeholder]:empty:focus::before {\n opacity: 0;\n}\n\n\n.cdx-quote-settings {\n display: flex;\n}\n\n.cdx-quote-settings .cdx-settings-button {\n width: 50%;\n}\n",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",o=e[3];if(!o)return r;if(t&&"function"==typeof btoa){var i=(n=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=o.sources.map((function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"}));return[r].concat(a).concat([i]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o=0&&u.splice(t,1)}function v(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),g(t,e.attrs),p(e,t),t}function g(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=c++;n=l||(l=v(t)),r=C.bind(null,n,a,!1),o=C.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",g(t,e.attrs),p(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=d(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),o=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),r=function(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){m(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return f(n,t),function(e){for(var r=[],o=0;o'},{name:"center",icon:''}]}}],[{key:"isReadOnlySupported",get:function(){return!0}},{key:"toolbox",get:function(){return{icon:'',title:"Quote"}}},{key:"contentless",get:function(){return!0}},{key:"enableLineBreaks",get:function(){return!0}},{key:"DEFAULT_QUOTE_PLACEHOLDER",get:function(){return"Enter a quote"}},{key:"DEFAULT_CAPTION_PLACEHOLDER",get:function(){return"Enter a caption"}},{key:"ALIGNMENTS",get:function(){return{left:"left",center:"center"}}},{key:"DEFAULT_ALIGNMENT",get:function(){return e.ALIGNMENTS.left}},{key:"conversionConfig",get:function(){return{import:"text",export:function(e){return e.caption?"".concat(e.text," — ").concat(e.caption):e.text}}}}]),i(e,[{key:"render",value:function(){var e=this._make("blockquote",[this.CSS.baseClass,this.CSS.wrapper]),t=this._make("div",[this.CSS.input,this.CSS.text],{contentEditable:!this.readOnly,innerHTML:this.data.text}),n=this._make("div",[this.CSS.input,this.CSS.caption],{contentEditable:!this.readOnly,innerHTML:this.data.caption});return t.dataset.placeholder=this.quotePlaceholder,n.dataset.placeholder=this.captionPlaceholder,e.appendChild(t),e.appendChild(n),e}},{key:"save",value:function(e){var t=e.querySelector(".".concat(this.CSS.text)),n=e.querySelector(".".concat(this.CSS.caption));return Object.assign(this.data,{text:t.innerHTML,caption:n.innerHTML})}},{key:"renderSettings",value:function(){var e=this;return this.settings.map((function(t){return{icon:t.icon,label:e.api.i18n.t("Align ".concat((n=t.name,n[0].toUpperCase()+n.substr(1)))),onActivate:function(){return e._toggleTune(t.name)},isActive:e.data.alignment===t.name,closeOnActivate:!0};var n}))}},{key:"_toggleTune",value:function(e){this.data.alignment=e}},{key:"_make",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=document.createElement(e);for(var a in Array.isArray(n)?(t=i.classList).add.apply(t,r(n)):n&&i.classList.add(n),o)i[a]=o[a];return i}}],[{key:"sanitize",get:function(){return{text:{br:!0},caption:{br:!0},alignment:{}}}}]),e}()}]).default},8172:e=>{window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=5)}([function(e,t,n){var r=n(1);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(3)(r,o),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(2)(!1)).push([e.i,".ce-rawtool__textarea {\n min-height: 200px;\n resize: vertical;\n border-radius: 8px;\n border: 0;\n background-color: #1e2128;\n font-family: Menlo, Monaco, Consolas, Courier New, monospace;\n font-size: 12px;\n line-height: 1.6;\n letter-spacing: -0.2px;\n color: #a1a7b6;\n overscroll-behavior: contain;\n}\n",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",o=e[3];if(!o)return r;if(t&&"function"==typeof btoa){var i=(n=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=o.sources.map((function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"}));return[r].concat(a).concat([i]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o=0&&d.splice(t,1)}function g(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),b(t,e.attrs),m(e,t),t}function b(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function y(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=u++;n=c||(c=g(t)),r=x.bind(null,n,a,!1),o=x.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",b(t,e.attrs),m(e,t),t}(t),r=k.bind(null,n,t),o=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),r=A.bind(null,n),o=function(){v(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return h(n,t),function(e){for(var r=[],o=0;o',title:"Raw HTML"}}}]),o(e,[{key:"render",value:function(){var e=this,t=document.createElement("div");return this.textarea=document.createElement("textarea"),t.classList.add(this.CSS.baseClass,this.CSS.wrapper),this.textarea.classList.add(this.CSS.textarea,this.CSS.input),this.textarea.textContent=this.data.html,this.textarea.placeholder=this.placeholder,this.readOnly?this.textarea.disabled=!0:this.textarea.addEventListener("input",(function(){e.onInput()})),t.appendChild(this.textarea),setTimeout((function(){e.resize()}),100),t}},{key:"save",value:function(e){return{html:e.querySelector("textarea").value}}},{key:"onInput",value:function(){var e=this;this.resizeDebounce&&clearTimeout(this.resizeDebounce),this.resizeDebounce=setTimeout((function(){e.resize()}),200)}},{key:"resize",value:function(){this.textarea.style.height="auto",this.textarea.style.height=this.textarea.scrollHeight+"px"}}],[{key:"DEFAULT_PLACEHOLDER",get:function(){return"Enter HTML code"}},{key:"sanitize",get:function(){return{html:!0}}}]),e}()}]).default},3602:e=>{window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=5)}([function(e,t,n){var r=n(1);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(3)(r,o),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(2)(!1)).push([e.i,".cdx-warning {\n position: relative;\n\n}\n\n@media all and (min-width: 736px) {\n .cdx-warning {\n padding-left: 36px;\n }\n}\n\n.cdx-warning [contentEditable=true][data-placeholder]::before{\n position: absolute;\n content: attr(data-placeholder);\n color: #707684;\n font-weight: normal;\n opacity: 0;\n}\n\n.cdx-warning [contentEditable=true][data-placeholder]:empty::before {\n opacity: 1;\n}\n\n.cdx-warning [contentEditable=true][data-placeholder]:empty:focus::before {\n opacity: 0;\n}\n\n\n.cdx-warning::before {\n content: '';\n background-image: url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='5' y='5' width='14' height='14' rx='4' stroke='black' stroke-width='2'/%3E%3Cline x1='12' y1='9' x2='12' y2='12' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M12 15.02V15.01' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E\");\n width: 24px;\n height: 24px;\n background-size: 24px 24px;\n position: absolute;\n margin-top: 8px;\n left: 0;\n}\n\n@media all and (max-width: 735px) {\n .cdx-warning::before {\n display: none;\n }\n}\n\n.cdx-warning__message {\n min-height: 85px;\n}\n\n.cdx-warning__title {\n margin-bottom: 6px;\n}\n",""])},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",o=e[3];if(!o)return r;if(t&&"function"==typeof btoa){var i=(n=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=o.sources.map((function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"}));return[r].concat(a).concat([i]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o=0&&u.splice(t,1)}function v(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=n.nc;r&&(e.attrs.nonce=r)}return g(t,e.attrs),p(e,t),t}function g(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var a=c++;n=l||(l=v(t)),r=C.bind(null,n,a,!1),o=C.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",g(t,e.attrs),p(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=d(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),o=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),r=function(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){m(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return f(n,t),function(e){for(var r=[],o=0;o',title:"Warning"}}},{key:"enableLineBreaks",get:function(){return!0}},{key:"DEFAULT_TITLE_PLACEHOLDER",get:function(){return"Title"}},{key:"DEFAULT_MESSAGE_PLACEHOLDER",get:function(){return"Message"}}]),i(e,[{key:"render",value:function(){var e=this._make("div",[this.CSS.baseClass,this.CSS.wrapper]),t=this._make("div",[this.CSS.input,this.CSS.title],{contentEditable:!this.readOnly,innerHTML:this.data.title}),n=this._make("div",[this.CSS.input,this.CSS.message],{contentEditable:!this.readOnly,innerHTML:this.data.message});return t.dataset.placeholder=this.titlePlaceholder,n.dataset.placeholder=this.messagePlaceholder,e.appendChild(t),e.appendChild(n),e}},{key:"save",value:function(e){var t=e.querySelector(".".concat(this.CSS.title)),n=e.querySelector(".".concat(this.CSS.message));return Object.assign(this.data,{title:t.innerHTML,message:n.innerHTML})}},{key:"_make",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=document.createElement(e);for(var a in Array.isArray(n)?(t=i.classList).add.apply(t,r(n)):n&&i.classList.add(n),o)i[a]=o[a];return i}}],[{key:"sanitize",get:function(){return{title:{},message:{}}}}]),e}()}]).default},318:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(7537),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".tc-setting{--color-default:#000;--color-active:#388ae5;--color-background:#eff2f5;align-items:center;border-radius:3px;color:var(--color-default);cursor:pointer;display:inline-flex;height:34px;justify-content:center;transition:background-color .3s ease;width:52px;will-change:background-color}.tc-setting--active{color:var(--color-active)}.tc-setting:first-child{margin-right:4px}.tc-setting:hover{background-color:var(--color-background);transition:background-color 0s}","",{version:3,sources:["webpack://./src/vendor/table/src/styles/settings.pcss"],names:[],mappings:"AAAA,YACE,oBAAqB,CACrB,sBAAuB,CACvB,0BAA2B,CAK3B,kBAAmB,CAEnB,iBAAkB,CAElB,0BAA2B,CAD3B,cAAe,CAJf,mBAAoB,CADpB,WAAY,CAGZ,sBAAuB,CAIvB,oCAAqC,CARrC,UAAW,CASX,4BAcF,CAZE,oBACE,yBACF,CAEA,wBACE,gBACF,CAEA,kBACE,wCAAyC,CACzC,8BACF",sourcesContent:[".tc-setting {\r\n --color-default: #000;\r\n --color-active: #388ae5;\r\n --color-background: #eff2f5;\r\n\r\n width: 52px;\r\n height: 34px;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n border-radius: 3px;\r\n cursor: pointer;\r\n color: var(--color-default);\r\n transition: background-color .3s ease;\r\n will-change: background-color;\r\n \r\n &--active {\r\n color: var(--color-active);\r\n }\r\n\r\n &:first-child {\r\n margin-right: 4px;\r\n }\r\n\r\n &:hover {\r\n background-color: var(--color-background);\r\n transition: background-color 0s;\r\n }\r\n}"],sourceRoot:""}]);const s=a},3381:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(7537),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]);const s=a},926:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(7537),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,'.tc-wrap{--color-background:#f9f9fb;--color-placeholder:#7b7e89;--color-border:#e8e8eb;--cell-size:34px;--toolbox-icon-size:18px;--toolbox-padding:6px;--toolbox-aiming-field-size:calc(var(--toolbox-icon-size) + var(--toolbox-padding)*2);border-left:0;box-sizing:border-box;display:grid;grid-template-columns:calc(100% - var(--cell-size)) var(--cell-size);height:100%;margin-top:var(--toolbox-icon-size);position:relative;width:100%}.tc-wrap svg{vertical-align:top}.tc-table{border-top:1px solid var(--color-border);display:grid;font-size:14px;height:100%;line-height:1.4;position:relative;width:100%}.tc-table:after{content:"";height:100%;left:calc(var(--cell-size)*-1);position:absolute;top:0;width:calc(var(--cell-size))}.tc-table:before{content:"";height:var(--toolbox-aiming-field-size);left:0;position:absolute;top:calc(var(--toolbox-aiming-field-size)*-1);width:100%}.tc-table--heading .tc-row:first-child{border-bottom:2px solid var(--color-border);font-weight:500}.tc-table--heading .tc-row:first-child [contenteditable]:empty:before{color:var(--color-placeholder);content:attr(heading)}.tc-table--heading .tc-row:first-child:after{border-bottom:2px solid var(--color-border);bottom:-2px}.tc-add-column,.tc-add-row{display:flex}.tc-add-column svg path,.tc-add-row svg path{fill:#7b7e89}.tc-add-column{border-top:1px solid var(--color-border);justify-content:center;padding:9px 0}.tc-add-row{align-items:center;height:var(--cell-size);padding-left:12px;position:relative}.tc-add-row:before{content:"";height:100%;position:absolute;right:calc(var(--cell-size)*-1);width:var(--cell-size)}.tc-add-column,.tc-add-row{cursor:pointer;transition:0s;will-change:background-color}.tc-add-column:hover,.tc-add-row:hover{background-color:var(--color-background);transition:background-color .1s ease}.tc-add-row:hover:before{background-color:var(--color-background);transition:.1s}.tc-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(10px,1fr));position:relative}.tc-row,.tc-row:after{border-bottom:1px solid var(--color-border)}.tc-row:after{bottom:-1px;content:"";height:100%;pointer-events:none;position:absolute;right:calc(var(--cell-size)*-1);width:var(--cell-size)}.tc-row--selected,.tc-row--selected:after{background:var(--color-background)}.tc-cell{border-right:1px solid var(--color-border);clear:both;line-break:normal;outline:none;overflow:hidden;padding:6px 2px 6px 12px}.tc-cell--selected{background:var(--color-background)}',"",{version:3,sources:["webpack://./src/vendor/table/src/styles/table.pcss"],names:[],mappings:"AACA,SACE,0BAA2B,CAC3B,2BAA4B,CAC5B,sBAAuB,CACvB,gBAAiB,CACjB,wBAAyB,CACzB,qBAAsB,CACtB,qFAAwF,CAExF,aAAgB,CAKhB,qBAAsB,CACtB,YAAa,CACb,oEAAqE,CALrE,WAAY,CAEZ,mCAAoC,CAHpC,iBAAkB,CAElB,UASF,CAHE,aACE,kBACF,CAGF,UAME,wCAAyC,CAFzC,YAAa,CACb,cAAe,CAFf,WAAY,CAIZ,eAAgB,CANhB,iBAAkB,CAClB,UAyCF,CAlCE,gBAEE,UAAW,CAEX,WAAY,CACZ,8BAAiC,CAJjC,iBAAkB,CAKlB,KAAM,CAHN,4BAIF,CAEA,iBAEE,UAAW,CAEX,uCAAwC,CAExC,MAAO,CALP,iBAAkB,CAIlB,6CAAgD,CAFhD,UAIF,CAGE,uCAEE,2CAA4C,CAD5C,eAYF,CATE,sEAEE,8BAA+B,CAD/B,qBAEF,CAEA,6CAEE,2CAA4C,CAD5C,WAEF,CAMJ,2BACE,YAKF,CAHE,6CACE,YACF,CAIJ,eAGE,wCAAyC,CADzC,sBAAuB,CADvB,aAGF,CAEA,YAEE,kBAAmB,CADnB,uBAAwB,CAExB,iBAAkB,CAClB,iBASF,CAPE,mBACE,UAAW,CAIX,WAAY,CAHZ,iBAAkB,CAClB,+BAAkC,CAClC,sBAEF,CAIA,2BAEE,cAAe,CADf,aAAc,CAEd,4BAMF,CAJE,uCAEE,wCAAyC,CADzC,oCAEF,CAIA,yBAEE,wCAAyC,CADzC,cAEF,CAIJ,QACE,YAAa,CACb,uDAA0D,CAC1D,iBAiBF,CAdE,sBAFA,2CAWA,CATA,cAME,WAAY,CALZ,UAAW,CAIX,WAAY,CAHZ,mBAAoB,CACpB,iBAAkB,CAIlB,+BAAkC,CAHlC,sBAKF,CAQA,0CACE,kCACF,CAGF,SACE,0CAA2C,CAC3C,UAAW,CAIX,iBAAkB,CADlB,YAAa,CADb,eAAgB,CADhB,wBAQF,CAHE,mBACE,kCACF",sourcesContent:["/* tc- project's prefix*/\r\n.tc-wrap {\r\n --color-background: #f9f9fb;\r\n --color-placeholder: #7b7e89;\r\n --color-border: #e8e8eb;\r\n --cell-size: 34px;\r\n --toolbox-icon-size: 18px;\r\n --toolbox-padding: 6px;\r\n --toolbox-aiming-field-size: calc(var(--toolbox-icon-size) + 2 * var(--toolbox-padding));\r\n\r\n border-left: 0px;\r\n position: relative;\r\n height: 100%;\r\n width: 100%;\r\n margin-top: var(--toolbox-icon-size);\r\n box-sizing: border-box;\r\n display: grid;\r\n grid-template-columns: calc(100% - var(--cell-size)) var(--cell-size);\r\n\r\n & svg {\r\n vertical-align: top;\r\n }\r\n}\r\n\r\n.tc-table {\r\n position: relative;\r\n width: 100%;\r\n height: 100%;\r\n display: grid;\r\n font-size: 14px;\r\n border-top: 1px solid var(--color-border);\r\n line-height: 1.4;\r\n\r\n &::after {\r\n position: absolute;\r\n content: \"\";\r\n width: calc(var(--cell-size));\r\n height: 100%;\r\n left: calc(-1 * var(--cell-size));\r\n top: 0;\r\n }\r\n\r\n &::before {\r\n position: absolute;\r\n content: \"\";\r\n width: 100%;\r\n height: var(--toolbox-aiming-field-size);\r\n top: calc(-1 * var(--toolbox-aiming-field-size));\r\n left: 0;\r\n }\r\n\r\n &--heading {\r\n & .tc-row:first-child {\r\n font-weight: 500;\r\n border-bottom: 2px solid var(--color-border);\r\n\r\n & [contenteditable]:empty::before {\r\n content: attr(heading);\r\n color: var(--color-placeholder);\r\n }\r\n \r\n &::after {\r\n bottom: -2px;\r\n border-bottom: 2px solid var(--color-border);\r\n }\r\n }\r\n }\r\n}\r\n\r\n.tc-add {\r\n &-column, &-row {\r\n display: flex;\r\n\r\n svg path {\r\n fill: #7b7e89;\r\n }\r\n }\r\n}\r\n\r\n.tc-add-column {\r\n padding: 9px 0;\r\n justify-content: center;\r\n border-top: 1px solid var(--color-border);\r\n}\r\n\r\n.tc-add-row {\r\n height: var(--cell-size);\r\n align-items: center;\r\n padding-left: 12px;\r\n position: relative;\r\n\r\n &::before {\r\n content: '';\r\n position: absolute;\r\n right: calc(-1 * var(--cell-size));\r\n width: var(--cell-size);\r\n height: 100%;\r\n }\r\n}\r\n\r\n.tc-add {\r\n &-column, &-row {\r\n transition: 0s;\r\n cursor: pointer;\r\n will-change: background-color;\r\n \r\n &:hover {\r\n transition: background-color 0.1s ease;\r\n background-color: var(--color-background);\r\n }\r\n }\r\n\r\n &-row {\r\n &:hover::before {\r\n transition: 0.1s;\r\n background-color: var(--color-background);\r\n }\r\n }\r\n}\r\n\r\n.tc-row {\r\n display: grid;\r\n grid-template-columns: repeat(auto-fit, minmax(10px, 1fr));\r\n position: relative;\r\n border-bottom: 1px solid var(--color-border);\r\n\r\n &::after {\r\n content: '';\r\n pointer-events: none;\r\n position: absolute;\r\n width: var(--cell-size);\r\n height: 100%;\r\n bottom: -1px;\r\n right: calc(-1 * var(--cell-size));\r\n border-bottom: 1px solid var(--color-border);\r\n }\r\n\r\n &--selected {\r\n background: var(--color-background);\r\n }\r\n}\r\n\r\n.tc-row--selected {\r\n &::after {\r\n background: var(--color-background);\r\n }\r\n}\r\n\r\n.tc-cell {\r\n border-right: 1px solid var(--color-border);\r\n clear: both;\r\n padding: 6px 2px 6px 12px;\r\n overflow: hidden;\r\n outline: none;\r\n line-break: normal;\r\n\r\n &--selected {\r\n background: var(--color-background);\r\n }\r\n}"],sourceRoot:""}]);const s=a},5448:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(7537),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".tc-toolbox-column,.tc-toolbox-row{--color-border:#eaeaea;--color-option-hover:#f7f7f7;--color-delete:#e24a4a;--menu-padding:30px;--menu-width-row:165px;--menu-width-column:190px;--toolbox-icon-size:18px;--toolbox-padding:6px;cursor:pointer;opacity:0;position:absolute;transition:opacity .1s;z-index:1}.tc-toolbox-column__menu,.tc-toolbox-row__menu{background:#fff;border:1px solid var(--color-border);border-radius:4px;box-shadow:0 3px 15px -3px rgba(13,20,33,.13);display:grid;left:var(--menu-padding);padding:7px 0;top:0;will-change:transform,opacity}.tc-toolbox-column__option,.tc-toolbox-row__option{grid-column-gap:11px;align-items:center;display:grid;font-size:14px;grid-template-columns:auto 1fr;padding:7px 12px}.tc-toolbox-column__option svg path,.tc-toolbox-row__option svg path{fill:#1d202b}.tc-toolbox-column__option:hover,.tc-toolbox-row__option:hover{background:var(--color-option-hover)}.tc-toolbox-row{left:calc(var(--menu-padding)*-1);transform:translateY(-50%)}.tc-toolbox-row__menu{position:absolute;width:var(--menu-width-row)}.tc-toolbox-column{top:calc((var(--toolbox-icon-size) + var(--toolbox-padding))*-1);transform:translateX(-50%)}.tc-toolbox-column__menu{position:absolute;width:var(--menu-width-column)}.tc-toolbox-delete{transition:background-color .3s ease}.tc-toolbox-delete--confirm{background-color:var(--color-delete)!important;color:#fff}.tc-toolbox-delete--confirm svg{filter:invert(100%);transform:rotate(90deg);transition:.2s ease-out}.tc-menu-animation{animation-duration:.1s;animation-name:menuShowing}@keyframes menuShowing{0%{opacity:0;transform:translateY(-8px) scale(.9)}70%{opacity:1;transform:translateY(2px)}to{transform:translateY(0)}}","",{version:3,sources:["webpack://./src/vendor/table/src/styles/toolboxes.pcss"],names:[],mappings:"AAAA,mCACE,sBAAuB,CACvB,4BAA6B,CAC7B,sBAAuB,CACvB,mBAAoB,CACpB,sBAAuB,CACvB,yBAA0B,CAC1B,wBAAyB,CACzB,qBAAsB,CAGtB,cAAe,CAEf,SAAU,CAHV,iBAAkB,CAIlB,sBAAwB,CAFxB,SAgCF,CA5BE,+CACE,eAAgB,CAChB,oCAAqC,CAErC,iBAAkB,CADlB,6CAAkD,CAElD,YAAa,CAGb,wBAAyB,CADzB,aAAc,CAEd,KAAM,CAHN,6BAIF,CAEA,mDAIE,oBAAqB,CACrB,kBAAmB,CAHnB,YAAa,CADb,cAAe,CAEf,8BAA+B,CAG/B,gBASF,CAPE,qEACE,YACF,CAEA,+DACE,oCACF,CAIJ,gBACE,iCAAoC,CACpC,0BAMF,CAJE,sBACE,iBAAkB,CAClB,2BACF,CAGF,mBACE,gEAAmE,CACnE,0BAMF,CAJE,yBACE,iBAAkB,CAClB,8BACF,CAGF,mBACE,oCAYF,CAVE,4BACE,8CAAgD,CAChD,UAOF,CALE,gCAGE,mBAAoB,CADpB,uBAAwB,CADxB,uBAGF,CAIJ,mBAEE,sBAAwB,CADxB,0BAEF,CAEA,uBACE,GACE,SAAS,CAET,oCACF,CACA,IACE,SAAS,CAET,yBACF,CACA,GAEE,uBACF,CACF",sourcesContent:[".tc-toolbox-row, .tc-toolbox-column {\r\n --color-border: #eaeaea;\r\n --color-option-hover: #f7f7f7;\r\n --color-delete: #e24a4a;\r\n --menu-padding: 30px;\r\n --menu-width-row: 165px;\r\n --menu-width-column: 190px;\r\n --toolbox-icon-size: 18px;\r\n --toolbox-padding: 6px;\r\n\r\n position: absolute;\r\n cursor: pointer;\r\n z-index: 1;\r\n opacity: 0;\r\n transition: opacity 0.1s;\r\n\r\n &__menu {\r\n background: #fff;\r\n border: solid 1px var(--color-border);\r\n box-shadow: 0 3px 15px -3px rgba(13, 20, 33, 0.13);\r\n border-radius: 4px;\r\n display: grid;\r\n will-change: transform, opacity;\r\n padding: 7px 0;\r\n left: var(--menu-padding);\r\n top: 0;\r\n }\r\n\r\n &__option {\r\n font-size: 14px;\r\n display: grid;\r\n grid-template-columns: auto 1fr;\r\n grid-column-gap: 11px;\r\n align-items: center;\r\n padding: 7px 12px;\r\n\r\n svg path {\r\n fill: #1d202b;\r\n }\r\n\r\n &:hover {\r\n background: var(--color-option-hover);\r\n }\r\n }\r\n}\r\n\r\n.tc-toolbox-row {\r\n left: calc(-1 * var(--menu-padding));\r\n transform: translateY(-50%);\r\n\r\n &__menu {\r\n position: absolute;\r\n width: var(--menu-width-row);\r\n }\r\n}\r\n\r\n.tc-toolbox-column {\r\n top: calc(-1 * (var(--toolbox-icon-size) + var(--toolbox-padding)));\r\n transform: translateX(-50%);\r\n\r\n &__menu {\r\n position: absolute;\r\n width: var(--menu-width-column);\r\n }\r\n}\r\n\r\n.tc-toolbox-delete {\r\n transition: background-color 0.3s ease;\r\n\r\n &--confirm {\r\n background-color: var(--color-delete) !important;\r\n color: #fff;\r\n\r\n svg {\r\n transition: 0.2s ease-out;\r\n transform: rotate(90deg);\r\n filter: invert(100%);\r\n }\r\n }\r\n}\r\n\r\n.tc-menu-animation {\r\n animation-name: menuShowing;\r\n animation-duration: 0.1s;\r\n} \r\n\r\n@keyframes menuShowing {\r\n 0% {\r\n opacity:0;\r\n -webkit-transform:translateY(-8px) scale(.9);\r\n transform:translateY(-8px) scale(.9)\r\n }\r\n 70% {\r\n opacity:1;\r\n -webkit-transform:translateY(2px);\r\n transform:translateY(2px)\r\n }\r\n to {\r\n -webkit-transform:translateY(0);\r\n transform:translateY(0)\r\n }\r\n}\r\n\r\n"],sourceRoot:""}]);const s=a},6228:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(7537),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".tc-hidden{visibility:hidden}.tc-display-none{display:none}","",{version:3,sources:["webpack://./src/vendor/table/src/styles/utils.pcss"],names:[],mappings:"AAEA,WACE,iBACF,CAEA,iBACE,YACF",sourcesContent:["/* tc- project's prefix*/\r\n\r\n.tc-hidden {\r\n visibility: hidden;\r\n}\r\n\r\n.tc-display-none {\r\n display: none;\r\n}"],sourceRoot:""}]);const s=a},3349:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(7537),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".rock-fillin {\n background: rgba(0,200,245,0.2);\n padding: 3px 0;\n}\n","",{version:3,sources:["webpack://./src/fillin.css"],names:[],mappings:"AAAA;IACI,+BAA+B;IAC/B,cAAc;AAClB",sourcesContent:[".rock-fillin {\r\n background: rgba(0,200,245,0.2);\r\n padding: 3px 0;\r\n}\r\n"],sourceRoot:""}]);const s=a},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},7537:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),i="/*# ".concat(o," */");return[t].concat([i]).join("\n")}return[t].join("\n")}},8105:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(3379),o=n.n(r),i=n(7795),a=n.n(i),s=n(569),l=n.n(s),c=n(3565),u=n.n(c),d=n(9216),f=n.n(d),h=n(4589),p=n.n(h),m=n(3349),v={};v.styleTagTransform=p(),v.setAttributes=u(),v.insert=l().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=f();o()(m.Z,v);const g=m.Z&&m.Z.locals?m.Z.locals:void 0},3379:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},1597:e=>{e.exports=''},6907:e=>{e.exports=''},7375:e=>{e.exports=''},5100:e=>{e.exports=''},5787:e=>{e.exports=''},3396:e=>{e.exports=''},5748:e=>{e.exports=''},2770:e=>{e.exports=''},5362:e=>{e.exports=''},5435:e=>{e.exports=''},480:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Code=void 0;const o=r(n(4787)),i={bash:"Bash",c:"C",csharp:"C#",cpp:"C++",coffee:"Coffee",coffeescript:"Coffee Script",css:"CSS",html:"HTML",javascript:"JavaScript",json:"JSON",markdown:"Markdown",objectivec:"Objective-C",perl:"Perl",php:"PHP",plsql:"PL/SQL",powershell:"PowerShell",py:"Python",rb:"Ruby",regex:"Regular Expression",ruby:"Ruby",sass:"SASS",scss:"SCSS",shell:"Shell",sql:"SQL",svg:"SVG",swift:"Swift",ts:"TypeScript",xaml:"XAML",xml:"XML",yaml:"YAML"};class a extends o.default{constructor(e){var t;super(e);const n=this.nodes.holder;this.languageNode=this.createLanguageNode(),this.languageNode.selectedIndex=this.findLanguageIndex((null===(t=e.data)||void 0===t?void 0:t.lang)||""),n.appendChild(this.languageNode)}createLanguageNode(){const e=document.createElement("select");e.setAttribute("class","form-control");let t=document.createElement("option");t.value="",t.text="Select Language",e.options.add(t);const n=Object.keys(i);for(let r=0;r",html:"",height:300,width:600}),o.default.prepare({config:e.config})}render(){const e=super.render();if(0===e.childElementCount)return e;const t=document.createElement("div");t.classList.add("embed-responsive","embed-responsive-16by9");const n=e.querySelector("iframe")||e.querySelector("video");return n.classList.add("embed-responsive-item"),n.removeAttribute("style"),n.removeAttribute("width"),n.removeAttribute("height"),n.before(t),n.remove(),t.appendChild(n),e}}t.Embed=i},624:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Fillin=void 0;const r=n(7429);n(8105);class o{constructor(e){this.api=e.api,this.config=e.config,this.iconClasses={base:this.api.styles.inlineToolButton,active:this.api.styles.inlineToolButtonActive}}static get title(){return"Fill In"}static get sanitize(){return{fillin:{class:o.CSS,"data-id":!0}}}static get isInline(){return!0}render(){return this.button=document.createElement("button"),this.button.type="button",this.button.classList.add(this.iconClasses.base),this.button.innerHTML=this.toolboxIcon,this.button}get toolboxIcon(){return''}surround(e){const t=this.api.selection.findParentTag(o.tag);t?this.unwrap(t):this.wrap(e)}checkState(e){var t;const n=this.api.selection.findParentTag(o.tag,o.CSS);return null===(t=this.button)||void 0===t||t.classList.toggle(this.iconClasses.active,!!n),!1}wrap(e){let t=document.createElement(o.tag);t.classList.add(o.CSS),t.dataset.id=(0,r.v4)(),t.appendChild(e.extractContents()),e.insertNode(t),this.api.selection.expandToTag(t)}unwrap(e){var t;this.api.selection.expandToTag(e);let n=window.getSelection(),r=n.getRangeAt(0),o=r.extractContents();null===(t=e.parentNode)||void 0===t||t.removeChild(e),r.insertNode(o),n.removeAllRanges(),n.addRange(r)}}t.Fillin=o,o.tag="FILLIN",o.CSS="rock-fillin"},7713:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NestedList=void 0;const o=r(n(9257));class i extends o.default{constructor(e){void 0!==e.data.items&&e.data.items.length>0&&"string"==typeof e.data.items[0]&&(e.data.items=e.data.items.map((e=>({content:e,items:[]})))),super(e)}validate(e){return e.items.length>0&&""!==e.items[0].content}}t.NestedList=i},1835:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Note=void 0;const r=n(7429);t.Note=class{static get toolbox(){return{icon:'',title:"Note"}}static get enableLineBreaks(){return!0}get data(){var e;return{id:this.id,note:(null===(e=this.holderNode.querySelector("textarea"))||void 0===e?void 0:e.value)||""}}set data(e){this.id=e.id||(0,r.v4)(),this.textAreaNode.value=e.note||""}constructor(e){var t;this.api=e.api,this.placeholder=(null===(t=e.config)||void 0===t?void 0:t.placeholder)||"Enter note",this.holderNode=this.drawView(),this.data=e.data}drawView(){const e=document.createElement("div"),t=document.createElement("textarea");return e.classList.add(this.api.styles.block,"ce-note"),t.classList.add("ce-note__textarea",this.api.styles.input),t.placeholder=this.placeholder,e.appendChild(t),this.textAreaNode=t,e}render(){return this.holderNode}save(e){var t;return{id:this.id,note:(null===(t=e.querySelector("textarea"))||void 0===t?void 0:t.value)||""}}}},6811:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Quote=void 0;const o=r(n(3058));class i extends o.default{static get enableLineBreaks(){return!1}validate(e){return""!==e.text}}t.Quote=i},1599:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Raw=void 0;const o=r(n(8172));class i extends o.default{constructor(e){super(e)}render(){const e=super.render(),t=e.querySelector("textarea");return t&&(t.spellcheck=!1),e}static get toolbox(){const e=o.default.toolbox;if(Array.isArray(e))for(const t of e)"Raw HTML"===t.title&&(t.title="Raw HTML/Lava");else e.title="Raw HTML/Lava";return e}}t.Raw=i},5958:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RockImage=void 0;const i=o(n(1854));function a(e){return new Promise(((t,n)=>{t({success:!0,file:{url:e}})}))}class s extends i.default{constructor(e){var t;const n=(null===(t=e.config)||void 0===t?void 0:t.binaryFileType)||"C1142570-8CD6-4A20-83B1-ACB47C1CD377";e.config=e.config||{},e.config.uploader={uploadByUrl:a,uploadByFile:function(e){return function(e,t){return r(this,void 0,void 0,(function*(){const n=new FormData;return n.append("file",e),yield $.ajax({url:`/FileUploader.ashx?isBinaryFile=1&fileTypeGuid=${t}`,type:"POST",contentType:!1,data:n,processData:!1,cache:!1,dataType:"json"}).then((function(e){return e.Id&&e.FileName?{success:!0,file:{url:`/GetImage.ashx?Id=${e.Id}`,fileId:e.Id}}:{success:!1,file:{url:""}}}))}))}(e,n)}},e.data=e.data||{},void 0!==e.data.url&&void 0===e.data.file&&(e.data.file={url:e.data.url},delete e.data.url),super(e)}renderSettings(){let e=super.renderSettings();Array.isArray(e)||(e=[e]);for(let t=0;t0}}t.Table=i},7429:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return l.default}});var r=f(n(3990)),o=f(n(8237)),i=f(n(5355)),a=f(n(3764)),s=f(n(6314)),l=f(n(8464)),c=f(n(6435)),u=f(n(4008)),d=f(n(8222));function f(e){return e&&e.__esModule?e:{default:e}}},4163:(e,t)=>{"use strict";function n(e){return 14+(e+64>>>9<<4)+1}function r(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,o,i,a){return r((s=r(r(t,e),r(o,a)))<<(l=i)|s>>>32-l,n);var s,l}function i(e,t,n,r,i,a,s){return o(t&n|~t&r,e,t,i,a,s)}function a(e,t,n,r,i,a,s){return o(t&r|n&~r,e,t,i,a,s)}function s(e,t,n,r,i,a,s){return o(t^n^r,e,t,i,a,s)}function l(e,t,n,r,i,a,s){return o(n^(t|~r),e,t,i,a,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var c=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n>5]>>>o%32&255,i=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(i)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[n/8])<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=n},6314:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default="00000000-0000-0000-0000-000000000000"},8222:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(6435))&&r.__esModule?r:{default:r};var i=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};t.default=i},58:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},3319:(e,t)=>{"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};const r=new Uint8Array(16)},3757:(e,t)=>{"use strict";function n(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function r(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){const t=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n>>0;d=u,u=c,c=r(l,30)>>>0,l=a,a=s}o[0]=o[0]+a>>>0,o[1]=o[1]+l>>>0,o[2]=o[2]+c>>>0,o[3]=o[3]+u>>>0,o[4]=o[4]+d>>>0}return[o[0]>>24&255,o[0]>>16&255,o[0]>>8&255,255&o[0],o[1]>>24&255,o[1]>>16&255,o[1]>>8&255,255&o[1],o[2]>>24&255,o[2]>>16&255,o[2]>>8&255,255&o[2],o[3]>>24&255,o[3]>>16&255,o[3]>>8&255,255&o[3],o[4]>>24&255,o[4]>>16&255,o[4]>>8&255,255&o[4]]};t.default=o},4008:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=a;var r,o=(r=n(6435))&&r.__esModule?r:{default:r};const i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));function a(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}var s=function(e,t=0){const n=a(e,t);if(!(0,o.default)(n))throw TypeError("Stringified UUID is invalid");return n};t.default=s},3990:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3319))&&r.__esModule?r:{default:r},i=n(4008);let a,s,l=0,c=0;var u=function(e,t,n){let r=t&&n||0;const u=t||new Array(16);let d=(e=e||{}).node||a,f=void 0!==e.clockseq?e.clockseq:s;if(null==d||null==f){const t=e.random||(e.rng||o.default)();null==d&&(d=a=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==f&&(f=s=16383&(t[6]<<8|t[7]))}let h=void 0!==e.msecs?e.msecs:Date.now(),p=void 0!==e.nsecs?e.nsecs:c+1;const m=h-l+(p-c)/1e4;if(m<0&&void 0===e.clockseq&&(f=f+1&16383),(m<0||h>l)&&void 0===e.nsecs&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=h,c=p,s=f,h+=122192928e5;const v=(1e4*(268435455&h)+p)%4294967296;u[r++]=v>>>24&255,u[r++]=v>>>16&255,u[r++]=v>>>8&255,u[r++]=255&v;const g=h/4294967296*1e4&268435455;u[r++]=g>>>8&255,u[r++]=255&g,u[r++]=g>>>24&15|16,u[r++]=g>>>16&255,u[r++]=f>>>8|128,u[r++]=255&f;for(let e=0;e<6;++e)u[r+e]=d[e];return t||(0,i.unsafeStringify)(u)};t.default=u},8237:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(7925)),o=i(n(4163));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v3",48,o.default);t.default=a},7925:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,n){function r(e,r,a,s){var l;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(4790)),o=a(n(3319)),i=n(4008);function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t,n){if(r.default.randomUUID&&!t&&!e)return r.default.randomUUID();const a=(e=e||{}).random||(e.rng||o.default)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=a[e];return t}return(0,i.unsafeStringify)(a)};t.default=s},3764:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(7925)),o=i(n(3757));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v5",80,o.default);t.default=a},6435:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(58))&&r.__esModule?r:{default:r};var i=function(e){return"string"==typeof e&&o.default.test(e)};t.default=i},8464:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(6435))&&r.__esModule?r:{default:r};var i=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)};t.default=i},7087:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>He});var r=n(3379),o=n.n(r),i=n(7795),a=n.n(i),s=n(569),l=n.n(s),c=n(3565),u=n.n(c),d=n(9216),f=n.n(d),h=n(4589),p=n.n(h),m=n(3381),v={};v.styleTagTransform=p(),v.setAttributes=u(),v.insert=l().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=f();o()(m.Z,v);m.Z&&m.Z.locals&&m.Z.locals;function g({tagName:e="div",cssClasses:t,attrs:n,children:r,innerHTML:o,textContent:i}){const a=document.createElement(e);if(t&&a.classList.add(...t.filter((e=>!!e))),n)for(let e in n)a.setAttribute(e,n[e]);if(i&&(a.textContent=i),o&&(a.innerHTML=o),r)for(let e=0;ee?this.element.style.opacity="0":this.element.style.cssText=`opacity: 1; left: calc((100% - var(--cell-size)) / (${e} * 2) * (1 + (${t} - 1) * 2))`,1==e?this.hideDeleteButton():this.unhideDeleteButton()}}var W=n(5787),X=n.n(W),K=n(6907),Q=n.n(K);const ee="tc-hidden",te="tc-display-none",ne="tc-toolbox-row",re="tc-toolbox-row__menu",oe="tc-toolbox-delete",ie="tc-toolbox-delete--row",ae="tc-toolbox-row__option",se="tc-menu-animation",le="tc-toolbox-delete--confirm",ce={addRowAbove:{"add-row-above":""},addRowBelow:{"add-row-below":""},deleteRow:{"delete-row":""}};class ue{constructor(e){this.api=e,this.element=this.createToolboxRow(),this.row=0,this.showDeleteConfirmation=!1}createToolboxRow(){let e=this.createMenu(),t=g({cssClasses:[ne]});return t.innerHTML=j(),this.menu=t.appendChild(e),t}createMenu(){let e=g({tagName:"span",textContent:this.api.i18n.t("Add row above")}),t=g({tagName:"span",textContent:this.api.i18n.t("Add row below")}),n=g({tagName:"span",textContent:this.api.i18n.t("Delete row")}),r=g({innerHTML:X(),cssClasses:[ae],attrs:ce.addRowAbove,children:[e]}),o=g({innerHTML:Q(),cssClasses:[ae],attrs:ce.addRowBelow,children:[t]}),i=g({innerHTML:N(),cssClasses:[oe,ae,ie],attrs:ce.deleteRow,children:[n]});return g({cssClasses:[re,ee],children:[r,o,i]})}hideDeleteButton(){this.menu.querySelector(`.${ie}`).classList.add(te)}unhideDeleteButton(){this.menu.querySelector(`.${ie}`).classList.remove(te)}openMenu(){this.showDeleteConfirmation=!1,this.menu.classList.add(se),this.menu.classList.remove(ee)}closeMenu(){this.menu.classList.remove(se),this.menu.classList.add(ee),this.unsetDeleteConfirmation()}setDeleteConfirmation(){this.showDeleteConfirmation=!0,this.menu.querySelector(`.${oe}`).classList.add(le)}unsetDeleteConfirmation(){this.menu.querySelector(`.${oe}`).classList.remove(le)}updateToolboxIconPosition(e=0,t=this.row,n){if(this.row=t,this.row<=0||this.row>e)this.element.style.opacity="0";else{const e=n.querySelector(`.tc-row:nth-child(${this.row})`),{fromTopBorder:t}=y(n,e),{height:r}=e.getBoundingClientRect();this.element.style.opacity="1",this.element.style.top=`${t+r/2}px`}1==e?this.hideDeleteButton():this.unhideDeleteButton()}}const de="tc-wrap",fe="tc-table",he="tc-row",pe="tc-table--heading",me="tc-row--selected",ve="tc-cell",ge="tc-cell--selected",be="tc-add-row",ye="tc-add-column",we="add-row-above",Ce="add-row-below",xe="delete-row",Ae="add-column-right",ke="add-column-left",Se="delete-column";class _e{constructor(e,t){this.readOnly=e,this.api=t,this.toolboxColumn=new Y(t),this.toolboxRow=new ue(t),this.createTableWrapper(),this.hoveredRow=0,this.hoveredColumn=0,this.lastSelectedRow=0,this.lastSelectedColumn=0,this.showDeleteRowConfirmation=!1,this.showDeleteColumnConfirmation=!1,this.tunes={withHeadings:!1},this.focusedCell={row:0,column:0},this.clickOutsideListener=e=>{const t=e.target.closest(`.${fe}`),n=null===e.target.closest(`.${de}`);t?this.clickOutsideMenus():n&&this.hideToolboxIconsAndMenus()},this.readOnly||this.bindEvents()}bindEvents(){document.addEventListener("click",this.clickOutsideListener),this.table.addEventListener("mousemove",function(e,t){let n=0;return function(...r){const o=(new Date).getTime();if(!(o-nthis.onMouseMoveInTable(e))),{passive:!0}),this.wrapper.addEventListener("click",(e=>this.onClickQuickAddButton(e))),this.toolboxColumn.element.addEventListener("click",(e=>this.onClickColumnToolbox(e))),this.toolboxRow.element.addEventListener("click",(e=>this.onClickRowToolbox(e))),this.table.onkeypress=e=>this.onKeyPressListener(e),this.table.addEventListener("keydown",(e=>this.onKeyDownListener(e))),this.table.addEventListener("focusin",(e=>this.focusInTableListener(e)))}moveCursorToNextRow(){this.focusedCell.row!=this.numberOfRows?(this.focusedCell.row+=1,this.focusCell(this.focusedCell)):(this.addRow(),this.focusedCell.row+=1,this.focusCell(this.focusedCell),this.updateToolboxesPosition(0,0))}getCell(e,t){return this.table.querySelector(`.${he}:nth-child(${e}) .${ve}:nth-child(${t})`)}getRow(e){return this.table.querySelector(`.${he}:nth-child(${e})`)}getRowByCell(e){return e.parentElement}addColumn(e=-1){let t=this.numberOfColumns;for(let n=1;n<=this.numberOfRows;n++){let r;const o=this.createCell();e>0&&e<=t?(r=this.getCell(n,e),w(o,r)):r=this.getRow(n).appendChild(o)}this.addHeadingAttrToFirstRow()}addRow(e=-1){let t,n=g({cssClasses:[he]});this.tunes.withHeadings&&this.removeHeadingAttrFromFirstRow();let r=this.numberOfColumns;if(e>0&&e<=this.numberOfRows){t=w(n,this.getRow(e))}else t=this.table.appendChild(n);return this.fillRow(t,r),this.tunes.withHeadings&&this.addHeadingAttrToFirstRow(),t}deleteColumn(e){for(let t=1;t<=this.numberOfRows;t++){const n=this.getCell(t,e);if(!n)return;n.remove()}}deleteRow(e){this.getRow(e).remove(),this.addHeadingAttrToFirstRow()}createTableWrapper(){this.wrapper=g({cssClasses:[de],children:[this.toolboxRow.element,this.toolboxColumn.element]}),this.table=this.wrapper.appendChild(g({cssClasses:[fe]})),this.wrapper.append(g({innerHTML:O(),cssClasses:[ye]}),g({innerHTML:O(),cssClasses:[be]}))}fillRow(e,t){for(let n=1;n<=t;n++){const t=this.createCell();e.appendChild(t)}}createCell(){return g({cssClasses:[ve],attrs:{contenteditable:!this.readOnly}})}get numberOfRows(){return this.table.childElementCount}get numberOfColumns(){return this.numberOfRows?this.table.querySelector(`.${he}:first-child`).childElementCount:0}get isColumnMenuShowing(){return 0!=this.lastSelectedColumn}get isRowMenuShowing(){return 0!=this.lastSelectedRow}onMouseMoveInTable(e){const{row:t,column:n}=this.hoveredCell(e);this.updateToolboxesPosition(t,n)}onClickQuickAddButton(e){const t=e.target.closest(`.${be}`),n=e.target.closest(`.${ye}`);t&&(this.addRow(),this.hideToolboxIconsAndMenus()),n&&(this.addColumn(),this.hideToolboxIconsAndMenus())}onClickColumnToolbox(e){e.stopPropagation();const t=e.target.closest("svg"),n=e.target.closest(`[${Ae}]`),r=e.target.closest(`[${ke}]`),o=e.target.closest(`[${Se}]`);if(n)return this.addColumn(this.lastSelectedColumn+1),void this.hideAndUnselect();if(r)return this.addColumn(this.lastSelectedColumn),void this.hideAndUnselect();if(o)this.toolboxColumn.showDeleteConfirmation?(this.deleteColumn(this.lastSelectedColumn),this.hideToolboxIconsAndMenus()):this.toolboxColumn.setDeleteConfirmation();else if(t){if(this.unselectRowAndHideMenu(),this.hoveredColumn==this.lastSelectedColumn)return void this.unselectColumnAndHideMenu();this.showDeleteColumnConfirmation=!1,this.selectColumnAndOpenMenu()}}onClickRowToolbox(e){e.stopPropagation();const t=e.target.closest("svg"),n=e.target.closest(`[${we}]`),r=e.target.closest(`[${Ce}]`),o=e.target.closest(`[${xe}]`);if(n)return this.addRow(this.lastSelectedRow),void this.hideAndUnselect();if(r)return this.addRow(this.lastSelectedRow+1),void this.hideAndUnselect();if(o)this.toolboxRow.showDeleteConfirmation?(this.deleteRow(this.lastSelectedRow),this.hideToolboxIconsAndMenus(),this.showDeleteRowConfirmation=!1):this.toolboxRow.setDeleteConfirmation();else if(t){if(this.unselectColumnAndHideMenu(),this.hoveredRow==this.lastSelectedRow)return void this.unselectRowAndHideMenu();this.showDeleteRowConfirmation=!1,this.selectRowAndOpenMenu()}}onKeyPressListener(e){if("Enter"==e.key){if(e.shiftKey)return!0;this.moveCursorToNextRow()}return"Enter"!=e.key}onKeyDownListener(e){"Tab"==e.key&&e.stopPropagation()}focusInTableListener(e){const t=e.target,n=this.getRowByCell(t);this.focusedCell={row:Array.from(this.table.querySelectorAll(`.${he}`)).indexOf(n)+1,column:Array.from(n.querySelectorAll(`.${ve}`)).indexOf(t)+1}}clickOutsideMenus(){this.unselectColumn(),this.toolboxColumn.closeToolboxMenu(),this.unselectRow(),this.toolboxRow.closeMenu()}hideToolboxIconsAndMenus(){this.unselectRow(),this.unselectColumn(),this.toolboxRow.closeMenu(),this.toolboxColumn.closeToolboxMenu(),this.updateToolboxesPosition(0,0)}hideAndUnselect(){this.unselectRow(),this.unselectColumn(),this.toolboxRow.closeMenu(),this.toolboxColumn.closeToolboxMenu(),this.updateToolboxesPosition()}focusCell(){this.focusedCellElem.focus()}get focusedCellElem(){const{row:e,column:t}=this.focusedCell;return this.getCell(e,t)}updateToolboxesPosition(e=this.hoveredRow,t=this.hoveredColumn){this.isColumnMenuShowing||(this.hoveredColumn=t,this.toolboxColumn.updateToolboxIconPosition(this.numberOfColumns,t)),this.isRowMenuShowing||(this.hoveredRow=e,this.toolboxRow.updateToolboxIconPosition(this.numberOfRows,e,this.table))}setHeadingsSetting(e){this.tunes.withHeadings=e,e?(this.table.classList.add(pe),this.addHeadingAttrToFirstRow()):(this.table.classList.remove(pe),this.removeHeadingAttrFromFirstRow())}addHeadingAttrToFirstRow(){for(let e=1;e<=this.numberOfColumns;e++){let t=this.getCell(1,e);t&&t.setAttribute("heading",this.api.i18n.t("Heading"))}}removeHeadingAttrFromFirstRow(){for(let e=1;e<=this.numberOfColumns;e++){let t=this.getCell(1,e);t&&t.removeAttribute("heading")}}selectRow(e){const t=this.getRow(e);t&&(this.lastSelectedRow=e,t.classList.add(me))}unselectRow(){if(this.lastSelectedRow<=0)return;const e=this.table.querySelector(`.${me}`);e&&e.classList.remove(me),this.lastSelectedRow=0}selectColumn(e){for(let t=1;t<=this.numberOfRows;t++){const n=this.getCell(t,e);n&&n.classList.add(ge)}this.lastSelectedColumn=e}unselectColumn(){if(this.lastSelectedColumn<=0)return;let e=this.table.querySelectorAll(`.${ge}`);Array.from(e).forEach((e=>{e.classList.remove(ge)})),this.lastSelectedColumn=0}hoveredCell(e){let t=this.hoveredRow,n=this.hoveredColumn;const{width:r,height:o,x:i,y:a}=function(e,t){const n=e.getBoundingClientRect(),{width:r,height:o,x:i,y:a}=n,{clientX:s,clientY:l}=t;return{width:r,height:o,x:s-i,y:l-a}}(this.table,e);return i>=0&&(n=this.binSearch(this.numberOfColumns,(e=>this.getCell(1,e)),(({fromLeftBorder:e})=>ii>r-e))),a>=0&&(t=this.binSearch(this.numberOfRows,(e=>this.getCell(e,1)),(({fromTopBorder:e})=>aa>o-e))),{row:t||this.hoveredRow,column:n||this.hoveredColumn}}binSearch(e,t,n,r){let o,i=0,a=e+1,s=0;for(;i0?s:void 0,u=!isNaN(l)&&l>0?l:void 0,d=i||c||2,f=a||u||2;for(let e=0;ee.innerHTML)))}return e}useHeadings(e){this.tableInstance.setHeadingsSetting(e)}}var Te=n(5748),je=n.n(Te),Be=n(5362),Re=n.n(Be),Ie=n(5435),Ue=n.n(Ie);const Pe="tc-setting",Ne="tc-setting--active";class He{static get isReadOnlySupported(){return!0}static get enableLineBreaks(){return!0}constructor({data:e,config:t,api:n,readOnly:r}){this.api=n,this.readOnly=r,this.data={withHeadings:!(!e||!e.withHeadings)&&e.withHeadings,content:e&&e.content?e.content:[]},this.tableConstructor=new Oe(e,t,n,r),this.tableConstructor.useHeadings(this.data.withHeadings)}static get toolbox(){return{icon:je(),title:"Table"}}render(){return this.tableConstructor.container}renderSettings(){const e=document.createElement("div");return[{name:this.api.i18n.t("With headings"),icon:Re(),isActive:this.data.withHeadings,setTune:()=>{this.data.withHeadings=!0}},{name:this.api.i18n.t("Without headings"),icon:Ue(),isActive:!this.data.withHeadings,setTune:()=>{this.data.withHeadings=!1}}].forEach((t=>{let n=g({cssClasses:[Pe,t.isActive?Ne:""]});n.innerHTML=t.icon,n.addEventListener("click",(()=>this.toggleTune(t,n))),this.api.tooltip.onHover(n,t.name,{placement:"top",hidingDelay:500}),e.append(n)})),e}save(){const e=this.tableConstructor.getData();return{withHeadings:this.data.withHeadings,content:e}}toggleTune(e,t){const n=t.parentNode.querySelectorAll("."+Pe);Array.from(n).forEach((e=>e.classList.remove(Ne))),t.classList.toggle(Ne),e.setTune(),this.tableConstructor.useHeadings(this.data.withHeadings)}destroy(){this.tableConstructor.tableInstance.destroy()}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r=n(401),o=((Rock="undefined"==typeof Rock?{}:Rock).UI=Rock.UI||{}).StructuredContentEditor=Rock.UI.StructuredContentEditor||{};for(var i in r)o[i]=r[i];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
+//# sourceMappingURL=editor-tools.js.map
\ No newline at end of file
diff --git a/RockWeb/Scripts/Rock/UI/structuredcontenteditor/editor.js b/RockWeb/Scripts/Rock/UI/structuredcontenteditor/editor.js
new file mode 100644
index 00000000000..10a5921e357
--- /dev/null
+++ b/RockWeb/Scripts/Rock/UI/structuredcontenteditor/editor.js
@@ -0,0 +1,39 @@
+(()=>{var e={9169:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),i=o.n(n),s=o(3645),r=o.n(s)()(i());r.push([e.id,'/*\n By default nested-list plugin displays nested ordered lists like "3.2.2.1".\n This changes it to display the same as just "1".\n*/\n.cdx-nested-list--ordered > .cdx-nested-list__item::before {\n content: counter(item) ". ";\n}\n\n/*\n Adjust the default color of the raw editor to be more Rock like.\n*/\n\ntextarea.ce-rawtool__textarea {\n background-color: #f8f8f8;\n color: inherit;\n line-height: inherit;\n letter-spacing: inherit;\n}\n',"",{version:3,sources:["webpack://./src/custom.css"],names:[],mappings:"AAAA;;;CAGC;AACD;IACI,2BAA2B;AAC/B;;AAEA;;CAEC;;AAED;IACI,yBAAyB;IACzB,cAAc;IACd,oBAAoB;IACpB,uBAAuB;AAC3B",sourcesContent:['/*\r\n By default nested-list plugin displays nested ordered lists like "3.2.2.1".\r\n This changes it to display the same as just "1".\r\n*/\r\n.cdx-nested-list--ordered > .cdx-nested-list__item::before {\r\n content: counter(item) ". ";\r\n}\r\n\r\n/*\r\n Adjust the default color of the raw editor to be more Rock like.\r\n*/\r\n\r\ntextarea.ce-rawtool__textarea {\r\n background-color: #f8f8f8;\r\n color: inherit;\r\n line-height: inherit;\r\n letter-spacing: inherit;\r\n}\r\n'],sourceRoot:""}]);const a=r},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o="",n=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),n&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),n&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o})).join("")},t.i=function(e,o,n,i,s){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(n)for(var a=0;a0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},7537:e=>{"use strict";e.exports=function(e){var t=e[1],o=e[3];if(!o)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),s="/*# ".concat(i," */");return[t].concat([s]).join("\n")}return[t].join("\n")}},9547:e=>{self,e.exports=(()=>{var e={424:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>a});var n=o(81),i=o.n(n),s=o(645),r=o.n(s)()(i());r.push([e.id,'.ce-block--drop-target .ce-block__content:before {\n content: "";\n position: absolute;\n top: 50%;\n left: -20px;\n margin-top: -1px;\n height: 8px;\n width: 8px;\n border: solid #a0a0a0;\n border-width: 1px 1px 0 0;\n -webkit-transform-origin: right;\n transform-origin: right;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n\n.ce-block--drop-target .ce-block__content:after {\n background: none;\n}',""]);const a=r},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o="",n=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),n&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),n&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o})).join("")},t.i=function(e,o,n,i,s){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(n)for(var a=0;a0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},81:e=>{"use strict";e.exports=function(e){return e[1]}},406:(e,t,o)=>{var n=o(424);"string"==typeof n&&(n=[[e.id,n,""]]),o(723)(n,{hmr:!0,transform:void 0,insertInto:void 0}),n.locals&&(e.exports=n.locals)},723:(e,t,o)=>{var n,i,s={},r=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=n.apply(this,arguments)),i}),a=function(e){return document.querySelector(e)},l=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var o=a.call(this,e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}}(),c=null,d=0,h=[],p=o(947);function u(e,t){for(var o=0;o=0&&h.splice(t,1)}function b(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),k(t,e.attrs),g(e,t),t}function k(e,t){Object.keys(t).forEach((function(o){e.setAttribute(o,t[o])}))}function v(e,t){var o,n,i,s;if(t.transform&&e.css){if(!(s=t.transform(e.css)))return function(){};e.css=s}if(t.singleton){var r=d++;o=c||(c=b(t)),n=w.bind(null,o,r,!1),i=w.bind(null,o,r,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",k(t,e.attrs),g(e,t),t}(t),n=C.bind(null,o,t),i=function(){m(o),o.href&&URL.revokeObjectURL(o.href)}):(o=b(t),n=E.bind(null,o),i=function(){m(o)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=r()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var o=f(e,t);return u(o,t),function(e){for(var n=[],i=0;i{e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var o=t.protocol+"//"+t.host,n=o+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var i,s=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(s)?e:(i=0===s.indexOf("//")?s:0===s.indexOf("/")?o+s:n+s.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={id:n,exports:{}};return e[n](s,s.exports,o),s.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";function e(e,t){for(var o=0;ot}),o(406);var t=function(){function t(e,o){var n=e.configuration,i=e.blocks,s=e.toolbar,r=e.save;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.toolbar=s,this.borderStyle=o||"1px dashed #aaa",this.api=i,this.holder="string"==typeof n.holder?document.getElementById(n.holder):n.holder,this.readOnly=n.readOnly,this.startBlock=null,this.endBlock=null,this.save=r,this.setDragListener(),this.setDropListener()}var o,n,i;return o=t,i=[{key:"isReadOnlySupported",get:function(){return!0}}],(n=[{key:"setElementCursor",value:function(e){if(e){var t=document.createRange(),o=window.getSelection();t.setStart(e.childNodes[0],0),t.collapse(!0),o.removeAllRanges(),o.addRange(t),e.focus()}}},{key:"setDragListener",value:function(){var e=this;if(!this.readOnly){var t=this.holder.querySelector(".ce-toolbar__settings-btn");t.setAttribute("draggable","true"),t.addEventListener("dragstart",(function(){e.startBlock=e.api.getCurrentBlockIndex()})),t.addEventListener("drag",(function(){if(e.toolbar.close(),!e.isTheOnlyBlock()){var t=e.holder.querySelectorAll(".ce-block"),o=e.holder.querySelector(".ce-block--drop-target");e.setElementCursor(o),e.setBorderBlocks(t,o)}}))}}},{key:"setBorderBlocks",value:function(e,t){var o=this;Object.values(e).forEach((function(n){var i=n.querySelector(".ce-block__content");n!==t?(i.style.removeProperty("border-top"),i.style.removeProperty("border-bottom")):Object.keys(e).find((function(o){return e[o]===t}))>o.startBlock?i.style.borderBottom=o.borderStyle||borderStyle:i.style.borderTop=o.borderStyle}))}},{key:"setDropListener",value:function(){var e=this;document.addEventListener("drop",(function(t){var o=t.target;if(e.holder.contains(o)&&null!==e.startBlock){var n=e.getDropTarget(o);if(n){var i=n.querySelector(".ce-block__content");i.style.removeProperty("border-top"),i.style.removeProperty("border-bottom"),e.endBlock=e.getTargetPosition(n),e.moveBlocks()}}e.startBlock=null}))}},{key:"getDropTarget",value:function(e){return e.classList.contains("ce-block")?e:e.closest(".ce-block")}},{key:"getTargetPosition",value:function(e){return Array.from(e.parentNode.children).indexOf(e)}},{key:"isTheOnlyBlock",value:function(){return 1===this.api.getBlocksCount()}},{key:"moveBlocks",value:function(){this.isTheOnlyBlock()||this.api.move(this.endBlock,this.startBlock)}}])&&e(o.prototype,n),i&&e(o,i),Object.defineProperty(o,"prototype",{writable:!1}),t}()})(),n.default})()},1784:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>b});var n=o(3379),i=o.n(n),s=o(7795),r=o.n(s),a=o(569),l=o.n(a),c=o(3565),d=o.n(c),h=o(9216),p=o.n(h),u=o(4589),f=o.n(u),g=o(9169),m={};m.styleTagTransform=f(),m.setAttributes=d(),m.insert=l().bind(null,"head"),m.domAPI=r(),m.insertStyleElement=p();i()(g.Z,m);const b=g.Z&&g.Z.locals?g.Z.locals:void 0},3379:e=>{"use strict";var t=[];function o(e){for(var o=-1,n=0;n{"use strict";var t={};e.exports=function(e,o){var n=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,o)=>{"use strict";e.exports=function(e){var t=o.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(o){!function(e,t,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var i=void 0!==o.layer;i&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,i&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var s=o.sourceMap;s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,o)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},4286:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DragDrop=void 0;const i=n(o(9547));class s extends i.default{constructor(e){super(e),this.setDragEndListener()}setDragEndListener(){if(!this.readOnly){const e=this.holder.querySelector(".ce-toolbar__settings-btn");e.setAttribute("draggable","true"),e.addEventListener("dragend",(()=>{this.startBlock=null}))}}getDropTarget(e){const t=super.getDropTarget(e);return null!==t&&super.getTargetPosition(t)===this.startBlock?null:t}moveBlocks(){null!=this.startBlock&&null!=this.endBlock&&super.moveBlocks()}}t.DragDrop=s},1384:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDragDrop=t.EditorJS=void 0;const i=n(o(3820));t.EditorJS=i.default;const s=o(4286);Object.defineProperty(t,"EditorDragDrop",{enumerable:!0,get:function(){return s.DragDrop}}),o(1784)},3820:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>At});typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"&&self;function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(){}Object.assign(i,{default:i,register:i,revert:function(){},__esModule:!0}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){const t=(this.document||this.ownerDocument).querySelectorAll(e);let o=t.length;for(;--o>=0&&t.item(o)!==this;);return o>-1}),Element.prototype.closest||(Element.prototype.closest=function(e){let t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t);return null}),Element.prototype.prepend||(Element.prototype.prepend=function(e){const t=document.createDocumentFragment();Array.isArray(e)||(e=[e]),e.forEach((e=>{const o=e instanceof Node;t.appendChild(o?e:document.createTextNode(e))})),this.insertBefore(t,this.firstChild)}),Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(e){e=0===arguments.length||!!e;const t=this.parentNode,o=window.getComputedStyle(t,null),n=parseInt(o.getPropertyValue("border-top-width")),i=parseInt(o.getPropertyValue("border-left-width")),s=this.offsetTop-t.offsetTopt.scrollTop+t.clientHeight,a=this.offsetLeft-t.offsetLeftt.scrollLeft+t.clientWidth,c=s&&!r;(s||r)&&e&&(t.scrollTop=this.offsetTop-t.offsetTop-t.clientHeight/2-n+this.clientHeight/2),(a||l)&&e&&(t.scrollLeft=this.offsetLeft-t.offsetLeft-t.clientWidth/2-i+this.clientWidth/2),(s||r||a||l)&&!e&&this.scrollIntoView(c)}),window.requestIdleCallback=window.requestIdleCallback||function(e){const t=Date.now();return setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)},window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)};var s=(e=>(e.VERBOSE="VERBOSE",e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR",e))(s||{});const r=8,a=9,l=13,c=27,d=37,h=38,p=40,u=39,f=46,g=0;function m(e,t,o="log",n,i="color: inherit"){if(!("console"in window)||!window.console[o])return;const s=["info","log","warn","error"].includes(o),r=[];switch(m.logLevel){case"ERROR":if("error"!==o)return;break;case"WARN":if(!["error","warn"].includes(o))return;break;case"INFO":if(!s||e)return}n&&r.push(n);const a="Editor.js 2.28.0";e&&(s?(r.unshift("line-height: 1em;\n color: #006FEA;\n display: inline-block;\n font-size: 11px;\n line-height: 1em;\n background-color: #fff;\n padding: 4px 9px;\n border-radius: 30px;\n border: 1px solid rgba(56, 138, 229, 0.16);\n margin: 4px 5px 4px 0;",i),t=`%c${a}%c ${t}`):t=`( ${a} )${t}`);try{s?n?console[o](`${t} %o`,...r):console[o](t,...r):console[o](t)}catch{}}m.logLevel="VERBOSE";const b=m.bind(window,!1),k=m.bind(window,!0);function v(e){return Object.prototype.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function x(e){return"function"===v(e)||"asyncfunction"===v(e)}function y(e){return"object"===v(e)}function w(e){return"string"===v(e)}function E(e){return"number"===v(e)}function C(e){return"undefined"===v(e)}function S(e){return!e||0===Object.keys(e).length&&e.constructor===Object}function B(e){return e>47&&e<58||32===e||13===e||229===e||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223}async function T(e,t=(()=>{}),o=(()=>{})){return e.reduce((async(e,n)=>(await e,async function(e,t,o){try{await e.function(e.data),await t(C(e.data)?{}:e.data)}catch{o(C(e.data)?{}:e.data)}}(n,t,o))),Promise.resolve())}function I(e){return Array.prototype.slice.call(e)}function _(e,t){return function(){const o=this,n=arguments;window.setTimeout((()=>e.apply(o,n)),t)}}function M(e,t,o=void 0){let n,i,s,r=null,a=0;o||(o={});const l=function(){a=!1===o.leading?0:Date.now(),r=null,s=e.apply(n,i),r||(n=i=null)};return function(){const c=Date.now();!a&&!1===o.leading&&(a=c);const d=t-(c-a);return n=this,i=arguments,d<=0||d>t?(r&&(clearTimeout(r),r=null),a=c,s=e.apply(n,i),r||(n=i=null)):!r&&!1!==o.trailing&&(r=setTimeout(l,d)),s}}function A(e){return e[0].toUpperCase()+e.slice(1)}function O(e,...t){if(!t.length)return e;const o=t.shift();if(y(e)&&y(o))for(const t in o)y(o[t])?(e[t]||Object.assign(e,{[t]:{}}),O(e[t],o[t])):Object.assign(e,{[t]:o[t]});return O(e,...t)}function L(e){const t=function(){const e={win:!1,mac:!1,x11:!1,linux:!1},t=Object.keys(e).find((e=>-1!==window.navigator.appVersion.toLowerCase().indexOf(e)));return t&&(e[t]=!0),e}();return e=e.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi," + "),e=t.mac?e.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):e.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN")}function N(){return((e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),""))(10)}function D(e,t,o){e&&k(`«${t}» is deprecated and will be removed in the next major release. Please use the «${o}» instead.`,"warn")}function R(e,t,o){const n=o.value?"value":"get",i=o[n],s=`#${t}Cache`;if(o[n]=function(...e){return void 0===this[s]&&(this[s]=i.apply(this,...e)),this[s]},"get"===n&&o.set){const t=o.set;o.set=function(o){delete e[s],t.apply(this,o)}}return o}function P(){return window.matchMedia("(max-width: 650px)").matches}const F=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1);class H{static isSingleTag(e){return e.tagName&&["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(e.tagName)}static isLineBreakTag(e){return e&&e.tagName&&["BR","WBR"].includes(e.tagName)}static make(e,t=null,o={}){const n=document.createElement(e);Array.isArray(t)?n.classList.add(...t):t&&n.classList.add(t);for(const e in o)Object.prototype.hasOwnProperty.call(o,e)&&(n[e]=o[e]);return n}static text(e){return document.createTextNode(e)}static append(e,t){Array.isArray(t)?t.forEach((t=>e.appendChild(t))):e.appendChild(t)}static prepend(e,t){Array.isArray(t)?(t=t.reverse()).forEach((t=>e.prepend(t))):e.prepend(t)}static swap(e,t){const o=document.createElement("div"),n=e.parentNode;n.insertBefore(o,e),n.insertBefore(e,t),n.insertBefore(t,o),n.removeChild(o)}static find(e=document,t){return e.querySelector(t)}static get(e){return document.getElementById(e)}static findAll(e=document,t){return e.querySelectorAll(t)}static get allInputsSelector(){return"[contenteditable=true], textarea, input:not([type]), "+["text","password","email","number","search","tel","url"].map((e=>`input[type="${e}"]`)).join(", ")}static findAllInputs(e){return I(e.querySelectorAll(H.allInputsSelector)).reduce(((e,t)=>H.isNativeInput(t)||H.containsOnlyInlineElements(t)?[...e,t]:[...e,...H.getDeepestBlockElements(t)]),[])}static getDeepestNode(e,t=!1){const o=t?"lastChild":"firstChild",n=t?"previousSibling":"nextSibling";if(e&&e.nodeType===Node.ELEMENT_NODE&&e[o]){let i=e[o];if(H.isSingleTag(i)&&!H.isNativeInput(i)&&!H.isLineBreakTag(i))if(i[n])i=i[n];else{if(!i.parentNode[n])return i.parentNode;i=i.parentNode[n]}return this.getDeepestNode(i,t)}return e}static isElement(e){return!E(e)&&(e&&e.nodeType&&e.nodeType===Node.ELEMENT_NODE)}static isFragment(e){return!E(e)&&(e&&e.nodeType&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)}static isContentEditable(e){return"true"===e.contentEditable}static isNativeInput(e){return!(!e||!e.tagName)&&["INPUT","TEXTAREA"].includes(e.tagName)}static canSetCaret(e){let t=!0;if(H.isNativeInput(e))switch(e.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":t=!1}else t=H.isContentEditable(e);return t}static isNodeEmpty(e){let t;return!(this.isSingleTag(e)&&!this.isLineBreakTag(e))&&(t=this.isElement(e)&&this.isNativeInput(e)?e.value:e.textContent.replace("",""),0===t.trim().length)}static isLeaf(e){return!!e&&0===e.childNodes.length}static isEmpty(e){e.normalize();const t=[e];for(;t.length>0;)if(e=t.shift()){if(this.isLeaf(e)&&!this.isNodeEmpty(e))return!1;e.childNodes&&t.push(...Array.from(e.childNodes))}return!0}static isHTMLString(e){const t=H.make("div");return t.innerHTML=e,t.childElementCount>0}static getContentLength(e){return H.isNativeInput(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:e.textContent.length}static get blockElements(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}static containsOnlyInlineElements(e){let t;w(e)?(t=document.createElement("div"),t.innerHTML=e):t=e;const o=e=>!H.blockElements.includes(e.tagName.toLowerCase())&&Array.from(e.children).every(o);return Array.from(t.children).every(o)}static getDeepestBlockElements(e){return H.containsOnlyInlineElements(e)?[e]:Array.from(e.children).reduce(((e,t)=>[...e,...H.getDeepestBlockElements(t)]),[])}static getHolder(e){return w(e)?document.getElementById(e):e}static isAnchor(e){return"a"===e.tagName.toLowerCase()}static offset(e){const t=e.getBoundingClientRect(),o=window.pageXOffset||document.documentElement.scrollLeft,n=window.pageYOffset||document.documentElement.scrollTop,i=t.top+n,s=t.left+o;return{top:i,left:s,bottom:i+t.height,right:s+t.width}}}const j={ui:{blockTunes:{toggler:{"Click to tune":"","or drag to move":""}},inlineToolbar:{converter:{"Convert to":""}},toolbar:{toolbox:{Add:""}},popover:{Filter:"","Nothing found":""}},toolNames:{Text:"",Link:"",Bold:"",Italic:""},tools:{link:{"Add a link":""},stub:{"The block can not be displayed correctly.":""}},blockTunes:{delete:{Delete:"","Click to delete":""},moveUp:{"Move up":""},moveDown:{"Move down":""}}},U=class{static ui(e,t){return U._t(e,t)}static t(e,t){return U._t(e,t)}static setDictionary(e){U.currentDictionary=e}static _t(e,t){const o=U.getNamespace(e);return o&&o[t]?o[t]:t}static getNamespace(e){return e.split(".").reduce(((e,t)=>e&&Object.keys(e).length?e[t]:{}),U.currentDictionary)}};let z=U;z.currentDictionary=j;class $ extends Error{}class Y{constructor(){this.subscribers={}}on(e,t){e in this.subscribers||(this.subscribers[e]=[]),this.subscribers[e].push(t)}once(e,t){e in this.subscribers||(this.subscribers[e]=[]);const o=n=>{const i=t(n),s=this.subscribers[e].indexOf(o);return-1!==s&&this.subscribers[e].splice(s,1),i};this.subscribers[e].push(o)}emit(e,t){S(this.subscribers)||!this.subscribers[e]||this.subscribers[e].reduce(((e,t)=>{const o=t(e);return void 0!==o?o:e}),t)}off(e,t){if(void 0!==this.subscribers[e]){for(let o=0;oe.call(t,o),save:()=>e.save(),validate:t=>e.validate(t),dispatchChange(){e.dispatchChange()}})}class X{constructor(){this.allListeners=[]}on(e,t,o,n=!1){const i=function(e=""){return`${e}${Math.floor(1e8*Math.random()).toString(16)}`}("l"),s={id:i,element:e,eventType:t,handler:o,options:n};if(!this.findOne(e,t,o))return this.allListeners.push(s),e.addEventListener(t,o,n),i}off(e,t,o,n){const i=this.findAll(e,t,o);i.forEach(((e,t)=>{const o=this.allListeners.indexOf(i[t]);o>-1&&(this.allListeners.splice(o,1),e.element.removeEventListener(e.eventType,e.handler,e.options))}))}offById(e){const t=this.findById(e);t&&t.element.removeEventListener(t.eventType,t.handler,t.options)}findOne(e,t,o){const n=this.findAll(e,t,o);return n.length>0?n[0]:null}findAll(e,t,o){let n;const i=e?this.findByEventTarget(e):[];return n=e&&t&&o?i.filter((e=>e.eventType===t&&e.handler===o)):e&&t?i.filter((e=>e.eventType===t)):i,n}removeAll(){this.allListeners.map((e=>{e.element.removeEventListener(e.eventType,e.handler,e.options)})),this.allListeners=[]}destroy(){this.removeAll()}findByEventTarget(e){return this.allListeners.filter((t=>{if(t.element===e)return t}))}findByType(e){return this.allListeners.filter((t=>{if(t.eventType===e)return t}))}findByHandler(e){return this.allListeners.filter((t=>{if(t.handler===e)return t}))}findById(e){return this.allListeners.find((t=>t.id===e))}}class K{constructor({config:e,eventsDispatcher:t}){if(this.nodes={},this.listeners=new X,this.readOnlyMutableListeners={on:(e,t,o,n=!1)=>{this.mutableListenerIds.push(this.listeners.on(e,t,o,n))},clearAll:()=>{for(const e of this.mutableListenerIds)this.listeners.offById(e);this.mutableListenerIds=[]}},this.mutableListenerIds=[],new.target===K)throw new TypeError("Constructors for abstract class Module are not allowed.");this.config=e,this.eventsDispatcher=t}set state(e){this.Editor=e}removeAllNodes(){for(const e in this.nodes){const t=this.nodes[e];t instanceof HTMLElement&&t.remove()}}get isRtl(){return"rtl"===this.config.i18n.direction}}class V{constructor(){this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.commandBackground="backColor",this.commandRemoveFormat="removeFormat"}static get CSS(){return{editorWrapper:"codex-editor",editorZone:"codex-editor__redactor"}}static get anchorNode(){const e=window.getSelection();return e?e.anchorNode:null}static get anchorElement(){const e=window.getSelection();if(!e)return null;const t=e.anchorNode;return t?H.isElement(t)?t:t.parentElement:null}static get anchorOffset(){const e=window.getSelection();return e?e.anchorOffset:null}static get isCollapsed(){const e=window.getSelection();return e?e.isCollapsed:null}static get isAtEditor(){return this.isSelectionAtEditor(V.get())}static isSelectionAtEditor(e){if(!e)return!1;let t=e.anchorNode||e.focusNode;t&&t.nodeType===Node.TEXT_NODE&&(t=t.parentNode);let o=null;return t&&t instanceof Element&&(o=t.closest(`.${V.CSS.editorZone}`)),!!o&&o.nodeType===Node.ELEMENT_NODE}static isRangeAtEditor(e){if(!e)return;let t=e.startContainer;t&&t.nodeType===Node.TEXT_NODE&&(t=t.parentNode);let o=null;return t&&t instanceof Element&&(o=t.closest(`.${V.CSS.editorZone}`)),!!o&&o.nodeType===Node.ELEMENT_NODE}static get isSelectionExists(){return!!V.get().anchorNode}static get range(){return this.getRangeFromSelection(this.get())}static getRangeFromSelection(e){return e&&e.rangeCount?e.getRangeAt(0):null}static get rect(){let e,t=document.selection,o={x:0,y:0,width:0,height:0};if(t&&"Control"!==t.type)return e=t.createRange(),o.x=e.boundingLeft,o.y=e.boundingTop,o.width=e.boundingWidth,o.height=e.boundingHeight,o;if(!window.getSelection)return b("Method window.getSelection is not supported","warn"),o;if(t=window.getSelection(),null===t.rangeCount||isNaN(t.rangeCount))return b("Method SelectionUtils.rangeCount is not supported","warn"),o;if(0===t.rangeCount)return o;if(e=t.getRangeAt(0).cloneRange(),e.getBoundingClientRect&&(o=e.getBoundingClientRect()),0===o.x&&0===o.y){const t=document.createElement("span");if(t.getBoundingClientRect){t.appendChild(document.createTextNode("")),e.insertNode(t),o=t.getBoundingClientRect();const n=t.parentNode;n.removeChild(t),n.normalize()}}return o}static get text(){return window.getSelection?window.getSelection().toString():""}static get(){return window.getSelection()}static setCursor(e,t=0){const o=document.createRange(),n=window.getSelection();return H.isNativeInput(e)?H.canSetCaret(e)?(e.focus(),e.selectionStart=e.selectionEnd=t,e.getBoundingClientRect()):void 0:(o.setStart(e,t),o.setEnd(e,t),n.removeAllRanges(),n.addRange(o),o.getBoundingClientRect())}static isRangeInsideContainer(e){const t=V.range;return null!==t&&e.contains(t.startContainer)}static addFakeCursor(){const e=V.range;if(null===e)return;const t=H.make("span","codex-editor__fake-cursor");t.dataset.mutationFree="true",e.collapse(),e.insertNode(t)}static isFakeCursorInsideContainer(e){return null!==H.find(e,".codex-editor__fake-cursor")}static removeFakeCursor(e=document.body){const t=H.find(e,".codex-editor__fake-cursor");t&&t.remove()}removeFakeBackground(){this.isFakeBackgroundEnabled&&(this.isFakeBackgroundEnabled=!1,document.execCommand(this.commandRemoveFormat))}setFakeBackground(){document.execCommand(this.commandBackground,!1,"#a8d6ff"),this.isFakeBackgroundEnabled=!0}save(){this.savedSelectionRange=V.range}restore(){if(!this.savedSelectionRange)return;const e=window.getSelection();e.removeAllRanges(),e.addRange(this.savedSelectionRange)}clearSaved(){this.savedSelectionRange=null}collapseToEnd(){const e=window.getSelection(),t=document.createRange();t.selectNodeContents(e.focusNode),t.collapse(!1),e.removeAllRanges(),e.addRange(t)}findParentTag(e,t,o=10){const n=window.getSelection();let i=null;return n&&n.anchorNode&&n.focusNode?([n.anchorNode,n.focusNode].forEach((n=>{let s=o;for(;s>0&&n.parentNode&&(n.tagName!==e||(i=n,t&&n.classList&&!n.classList.contains(t)&&(i=null),!i));)n=n.parentNode,s--})),i):null}expandToTag(e){const t=window.getSelection();t.removeAllRanges();const o=document.createRange();o.selectNodeContents(e),t.addRange(o)}}const q="redactor dom changed",Z="block changed",G="fake cursor is about to be toggled",J="fake cursor have been set";function Q(e,t){return e.mergeable&&e.name===t.name}var ee=(e=>(e.APPEND_CALLBACK="appendCallback",e.RENDERED="rendered",e.MOVED="moved",e.UPDATED="updated",e.REMOVED="removed",e.ON_PASTE="onPaste",e))(ee||{});class te extends Y{constructor({id:e=N(),data:t,tool:o,api:n,readOnly:i,tunesData:s},r){super(),this.cachedInputs=[],this.toolRenderedElement=null,this.tunesInstances=new Map,this.defaultTunesInstances=new Map,this.unavailableTunesData={},this.inputIndex=0,this.editorEventBus=null,this.handleFocus=()=>{this.dropInputsCache(),this.updateCurrentInput()},this.didMutated=(e=void 0)=>{const t=void 0===e,o=e instanceof InputEvent;let n;!t&&!o&&this.detectToolRootChange(e),n=!(!t&&!o)||!(e.length>0&&e.every((e=>{const{addedNodes:t,removedNodes:o,target:n}=e;return[...Array.from(t),...Array.from(o),n].some((e=>!!H.isElement(e)&&"true"===e.dataset.mutationFree))}))),n&&(this.dropInputsCache(),this.updateCurrentInput(),this.call("updated"),this.emit("didMutated",this))},this.name=o.name,this.id=e,this.settings=o.settings,this.config=o.settings.config||{},this.api=n,this.editorEventBus=r||null,this.blockAPI=new W(this),this.tool=o,this.toolInstance=o.create(t,this.blockAPI,i),this.tunes=o.tunes,this.composeTunes(s),this.holder=this.compose(),window.requestIdleCallback((()=>{this.watchBlockMutations(),this.addInputEvents()}))}static get CSS(){return{wrapper:"ce-block",wrapperStretched:"ce-block--stretched",content:"ce-block__content",focused:"ce-block--focused",selected:"ce-block--selected",dropTarget:"ce-block--drop-target"}}get inputs(){if(0!==this.cachedInputs.length)return this.cachedInputs;const e=H.findAllInputs(this.holder);return this.inputIndex>e.length-1&&(this.inputIndex=e.length-1),this.cachedInputs=e,e}get currentInput(){return this.inputs[this.inputIndex]}set currentInput(e){const t=this.inputs.findIndex((t=>t===e||t.contains(e)));-1!==t&&(this.inputIndex=t)}get firstInput(){return this.inputs[0]}get lastInput(){const e=this.inputs;return e[e.length-1]}get nextInput(){return this.inputs[this.inputIndex+1]}get previousInput(){return this.inputs[this.inputIndex-1]}get data(){return this.save().then((e=>e&&!S(e.data)?e.data:{}))}get sanitize(){return this.tool.sanitizeConfig}get mergeable(){return x(this.toolInstance.merge)}get isEmpty(){const e=H.isEmpty(this.pluginsContent),t=!this.hasMedia;return e&&t}get hasMedia(){return!!this.holder.querySelector(["img","iframe","video","audio","source","input","textarea","twitterwidget"].join(","))}set focused(e){this.holder.classList.toggle(te.CSS.focused,e)}get focused(){return this.holder.classList.contains(te.CSS.focused)}set selected(e){var t,o;this.holder.classList.toggle(te.CSS.selected,e);const n=!0===e&&V.isRangeInsideContainer(this.holder),i=!1===e&&V.isFakeCursorInsideContainer(this.holder);(n||i)&&(null==(t=this.editorEventBus)||t.emit(G,{state:e}),n?V.addFakeCursor():V.removeFakeCursor(this.holder),null==(o=this.editorEventBus)||o.emit(J,{state:e}))}get selected(){return this.holder.classList.contains(te.CSS.selected)}set stretched(e){this.holder.classList.toggle(te.CSS.wrapperStretched,e)}get stretched(){return this.holder.classList.contains(te.CSS.wrapperStretched)}set dropTarget(e){this.holder.classList.toggle(te.CSS.dropTarget,e)}get pluginsContent(){return this.toolRenderedElement}call(e,t){if(x(this.toolInstance[e])){"appendCallback"===e&&b("`appendCallback` hook is deprecated and will be removed in the next major release. Use `rendered` hook instead","warn");try{this.toolInstance[e].call(this.toolInstance,t)}catch(t){b(`Error during '${e}' call: ${t.message}`,"error")}}}async mergeWith(e){await this.toolInstance.merge(e)}async save(){const e=await this.toolInstance.save(this.pluginsContent),t=this.unavailableTunesData;[...this.tunesInstances.entries(),...this.defaultTunesInstances.entries()].forEach((([e,o])=>{if(x(o.save))try{t[e]=o.save()}catch(e){b(`Tune ${o.constructor.name} save method throws an Error %o`,"warn",e)}}));const o=window.performance.now();let n;return Promise.resolve(e).then((e=>(n=window.performance.now(),{id:this.id,tool:this.name,data:e,tunes:t,time:n-o}))).catch((e=>{b(`Saving process for ${this.name} tool failed due to the ${e}`,"log","red")}))}async validate(e){let t=!0;return this.toolInstance.validate instanceof Function&&(t=await this.toolInstance.validate(e)),t}getTunes(){const e=document.createElement("div"),t=[];return["function"==typeof this.toolInstance.renderSettings?this.toolInstance.renderSettings():[],[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].map((e=>e.render()))].flat().forEach((o=>{H.isElement(o)?e.appendChild(o):Array.isArray(o)?t.push(...o):t.push(o)})),[t,e]}updateCurrentInput(){this.currentInput=H.isNativeInput(document.activeElement)||!V.anchorNode?document.activeElement:V.anchorNode}dispatchChange(){this.didMutated()}destroy(){this.unwatchBlockMutations(),this.removeInputEvents(),super.destroy(),x(this.toolInstance.destroy)&&this.toolInstance.destroy()}async getActiveToolboxEntry(){const e=this.tool.toolbox;if(1===e.length)return Promise.resolve(this.tool.toolbox[0]);const t=await this.data;return e.find((e=>Object.entries(e.data).some((([e,o])=>t[e]&&function(e,t){const o=Array.isArray(e)||y(e),n=Array.isArray(t)||y(t);return o||n?JSON.stringify(e)===JSON.stringify(t):e===t}(t[e],o)))))}async exportDataAsString(){return function(e,t){const o=null==t?void 0:t.export;return x(o)?o(e):w(o)?e[o]:(void 0!==o&&b("Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export."),"")}(await this.data,this.tool.conversionConfig)}compose(){const e=H.make("div",te.CSS.wrapper),t=H.make("div",te.CSS.content),o=this.toolInstance.render();e.dataset.id=this.id,this.toolRenderedElement=o,t.appendChild(this.toolRenderedElement);let n=t;return[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].forEach((e=>{if(x(e.wrap))try{n=e.wrap(n)}catch(t){b(`Tune ${e.constructor.name} wrap method throws an Error %o`,"warn",t)}})),e.appendChild(n),e}composeTunes(e){Array.from(this.tunes.values()).forEach((t=>{(t.isInternal?this.defaultTunesInstances:this.tunesInstances).set(t.name,t.create(e[t.name],this.blockAPI))})),Object.entries(e).forEach((([e,t])=>{this.tunesInstances.has(e)||(this.unavailableTunesData[e]=t)}))}addInputEvents(){this.inputs.forEach((e=>{e.addEventListener("focus",this.handleFocus),H.isNativeInput(e)&&e.addEventListener("input",this.didMutated)}))}removeInputEvents(){this.inputs.forEach((e=>{e.removeEventListener("focus",this.handleFocus),H.isNativeInput(e)&&e.removeEventListener("input",this.didMutated)}))}watchBlockMutations(){var e;this.redactorDomChangedCallback=e=>{const{mutations:t}=e;t.some((e=>function(e,t){const{type:o,target:n,addedNodes:i,removedNodes:s}=e;if(n===t)return!0;if(["characterData","attributes"].includes(o)){const e=n.nodeType===Node.TEXT_NODE?n.parentNode:n;return t.contains(e)}const r=Array.from(i).some((e=>t.contains(e))),a=Array.from(s).some((e=>t.contains(e)));return r||a}(e,this.toolRenderedElement)))&&this.didMutated(t)},null==(e=this.editorEventBus)||e.on(q,this.redactorDomChangedCallback)}unwatchBlockMutations(){var e;null==(e=this.editorEventBus)||e.off(q,this.redactorDomChangedCallback)}detectToolRootChange(e){e.forEach((e=>{if(Array.from(e.removedNodes).includes(this.toolRenderedElement)){const t=e.addedNodes[e.addedNodes.length-1];this.toolRenderedElement=t}}))}dropInputsCache(){this.cachedInputs=[]}}class oe extends K{static getNamespace(e){return e.isTune()?`blockTunes.${e.name}`:`tools.${e.name}`}get methods(){return{t:()=>{k("I18n.t() method can be accessed only from Tools","warn")}}}getMethodsForTool(e){return Object.assign(this.methods,{t:t=>z.t(oe.getNamespace(e),t)})}}var ne={},ie={get exports(){return ne},set exports(e){ne=e}};window,ie.exports=function(e){var t={};function o(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/",o(o.s=0)}([function(e,t,o){var n,i,s;o(1),
+/*!
+ * Codex JavaScript Notification module
+ * https://github.com/codex-team/js-notifier
+ */
+e.exports=(n=o(6),i="cdx-notify--bounce-in",s=null,{show:function(e){if(e.message){!function(){if(s)return!0;s=n.getWrapper(),document.body.appendChild(s)}();var t=null,o=e.time||8e3;switch(e.type){case"confirm":t=n.confirm(e);break;case"prompt":t=n.prompt(e);break;default:t=n.alert(e),window.setTimeout((function(){t.remove()}),o)}s.appendChild(t),t.classList.add(i)}}})},function(e,t,o){var n=o(2);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};o(4)(n,i),n.locals&&(e.exports=n.locals)},function(e,t,o){(e.exports=o(3)(!1)).push([e.i,'.cdx-notify--error{background:#fffbfb!important}.cdx-notify--error::before{background:#fb5d5d!important}.cdx-notify__input{max-width:130px;padding:5px 10px;background:#f7f7f7;border:0;border-radius:3px;font-size:13px;color:#656b7c;outline:0}.cdx-notify__input:-ms-input-placeholder{color:#656b7c}.cdx-notify__input::placeholder{color:#656b7c}.cdx-notify__input:focus:-ms-input-placeholder{color:rgba(101,107,124,.3)}.cdx-notify__input:focus::placeholder{color:rgba(101,107,124,.3)}.cdx-notify__button{border:none;border-radius:3px;font-size:13px;padding:5px 10px;cursor:pointer}.cdx-notify__button:last-child{margin-left:10px}.cdx-notify__button--cancel{background:#f2f5f7;box-shadow:0 2px 1px 0 rgba(16,19,29,0);color:#656b7c}.cdx-notify__button--cancel:hover{background:#eee}.cdx-notify__button--confirm{background:#34c992;box-shadow:0 1px 1px 0 rgba(18,49,35,.05);color:#fff}.cdx-notify__button--confirm:hover{background:#33b082}.cdx-notify__btns-wrapper{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;margin-top:5px}.cdx-notify__cross{position:absolute;top:5px;right:5px;width:10px;height:10px;padding:5px;opacity:.54;cursor:pointer}.cdx-notify__cross::after,.cdx-notify__cross::before{content:\'\';position:absolute;left:9px;top:5px;height:12px;width:2px;background:#575d67}.cdx-notify__cross::before{transform:rotate(-45deg)}.cdx-notify__cross::after{transform:rotate(45deg)}.cdx-notify__cross:hover{opacity:1}.cdx-notifies{position:fixed;z-index:2;bottom:20px;left:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.cdx-notify{position:relative;width:220px;margin-top:15px;padding:13px 16px;background:#fff;box-shadow:0 11px 17px 0 rgba(23,32,61,.13);border-radius:5px;font-size:14px;line-height:1.4em;word-wrap:break-word}.cdx-notify::before{content:\'\';position:absolute;display:block;top:0;left:0;width:3px;height:calc(100% - 6px);margin:3px;border-radius:5px;background:0 0}@keyframes bounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}100%{transform:scale(1)}}.cdx-notify--bounce-in{animation-name:bounceIn;animation-duration:.6s;animation-iteration-count:1}.cdx-notify--success{background:#fafffe!important}.cdx-notify--success::before{background:#41ffb1!important}',""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=function(e,t){var o,n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var s=(o=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),r=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[n].concat(r).concat([s]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+o+"}":o})).join("")},t.i=function(e,o){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},i=0;i=0&&h.splice(t,1)}function b(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),k(t,e.attrs),g(e,t),t}function k(e,t){Object.keys(t).forEach((function(o){e.setAttribute(o,t[o])}))}function v(e,t){var o,n,i,s,r,a;if(t.transform&&e.css){if(!(s=t.transform(e.css)))return function(){};e.css=s}if(t.singleton){var l=d++;o=c||(c=b(t)),n=w.bind(null,o,l,!1),i=w.bind(null,o,l,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=t,a=document.createElement("link"),void 0===r.attrs.type&&(r.attrs.type="text/css"),r.attrs.rel="stylesheet",k(a,r.attrs),g(r,a),n=function(e,t,o){var n=o.css,i=o.sourceMap,s=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||s)&&(n=p(n)),i&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var r=new Blob([n],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(r),a&&URL.revokeObjectURL(a)}.bind(null,o=a,t),i=function(){m(o),o.href&&URL.revokeObjectURL(o.href)}):(o=b(t),n=function(e,t){var o=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}.bind(null,o),i=function(){m(o)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}e.exports=function(e,t){if(typeof DEBUG<"u"&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var o=f(e,t);return u(o,t),function(e){for(var n=[],i=0;i"u"||"boolean"==typeof t&&!t}function l(e,t,o){var n=e.name.toLowerCase();return!0!==t&&("function"==typeof t[n]?!t[n](e.value,o):typeof t[n]>"u"||!1===t[n]||"string"==typeof t[n]&&t[n]!==e.value)}return e.prototype.clean=function(e){const t=document.implementation.createHTMLDocument(),o=t.createElement("div");return o.innerHTML=e,this._sanitize(t,o),o.innerHTML},e.prototype._sanitize=function(e,t){var n=s(e,t),c=n.firstChild();if(c)do{if(c.nodeType!==Node.TEXT_NODE){if(c.nodeType===Node.COMMENT_NODE){t.removeChild(c),this._sanitize(e,t);break}var d,h=i(c);h&&(d=Array.prototype.some.call(c.childNodes,o));var p=!!t.parentNode,u=o(t)&&o(c)&&p,f=c.nodeName.toLowerCase(),g=r(this.config,f,c);if(h&&d||a(c,g)||!this.config.keepNestedBlockElements&&u){if("SCRIPT"!==c.nodeName&&"STYLE"!==c.nodeName)for(;c.childNodes.length>0;)t.insertBefore(c.childNodes[0],c);t.removeChild(c),this._sanitize(e,t);break}for(var m=0;m{const o=x(t)?t(e.tool):t;return S(o)||(e.data=pe(e.data,o)),e}))}function he(e,t={}){return new ce({tags:t}).clean(e)}function pe(e,t){return Array.isArray(e)?function(e,t){return e.map((e=>pe(e,t)))}(e,t):y(e)?function(e,t){const o={};for(const n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;const i=e[n],s=ue(t[n])?t[n]:t;o[n]=pe(i,s)}return o}(e,t):w(e)?function(e,t){return y(t)?he(e,t):!1===t?he(e,{}):e}(e,t):e}function ue(e){return y(e)||function(e){return"boolean"===v(e)}(e)||x(e)}var fe={},ge={get exports(){return fe},set exports(e){fe=e}};
+/*!
+ * CodeX.Tooltips
+ *
+ * @version 1.0.5
+ *
+ * @licence MIT
+ * @author CodeX
+ *
+ *
+ */!function(e,t){window,e.exports=function(e){var t={};function o(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,o){e.exports=o(1)},function(e,t,o){o.r(t),o.d(t,"default",(function(){return n}));class n{constructor(){this.nodes={wrapper:null,content:null},this.showed=!1,this.offsetTop=10,this.offsetLeft=10,this.offsetRight=10,this.hidingDelay=0,this.handleWindowScroll=()=>{this.showed&&this.hide(!0)},this.loadStyles(),this.prepare(),window.addEventListener("scroll",this.handleWindowScroll,{passive:!0})}get CSS(){return{tooltip:"ct",tooltipContent:"ct__content",tooltipShown:"ct--shown",placement:{left:"ct--left",bottom:"ct--bottom",right:"ct--right",top:"ct--top"}}}show(e,t,o){this.nodes.wrapper||this.prepare(),this.hidingTimeout&&clearTimeout(this.hidingTimeout);const n=Object.assign({placement:"bottom",marginTop:0,marginLeft:0,marginRight:0,marginBottom:0,delay:70,hidingDelay:0},o);if(n.hidingDelay&&(this.hidingDelay=n.hidingDelay),this.nodes.content.innerHTML="","string"==typeof t)this.nodes.content.appendChild(document.createTextNode(t));else{if(!(t instanceof Node))throw Error("[CodeX Tooltip] Wrong type of «content» passed. It should be an instance of Node or String. But "+typeof t+" given.");this.nodes.content.appendChild(t)}switch(this.nodes.wrapper.classList.remove(...Object.values(this.CSS.placement)),n.placement){case"top":this.placeTop(e,n);break;case"left":this.placeLeft(e,n);break;case"right":this.placeRight(e,n);break;default:this.placeBottom(e,n)}n&&n.delay?this.showingTimeout=setTimeout((()=>{this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0}),n.delay):(this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0)}hide(e=!1){if(this.hidingDelay&&!e)return this.hidingTimeout&&clearTimeout(this.hidingTimeout),void(this.hidingTimeout=setTimeout((()=>{this.hide(!0)}),this.hidingDelay));this.nodes.wrapper.classList.remove(this.CSS.tooltipShown),this.showed=!1,this.showingTimeout&&clearTimeout(this.showingTimeout)}onHover(e,t,o){e.addEventListener("mouseenter",(()=>{this.show(e,t,o)})),e.addEventListener("mouseleave",(()=>{this.hide()}))}destroy(){this.nodes.wrapper.remove(),window.removeEventListener("scroll",this.handleWindowScroll)}prepare(){this.nodes.wrapper=this.make("div",this.CSS.tooltip),this.nodes.content=this.make("div",this.CSS.tooltipContent),this.append(this.nodes.wrapper,this.nodes.content),this.append(document.body,this.nodes.wrapper)}loadStyles(){const e="codex-tooltips-style";if(document.getElementById(e))return;const t=o(2),n=this.make("style",null,{textContent:t.toString(),id:e});this.prepend(document.head,n)}placeBottom(e,t){const o=e.getBoundingClientRect(),n=o.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,i=o.bottom+window.pageYOffset+this.offsetTop+t.marginTop;this.applyPlacement("bottom",n,i)}placeTop(e,t){const o=e.getBoundingClientRect(),n=o.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,i=o.top+window.pageYOffset-this.nodes.wrapper.clientHeight-this.offsetTop;this.applyPlacement("top",n,i)}placeLeft(e,t){const o=e.getBoundingClientRect(),n=o.left-this.nodes.wrapper.offsetWidth-this.offsetLeft-t.marginLeft,i=o.top+window.pageYOffset+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("left",n,i)}placeRight(e,t){const o=e.getBoundingClientRect(),n=o.right+this.offsetRight+t.marginRight,i=o.top+window.pageYOffset+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("right",n,i)}applyPlacement(e,t,o){this.nodes.wrapper.classList.add(this.CSS.placement[e]),this.nodes.wrapper.style.left=t+"px",this.nodes.wrapper.style.top=o+"px"}make(e,t=null,o={}){const n=document.createElement(e);Array.isArray(t)?n.classList.add(...t):t&&n.classList.add(t);for(const e in o)o.hasOwnProperty(e)&&(n[e]=o[e]);return n}append(e,t){Array.isArray(t)?t.forEach((t=>e.appendChild(t))):e.appendChild(t)}prepend(e,t){Array.isArray(t)?(t=t.reverse()).forEach((t=>e.prepend(t))):e.prepend(t)}}},function(e,t){e.exports='.ct{z-index:999;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1),-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);will-change:opacity,top,left;-webkit-box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);border-radius:9px}.ct,.ct:before{position:absolute;top:0;left:0}.ct:before{content:"";bottom:0;right:0;background-color:#1d202b;z-index:-1;border-radius:4px}@supports(-webkit-mask-box-image:url("")){.ct:before{border-radius:0;-webkit-mask-box-image:url(\'data:image/svg+xml;charset=utf-8,\') 48% 41% 37.9% 53.3%}}@media (--mobile){.ct{display:none}}.ct__content{padding:6px 10px;color:#cdd1e0;font-size:12px;text-align:center;letter-spacing:.02em;line-height:1em}.ct:after{content:"";width:8px;height:8px;position:absolute;background-color:#1d202b;z-index:-1}.ct--bottom{-webkit-transform:translateY(5px);transform:translateY(5px)}.ct--bottom:after{top:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--top{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.ct--top:after{top:auto;bottom:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--left{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.ct--left:after{top:50%;left:auto;right:0;-webkit-transform:translate(41.6%,-50%) rotate(-45deg);transform:translate(41.6%,-50%) rotate(-45deg)}.ct--right{-webkit-transform:translateX(5px);transform:translateX(5px)}.ct--right:after{top:50%;left:0;-webkit-transform:translate(-41.6%,-50%) rotate(-45deg);transform:translate(-41.6%,-50%) rotate(-45deg)}.ct--shown{opacity:1;-webkit-transform:none;transform:none}'}]).default}(ge);const me=n(fe);class be{constructor(){this.lib=new me}destroy(){this.lib.destroy()}show(e,t,o){this.lib.show(e,t,o)}hide(e=!1){this.lib.hide(e)}onHover(e,t,o){this.lib.onHover(e,t,o)}}const ke=function e(t,o){const n={};return Object.entries(t).forEach((([t,i])=>{if(y(i)){const s=o?`${o}.${t}`:t;Object.values(i).every((e=>w(e)))?n[t]=s:n[t]=e(i,s)}else n[t]=i})),n}(j);const ve='',xe='';class ye{constructor(e){this.nodes={root:null,icon:null},this.confirmationState=null,this.removeSpecialFocusBehavior=()=>{this.nodes.root.classList.remove(ye.CSS.noFocus)},this.removeSpecialHoverBehavior=()=>{this.nodes.root.classList.remove(ye.CSS.noHover)},this.onErrorAnimationEnd=()=>{this.nodes.icon.classList.remove(ye.CSS.wobbleAnimation),this.nodes.icon.removeEventListener("animationend",this.onErrorAnimationEnd)},this.params=e,this.nodes.root=this.make(e)}get isDisabled(){return this.params.isDisabled}get toggle(){return this.params.toggle}get title(){return this.params.title}get closeOnActivate(){return this.params.closeOnActivate}get isConfirmationStateEnabled(){return null!==this.confirmationState}get isFocused(){return this.nodes.root.classList.contains(ye.CSS.focused)}static get CSS(){return{container:"ce-popover-item",title:"ce-popover-item__title",secondaryTitle:"ce-popover-item__secondary-title",icon:"ce-popover-item__icon",active:"ce-popover-item--active",disabled:"ce-popover-item--disabled",focused:"ce-popover-item--focused",hidden:"ce-popover-item--hidden",confirmationState:"ce-popover-item--confirmation",noHover:"ce-popover-item--no-hover",noFocus:"ce-popover-item--no-focus",wobbleAnimation:"wobble"}}getElement(){return this.nodes.root}handleClick(){this.isConfirmationStateEnabled?this.activateOrEnableConfirmationMode(this.confirmationState):this.activateOrEnableConfirmationMode(this.params)}toggleActive(e){this.nodes.root.classList.toggle(ye.CSS.active,e)}toggleHidden(e){this.nodes.root.classList.toggle(ye.CSS.hidden,e)}reset(){this.isConfirmationStateEnabled&&this.disableConfirmationMode()}onFocus(){this.disableSpecialHoverAndFocusBehavior()}make(e){const t=H.make("div",ye.CSS.container);return e.name&&(t.dataset.itemName=e.name),this.nodes.icon=H.make("div",ye.CSS.icon,{innerHTML:e.icon||''}),t.appendChild(this.nodes.icon),t.appendChild(H.make("div",ye.CSS.title,{innerHTML:e.title||""})),e.secondaryLabel&&t.appendChild(H.make("div",ye.CSS.secondaryTitle,{textContent:e.secondaryLabel})),e.isActive&&t.classList.add(ye.CSS.active),e.isDisabled&&t.classList.add(ye.CSS.disabled),t}enableConfirmationMode(e){const t={...this.params,...e,confirmation:e.confirmation},o=this.make(t);this.nodes.root.innerHTML=o.innerHTML,this.nodes.root.classList.add(ye.CSS.confirmationState),this.confirmationState=e,this.enableSpecialHoverAndFocusBehavior()}disableConfirmationMode(){const e=this.make(this.params);this.nodes.root.innerHTML=e.innerHTML,this.nodes.root.classList.remove(ye.CSS.confirmationState),this.confirmationState=null,this.disableSpecialHoverAndFocusBehavior()}enableSpecialHoverAndFocusBehavior(){this.nodes.root.classList.add(ye.CSS.noHover),this.nodes.root.classList.add(ye.CSS.noFocus),this.nodes.root.addEventListener("mouseleave",this.removeSpecialHoverBehavior,{once:!0})}disableSpecialHoverAndFocusBehavior(){this.removeSpecialFocusBehavior(),this.removeSpecialHoverBehavior(),this.nodes.root.removeEventListener("mouseleave",this.removeSpecialHoverBehavior)}activateOrEnableConfirmationMode(e){if(void 0===e.confirmation)try{e.onActivate(e),this.disableConfirmationMode()}catch{this.animateError()}else this.enableConfirmationMode(e.confirmation)}animateError(){this.nodes.icon.classList.contains(ye.CSS.wobbleAnimation)||(this.nodes.icon.classList.add(ye.CSS.wobbleAnimation),this.nodes.icon.addEventListener("animationend",this.onErrorAnimationEnd))}}const we=class{constructor(e,t){this.cursor=-1,this.items=[],this.items=e||[],this.focusedCssClass=t}get currentItem(){return-1===this.cursor?null:this.items[this.cursor]}setCursor(e){e=-1&&(this.dropCursor(),this.cursor=e,this.items[this.cursor].classList.add(this.focusedCssClass))}setItems(e){this.items=e}next(){this.cursor=this.leafNodesAndReturnIndex(we.directions.RIGHT)}previous(){this.cursor=this.leafNodesAndReturnIndex(we.directions.LEFT)}dropCursor(){-1!==this.cursor&&(this.items[this.cursor].classList.remove(this.focusedCssClass),this.cursor=-1)}leafNodesAndReturnIndex(e){if(0===this.items.length)return this.cursor;let t=this.cursor;return-1===t?t=e===we.directions.RIGHT?-1:0:this.items[t].classList.remove(this.focusedCssClass),t=e===we.directions.RIGHT?(t+1)%this.items.length:(this.items.length+t-1)%this.items.length,H.canSetCaret(this.items[t])&&_((()=>V.setCursor(this.items[t])),50)(),this.items[t].classList.add(this.focusedCssClass),t}};let Ee=we;Ee.directions={RIGHT:"right",LEFT:"left"};class Ce{constructor(e){this.iterator=null,this.activated=!1,this.flipCallbacks=[],this.onKeyDown=e=>{if(this.isEventReadyForHandling(e))switch(Ce.usedKeys.includes(e.keyCode)&&e.preventDefault(),e.keyCode){case a:this.handleTabPress(e);break;case d:case h:this.flipLeft();break;case u:case p:this.flipRight();break;case l:this.handleEnterPress(e)}},this.iterator=new Ee(e.items,e.focusedItemClass),this.activateCallback=e.activateCallback,this.allowedKeys=e.allowedKeys||Ce.usedKeys}get isActivated(){return this.activated}static get usedKeys(){return[a,d,u,l,h,p]}activate(e,t){this.activated=!0,e&&this.iterator.setItems(e),void 0!==t&&this.iterator.setCursor(t),document.addEventListener("keydown",this.onKeyDown,!0)}deactivate(){this.activated=!1,this.dropCursor(),document.removeEventListener("keydown",this.onKeyDown)}focusFirst(){this.dropCursor(),this.flipRight()}flipLeft(){this.iterator.previous(),this.flipCallback()}flipRight(){this.iterator.next(),this.flipCallback()}hasFocus(){return!!this.iterator.currentItem}onFlip(e){this.flipCallbacks.push(e)}removeOnFlip(e){this.flipCallbacks=this.flipCallbacks.filter((t=>t!==e))}dropCursor(){this.iterator.dropCursor()}isEventReadyForHandling(e){return this.activated&&this.allowedKeys.includes(e.keyCode)}handleTabPress(e){switch(e.shiftKey?Ee.directions.LEFT:Ee.directions.RIGHT){case Ee.directions.RIGHT:this.flipRight();break;case Ee.directions.LEFT:this.flipLeft()}}handleEnterPress(e){this.activated&&(this.iterator.currentItem&&(e.stopPropagation(),e.preventDefault(),this.iterator.currentItem.click()),x(this.activateCallback)&&this.activateCallback(this.iterator.currentItem))}flipCallback(){this.iterator.currentItem&&this.iterator.currentItem.scrollIntoViewIfNeeded(),this.flipCallbacks.forEach((e=>e()))}}class Se{static get CSS(){return{wrapper:"cdx-search-field",icon:"cdx-search-field__icon",input:"cdx-search-field__input"}}constructor({items:e,onSearch:t,placeholder:o}){this.listeners=new X,this.items=e,this.onSearch=t,this.render(o)}getElement(){return this.wrapper}focus(){this.input.focus()}clear(){this.input.value="",this.searchQuery="",this.onSearch("",this.foundItems)}destroy(){this.listeners.removeAll()}render(e){this.wrapper=H.make("div",Se.CSS.wrapper);const t=H.make("div",Se.CSS.icon,{innerHTML:''});this.input=H.make("input",Se.CSS.input,{placeholder:e}),this.wrapper.appendChild(t),this.wrapper.appendChild(this.input),this.listeners.on(this.input,"input",(()=>{this.searchQuery=this.input.value,this.onSearch(this.searchQuery,this.foundItems)}))}get foundItems(){return this.items.filter((e=>this.checkItem(e)))}checkItem(e){var t;const o=(null==(t=e.title)?void 0:t.toLowerCase())||"",n=this.searchQuery.toLowerCase();return o.includes(n)}}const Be=class{lock(){F?this.lockHard():document.body.classList.add(Be.CSS.scrollLocked)}unlock(){F?this.unlockHard():document.body.classList.remove(Be.CSS.scrollLocked)}lockHard(){this.scrollPosition=window.pageYOffset,document.documentElement.style.setProperty("--window-scroll-offset",`${this.scrollPosition}px`),document.body.classList.add(Be.CSS.scrollLockedHard)}unlockHard(){document.body.classList.remove(Be.CSS.scrollLockedHard),null!==this.scrollPosition&&window.scrollTo(0,this.scrollPosition),this.scrollPosition=null}};let Te=Be;Te.CSS={scrollLocked:"ce-scroll-locked",scrollLockedHard:"ce-scroll-locked--hard"};var Ie=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,Me=(e=>(e.Close="close",e))(Me||{});const Ae=class extends Y{constructor(e){super(),this.scopeElement=document.body,this.listeners=new X,this.scrollLocker=new Te,this.nodes={wrapper:null,popover:null,nothingFoundMessage:null,customContent:null,items:null,overlay:null},this.messages={nothingFound:"Nothing found",search:"Search"},this.onFlip=()=>{this.items.find((e=>e.isFocused)).onFocus()},this.items=e.items.map((e=>new ye(e))),void 0!==e.scopeElement&&(this.scopeElement=e.scopeElement),e.messages&&(this.messages={...this.messages,...e.messages}),e.customContentFlippableItems&&(this.customContentFlippableItems=e.customContentFlippableItems),this.make(),e.customContent&&this.addCustomContent(e.customContent),e.searchable&&this.addSearch(),this.initializeFlipper()}static get CSS(){return{popover:"ce-popover",popoverOpenTop:"ce-popover--open-top",popoverOpened:"ce-popover--opened",search:"ce-popover__search",nothingFoundMessage:"ce-popover__nothing-found-message",nothingFoundMessageDisplayed:"ce-popover__nothing-found-message--displayed",customContent:"ce-popover__custom-content",customContentHidden:"ce-popover__custom-content--hidden",items:"ce-popover__items",overlay:"ce-popover__overlay",overlayHidden:"ce-popover__overlay--hidden"}}getElement(){return this.nodes.wrapper}hasFocus(){return this.flipper.hasFocus()}show(){this.shouldOpenBottom||(this.nodes.popover.style.setProperty("--popover-height",this.height+"px"),this.nodes.popover.classList.add(Ae.CSS.popoverOpenTop)),this.nodes.overlay.classList.remove(Ae.CSS.overlayHidden),this.nodes.popover.classList.add(Ae.CSS.popoverOpened),this.flipper.activate(this.flippableElements),void 0!==this.search&&setTimeout((()=>{this.search.focus()}),100),P()&&this.scrollLocker.lock()}hide(){this.nodes.popover.classList.remove(Ae.CSS.popoverOpened),this.nodes.popover.classList.remove(Ae.CSS.popoverOpenTop),this.nodes.overlay.classList.add(Ae.CSS.overlayHidden),this.flipper.deactivate(),this.items.forEach((e=>e.reset())),void 0!==this.search&&this.search.clear(),P()&&this.scrollLocker.unlock(),this.emit("close")}destroy(){this.flipper.deactivate(),this.listeners.removeAll(),P()&&this.scrollLocker.unlock()}make(){this.nodes.popover=H.make("div",[Ae.CSS.popover]),this.nodes.nothingFoundMessage=H.make("div",[Ae.CSS.nothingFoundMessage],{textContent:this.messages.nothingFound}),this.nodes.popover.appendChild(this.nodes.nothingFoundMessage),this.nodes.items=H.make("div",[Ae.CSS.items]),this.items.forEach((e=>{this.nodes.items.appendChild(e.getElement())})),this.nodes.popover.appendChild(this.nodes.items),this.listeners.on(this.nodes.popover,"click",(e=>{const t=this.getTargetItem(e);void 0!==t&&this.handleItemClick(t)})),this.nodes.wrapper=H.make("div"),this.nodes.overlay=H.make("div",[Ae.CSS.overlay,Ae.CSS.overlayHidden]),this.listeners.on(this.nodes.overlay,"click",(()=>{this.hide()})),this.nodes.wrapper.appendChild(this.nodes.overlay),this.nodes.wrapper.appendChild(this.nodes.popover)}addSearch(){this.search=new Se({items:this.items,placeholder:this.messages.search,onSearch:(e,t)=>{this.items.forEach((e=>{const o=!t.includes(e);e.toggleHidden(o)})),this.toggleNothingFoundMessage(0===t.length),this.toggleCustomContent(""!==e);const o=""===e?this.flippableElements:t.map((e=>e.getElement()));this.flipper.isActivated&&(this.flipper.deactivate(),this.flipper.activate(o))}});const e=this.search.getElement();e.classList.add(Ae.CSS.search),this.nodes.popover.insertBefore(e,this.nodes.popover.firstChild)}addCustomContent(e){this.nodes.customContent=e,this.nodes.customContent.classList.add(Ae.CSS.customContent),this.nodes.popover.insertBefore(e,this.nodes.popover.firstChild)}getTargetItem(e){return this.items.find((t=>e.composedPath().includes(t.getElement())))}handleItemClick(e){e.isDisabled||(this.items.filter((t=>t!==e)).forEach((e=>e.reset())),e.handleClick(),this.toggleItemActivenessIfNeeded(e),e.closeOnActivate&&this.hide())}initializeFlipper(){this.flipper=new Ce({items:this.flippableElements,focusedItemClass:ye.CSS.focused,allowedKeys:[a,h,p,l]}),this.flipper.onFlip(this.onFlip)}get flippableElements(){const e=this.items.map((e=>e.getElement()));return(this.customContentFlippableItems||[]).concat(e)}get height(){let e=0;if(null===this.nodes.popover)return e;const t=this.nodes.popover.cloneNode(!0);return t.style.visibility="hidden",t.style.position="absolute",t.style.top="-1000px",t.classList.add(Ae.CSS.popoverOpened),document.body.appendChild(t),e=t.offsetHeight,t.remove(),e}get shouldOpenBottom(){const e=this.nodes.popover.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),o=this.height,n=e.top+o,i=e.top-o,s=Math.min(window.innerHeight,t.bottom);return it.toggle===e.toggle));if(1===t.length)return void e.toggleActive();t.forEach((t=>{t.toggleActive(t===e)}))}}};let Oe=Ae;((e,t,o,n)=>{for(var i,s=n>1?void 0:n?_e(t,o):t,r=e.length-1;r>=0;r--)(i=e[r])&&(s=(n?i(t,o,s):i(s))||s);n&&s&&Ie(t,o,s)})([R],Oe.prototype,"height",1);class Le extends K{constructor(){super(...arguments),this.opened=!1,this.tools=[],this.flipper=null,this.togglingCallback=null}static get CSS(){return{conversionToolbarWrapper:"ce-conversion-toolbar",conversionToolbarShowed:"ce-conversion-toolbar--showed",conversionToolbarTools:"ce-conversion-toolbar__tools",conversionToolbarLabel:"ce-conversion-toolbar__label",conversionTool:"ce-conversion-tool",conversionToolHidden:"ce-conversion-tool--hidden",conversionToolIcon:"ce-conversion-tool__icon",conversionToolSecondaryLabel:"ce-conversion-tool__secondary-label",conversionToolFocused:"ce-conversion-tool--focused",conversionToolActive:"ce-conversion-tool--active"}}make(){this.nodes.wrapper=H.make("div",[Le.CSS.conversionToolbarWrapper,...this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]]),this.nodes.tools=H.make("div",Le.CSS.conversionToolbarTools);const e=H.make("div",Le.CSS.conversionToolbarLabel,{textContent:z.ui(ke.ui.inlineToolbar.converter,"Convert to")});return this.addTools(),this.enableFlipper(),H.append(this.nodes.wrapper,e),H.append(this.nodes.wrapper,this.nodes.tools),this.nodes.wrapper}destroy(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes()}toggle(e){this.opened?this.close():this.open(),x(e)&&(this.togglingCallback=e)}open(){this.filterTools(),this.opened=!0,this.nodes.wrapper.classList.add(Le.CSS.conversionToolbarShowed),window.requestAnimationFrame((()=>{this.flipper.activate(this.tools.map((e=>e.button)).filter((e=>!e.classList.contains(Le.CSS.conversionToolHidden)))),this.flipper.focusFirst(),x(this.togglingCallback)&&this.togglingCallback(!0)}))}close(){this.opened=!1,this.flipper.deactivate(),this.nodes.wrapper.classList.remove(Le.CSS.conversionToolbarShowed),x(this.togglingCallback)&&this.togglingCallback(!1)}hasTools(){return 1!==this.tools.length||this.tools[0].name!==this.config.defaultBlock}async replaceWithBlock(e,t){const{BlockManager:o,BlockSelection:n,InlineToolbar:i,Caret:s}=this.Editor;o.convert(this.Editor.BlockManager.currentBlock,e,t),n.clearSelection(),this.close(),i.close(),window.requestAnimationFrame((()=>{s.setToBlock(this.Editor.BlockManager.currentBlock,s.positions.END)}))}addTools(){const e=this.Editor.Tools.blockTools;Array.from(e.entries()).forEach((([e,t])=>{var o;const n=t.conversionConfig;!n||!n.import||null==(o=t.toolbox)||o.forEach((t=>this.addToolIfValid(e,t)))}))}addToolIfValid(e,t){S(t)||!t.icon||this.addTool(e,t)}addTool(e,t){var o;const n=H.make("div",[Le.CSS.conversionTool]),i=H.make("div",[Le.CSS.conversionToolIcon]);n.dataset.tool=e,i.innerHTML=t.icon,H.append(n,i),H.append(n,H.text(z.t(ke.toolNames,t.title||A(e))));const s=null==(o=this.Editor.Tools.blockTools.get(e))?void 0:o.shortcut;if(s){const e=H.make("span",Le.CSS.conversionToolSecondaryLabel,{innerText:L(s)});H.append(n,e)}H.append(this.nodes.tools,n),this.tools.push({name:e,button:n,toolboxItem:t}),this.listeners.on(n,"click",(async()=>{await this.replaceWithBlock(e,t.data)}))}async filterTools(){const{currentBlock:e}=this.Editor.BlockManager,t=await e.getActiveToolboxEntry();this.tools.forEach((o=>{let n=!1;if(t){const i=function(e,t){return e.icon===t.icon&&e.title===t.title}(t,o.toolboxItem);n=o.button.dataset.tool===e.name&&i}o.button.hidden=n,o.button.classList.toggle(Le.CSS.conversionToolHidden,n)}))}enableFlipper(){this.flipper=new Ce({focusedItemClass:Le.CSS.conversionToolFocused})}}var Ne={},De={get exports(){return Ne},set exports(e){Ne=e}};
+/*!
+ * Library for handling keyboard shortcuts
+ * @copyright CodeX (https://codex.so)
+ * @license MIT
+ * @author CodeX (https://codex.so)
+ * @version 1.2.0
+ */!function(e,t){window,e.exports=function(e){var t={};function o(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,o){function n(e,t){for(var o=0;oe!==o)))}findShortcut(e,t){return(this.registeredShortcuts.get(e)||[]).find((({name:e})=>e===t))}};var Fe=Object.defineProperty,He=Object.getOwnPropertyDescriptor,je=(e,t,o,n)=>{for(var i,s=n>1?void 0:n?He(t,o):t,r=e.length-1;r>=0;r--)(i=e[r])&&(s=(n?i(t,o,s):i(s))||s);return n&&s&&Fe(t,o,s),s},Ue=(e=>(e.Opened="toolbox-opened",e.Closed="toolbox-closed",e.BlockAdded="toolbox-block-added",e))(Ue||{});const ze=class extends Y{constructor({api:e,tools:t,i18nLabels:o}){super(),this.opened=!1,this.nodes={toolbox:null},this.onPopoverClose=()=>{this.opened=!1,this.emit("toolbox-closed")},this.api=e,this.tools=t,this.i18nLabels=o}get isEmpty(){return 0===this.toolsToBeDisplayed.length}static get CSS(){return{toolbox:"ce-toolbox"}}make(){return this.popover=new Oe({scopeElement:this.api.ui.nodes.redactor,searchable:!0,messages:{nothingFound:this.i18nLabels.nothingFound,search:this.i18nLabels.filter},items:this.toolboxItemsToBeDisplayed}),this.popover.on(Me.Close,this.onPopoverClose),this.enableShortcuts(),this.nodes.toolbox=this.popover.getElement(),this.nodes.toolbox.classList.add(ze.CSS.toolbox),this.nodes.toolbox}hasFocus(){var e;return null==(e=this.popover)?void 0:e.hasFocus()}destroy(){var e;super.destroy(),this.nodes&&this.nodes.toolbox&&(this.nodes.toolbox.remove(),this.nodes.toolbox=null),this.removeAllShortcuts(),null==(e=this.popover)||e.off(Me.Close,this.onPopoverClose)}toolButtonActivated(e,t){this.insertNewBlock(e,t)}open(){var e;this.isEmpty||(null==(e=this.popover)||e.show(),this.opened=!0,this.emit("toolbox-opened"))}close(){var e;null==(e=this.popover)||e.hide(),this.opened=!1,this.emit("toolbox-closed")}toggle(){this.opened?this.close():this.open()}get toolsToBeDisplayed(){const e=[];return this.tools.forEach((t=>{t.toolbox&&e.push(t)})),e}get toolboxItemsToBeDisplayed(){const e=(e,t)=>({icon:e.icon,title:z.t(ke.toolNames,e.title||A(t.name)),name:t.name,onActivate:()=>{this.toolButtonActivated(t.name,e.data)},secondaryLabel:t.shortcut?L(t.shortcut):""});return this.toolsToBeDisplayed.reduce(((t,o)=>(Array.isArray(o.toolbox)?o.toolbox.forEach((n=>{t.push(e(n,o))})):void 0!==o.toolbox&&t.push(e(o.toolbox,o)),t)),[])}enableShortcuts(){this.toolsToBeDisplayed.forEach((e=>{const t=e.shortcut;t&&this.enableShortcutForTool(e.name,t)}))}enableShortcutForTool(e,t){Pe.add({name:t,on:this.api.ui.nodes.redactor,handler:t=>{t.preventDefault();const o=this.api.blocks.getCurrentBlockIndex(),n=this.api.blocks.getBlockByIndex(o);if(n)try{return this.api.blocks.convert(n.id,e),void window.requestAnimationFrame((()=>{this.api.caret.setToBlock(o,"end")}))}catch{}this.insertNewBlock(e)}})}removeAllShortcuts(){this.toolsToBeDisplayed.forEach((e=>{const t=e.shortcut;t&&Pe.remove(this.api.ui.nodes.redactor,t)}))}async insertNewBlock(e,t){const o=this.api.blocks.getCurrentBlockIndex(),n=this.api.blocks.getBlockByIndex(o);if(!n)return;const i=n.isEmpty?o:o+1;let s;if(t){const o=await this.api.blocks.composeBlockData(e);s=Object.assign(o,t)}const r=this.api.blocks.insert(e,s,void 0,i,void 0,n.isEmpty);r.call(ee.APPEND_CALLBACK),this.api.caret.setToBlock(i),this.emit("toolbox-block-added",{block:r}),this.api.toolbar.close()}};let $e=ze;je([R],$e.prototype,"toolsToBeDisplayed",1),je([R],$e.prototype,"toolboxItemsToBeDisplayed",1);const Ye="block hovered";var We=(e=>(e[e.Block=0]="Block",e[e.Inline=1]="Inline",e[e.Tune=2]="Tune",e))(We||{}),Xe=(e=>(e.Shortcut="shortcut",e.Toolbox="toolbox",e.EnabledInlineTools="inlineToolbar",e.EnabledBlockTunes="tunes",e.Config="config",e))(Xe||{}),Ke=(e=>(e.Shortcut="shortcut",e.SanitizeConfig="sanitize",e))(Ke||{}),Ve=(e=>(e.IsEnabledLineBreaks="enableLineBreaks",e.Toolbox="toolbox",e.ConversionConfig="conversionConfig",e.IsReadOnlySupported="isReadOnlySupported",e.PasteConfig="pasteConfig",e))(Ve||{}),qe=(e=>(e.IsInline="isInline",e.Title="title",e))(qe||{}),Ze=(e=>(e.IsTune="isTune",e))(Ze||{});class Ge{constructor({name:e,constructable:t,config:o,api:n,isDefault:i,isInternal:s=!1,defaultPlaceholder:r}){this.api=n,this.name=e,this.constructable=t,this.config=o,this.isDefault=i,this.isInternal=s,this.defaultPlaceholder=r}get settings(){const e=this.config.config||{};return this.isDefault&&!("placeholder"in e)&&this.defaultPlaceholder&&(e.placeholder=this.defaultPlaceholder),e}reset(){if(x(this.constructable.reset))return this.constructable.reset()}prepare(){if(x(this.constructable.prepare))return this.constructable.prepare({toolName:this.name,config:this.settings})}get shortcut(){const e=this.constructable.shortcut;return this.config.shortcut||e}get sanitizeConfig(){return this.constructable.sanitize||{}}isInline(){return 1===this.type}isBlock(){return 0===this.type}isTune(){return 2===this.type}}class Je{constructor(e){this.blocks=[],this.workingArea=e}get length(){return this.blocks.length}get array(){return this.blocks}get nodes(){return I(this.workingArea.children)}static set(e,t,o){return isNaN(Number(t))?(Reflect.set(e,t,o),!0):(e.insert(+t,o),!0)}static get(e,t){return isNaN(Number(t))?Reflect.get(e,t):e.get(+t)}push(e){this.blocks.push(e),this.insertToDOM(e)}swap(e,t){const o=this.blocks[t];H.swap(this.blocks[e].holder,o.holder),this.blocks[t]=this.blocks[e],this.blocks[e]=o}move(e,t){const o=this.blocks.splice(t,1)[0],n=e-1,i=Math.max(0,n),s=this.blocks[i];e>0?this.insertToDOM(o,"afterend",s):this.insertToDOM(o,"beforebegin",s),this.blocks.splice(e,0,o);const r=this.composeBlockEvent("move",{fromIndex:t,toIndex:e});o.call(ee.MOVED,r)}insert(e,t,o=!1){if(!this.length)return void this.push(t);e>this.length&&(e=this.length),o&&(this.blocks[e].holder.remove(),this.blocks[e].call(ee.REMOVED));const n=o?1:0;if(this.blocks.splice(e,n,t),e>0){const o=this.blocks[e-1];this.insertToDOM(t,"afterend",o)}else{const o=this.blocks[e+1];o?this.insertToDOM(t,"beforebegin",o):this.insertToDOM(t)}}replace(e,t){if(void 0===this.blocks[e])throw Error("Incorrect index");this.blocks[e].holder.replaceWith(t.holder),this.blocks[e]=t}insertMany(e,t){const o=new DocumentFragment;for(const t of e)o.appendChild(t.holder);if(this.length>0){if(t>0){const e=Math.min(t-1,this.length-1);this.blocks[e].holder.after(o)}else 0===t&&this.workingArea.prepend(o);this.blocks.splice(t,0,...e)}else this.blocks.push(...e),this.workingArea.appendChild(o);e.forEach((e=>e.call(ee.RENDERED)))}remove(e){isNaN(e)&&(e=this.length-1),this.blocks[e].holder.remove(),this.blocks[e].call(ee.REMOVED),this.blocks.splice(e,1)}removeAll(){this.workingArea.innerHTML="",this.blocks.forEach((e=>e.call(ee.REMOVED))),this.blocks.length=0}insertAfter(e,t){const o=this.blocks.indexOf(e);this.insert(o+1,t)}get(e){return this.blocks[e]}indexOf(e){return this.blocks.indexOf(e)}insertToDOM(e,t,o){t?o.holder.insertAdjacentElement(t,e.holder):this.workingArea.appendChild(e.holder),e.call(ee.RENDERED)}composeBlockEvent(e,t){return new CustomEvent(e,{detail:t})}}const Qe="block-removed",et="block-added",tt="block-changed";class ot{constructor(){this.completed=Promise.resolve()}add(e){return new Promise(((t,o)=>{this.completed=this.completed.then(e).then(t).catch(o)}))}}class nt extends K{get positions(){return{START:"start",END:"end",DEFAULT:"default"}}static get CSS(){return{shadowCaret:"cdx-shadow-caret"}}get isAtStart(){const e=V.get(),t=H.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput);let o=e.focusNode;if(H.isNativeInput(t))return 0===t.selectionEnd;if(!e.anchorNode)return!1;let n=o.textContent.search(/\S/);-1===n&&(n=0);let i=e.focusOffset;return o.nodeType!==Node.TEXT_NODE&&o.childNodes.length&&(o.childNodes[i]?(o=o.childNodes[i],i=0):(o=o.childNodes[i-1],i=o.textContent.length)),!(!H.isLineBreakTag(t)&&!H.isEmpty(t)||!this.getHigherLevelSiblings(o,"left").every((e=>{const t=H.isLineBreakTag(e),o=1===e.children.length&&H.isLineBreakTag(e.children[0]),n=t||o;return H.isEmpty(e)&&!n}))||i!==n)||(null===t||o===t&&i<=n)}get isAtEnd(){const e=V.get();let t=e.focusNode;const o=H.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput,!0);if(H.isNativeInput(o))return o.selectionEnd===o.value.length;if(!e.focusNode)return!1;let n=e.focusOffset;if(t.nodeType!==Node.TEXT_NODE&&t.childNodes.length&&(t.childNodes[n-1]?(t=t.childNodes[n-1],n=t.textContent.length):(t=t.childNodes[0],n=0)),H.isLineBreakTag(o)||H.isEmpty(o)){const e=this.getHigherLevelSiblings(t,"right");if(e.every(((t,o)=>o===e.length-1&&H.isLineBreakTag(t)||H.isEmpty(t)&&!H.isLineBreakTag(t)))&&n===t.textContent.length)return!0}const i=o.textContent.replace(/\s+$/,"");return t===o&&n>=i.length}setToBlock(e,t=this.positions.DEFAULT,o=0){const{BlockManager:n}=this.Editor;let i;switch(t){case this.positions.START:i=e.firstInput;break;case this.positions.END:i=e.lastInput;break;default:i=e.currentInput}if(!i)return;const s=H.getDeepestNode(i,t===this.positions.END),r=H.getContentLength(s);switch(!0){case t===this.positions.START:o=0;break;case t===this.positions.END:case o>r:o=r}_((()=>{this.set(s,o)}),20)(),n.setCurrentBlockByChildNode(e.holder),n.currentBlock.currentInput=i}setToInput(e,t=this.positions.DEFAULT,o=0){const{currentBlock:n}=this.Editor.BlockManager,i=H.getDeepestNode(e);switch(t){case this.positions.START:this.set(i,0);break;case this.positions.END:this.set(i,H.getContentLength(i));break;default:o&&this.set(i,o)}n.currentInput=e}set(e,t=0){const{top:o,bottom:n}=V.setCursor(e,t),{innerHeight:i}=window;o<0&&window.scrollBy(0,o),n>i&&window.scrollBy(0,n-i)}setToTheLastBlock(){const e=this.Editor.BlockManager.lastBlock;if(e)if(e.tool.isDefault&&e.isEmpty)this.setToBlock(e);else{const e=this.Editor.BlockManager.insertAtEnd();this.setToBlock(e)}}extractFragmentFromCaretPosition(){const e=V.get();if(e.rangeCount){const t=e.getRangeAt(0),o=this.Editor.BlockManager.currentBlock.currentInput;if(t.deleteContents(),o){if(H.isNativeInput(o)){const e=o,t=document.createDocumentFragment(),n=e.value.substring(0,e.selectionStart),i=e.value.substring(e.selectionStart);return t.textContent=i,e.value=n,t}{const e=t.cloneRange();return e.selectNodeContents(o),e.setStart(t.endContainer,t.endOffset),e.extractContents()}}}}navigateNext(){const{BlockManager:e}=this.Editor,{currentBlock:t,nextContentfulBlock:o}=e,{nextInput:n}=t,i=this.isAtEnd;let s=o;if(!s&&!n){if(t.tool.isDefault||!i)return!1;s=e.insertAtEnd()}return!!i&&(n?this.setToInput(n,this.positions.START):this.setToBlock(s,this.positions.START),!0)}navigatePrevious(){const{currentBlock:e,previousContentfulBlock:t}=this.Editor.BlockManager;if(!e)return!1;const{previousInput:o}=e;return!(!t&&!o)&&(!!this.isAtStart&&(o?this.setToInput(o,this.positions.END):this.setToBlock(t,this.positions.END),!0))}createShadow(e){const t=document.createElement("span");t.classList.add(nt.CSS.shadowCaret),e.insertAdjacentElement("beforeend",t)}restoreCaret(e){const t=e.querySelector(`.${nt.CSS.shadowCaret}`);if(!t)return;(new V).expandToTag(t);const o=document.createRange();o.selectNode(t),o.extractContents()}insertContentAtCaretPosition(e){const t=document.createDocumentFragment(),o=document.createElement("div"),n=V.get(),i=V.range;o.innerHTML=e,Array.from(o.childNodes).forEach((e=>t.appendChild(e))),0===t.childNodes.length&&t.appendChild(new Text);const s=t.lastChild;i.deleteContents(),i.insertNode(t);const r=document.createRange(),a=s.nodeType===Node.TEXT_NODE?s:s.firstChild;null!==a&&null!==a.textContent&&r.setStart(a,a.textContent.length),n.removeAllRanges(),n.addRange(r)}getHigherLevelSiblings(e,t){let o=e;const n=[];for(;o.parentNode&&"true"!==o.parentNode.contentEditable;)o=o.parentNode;const i="left"===t?"previousSibling":"nextSibling";for(;o[i];)o=o[i],n.push(o);return n}}const it=class extends K{constructor(){super(...arguments),this.MIME_TYPE="application/x-editor-js",this.toolsTags={},this.tagsByTool={},this.toolsPatterns=[],this.toolsFiles={},this.exceptionList=[],this.processTool=e=>{try{const t=e.create({},{},!1);if(!1===e.pasteConfig)return void this.exceptionList.push(e.name);if(!x(t.onPaste))return;this.getTagsConfig(e),this.getFilesConfig(e),this.getPatternsConfig(e)}catch(t){b(`Paste handling for «${e.name}» Tool hasn't been set up because of the error`,"warn",t)}},this.handlePasteEvent=async e=>{const{BlockManager:t,Toolbar:o}=this.Editor,n=t.setCurrentBlockByChildNode(e.target);!n||this.isNativeBehaviour(e.target)&&!e.clipboardData.types.includes("Files")||n&&this.exceptionList.includes(n.name)||(e.preventDefault(),this.processDataTransfer(e.clipboardData),t.clearFocused(),o.close())}}async prepare(){this.processTools()}toggleReadOnly(e){e?this.unsetCallback():this.setCallback()}async processDataTransfer(e,t=!1){const{Tools:o}=this.Editor,n=e.types;if((n.includes?n.includes("Files"):n.contains("Files"))&&!S(this.toolsFiles))return void await this.processFiles(e.files);const i=e.getData(this.MIME_TYPE),s=e.getData("text/plain");let r=e.getData("text/html");if(i)try{return void this.insertEditorJSData(JSON.parse(i))}catch{}t&&s.trim()&&r.trim()&&(r="
"+(r.trim()?r:s)+"
");const a=Object.keys(this.toolsTags).reduce(((e,t)=>(e[t.toLowerCase()]=this.toolsTags[t].sanitizationConfig??{},e)),{}),l=he(r,Object.assign({},a,o.getAllInlineToolsSanitizeConfig(),{br:{}}));l.trim()&&l.trim()!==s&&H.isHTMLString(l)?await this.processText(l,!0):await this.processText(s)}async processText(e,t=!1){const{Caret:o,BlockManager:n}=this.Editor,i=t?this.processHTML(e):this.processPlain(e);if(!i.length)return;if(1===i.length)return void(i[0].isBlock?this.processSingleBlock(i.pop()):this.processInlinePaste(i.pop()));const s=n.currentBlock&&n.currentBlock.tool.isDefault&&n.currentBlock.isEmpty;i.map((async(e,t)=>this.insertBlock(e,0===t&&s))),n.currentBlock&&o.setToBlock(n.currentBlock,o.positions.END)}setCallback(){this.listeners.on(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}unsetCallback(){this.listeners.off(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}processTools(){const e=this.Editor.Tools.blockTools;Array.from(e.values()).forEach(this.processTool)}collectTagNames(e){return w(e)?[e]:y(e)?Object.keys(e):[]}getTagsConfig(e){if(!1===e.pasteConfig)return;const t=e.pasteConfig.tags||[],o=[];t.forEach((t=>{const n=this.collectTagNames(t);o.push(...n),n.forEach((o=>{if(Object.prototype.hasOwnProperty.call(this.toolsTags,o))return void b(`Paste handler for «${e.name}» Tool on «${o}» tag is skipped because it is already used by «${this.toolsTags[o].tool.name}» Tool.`,"warn");const n=y(t)?t[o]:null;this.toolsTags[o.toUpperCase()]={tool:e,sanitizationConfig:n}}))})),this.tagsByTool[e.name]=o.map((e=>e.toUpperCase()))}getFilesConfig(e){if(!1===e.pasteConfig)return;const{files:t={}}=e.pasteConfig;let{extensions:o,mimeTypes:n}=t;!o&&!n||(o&&!Array.isArray(o)&&(b(`«extensions» property of the onDrop config for «${e.name}» Tool should be an array`),o=[]),n&&!Array.isArray(n)&&(b(`«mimeTypes» property of the onDrop config for «${e.name}» Tool should be an array`),n=[]),n&&(n=n.filter((t=>!!function(e){return/^[-\w]+\/([-+\w]+|\*)$/.test(e)}(t)||(b(`MIME type value «${t}» for the «${e.name}» Tool is not a valid MIME type`,"warn"),!1)))),this.toolsFiles[e.name]={extensions:o||[],mimeTypes:n||[]})}getPatternsConfig(e){!1===e.pasteConfig||!e.pasteConfig.patterns||S(e.pasteConfig.patterns)||Object.entries(e.pasteConfig.patterns).forEach((([t,o])=>{o instanceof RegExp||b(`Pattern ${o} for «${e.name}» Tool is skipped because it should be a Regexp instance.`,"warn"),this.toolsPatterns.push({key:t,pattern:o,tool:e})}))}isNativeBehaviour(e){return H.isNativeInput(e)}async processFiles(e){const{BlockManager:t}=this.Editor;let o;o=await Promise.all(Array.from(e).map((e=>this.processFile(e)))),o=o.filter((e=>!!e));const n=t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty;o.forEach(((e,o)=>{t.paste(e.type,e.event,0===o&&n)}))}async processFile(e){const t=function(e){return e.name.split(".").pop()}(e),o=Object.entries(this.toolsFiles).find((([o,{mimeTypes:n,extensions:i}])=>{const[s,r]=e.type.split("/"),a=i.find((e=>e.toLowerCase()===t.toLowerCase())),l=n.find((e=>{const[t,o]=e.split("/");return t===s&&(o===r||"*"===o)}));return!!a||!!l}));if(!o)return;const[n]=o;return{event:this.composePasteEvent("file",{file:e}),type:n}}processHTML(e){const{Tools:t}=this.Editor,o=H.make("DIV");return o.innerHTML=e,this.getNodes(o).map((e=>{let o,n=t.defaultTool,i=!1;switch(e.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:o=H.make("div"),o.appendChild(e);break;case Node.ELEMENT_NODE:o=e,i=!0,this.toolsTags[o.tagName]&&(n=this.toolsTags[o.tagName].tool)}const{tags:s}=n.pasteConfig||{tags:[]},r=s.reduce(((e,t)=>(this.collectTagNames(t).forEach((o=>{const n=y(t)?t[o]:null;e[o.toLowerCase()]=n||{}})),e)),{}),a=Object.assign({},r,n.baseSanitizeConfig);if("table"===o.tagName.toLowerCase()){const e=he(o.outerHTML,a);o=H.make("div",void 0,{innerHTML:e}).firstChild}else o.innerHTML=he(o.innerHTML,a);const l=this.composePasteEvent("tag",{data:o});return{content:o,isBlock:i,tool:n.name,event:l}})).filter((e=>{const t=H.isEmpty(e.content),o=H.isSingleTag(e.content);return!t||o}))}processPlain(e){const{defaultBlock:t}=this.config;if(!e)return[];const o=t;return e.split(/\r?\n/).filter((e=>e.trim())).map((e=>{const t=H.make("div");t.textContent=e;const n=this.composePasteEvent("tag",{data:t});return{content:t,tool:o,isBlock:!1,event:n}}))}async processSingleBlock(e){const{Caret:t,BlockManager:o}=this.Editor,{currentBlock:n}=o;n&&e.tool===n.name&&H.containsOnlyInlineElements(e.content.innerHTML)?t.insertContentAtCaretPosition(e.content.innerHTML):this.insertBlock(e,(null==n?void 0:n.tool.isDefault)&&n.isEmpty)}async processInlinePaste(e){const{BlockManager:t,Caret:o}=this.Editor,{content:n}=e;if(t.currentBlock&&t.currentBlock.tool.isDefault&&n.textContent.length{const o=t.pattern.exec(e);return!!o&&e===o.shift()}));return t?{event:this.composePasteEvent("pattern",{key:t.key,data:e}),tool:t.tool.name}:void 0}insertBlock(e,t=!1){const{BlockManager:o,Caret:n}=this.Editor,{currentBlock:i}=o;let s;if(t&&i&&i.isEmpty)return s=o.paste(e.tool,e.event,!0),void n.setToBlock(s,n.positions.END);s=o.paste(e.tool,e.event),n.setToBlock(s,n.positions.END)}insertEditorJSData(e){const{BlockManager:t,Caret:o,Tools:n}=this.Editor;de(e,(e=>n.blockTools.get(e).sanitizeConfig)).forEach((({tool:e,data:n},i)=>{let s=!1;0===i&&(s=t.currentBlock&&t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty);const r=t.insert({tool:e,data:n,replace:s});o.setToBlock(r,o.positions.END)}))}processElementNode(e,t,o){const n=Object.keys(this.toolsTags),i=e,{tool:s}=this.toolsTags[i.tagName]||{},r=this.tagsByTool[null==s?void 0:s.name]||[],a=n.includes(i.tagName),l=H.blockElements.includes(i.tagName.toLowerCase()),c=Array.from(i.children).some((({tagName:e})=>n.includes(e)&&!r.includes(e))),d=Array.from(i.children).some((({tagName:e})=>H.blockElements.includes(e.toLowerCase())));return l||a||c?a&&!c||l&&!d&&!c?[...t,o,i]:void 0:(o.appendChild(i),[...t,o])}getNodes(e){const t=Array.from(e.childNodes);let o;const n=(e,t)=>{if(H.isEmpty(t)&&!H.isSingleTag(t))return e;const i=e[e.length-1];let s=new DocumentFragment;switch(i&&H.isFragment(i)&&(s=e.pop()),t.nodeType){case Node.ELEMENT_NODE:if(o=this.processElementNode(t,e,s),o)return o;break;case Node.TEXT_NODE:return s.appendChild(t),[...e,s];default:return[...e,s]}return[...e,...Array.from(t.childNodes).reduce(n,[])]};return t.reduce(n,[])}composePasteEvent(e,t){return new CustomEvent(e,{detail:t})}};let st=it;st.PATTERN_PROCESSING_MAX_LENGTH=450;class rt extends K{constructor(){super(...arguments),this.isRectSelectionActivated=!1,this.SCROLL_SPEED=3,this.HEIGHT_OF_SCROLL_ZONE=40,this.BOTTOM_SCROLL_ZONE=1,this.TOP_SCROLL_ZONE=2,this.MAIN_MOUSE_BUTTON=0,this.mousedown=!1,this.isScrolling=!1,this.inScrollZone=null,this.startX=0,this.startY=0,this.mouseX=0,this.mouseY=0,this.stackOfSelected=[],this.listenerIds=[]}static get CSS(){return{overlay:"codex-editor-overlay",overlayContainer:"codex-editor-overlay__container",rect:"codex-editor-overlay__rectangle",topScrollZone:"codex-editor-overlay__scroll-zone--top",bottomScrollZone:"codex-editor-overlay__scroll-zone--bottom"}}prepare(){this.enableModuleBindings()}startSelection(e,t){const o=document.elementFromPoint(e-window.pageXOffset,t-window.pageYOffset);o.closest(`.${this.Editor.Toolbar.CSS.toolbar}`)||(this.Editor.BlockSelection.allBlocksSelected=!1,this.clearSelection(),this.stackOfSelected=[]);const n=[`.${te.CSS.content}`,`.${this.Editor.Toolbar.CSS.toolbar}`,`.${this.Editor.InlineToolbar.CSS.inlineToolbar}`],i=o.closest("."+this.Editor.UI.CSS.editorWrapper),s=n.some((e=>!!o.closest(e)));!i||s||(this.mousedown=!0,this.startX=e,this.startY=t)}endSelection(){this.mousedown=!1,this.startX=0,this.startY=0,this.overlayRectangle.style.display="none"}isRectActivated(){return this.isRectSelectionActivated}clearSelection(){this.isRectSelectionActivated=!1}enableModuleBindings(){const{container:e}=this.genHTML();this.listeners.on(e,"mousedown",(e=>{this.processMouseDown(e)}),!1),this.listeners.on(document.body,"mousemove",M((e=>{this.processMouseMove(e)}),10),{passive:!0}),this.listeners.on(document.body,"mouseleave",(()=>{this.processMouseLeave()})),this.listeners.on(window,"scroll",M((e=>{this.processScroll(e)}),10),{passive:!0}),this.listeners.on(document.body,"mouseup",(()=>{this.processMouseUp()}),!1)}processMouseDown(e){e.button===this.MAIN_MOUSE_BUTTON&&(null!==e.target.closest(H.allInputsSelector)||this.startSelection(e.pageX,e.pageY))}processMouseMove(e){this.changingRectangle(e),this.scrollByZones(e.clientY)}processMouseLeave(){this.clearSelection(),this.endSelection()}processScroll(e){this.changingRectangle(e)}processMouseUp(){this.clearSelection(),this.endSelection()}scrollByZones(e){this.inScrollZone=null,e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.TOP_SCROLL_ZONE),document.documentElement.clientHeight-e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.BOTTOM_SCROLL_ZONE),this.inScrollZone?this.isScrolling||(this.scrollVertical(this.inScrollZone===this.TOP_SCROLL_ZONE?-this.SCROLL_SPEED:this.SCROLL_SPEED),this.isScrolling=!0):this.isScrolling=!1}genHTML(){const{UI:e}=this.Editor,t=e.nodes.holder.querySelector("."+e.CSS.editorWrapper),o=H.make("div",rt.CSS.overlay,{}),n=H.make("div",rt.CSS.overlayContainer,{}),i=H.make("div",rt.CSS.rect,{});return n.appendChild(i),o.appendChild(n),t.appendChild(o),this.overlayRectangle=i,{container:t,overlay:o}}scrollVertical(e){if(!this.inScrollZone||!this.mousedown)return;const t=window.pageYOffset;window.scrollBy(0,e),this.mouseY+=window.pageYOffset-t,setTimeout((()=>{this.scrollVertical(e)}),0)}changingRectangle(e){if(!this.mousedown)return;void 0!==e.pageY&&(this.mouseX=e.pageX,this.mouseY=e.pageY);const{rightPos:t,leftPos:o,index:n}=this.genInfoForMouseSelection(),i=this.startX>t&&this.mouseX>t,s=this.startX=this.startY?(this.overlayRectangle.style.top=this.startY-window.pageYOffset+"px",this.overlayRectangle.style.bottom=`calc(100% - ${this.mouseY-window.pageYOffset}px`):(this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-window.pageYOffset}px`,this.overlayRectangle.style.top=this.mouseY-window.pageYOffset+"px"),this.mouseX>=this.startX?(this.overlayRectangle.style.left=this.startX-window.pageXOffset+"px",this.overlayRectangle.style.right=`calc(100% - ${this.mouseX-window.pageXOffset}px`):(this.overlayRectangle.style.right=`calc(100% - ${this.startX-window.pageXOffset}px`,this.overlayRectangle.style.left=this.mouseX-window.pageXOffset+"px")}genInfoForMouseSelection(){const e=document.body.offsetWidth/2,t=this.mouseY-window.pageYOffset,o=document.elementFromPoint(e,t),n=this.Editor.BlockManager.getBlockByChildNode(o);let i;void 0!==n&&(i=this.Editor.BlockManager.blocks.findIndex((e=>e.holder===n.holder)));const s=this.Editor.BlockManager.lastBlock.holder.querySelector("."+te.CSS.content),r=Number.parseInt(window.getComputedStyle(s).width,10)/2;return{index:i,leftPos:e-r,rightPos:e+r}}addBlockInSelection(e){this.rectCrossesBlocks&&this.Editor.BlockSelection.selectBlockByIndex(e),this.stackOfSelected.push(e)}trySelectNextBlock(e){const t=this.stackOfSelected[this.stackOfSelected.length-1]===e,o=this.stackOfSelected.length;if(t)return;const n=this.stackOfSelected[o-1]-this.stackOfSelected[o-2]>0;let i=0;o>1&&(i=n?1:-1);const s=e>this.stackOfSelected[o-1]&&1===i,r=ethis.stackOfSelected[o-1]||void 0===this.stackOfSelected[o-1])){let t=this.stackOfSelected[o-1]+1||e;for(;t<=e;t++)this.addBlockInSelection(t);return}if(!a&&e=e;t--)this.addBlockInSelection(t);return}if(!a)return;let l,c=o-1;for(l=e>this.stackOfSelected[o-1]?()=>e>this.stackOfSelected[c]:()=>e',title:"Text"}}}]),e}()}]).default}(lt);const ct=n(at);class dt{constructor(){this.commandName="bold",this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--bold"},this.nodes={button:void 0}}static get sanitize(){return{b:{}}}render(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML='',this.nodes.button}surround(){document.execCommand(this.commandName)}checkState(){const e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}get shortcut(){return"CMD+B"}}dt.isInline=!0,dt.title="Bold";class ht{constructor(){this.commandName="italic",this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--italic"},this.nodes={button:null}}static get sanitize(){return{i:{}}}render(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML='',this.nodes.button}surround(){document.execCommand(this.commandName)}checkState(){const e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}get shortcut(){return"CMD+I"}}ht.isInline=!0,ht.title="Italic";class pt{constructor({api:e}){this.commandLink="createLink",this.commandUnlink="unlink",this.ENTER_KEY=13,this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--link",buttonUnlink:"ce-inline-tool--unlink",input:"ce-inline-tool-input",inputShowed:"ce-inline-tool-input--showed"},this.nodes={button:null,input:null},this.inputOpened=!1,this.toolbar=e.toolbar,this.inlineToolbar=e.inlineToolbar,this.notifier=e.notifier,this.i18n=e.i18n,this.selection=new V}static get sanitize(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}render(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML=xe,this.nodes.button}renderActions(){return this.nodes.input=document.createElement("input"),this.nodes.input.placeholder=this.i18n.t("Add a link"),this.nodes.input.classList.add(this.CSS.input),this.nodes.input.addEventListener("keydown",(e=>{e.keyCode===this.ENTER_KEY&&this.enterPressed(e)})),this.nodes.input}surround(e){if(e){this.inputOpened?(this.selection.restore(),this.selection.removeFakeBackground()):(this.selection.setFakeBackground(),this.selection.save());const e=this.selection.findParentTag("A");if(e)return this.selection.expandToTag(e),this.unlink(),this.closeActions(),this.checkState(),void this.toolbar.close()}this.toggleActions()}checkState(){const e=this.selection.findParentTag("A");if(e){this.nodes.button.innerHTML='',this.nodes.button.classList.add(this.CSS.buttonUnlink),this.nodes.button.classList.add(this.CSS.buttonActive),this.openActions();const t=e.getAttribute("href");this.nodes.input.value="null"!==t?t:"",this.selection.save()}else this.nodes.button.innerHTML=xe,this.nodes.button.classList.remove(this.CSS.buttonUnlink),this.nodes.button.classList.remove(this.CSS.buttonActive);return!!e}clear(){this.closeActions()}get shortcut(){return"CMD+K"}toggleActions(){this.inputOpened?this.closeActions(!1):this.openActions(!0)}openActions(e=!1){this.nodes.input.classList.add(this.CSS.inputShowed),e&&this.nodes.input.focus(),this.inputOpened=!0}closeActions(e=!0){if(this.selection.isFakeBackgroundEnabled){const e=new V;e.save(),this.selection.restore(),this.selection.removeFakeBackground(),e.restore()}this.nodes.input.classList.remove(this.CSS.inputShowed),this.nodes.input.value="",e&&this.selection.clearSaved(),this.inputOpened=!1}enterPressed(e){let t=this.nodes.input.value||"";return t.trim()?this.validateURL(t)?(t=this.prepareLink(t),this.selection.restore(),this.selection.removeFakeBackground(),this.insertLink(t),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.selection.collapseToEnd(),void this.inlineToolbar.close()):(this.notifier.show({message:"Pasted link is not valid.",style:"error"}),void b("Incorrect Link pasted","warn",t)):(this.selection.restore(),this.unlink(),e.preventDefault(),void this.closeActions())}validateURL(e){return!/\s/.test(e)}prepareLink(e){return e=e.trim(),e=this.addProtocol(e)}addProtocol(e){if(/^(\w+):(\/\/)?/.test(e))return e;const t=/^\/[^/\s]/.test(e),o="#"===e.substring(0,1),n=/^\/\/[^/\s]/.test(e);return!t&&!o&&!n&&(e="http://"+e),e}insertLink(e){const t=this.selection.findParentTag("A");t&&this.selection.expandToTag(t),document.execCommand(this.commandLink,!1,e)}unlink(){document.execCommand(this.commandUnlink)}}pt.isInline=!0,pt.title="Link";class ut{constructor({data:e,api:t}){this.CSS={wrapper:"ce-stub",info:"ce-stub__info",title:"ce-stub__title",subtitle:"ce-stub__subtitle"},this.api=t,this.title=e.title||this.api.i18n.t("Error"),this.subtitle=this.api.i18n.t("The block can not be displayed correctly."),this.savedData=e.savedData,this.wrapper=this.make()}render(){return this.wrapper}save(){return this.savedData}make(){const e=H.make("div",this.CSS.wrapper),t=H.make("div",this.CSS.info),o=H.make("div",this.CSS.title,{textContent:this.title}),n=H.make("div",this.CSS.subtitle,{textContent:this.subtitle});return e.innerHTML='',t.appendChild(o),t.appendChild(n),e.appendChild(t),e}}ut.isReadOnlySupported=!0;class ft extends Ge{constructor(){super(...arguments),this.type=We.Inline}get title(){return this.constructable[qe.Title]}create(){return new this.constructable({api:this.api.getMethodsForTool(this),config:this.settings})}}class gt extends Ge{constructor(){super(...arguments),this.type=We.Tune}create(e,t){return new this.constructable({api:this.api.getMethodsForTool(this),config:this.settings,block:t,data:e})}}class mt extends Map{get blockTools(){const e=Array.from(this.entries()).filter((([,e])=>e.isBlock()));return new mt(e)}get inlineTools(){const e=Array.from(this.entries()).filter((([,e])=>e.isInline()));return new mt(e)}get blockTunes(){const e=Array.from(this.entries()).filter((([,e])=>e.isTune()));return new mt(e)}get internalTools(){const e=Array.from(this.entries()).filter((([,e])=>e.isInternal));return new mt(e)}get externalTools(){const e=Array.from(this.entries()).filter((([,e])=>!e.isInternal));return new mt(e)}}var bt=Object.defineProperty,kt=Object.getOwnPropertyDescriptor,vt=(e,t,o,n)=>{for(var i,s=n>1?void 0:n?kt(t,o):t,r=e.length-1;r>=0;r--)(i=e[r])&&(s=(n?i(t,o,s):i(s))||s);return n&&s&&bt(t,o,s),s};class xt extends Ge{constructor(){super(...arguments),this.type=We.Block,this.inlineTools=new mt,this.tunes=new mt}create(e,t,o){return new this.constructable({data:e,block:t,readOnly:o,api:this.api.getMethodsForTool(this),config:this.settings})}get isReadOnlySupported(){return!0===this.constructable[Ve.IsReadOnlySupported]}get isLineBreaksEnabled(){return this.constructable[Ve.IsEnabledLineBreaks]}get toolbox(){const e=this.constructable[Ve.Toolbox],t=this.config[Xe.Toolbox];if(!S(e)&&!1!==t)return t?Array.isArray(e)?Array.isArray(t)?t.map(((t,o)=>{const n=e[o];return n?{...n,...t}:t})):[t]:Array.isArray(t)?t:[{...e,...t}]:Array.isArray(e)?e:[e]}get conversionConfig(){return this.constructable[Ve.ConversionConfig]}get enabledInlineTools(){return this.config[Xe.EnabledInlineTools]||!1}get enabledBlockTunes(){return this.config[Xe.EnabledBlockTunes]}get pasteConfig(){return this.constructable[Ve.PasteConfig]??{}}get sanitizeConfig(){const e=super.sanitizeConfig,t=this.baseSanitizeConfig;if(S(e))return t;const o={};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const i=e[n];y(i)?o[n]=Object.assign({},t,i):o[n]=i}return o}get baseSanitizeConfig(){const e={};return Array.from(this.inlineTools.values()).forEach((t=>Object.assign(e,t.sanitizeConfig))),Array.from(this.tunes.values()).forEach((t=>Object.assign(e,t.sanitizeConfig))),e}}vt([R],xt.prototype,"sanitizeConfig",1),vt([R],xt.prototype,"baseSanitizeConfig",1);class yt{constructor(e,t,o){this.api=o,this.config=e,this.editorConfig=t}get(e){const{class:t,isInternal:o=!1,...n}=this.config[e];return new(this.getConstructor(t))({name:e,constructable:t,config:n,api:this.api,isDefault:e===this.editorConfig.defaultBlock,defaultPlaceholder:this.editorConfig.placeholder,isInternal:o})}getConstructor(e){switch(!0){case e[qe.IsInline]:return ft;case e[Ze.IsTune]:return gt;default:return xt}}}class wt{constructor({api:e}){this.CSS={animation:"wobble"},this.api=e}render(){return{icon:ve,title:this.api.i18n.t("Move down"),onActivate:()=>this.handleClick(),name:"move-down"}}handleClick(){const e=this.api.blocks.getCurrentBlockIndex(),t=this.api.blocks.getBlockByIndex(e+1);if(!t)throw new Error("Unable to move Block down since it is already the last");const o=t.holder,n=o.getBoundingClientRect();let i=Math.abs(window.innerHeight-o.offsetHeight);n.top',title:this.api.i18n.t("Delete"),name:"delete",confirmation:{title:this.api.i18n.t("Click to delete"),onActivate:()=>this.handleClick()}}}handleClick(){this.api.blocks.delete()}}Et.isTune=!0;class Ct{constructor({api:e}){this.CSS={animation:"wobble"},this.api=e}render(){return{icon:'',title:this.api.i18n.t("Move up"),onActivate:()=>this.handleClick(),name:"move-up"}}handleClick(){const e=this.api.blocks.getCurrentBlockIndex(),t=this.api.blocks.getBlockByIndex(e),o=this.api.blocks.getBlockByIndex(e-1);if(0===e||!t||!o)throw new Error("Unable to move Block up since it is already the first");const n=t.holder,i=o.holder,s=n.getBoundingClientRect(),r=i.getBoundingClientRect();let a;a=r.top>0?Math.abs(s.top)-Math.abs(r.top):Math.abs(s.top)+r.height,window.scrollBy(0,-1*a),this.api.blocks.move(e-1),this.api.toolbar.toggleBlockSettings(!0)}}Ct.isTune=!0;var St=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor;class Tt extends K{constructor(){super(...arguments),this.stubTool="stub",this.toolsAvailable=new mt,this.toolsUnavailable=new mt}get available(){return this.toolsAvailable}get unavailable(){return this.toolsUnavailable}get inlineTools(){return this.available.inlineTools}get blockTools(){return this.available.blockTools}get blockTunes(){return this.available.blockTunes}get defaultTool(){return this.blockTools.get(this.config.defaultBlock)}get internal(){return this.available.internalTools}async prepare(){if(this.validateTools(),this.config.tools=O({},this.internalTools,this.config.tools),!Object.prototype.hasOwnProperty.call(this.config,"tools")||0===Object.keys(this.config.tools).length)throw Error("Can't start without tools");const e=this.prepareConfig();this.factory=new yt(e,this.config,this.Editor.API);const t=this.getListOfPrepareFunctions(e);if(0===t.length)return Promise.resolve();await T(t,(e=>{this.toolPrepareMethodSuccess(e)}),(e=>{this.toolPrepareMethodFallback(e)})),this.prepareBlockTools()}getAllInlineToolsSanitizeConfig(){const e={};return Array.from(this.inlineTools.values()).forEach((t=>{Object.assign(e,t.sanitizeConfig)})),e}destroy(){Object.values(this.available).forEach((async e=>{x(e.reset)&&await e.reset()}))}get internalTools(){return{bold:{class:dt,isInternal:!0},italic:{class:ht,isInternal:!0},link:{class:pt,isInternal:!0},paragraph:{class:ct,inlineToolbar:!0,isInternal:!0},stub:{class:ut,isInternal:!0},moveUp:{class:Ct,isInternal:!0},delete:{class:Et,isInternal:!0},moveDown:{class:wt,isInternal:!0}}}toolPrepareMethodSuccess(e){const t=this.factory.get(e.toolName);if(t.isInline()){const e=["render","surround","checkState"].filter((e=>!t.create()[e]));if(e.length)return b(`Incorrect Inline Tool: ${t.name}. Some of required methods is not implemented %o`,"warn",e),void this.toolsUnavailable.set(t.name,t)}this.toolsAvailable.set(t.name,t)}toolPrepareMethodFallback(e){this.toolsUnavailable.set(e.toolName,this.factory.get(e.toolName))}getListOfPrepareFunctions(e){const t=[];return Object.entries(e).forEach((([e,o])=>{t.push({function:x(o.class.prepare)?o.class.prepare:()=>{},data:{toolName:e,config:o.config}})})),t}prepareBlockTools(){Array.from(this.blockTools.values()).forEach((e=>{this.assignInlineToolsToBlockTool(e),this.assignBlockTunesToBlockTool(e)}))}assignInlineToolsToBlockTool(e){if(!1!==this.config.inlineToolbar){if(!0===e.enabledInlineTools)return void(e.inlineTools=new mt(Array.isArray(this.config.inlineToolbar)?this.config.inlineToolbar.map((e=>[e,this.inlineTools.get(e)])):Array.from(this.inlineTools.entries())));Array.isArray(e.enabledInlineTools)&&(e.inlineTools=new mt(e.enabledInlineTools.map((e=>[e,this.inlineTools.get(e)]))))}}assignBlockTunesToBlockTool(e){if(!1!==e.enabledBlockTunes){if(Array.isArray(e.enabledBlockTunes)){const t=new mt(e.enabledBlockTunes.map((e=>[e,this.blockTunes.get(e)])));return void(e.tunes=new mt([...t,...this.blockTunes.internalTools]))}if(Array.isArray(this.config.tunes)){const t=new mt(this.config.tunes.map((e=>[e,this.blockTunes.get(e)])));return void(e.tunes=new mt([...t,...this.blockTunes.internalTools]))}e.tunes=this.blockTunes.internalTools}}validateTools(){for(const e in this.config.tools)if(Object.prototype.hasOwnProperty.call(this.config.tools,e)){if(e in this.internalTools)return;const t=this.config.tools[e];if(!x(t)&&!x(t.class))throw Error(`Tool «${e}» must be a constructor function or an object with function in the «class» property`)}}prepareConfig(){const e={};for(const t in this.config.tools)y(this.config.tools[t])?e[t]=this.config.tools[t]:e[t]={class:this.config.tools[t]};return e}}((e,t,o,n)=>{for(var i,s=n>1?void 0:n?Bt(t,o):t,r=e.length-1;r>=0;r--)(i=e[r])&&(s=(n?i(t,o,s):i(s))||s);n&&s&&St(t,o,s)})([R],Tt.prototype,"getAllInlineToolsSanitizeConfig",1);const It=':root{--selectionColor: #e1f2ff;--inlineSelectionColor: #d4ecff;--bg-light: #eff2f5;--grayText: #707684;--color-dark: #1D202B;--color-active-icon: #388AE5;--color-gray-border: rgba(201, 201, 204, .48);--content-width: 650px;--narrow-mode-right-padding: 50px;--toolbox-buttons-size: 26px;--toolbox-buttons-size--mobile: 36px;--icon-size: 20px;--icon-size--mobile: 28px;--block-padding-vertical: .4em;--color-line-gray: #EFF0F1 }.codex-editor{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1}.codex-editor .hide{display:none}.codex-editor__redactor [contenteditable]:empty:after{content:"\\feff"}@media (min-width: 651px){.codex-editor--narrow .codex-editor__redactor{margin-right:50px}}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .codex-editor__redactor{margin-left:50px;margin-right:0}}@media (min-width: 651px){.codex-editor--narrow .ce-toolbar__actions{right:-5px}}.codex-editor-copyable{position:absolute;height:1px;width:1px;top:-400%;opacity:.001}.codex-editor-overlay{position:fixed;top:0px;left:0px;right:0px;bottom:0px;z-index:999;pointer-events:none;overflow:hidden}.codex-editor-overlay__container{position:relative;pointer-events:auto;z-index:0}.codex-editor-overlay__rectangle{position:absolute;pointer-events:none;background-color:#2eaadc33;border:1px solid transparent}.codex-editor svg{max-height:100%}.codex-editor path{stroke:currentColor}.codex-editor ::-moz-selection{background-color:#d4ecff}.codex-editor ::selection{background-color:#d4ecff}.codex-editor--toolbox-opened [contentEditable=true][data-placeholder]:focus:before{opacity:0!important}.ce-scroll-locked{overflow:hidden}.ce-scroll-locked--hard{overflow:hidden;top:calc(-1 * var(--window-scroll-offset));position:fixed;width:100%}.ce-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,top;display:none}.ce-toolbar--opened{display:block}.ce-toolbar__content{max-width:650px;margin:0 auto;position:relative}.ce-toolbar__plus{color:#1d202b;cursor:pointer;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0}@media (max-width: 650px){.ce-toolbar__plus{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__plus:hover{background-color:#eff2f5}}.ce-toolbar__plus--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__plus-shortcut{opacity:.6;word-spacing:-2px;margin-top:5px}@media (max-width: 650px){.ce-toolbar__plus{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__plus--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__plus--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__actions{position:absolute;right:100%;opacity:0;display:-webkit-box;display:-ms-flexbox;display:flex;padding-right:5px}.ce-toolbar__actions--opened{opacity:1}@media (max-width: 650px){.ce-toolbar__actions{right:auto}}.ce-toolbar__settings-btn{color:#1d202b;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;margin-left:3px;cursor:pointer;user-select:none}@media (max-width: 650px){.ce-toolbar__settings-btn{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__settings-btn:hover{background-color:#eff2f5}}.ce-toolbar__settings-btn--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (min-width: 651px){.ce-toolbar__settings-btn{width:24px}}.ce-toolbar__settings-btn--hidden{display:none}@media (max-width: 650px){.ce-toolbar__settings-btn{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__settings-btn--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__settings-btn--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__plus svg,.ce-toolbar__settings-btn svg{width:24px;height:24px}@media (min-width: 651px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}@media (min-width: 651px){.codex-editor--narrow .ce-toolbox .ce-popover{right:0;left:auto;left:initial}}.ce-inline-toolbar{--y-offset: 8px;position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;-webkit-transform:translateX(-50%) translateY(8px) scale(.94);transform:translate(-50%) translateY(8px) scale(.94);opacity:0;visibility:hidden;-webkit-transition:opacity .25s ease,-webkit-transform .15s ease;transition:opacity .25s ease,-webkit-transform .15s ease;transition:transform .15s ease,opacity .25s ease;transition:transform .15s ease,opacity .25s ease,-webkit-transform .15s ease;will-change:transform,opacity;top:0;left:0;z-index:3}.ce-inline-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-inline-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-inline-toolbar--showed{opacity:1;visibility:visible;-webkit-transform:translateX(-50%);transform:translate(-50%)}.ce-inline-toolbar--left-oriented{-webkit-transform:translateX(-23px) translateY(8px) scale(.94);transform:translate(-23px) translateY(8px) scale(.94)}.ce-inline-toolbar--left-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-23px);transform:translate(-23px)}.ce-inline-toolbar--right-oriented{-webkit-transform:translateX(-100%) translateY(8px) scale(.94);transform:translate(-100%) translateY(8px) scale(.94);margin-left:23px}.ce-inline-toolbar--right-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-100%);transform:translate(-100%)}.ce-inline-toolbar [hidden]{display:none!important}.ce-inline-toolbar__toggler-and-button-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;padding:0 6px}.ce-inline-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown{display:-webkit-box;display:-ms-flexbox;display:flex;padding:6px;margin:0 6px 0 -6px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-right:1px solid rgba(201,201,204,.48);-webkit-box-sizing:border-box;box-sizing:border-box}@media (hover: hover){.ce-inline-toolbar__dropdown:hover{background:#eff2f5}}.ce-inline-toolbar__dropdown--hidden{display:none}.ce-inline-toolbar__dropdown-content,.ce-inline-toolbar__dropdown-arrow{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown-content svg,.ce-inline-toolbar__dropdown-arrow svg{width:20px;height:20px}.ce-inline-toolbar__shortcut{opacity:.6;word-spacing:-3px;margin-top:3px}.ce-inline-tool{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:6px 1px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0;border-radius:0;line-height:normal}.ce-inline-tool svg{width:20px;height:20px}@media (max-width: 650px){.ce-inline-tool svg{width:28px;height:28px}}@media (hover: hover){.ce-inline-tool:hover{background-color:#eff2f5}}.ce-inline-tool--active{color:#388ae5}.ce-inline-tool--focused{background:rgba(34,186,255,.08)!important}.ce-inline-tool--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.ce-inline-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-inline-tool--link .icon--unlink,.ce-inline-tool--unlink .icon--link{display:none}.ce-inline-tool--unlink .icon--unlink{display:inline-block;margin-bottom:-1px}.ce-inline-tool-input{outline:none;border:0;border-radius:0 0 4px 4px;margin:0;font-size:13px;padding:10px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;font-weight:500;border-top:1px solid rgba(201,201,204,.48);-webkit-appearance:none;font-family:inherit}@media (max-width: 650px){.ce-inline-tool-input{font-size:15px;font-weight:500}}.ce-inline-tool-input::-webkit-input-placeholder{color:#707684}.ce-inline-tool-input::-moz-placeholder{color:#707684}.ce-inline-tool-input:-ms-input-placeholder{color:#707684}.ce-inline-tool-input::-ms-input-placeholder{color:#707684}.ce-inline-tool-input::placeholder{color:#707684}.ce-inline-tool-input--showed{display:block}.ce-conversion-toolbar{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;opacity:0;visibility:hidden;will-change:transform,opacity;-webkit-transition:opacity .1s ease,-webkit-transform .1s ease;transition:opacity .1s ease,-webkit-transform .1s ease;transition:transform .1s ease,opacity .1s ease;transition:transform .1s ease,opacity .1s ease,-webkit-transform .1s ease;-webkit-transform:translateY(-8px);transform:translateY(-8px);left:-1px;width:190px;margin-top:5px;-webkit-box-sizing:content-box;box-sizing:content-box}.ce-conversion-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-conversion-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-conversion-toolbar--showed{opacity:1;visibility:visible;-webkit-transform:none;transform:none}.ce-conversion-toolbar [hidden]{display:none!important}.ce-conversion-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-conversion-toolbar__label{color:#707684;font-size:11px;font-weight:500;letter-spacing:.33px;padding:10px 10px 5px;text-transform:uppercase}.ce-conversion-tool{display:-webkit-box;display:-ms-flexbox;display:flex;padding:5px 10px;font-size:14px;line-height:20px;font-weight:500;cursor:pointer;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-conversion-tool--hidden{display:none}.ce-conversion-tool--focused{background:rgba(34,186,255,.08)!important}.ce-conversion-tool--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.ce-conversion-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-conversion-tool:hover{background:#eff2f5}.ce-conversion-tool__icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:26px;height:26px;-webkit-box-shadow:0 0 0 1px rgba(201,201,204,.48);box-shadow:0 0 0 1px #c9c9cc7a;border-radius:5px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:#fff;-webkit-box-sizing:content-box;box-sizing:content-box;-ms-flex-negative:0;flex-shrink:0;margin-right:10px}.ce-conversion-tool__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-conversion-tool__icon{width:36px;height:36px;border-radius:8px}.ce-conversion-tool__icon svg{width:28px;height:28px}}.ce-conversion-tool--last{margin-right:0!important}.ce-conversion-tool--active{color:#388ae5!important}.ce-conversion-tool--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-conversion-tool__secondary-label{color:#707684;font-size:12px;margin-left:auto;white-space:nowrap;letter-spacing:-.1em;padding-right:5px;margin-bottom:-2px;opacity:.6}@media (max-width: 650px){.ce-conversion-tool__secondary-label{display:none}}.ce-settings__button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:6px 1px;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0;line-height:32px}.ce-settings__button svg{width:20px;height:20px}@media (max-width: 650px){.ce-settings__button svg{width:28px;height:28px}}@media (hover: hover){.ce-settings__button:hover{background-color:#eff2f5}}.ce-settings__button--active{color:#388ae5}.ce-settings__button--focused{background:rgba(34,186,255,.08)!important}.ce-settings__button--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.ce-settings__button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-settings__button:not(:nth-child(3n+3)){margin-right:3px}.ce-settings__button:nth-child(n+4){margin-top:3px}.ce-settings__button--disabled{cursor:not-allowed!important}.ce-settings__button--disabled{opacity:.3}.ce-settings__button--selected{color:#388ae5}@media (min-width: 651px){.codex-editor--narrow .ce-settings .ce-popover{right:0;left:auto;left:initial}}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.ce-block{-webkit-animation:fade-in .3s ease;animation:fade-in .3s ease;-webkit-animation-fill-mode:none;animation-fill-mode:none;-webkit-animation-fill-mode:initial;animation-fill-mode:initial}.ce-block:first-of-type{margin-top:0}.ce-block--selected .ce-block__content{background:#e1f2ff}.ce-block--selected .ce-block__content [contenteditable]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce-block--selected .ce-block__content img,.ce-block--selected .ce-block__content .ce-stub{opacity:.55}.ce-block--stretched .ce-block__content{max-width:none}.ce-block__content{position:relative;max-width:650px;margin:0 auto;-webkit-transition:background-color .15s ease;transition:background-color .15s ease}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:100%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #388AE5;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{content:"";position:absolute;top:100%;height:1px;width:100%;color:#388ae5;background:repeating-linear-gradient(90deg,#388AE5,#388AE5 1px,#fff 1px,#fff 6px)}.ce-block a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.ce-block b{font-weight:700}.ce-block i{font-style:italic}@media (min-width: 651px){.codex-editor--narrow .ce-block--focused{margin-right:-50px;padding-right:50px}}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@-webkit-keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@-webkit-keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.cdx-block{padding:.4em 0}.cdx-block::-webkit-input-placeholder{line-height:normal!important}.cdx-input{border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px #232c480f;border-radius:3px;padding:10px 12px;outline:none;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.cdx-input[data-placeholder]:before{position:static!important}.cdx-input[data-placeholder]:before{display:inline-block;width:0;white-space:nowrap;pointer-events:none}.cdx-settings-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:6px 1px;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0;min-width:26px;min-height:26px}.cdx-settings-button svg{width:20px;height:20px}@media (max-width: 650px){.cdx-settings-button svg{width:28px;height:28px}}@media (hover: hover){.cdx-settings-button:hover{background-color:#eff2f5}}.cdx-settings-button--focused{background:rgba(34,186,255,.08)!important}.cdx-settings-button--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.cdx-settings-button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.cdx-settings-button--active{color:#388ae5}.cdx-settings-button svg{width:auto;height:auto}@media (max-width: 650px){.cdx-settings-button{width:36px;height:36px;border-radius:8px}}.cdx-loader{position:relative;border:1px solid rgba(201,201,204,.48)}.cdx-loader:before{content:"";position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-11px 0 0 -11px;border:2px solid rgba(201,201,204,.48);border-left-color:#388ae5;border-radius:50%;-webkit-animation:cdxRotation 1.2s infinite linear;animation:cdxRotation 1.2s infinite linear}@-webkit-keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cdx-button{padding:13px;border-radius:3px;border:1px solid rgba(201,201,204,.48);font-size:14.9px;background:#fff;-webkit-box-shadow:0 2px 2px 0 rgba(18,30,57,.04);box-shadow:0 2px 2px #121e390a;color:#707684;text-align:center;cursor:pointer}@media (hover: hover){.cdx-button:hover{background:#FBFCFE;-webkit-box-shadow:0 1px 3px 0 rgba(18,30,57,.08);box-shadow:0 1px 3px #121e3914}}.cdx-button svg{height:20px;margin-right:.2em;margin-top:-2px}.ce-stub{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:12px 18px;margin:10px 0;border-radius:10px;background:#eff2f5;border:1px solid #EFF0F1;color:#707684;font-size:14px}.ce-stub svg{width:20px;height:20px}.ce-stub__info{margin-left:14px}.ce-stub__title{font-weight:500;text-transform:capitalize}.codex-editor.codex-editor--rtl{direction:rtl}.codex-editor.codex-editor--rtl .cdx-list{padding-left:0;padding-right:40px}.codex-editor.codex-editor--rtl .ce-toolbar__plus{right:-26px;left:auto}.codex-editor.codex-editor--rtl .ce-toolbar__actions{right:auto;left:-26px}@media (max-width: 650px){.codex-editor.codex-editor--rtl .ce-toolbar__actions{margin-left:0;margin-right:auto;padding-right:0;padding-left:10px}}.codex-editor.codex-editor--rtl .ce-settings{left:5px;right:auto}.codex-editor.codex-editor--rtl .ce-settings:before{right:auto;left:25px}.codex-editor.codex-editor--rtl .ce-settings__button:not(:nth-child(3n+3)){margin-left:3px;margin-right:0}.codex-editor.codex-editor--rtl .ce-conversion-tool__icon{margin-right:0;margin-left:10px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown{border-right:0px solid transparent;border-left:1px solid rgba(201,201,204,.48);margin:0 -6px 0 6px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown .icon--toggler-down{margin-left:0;margin-right:4px}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__plus{left:0px;right:5px}}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__actions{left:-5px}}.cdx-search-field{--icon-margin-right: 10px;background:rgba(232,232,235,.49);border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:2px;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto}.cdx-search-field__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:var(--icon-margin-right)}.cdx-search-field__icon svg{width:20px;height:20px;color:#707684}.cdx-search-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;padding:0;line-height:22px;min-width:calc(100% - 26px - var(--icon-margin-right))}.cdx-search-field__input::-webkit-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-moz-placeholder{color:#707684;font-weight:500}.cdx-search-field__input:-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::placeholder{color:#707684;font-weight:500}.ce-popover{--border-radius: 6px;--width: 200px;--max-height: 270px;--padding: 6px;--offset-from-target: 8px;--color-border: #e8e8eb;--color-shadow: rgba(13,20,33,.13);--color-background: white;--color-text-primary: black;--color-text-secondary: #707684;--color-border-icon: rgba(201, 201, 204, .48);--color-border-icon-disabled: #EFF0F1;--color-text-icon-active: #388AE5;--color-background-icon-active: rgba(56, 138, 229, .1);--color-background-item-focus: rgba(34, 186, 255, .08);--color-shadow-item-focus: rgba(7, 161, 227, .08);--color-background-item-hover: #eff2f5;--color-background-item-confirm: #E24A4A;--color-background-item-confirm-hover: #CE4343;min-width:var(--width);width:var(--width);max-height:var(--max-height);border-radius:var(--border-radius);overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 3px 15px -3px var(--color-shadow);box-shadow:0 3px 15px -3px var(--color-shadow);position:absolute;left:0;top:calc(100% + var(--offset-from-target));background:var(--color-background);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;z-index:4;opacity:0;max-height:0;pointer-events:none;padding:0;border:none}.ce-popover--opened{opacity:1;padding:var(--padding);max-height:var(--max-height);pointer-events:auto;-webkit-animation:panelShowing .1s ease;animation:panelShowing .1s ease;border:1px solid var(--color-border)}@media (max-width: 650px){.ce-popover--opened{-webkit-animation:panelShowingMobile .25s ease;animation:panelShowingMobile .25s ease}}.ce-popover__items{overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:contain}@media (max-width: 650px){.ce-popover__overlay{position:fixed;top:0;bottom:0;left:0;right:0;background:#1D202B;z-index:3;opacity:.5;-webkit-transition:opacity .12s ease-in;transition:opacity .12s ease-in;will-change:opacity;visibility:visible}}.ce-popover__overlay--hidden{display:none}.ce-popover--open-top{top:calc(-1 * (var(--offset-from-target) + var(--popover-height)))}@media (max-width: 650px){.ce-popover{--offset: 5px;position:fixed;max-width:none;min-width:calc(100% - var(--offset) * 2);left:var(--offset);right:var(--offset);bottom:calc(var(--offset) + env(safe-area-inset-bottom));top:auto;border-radius:10px}.ce-popover .ce-popover__search{display:none}}.ce-popover__search,.ce-popover__custom-content:not(:empty){margin-bottom:5px}.ce-popover__nothing-found-message{color:#707684;display:none;cursor:default;padding:3px;font-size:14px;line-height:20px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ce-popover__nothing-found-message--displayed{display:block}.ce-popover__custom-content:not(:empty){padding:4px}@media (min-width: 651px){.ce-popover__custom-content:not(:empty){padding:0}}.ce-popover__custom-content--hidden{display:none}.ce-popover-item{--border-radius: 6px;--icon-size: 20px;--icon-size-mobile: 28px;border-radius:var(--border-radius);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:3px;color:var(--color-text-primary);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (max-width: 650px){.ce-popover-item{padding:4px}}.ce-popover-item:not(:last-of-type){margin-bottom:1px}.ce-popover-item__icon{border-radius:5px;width:26px;height:26px;-webkit-box-shadow:0 0 0 1px var(--color-border-icon);box-shadow:0 0 0 1px var(--color-border-icon);background:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:10px}.ce-popover-item__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-popover-item__icon{width:36px;height:36px;border-radius:8px}.ce-popover-item__icon svg{width:var(--icon-size-mobile);height:var(--icon-size-mobile)}}.ce-popover-item__title{font-size:14px;line-height:20px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (max-width: 650px){.ce-popover-item__title{font-size:16px}}.ce-popover-item__secondary-title{color:var(--color-text-secondary);font-size:12px;margin-left:auto;white-space:nowrap;letter-spacing:-.1em;padding-right:5px;margin-bottom:-2px;opacity:.6}@media (max-width: 650px){.ce-popover-item__secondary-title{display:none}}.ce-popover-item--active{background:var(--color-background-icon-active);color:var(--color-text-icon-active)}.ce-popover-item--active .ce-popover-item__icon{-webkit-box-shadow:none;box-shadow:none}.ce-popover-item--disabled{color:var(--color-text-secondary);cursor:default;pointer-events:none}.ce-popover-item--disabled .ce-popover-item__icon{-webkit-box-shadow:0 0 0 1px var(--color-border-icon-disabled);box-shadow:0 0 0 1px var(--color-border-icon-disabled)}.ce-popover-item--focused:not(.ce-popover-item--no-focus){background:var(--color-background-item-focus)!important}.ce-popover-item--focused:not(.ce-popover-item--no-focus){-webkit-box-shadow:inset 0 0 0px 1px var(--color-shadow-item-focus);box-shadow:inset 0 0 0 1px var(--color-shadow-item-focus)}.ce-popover-item--hidden{display:none}@media (hover: hover){.ce-popover-item:hover{cursor:pointer}.ce-popover-item:hover:not(.ce-popover-item--no-hover){background-color:var(--color-background-item-hover)}.ce-popover-item:hover .ce-popover-item__icon{-webkit-box-shadow:none;box-shadow:none}}.ce-popover-item--confirmation{background:var(--color-background-item-confirm)}.ce-popover-item--confirmation .ce-popover-item__icon{color:var(--color-background-item-confirm)}.ce-popover-item--confirmation .ce-popover-item__title{color:#fff}@media (hover: hover){.ce-popover-item--confirmation:not(.ce-popover-item--no-hover):hover{background:var(--color-background-item-confirm-hover)}}.ce-popover-item--confirmation:not(.ce-popover-item--no-focus).ce-popover-item--focused{background:var(--color-background-item-confirm-hover)!important}.ce-popover-item--confirmation .ce-popover-item__icon,.ce-popover-item--active .ce-popover-item__icon,.ce-popover-item--focused .ce-popover-item__icon{-webkit-box-shadow:none;box-shadow:none}@-webkit-keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble;-webkit-animation-duration:.4s;animation-duration:.4s}@-webkit-keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}\n';const _t={BlocksAPI:class extends K{constructor(){super(...arguments),this.insert=(e=this.config.defaultBlock,t={},o={},n,i,s,r)=>new W(this.Editor.BlockManager.insert({id:r,tool:e,data:t,index:n,needToFocus:i,replace:s})),this.composeBlockData=async e=>{const t=this.Editor.Tools.blockTools.get(e);return new te({tool:t,api:this.Editor.API,readOnly:!0,data:{},tunesData:{}}).data},this.update=async(e,t)=>{const{BlockManager:o}=this.Editor,n=o.getBlockById(e);if(void 0===n)throw new Error(`Block with id "${e}" not found`);return new W(await o.update(n,t))},this.convert=(e,t,o)=>{var n,i;const{BlockManager:s,Tools:r}=this.Editor,a=s.getBlockById(e);if(!a)throw new Error(`Block with id "${e}" not found`);const l=r.blockTools.get(a.name),c=r.blockTools.get(t);if(!c)throw new Error(`Block Tool with type "${t}" not found`);const d=void 0!==(null==(n=null==l?void 0:l.conversionConfig)?void 0:n.export),h=void 0!==(null==(i=c.conversionConfig)?void 0:i.import);if(!d||!h){const e=[!d&&A(a.name),!h&&A(t)].filter(Boolean).join(" and ");throw new Error(`Conversion from "${a.name}" to "${t}" is not possible. ${e} tool(s) should provide a "conversionConfig"`)}s.convert(a,t,o)},this.insertMany=(e,t=this.Editor.BlockManager.blocks.length-1)=>{this.validateIndex(t);const o=e.map((({id:e,type:t,data:o})=>this.Editor.BlockManager.composeBlock({id:e,tool:t||this.config.defaultBlock,data:o})));return this.Editor.BlockManager.insertMany(o,t),o.map((e=>new W(e)))}}get methods(){return{clear:()=>this.clear(),render:e=>this.render(e),renderFromHTML:e=>this.renderFromHTML(e),delete:e=>this.delete(e),swap:(e,t)=>this.swap(e,t),move:(e,t)=>this.move(e,t),getBlockByIndex:e=>this.getBlockByIndex(e),getById:e=>this.getById(e),getCurrentBlockIndex:()=>this.getCurrentBlockIndex(),getBlockIndex:e=>this.getBlockIndex(e),getBlocksCount:()=>this.getBlocksCount(),stretchBlock:(e,t=!0)=>this.stretchBlock(e,t),insertNewBlock:()=>this.insertNewBlock(),insert:this.insert,insertMany:this.insertMany,update:this.update,composeBlockData:this.composeBlockData,convert:this.convert}}getBlocksCount(){return this.Editor.BlockManager.blocks.length}getCurrentBlockIndex(){return this.Editor.BlockManager.currentBlockIndex}getBlockIndex(e){const t=this.Editor.BlockManager.getBlockById(e);if(t)return this.Editor.BlockManager.getBlockIndex(t);k("There is no block with id `"+e+"`","warn")}getBlockByIndex(e){const t=this.Editor.BlockManager.getBlockByIndex(e);if(void 0!==t)return new W(t);k("There is no block at index `"+e+"`","warn")}getById(e){const t=this.Editor.BlockManager.getBlockById(e);return void 0===t?(k("There is no block with id `"+e+"`","warn"),null):new W(t)}swap(e,t){b("`blocks.swap()` method is deprecated and will be removed in the next major release. Use `block.move()` method instead","info"),this.Editor.BlockManager.swap(e,t)}move(e,t){this.Editor.BlockManager.move(e,t)}delete(e=this.Editor.BlockManager.currentBlockIndex){try{const t=this.Editor.BlockManager.getBlockByIndex(e);this.Editor.BlockManager.removeBlock(t)}catch(e){return void k(e,"warn")}0===this.Editor.BlockManager.blocks.length&&this.Editor.BlockManager.insert(),this.Editor.BlockManager.currentBlock&&this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock,this.Editor.Caret.positions.END),this.Editor.Toolbar.close()}async clear(){await this.Editor.BlockManager.clear(!0),this.Editor.InlineToolbar.close()}async render(e){if(void 0===e||void 0===e.blocks)throw new Error("Incorrect data passed to the render() method");this.Editor.ModificationsObserver.disable(),await this.Editor.BlockManager.clear(),await this.Editor.Renderer.render(e.blocks),this.Editor.ModificationsObserver.enable()}renderFromHTML(e){return this.Editor.BlockManager.clear(),this.Editor.Paste.processText(e,!0)}stretchBlock(e,t=!0){D(!0,"blocks.stretchBlock()","BlockAPI");const o=this.Editor.BlockManager.getBlockByIndex(e);o&&(o.stretched=t)}insertNewBlock(){b("Method blocks.insertNewBlock() is deprecated and it will be removed in the next major release. Use blocks.insert() instead.","warn"),this.insert()}validateIndex(e){if("number"!=typeof e)throw new Error("Index should be a number");if(e<0)throw new Error("Index should be greater than or equal to 0");if(null===e)throw new Error("Index should be greater than or equal to 0")}},CaretAPI:class extends K{constructor(){super(...arguments),this.setToFirstBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>!!this.Editor.BlockManager.firstBlock&&(this.Editor.Caret.setToBlock(this.Editor.BlockManager.firstBlock,e,t),!0),this.setToLastBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>!!this.Editor.BlockManager.lastBlock&&(this.Editor.Caret.setToBlock(this.Editor.BlockManager.lastBlock,e,t),!0),this.setToPreviousBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>!!this.Editor.BlockManager.previousBlock&&(this.Editor.Caret.setToBlock(this.Editor.BlockManager.previousBlock,e,t),!0),this.setToNextBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>!!this.Editor.BlockManager.nextBlock&&(this.Editor.Caret.setToBlock(this.Editor.BlockManager.nextBlock,e,t),!0),this.setToBlock=(e,t=this.Editor.Caret.positions.DEFAULT,o=0)=>!!this.Editor.BlockManager.blocks[e]&&(this.Editor.Caret.setToBlock(this.Editor.BlockManager.blocks[e],t,o),!0),this.focus=(e=!1)=>e?this.setToLastBlock(this.Editor.Caret.positions.END):this.setToFirstBlock(this.Editor.Caret.positions.START)}get methods(){return{setToFirstBlock:this.setToFirstBlock,setToLastBlock:this.setToLastBlock,setToPreviousBlock:this.setToPreviousBlock,setToNextBlock:this.setToNextBlock,setToBlock:this.setToBlock,focus:this.focus}}},EventsAPI:class extends K{get methods(){return{emit:(e,t)=>this.emit(e,t),off:(e,t)=>this.off(e,t),on:(e,t)=>this.on(e,t)}}on(e,t){this.eventsDispatcher.on(e,t)}emit(e,t){this.eventsDispatcher.emit(e,t)}off(e,t){this.eventsDispatcher.off(e,t)}},I18nAPI:oe,API:class extends K{get methods(){return{blocks:this.Editor.BlocksAPI.methods,caret:this.Editor.CaretAPI.methods,events:this.Editor.EventsAPI.methods,listeners:this.Editor.ListenersAPI.methods,notifier:this.Editor.NotifierAPI.methods,sanitizer:this.Editor.SanitizerAPI.methods,saver:this.Editor.SaverAPI.methods,selection:this.Editor.SelectionAPI.methods,styles:this.Editor.StylesAPI.classes,toolbar:this.Editor.ToolbarAPI.methods,inlineToolbar:this.Editor.InlineToolbarAPI.methods,tooltip:this.Editor.TooltipAPI.methods,i18n:this.Editor.I18nAPI.methods,readOnly:this.Editor.ReadOnlyAPI.methods,ui:this.Editor.UiAPI.methods}}getMethodsForTool(e){return Object.assign(this.methods,{i18n:this.Editor.I18nAPI.getMethodsForTool(e)})}},InlineToolbarAPI:class extends K{get methods(){return{close:()=>this.close(),open:()=>this.open()}}open(){this.Editor.InlineToolbar.tryToShow()}close(){this.Editor.InlineToolbar.close()}},ListenersAPI:class extends K{get methods(){return{on:(e,t,o,n)=>this.on(e,t,o,n),off:(e,t,o,n)=>this.off(e,t,o,n),offById:e=>this.offById(e)}}on(e,t,o,n){return this.listeners.on(e,t,o,n)}off(e,t,o,n){this.listeners.off(e,t,o,n)}offById(e){this.listeners.offById(e)}},NotifierAPI:class extends K{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.notifier=new re}get methods(){return{show:e=>this.show(e)}}show(e){return this.notifier.show(e)}},ReadOnlyAPI:class extends K{get methods(){const e=()=>this.isEnabled;return{toggle:e=>this.toggle(e),get isEnabled(){return e()}}}toggle(e){return this.Editor.ReadOnly.toggle(e)}get isEnabled(){return this.Editor.ReadOnly.isEnabled}},SanitizerAPI:class extends K{get methods(){return{clean:(e,t)=>this.clean(e,t)}}clean(e,t){return he(e,t)}},SaverAPI:class extends K{get methods(){return{save:()=>this.save()}}save(){const e="Editor's content can not be saved in read-only mode";return this.Editor.ReadOnly.isEnabled?(k(e,"warn"),Promise.reject(new Error(e))):this.Editor.Saver.save()}},SelectionAPI:class extends K{get methods(){return{findParentTag:(e,t)=>this.findParentTag(e,t),expandToTag:e=>this.expandToTag(e)}}findParentTag(e,t){return(new V).findParentTag(e,t)}expandToTag(e){(new V).expandToTag(e)}},StylesAPI:class extends K{get classes(){return{block:"cdx-block",inlineToolButton:"ce-inline-tool",inlineToolButtonActive:"ce-inline-tool--active",input:"cdx-input",loader:"cdx-loader",button:"cdx-button",settingsButton:"cdx-settings-button",settingsButtonActive:"cdx-settings-button--active"}}},ToolbarAPI:class extends K{get methods(){return{close:()=>this.close(),open:()=>this.open(),toggleBlockSettings:e=>this.toggleBlockSettings(e),toggleToolbox:e=>this.toggleToolbox(e)}}open(){this.Editor.Toolbar.moveAndOpen()}close(){this.Editor.Toolbar.close()}toggleBlockSettings(e){-1!==this.Editor.BlockManager.currentBlockIndex?e??!this.Editor.BlockSettings.opened?(this.Editor.Toolbar.moveAndOpen(),this.Editor.BlockSettings.open()):this.Editor.BlockSettings.close():k("Could't toggle the Toolbar because there is no block selected ","warn")}toggleToolbox(e){-1!==this.Editor.BlockManager.currentBlockIndex?e??!this.Editor.Toolbar.toolbox.opened?(this.Editor.Toolbar.moveAndOpen(),this.Editor.Toolbar.toolbox.open()):this.Editor.Toolbar.toolbox.close():k("Could't toggle the Toolbox because there is no block selected ","warn")}},TooltipAPI:class extends K{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.tooltip=new be}destroy(){this.tooltip.destroy()}get methods(){return{show:(e,t,o)=>this.show(e,t,o),hide:()=>this.hide(),onHover:(e,t,o)=>this.onHover(e,t,o)}}show(e,t,o){this.tooltip.show(e,t,o)}hide(){this.tooltip.hide()}onHover(e,t,o){this.tooltip.onHover(e,t,o)}},UiAPI:class extends K{get methods(){return{nodes:this.editorNodes}}get editorNodes(){return{wrapper:this.Editor.UI.nodes.wrapper,redactor:this.Editor.UI.nodes.redactor}}},BlockSettings:class extends K{constructor(){super(...arguments),this.opened=!1,this.selection=new V,this.onPopoverClose=()=>{this.close()}}get events(){return{opened:"block-settings-opened",closed:"block-settings-closed"}}get CSS(){return{settings:"ce-settings"}}get flipper(){var e;return null==(e=this.popover)?void 0:e.flipper}make(){this.nodes.wrapper=H.make("div",[this.CSS.settings])}destroy(){this.removeAllNodes()}open(e=this.Editor.BlockManager.currentBlock){this.opened=!0,this.selection.save(),e.selected=!0,this.Editor.BlockSelection.clearCache();const[t,o]=e.getTunes();this.eventsDispatcher.emit(this.events.opened),this.popover=new Oe({searchable:!0,items:t.map((e=>this.resolveTuneAliases(e))),customContent:o,customContentFlippableItems:this.getControls(o),scopeElement:this.Editor.API.methods.ui.nodes.redactor,messages:{nothingFound:z.ui(ke.ui.popover,"Nothing found"),search:z.ui(ke.ui.popover,"Filter")}}),this.popover.on(Me.Close,this.onPopoverClose),this.nodes.wrapper.append(this.popover.getElement()),this.popover.show()}getElement(){return this.nodes.wrapper}close(){this.opened=!1,V.isAtEditor||this.selection.restore(),this.selection.clearSaved(),!this.Editor.CrossBlockSelection.isCrossBlockSelectionStarted&&this.Editor.BlockManager.currentBlock&&(this.Editor.BlockManager.currentBlock.selected=!1),this.eventsDispatcher.emit(this.events.closed),this.popover&&(this.popover.off(Me.Close,this.onPopoverClose),this.popover.destroy(),this.popover.getElement().remove(),this.popover=null)}getControls(e){const{StylesAPI:t}=this.Editor,o=e.querySelectorAll(`.${t.classes.settingsButton}, ${H.allInputsSelector}`);return Array.from(o)}resolveTuneAliases(e){const t=function(e,t){const o={};return Object.keys(e).forEach((n=>{const i=t[n];void 0!==i?o[i]=e[n]:o[n]=e[n]})),o}(e,{label:"title"});return e.confirmation&&(t.confirmation=this.resolveTuneAliases(e.confirmation)),t}},ConversionToolbar:Le,Toolbar:class extends K{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.toolboxInstance=null,this.tooltip=new be}get CSS(){return{toolbar:"ce-toolbar",content:"ce-toolbar__content",actions:"ce-toolbar__actions",actionsOpened:"ce-toolbar__actions--opened",toolbarOpened:"ce-toolbar--opened",openedToolboxHolderModifier:"codex-editor--toolbox-opened",plusButton:"ce-toolbar__plus",plusButtonShortcut:"ce-toolbar__plus-shortcut",settingsToggler:"ce-toolbar__settings-btn",settingsTogglerHidden:"ce-toolbar__settings-btn--hidden"}}get opened(){return this.nodes.wrapper.classList.contains(this.CSS.toolbarOpened)}get toolbox(){var e;return{opened:null==(e=this.toolboxInstance)?void 0:e.opened,close:()=>{var e;null==(e=this.toolboxInstance)||e.close()},open:()=>{null!==this.toolboxInstance?(this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.toolboxInstance.open()):b("toolbox.open() called before initialization is finished","warn")},toggle:()=>{null!==this.toolboxInstance?this.toolboxInstance.toggle():b("toolbox.toggle() called before initialization is finished","warn")},hasFocus:()=>{var e;return null==(e=this.toolboxInstance)?void 0:e.hasFocus()}}}get blockActions(){return{hide:()=>{this.nodes.actions.classList.remove(this.CSS.actionsOpened)},show:()=>{this.nodes.actions.classList.add(this.CSS.actionsOpened)}}}get blockTunesToggler(){return{hide:()=>this.nodes.settingsToggler.classList.add(this.CSS.settingsTogglerHidden),show:()=>this.nodes.settingsToggler.classList.remove(this.CSS.settingsTogglerHidden)}}toggleReadOnly(e){e?(this.destroy(),this.Editor.BlockSettings.destroy(),this.disableModuleBindings()):window.requestIdleCallback((()=>{this.drawUI(),this.enableModuleBindings()}),{timeout:2e3})}moveAndOpen(e=this.Editor.BlockManager.currentBlock){if(null===this.toolboxInstance)return void b("Can't open Toolbar since Editor initialization is not finished yet","warn");if(this.toolboxInstance.opened&&this.toolboxInstance.close(),this.Editor.BlockSettings.opened&&this.Editor.BlockSettings.close(),!e)return;this.hoveredBlock=e;const t=e.holder,{isMobile:o}=this.Editor.UI,n=e.pluginsContent,i=window.getComputedStyle(n),s=parseInt(i.paddingTop,10),r=t.offsetHeight;let a;a=o?t.offsetTop+r:t.offsetTop+s,this.nodes.wrapper.style.top=`${Math.floor(a)}px`,1===this.Editor.BlockManager.blocks.length&&e.isEmpty?this.blockTunesToggler.hide():this.blockTunesToggler.show(),this.open()}close(){var e;this.Editor.ReadOnly.isEnabled||(this.nodes.wrapper.classList.remove(this.CSS.toolbarOpened),this.blockActions.hide(),null==(e=this.toolboxInstance)||e.close(),this.Editor.BlockSettings.close())}open(e=!0){_((()=>{this.nodes.wrapper.classList.add(this.CSS.toolbarOpened),e?this.blockActions.show():this.blockActions.hide()}),50)()}make(){this.nodes.wrapper=H.make("div",this.CSS.toolbar),["content","actions"].forEach((e=>{this.nodes[e]=H.make("div",this.CSS[e])})),H.append(this.nodes.wrapper,this.nodes.content),H.append(this.nodes.content,this.nodes.actions),this.nodes.plusButton=H.make("div",this.CSS.plusButton,{innerHTML:''}),H.append(this.nodes.actions,this.nodes.plusButton),this.readOnlyMutableListeners.on(this.nodes.plusButton,"click",(()=>{this.tooltip.hide(!0),this.plusButtonClicked()}),!1);const e=H.make("div");e.appendChild(document.createTextNode(z.ui(ke.ui.toolbar.toolbox,"Add"))),e.appendChild(H.make("div",this.CSS.plusButtonShortcut,{textContent:"⇥ Tab"})),this.tooltip.onHover(this.nodes.plusButton,e,{hidingDelay:400}),this.nodes.settingsToggler=H.make("span",this.CSS.settingsToggler,{innerHTML:''}),H.append(this.nodes.actions,this.nodes.settingsToggler),this.tooltip.onHover(this.nodes.settingsToggler,z.ui(ke.ui.blockTunes.toggler,"Click to tune"),{hidingDelay:400}),H.append(this.nodes.actions,this.makeToolbox()),H.append(this.nodes.actions,this.Editor.BlockSettings.getElement()),H.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper)}makeToolbox(){return this.toolboxInstance=new $e({api:this.Editor.API.methods,tools:this.Editor.Tools.blockTools,i18nLabels:{filter:z.ui(ke.ui.popover,"Filter"),nothingFound:z.ui(ke.ui.popover,"Nothing found")}}),this.toolboxInstance.on(Ue.Opened,(()=>{this.Editor.UI.nodes.wrapper.classList.add(this.CSS.openedToolboxHolderModifier)})),this.toolboxInstance.on(Ue.Closed,(()=>{this.Editor.UI.nodes.wrapper.classList.remove(this.CSS.openedToolboxHolderModifier)})),this.toolboxInstance.on(Ue.BlockAdded,(({block:e})=>{const{BlockManager:t,Caret:o}=this.Editor,n=t.getBlockById(e.id);0===n.inputs.length&&(n===t.lastBlock?(t.insertAtEnd(),o.setToBlock(t.lastBlock)):o.setToBlock(t.nextBlock))})),this.toolboxInstance.make()}plusButtonClicked(){var e;this.Editor.BlockManager.currentBlock=this.hoveredBlock,null==(e=this.toolboxInstance)||e.toggle()}enableModuleBindings(){this.readOnlyMutableListeners.on(this.nodes.settingsToggler,"mousedown",(e=>{var t;e.stopPropagation(),this.settingsTogglerClicked(),null!=(t=this.toolboxInstance)&&t.opened&&this.toolboxInstance.close(),this.tooltip.hide(!0)}),!0),P()||this.eventsDispatcher.on(Ye,(e=>{var t;this.Editor.BlockSettings.opened||null!=(t=this.toolboxInstance)&&t.opened||this.moveAndOpen(e.block)}))}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}settingsTogglerClicked(){this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.BlockSettings.open(this.hoveredBlock)}drawUI(){this.Editor.BlockSettings.make(),this.make()}destroy(){this.removeAllNodes(),this.toolboxInstance&&this.toolboxInstance.destroy(),this.tooltip.destroy()}},InlineToolbar:class extends K{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.CSS={inlineToolbar:"ce-inline-toolbar",inlineToolbarShowed:"ce-inline-toolbar--showed",inlineToolbarLeftOriented:"ce-inline-toolbar--left-oriented",inlineToolbarRightOriented:"ce-inline-toolbar--right-oriented",inlineToolbarShortcut:"ce-inline-toolbar__shortcut",buttonsWrapper:"ce-inline-toolbar__buttons",actionsWrapper:"ce-inline-toolbar__actions",inlineToolButton:"ce-inline-tool",inputField:"cdx-input",focusedButton:"ce-inline-tool--focused",conversionToggler:"ce-inline-toolbar__dropdown",conversionTogglerArrow:"ce-inline-toolbar__dropdown-arrow",conversionTogglerHidden:"ce-inline-toolbar__dropdown--hidden",conversionTogglerContent:"ce-inline-toolbar__dropdown-content",togglerAndButtonsWrapper:"ce-inline-toolbar__toggler-and-button-wrapper"},this.opened=!1,this.toolbarVerticalMargin=P()?20:6,this.buttonsList=null,this.width=0,this.flipper=null,this.tooltip=new be}toggleReadOnly(e){e?(this.destroy(),this.Editor.ConversionToolbar.destroy()):window.requestIdleCallback((()=>{this.make()}),{timeout:2e3})}tryToShow(e=!1,t=!0){this.allowedToShow()?(this.move(),this.open(t),this.Editor.Toolbar.close()):e&&this.close()}move(){const e=V.rect,t=this.Editor.UI.nodes.wrapper.getBoundingClientRect(),o={x:e.x-t.left,y:e.y+e.height-t.top+this.toolbarVerticalMargin};e.width&&(o.x+=Math.floor(e.width/2));const n=o.x-this.width/2,i=o.x+this.width/2;this.nodes.wrapper.classList.toggle(this.CSS.inlineToolbarLeftOriented,nthis.Editor.UI.contentRect.right),this.nodes.wrapper.style.left=Math.floor(o.x)+"px",this.nodes.wrapper.style.top=Math.floor(o.y)+"px"}close(){this.opened&&(this.Editor.ReadOnly.isEnabled||(this.nodes.wrapper.classList.remove(this.CSS.inlineToolbarShowed),Array.from(this.toolsInstances.entries()).forEach((([e,t])=>{const o=this.getToolShortcut(e);o&&Pe.remove(this.Editor.UI.nodes.redactor,o),x(t.clear)&&t.clear()})),this.opened=!1,this.flipper.deactivate(),this.Editor.ConversionToolbar.close()))}open(e=!0){if(this.opened)return;this.addToolsFiltered(),this.nodes.wrapper.classList.add(this.CSS.inlineToolbarShowed),this.buttonsList=this.nodes.buttons.querySelectorAll(`.${this.CSS.inlineToolButton}`),this.opened=!0,e&&this.Editor.ConversionToolbar.hasTools()?this.setConversionTogglerContent():this.nodes.conversionToggler.hidden=!0;let t=Array.from(this.buttonsList);t.unshift(this.nodes.conversionToggler),t=t.filter((e=>!e.hidden)),this.flipper.activate(t)}containsNode(e){return this.nodes.wrapper.contains(e)}destroy(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes(),this.tooltip.destroy()}make(){this.nodes.wrapper=H.make("div",[this.CSS.inlineToolbar,...this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]]),this.nodes.togglerAndButtonsWrapper=H.make("div",this.CSS.togglerAndButtonsWrapper),this.nodes.buttons=H.make("div",this.CSS.buttonsWrapper),this.nodes.actions=H.make("div",this.CSS.actionsWrapper),this.listeners.on(this.nodes.wrapper,"mousedown",(e=>{e.target.closest(`.${this.CSS.actionsWrapper}`)||e.preventDefault()})),H.append(this.nodes.wrapper,[this.nodes.togglerAndButtonsWrapper,this.nodes.actions]),H.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper),this.addConversionToggler(),H.append(this.nodes.togglerAndButtonsWrapper,this.nodes.buttons),this.prepareConversionToolbar(),window.requestAnimationFrame((()=>{this.recalculateWidth()})),this.enableFlipper()}allowedToShow(){const e=V.get(),t=V.text;if(!e||!e.anchorNode||e.isCollapsed||t.length<1)return!1;const o=H.isElement(e.anchorNode)?e.anchorNode:e.anchorNode.parentElement;if(e&&["IMG","INPUT"].includes(o.tagName)||null===o.closest('[contenteditable="true"]'))return!1;const n=this.Editor.BlockManager.getBlock(e.anchorNode);return!!n&&0!==n.tool.inlineTools.size}recalculateWidth(){this.width=this.nodes.wrapper.offsetWidth}addConversionToggler(){this.nodes.conversionToggler=H.make("div",this.CSS.conversionToggler),this.nodes.conversionTogglerContent=H.make("div",this.CSS.conversionTogglerContent);const e=H.make("div",this.CSS.conversionTogglerArrow,{innerHTML:ve});this.nodes.conversionToggler.appendChild(this.nodes.conversionTogglerContent),this.nodes.conversionToggler.appendChild(e),this.nodes.togglerAndButtonsWrapper.appendChild(this.nodes.conversionToggler),this.listeners.on(this.nodes.conversionToggler,"click",(()=>{this.Editor.ConversionToolbar.toggle((e=>{!e&&this.opened?this.flipper.activate():this.opened&&this.flipper.deactivate()}))})),!1===P()&&this.tooltip.onHover(this.nodes.conversionToggler,z.ui(ke.ui.inlineToolbar.converter,"Convert to"),{placement:"top",hidingDelay:100})}async setConversionTogglerContent(){const{BlockManager:e}=this.Editor,{currentBlock:t}=e,o=t.name,n=t.tool.conversionConfig,i=n&&n.export;this.nodes.conversionToggler.hidden=!i,this.nodes.conversionToggler.classList.toggle(this.CSS.conversionTogglerHidden,!i);const s=await t.getActiveToolboxEntry()||{};this.nodes.conversionTogglerContent.innerHTML=s.icon||s.title||A(o)}prepareConversionToolbar(){const e=this.Editor.ConversionToolbar.make();H.append(this.nodes.wrapper,e)}addToolsFiltered(){const e=V.get(),t=this.Editor.BlockManager.getBlock(e.anchorNode);this.nodes.buttons.innerHTML="",this.nodes.actions.innerHTML="",this.toolsInstances=new Map,Array.from(t.tool.inlineTools.values()).forEach((e=>{this.addTool(e)})),this.recalculateWidth()}addTool(e){const t=e.create(),o=t.render();if(!o)return void b("Render method must return an instance of Node","warn",e.name);if(o.dataset.tool=e.name,this.nodes.buttons.appendChild(o),this.toolsInstances.set(e.name,t),x(t.renderActions)){const e=t.renderActions();this.nodes.actions.appendChild(e)}this.listeners.on(o,"click",(e=>{this.toolClicked(t),e.preventDefault()}));const n=this.getToolShortcut(e.name);if(n)try{this.enableShortcuts(t,n)}catch{}const i=H.make("div"),s=z.t(ke.toolNames,e.title||A(e.name));i.appendChild(H.text(s)),n&&i.appendChild(H.make("div",this.CSS.inlineToolbarShortcut,{textContent:L(n)})),!1===P()&&this.tooltip.onHover(o,i,{placement:"top",hidingDelay:100}),t.checkState(V.get())}getToolShortcut(e){const{Tools:t}=this.Editor,o=t.inlineTools.get(e),n=t.internal.inlineTools;return Array.from(n.keys()).includes(e)?this.inlineTools[e][Ke.Shortcut]:o.shortcut}enableShortcuts(e,t){Pe.add({name:t,handler:t=>{const{currentBlock:o}=this.Editor.BlockManager;o&&o.tool.enabledInlineTools&&(t.preventDefault(),this.toolClicked(e))},on:this.Editor.UI.nodes.redactor})}toolClicked(e){const t=V.range;e.surround(t),this.checkToolsState(),void 0!==e.renderActions&&this.flipper.deactivate()}checkToolsState(){this.toolsInstances.forEach((e=>{e.checkState(V.get())}))}get inlineTools(){const e={};return Array.from(this.Editor.Tools.inlineTools.entries()).forEach((([t,o])=>{e[t]=o.create()})),e}enableFlipper(){this.flipper=new Ce({focusedItemClass:this.CSS.focusedButton,allowedKeys:[l,a]})}},BlockEvents:class extends K{keydown(e){switch(this.beforeKeydownProcessing(e),e.keyCode){case r:this.backspace(e);break;case f:this.delete(e);break;case l:this.enter(e);break;case p:case u:this.arrowRightAndDown(e);break;case h:case d:this.arrowLeftAndUp(e);break;case a:this.tabPressed(e)}}beforeKeydownProcessing(e){this.needToolbarClosing(e)&&B(e.keyCode)&&(this.Editor.Toolbar.close(),this.Editor.ConversionToolbar.close(),e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||(this.Editor.BlockManager.clearFocused(),this.Editor.BlockSelection.clearSelection(e)))}keyup(e){e.shiftKey||this.Editor.UI.checkEmptiness()}tabPressed(e){this.Editor.BlockSelection.clearSelection(e);const{BlockManager:t,InlineToolbar:o,ConversionToolbar:n}=this.Editor,i=t.currentBlock;if(!i)return;const s=i.isEmpty,r=i.tool.isDefault&&s,a=!s&&n.opened,l=!s&&!V.isCollapsed&&o.opened;r?this.activateToolbox():!a&&!l&&this.activateBlockSettings()}dragOver(e){this.Editor.BlockManager.getBlockByChildNode(e.target).dropTarget=!0}dragLeave(e){this.Editor.BlockManager.getBlockByChildNode(e.target).dropTarget=!1}handleCommandC(e){const{BlockSelection:t}=this.Editor;t.anyBlockSelected&&t.copySelectedBlocks(e)}handleCommandX(e){const{BlockSelection:t,BlockManager:o,Caret:n}=this.Editor;t.anyBlockSelected&&t.copySelectedBlocks(e).then((()=>{const i=o.removeSelectedBlocks(),s=o.insertDefaultBlockAtIndex(i,!0);n.setToBlock(s,n.positions.START),t.clearSelection(e)}))}enter(e){const{BlockManager:t,UI:o}=this.Editor;if(t.currentBlock.tool.isLineBreaksEnabled||o.someToolbarOpened&&o.someFlipperButtonFocused||e.shiftKey)return;let n=this.Editor.BlockManager.currentBlock;this.Editor.Caret.isAtStart&&!this.Editor.BlockManager.currentBlock.hasMedia?this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex):n=this.Editor.Caret.isAtEnd?this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex+1):this.Editor.BlockManager.split(),this.Editor.Caret.setToBlock(n),this.Editor.Toolbar.moveAndOpen(n),e.preventDefault()}backspace(e){const{BlockManager:t,Caret:o}=this.Editor,{currentBlock:n,previousBlock:i}=t;if(V.isCollapsed&&o.isAtStart)if(e.preventDefault(),this.Editor.Toolbar.close(),n.currentInput===n.firstInput){if(null!==i)if(i.isEmpty)t.removeBlock(i);else if(n.isEmpty){t.removeBlock(n);const e=t.currentBlock;o.setToBlock(e,o.positions.END)}else Q(n,i)?this.mergeBlocks(i,n):o.setToBlock(i,o.positions.END)}else o.navigatePrevious()}delete(e){const{BlockManager:t,Caret:o}=this.Editor,{currentBlock:n,nextBlock:i}=t;if(V.isCollapsed&&o.isAtEnd)if(e.preventDefault(),this.Editor.Toolbar.close(),n.currentInput===n.lastInput){if(null!==i){if(!i.isEmpty)return n.isEmpty?(t.removeBlock(n),void o.setToBlock(i,o.positions.START)):void(Q(n,i)?this.mergeBlocks(n,i):o.setToBlock(i,o.positions.START));t.removeBlock(i)}}else o.navigateNext()}mergeBlocks(e,t){const{BlockManager:o,Caret:n,Toolbar:i}=this.Editor;n.createShadow(e.pluginsContent),o.mergeBlocks(e,t).then((()=>{window.requestAnimationFrame((()=>{n.restoreCaret(e.pluginsContent),e.pluginsContent.normalize(),i.close()}))}))}arrowRightAndDown(e){const t=Ce.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===a);if(this.Editor.UI.someToolbarOpened&&t)return;this.Editor.BlockManager.clearFocused(),this.Editor.Toolbar.close();const o=this.Editor.Caret.isAtEnd||this.Editor.BlockSelection.anyBlockSelected;e.shiftKey&&e.keyCode===p&&o?this.Editor.CrossBlockSelection.toggleBlockSelectedState():((e.keyCode===p||e.keyCode===u&&!this.isRtl?this.Editor.Caret.navigateNext():this.Editor.Caret.navigatePrevious())?e.preventDefault():_((()=>{this.Editor.BlockManager.currentBlock&&this.Editor.BlockManager.currentBlock.updateCurrentInput()}),20)(),this.Editor.BlockSelection.clearSelection(e))}arrowLeftAndUp(e){if(this.Editor.UI.someToolbarOpened){if(Ce.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===a))return;this.Editor.UI.closeAllToolbars()}this.Editor.BlockManager.clearFocused(),this.Editor.Toolbar.close();const t=this.Editor.Caret.isAtStart||this.Editor.BlockSelection.anyBlockSelected;e.shiftKey&&e.keyCode===h&&t?this.Editor.CrossBlockSelection.toggleBlockSelectedState(!1):((e.keyCode===h||e.keyCode===d&&!this.isRtl?this.Editor.Caret.navigatePrevious():this.Editor.Caret.navigateNext())?e.preventDefault():_((()=>{this.Editor.BlockManager.currentBlock&&this.Editor.BlockManager.currentBlock.updateCurrentInput()}),20)(),this.Editor.BlockSelection.clearSelection(e))}needToolbarClosing(e){const t=e.keyCode===l&&this.Editor.Toolbar.toolbox.opened,o=e.keyCode===l&&this.Editor.BlockSettings.opened,n=e.keyCode===l&&this.Editor.InlineToolbar.opened,i=e.keyCode===l&&this.Editor.ConversionToolbar.opened,s=e.keyCode===a;return!(e.shiftKey||s||t||o||n||i)}activateToolbox(){this.Editor.Toolbar.opened||this.Editor.Toolbar.moveAndOpen(),this.Editor.Toolbar.toolbox.open()}activateBlockSettings(){this.Editor.Toolbar.opened||(this.Editor.BlockManager.currentBlock.focused=!0,this.Editor.Toolbar.moveAndOpen()),this.Editor.BlockSettings.opened||this.Editor.BlockSettings.open()}},BlockManager:class extends K{constructor(){super(...arguments),this._currentBlockIndex=-1,this._blocks=null}get currentBlockIndex(){return this._currentBlockIndex}set currentBlockIndex(e){this._currentBlockIndex=e}get firstBlock(){return this._blocks[0]}get lastBlock(){return this._blocks[this._blocks.length-1]}get currentBlock(){return this._blocks[this.currentBlockIndex]}set currentBlock(e){this.currentBlockIndex=this.getBlockIndex(e)}get nextBlock(){return this.currentBlockIndex===this._blocks.length-1?null:this._blocks[this.currentBlockIndex+1]}get nextContentfulBlock(){return this.blocks.slice(this.currentBlockIndex+1).find((e=>!!e.inputs.length))}get previousContentfulBlock(){return this.blocks.slice(0,this.currentBlockIndex).reverse().find((e=>!!e.inputs.length))}get previousBlock(){return 0===this.currentBlockIndex?null:this._blocks[this.currentBlockIndex-1]}get blocks(){return this._blocks.array}get isEditorEmpty(){return this.blocks.every((e=>e.isEmpty))}prepare(){const e=new Je(this.Editor.UI.nodes.redactor);this._blocks=new Proxy(e,{set:Je.set,get:Je.get}),this.listeners.on(document,"copy",(e=>this.Editor.BlockEvents.handleCommandC(e)))}toggleReadOnly(e){e?this.disableModuleBindings():this.enableModuleBindings()}composeBlock({tool:e,data:t={},id:o,tunes:n={}}){const i=this.Editor.ReadOnly.isEnabled,s=this.Editor.Tools.blockTools.get(e),r=new te({id:o,data:t,tool:s,api:this.Editor.API,readOnly:i,tunesData:n},this.eventsDispatcher);return i||window.requestIdleCallback((()=>{this.bindBlockEvents(r)}),{timeout:2e3}),r}insert({id:e,tool:t=this.config.defaultBlock,data:o={},index:n,needToFocus:i=!0,replace:s=!1,tunes:r={}}={}){let a=n;void 0===a&&(a=this.currentBlockIndex+(s?0:1));const l=this.composeBlock({id:e,tool:t,data:o,tunes:r});return s&&this.blockDidMutated(Qe,this.getBlockByIndex(a),{index:a}),this._blocks.insert(a,l,s),this.blockDidMutated(et,l,{index:a}),i?this.currentBlockIndex=a:a<=this.currentBlockIndex&&this.currentBlockIndex++,l}insertMany(e,t=0){this._blocks.insertMany(e,t)}async update(e,t){const o=await e.data,n=this.composeBlock({id:e.id,tool:e.name,data:Object.assign({},o,t),tunes:e.tunes}),i=this.getBlockIndex(e);return this._blocks.replace(i,n),this.blockDidMutated(tt,n,{index:i}),n}replace(e,t,o){const n=this.getBlockIndex(e);this.insert({tool:t,data:o,index:n,replace:!0})}paste(e,t,o=!1){const n=this.insert({tool:e,replace:o});try{n.call(ee.ON_PASTE,t)}catch(t){b(`${e}: onPaste callback call is failed`,"error",t)}return n}insertDefaultBlockAtIndex(e,t=!1){const o=this.composeBlock({tool:this.config.defaultBlock});return this._blocks[e]=o,this.blockDidMutated(et,o,{index:e}),t?this.currentBlockIndex=e:e<=this.currentBlockIndex&&this.currentBlockIndex++,o}insertAtEnd(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}async mergeBlocks(e,t){const o=await t.data;S(o)||await e.mergeWith(o),this.removeBlock(t),this.currentBlockIndex=this._blocks.indexOf(e)}removeBlock(e,t=!0){return new Promise((o=>{const n=this._blocks.indexOf(e);if(!this.validateIndex(n))throw new Error("Can't find a Block to remove");e.destroy(),this._blocks.remove(n),this.blockDidMutated(Qe,e,{index:n}),this.currentBlockIndex>=n&&this.currentBlockIndex--,this.blocks.length?0===n&&(this.currentBlockIndex=0):(this.currentBlockIndex=-1,t&&this.insert()),o()}))}removeSelectedBlocks(){let e;for(let t=this.blocks.length-1;t>=0;t--)this.blocks[t].selected&&(this.removeBlock(this.blocks[t]),e=t);return e}removeAllBlocks(){for(let e=this.blocks.length-1;e>=0;e--)this._blocks.remove(e);this.currentBlockIndex=-1,this.insert(),this.currentBlock.firstInput.focus()}split(){const e=this.Editor.Caret.extractFragmentFromCaretPosition(),t=H.make("div");t.appendChild(e);const o={text:H.isEmpty(t)?"":t.innerHTML};return this.insert({data:o})}getBlockByIndex(e){return-1===e&&(e=this._blocks.length-1),this._blocks[e]}getBlockIndex(e){return this._blocks.indexOf(e)}getBlockById(e){return this._blocks.array.find((t=>t.id===e))}getBlock(e){H.isElement(e)||(e=e.parentNode);const t=this._blocks.nodes,o=e.closest(`.${te.CSS.wrapper}`),n=t.indexOf(o);if(n>=0)return this._blocks[n]}highlightCurrentNode(){this.clearFocused(),this.currentBlock.focused=!0}clearFocused(){this.blocks.forEach((e=>{e.focused=!1}))}setCurrentBlockByChildNode(e){H.isElement(e)||(e=e.parentNode);const t=e.closest(`.${te.CSS.wrapper}`);if(!t)return;const o=t.closest(`.${this.Editor.UI.CSS.editorWrapper}`);return null!=o&&o.isEqualNode(this.Editor.UI.nodes.wrapper)?(this.currentBlockIndex=this._blocks.nodes.indexOf(t),this.currentBlock.updateCurrentInput(),this.currentBlock):void 0}getBlockByChildNode(e){H.isElement(e)||(e=e.parentNode);const t=e.closest(`.${te.CSS.wrapper}`);return this.blocks.find((e=>e.holder===t))}swap(e,t){this._blocks.swap(e,t),this.currentBlockIndex=t}move(e,t=this.currentBlockIndex){isNaN(e)||isNaN(t)?b("Warning during 'move' call: incorrect indices provided.","warn"):this.validateIndex(e)&&this.validateIndex(t)?(this._blocks.move(e,t),this.currentBlockIndex=e,this.blockDidMutated("block-moved",this.currentBlock,{fromIndex:t,toIndex:e})):b("Warning during 'move' call: indices cannot be lower than 0 or greater than the amount of blocks.","warn")}async convert(e,t,o){if(!await e.save())throw new Error("Could not convert Block. Failed to extract original Block data.");const n=this.Editor.Tools.blockTools.get(t);if(!n)throw new Error(`Could not convert Block. Tool «${t}» not found.`);let i=function(e,t){const o=null==t?void 0:t.import;return x(o)?o(e):w(o)?{[o]:e}:(void 0!==o&&b("Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data."),{})}(he(await e.exportDataAsString(),n.sanitizeConfig),n.conversionConfig);o&&(i=Object.assign(i,o)),this.replace(e,n.name,i)}dropPointer(){this.currentBlockIndex=-1,this.clearFocused()}async clear(e=!1){const t=new ot;this.blocks.forEach((e=>{t.add((async()=>{await this.removeBlock(e,!1)}))})),await t.completed,this.dropPointer(),e&&this.insert(),this.Editor.UI.checkEmptiness()}async destroy(){await Promise.all(this.blocks.map((e=>e.destroy())))}bindBlockEvents(e){const{BlockEvents:t}=this.Editor;this.readOnlyMutableListeners.on(e.holder,"keydown",(e=>{t.keydown(e)})),this.readOnlyMutableListeners.on(e.holder,"keyup",(e=>{t.keyup(e)})),this.readOnlyMutableListeners.on(e.holder,"dragover",(e=>{t.dragOver(e)})),this.readOnlyMutableListeners.on(e.holder,"dragleave",(e=>{t.dragLeave(e)})),e.on("didMutated",(e=>this.blockDidMutated(tt,e,{index:this.getBlockIndex(e)})))}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}enableModuleBindings(){this.readOnlyMutableListeners.on(document,"cut",(e=>this.Editor.BlockEvents.handleCommandX(e))),this.blocks.forEach((e=>{this.bindBlockEvents(e)}))}validateIndex(e){return!(e<0||e>=this._blocks.length)}blockDidMutated(e,t,o){const n=new CustomEvent(e,{detail:{target:new W(t),...o}});return this.eventsDispatcher.emit(Z,{event:n}),t}},BlockSelection:class extends K{constructor(){super(...arguments),this.anyBlockSelectedCache=null,this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1}get sanitizerConfig(){return{p:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},ol:{},ul:{},li:{},br:!0,img:{src:!0,width:!0,height:!0},a:{href:!0},b:{},i:{},u:{}}}get allBlocksSelected(){const{BlockManager:e}=this.Editor;return e.blocks.every((e=>!0===e.selected))}set allBlocksSelected(e){const{BlockManager:t}=this.Editor;t.blocks.forEach((t=>{t.selected=e})),this.clearCache()}get anyBlockSelected(){const{BlockManager:e}=this.Editor;return null===this.anyBlockSelectedCache&&(this.anyBlockSelectedCache=e.blocks.some((e=>!0===e.selected))),this.anyBlockSelectedCache}get selectedBlocks(){return this.Editor.BlockManager.blocks.filter((e=>e.selected))}prepare(){this.selection=new V,Pe.add({name:"CMD+A",handler:e=>{const{BlockManager:t,ReadOnly:o}=this.Editor;if(o.isEnabled)return e.preventDefault(),void this.selectAllBlocks();t.currentBlock&&this.handleCommandA(e)},on:this.Editor.UI.nodes.redactor})}toggleReadOnly(){V.get().removeAllRanges(),this.allBlocksSelected=!1}unSelectBlockByIndex(e){const{BlockManager:t}=this.Editor;let o;o=isNaN(e)?t.currentBlock:t.getBlockByIndex(e),o.selected=!1,this.clearCache()}clearSelection(e,t=!1){const{BlockManager:o,Caret:n,RectangleSelection:i}=this.Editor;this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1;const s=e&&e instanceof KeyboardEvent,r=s&&B(e.keyCode);if(this.anyBlockSelected&&s&&r&&!V.isSelectionExists){const t=o.removeSelectedBlocks();o.insertDefaultBlockAtIndex(t,!0),n.setToBlock(o.currentBlock),_((()=>{const t=e.key;n.insertContentAtCaretPosition(t.length>1?"":t)}),20)()}this.Editor.CrossBlockSelection.clear(e),this.anyBlockSelected&&!i.isRectActivated()?(t&&this.selection.restore(),this.allBlocksSelected=!1):this.Editor.RectangleSelection.clearSelection()}copySelectedBlocks(e){e.preventDefault();const t=H.make("div");this.selectedBlocks.forEach((e=>{const o=he(e.holder.innerHTML,this.sanitizerConfig),n=H.make("p");n.innerHTML=o,t.appendChild(n)}));const o=Array.from(t.childNodes).map((e=>e.textContent)).join("\n\n"),n=t.innerHTML;return e.clipboardData.setData("text/plain",o),e.clipboardData.setData("text/html",n),Promise.all(this.selectedBlocks.map((e=>e.save()))).then((t=>{try{e.clipboardData.setData(this.Editor.Paste.MIME_TYPE,JSON.stringify(t))}catch{}}))}selectBlockByIndex(e){const{BlockManager:t}=this.Editor;let o;t.clearFocused(),o=isNaN(e)?t.currentBlock:t.getBlockByIndex(e),this.selection.save(),V.get().removeAllRanges(),o.selected=!0,this.clearCache(),this.Editor.InlineToolbar.close()}clearCache(){this.anyBlockSelectedCache=null}destroy(){Pe.remove(this.Editor.UI.nodes.redactor,"CMD+A")}handleCommandA(e){if(this.Editor.RectangleSelection.clearSelection(),H.isNativeInput(e.target)&&!this.readyToBlockSelection)return void(this.readyToBlockSelection=!0);const t=this.Editor.BlockManager.getBlock(e.target).inputs;t.length>1&&!this.readyToBlockSelection?this.readyToBlockSelection=!0:1!==t.length||this.needToSelectAll?this.needToSelectAll?(e.preventDefault(),this.selectAllBlocks(),this.needToSelectAll=!1,this.readyToBlockSelection=!1,this.Editor.ConversionToolbar.close()):this.readyToBlockSelection&&(e.preventDefault(),this.selectBlockByIndex(),this.needToSelectAll=!0):this.needToSelectAll=!0}selectAllBlocks(){this.selection.save(),V.get().removeAllRanges(),this.allBlocksSelected=!0,this.Editor.InlineToolbar.close()}},Caret:nt,CrossBlockSelection:class extends K{constructor(){super(...arguments),this.onMouseUp=()=>{this.listeners.off(document,"mouseover",this.onMouseOver),this.listeners.off(document,"mouseup",this.onMouseUp)},this.onMouseOver=e=>{const{BlockManager:t,BlockSelection:o}=this.Editor,n=t.getBlockByChildNode(e.relatedTarget)||this.lastSelectedBlock,i=t.getBlockByChildNode(e.target);if(n&&i&&i!==n){if(n===this.firstSelectedBlock)return V.get().removeAllRanges(),n.selected=!0,i.selected=!0,void o.clearCache();if(i===this.firstSelectedBlock)return n.selected=!1,i.selected=!1,void o.clearCache();this.Editor.InlineToolbar.close(),this.toggleBlocksSelectedState(n,i),this.lastSelectedBlock=i}}}async prepare(){this.listeners.on(document,"mousedown",(e=>{this.enableCrossBlockSelection(e)}))}watchSelection(e){if(e.button!==g)return;const{BlockManager:t}=this.Editor;this.firstSelectedBlock=t.getBlock(e.target),this.lastSelectedBlock=this.firstSelectedBlock,this.listeners.on(document,"mouseover",this.onMouseOver),this.listeners.on(document,"mouseup",this.onMouseUp)}get isCrossBlockSelectionStarted(){return!!this.firstSelectedBlock&&!!this.lastSelectedBlock}toggleBlockSelectedState(e=!0){const{BlockManager:t,BlockSelection:o}=this.Editor;this.lastSelectedBlock||(this.lastSelectedBlock=this.firstSelectedBlock=t.currentBlock),this.firstSelectedBlock===this.lastSelectedBlock&&(this.firstSelectedBlock.selected=!0,o.clearCache(),V.get().removeAllRanges());const n=t.blocks.indexOf(this.lastSelectedBlock)+(e?1:-1),i=t.blocks[n];i&&(this.lastSelectedBlock.selected!==i.selected?(i.selected=!0,o.clearCache()):(this.lastSelectedBlock.selected=!1,o.clearCache()),this.lastSelectedBlock=i,this.Editor.InlineToolbar.close(),i.holder.scrollIntoView({block:"nearest"}))}clear(e){const{BlockManager:t,BlockSelection:o,Caret:n}=this.Editor,i=t.blocks.indexOf(this.firstSelectedBlock),s=t.blocks.indexOf(this.lastSelectedBlock);if(o.anyBlockSelected&&i>-1&&s>-1)if(e&&e instanceof KeyboardEvent)switch(e.keyCode){case p:case u:n.setToBlock(t.blocks[Math.max(i,s)],n.positions.END);break;case h:case d:n.setToBlock(t.blocks[Math.min(i,s)],n.positions.START);break;default:n.setToBlock(t.blocks[Math.max(i,s)],n.positions.END)}else n.setToBlock(t.blocks[Math.max(i,s)],n.positions.END);this.firstSelectedBlock=this.lastSelectedBlock=null}enableCrossBlockSelection(e){const{UI:t}=this.Editor;V.isCollapsed||this.Editor.BlockSelection.clearSelection(e),t.nodes.redactor.contains(e.target)?this.watchSelection(e):this.Editor.BlockSelection.clearSelection(e)}toggleBlocksSelectedState(e,t){const{BlockManager:o,BlockSelection:n}=this.Editor,i=o.blocks.indexOf(e),s=o.blocks.indexOf(t),r=e.selected!==t.selected;for(let a=Math.min(i,s);a<=Math.max(i,s);a++){const i=o.blocks[a];i!==this.firstSelectedBlock&&i!==(r?e:t)&&(o.blocks[a].selected=!o.blocks[a].selected,n.clearCache())}}},DragNDrop:class extends K{constructor(){super(...arguments),this.isStartedAtEditor=!1}toggleReadOnly(e){e?this.disableModuleBindings():this.enableModuleBindings()}enableModuleBindings(){const{UI:e}=this.Editor;this.readOnlyMutableListeners.on(e.nodes.holder,"drop",(async e=>{await this.processDrop(e)}),!0),this.readOnlyMutableListeners.on(e.nodes.holder,"dragstart",(()=>{this.processDragStart()})),this.readOnlyMutableListeners.on(e.nodes.holder,"dragover",(e=>{this.processDragOver(e)}),!0)}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}async processDrop(e){const{BlockManager:t,Caret:o,Paste:n}=this.Editor;e.preventDefault(),t.blocks.forEach((e=>{e.dropTarget=!1})),V.isAtEditor&&!V.isCollapsed&&this.isStartedAtEditor&&document.execCommand("delete"),this.isStartedAtEditor=!1;const i=t.setCurrentBlockByChildNode(e.target);if(i)this.Editor.Caret.setToBlock(i,o.positions.END);else{const e=t.setCurrentBlockByChildNode(t.lastBlock.holder);this.Editor.Caret.setToBlock(e,o.positions.END)}await n.processDataTransfer(e.dataTransfer,!0)}processDragStart(){V.isAtEditor&&!V.isCollapsed&&(this.isStartedAtEditor=!0),this.Editor.InlineToolbar.close()}processDragOver(e){e.preventDefault()}},ModificationsObserver:class extends K{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.disabled=!1,this.batchingTimeout=null,this.batchingOnChangeQueue=new Map,this.batchTime=400,this.mutationObserver=new MutationObserver((e=>{this.redactorChanged(e)})),this.eventsDispatcher.on(Z,(e=>{this.particularBlockChanged(e.event)})),this.eventsDispatcher.on(G,(()=>{this.disable()})),this.eventsDispatcher.on(J,(()=>{this.enable()}))}enable(){this.mutationObserver.observe(this.Editor.UI.nodes.redactor,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),this.disabled=!1}disable(){this.mutationObserver.disconnect(),this.disabled=!0}particularBlockChanged(e){this.disabled||!x(this.config.onChange)||(this.batchingOnChangeQueue.set(`block:${e.detail.target.id}:event:${e.type}`,e),this.batchingTimeout&&clearTimeout(this.batchingTimeout),this.batchingTimeout=setTimeout((()=>{let e;e=1===this.batchingOnChangeQueue.size?this.batchingOnChangeQueue.values().next().value:Array.from(this.batchingOnChangeQueue.values()),this.config.onChange&&this.config.onChange(this.Editor.API.methods,e),this.batchingOnChangeQueue.clear()}),this.batchTime))}redactorChanged(e){this.eventsDispatcher.emit(q,{mutations:e})}},Paste:st,ReadOnly:class extends K{constructor(){super(...arguments),this.toolsDontSupportReadOnly=[],this.readOnlyEnabled=!1}get isEnabled(){return this.readOnlyEnabled}async prepare(){const{Tools:e}=this.Editor,{blockTools:t}=e,o=[];Array.from(t.entries()).forEach((([e,t])=>{t.isReadOnlySupported||o.push(e)})),this.toolsDontSupportReadOnly=o,this.config.readOnly&&o.length>0&&this.throwCriticalError(),this.toggle(this.config.readOnly)}async toggle(e=!this.readOnlyEnabled){e&&this.toolsDontSupportReadOnly.length>0&&this.throwCriticalError();const t=this.readOnlyEnabled;this.readOnlyEnabled=e;for(const t in this.Editor)this.Editor[t].toggleReadOnly&&this.Editor[t].toggleReadOnly(e);if(t===e)return this.readOnlyEnabled;const o=await this.Editor.Saver.save();return await this.Editor.BlockManager.clear(),await this.Editor.Renderer.render(o.blocks),this.readOnlyEnabled}throwCriticalError(){throw new $(`To enable read-only mode all connected tools should support it. Tools ${this.toolsDontSupportReadOnly.join(", ")} don't support read-only mode.`)}},RectangleSelection:rt,Renderer:class extends K{async render(e){return new Promise((t=>{const{Tools:o,BlockManager:n}=this.Editor,i=e.map((({type:e,data:t,tunes:i,id:s})=>{let r;!1===o.available.has(e)&&(k(`Tool «${e}» is not found. Check 'tools' property at the Editor.js config.`,"warn"),t=this.composeStubDataForTool(e,t,s),e=o.stubTool);try{r=n.composeBlock({id:s,tool:e,data:t,tunes:i})}catch(a){b(`Block «${e}» skipped because of plugins error`,"error",{data:t,error:a}),t=this.composeStubDataForTool(e,t,s),e=o.stubTool,r=n.composeBlock({id:s,tool:e,data:t,tunes:i})}return r}));n.insertMany(i),window.requestIdleCallback((()=>{t()}),{timeout:2e3})}))}composeStubDataForTool(e,t,o){const{Tools:n}=this.Editor;let i=e;if(n.unavailable.has(e)){const t=n.unavailable.get(e).toolbox;void 0!==t&&void 0!==t[0].title&&(i=t[0].title)}return{savedData:{id:o,type:e,data:t},title:i}}},Saver:class extends K{async save(){const{BlockManager:e,Tools:t}=this.Editor,o=e.blocks,n=[];try{o.forEach((e=>{n.push(this.getSavedData(e))}));const e=await Promise.all(n),i=await de(e,(e=>t.blockTools.get(e).sanitizeConfig));return this.makeOutput(i)}catch(e){k("Saving failed due to the Error %o","error",e)}}async getSavedData(e){const t=await e.save(),o=t&&await e.validate(t.data);return{...t,isValid:o}}makeOutput(e){const t=[];return e.forEach((({id:e,tool:o,data:n,tunes:i,isValid:s})=>{if(!s)return void b(`Block «${o}» skipped because saved data is invalid`);if(o===this.Editor.Tools.stubTool)return void t.push(n);const r={id:e,type:o,data:n,...!S(i)&&{tunes:i}};t.push(r)})),{time:+new Date,blocks:t,version:"2.28.0"}}},Tools:Tt,UI:class extends K{constructor(){super(...arguments),this.isMobile=!1,this.contentRectCache=void 0,this.resizeDebouncer=function(e,t,o){let n;return(...i)=>{const s=this,r=o&&!n;window.clearTimeout(n),n=window.setTimeout((()=>{n=null,o||e.apply(s,i)}),t),r&&e.apply(s,i)}}((()=>{this.windowResize()}),200)}get CSS(){return{editorWrapper:"codex-editor",editorWrapperNarrow:"codex-editor--narrow",editorZone:"codex-editor__redactor",editorZoneHidden:"codex-editor__redactor--hidden",editorEmpty:"codex-editor--empty",editorRtlFix:"codex-editor--rtl"}}get contentRect(){if(this.contentRectCache)return this.contentRectCache;const e=this.nodes.wrapper.querySelector(`.${te.CSS.content}`);return e?(this.contentRectCache=e.getBoundingClientRect(),this.contentRectCache):{width:650,left:0,right:0}}async prepare(){this.checkIsMobile(),this.make(),this.loadStyles()}toggleReadOnly(e){e?this.disableModuleBindings():this.enableModuleBindings()}checkEmptiness(){const{BlockManager:e}=this.Editor;this.nodes.wrapper.classList.toggle(this.CSS.editorEmpty,e.isEditorEmpty)}get someToolbarOpened(){const{Toolbar:e,BlockSettings:t,InlineToolbar:o,ConversionToolbar:n}=this.Editor;return t.opened||o.opened||n.opened||e.toolbox.opened}get someFlipperButtonFocused(){return!!this.Editor.Toolbar.toolbox.hasFocus()||Object.entries(this.Editor).filter((([e,t])=>t.flipper instanceof Ce)).some((([e,t])=>t.flipper.hasFocus()))}destroy(){this.nodes.holder.innerHTML=""}closeAllToolbars(){const{Toolbar:e,BlockSettings:t,InlineToolbar:o,ConversionToolbar:n}=this.Editor;t.close(),o.close(),n.close(),e.toolbox.close()}checkIsMobile(){this.isMobile=window.innerWidth<650}make(){this.nodes.holder=H.getHolder(this.config.holder),this.nodes.wrapper=H.make("div",[this.CSS.editorWrapper,...this.isRtl?[this.CSS.editorRtlFix]:[]]),this.nodes.redactor=H.make("div",this.CSS.editorZone),this.nodes.holder.offsetWidth{this.redactorClicked(e)}),!1),this.readOnlyMutableListeners.on(this.nodes.redactor,"mousedown",(e=>{this.documentTouched(e)}),!0),this.readOnlyMutableListeners.on(this.nodes.redactor,"touchstart",(e=>{this.documentTouched(e)}),!0),this.readOnlyMutableListeners.on(document,"keydown",(e=>{this.documentKeydown(e)}),!0),this.readOnlyMutableListeners.on(document,"mousedown",(e=>{this.documentClicked(e)}),!0),this.readOnlyMutableListeners.on(document,"selectionchange",(()=>{this.selectionChanged()}),!0),this.readOnlyMutableListeners.on(window,"resize",(()=>{this.resizeDebouncer()}),{passive:!0}),this.watchBlockHoveredEvents()}watchBlockHoveredEvents(){let e;this.readOnlyMutableListeners.on(this.nodes.redactor,"mousemove",M((t=>{const o=t.target.closest(".ce-block");this.Editor.BlockSelection.anyBlockSelected||o&&e!==o&&(e=o,this.eventsDispatcher.emit(Ye,{block:this.Editor.BlockManager.getBlockByChildNode(o)}))}),20),{passive:!0})}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}windowResize(){this.contentRectCache=null,this.checkIsMobile()}documentKeydown(e){switch(e.keyCode){case l:this.enterPressed(e);break;case r:case f:this.backspacePressed(e);break;case c:this.escapePressed(e);break;default:this.defaultBehaviour(e)}}defaultBehaviour(e){const{currentBlock:t}=this.Editor.BlockManager,o=e.target.closest(`.${this.CSS.editorWrapper}`),n=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;void 0===t||null!==o?o||t&&n||(this.Editor.BlockManager.dropPointer(),this.Editor.Toolbar.close()):this.Editor.BlockEvents.keydown(e)}backspacePressed(e){const{BlockManager:t,BlockSelection:o,Caret:n}=this.Editor;if(o.anyBlockSelected&&!V.isSelectionExists){const i=t.removeSelectedBlocks();n.setToBlock(t.insertDefaultBlockAtIndex(i,!0),n.positions.START),o.clearSelection(e),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}}escapePressed(e){this.Editor.BlockSelection.clearSelection(e),this.Editor.Toolbar.toolbox.opened?(this.Editor.Toolbar.toolbox.close(),this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock)):this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.ConversionToolbar.opened?this.Editor.ConversionToolbar.close():this.Editor.InlineToolbar.opened?this.Editor.InlineToolbar.close():this.Editor.Toolbar.close()}enterPressed(e){const{BlockManager:t,BlockSelection:o}=this.Editor,n=t.currentBlockIndex>=0;if(o.anyBlockSelected&&!V.isSelectionExists)return o.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),void e.stopPropagation();if(!this.someToolbarOpened&&n&&"BODY"===e.target.tagName){const e=this.Editor.BlockManager.insert();this.Editor.Caret.setToBlock(e),this.Editor.BlockManager.highlightCurrentNode(),this.Editor.Toolbar.moveAndOpen(e)}this.Editor.BlockSelection.clearSelection(e)}documentClicked(e){if(!e.isTrusted)return;const t=e.target;this.nodes.holder.contains(t)||V.isAtEditor||(this.Editor.BlockManager.dropPointer(),this.Editor.Toolbar.close());const o=this.Editor.BlockSettings.nodes.wrapper.contains(t),n=this.Editor.Toolbar.nodes.settingsToggler.contains(t),i=o||n;if(this.Editor.BlockSettings.opened&&!i){this.Editor.BlockSettings.close();const e=this.Editor.BlockManager.getBlockByChildNode(t);this.Editor.Toolbar.moveAndOpen(e)}this.Editor.BlockSelection.clearSelection(e)}documentTouched(e){let t=e.target;if(t===this.nodes.redactor){const o=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,n=e instanceof MouseEvent?e.clientY:e.touches[0].clientY;t=document.elementFromPoint(o,n)}try{this.Editor.BlockManager.setCurrentBlockByChildNode(t),this.Editor.BlockManager.highlightCurrentNode()}catch{this.Editor.RectangleSelection.isRectActivated()||this.Editor.Caret.setToTheLastBlock()}this.Editor.Toolbar.moveAndOpen()}redactorClicked(e){const{BlockSelection:t}=this.Editor;if(!V.isCollapsed)return;const o=()=>{e.stopImmediatePropagation(),e.stopPropagation()},n=e.target,i=e.metaKey||e.ctrlKey;if(H.isAnchor(n)&&i){o();const e=function(e){try{return new URL(e).href}catch{}return"//"===e.substring(0,2)?window.location.protocol+e:window.location.origin+e}(n.getAttribute("href"));return void function(e){window.open(e,"_blank")}(e)}const s=this.Editor.BlockManager.getBlockByIndex(-1),r=H.offset(s.holder).bottom,a=e.pageY;if(e.target instanceof Element&&e.target.isEqualNode(this.nodes.redactor)&&!t.anyBlockSelected&&r{t=e,o=n})),Promise.resolve().then((async()=>{this.configuration=e,this.validate(),this.init(),await this.start(),await this.render();const{BlockManager:o,Caret:n,UI:i,ModificationsObserver:s}=this.moduleInstances;i.checkEmptiness(),s.enable(),this.configuration.autofocus&&(n.setToBlock(o.blocks[0],n.positions.START),o.highlightCurrentNode()),t()})).catch((e=>{b(`Editor.js is not ready because of ${e}`,"error"),o(e)}))}set configuration(e){var t,o;y(e)?this.config={...e}:this.config={holder:e},D(!!this.config.holderId,"config.holderId","config.holder"),this.config.holderId&&!this.config.holder&&(this.config.holder=this.config.holderId,this.config.holderId=null),null==this.config.holder&&(this.config.holder="editorjs"),this.config.logLevel||(this.config.logLevel=s.VERBOSE),function(e){m.logLevel=e}(this.config.logLevel),D(!!this.config.initialBlock,"config.initialBlock","config.defaultBlock"),this.config.defaultBlock=this.config.defaultBlock||this.config.initialBlock||"paragraph",this.config.minHeight=void 0!==this.config.minHeight?this.config.minHeight:300;const n={type:this.config.defaultBlock,data:{}};this.config.placeholder=this.config.placeholder||!1,this.config.sanitizer=this.config.sanitizer||{p:!0,b:!0,a:!0},this.config.hideToolbar=!!this.config.hideToolbar&&this.config.hideToolbar,this.config.tools=this.config.tools||{},this.config.i18n=this.config.i18n||{},this.config.data=this.config.data||{blocks:[]},this.config.onReady=this.config.onReady||(()=>{}),this.config.onChange=this.config.onChange||(()=>{}),this.config.inlineToolbar=void 0===this.config.inlineToolbar||this.config.inlineToolbar,(S(this.config.data)||!this.config.data.blocks||0===this.config.data.blocks.length)&&(this.config.data={blocks:[n]}),this.config.readOnly=this.config.readOnly||!1,null!=(t=this.config.i18n)&&t.messages&&z.setDictionary(this.config.i18n.messages),this.config.i18n.direction=(null==(o=this.config.i18n)?void 0:o.direction)||"ltr"}get configuration(){return this.config}validate(){const{holderId:e,holder:t}=this.config;if(e&&t)throw Error("«holderId» and «holder» param can't assign at the same time.");if(w(t)&&!H.get(t))throw Error(`element with ID «${t}» is missing. Pass correct holder's ID.`);if(t&&y(t)&&!H.isElement(t))throw Error("«holder» value must be an Element node")}init(){this.constructModules(),this.configureModules()}async start(){await["Tools","UI","BlockManager","Paste","BlockSelection","RectangleSelection","CrossBlockSelection","ReadOnly"].reduce(((e,t)=>e.then((async()=>{try{await this.moduleInstances[t].prepare()}catch(e){if(e instanceof $)throw new Error(e.message);b(`Module ${t} was skipped because of %o`,"warn",e)}}))),Promise.resolve())}render(){return this.moduleInstances.Renderer.render(this.config.data.blocks)}constructModules(){Object.entries(_t).forEach((([e,t])=>{try{this.moduleInstances[e]=new t({config:this.configuration,eventsDispatcher:this.eventsDispatcher})}catch(t){b("[constructModules]",`Module ${e} skipped because`,"error",t)}}))}configureModules(){for(const e in this.moduleInstances)Object.prototype.hasOwnProperty.call(this.moduleInstances,e)&&(this.moduleInstances[e].state=this.getModulesDiff(e))}getModulesDiff(e){const t={};for(const o in this.moduleInstances)o!==e&&(t[o]=this.moduleInstances[o]);return t}}
+/**
+ * Editor.js
+ *
+ * @license Apache-2.0
+ * @see Editor.js
+ * @author CodeX Team
+ */class At{static get version(){return"2.28.0"}constructor(e){let t=()=>{};y(e)&&x(e.onReady)&&(t=e.onReady);const o=new Mt(e);this.isReady=o.isReady.then((()=>{this.exportAPI(o),t()}))}exportAPI(e){["configuration"].forEach((t=>{this[t]=e[t]})),this.destroy=()=>{Object.values(e.moduleInstances).forEach((e=>{x(e.destroy)&&e.destroy(),e.listeners.removeAll()})),e=null;for(const e in this)Object.prototype.hasOwnProperty.call(this,e)&&delete this[e];Object.setPrototypeOf(this,null)},Object.setPrototypeOf(this,e.moduleInstances.API.methods),delete this.exportAPI,Object.entries({blocks:{clear:"clear",render:"render"},caret:{focus:"focus"},events:{on:"on",off:"off",emit:"emit"},saver:{save:"save"}}).forEach((([t,o])=>{Object.entries(o).forEach((([o,n])=>{this[n]=e.moduleInstances.API.methods[t][o]}))}))}}}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={id:n,exports:{}};return e[n].call(s.exports,s,s.exports,o),s.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var n=o(1384),i=((Rock="undefined"==typeof Rock?{}:Rock).UI=Rock.UI||{}).StructuredContentEditor=Rock.UI.StructuredContentEditor||{};for(var s in n)i[s]=n[s];n.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
+//# sourceMappingURL=editor.js.map
\ No newline at end of file
diff --git a/RockWeb/Themes/Fuse/Assets/Images/newspring-logo.png b/RockWeb/Themes/Fuse/Assets/Images/newspring-logo.png
new file mode 100644
index 00000000000..3b4513056b1
Binary files /dev/null and b/RockWeb/Themes/Fuse/Assets/Images/newspring-logo.png differ
diff --git a/RockWeb/Themes/Fuse/Layouts/Checkin.aspx b/RockWeb/Themes/Fuse/Layouts/Checkin.aspx
new file mode 100644
index 00000000000..87ecff8e34f
--- /dev/null
+++ b/RockWeb/Themes/Fuse/Layouts/Checkin.aspx
@@ -0,0 +1,9 @@
+<%@ Page Language="C#" MasterPageFile="Site.Master" AutoEventWireup="true" Inherits="Rock.Web.UI.RockPage" %>
+
+
+
+