From 74dbfafc1adb859be6492d74f79047c5b467ff93 Mon Sep 17 00:00:00 2001 From: Muhammad Jawad Date: Mon, 5 Jul 2021 11:10:46 +0500 Subject: [PATCH] changed the upload url --- src/public/vendor/grapesjs/editor.js | 12231 +--------------- .../vendor/grapesjs/editor.js.LICENSE.txt | 26 + src/resources/js/gjs/gjs.js | 2 +- 3 files changed, 29 insertions(+), 12230 deletions(-) create mode 100644 src/public/vendor/grapesjs/editor.js.LICENSE.txt diff --git a/src/public/vendor/grapesjs/editor.js b/src/public/vendor/grapesjs/editor.js index 7c59cdd..c6040bd 100644 --- a/src/public/vendor/grapesjs/editor.js +++ b/src/public/vendor/grapesjs/editor.js @@ -1,12229 +1,2 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ "./src/resources/js/gjs/gjs.js": -/*!*************************************!*\ - !*** ./src/resources/js/gjs/gjs.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var grapesjs_dist_css_grapes_min_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grapesjs/dist/css/grapes.min.css */ "./node_modules/grapesjs/dist/css/grapes.min.css"); -/* harmony import */ var grapesjs_blocks_basic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! grapesjs-blocks-basic */ "./node_modules/grapesjs-blocks-basic/dist/grapesjs-blocks-basic.min.js"); -/* harmony import */ var grapesjs_blocks_basic__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(grapesjs_blocks_basic__WEBPACK_IMPORTED_MODULE_1__); - - -var grapesjs = __webpack_require__(/*! grapesjs */ "./node_modules/grapesjs/dist/grapes.min.js"); - - // import bootstrap4 from 'grapesjs-blocks-bootstrap4'; - -var toastr = __webpack_require__(/*! toastr */ "./node_modules/toastr/toastr.js"); - -var config = window.editorConfig; -delete window.editorConfig; -config.plugins = [(grapesjs_blocks_basic__WEBPACK_IMPORTED_MODULE_1___default()) // bootstrap4 -]; -config.pluginsOpts = { - 'grapesjs-blocks-basic': {} // 'grapesjs-blocks-bootstrap4': {} - -}; -var editor = grapesjs.init(config); -var loader = document.getElementById('loader'); - -var showLoader = function showLoader() { - if (loader) { - loader.style.display = 'flex'; - } -}; - -var hideLoader = function hideLoader() { - if (loader) { - loader.style.display = 'none'; - } -}; - -editor.on('load', function () { - hideLoader(); -}); -var pfx = editor.getConfig().stylePrefix; -var modal = editor.Modal; -var cmdm = editor.Commands; -var codeViewer = editor.CodeManager.getViewer('CodeMirror').clone(); -var pnm = editor.Panels; -var container = document.createElement('div'); -var btnEdit = document.createElement('button'); -codeViewer.set({ - codeName: 'htmlmixed', - readOnly: 0, - theme: 'hopscotch', - autoBeautify: true, - autoCloseTags: true, - autoCloseBrackets: true, - lineWrapping: true, - styleActiveLine: true, - smartIndent: true, - indentWithTabs: true -}); -btnEdit.innerHTML = 'Save'; -btnEdit.style["float"] = 'right'; -btnEdit.style.backgroundColor = '#090'; -btnEdit.className = pfx + 'btn-prim ' + pfx + 'btn-import'; - -btnEdit.onclick = function () { - var code = codeViewer.editor.getValue(); - editor.DomComponents.getWrapper().set('content', ''); - editor.setComponents(code.trim()); - modal.close(); - toastr.success('Html Saved', 'Success'); -}; - -cmdm.add('html-edit', { - run: function run(editor, sender) { - sender && sender.set('active', 0); - var viewer = codeViewer.editor; - modal.setTitle('Edit code'); - - if (!viewer) { - var txtarea = document.createElement('textarea'); - container.appendChild(txtarea); - container.appendChild(btnEdit); - codeViewer.init(txtarea); - viewer = codeViewer.editor; - } - - var InnerHtml = editor.getHtml(); - var Css = editor.getCss(); - modal.setContent(''); - modal.setContent(container); - codeViewer.setContent(InnerHtml + "'); - modal.open(); - viewer.refresh(); - } -}); -pnm.addButton('options', [{ - id: 'edit', - className: 'fa fa-edit', - command: 'html-edit', - attributes: { - title: 'Edit' - } -}]); -pnm.addButton('options', [{ - id: 'upload-file', - className: 'fa fa-upload', - command: function command(editor) { - modal.setTitle('Upload File'); - modal.backdrop = false; - var uploadFileContainer = document.createElement('div'); - uploadFileContainer.style.position = 'relative'; - uploadFileContainer.style.overflow = 'hidden'; - var uploadedLink = document.createElement('input'); - uploadedLink.type = 'text'; - uploadedLink.style.width = "100%"; - uploadedLink.readOnly = 'readonly'; - var loader = document.createElement('div'); - loader.style.display = 'none'; - loader.style.alignItems = 'center'; - loader.style.justifyContent = 'center'; - loader.style.width = '100%'; - loader.style.position = 'absolute'; - loader.style.top = '0'; - loader.style.left = '0'; - loader.style.height = '100%'; - loader.style.zIndex = '100'; - loader.style.backgroundColor = '#727272e0'; - loader.innerHTML = ''; - uploadFileContainer.append(loader); - var input = document.createElement('input'); - input.type = "file"; - input.style.width = '100%'; - - input.onchange = function (event) { - if (event.target.files[0] == undefined) { - return; - } - - loader.style.display = 'flex'; - var formData = new FormData(); - formData.append("file[]", event.target.files[0]); - uploadFileContainer.disabled = 'true'; - fetch('/asset/store', { - method: "POST", - headers: { - 'X-Requested-With': 'XMLHttpRequest' - }, - body: formData - }).then(function (resp) { - return resp.json(); - }).then(function (data) { - event.target.value = ""; - loader.style.display = 'none'; - - if (data.errors) { - throw data.message; - } - - uploadedLink.value = data.data[0]; - toastr.success('FIle uploaded and Link Ready', 'Success'); - })["catch"](function (error) { - loader.style.display = 'none'; - toastr.error(error, 'Error'); - }); - }; - - uploadFileContainer.append(input); - uploadFileContainer.append(uploadedLink); - modal.setContent(uploadFileContainer); - modal.open(); - }, - attributes: { - title: 'Edit' - } -}]); -pnm.addButton('options', [{ - id: 'save', - className: 'fa fa-save', - command: function command(editor) { - showLoader(); - editor.store(function (res) { - hideLoader(); - toastr.success('Page Saved', 'Success'); - }); - }, - attributes: { - title: 'Save' - } -}]); -var blockManager = editor.BlockManager; - -if (config.templatesUrl) { - fetch(config.templatesUrl).then(function (resp) { - return resp.json(); - }).then(function (data) { - data.forEach(function (block) { - blockManager.add('block-' + block.id, block); - }); - })["catch"](function (error) { - console.log(error); - }); -} - -/***/ }), - -/***/ "./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/grapesjs/dist/css/grapes.min.css": -/*!*****************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/grapesjs/dist/css/grapes.min.css ***! - \*****************************************************************************************************************************************************************************************************************/ -/***/ ((module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../css-loader/dist/runtime/getUrl.js */ "./node_modules/css-loader/dist/runtime/getUrl.js"); -/* harmony import */ var _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _fonts_main_fonts_eot_v_20__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../fonts/main-fonts.eot?v=20 */ "./node_modules/grapesjs/dist/fonts/main-fonts.eot?v=20"); -/* harmony import */ var _fonts_main_fonts_woff_v_20__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../fonts/main-fonts.woff?v=20 */ "./node_modules/grapesjs/dist/fonts/main-fonts.woff?v=20"); -/* harmony import */ var _fonts_main_fonts_ttf_v_20__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../fonts/main-fonts.ttf?v=20 */ "./node_modules/grapesjs/dist/fonts/main-fonts.ttf?v=20"); -/* harmony import */ var _fonts_main_fonts_svg_v_20__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../fonts/main-fonts.svg?v=20 */ "./node_modules/grapesjs/dist/fonts/main-fonts.svg?v=20"); -// Imports - - - - - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); -var ___CSS_LOADER_URL_REPLACEMENT_0___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_1___default()(_fonts_main_fonts_eot_v_20__WEBPACK_IMPORTED_MODULE_2__.default); -var ___CSS_LOADER_URL_REPLACEMENT_1___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_1___default()(_fonts_main_fonts_woff_v_20__WEBPACK_IMPORTED_MODULE_3__.default); -var ___CSS_LOADER_URL_REPLACEMENT_2___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_1___default()(_fonts_main_fonts_ttf_v_20__WEBPACK_IMPORTED_MODULE_4__.default); -var ___CSS_LOADER_URL_REPLACEMENT_3___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_1___default()(_fonts_main_fonts_svg_v_20__WEBPACK_IMPORTED_MODULE_5__.default); -// Module -___CSS_LOADER_EXPORT___.push([module.id, ".sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;-ms-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:linear-gradient(to right, #fff, rgba(204, 154, 129, 0));-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)\";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=\"#FFFFFFFF\", endColorstr=\"#00CC9A81\")}.sp-val{background-image:linear-gradient(to top, #000, rgba(204, 154, 129, 0));-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)\";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\"#00CC9A81\", endColorstr=\"#FF000000\")}.sp-hue{background:linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\"#ff0000\", endColorstr=\"#ffff00\")}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\"#ffff00\", endColorstr=\"#00ff00\")}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\"#00ff00\", endColorstr=\"#00ffff\")}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\"#00ffff\", endColorstr=\"#0000ff\")}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\"#0000ff\", endColorstr=\"#ff00ff\")}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\"#ff00ff\", endColorstr=\"#ff0000\")}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:\"\";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media(max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ececec;border:solid 1px #f0c49b;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px \"Lucida Grande\",\"Lucida Sans Unicode\",\"Lucida Sans\",Geneva,Verdana,sans-serif;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#f0c49b;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eee;background-image:linear-gradient(to bottom, #eeeeee, #cccccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#ddd;background-image:linear-gradient(to bottom, #dddddd, #bbbbbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-ms-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-o-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:transparent}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20, 255, 20, 0.5);-webkit-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:blue}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255, 150, 0, 0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::-moz-selection, .CodeMirror-line>span::-moz-selection, .CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255, 255, 0, 0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:\"\"}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:\"font3336\";src:url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ");src:url(" + ___CSS_LOADER_URL_REPLACEMENT_1___ + ") format(\"woff\"),url(" + ___CSS_LOADER_URL_REPLACEMENT_2___ + ") format(\"truetype\"),url(" + ___CSS_LOADER_URL_REPLACEMENT_3___ + ") format(\"svg\"),url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ") format(\"embedded-opentype\");font-weight:normal;font-style:normal}.gjs-is__grab,.gjs-is__grab *{cursor:-webkit-grab !important;cursor:grab !important}.gjs-is__grabbing,.gjs-is__grabbing *{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:-webkit-grabbing !important;cursor:grabbing !important}.gjs-one-bg{background-color:#444}.gjs-one-color{color:#444}.gjs-one-color-h:hover{color:#444}.gjs-two-bg{background-color:#ddd}.gjs-two-color{color:#ddd}.gjs-two-color-h:hover{color:#ddd}.gjs-three-bg{background-color:#804f7b}.gjs-three-color{color:#804f7b}.gjs-three-color-h:hover{color:#804f7b}.gjs-four-bg{background-color:#d278c9}.gjs-four-color{color:#d278c9}.gjs-four-color-h:hover{color:#d278c9}.gjs-danger-bg{background-color:#dd3636}.gjs-danger-color{color:#dd3636}.gjs-danger-color-h:hover{color:#dd3636}.gjs-bg-main,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-off-prv{background-color:#444}.gjs-color-main,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-off-prv{color:#ddd;fill:#ddd}.gjs-color-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:\"Q\"}.gjs-f-b2::before{content:\"W\"}.gjs-f-b3::before{content:\"E\"}.gjs-f-b37::before{content:\"R\"}.gjs-f-hero::before{content:\"T\"}.gjs-f-h1p::before{content:\"y\"}.gjs-f-3ba::before{content:\"u\"}.gjs-f-image::before{content:\"I\"}.gjs-f-text::before{content:\"o\"}.gjs-f-quo::before{content:\"p\"}.gjs-f-button::before{content:\"B\"}.gjs-f-divider::before{content:\"D\"}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:\"#fff\"}.opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==\")}.gjs-no-user-select,.gjs-rte-toolbar,.gjs-layer-name,.gjs-grabbing,.gjs-grabbing *{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el,.gjs-resizer-c{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-clm-tags #gjs-clm-close,.gjs-category-title,.gjs-layer-title,.gjs-block-category .gjs-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-com-no-select,.gjs-com-no-select img{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-touch-actions{touch-action:none}.gjs-disabled{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;opacity:.5;filter:alpha(opacity=50)}.gjs-editor{font-family:Helvetica,sans-serif;font-size:.75rem;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,.2);font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-label-wrp{width:30%;min-width:30%}.gjs-field-wrp{flex-grow:1}.gjs-trt-header{font-weight:lighter;padding:10px}.gjs-trt-trait{display:flex;justify-content:flex-start;padding:5px 10px;font-weight:lighter;align-items:center;text-align:left}.gjs-trt-traits{font-size:.75rem}.gjs-trt-trait .gjs-label{text-align:left;text-overflow:ellipsis;overflow:hidden}.gjs-guide-info{position:absolute}.gjs-guide-info__content{position:absolute;height:100%;display:flex;width:100%;padding:5px}.gjs-guide-info__line{position:relative;margin:auto}.gjs-guide-info__line::before,.gjs-guide-info__line::after{content:\"\";display:block;position:absolute;background-color:inherit}.gjs-guide-info__y{padding:0 5px}.gjs-guide-info__y .gjs-guide-info__content{justify-content:center}.gjs-guide-info__y .gjs-guide-info__line{width:100%;height:1px}.gjs-guide-info__y .gjs-guide-info__line::before,.gjs-guide-info__y .gjs-guide-info__line::after{width:1px;height:10px;top:0;bottom:0;left:0;margin:auto}.gjs-guide-info__y .gjs-guide-info__line::after{left:auto;right:0}.gjs-guide-info__x{padding:5px 0}.gjs-guide-info__x .gjs-guide-info__content{align-items:center}.gjs-guide-info__x .gjs-guide-info__line{height:100%;width:1px}.gjs-guide-info__x .gjs-guide-info__line::before,.gjs-guide-info__x .gjs-guide-info__line::after{width:10px;height:1px;left:0;right:0;top:0;margin:auto;transform:translateX(-50%)}.gjs-guide-info__x .gjs-guide-info__line::after{top:auto;bottom:0}.gjs-badge{white-space:nowrap}.gjs-badge__icon{vertical-align:middle;display:inline-block;width:15px;height:15px}.gjs-badge__icon svg{fill:currentColor}.gjs-badge__name{display:inline-block;vertical-align:middle}.gjs-frame-wrapper{position:absolute;width:100%;height:100%;left:0;right:0;margin:auto}.gjs-frame-wrapper--anim{transition:width .35s ease,height .35s ease}.gjs-frame-wrapper__top{transform:translateY(-100%) translateX(-50%);display:flex;padding:5px 0;position:absolute;width:100%;left:50%;top:0}.gjs-frame-wrapper__top-r{margin-left:auto}.gjs-frame-wrapper__left{position:absolute;left:0;transform:translateX(-100%) translateY(-50%);height:100%;top:50%}.gjs-frame-wrapper__bottom{position:absolute;bottom:0;transform:translateY(100%) translateX(-50%);width:100%;left:50%}.gjs-frame-wrapper__right{position:absolute;right:0;transform:translateX(100%) translateY(-50%);height:100%;top:50%}.gjs-frame-wrapper__icon{width:24px;cursor:pointer}.gjs-frame-wrapper__icon>svg{fill:currentColor}.gjs-padding-v-top,.gjs-fixedpadding-v-top{width:100%;top:0;left:0}.gjs-padding-v-right,.gjs-fixedpadding-v-right{right:0}.gjs-padding-v-bottom,.gjs-fixedpadding-v-bottom{width:100%;left:0;bottom:0}.gjs-padding-v-left,.gjs-fixedpadding-v-left{left:0}.gjs-cv-canvas{background-color:rgba(0,0,0,.15);box-sizing:border-box;width:85%;height:calc(100% - 40px);bottom:0;overflow:hidden;z-index:1;position:absolute;left:0;top:40px}.gjs-cv-canvas.gjs-is__grab .gjs-cv-canvas__frames,.gjs-cv-canvas.gjs-is__grabbing .gjs-cv-canvas__frames{pointer-events:none}.gjs-cv-canvas__frames{position:absolute;top:0;left:0;width:100%;height:100%}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;outline-offset:-1px;pointer-events:none;width:100%;height:100%}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools,.gjs-cv-canvas .gjs-tools{width:100%;height:100%;position:absolute;top:0;left:0;outline:none;z-index:1}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{outline:medium none;height:100%;width:100%;border:none;margin:auto;display:block;transition:width .35s ease,height .35s ease;position:absolute;top:0;bottom:0;left:0;right:0}.gjs-toolbar{position:absolute;background-color:#3b97e3;white-space:nowrap;color:#fff;z-index:10;top:0;left:0}.gjs-toolbar-item{padding:5px 7px;font-size:.8rem;cursor:pointer;width:26px;vertical-align:middle;display:inline-block}.gjs-toolbar-item svg{fill:currentColor;vertical-align:middle}.gjs-resizer-c{position:absolute;left:0;top:0;width:100%;height:100%;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:#ff0}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,.2);border:none;opacity:0;transition:opacity .25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-am-close,.gjs-mdl-btn-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-am-close:hover,.gjs-mdl-btn-close:hover{opacity:.7;filter:alpha(opacity=70)}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-placeholder{border-style:solid !important;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder.horizontal,.gjs-com-placeholder.horizontal,.gjs-placeholder.horizontal{border-color:transparent #62c462;border-width:3px 5px;margin:-3px 0 0}.gjs-placeholder.vertical,.gjs-com-placeholder.vertical,.gjs-placeholder.vertical{border-color:#62c462 transparent;border-width:5px 3px;margin:0 0 0 -3px}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;position:absolute;box-sizing:border-box;text-align:center;padding:5px;z-index:3}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-commands{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,.2)}.gjs-pn-options{right:15%;top:0}.gjs-pn-views{border-bottom:2px solid rgba(0,0,0,.2);right:0;width:15%;z-index:4}.gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:space-between}.gjs-pn-btn{box-sizing:border-box;min-height:30px;min-width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;padding:4px;position:relative;cursor:pointer}.gjs-pn-btn.gjs-pn-active{background-color:rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.25) inset}.gjs-pn-btn svg{fill:currentColor}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.6666666667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:\"\"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field input[type=number]{-moz-appearance:textfield}.gjs-field input[type=number]::-webkit-outer-spin-button,.gjs-field input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.gjs-field-range{flex:9 1 auto}.gjs-field-integer input{padding-right:30px}.gjs-select option,.gjs-field-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-fields option,.gjs-sm-unit option{background-color:#444;color:#ddd}.gjs-field{background-color:rgba(0,0,0,.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative}.gjs-field textarea{resize:vertical}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color,.gjs-field-radio{width:100%}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,.2);border-radius:1px;position:absolute;top:0}.gjs-field-checkbox{padding:0;width:17px;height:17px;display:block;cursor:pointer}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{flex:1 1 auto;text-align:center;border-left:1px solid rgba(0,0,0,.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,.2)}.gjs-radio-items{display:flex}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{color:inherit;background-color:rgba(255,255,255,.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,.1)}.gjs-btn--full{width:100%}.gjs-chk-icon{transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,.2)}.gjs-devices-c{display:flex;align-items:center;padding:3px}.gjs-devices-c .gjs-device-label{flex-grow:2;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-block-category.gjs-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags{border-bottom:1px solid rgba(0,0,0,.25)}.gjs-category-title,.gjs-layer-title,.gjs-block-category .gjs-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title{font-weight:lighter;background-color:rgba(0,0,0,.1);letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{line-height:0;cursor:pointer}.gjs-sm-header{font-weight:lighter;padding:10px}.gjs-sm-properties{font-size:.75rem;padding:10px 5px;display:flex;flex-wrap:wrap;align-items:flex-end;box-sizing:border-box;width:100%}.gjs-sm-label{margin:5px 5px 3px 0}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-select input,.gjs-clm-tags .gjs-clm-select input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-select input,.gjs-clm-tags .gjs-clm-select input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-select select::-ms-expand,.gjs-clm-tags .gjs-clm-select select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-select select:-moz-focusring,.gjs-clm-tags .gjs-clm-select select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-select input:focus,.gjs-clm-tags .gjs-clm-select input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-select select:focus,.gjs-clm-tags .gjs-clm-select select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-select .gjs-sm-unit,.gjs-clm-tags .gjs-clm-select .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-select .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-select .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-select .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-select .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-select .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-select .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-select .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-select .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-select .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-select .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-select .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-select .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-select .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-select .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-select .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-select .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-select .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-select .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-select .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-select .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-select .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-select .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-select .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-select .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-select .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-select .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-select .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-select .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field{background-color:rgba(0,0,0,.2);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 rgba(255,255,255,.1);color:rgba(255,255,255,.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-select,.gjs-clm-tags .gjs-sm-composite.gjs-clm-select,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-select,.gjs-clm-tags .gjs-sm-composite.gjs-clm-select,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-select,.gjs-clm-tags .gjs-sm-list.gjs-clm-select,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-select input,.gjs-clm-tags .gjs-sm-list.gjs-clm-select input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-select label,.gjs-clm-tags .gjs-sm-list.gjs-clm-select label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-select .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-select .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-select .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-select .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-select select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-select select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,.2)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,.2)}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property--full,.gjs-clm-tags .gjs-sm-property--full,.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,.2),1px 1px 0 rgba(43,43,43,.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,.05);padding:3px 20px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{top:-5px;display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:#fff;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:\"T\";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding:5px 0 0}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;outline:none;font-size:22px;line-height:10px;position:absolute;right:0;top:-17px;opacity:.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,.2);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-categories{display:flex;flex-direction:column}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;min-width:45px;padding:1em;box-sizing:border-box;min-height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;text-align:center;display:flex;flex-direction:column;justify-content:space-between;border:1px solid rgba(0,0,0,.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,.15);transition:all .2s ease 0s;transition-property:box-shadow,color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,.15)}.gjs-block svg{fill:currentColor}.gjs-block__media{margin-bottom:10px}.gjs-block-svg{width:54px;fill:currentColor}.gjs-block-svg-path{fill:currentColor}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:.65rem;font-weight:normal;font-family:Helvetica,sans-serif;overflow:hidden;text-overflow:ellipsis}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-selected-parent{border:1px solid #ffca6f}.gjs-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layer{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,.1);font-size:.75rem}.gjs-layer-hidden{opacity:.55;filter:alpha(opacity=55)}.gjs-layer-count{position:absolute;right:27px;top:9px}.gjs-layer-vis{height:auto !important;width:auto !important;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-layer-caret{font-size:.5rem;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-layer-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-layer-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-layer-title-inn{align-items:center;position:relative;display:flex;width:100%}.gjs-layer__icon{display:block;width:100%;max-width:15px;max-height:15px;padding-left:5px}.gjs-layer__icon svg{fill:currentColor}.gjs-layer-name{padding:5px 0;display:inline-block;box-sizing:content-box;overflow:hidden;white-space:nowrap;margin:0 30px 0 5px}.gjs-layer-name--no-edit{text-overflow:ellipsis}.gjs-layer>.gjs-layer-children{display:none}.gjs-layer.open>.gjs-layer-children{display:block}.gjs-layer-no-chld>.gjs-layer-title-inn>.gjs-layer-caret{display:none}.gjs-layer-move{padding:7px 10px 7px 5px;position:absolute;font-size:12px;cursor:move;right:0;top:0}.gjs-layer.gjs-hovered .gjs-layer-title{background-color:rgba(255,255,255,.015)}.gjs-layer.gjs-selected .gjs-layer-title{background-color:rgba(255,255,255,.1)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-placeholder{width:100%;position:absolute}.gjs-layers #gjs-placeholder #gjs-plh-int{height:100%;padding:1px}.gjs-layers #gjs-placeholder #gjs-plh-int.gjs-insert{background-color:#62c462}#gjs-clm-add-tag,.gjs-clm-tags-btn{background-color:rgba(255,255,255,.15);border-radius:2px;padding:3px;margin-right:3px;border:1px solid rgba(0,0,0,.15);width:24px;height:24px;box-sizing:border-box;cursor:pointer}.gjs-clm-tags-btn svg{fill:currentColor;display:block}.gjs-clm-header{display:flex;align-items:center;margin:7px 0}.gjs-clm-header-status{flex-shrink:1;margin-left:auto}.gjs-clm-tag{display:flex;overflow:hidden;align-items:center;border-radius:3px;margin:0 3px 3px 0;padding:5px;cursor:default}.gjs-clm-tag-status,.gjs-clm-tag-close{width:12px;height:12px;flex-shrink:1}.gjs-clm-tag-status svg,.gjs-clm-tag-close svg{vertical-align:middle;fill:currentColor}.gjs-clm-sels-info{margin:7px 0}.gjs-clm-sel-id{font-size:.9em;opacity:.5;filter:alpha(opacity=50)}.gjs-clm-label-sel{float:left;padding-right:5px}.gjs-clm-tags{font-size:.75rem;padding:10px 5px}.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px;display:flex;flex-wrap:wrap}.gjs-clm-tags #gjs-clm-tags-c{display:flex;flex-wrap:wrap;vertical-align:top;overflow:hidden}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags #gjs-clm-close{opacity:.85;filter:alpha(opacity=85);font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:1;filter:alpha(opacity=100)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{flex-grow:1;text-overflow:ellipsis;overflow:hidden;padding:0 3px;cursor:text}.gjs-mdl-container{font-family:Helvetica,sans-serif;overflow-y:auto;position:fixed;background-color:rgba(0,0,0,.5);display:flex;top:0;left:0;right:0;bottom:0;z-index:100}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,.05);-webkit-animation:gjs-slide-down .215s;animation:gjs-slide-down .215s;margin:auto;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-title{font-size:1rem}.gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{-webkit-animation:gjs-mdl-slide-down .216s;animation:gjs-mdl-slide-down .216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,.2);padding:15px 15px 7px}.gjs-export-dl::after{content:\"\";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity .25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,.2);font-size:12px;padding:5px 10px 3px;text-align:right}.gjs-rte-toolbar{border:1px solid rgba(0,0,0,.2);position:absolute;border-radius:3px;z-index:10}.gjs-rte-actionbar{display:flex}.gjs-rte-action{display:flex;align-items:center;justify-content:center;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,.2);text-align:center;cursor:pointer;outline:none}.gjs-rte-action:last-child{border-right:none}.gjs-rte-action:hover{background-color:rgba(255,255,255,.1)}.gjs-rte-active{background-color:rgba(255,255,255,.1)}.gjs-rte-disabled{color:rgba(255,255,255,.1);cursor:not-allowed}.gjs-rte-disabled:hover{background-color:unset}.gjs-editor-cont .sp-hue,.gjs-editor-cont .sp-slider{cursor:row-resize}.gjs-editor-cont .sp-color,.gjs-editor-cont .sp-dragger{cursor:crosshair}.gjs-editor-cont .sp-alpha-inner,.gjs-editor-cont .sp-alpha-handle{cursor:col-resize}.gjs-editor-cont .sp-hue{left:90%}.gjs-editor-cont .sp-color{right:15%}.gjs-editor-cont .sp-container{border:1px solid rgba(0,0,0,.2);box-shadow:0 0 7px rgba(0,0,0,.2);border-radius:3px}.gjs-editor-cont .sp-picker-container{border:none}.gjs-editor-cont .colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,.2)}.gjs-editor-cont .sp-cancel,.gjs-editor-cont .sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.gjs-editor-cont .sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.gjs-editor-cont .sp-color,.gjs-editor-cont .sp-hue{border:1px solid #333}.gjs-editor-cont .sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.gjs-editor-cont .sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.gjs-editor-cont .sp-button-container{float:none;width:100%;position:relative;text-align:right}.gjs-editor-cont .sp-container button,.gjs-editor-cont .sp-container button:hover,.gjs-editor-cont .sp-container button:active{background:rgba(0,0,0,.2);border-color:rgba(0,0,0,.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.gjs-editor-cont .sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.gjs-editor-cont .sp-palette .sp-thumb-el,.gjs-editor-cont .sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,.9)}.gjs-editor-cont .sp-palette .sp-thumb-el:hover,.gjs-editor-cont .sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,.9)}.gjs-hidden{display:none}@-webkit-keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@-webkit-keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}}.cm-s-hopscotch span.cm-error{color:#fff}\n", ""]); -// Exports -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); - - -/***/ }), - -/***/ "./node_modules/css-loader/dist/runtime/api.js": -/*!*****************************************************!*\ - !*** ./node_modules/css-loader/dist/runtime/api.js ***! - \*****************************************************/ -/***/ ((module) => { - -"use strict"; - - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -// css base code, injected by the css-loader -// eslint-disable-next-line func-names -module.exports = function (cssWithMappingToString) { - var list = []; // return the list of modules as css string - - list.toString = function toString() { - return this.map(function (item) { - var content = cssWithMappingToString(item); - - if (item[2]) { - return "@media ".concat(item[2], " {").concat(content, "}"); - } - - return content; - }).join(""); - }; // import a list of modules into the list - // eslint-disable-next-line func-names - - - list.i = function (modules, mediaQuery, dedupe) { - if (typeof modules === "string") { - // eslint-disable-next-line no-param-reassign - modules = [[null, modules, ""]]; - } - - var alreadyImportedModules = {}; - - if (dedupe) { - for (var i = 0; i < this.length; i++) { - // eslint-disable-next-line prefer-destructuring - var id = this[i][0]; - - if (id != null) { - alreadyImportedModules[id] = true; - } - } - } - - for (var _i = 0; _i < modules.length; _i++) { - var item = [].concat(modules[_i]); - - if (dedupe && alreadyImportedModules[item[0]]) { - // eslint-disable-next-line no-continue - continue; - } - - if (mediaQuery) { - if (!item[2]) { - item[2] = mediaQuery; - } else { - item[2] = "".concat(mediaQuery, " and ").concat(item[2]); - } - } - - list.push(item); - } - }; - - return list; -}; - -/***/ }), - -/***/ "./node_modules/css-loader/dist/runtime/getUrl.js": -/*!********************************************************!*\ - !*** ./node_modules/css-loader/dist/runtime/getUrl.js ***! - \********************************************************/ -/***/ ((module) => { - -"use strict"; - - -module.exports = function (url, options) { - if (!options) { - // eslint-disable-next-line no-param-reassign - options = {}; - } // eslint-disable-next-line no-underscore-dangle, no-param-reassign - - - url = url && url.__esModule ? url.default : url; - - if (typeof url !== "string") { - return url; - } // If url is already wrapped in quotes, remove them - - - if (/^['"].*['"]$/.test(url)) { - // eslint-disable-next-line no-param-reassign - url = url.slice(1, -1); - } - - if (options.hash) { - // eslint-disable-next-line no-param-reassign - url += options.hash; - } // Should url be wrapped? - // See https://drafts.csswg.org/css-values-3/#urls - - - if (/["'() \t\n]/.test(url) || options.needQuotes) { - return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\""); - } - - return url; -}; - -/***/ }), - -/***/ "./node_modules/grapesjs/dist/fonts/main-fonts.eot?v=20": -/*!**************************************************************!*\ - !*** ./node_modules/grapesjs/dist/fonts/main-fonts.eot?v=20 ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("/fonts/vendor/grapesjs/dist/main-fonts.eot?b8dc46886b7e216a02bee62f6e0b69a9"); - -/***/ }), - -/***/ "./node_modules/grapesjs/dist/fonts/main-fonts.svg?v=20": -/*!**************************************************************!*\ - !*** ./node_modules/grapesjs/dist/fonts/main-fonts.svg?v=20 ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("/fonts/vendor/grapesjs/dist/main-fonts.svg?404be73e1ad40b1da282b25d2c78e3cb"); - -/***/ }), - -/***/ "./node_modules/grapesjs/dist/fonts/main-fonts.ttf?v=20": -/*!**************************************************************!*\ - !*** ./node_modules/grapesjs/dist/fonts/main-fonts.ttf?v=20 ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("/fonts/vendor/grapesjs/dist/main-fonts.ttf?4d0a76596dbbbfbfe5ee6cde9f6b7321"); - -/***/ }), - -/***/ "./node_modules/grapesjs/dist/fonts/main-fonts.woff?v=20": -/*!***************************************************************!*\ - !*** ./node_modules/grapesjs/dist/fonts/main-fonts.woff?v=20 ***! - \***************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("/fonts/vendor/grapesjs/dist/main-fonts.woff?dbf9ed7d53cfa8f73da7d49d83f1fce4"); - -/***/ }), - -/***/ "./node_modules/grapesjs-blocks-basic/dist/grapesjs-blocks-basic.min.js": -/*!******************************************************************************!*\ - !*** ./node_modules/grapesjs-blocks-basic/dist/grapesjs-blocks-basic.min.js ***! - \******************************************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -/*! grapesjs-blocks-basic - 0.1.8 */ -!function(e,t){ true?module.exports=t(__webpack_require__(/*! grapesjs */ "./node_modules/grapesjs/dist/grapes.min.js")):0}(this,function(e){return function(e){function t(a){if(n[a])return n[a].exports;var l=n[a]={i:a,l:!1,exports:{}};return e[a].call(l.exports,l,l.exports,t),l.l=!0,l.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},l=a({blocks:["column1","column2","column3","column3-7","text","link","image","video","map"],flexGrid:0,stylePrefix:"gjs-",addBasicStyle:!0,category:"Basic",labelColumn1:"1 Column",labelColumn2:"2 Columns",labelColumn3:"3 Columns",labelColumn37:"2 Columns 3/7",labelText:"Text",labelLink:"Link",labelImage:"Image",labelVideo:"Video",labelMap:"Map"},t);n(2).default(e,l)})},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=t,l=e.BlockManager,i=n.blocks,s=n.stylePrefix,o=n.flexGrid,r=n.addBasicStyle,c=s+"row",d=s+"cell",u=o?"\n ."+c+" {\n display: flex;\n justify-content: flex-start;\n align-items: stretch;\n flex-wrap: nowrap;\n padding: 10px;\n }\n @media (max-width: 768px) {\n ."+c+" {\n flex-wrap: wrap;\n }\n }":"\n ."+c+" {\n display: table;\n padding: 10px;\n width: 100%;\n }\n @media (max-width: 768px) {\n ."+s+"cell, ."+s+"cell30, ."+s+"cell70 {\n width: 100%;\n display: block;\n }\n }",b=o?"\n ."+d+" {\n min-height: 75px;\n flex-grow: 1;\n flex-basis: 100%;\n }":"\n ."+d+" {\n width: 8%;\n display: table-cell;\n height: 75px;\n }",f="\n ."+s+"cell30 {\n width: 30%;\n }",g="\n ."+s+"cell70 {\n width: 70%;\n }",p={tl:0,tc:0,tr:0,cl:0,cr:0,bl:0,br:0,minDim:1},y=a({},p,{cr:1,bc:0,currentUnit:1,minDim:1,step:.2});o&&(y.keyWidth="flex-basis");var m={class:c,"data-gjs-droppable":"."+d,"data-gjs-resizable":p,"data-gjs-name":"Row"},v={class:d,"data-gjs-draggable":"."+c,"data-gjs-resizable":y,"data-gjs-name":"Cell"};o&&(v["data-gjs-unstylable"]=["width"],v["data-gjs-stylable-require"]=["flex-basis"]);var x=["."+c,"."+d];e.on("selector:add",function(e){return x.indexOf(e.getFullName())>=0&&e.set("private",1)});var j=function(e){var t=[];for(var n in e){var a=e[n],l=a instanceof Array||a instanceof Object;a=l?JSON.stringify(a):a,t.push(n+"="+(l?"'"+a+"'":'"'+a+'"'))}return t.length?" "+t.join(" "):""},h=function(e){return i.indexOf(e)>=0},w=j(m),k=j(v);h("column1")&&l.add("column1",{label:n.labelColumn1,category:n.category,attributes:{class:"gjs-fonts gjs-f-b1"},content:"
\n
\n
\n "+(r?"":"")}),h("column2")&&l.add("column2",{label:n.labelColumn2,attributes:{class:"gjs-fonts gjs-f-b2"},category:n.category,content:"
\n
\n
\n
\n "+(r?"":"")}),h("column3")&&l.add("column3",{label:n.labelColumn3,category:n.category,attributes:{class:"gjs-fonts gjs-f-b3"},content:"
\n
\n
\n
\n
\n "+(r?"":"")}),h("column3-7")&&l.add("column3-7",{label:n.labelColumn37,category:n.category,attributes:{class:"gjs-fonts gjs-f-b37"},content:"
\n
\n
\n
\n '+(r?"":"")}),h("text")&&l.add("text",{label:n.labelText,category:n.category,attributes:{class:"gjs-fonts gjs-f-text"},content:{type:"text",content:"Insert your text here",style:{padding:"10px"},activeOnRender:1}}),h("link")&&l.add("link",{label:n.labelLink,category:n.category,attributes:{class:"fa fa-link"},content:{type:"link",content:"Link",style:{color:"#d983a6"}}}),h("image")&&l.add("image",{label:n.labelImage,category:n.category,attributes:{class:"gjs-fonts gjs-f-image"},content:{style:{color:"black"},type:"image",activeOnRender:1}}),h("video")&&l.add("video",{label:n.labelVideo,category:n.category,attributes:{class:"fa fa-youtube-play"},content:{type:"video",src:"img/video2.webm",style:{height:"350px",width:"615px"}}}),h("map")&&l.add("map",{label:n.labelMap,category:n.category,attributes:{class:"fa fa-map-o"},content:{type:"map",style:{height:"350px"}}})}}])}); - -/***/ }), - -/***/ "./node_modules/grapesjs/dist/grapes.min.js": -/*!**************************************************!*\ - !*** ./node_modules/grapesjs/dist/grapes.min.js ***! - \**************************************************/ -/***/ ((module) => { - -/*! grapesjs - 0.16.45 */ -!function(t,e){ true?module.exports=e():0}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(t,'__esModule',{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&'object'==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,'default',{enumerable:!0,value:t}),2&e&&'string'!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t['default']}:function(){return t};return n.d(e,'a',e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=94)}([function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return Cn})),n.d(e,"VERSION",(function(){return i["e"]})),n.d(e,"restArguments",(function(){return o})),n.d(e,"isObject",(function(){return a})),n.d(e,"isNull",(function(){return s})),n.d(e,"isUndefined",(function(){return l})),n.d(e,"isBoolean",(function(){return c})),n.d(e,"isElement",(function(){return u})),n.d(e,"isString",(function(){return h})),n.d(e,"isNumber",(function(){return f})),n.d(e,"isDate",(function(){return p})),n.d(e,"isRegExp",(function(){return g})),n.d(e,"isError",(function(){return v})),n.d(e,"isSymbol",(function(){return m})),n.d(e,"isArrayBuffer",(function(){return b})),n.d(e,"isDataView",(function(){return j})),n.d(e,"isArray",(function(){return T})),n.d(e,"isFunction",(function(){return x})),n.d(e,"isArguments",(function(){return M})),n.d(e,"isFinite",(function(){return D})),n.d(e,"isNaN",(function(){return A})),n.d(e,"isTypedArray",(function(){return R})),n.d(e,"isEmpty",(function(){return U})),n.d(e,"isMatch",(function(){return B})),n.d(e,"isEqual",(function(){return Y})),n.d(e,"isMap",(function(){return ot})),n.d(e,"isWeakMap",(function(){return at})),n.d(e,"isSet",(function(){return st})),n.d(e,"isWeakSet",(function(){return lt})),n.d(e,"keys",(function(){return $})),n.d(e,"allKeys",(function(){return X})),n.d(e,"values",(function(){return ct})),n.d(e,"pairs",(function(){return ut})),n.d(e,"invert",(function(){return dt})),n.d(e,"functions",(function(){return ht})),n.d(e,"methods",(function(){return ht})),n.d(e,"extend",(function(){return pt})),n.d(e,"extendOwn",(function(){return gt})),n.d(e,"assign",(function(){return gt})),n.d(e,"defaults",(function(){return vt})),n.d(e,"create",(function(){return bt})),n.d(e,"clone",(function(){return yt})),n.d(e,"tap",(function(){return wt})),n.d(e,"get",(function(){return St})),n.d(e,"has",(function(){return kt})),n.d(e,"mapObject",(function(){return Lt})),n.d(e,"identity",(function(){return jt})),n.d(e,"constant",(function(){return L})),n.d(e,"noop",(function(){return _t})),n.d(e,"toPath",(function(){return xt})),n.d(e,"property",(function(){return Pt})),n.d(e,"propertyOf",(function(){return Nt})),n.d(e,"matcher",(function(){return Tt})),n.d(e,"matches",(function(){return Tt})),n.d(e,"times",(function(){return It})),n.d(e,"random",(function(){return Ft})),n.d(e,"now",(function(){return Vt})),n.d(e,"escape",(function(){return Ht})),n.d(e,"unescape",(function(){return $t})),n.d(e,"templateSettings",(function(){return Ut})),n.d(e,"template",(function(){return Kt})),n.d(e,"result",(function(){return Yt})),n.d(e,"uniqueId",(function(){return Jt})),n.d(e,"chain",(function(){return Zt})),n.d(e,"iteratee",(function(){return Dt})),n.d(e,"partial",(function(){return ee})),n.d(e,"bind",(function(){return ne})),n.d(e,"bindAll",(function(){return oe})),n.d(e,"memoize",(function(){return ae})),n.d(e,"delay",(function(){return se})),n.d(e,"defer",(function(){return le})),n.d(e,"throttle",(function(){return ce})),n.d(e,"debounce",(function(){return ue})),n.d(e,"wrap",(function(){return de})),n.d(e,"negate",(function(){return he})),n.d(e,"compose",(function(){return fe})),n.d(e,"after",(function(){return pe})),n.d(e,"before",(function(){return ge})),n.d(e,"once",(function(){return ve})),n.d(e,"findKey",(function(){return me})),n.d(e,"findIndex",(function(){return ye})),n.d(e,"findLastIndex",(function(){return we})),n.d(e,"sortedIndex",(function(){return xe})),n.d(e,"indexOf",(function(){return Ce})),n.d(e,"lastIndexOf",(function(){return Se})),n.d(e,"find",(function(){return ke})),n.d(e,"detect",(function(){return ke})),n.d(e,"findWhere",(function(){return je})),n.d(e,"each",(function(){return Te})),n.d(e,"forEach",(function(){return Te})),n.d(e,"map",(function(){return Pe})),n.d(e,"collect",(function(){return Pe})),n.d(e,"reduce",(function(){return Me})),n.d(e,"foldl",(function(){return Me})),n.d(e,"inject",(function(){return Me})),n.d(e,"reduceRight",(function(){return De})),n.d(e,"foldr",(function(){return De})),n.d(e,"filter",(function(){return Ae})),n.d(e,"select",(function(){return Ae})),n.d(e,"reject",(function(){return Le})),n.d(e,"every",(function(){return _e})),n.d(e,"all",(function(){return _e})),n.d(e,"some",(function(){return Ne})),n.d(e,"any",(function(){return Ne})),n.d(e,"contains",(function(){return Ie})),n.d(e,"includes",(function(){return Ie})),n.d(e,"include",(function(){return Ie})),n.d(e,"invoke",(function(){return Fe})),n.d(e,"pluck",(function(){return Ve})),n.d(e,"where",(function(){return Re})),n.d(e,"max",(function(){return ze})),n.d(e,"min",(function(){return He})),n.d(e,"shuffle",(function(){return Ue})),n.d(e,"sample",(function(){return $e})),n.d(e,"sortBy",(function(){return Be})),n.d(e,"groupBy",(function(){return qe})),n.d(e,"indexBy",(function(){return Ge})),n.d(e,"countBy",(function(){return Ke})),n.d(e,"partition",(function(){return Ye})),n.d(e,"toArray",(function(){return Je})),n.d(e,"size",(function(){return Ze})),n.d(e,"pick",(function(){return tn})),n.d(e,"omit",(function(){return en})),n.d(e,"first",(function(){return rn})),n.d(e,"head",(function(){return rn})),n.d(e,"take",(function(){return rn})),n.d(e,"initial",(function(){return nn})),n.d(e,"last",(function(){return an})),n.d(e,"rest",(function(){return on})),n.d(e,"tail",(function(){return on})),n.d(e,"drop",(function(){return on})),n.d(e,"compact",(function(){return sn})),n.d(e,"flatten",(function(){return ln})),n.d(e,"without",(function(){return un})),n.d(e,"uniq",(function(){return dn})),n.d(e,"unique",(function(){return dn})),n.d(e,"union",(function(){return hn})),n.d(e,"intersection",(function(){return fn})),n.d(e,"difference",(function(){return cn})),n.d(e,"unzip",(function(){return pn})),n.d(e,"transpose",(function(){return pn})),n.d(e,"zip",(function(){return gn})),n.d(e,"object",(function(){return vn})),n.d(e,"range",(function(){return mn})),n.d(e,"chunk",(function(){return bn})),n.d(e,"mixin",(function(){return wn}));var r={};n.r(r),n.d(r,"VERSION",(function(){return i["e"]})),n.d(r,"restArguments",(function(){return o})),n.d(r,"isObject",(function(){return a})),n.d(r,"isNull",(function(){return s})),n.d(r,"isUndefined",(function(){return l})),n.d(r,"isBoolean",(function(){return c})),n.d(r,"isElement",(function(){return u})),n.d(r,"isString",(function(){return h})),n.d(r,"isNumber",(function(){return f})),n.d(r,"isDate",(function(){return p})),n.d(r,"isRegExp",(function(){return g})),n.d(r,"isError",(function(){return v})),n.d(r,"isSymbol",(function(){return m})),n.d(r,"isArrayBuffer",(function(){return b})),n.d(r,"isDataView",(function(){return j})),n.d(r,"isArray",(function(){return T})),n.d(r,"isFunction",(function(){return x})),n.d(r,"isArguments",(function(){return M})),n.d(r,"isFinite",(function(){return D})),n.d(r,"isNaN",(function(){return A})),n.d(r,"isTypedArray",(function(){return R})),n.d(r,"isEmpty",(function(){return U})),n.d(r,"isMatch",(function(){return B})),n.d(r,"isEqual",(function(){return Y})),n.d(r,"isMap",(function(){return ot})),n.d(r,"isWeakMap",(function(){return at})),n.d(r,"isSet",(function(){return st})),n.d(r,"isWeakSet",(function(){return lt})),n.d(r,"keys",(function(){return $})),n.d(r,"allKeys",(function(){return X})),n.d(r,"values",(function(){return ct})),n.d(r,"pairs",(function(){return ut})),n.d(r,"invert",(function(){return dt})),n.d(r,"functions",(function(){return ht})),n.d(r,"methods",(function(){return ht})),n.d(r,"extend",(function(){return pt})),n.d(r,"extendOwn",(function(){return gt})),n.d(r,"assign",(function(){return gt})),n.d(r,"defaults",(function(){return vt})),n.d(r,"create",(function(){return bt})),n.d(r,"clone",(function(){return yt})),n.d(r,"tap",(function(){return wt})),n.d(r,"get",(function(){return St})),n.d(r,"has",(function(){return kt})),n.d(r,"mapObject",(function(){return Lt})),n.d(r,"identity",(function(){return jt})),n.d(r,"constant",(function(){return L})),n.d(r,"noop",(function(){return _t})),n.d(r,"toPath",(function(){return xt})),n.d(r,"property",(function(){return Pt})),n.d(r,"propertyOf",(function(){return Nt})),n.d(r,"matcher",(function(){return Tt})),n.d(r,"matches",(function(){return Tt})),n.d(r,"times",(function(){return It})),n.d(r,"random",(function(){return Ft})),n.d(r,"now",(function(){return Vt})),n.d(r,"escape",(function(){return Ht})),n.d(r,"unescape",(function(){return $t})),n.d(r,"templateSettings",(function(){return Ut})),n.d(r,"template",(function(){return Kt})),n.d(r,"result",(function(){return Yt})),n.d(r,"uniqueId",(function(){return Jt})),n.d(r,"chain",(function(){return Zt})),n.d(r,"iteratee",(function(){return Dt})),n.d(r,"partial",(function(){return ee})),n.d(r,"bind",(function(){return ne})),n.d(r,"bindAll",(function(){return oe})),n.d(r,"memoize",(function(){return ae})),n.d(r,"delay",(function(){return se})),n.d(r,"defer",(function(){return le})),n.d(r,"throttle",(function(){return ce})),n.d(r,"debounce",(function(){return ue})),n.d(r,"wrap",(function(){return de})),n.d(r,"negate",(function(){return he})),n.d(r,"compose",(function(){return fe})),n.d(r,"after",(function(){return pe})),n.d(r,"before",(function(){return ge})),n.d(r,"once",(function(){return ve})),n.d(r,"findKey",(function(){return me})),n.d(r,"findIndex",(function(){return ye})),n.d(r,"findLastIndex",(function(){return we})),n.d(r,"sortedIndex",(function(){return xe})),n.d(r,"indexOf",(function(){return Ce})),n.d(r,"lastIndexOf",(function(){return Se})),n.d(r,"find",(function(){return ke})),n.d(r,"detect",(function(){return ke})),n.d(r,"findWhere",(function(){return je})),n.d(r,"each",(function(){return Te})),n.d(r,"forEach",(function(){return Te})),n.d(r,"map",(function(){return Pe})),n.d(r,"collect",(function(){return Pe})),n.d(r,"reduce",(function(){return Me})),n.d(r,"foldl",(function(){return Me})),n.d(r,"inject",(function(){return Me})),n.d(r,"reduceRight",(function(){return De})),n.d(r,"foldr",(function(){return De})),n.d(r,"filter",(function(){return Ae})),n.d(r,"select",(function(){return Ae})),n.d(r,"reject",(function(){return Le})),n.d(r,"every",(function(){return _e})),n.d(r,"all",(function(){return _e})),n.d(r,"some",(function(){return Ne})),n.d(r,"any",(function(){return Ne})),n.d(r,"contains",(function(){return Ie})),n.d(r,"includes",(function(){return Ie})),n.d(r,"include",(function(){return Ie})),n.d(r,"invoke",(function(){return Fe})),n.d(r,"pluck",(function(){return Ve})),n.d(r,"where",(function(){return Re})),n.d(r,"max",(function(){return ze})),n.d(r,"min",(function(){return He})),n.d(r,"shuffle",(function(){return Ue})),n.d(r,"sample",(function(){return $e})),n.d(r,"sortBy",(function(){return Be})),n.d(r,"groupBy",(function(){return qe})),n.d(r,"indexBy",(function(){return Ge})),n.d(r,"countBy",(function(){return Ke})),n.d(r,"partition",(function(){return Ye})),n.d(r,"toArray",(function(){return Je})),n.d(r,"size",(function(){return Ze})),n.d(r,"pick",(function(){return tn})),n.d(r,"omit",(function(){return en})),n.d(r,"first",(function(){return rn})),n.d(r,"head",(function(){return rn})),n.d(r,"take",(function(){return rn})),n.d(r,"initial",(function(){return nn})),n.d(r,"last",(function(){return an})),n.d(r,"rest",(function(){return on})),n.d(r,"tail",(function(){return on})),n.d(r,"drop",(function(){return on})),n.d(r,"compact",(function(){return sn})),n.d(r,"flatten",(function(){return ln})),n.d(r,"without",(function(){return un})),n.d(r,"uniq",(function(){return dn})),n.d(r,"unique",(function(){return dn})),n.d(r,"union",(function(){return hn})),n.d(r,"intersection",(function(){return fn})),n.d(r,"difference",(function(){return cn})),n.d(r,"unzip",(function(){return pn})),n.d(r,"transpose",(function(){return pn})),n.d(r,"zip",(function(){return gn})),n.d(r,"object",(function(){return vn})),n.d(r,"range",(function(){return mn})),n.d(r,"chunk",(function(){return bn})),n.d(r,"mixin",(function(){return wn})),n.d(r,"default",(function(){return xn}));var i=n(4);function o(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),i=0;i=0&&n<=i["b"]}}function N(t){return function(e){return null==e?void 0:e[t]}}var I=N('byteLength'),F=_(I),V=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var R=i["r"]?function(t){return i["l"]?Object(i["l"])(t)&&!j(t):F(t)&&V.test(i["t"].call(t))}:L(!1),z=N('length');function H(t,e){e=function(t){for(var e={},n=t.length,r=0;r':'>','"':'"',"'":''','`':'`'},Ht=Rt(zt),$t=Rt(dt(zt)),Ut=W.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Bt=/(.)^/,Wt={"'":"'",'\\':'\\','\r':'r','\n':'n','\u2028':'u2028','\u2029':'u2029'},qt=/\\|'|\r|\n|\u2028|\u2029/g;function Gt(t){return'\\'+Wt[t]}function Kt(t,e,n){!e&&n&&(e=n),e=vt({},e,W.templateSettings);var r,i=RegExp([(e.escape||Bt).source,(e.interpolate||Bt).source,(e.evaluate||Bt).source].join('|')+'|$','g'),o=0,a="__p+='";t.replace(i,(function(e,n,r,i,s){return a+=t.slice(o,s).replace(qt,Gt),o=s+e.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),e})),a+="';\n",e.variable||(a='with(obj||{}){\n'+a+'}\n'),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+'return __p;\n';try{r=new Function(e.variable||'obj','_',a)}catch(t){throw t.source=a,t}var s=function(t){return r.call(this,t,W)},l=e.variable||'obj';return s.source='function('+l+'){\n'+a+'}',s}function Yt(t,e,n){var r=(e=Ot(e)).length;if(!r)return x(n)?n.call(t):n;for(var i=0;i1)ie(s,e-1,n,r),i=r.length;else for(var l=0,c=s.length;le?(r&&(clearTimeout(r),r=null),s=c,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(l,u)),a};return c.cancel=function(){clearTimeout(r),s=0,r=i=o=null},c}function ue(t,e,n){var r,i,a=function(e,n){r=null,n&&(i=t.apply(e,n))},s=o((function(o){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(a,e),s&&(i=t.apply(this,o))}else r=se(a,e,this,o);return i}));return s.cancel=function(){clearTimeout(r),r=null},s}function de(t,e){return ee(e,t)}function he(t){return function(){return!t.apply(this,arguments)}}function fe(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}function pe(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function ge(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}var ve=ee(ge,2);function me(t,e,n){e=At(e,n);for(var r,i=$(t),o=0,a=i.length;o0?0:i-1;o>=0&&o0?s=a>=0?a:Math.max(a+l,s):l=a>=0?Math.min(a+1,l):a+l+1;else if(n&&a&&l)return r[a=n(r,o)]===o?a:-1;if(o!=o)return(a=e(i["q"].call(r,s,l),A))>=0?a+s:-1;for(a=t>0?s:l-1;a>=0&&a0?0:a-1;for(i||(r=e[o?o[s]:s],s+=t);s>=0&&s=3;return e(t,Et(n,i,4),r,o)}}var Me=Ee(1),De=Ee(-1);function Ae(t,e,n){var r=[];return e=At(e,n),Te(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function Le(t,e,n){return Ae(t,he(At(e)),n)}function _e(t,e,n){e=At(e,n);for(var r=!re(t)&&$(t),i=(r||t).length,o=0;o=0}var Fe=o((function(t,e,n){var r,i;return x(e)?i=e:(e=Ot(e),r=e.slice(0,-1),e=e[e.length-1]),Pe(t,(function(t){var o=i;if(!o){if(r&&r.length&&(t=Ct(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)}))}));function Ve(t,e){return Pe(t,Pt(e))}function Re(t,e){return Ae(t,Tt(e))}function ze(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e||'number'==typeof e&&'object'!=typeof t[0]&&null!=t)for(var s=0,l=(t=re(t)?t:ct(t)).length;so&&(o=r);else e=At(e,n),Te(t,(function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)}));return o}function He(t,e,n){var r,i,o=1/0,a=1/0;if(null==e||'number'==typeof e&&'object'!=typeof t[0]&&null!=t)for(var s=0,l=(t=re(t)?t:ct(t)).length;sr||void 0===n)return 1;if(n1&&(r=Et(r,e[1])),e=X(t)):(r=Qe,e=ie(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i1&&(n=e[1])):(e=Pe(ie(e,!1,!1),String),r=function(t,n){return!Ie(e,n)}),tn(t,r,n)}));function nn(t,e,n){return i["q"].call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function rn(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:nn(t,t.length-e)}function on(t,e,n){return i["q"].call(t,null==e||n?1:e)}function an(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:on(t,Math.max(0,t.length-e))}function sn(t){return Ae(t,Boolean)}function ln(t,e){return ie(t,e,!1)}var cn=o((function(t,e){return e=ie(e,!0,!0),Ae(t,(function(t){return!Ie(e,t)}))})),un=o((function(t,e){return cn(t,e)}));function dn(t,e,n,r){c(e)||(r=n,n=e,e=!1),null!=n&&(n=At(n,r));for(var i=[],o=[],a=0,s=z(t);athis.length&&(i=this.length),i<0&&(i+=this.length+1);var o,a,s=[],l=[],c=[],u=[],d={},h=e.add,f=e.merge,p=e.remove,g=!1,v=this.comparator&&null==i&&!1!==e.sort,m=n.isString(this.comparator)?this.comparator:null;for(a=0;a7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=('/'+this.root+'/').replace(_,'/'),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||'/';return this.location.replace(e+'#'+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement('iframe'),this.iframe.src='javascript:0',this.iframe.style.display='none',this.iframe.tabIndex=-1;var r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash='#'+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent('on'+t,e)};if(this._usePushState?o('popstate',this.checkUrl,!1):this._useHashChange&&!this.iframe?o('hashchange',this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent('on'+t,e)};this._usePushState?t('popstate',this.checkUrl,!1):this._useHashChange&&!this.iframe&&t('hashchange',this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),A.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,(function(e){if(e.route.test(t))return e.callback(t),!0})))},navigate:function(t,e){if(!A.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||'');var n=this.root;''!==t&&'?'!==t.charAt(0)||(n=n.slice(0,-1)||'/');var r=n+t;if(t=this.decodeFragment(t.replace(N,'')),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?'replaceState':'pushState']({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;e.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var r=t.href.replace(/(javascript:|#).*$/,'');t.replace(r+'#'+e)}else t.hash='#'+e}}),e.history=new A;b.extend=y.extend=T.extend=C.extend=A.extend=function(t,e){var r,i=this;return r=t&&n.has(t,'constructor')?t.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,e),r.prototype=n.create(i.prototype,t),r.prototype.constructor=r,r.__super__=i.prototype,r};var I=function(){throw new Error('A "url" property or function must be specified')},F=function(t,e){var n=e.error;e.error=function(r){n&&n.call(e.context,t,r,e),t.trigger('error',t,r,e)}};return e}(s,n,t,e)}.apply(e,i))||(t.exports=o);else{}}()}).call(this,n(26))},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){"use strict";n.d(e,"r",(function(){return x})),n.d(e,"w",(function(){return h})),n.d(e,"v",(function(){return f})),n.d(e,"k",(function(){return b})),n.d(e,"t",(function(){return c})),n.d(e,"g",(function(){return O})),n.d(e,"d",(function(){return C})),n.d(e,"b",(function(){return v})),n.d(e,"s",(function(){return w})),n.d(e,"f",(function(){return j})),n.d(e,"o",(function(){return T})),n.d(e,"n",(function(){return P})),n.d(e,"e",(function(){return y})),n.d(e,"y",(function(){return d})),n.d(e,"u",(function(){return m})),n.d(e,"h",(function(){return S})),n.d(e,"i",(function(){return p})),n.d(e,"c",(function(){return D})),n.d(e,"j",(function(){return _})),n.d(e,"x",(function(){return N})),n.d(e,"a",(function(){return u})),n.d(e,"p",(function(){return E})),n.d(e,"m",(function(){return M})),n.d(e,"l",(function(){return A})),n.d(e,"q",(function(){return L}));var r=n(8),i=n.n(r),o=n(7),a=n.n(o),s=n(0),l=window.Element.prototype,c=l.matches||l.webkitMatchesSelector||l.mozMatchesSelector||l.msMatchesSelector,u=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(s["isArray"])(e)?a()(e):[e];if(r.length){var i=r.shift();if(i&&(!n.unique||!document.querySelector("link[href=\"".concat(i,"\"]")))){var o=document,l=o.head,c=document.createElement('link');c.href=i,c.rel='stylesheet',n.prepand?l.insertBefore(c,l.firstChild):l.appendChild(c)}t(r)}},d=function(t,e){var n={},r=Object(s["keys"])(e);for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],a=e[i];r.indexOf(i)>=0?o!==a&&(n[i]=a):n[i]=null}for(var l in e)e.hasOwnProperty(l)&&Object(s["isUndefined"])(t[l])&&(n[l]=e[l]);return n},h=function(t,e,n){e=e.split(/\s+/),t=t instanceof Array?t:[t];for(var r=function(r){t.forEach((function(t){return t.addEventListener(e[r],n)}))},i=0;i1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0;if(isNaN(t))return n;if(t=parseFloat(t),Math.floor(t)!==t){var i=e.toString().split('.')[1];r=i?i.length:0}return r?parseFloat(t.toFixed(r)):t},b=function(t){return'draggable'in document.createElement('i')&&(t?t.get('Config').nativeDnD:1)},y=function(t){return Object(s["isElement"])(t)||w(t)?t:t&&t.getEl?t.getEl():void 0},w=function(t){return t&&3===t.nodeType},x=function(t){return t&&!w(t)&&!function(t){return t&&8===t.nodeType}(t)},O=function(t,e){var n=t;return Object(s["isElement"])(t)&&(n=e(t).data('model')),n},C=function(t){var e,n={top:0,left:0,width:0,height:0};if(!t)return n;if(w(t)){var r=document.createRange();r.selectNode(t),e=r.getBoundingClientRect(),r.detach()}return e||(t.getBoundingClientRect?t.getBoundingClientRect():n)},S=function(t){return t.touches&&t.touches[0]?t.touches[0]:t},k=function(t){return t.which||t.keyCode},j=function(t){return String.fromCharCode(k(t))},T=function(t){return 27===k(t)},P=function(t){return 13===k(t)},E=function(t){return null!==t&&!Array.isArray(t)&&'object'===i()(t)},M=function(t){return Object.keys(t).length<=0},D=function(t){return t&&t.charAt(0).toUpperCase()+t.substring(1)},A=function(t){return t&&t.toHTML},L=function(t){return t&&t.toCSS},_=function(t){return t.__gjsv},N=function(t,e){t.__gjsv=e}},function(t,e,n){"use strict";(function(t){n.d(e,"e",(function(){return r})),n.d(e,"p",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"o",(function(){return l})),n.d(e,"q",(function(){return c})),n.d(e,"t",(function(){return u})),n.d(e,"i",(function(){return d})),n.d(e,"r",(function(){return h})),n.d(e,"s",(function(){return f})),n.d(e,"k",(function(){return p})),n.d(e,"m",(function(){return g})),n.d(e,"j",(function(){return v})),n.d(e,"l",(function(){return m})),n.d(e,"g",(function(){return b})),n.d(e,"f",(function(){return y})),n.d(e,"h",(function(){return w})),n.d(e,"n",(function(){return x})),n.d(e,"b",(function(){return O}));var r='1.12.0',i='object'==typeof self&&self.self===self&&self||'object'==typeof t&&t.global===t&&t||Function('return this')()||{},o=Array.prototype,a=Object.prototype,s='undefined'!=typeof Symbol?Symbol.prototype:null,l=o.push,c=o.slice,u=a.toString,d=a.hasOwnProperty,h='undefined'!=typeof ArrayBuffer,f='undefined'!=typeof DataView,p=Array.isArray,g=Object.keys,v=Object.create,m=h&&ArrayBuffer.isView,b=isNaN,y=isFinite,w=!{toString:null}.propertyIsEnumerable('toString'),x=['valueOf','isPrototypeOf','toString','propertyIsEnumerable','hasOwnProperty','toLocaleString'],O=Math.pow(2,53)-1}).call(this,n(26))},function(t,e,n){"use strict";n.d(e,"b",(function(){return k}));var r=n(8),i=n.n(r),o=n(7),a=n.n(o),s=n(2),l=n.n(s),c=n(0),u=n(3),d=n(23),h=n(1),f=n.n(h),p=n(21),g=n(10),v=n(12);function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function b(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n=this.target,r=this.get('name');if(!Object(c["isUndefined"])(t)){var i=t;if('false'===t?i=!1:'true'===t&&(i=!0),this.get('changeProp'))n.set(r,i,e);else{var o=b({},n.get('attributes'));o[r]=i,n.set('attributes',o,e)}}},setValueFromInput:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={value:t};this.set(r,b(b({},n),{},{avoidStore:1})),e&&(this.set('value','',n),this.set(r,n))},getInitValue:function(){var t,e=this.target,n=this.get('name');if(e){var r=e.get('attributes');t=this.get('changeProp')?e.get(n):r[n]}return t||this.get('value')||this.get('default')}}),w=f.a.Collection.extend({model:y,initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.em=e.em||'',this.listenTo(this,'add',this.handleAdd),this.listenTo(this,'reset',this.handleReset)},handleReset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.previousModels,r=void 0===n?[]:n;r.forEach((function(t){return t.trigger('remove')}))},handleAdd:function(t){var e=this.target;e&&(t.target=e)},setTarget:function(t){this.target=t},add:function(t,e){var n=this.em;if(Object(c["isString"])(t)||Object(c["isArray"])(t)){var r=n&&n.get&&n.get('TraitManager'),i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{build:function(e){var n=[];'string'==typeof e&&(e=[e]);for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(c["bindAll"])(this,'__upSymbProps','__upSymbCls','__upSymbComps');var r=n.em,i=this.parent(),o=i&&i.attributes;if(o&&o.propagate){var a={},s=o.propagate;s.forEach((function(t){return a[t]=i.get(t)})),a.propagate=s,a=O(O({},a),e),this.set(a)}var l=this.get('propagate');l&&this.set('propagate',Object(c["isArray"])(l)?l:[l]),n&&n.config&&n.config.voidElements.indexOf(this.get('tagName'))>=0&&this.set('void',!0),n.em=r,this.opt=n,this.em=r,this.frame=n.frame,this.config=n.config||{},this.set('attributes',O(O({},this.defaults.attributes||{}),this.get('attributes')||{})),this.ccid=P.createId(this,n),this.initClasses(),this.initTraits(),this.initComponents(),this.initToolbar(),this.initScriptProps(),this.listenTo(this,'change:script',this.scriptUpdated),this.listenTo(this,'change:tagName',this.tagUpdated),this.listenTo(this,'change:attributes',this.attrUpdated),this.listenTo(this,'change:attributes:id',this._idUpdated),this.on('change:toolbar',this.__emitUpdateTlb),this.set('status',''),this.views=[],['classes','traits','components'].forEach((function(e){var n="add remove ".concat('components'!==e?'change':'');t.listenTo(t.get(e),n.trim(),(function(){for(var n=arguments.length,r=new Array(n),i=0;i2&&void 0!==arguments[2]?arguments[2]:{},i=this.get('attributes'),o=i.class;o&&this.setClass(o),delete i.class;var a=i.style;a&&this.setStyle(a),delete i.style;var s=O({},this.previous('attributes')),l=Object(u["y"])(s,this.get('attributes'));Object(c["keys"])(l).forEach((function(t){return n.trigger("change:attributes:".concat(t),n,l[t],r)}))},setAttributes:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.set('attributes',O({},t),e),this},addAttributes:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.setAttributes(O(O({},this.getAttributes({noClass:1})),t),e)},removeAttributes:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Array.isArray(t)?t:[t],r=this.getAttributes();return n.map((function(t){return delete r[t]})),this.setAttributes(r,e)},getStyle:function(){var t=this.em;if(t&&t.getConfig('avoidInlineStyle')){var e=t.get('state'),n=t.get('CssComposer').getIdRule(this.getId(),{state:e});if(this.rule=n,n)return n.getStyle()}return d["a"].getStyle.call(this)},setStyle:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em,i=this.opt;if(r&&r.getConfig('avoidInlineStyle')&&!i.temporary){var o=this.get('style')||{};e=O(O({},e=Object(c["isString"])(e)?this.parseStyle(e):e),o);var a=r.get('state'),s=r.get('CssComposer'),l=this.getStyle();this.rule=s.setIdRule(this.getId(),e,O(O({},n),{},{state:a}));var h=Object(u["y"])(l,e);this.set('style','',{silent:1}),Object(c["keys"])(h).forEach((function(e){return t.trigger("change:style:".concat(e))}))}else e=d["a"].setStyle.apply(this,arguments);return e},getAttributes:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.em,r=[],i=O({},this.get('attributes')),o=n&&n.get('SelectorManager'),a=this.getId();(e.noClass||(this.get('classes').forEach((function(t){return r.push(Object(c["isString"])(t)?t:t.get('name'))})),r.length&&(i.class=r.join(' '))),Object(c["has"])(i,'id'))||(S(n)?t=o&&o.get(a,o.Selector.TYPE_ID):Object(c["isEmpty"])(this.getStyle())||(t=1),t&&(i.id=this.getId()));return i},addClass:function(t){var e=this.em.get('SelectorManager').addClass(t);return this.get('classes').add(e)},setClass:function(t){return this.get('classes').reset(),this.addClass(t)},removeClass:function(t){var e=[];t=Object(c["isArray"])(t)?t:[t];var n=this.get('classes'),r=g["a"].TYPE_CLASS;return t.forEach((function(t){t.split(' ').forEach((function(t){var i=n.where({name:t,type:r})[0];i&&e.push(n.remove(i))}))})),e},getClasses:function(){var t=this.getAttributes().class;return t?t.split(' '):[]},__logSymbol:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.__getSymbol(),i=this.__getSymbols();(r||i)&&this.em.log(t,{model:this,toUp:e,context:'symbols',opts:n})},__initSymb:function(){this.__symbReady||(this.on('change',this.__upSymbProps),this.__symbReady=1)},__isSymbol:function(){return Object(c["isArray"])(this.get(j))},__isSymbolOrInst:function(){return!(!this.__isSymbol()&&!this.get(T))},__isSymbolTop:function(){var t=this.parent();return this.__isSymbolOrInst()&&(!t||t&&!t.__isSymbol()&&!t.__getSymbol())},__getAllById:function(){var t=this.em;return t?t.get('DomComponents').allById():{}},__getSymbol:function(){var t=this.get(T);if(t&&Object(c["isString"])(t)){var e=this.__getAllById()[t];e?(t=e,this.set(T,e)):t=0}return t},__getSymbols:function(){var t=this,e=this.get(j);return e&&Object(c["isArray"])(e)&&(e.forEach((function(n,r){n&&Object(c["isString"])(n)&&(e[r]=t.__getAllById()[n])})),e=e.filter((function(t){return t&&!Object(c["isString"])(t)}))),e},__getSymbToUp:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.em,n=e&&e.get('symbols'),r=t.fromInstance,i=this.__getSymbols()||[],o=this.__getSymbol(),a=o&&!r?[o]:i.filter((function(t){return t.collection||t.prevColl}));return r&&(a=a.filter((function(t){return t!==r}))),n?a:[]},__getSymbTop:function(t){for(var e=this,n=this.parent(t);n&&(n.__isSymbol()||n.__getSymbol());)e=n,n=n.parent(t);return e},__upSymbProps:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.changedAttributes(),i=r.attributes||{};if(delete r.status,delete r.open,delete r[j],delete r[T],delete r.attributes,delete i.id,Object(u["m"])(i)||(r.attributes=i),!Object(u["m"])(r)){var o=this.__getSymbToUp(n);this.__logSymbol('props',o,{opts:n,changed:r}),o.forEach((function(t){return t.set(r,O({fromInstance:e},n))}))}},__upSymbCls:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.__getSymbToUp();this.__logSymbol('classes',i,{opts:r}),i.forEach((function(t){t.set('classes',n.get('classes'),{fromInstance:n})}))},__upSymbComps:function(t,e,n){var r=this,i={fromInstance:(n||e||{}).fromInstance},o=t.opt.temporary;if(n){if(n.add){var s=[],l=!!this.__getSymbols(),c=this.__getSymbToUp(i);if(c.length){var u=t.__getSymbol();s=(u?u.__getSymbols():t.__getSymbols())||[],(s=a()(s)).push(u||t)}!o&&this.__logSymbol('add',c,{opts:n,addedInstances:s.map((function(t){return t.cid})),added:t.cid}),c.forEach((function(e){var i=e.__getSymbTop(),o=s.filter((function(t){var e=t.__getSymbTop({prev:1});return i&&e&&e===i}))[0]||t.clone({symbol:1,symbolInv:l});e.append(o,O({fromInstance:r},n))}))}else if(!t.__isSymbolTop()){var d=t.__getSymbToUp(i);!o&&this.__logSymbol('remove',d,{opts:n,removed:t.cid}),d.forEach((function(e){var o=O({fromInstance:t},n);if(e.__isSymbolTop()&&e.__getSymbols()){var a=e.__getSymbToUp(O({fromInstance:t},i));r.__logSymbol('remove-inst',a,{opts:n,symbol:e}),a.forEach((function(t){t.remove(o)}))}else e.remove(o)}))}}else{var h=this.__getSymbToUp(i);this.__logSymbol('reset',h),h.forEach((function(n){var i=t.models.map((function(t){return t.clone({symbol:1})}));n.components().reset(i,O({fromInstance:r},e))}))}},initClasses:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r='change:classes',i=this.get('attributes').class||[],o=[this,r,this.initClasses],a=this.get('classes')||i,s=Object(c["isString"])(a)?a.split(' '):a;this.stopListening.apply(this,o);var l=this.normalizeClasses(s),u=new v["a"]([]);return this.set('classes',u,n),u.add(l),u.on('add remove reset',this.__upSymbCls),this.listenTo.apply(this,o),this},initComponents:function(){var t=[this,'change:components',this.initComponents];this.stopListening.apply(this,t);var e=new p["a"](null,this.opt);e.parent=this;var n=this.get('components'),r=!this.opt.avoidChildren;return this.set('components',e),r&&e.add(Object(c["isFunction"])(n)?n(this):n,this.opt),e.on('add remove reset',this.__upSymbComps),this.listenTo.apply(this,t),this},initTraits:function(t){var e=this.em,n=[this,'change:traits',this.initTraits];this.stopListening.apply(this,n),this.loadTraits();var r=O({},this.get('attributes')),i=this.get('traits');return i.each((function(t){if(!t.get('changeProp')){var e=t.get('name'),n=t.getInitValue();e&&n&&(r[e]=n)}})),i.length&&this.set('attributes',r),this.listenTo.apply(this,n),t&&e&&e.trigger('component:toggled'),this},initScriptProps:function(){if(!this.opt.temporary){var t='script-props',e=["change:".concat(t),this.initScriptProps];this.off.apply(this,e);var n=this.previous(t)||[],r=this.get(t)||[],i=n.map((function(t){return"change:".concat(t)})).join(' '),o=r.map((function(t){return"change:".concat(t)})).join(' ');i&&this.off(i,this.__scriptPropsChange),o&&this.on(o,this.__scriptPropsChange),this.on.apply(this,e)}},__scriptPropsChange:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.avoidStore||this.trigger('rerender')},append:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(c["isArray"])(t)?t:[t],r=n.map((function(t){return Object(c["isString"])(t)||t.collection&&t.collection.remove(t,{temporary:1}),t})),i=this.components().add(r,e);return Object(c["isArray"])(i)?i:[i]},components:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.get('components');return Object(c["isUndefined"])(t)?n:(n.reset(null,e),t&&this.append(t,e))},empty:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.components().reset(null,t),this},parent:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.collection||t.prev&&this.prevColl;return e&&e.parent},scriptUpdated:function(){this.set('scriptUpdated',1)},initToolbar:function(){var t=this.em,e=t&&t.getConfig('stylePrefix')||'';if(!this.get('toolbar')){var n=[];this.collection&&n.push({attributes:{class:'fa fa-arrow-up'},command:function(t){return t.runCommand('core:component-exit',{force:1})}}),this.get('draggable')&&n.push({attributes:{class:"fa fa-arrows ".concat(e,"no-touch-actions"),draggable:!0},command:'tlb-move'}),this.get('copyable')&&n.push({attributes:{class:'fa fa-clone'},command:'tlb-clone'}),this.get('removable')&&n.push({attributes:{class:'fa fa-trash-o'},command:'tlb-delete'}),this.set('toolbar',n)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t=t||this.get('traits'),!((t=Object(c["isFunction"])(t)?t(this):t)instanceof w)){var n=new w([],this.opt);n.setTarget(this),t.length&&(t.forEach((function(t){return t.attributes&&delete t.attributes.value})),n.add(t)),this.set('traits',n,e)}return this},getTrait:function(t){return this.get('traits').filter((function(e){return e.get('id')===t||e.get('name')===t}))[0]},updateTrait:function(t,e){var n=this.em,r=this.getTrait(t);return r&&r.set(e),n&&n.trigger('component:toggled'),this},getTraitIndex:function(t){var e=this.getTrait(t);return e?this.get('traits').indexOf(e):-1},removeTrait:function(t){var e=this,n=this.em,r=(Object(c["isArray"])(t)?t:[t]).map((function(t){return e.getTrait(t)})),i=this.get('traits').remove(r);return n&&n.trigger('component:toggled'),i},addTrait:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.em,r=this.get('traits').add(t,e);return n&&n.trigger('component:toggled'),r},normalizeClasses:function(t){var e=[],n=this.em,r=n&&n.get('SelectorManager');if(r)return t.models?a()(t.models):(t.forEach((function(t){return e.push(r.add(t))})),e)},clone:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.em,n=O({},this.attributes),r=O({},this.opt),i=this.getId(),o=e&&e.get('CssComposer');n.attributes=O({},n.attributes),delete n.attributes.id,n.components=[],n.classes=[],n.traits=[],this.__isSymbolTop()&&(t.symbol=1),this.get('components').each((function(e,r){n.components[r]=e.clone(O(O({},t),{},{_inner:1}))})),this.get('traits').each((function(t,e){n.traits[e]=t.clone()})),this.get('classes').each((function(t,e){n.classes[e]=t.get('name')})),n.status='',r.collection=null;var a=new this.constructor(n,r),s="#".concat(a.getId()),l=o?o.getRules("#".concat(i)):[];l.forEach((function(t){var e=t.clone();e.set('selectors',[s]),o.getAll().add(e)})),a.unset(j);var c=this.__getSymbol(),u=this.__getSymbols();t.symbol||!c&&!u?c?(c.get(j).push(a),a.__initSymb()):t.symbol&&(this.__isSymbol()?(this.get(j).push(a),a.set(T,this),a.__initSymb()):t.symbolInv?(this.set(j,[a]),a.set(T,this),[this,a].map((function(t){return t.__initSymb()}))):(a.set(j,[this]),[this,a].map((function(t){return t.__initSymb()})),this.set(T,a))):(a.unset(T),a.unset(j));var d='component:clone';return e&&e.trigger(d,a),this.trigger(d,a),a},getName:function(){var t=this.em,e=this.attributes,n=e.type,r=e.tagName,i=this.get('name'),o='div'==r,a=n||(o?'box':r),s=!n&&r&&!o&&r,l='domComponents.names.',c=i&&t&&t.t("".concat(l).concat(i)),d=s&&t&&t.t("".concat(l).concat(s)),h=t&&(t.t("".concat(l).concat(n))||t.t("".concat(l).concat(r)));return this.get('custom-name')||c||i||d||Object(u["c"])(s)||h||Object(u["c"])(a)},getIcon:function(){var t=this.get('icon');return t?t+' ':''},toHTML:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this,n=[],r=t.tag,i=r||e.get('tagName'),o=e.get('void'),a=t.attributes,s=this.getAttrToHTML();for(var l in delete t.tag,a&&(Object(c["isFunction"])(a)?s=a(e,s)||{}:Object(c["isObject"])(a)&&(s=a)),s){var u=s[l],d=Object(c["isString"])(u)?u.replace(/"/g,'"'):u;Object(c["isUndefined"])(d)||(Object(c["isBoolean"])(d)?d&&n.push(l):n.push("".concat(l,"=\"").concat(d,"\"")))}var h=e.get('components'),f=h.length?'':e.get('content'),p=n.length?" ".concat(n.join(' ')):'',g="<".concat(i).concat(p).concat(o?'/':'',">").concat(f);return h.forEach((function(e){return g+=e.toHTML(t)})),!o&&(g+="")),g},getAttrToHTML:function(){var t=this.getAttributes();return delete t.style,t},toJSON:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=f.a.Model.prototype.toJSON.call(this,t);return e.attributes=this.getAttributes(),delete e.attributes.class,delete e.toolbar,delete e.traits,delete e.status,delete e.open,t.keepSymbols||(e[j]&&(e[j]=this.__getSymbToUp().map((function(t){return t.getId()}))),e[T]&&!Object(c["isString"])(e[T])&&(e[T]=e[T].getId())),this.em.getConfig('avoidDefaults')&&this.getChangedProps(e),e},getChangedProps:function(t){var e=t||f.a.Model.prototype.toJSON.apply(this),n=Object(c["result"])(this,'defaults');return Object(c["forEach"])(n,(function(t,n){-1===['type'].indexOf(n)&&e[n]===t&&delete e[n]})),Object(c["isEmpty"])(e.type)&&delete e.type,Object(c["forEach"])(['attributes','style'],(function(t){Object(c["isEmpty"])(n[t])&&Object(c["isEmpty"])(e[t])&&delete e[t]})),Object(c["forEach"])(['classes','components'],(function(t){(!e[t]||Object(c["isEmpty"])(n[t])&&!e[t].length)&&delete e[t]})),e},getId:function(){return(this.get('attributes')||{}).id||this.ccid||this.cid},setId:function(t,e){var n=O({},this.get('attributes'));return n.id=t,this.set('attributes',n,e),this},getEl:function(t){var e=this.getView(t);return e&&e.el},getView:function(t){var e=this.view,n=this.views;return t&&(e=n.filter((function(e){return e._getFrame()===t.view}))[0]),e},getCurrentView:function(){var t=(this.em.get('currentFrame')||{}).model;return this.getView(t)},__getScriptProps:function(){var t=this.props();return(this.get('script-props')||[]).reduce((function(e,n){return e[n]=t[n],e}),{})},getScriptString:function(t){var e=this,n=t||this.get('script');if(!n)return n;if(this.get('script-props'))n=n.toString().trim();else{if('function'==typeof n){var r=n.toString().trim();n=(r=r.replace(/^function[\s\w]*\(\)\s?\{/,'').replace(/\}$/,'')).trim()}var o=this.em.getConfig(),a=C(o.tagVarStart||'{[ '),s=C(o.tagVarEnd||' ]}'),l=new RegExp("".concat(a,"([\\w\\d-]*)").concat(s),'g');n=n.replace(l,(function(t,n){e.scriptUpdated();var r=e.attributes[n]||'';return Object(c["isArray"])(r)||'object'==i()(r)?JSON.stringify(r):r}))}return n},emitUpdate:function(t){for(var e=this.em,n='component:update'+(t?":".concat(t):''),r=arguments.length,i=new Array(r>1?r-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{},n=this.em,r=this.collection,i=function(){return r&&r.remove(t,e)},o=O({},e);return[this,n].map((function(e){return e.trigger('component:remove:before',t,i,o)})),!o.abort&&i(),this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.remove({temporary:1}),t&&t.append(this,e),this},resetId:function(){var t=this.em,e=this.getId();if(e){var n=P.createId(this);this.setId(n);var r=t&&t.get('CssComposer').getIdRule(e),i=r&&r.get('selectors').at(0);return i&&i.set('name',n),this}},_getStyleRule:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.id,n=this.em,r=e||this.getId();return n&&n.get('CssComposer').getIdRule(r)},_getStyleSelector:function(t){var e=this._getStyleRule(t);return e&&e.get('selectors').at(0)},_idUpdated:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.idUpdate){var r=this.ccid,i=this.get('attributes')||{},o=i.id,a=(this.previous('attributes')||{}).id||r,s=P.getList(this);if(s[o]||!o&&a)return this.setId(a,{idUpdate:1});delete s[a],s[o]=this,this.ccid=o;var l=this._getStyleSelector({id:a});l&&l.set({name:o,label:o})}}},{isComponent:function(t){return{tagName:t.tagName?t.tagName.toLowerCase():''}},ensureInList:function(t){var e=P.getList(t),n=t.getId(),r=e[n];if(r){if(r!==t){var i=P.getIncrementId(n,e);t.setId(i),e[i]=t}}else e[n]=t;t.components().forEach((function(t){return P.ensureInList(t)}))},createId:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=P.getList(t),i=t.get('attributes'),o=i.id;return o?(e=P.getIncrementId(o,r,n),t.setId(e)):e=P.getNewId(r),r[e]=t,e},getNewId:function(t){for(var e=Object.keys(t).length.toString().length+2,n=(Math.random()+1.1).toString(36).slice(-e),r="i".concat(n);t[r];)r=P.getNewId(t);return r},getIncrementId:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.keepIds,i=void 0===r?[]:r,o=1,a=t;if(i.indexOf(t)<0)for(;e[a];)o++,a="".concat(t,"-").concat(o);return a},getList:function(t){var e=t.opt&&t.opt.domc;return e?e.componentsById:{}},checkId:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=Object(c["isArray"])(t)?t:[t],o=r.keepIds,a=void 0===o?[]:o;i.forEach((function(t){var i=t.attributes,o=void 0===i?{}:i,s=t.components,l=o.id;if(l&&n[l]&&a.indexOf(l)<0){var u=P.getIncrementId(l,n);o.id=u,Object(c["isArray"])(e)&&e.forEach((function(t){var e=t.selectors;e.forEach((function(t,n){t==="#".concat(l)&&(e[n]="#".concat(u))}))}))}s&&P.checkId(s,e,n,r)}))}});e["a"]=P},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(1),a=n.n(o),s=n(0),l=n(21),c=n(35),u=n(12),d=n(9),h=n(3);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=t.config||{},r=n.em,i=e.opt||{},o=this.$el,a=this.el;n.draggableComponents;this.opts=t,this.modelOpt=i,this.config=n,this.em=r||'',this.pfx=n.stylePrefix||'',this.ppfx=n.pStylePrefix||'',this.attr=e.get('attributes'),this.classe=this.attr.class||[],this.listenTo(e,'change:style',this.updateStyle),this.listenTo(e,'change:attributes change:_innertext',this.renderAttributes),this.listenTo(e,'change:highlightable',this.updateHighlight),this.listenTo(e,'change:status',this.updateStatus),this.listenTo(e,'change:script rerender',this.reset),this.listenTo(e,'change:content',this.updateContent),this.listenTo(e,'change',this.handleChange),this.listenTo(e,'active',this.onActive),this.listenTo(e,'disable',this.onDisable),o.data('model',e),Object(h["x"])(a,this),e.view=this,this._getFrame()&&e.views.push(this),this.initClasses(),this.initComponents({avoidRender:1}),this.events=p(p({},this.events),this.__isDraggable()&&{dragstart:'handleDragStart'}),this.delegateEvents(),!i.temporary&&this.init(this._clbObj())},__isDraggable:function(){var t=this.model,e=this.config,n=t.attributes,r=n._innertext,i=n.draggable;return e.draggableComponents&&i&&!r},_clbObj:function(){var t=this.em,e=this.model,n=this.el;return{editor:t&&t.getEditor(),model:e,el:n}},init:function(){},removed:function(){},onActive:function(){},onDisable:function(){},remove:function(){var t=this;a.a.View.prototype.remove.apply(t,arguments);var e=t.model,n=t._getFrame()||{},r=n.model;e.components().forEach((function(t){var e=t.getView(r);e&&e.remove()}));var i=e.views;return i.splice(i.indexOf(t),1),t.removed(t._clbObj()),t.$el.data({model:'',collection:'',view:''}),delete t.model,delete t.$el,delete t.el.__gjsv,delete t.childrenView,delete t.scriptContainer,delete t.opts,t},handleDragStart:function(t){t.preventDefault(),t.stopPropagation(),this.em.get('Commands').run('tlb-move',{target:this.model,event:t})},initClasses:function(){var t=this.model,e='change:classes',n=t.get('classes');n instanceof u["a"]&&(this.stopListening(t,e,this.initClasses),this.listenTo(t,e,this.initClasses),this.listenTo(n,'add remove change',this.updateClasses),n.length&&this.importClasses())},initComponents:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=this.$el,r=this.childrenView,i='change:components',o=e.get('components'),a=[e,i,this.initComponents];o instanceof l["a"]&&(n.data('collection',o),r&&r.remove(),this.stopListening.apply(this,a),!t.avoidRender&&this.renderChildren(),this.listenTo.apply(this,a))},handleChange:function(){var t=this.model,e=Object(s["keys"])(t.changed);if(1!==e.length||'status'!==e[0])for(var n in t.emitUpdate(),t.changed)t.emitUpdate(n)},importClasses:function(){var t=this.config.em.get('SelectorManager');t&&this.model.get('classes').each((function(e){t.add(e.get('name'))}))},updateStatus:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(this.em,this.el),n=this.model.get('status'),r=(this.pfx,this.ppfx),i="".concat(r,"selected"),o="".concat(i,"-parent"),a="".concat(r,"freezed"),s="".concat(r,"hovered"),l=[i,o,a,s];this.$el.removeClass(l.join(' '));var c=e.getAttribute('class')||'',u='';switch(n){case'selected':u="".concat(c," ").concat(i);break;case'selected-parent':u="".concat(c," ").concat(o);break;case'freezed':u="".concat(c," ").concat(a);break;case'freezed-selected':u="".concat(c," ").concat(a," ").concat(i);break;case'hovered':u=t.avoidHover?'':"".concat(c," ").concat(s)}(u=u.trim())&&e.setAttribute('class',u)},updateHighlight:function(){var t=this.model.get('highlightable');this.setAttribute('data-highlightable',t?1:'')},updateStyle:function(){var t=this.model,e=this.em,n=this.el;if(e&&e.getConfig('avoidInlineStyle')){var r=t.getStyle(),i=Object(s["isEmpty"])(r);!i&&t.setStyle(r),t.get('_innertext')&&i?n.removeAttribute('id'):n.id=t.getId()}else this.setAttribute('style',t.styleToString())},updateClasses:function(){var t=this.model.get('classes').pluck('name').join(' ');this.setAttribute('class',t),this.updateStatus()},setAttribute:function(t,e){var n=this.$el;e?n.attr(t,e):n.removeAttr(t)},getClasses:function(){return this.model.getClasses().join(' ')},updateAttributes:function(){var t=[],e=this.model,n=this.$el,r=this.el,i=(this.config,e.attributes),o=i.highlightable,a=i.textable,l=p(p(p({'data-gjs-type':i.type||'default'},this.__isDraggable()?{draggable:!0}:{}),o?{'data-highlightable':1}:{}),a?{contenteditable:'false','data-gjs-textable':'true'}:{});Object(s["each"])(r.attributes,(function(e){return t.push(e.nodeName)})),t.forEach((function(t){return n.removeAttr(t)}));var c=p(p({},l),e.getAttributes());Object(s["keys"])(c).forEach((function(t){return!1===c[t]&&delete c[t]})),n.attr(c),this.updateStyle()},updateContent:function(){var t=this.model.get('content'),e=this.model.components().length;this.getChildrenContainer().innerHTML=e?'':t},prevDef:function(t){t.preventDefault()},updateScript:function(){var t=this.model,e=this.em;t.get('script')&&e&&e.get('Canvas').getCanvasView().updateScript(this)},getChildrenContainer:function(){var t=this.el;return'function'==typeof this.getChildrenSelector?t=this.el.querySelector(this.getChildrenSelector()):this.getTemplate,t},getOffsetRect:function(){var t={},e=this.el,n=0,r=0;return function i(o){var a=o.offsetParent;a?(n+=a.offsetTop,r+=a.offsetLeft,i(a)):(t.top=e.offsetTop+n,t.left=e.offsetLeft+r,t.bottom=t.top+e.offsetHeight,t.right=t.left+e.offsetWidth)}(e),t},isInViewport:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.rect,n=this.el,r=n.ownerDocument,i=r.body,o=r.defaultView.frameElement,a=e||this.getOffsetRect(),s=a.top,l=a.left,c=this._getFrame().getOffsetRect();return s>=c.scrollTop&&l>=c.scrollLeft&&s<=c.scrollBottom&&l<=o.offsetWidth+i.scrollLeft},scrollIntoView:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.getOffsetRect(),n=this.isInViewport({rect:e});if(!n||t.force){var r=this.el;'smooth'!==t.behavior?r.ownerDocument.defaultView.scrollTo(0,e.top):r.scrollIntoView(p({behavior:'smooth',block:'nearest'},t))}},reset:function(){var t=this.el;this.el='',this._ensureElement(),this._setData(),Object(d["j"])(t,this.el),this.render()},_setData:function(){var t=this.model,e=t.components();this.$el.data({model:t,collection:e,view:this})},_getFrame:function(){return this.config.frameView},renderChildren:function(){this.updateContent();var t=this.getChildrenContainer(),e=this.childrenView||new c["a"]({collection:this.model.get('components'),config:this.config,componentTypes:this.opts.componentTypes});e.render(t),this.childrenView=e;for(var n=Array.prototype.slice.call(e.el.childNodes),r=0,i=n.length;r=o?t.appendChild(e):t.insertBefore(e,i[a])},h=function(t,e){return d(t,e)},f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'',n=arguments.length>2?arguments[2]:void 0,i=document.createElement(t);return e&&Object(r["each"])(e,(function(t,e){return i.setAttribute(e,t)})),n&&(Object(r["isString"])(n)?i.innerHTML=n:i.appendChild(n)),i},p=function(t,e){var n;try{n=new window[e](t.type,t)}catch(t){(n=document.createEvent(e)).initEvent(t.type,!0,!0)}return n.keyCodeVal=t.keyCode,n._parentEvent=t,['keyCode','which'].forEach((function(t){Object.defineProperty(n,t,{get:function(){return this.keyCodeVal}})})),n},g=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Array.isArray(e)?e:[e];n.forEach((function(e){var n=e[i]||'div',a=e[o]||{},s=document.createElement(n);Object(r["each"])(a,(function(t,e){s.setAttribute(e,t)})),t.appendChild(s)}))}},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=n(0),a=1,s=2,l=i.a.Model,c=l.extend({idAttribute:'name',defaults:{name:'',label:'',type:a,active:!0,private:!1,protected:!1},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.config,r=void 0===n?{}:n,i=this.get('name'),o=this.get('label');i?o||this.set('label',i):this.set('name',o);var a=this.get('name'),s=r.escapeName,l=s?s(a):c.escapeName(a);this.set('name',l),this.em=r.em},isId:function(){return this.get('type')===s},isClass:function(){return this.get('type')===a},getFullName:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.escape,n=this.get('name'),r='';switch(this.get('type')){case a:r='.';break;case s:r='#'}return r+(e?e(n):n)},toJSON:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.em,n=l.prototype.toJSON.call(this,[t]),r=Object(o["result"])(this,'defaults');if(e&&e.getConfig('avoidDefaults')){Object(o["forEach"])(r,(function(t,e){n[e]===t&&delete n[e]})),n.label===n.name&&delete n.label;var i=Object(o["keys"])(n).length;1===i&&n.name&&(n=n.name),2===i&&n.name&&n.type&&(n=this.getFullName())}return n}},{TYPE_CLASS:a,TYPE_ID:s,escapeName:function(t){return"".concat(t).trim().replace(/([^a-z0-9\w-\:]+)/gi,'-')}});e["a"]=c},function(t,e,n){"use strict";n.r(e);var r=document,i=window,o=Array.prototype,a=o.filter,s=o.indexOf,l=o.map,c=o.push,u=o.reverse,d=o.slice,h=o.splice,f=/^#[\w-]*$/,p=/^\.[\w-]*$/,g=/<.+>/,v=/^\w+$/;function m(t,e){return void 0===e&&(e=r),p.test(t)?e.getElementsByClassName(t.slice(1)):v.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function b(t,e){if(void 0===e&&(e=r),t){if(t.__cash)return t;var n=t;if(P(t)){if(e.__cash&&(e=e[0]),!(n=f.test(t)?e.getElementById(t.slice(1)):g.test(t)?ht(t):m(t,e)))return}else if(T(t))return this.ready(t);(n.nodeType||n===i)&&(n=[n]),this.length=n.length;for(var o=0,a=this.length;o=0})):n.value=i}))},w.clone=function(){return this.map((function(t,e){return e.cloneNode(!0)}))},w.detach=function(){return this.each((function(t,e){e.parentNode&&e.parentNode.removeChild(e)}))};var ct,ut=/^\s*<(\w+)[^>]*>/,dt=/^\s*<(\w+)\s*\/?>(?:<\/\1>)?\s*$/;function ht(t){if(function(){if(!ct){var t=r.createElement('table'),e=r.createElement('tr');ct={'*':r.createElement('div'),tr:r.createElement('tbody'),td:e,th:e,thead:t,tbody:t,tfoot:t}}}(),!P(t))return[];if(dt.test(t))return[r.createElement(RegExp.$1)];var e=ut.test(t)&&RegExp.$1,n=ct[e]||ct['*'];return n.innerHTML=t,y(n.childNodes).detach().get()}function ft(t,e,n){if(void 0!==e){var r=P(e);!r&&e.length?S(e,(function(e){return ft(t,e,n)})):S(t,r?function(t){t.insertAdjacentHTML(n?'afterbegin':'beforeend',e)}:function(t,r){return function(t,e,n){n?t.insertBefore(e,t.childNodes[0]):t.appendChild(e)}(t,r?e.cloneNode(!0):e,n)})}}y.parseHTML=ht,w.empty=function(){var t=this[0];if(t)for(;t.firstChild;)t.removeChild(t.firstChild);return this},w.append=function(){var t=this;return S(arguments,(function(e){ft(t,e)})),this},w.appendTo=function(t){return ft(y(t),this),this},w.html=function(t){if(void 0===t)return this[0]&&this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each((function(t,n){n.innerHTML=e}))},w.insertAfter=function(t){var e=this;return y(t).each((function(t,n){var r=n.parentNode;e.each((function(e,i){r.insertBefore(t?i.cloneNode(!0):i,n.nextSibling)}))})),this},w.after=function(){var t=this;return S(u.apply(arguments),(function(e){u.apply(y(e).slice()).insertAfter(t)})),this},w.insertBefore=function(t){var e=this;return y(t).each((function(t,n){var r=n.parentNode;e.each((function(e,i){r.insertBefore(t?i.cloneNode(!0):i,n)}))})),this},w.before=function(){var t=this;return S(arguments,(function(e){y(e).insertBefore(t)})),this},w.prepend=function(){var t=this;return S(arguments,(function(e){ft(t,e,!0)})),this},w.prependTo=function(t){return ft(y(t),u.apply(this.slice()),!0),this},w.remove=function(){return this.detach().off()},w.replaceWith=function(t){var e=this;return this.each((function(n,r){var i=r.parentNode;if(i){var o=n?y(t).clone():y(t);if(!o[0])return e.remove(),!1;i.replaceChild(o[0],r),y(o[0]).after(o.slice(1))}}))},w.replaceAll=function(t){return y(t).replaceWith(this),this},w.text=function(t){return void 0===t?this[0]?this[0].textContent:'':this.each((function(e,n){n.textContent=t}))};var pt=r.documentElement;w.offset=function(){var t=this[0];if(t){var e=t.getBoundingClientRect();return{top:e.top+i.pageYOffset-pt.clientTop,left:e.left+i.pageXOffset-pt.clientLeft}}},w.offsetParent=function(){return y(this[0]&&this[0].offsetParent)},w.position=function(){var t=this[0];if(t)return{left:t.offsetLeft,top:t.offsetTop}},w.children=function(t){var e=[];return this.each((function(t,n){c.apply(e,n.children)})),e=y(_(e)),t?e.filter((function(e,n){return j(n,t)})):e},w.contents=function(){var t=[];return this.each((function(e,n){c.apply(t,'IFRAME'===n.tagName?[n.contentDocument]:n.childNodes)})),y(t.length&&_(t))},w.find=function(t){for(var e=[],n=0,r=this.length;n0&&void 0!==arguments[0]?arguments[0]:{},e=t.noDisabled;return Object(r["filter"])(this.models,(function(t){return!t.get('private')})).filter((function(t){return e?t.get('active'):1}))},getFullString:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t||this;return r.forEach((function(t){return n.push(t.getFullName(e))})),n.join('').trim()}})},function(t,e,n){ true&&(t.exports=function(){'use strict';var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),d=/Opera\//.test(t),h=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),p=/PhantomJS/.test(t),g=h&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),v=/Android/.test(t),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),b=g||/Mac/.test(e),y=/\bCrOS\b/.test(t),w=/win/i.test(e),x=d&&t.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,l=!0);var O=b&&(c||d&&(null==x||x<12.11)),C=n||a&&s>=9;function S(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var k,j=function(t,e){var n=t.className,r=S(e).exec(n);if(r){var i=n.slice(r.index+r[0].length);t.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function P(t,e){return T(t).appendChild(e)}function E(t,e,n,r){var i=document.createElement(t);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return a+(e-o);a+=s-o,a+=n-a%n,o=s+1}}g?N=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:a&&(N=function(t){try{t.select()}catch(t){}});var R=function(){this.id=null,this.f=null,this.time=0,this.handler=I(this.onTimeout,this)};function z(t,e){for(var n=0;n=e)return r+Math.min(a,e-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=e)return r}}var G=[""];function K(t){for(;G.length<=t;)G.push(Y(G)+" ");return G[t]}function Y(t){return t[t.length-1]}function X(t,e){for(var n=[],r=0;r"€"&&(t.toUpperCase()!=t.toLowerCase()||Q.test(t))}function et(t,e){return e?!!(e.source.indexOf("\\w")>-1&&tt(t))||e.test(t):tt(t)}function nt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var rt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function it(t){return t.charCodeAt(0)>=768&&rt.test(t)}function ot(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var i=(e+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+r}}var st=null;function lt(t,e,n){var r;st=null;for(var i=0;ie)return i;o.to==e&&(o.from!=o.to&&"before"==n?r=i:st=i),o.from==e&&(o.from!=o.to&&"before"!=n?r=i:st=i)}return null!=r?r:st}var ct=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,a=/[1n]/;function s(t,e,n){this.level=t,this.from=e,this.to=n}return function(l,c){var u="ltr"==c?"L":"R";if(0==l.length||"ltr"==c&&!n.test(l))return!1;for(var d,h=l.length,f=[],p=0;p-1&&(r[e]=i.slice(0,o).concat(i.slice(o+1)))}}}function gt(t,e){var n=ft(t,e);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function yt(t){t.prototype.on=function(t,e){ht(this,t,e)},t.prototype.off=function(t,e){pt(this,t,e)}}function wt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function xt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ot(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ct(t){wt(t),xt(t)}function St(t){return t.target||t.srcElement}function kt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),b&&t.ctrlKey&&1==e&&(e=3),e}var jt,Tt,Pt=function(){if(a&&s<9)return!1;var t=E('div');return"draggable"in t||"dragDrop"in t}();function Et(t){if(null==jt){var e=E("span","​");P(t,E("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(jt=e.offsetWidth<=1&&e.offsetHeight>2&&!(a&&s<8))}var n=jt?E("span","​"):E("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Mt(t){if(null!=Tt)return Tt;var e=P(t,document.createTextNode("AخA")),n=k(e,0,1).getBoundingClientRect(),r=k(e,1,2).getBoundingClientRect();return T(t),!(!n||n.left==n.right)&&(Tt=r.right-n.right<3)}var Dt,At=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],r=t.length;e<=r;){var i=t.indexOf("\n",e);-1==i&&(i=t.length);var o=t.slice(e,"\r"==t.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),e+=a+1):(n.push(o),e=i+1)}return n}:function(t){return t.split(/\r\n?|\n/)},Lt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},_t="oncopy"in(Dt=E("div"))||(Dt.setAttribute("oncopy","return;"),"function"==typeof Dt.oncopy),Nt=null,It={},Ft={};function Vt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),It[t]=e}function Rt(t){if("string"==typeof t&&Ft.hasOwnProperty(t))t=Ft[t];else if(t&&"string"==typeof t.name&&Ft.hasOwnProperty(t.name)){var e=Ft[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Rt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Rt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function zt(t,e){e=Rt(e);var n=It[e.name];if(!n)return zt(t,"text/plain");var r=n(t,e);if(Ht.hasOwnProperty(e.name)){var i=Ht[e.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)r[a]=e.modeProps[a];return r}var Ht={};function $t(t,e){F(e,Ht.hasOwnProperty(t)?Ht[t]:Ht[t]={})}function Ut(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var i=e[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Bt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Wt(t,e,n){return!t.startState||t.startState(e,n)}var qt=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Gt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(e=t.first&&en?ee(n,Gt(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?ee(t.line,e):n<0?ee(t.line,0):t}(e,Gt(t,e.line).text.length)}function ce(t,e){for(var n=[],r=0;r=this.string.length},qt.prototype.sol=function(){return this.pos==this.lineStart},qt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qt.prototype.next=function(){if(this.pose},qt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},qt.prototype.skipToEnd=function(){this.pos=this.string.length},qt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},qt.prototype.backUp=function(t){this.pos-=t},qt.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var i=function(t){return n?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},qt.prototype.current=function(){return this.string.slice(this.start,this.pos)},qt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},qt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},qt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ue=function(t,e){this.state=t,this.lookAhead=e},de=function(t,e,n,r){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function he(t,e,n,r){var i=[t.state.modeGen],o={};xe(t,e.text,t.doc.mode,n,(function(t,e){return i.push(t,e)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=t.state.overlays[r],l=1,c=0;n.state=!0,xe(t,e.text,s.mode,n,(function(t,e){for(var n=l;ct&&i.splice(l,1,t,i[l+1],r),l+=2,c=Math.min(t,r)}if(e)if(s.opaque)i.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&Ut(t.doc.mode,r.state),o=he(t,e,r);i&&(r.state=i),e.stateAfter=r.save(!i),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function pe(t,e,n){var r=t.doc,i=t.display;if(!r.mode.startState)return new de(r,!0,e);var o=function(t,e,n){for(var r,i,o=t.doc,a=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>a;--s){if(s<=o.first)return o.first;var l=Gt(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ue?c.lookAhead:0)<=o.modeFrontier))return s;var u=V(l.text,null,t.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(t,e,n),a=o>r.first&&Gt(r,o-1).stateAfter,s=a?de.fromSaved(r,a,o):new de(r,Wt(r.mode),o);return r.iter(o,e,(function(n){ge(t,n.text,s);var r=s.line;n.stateAfter=r==e-1||r%5==0||r>=i.viewFrom&&re.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}de.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},de.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},de.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},de.fromSaved=function(t,e,n){return e instanceof ue?new de(t,Ut(t.mode,e.state),n,e.lookAhead):new de(t,Ut(t.mode,e),n)},de.prototype.save=function(t){var e=!1!==t?Ut(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ue(e,this.maxLookAhead):e};var be=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function ye(t,e,n,r){var i,o,a=t.doc,s=a.mode,l=Gt(a,(e=le(a,e)).line),c=pe(t,e.line,n),u=new qt(l.text,t.options.tabSize,c);for(r&&(o=[]);(r||u.post.options.maxHighlightLength?(s=!1,a&&ge(t,e,r,d.pos),d.pos=e.length,l=null):l=we(me(n,d,r.state,h),o),h){var f=h[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c=e:o.to>e);(r||(r=[])).push(new Se(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(t,e,n){var r;if(t)for(var i=0;i=e:o.to>e)||o.from==e&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from0&&s)for(var y=0;ye)&&(!n||Le(n,o.marker)<0)&&(n=o.marker)}return n}function Ve(t,e,n,r,i){var o=Gt(t,e),a=Ce&&o.markedSpans;if(a)for(var s=0;s=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ne(c.to,n)>=0:ne(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ne(c.from,r)<=0:ne(c.from,r)<0)))return!0}}}function Re(t){for(var e;e=Ne(t);)t=e.find(-1,!0).line;return t}function ze(t,e){var n=Gt(t,e),r=Re(n);return n==r?e:Jt(r)}function He(t,e){if(e>t.lastLine())return e;var n,r=Gt(t,e);if(!$e(t,r))return e;for(;n=Ie(r);)r=n.find(1,!0).line;return Jt(r)+1}function $e(t,e){var n=Ce&&e.markedSpans;if(n)for(var r=void 0,i=0;ie.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var Ge=function(t,e,n){this.text=t,Me(this,e),this.height=n?n(this):1};function Ke(t){t.parent=null,Ee(t)}Ge.prototype.lineNo=function(){return Jt(this)},yt(Ge);var Ye={},Xe={};function Je(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?Xe:Ye;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Ze(t,e){var n=M("span",null,null,l?"padding-right: .1px":null),r={pre:M("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var o=i?e.rest[i-1]:e.line,a=void 0;r.pos=0,r.addToken=tn,Mt(t.display.measure)&&(a=ut(o,t.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],rn(o,r,fe(t,o,e!=t.display.externalMeasured&&Jt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=_(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=_(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Et(t.display.measure))),0==i?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return gt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=_(r.pre.className,r.textClass||"")),r}function Qe(t){var e=E("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function tn(t,e,n,r,i,o,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,r="",i=0;ic&&d.from<=c);h++);if(d.to>=u)return t(n,r,i,o,a,s,l);t(n,r.slice(0,d.to-c),i,o,null,s,l),o=null,r=r.slice(d.to-c),c=d.to}}}function nn(t,e,n,r){var i=!r&&n.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!r&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function rn(t,e,n){var r=t.markedSpans,i=t.text,o=0;if(r)for(var a,s,l,c,u,d,h,f=i.length,p=0,g=1,v="",m=0;;){if(m==p){l=c=u=s="",h=null,d=null,m=1/0;for(var b=[],y=void 0,w=0;wp||O.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,c=""),O.className&&(l+=" "+O.className),O.css&&(s=(s?s+";":"")+O.css),O.startStyle&&x.from==p&&(u+=" "+O.startStyle),O.endStyle&&x.to==m&&(y||(y=[])).push(O.endStyle,x.to),O.title&&((h||(h={})).title=O.title),O.attributes)for(var C in O.attributes)(h||(h={}))[C]=O.attributes[C];O.collapsed&&(!d||Le(d.marker,O)<0)&&(d=x)}else x.from>p&&m>x.from&&(m=x.from)}if(y)for(var S=0;S=f)break;for(var j=Math.min(f,m);1;){if(v){var T=p+v.length;if(!d){var P=T>j?v.slice(0,j-p):v;e.addToken(e,P,a?a+l:l,u,p+P.length==m?c:"",s,h)}if(T>=j){v=v.slice(j-p),p=j;break}p=T,u=""}v=i.slice(o,o=n[g++]),a=Je(n[g++],e.cm.options)}}else for(var E=1;En)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function Dn(t,e,n,r){return _n(t,Ln(t,e),n,r)}function An(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&e2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,r){var i,o=Fn(e.map,n,r),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){for(;c&&it(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,i))}else{var f;c>0&&(d=r="right"),i=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+or(t.display),top:p.top,bottom:p.bottom}:In}for(var g=i.top-e.rect.top,v=i.bottom-e.rect.top,m=(g+v)/2,b=e.view.measure.heights,y=0;ye)&&(i=(o=l-s)-1,e>=l&&(a="right")),null!=i){if(r=t[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[(c-=3)+2],a="left";if("right"==n&&i==l-s)for(;c=0&&(n=t[i]).left==n.right;i--);return n}function Rn(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(t,e,n){return a(n?t-1:t,1==s[e].level!=n)}var d=lt(s,l,c),h=st,f=u(l,d,"before"==c);return null!=h&&(f.other=u(l,h,"before"!=c)),f}function Yn(t,e){var n=0;e=le(t.doc,e),t.options.lineWrapping||(n=or(t.display)*e.ch);var r=Gt(t.doc,e.line),i=Be(r)+Sn(t.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Xn(t,e,n,r,i){var o=ee(t,e,n);return o.xRel=i,r&&(o.outside=r),o}function Jn(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return Xn(r.first,0,null,-1,-1);var i=Zt(r,n),o=r.first+r.size-1;if(i>o)return Xn(r.first+r.size-1,Gt(r,o).text.length,null,1,1);e<0&&(e=0);for(var a=Gt(r,i);;){var s=er(t,a,i,e,n),l=Fe(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=Gt(r,i=c.line)}}function Zn(t,e,n,r){r-=Bn(e);var i=e.text.length,o=at((function(e){return _n(t,n,e-1).bottom<=r}),i,0);return{begin:o,end:i=at((function(e){return _n(t,n,e).top>r}),o,i)}}function Qn(t,e,n,r){return n||(n=Ln(t,e)),Zn(t,e,n,Wn(t,e,_n(t,n,r),"line").top)}function tr(t,e,n,r){return!(t.bottom<=n)&&(t.top>n||(r?t.left:t.right)>e)}function er(t,e,n,r,i){i-=Be(e);var o=Ln(t,e),a=Bn(e),s=0,l=e.text.length,c=!0,u=ut(e,t.doc.direction);if(u){var d=(t.options.lineWrapping?rr:nr)(t,e,n,o,u,r,i);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var h,f,p=null,g=null,v=at((function(e){var n=_n(t,o,e);return n.top+=a,n.bottom+=a,!!tr(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=e,g=n),!0)}),s,l),m=!1;if(g){var b=r-g.left=w.bottom?1:0}return Xn(n,v=ot(e.text,v,1),f,m,r-h)}function nr(t,e,n,r,i,o,a){var s=at((function(s){var l=i[s],c=1!=l.level;return tr(Kn(t,ee(n,c?l.to:l.from,c?"before":"after"),"line",e,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Kn(t,ee(n,c?l.from:l.to,c?"after":"before"),"line",e,r);tr(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function rr(t,e,n,r,i,o,a){var s=Zn(t,e,r,a),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h=c||f.to<=l)){var p=_n(t,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=pg)&&(u=f,d=g)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function ir(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Nn){Nn=E("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(E("br"));Nn.appendChild(document.createTextNode("x"))}P(t.measure,Nn);var n=Nn.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),T(t.measure),n||1}function or(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=E("span","xxxxxxxxxx"),n=E("pre",[e],"CodeMirror-line-like");P(t.measure,n);var r=e.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(t.cachedCharWidth=i),i||10}function ar(t){for(var e=t.display,n={},r={},i=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=t.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:sr(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function sr(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function lr(t){var e=ir(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/or(t.display)-3);return function(i){if($e(t.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(l=Gt(t.doc,c.line).text).length==c.ch){var u=V(l,l.length,t.options.tabSize)-l.length;c=ee(c.line,Math.max(0,Math.round((o-jn(t.display).left)/or(t.display))-u))}return c}function dr(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;re)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)Ce&&ze(t.doc,e)i.viewFrom?pr(t):(i.viewFrom+=r,i.viewTo+=r);else if(e<=i.viewFrom&&n>=i.viewTo)pr(t);else if(e<=i.viewFrom){var o=gr(t,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):pr(t)}else if(n>=i.viewTo){var a=gr(t,e,e,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):pr(t)}else{var s=gr(t,e,e,-1),l=gr(t,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(an(t,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):pr(t)}var c=i.externalMeasured;c&&(n=i.lineN&&e=r.viewTo)){var o=r.view[dr(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==z(a,n)&&a.push(n)}}}function pr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function gr(t,e,n,r){var i,o=dr(t,e),a=t.display.view;if(!Ce||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var s=t.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-e,o++}else i=s-e;e+=i,n+=i}for(;ze(t.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function vr(t){for(var e=t.display.view,n=0,r=0;r=t.display.viewTo||s.to().linee||e==n&&a.to==e)&&(r(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(e,n,"ltr")}(g,n||0,null==r?h:r,(function(t,e,i,d){var v="ltr"==i,m=f(t,v?"left":"right"),b=f(e-1,v?"right":"left"),y=null==n&&0==t,w=null==r&&e==h,x=0==d,O=!g||d==g.length-1;if(b.top-m.top<=3){var C=(c?w:y)&&O,S=(c?y:w)&&x?s:(v?m:b).left,k=C?l:(v?b:m).right;u(S,m.top,k-S,m.bottom)}else{var j,T,P,E;v?(j=c&&y&&x?s:m.left,T=c?l:p(t,i,"before"),P=c?s:p(e,i,"after"),E=c&&w&&O?l:b.right):(j=c?p(t,i,"before"):s,T=!c&&y&&x?l:m.right,P=!c&&w&&O?s:b.left,E=c?p(e,i,"after"):l),u(j,m.top,T-j,m.bottom),m.bottom0?e.blinker=setInterval((function(){t.hasFocus()||jr(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Cr(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||kr(t))}function Sr(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&jr(t))}),100)}function kr(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(gt(t,"focus",t,e),t.state.focused=!0,L(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Or(t))}function jr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(gt(t,"blur",t,e),t.state.focused=!1,j(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function Tr(t){for(var e=t.display,n=e.lineDiv.offsetTop,r=0;r.005||h<-.005)&&(Xt(i.line,l),Pr(i.line),i.rest))for(var f=0;ft.display.sizerWidth){var p=Math.ceil(c/or(t.display));p>t.display.maxLineLength&&(t.display.maxLineLength=p,t.display.maxLine=i.line,t.display.maxLineChanged=!0)}}}}function Pr(t){if(t.widgets)for(var e=0;e=a&&(o=Zt(e,Be(Gt(e,l))-t.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Mr(t,e){var n=t.display,r=ir(t.display);e.top<0&&(e.top=0);var i=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=En(t),a={};e.bottom-e.top>o&&(e.bottom=e.top+o);var s=t.doc.height+kn(n),l=e.tops-r;if(e.topi+o){var u=Math.min(e.top,(c?s:e.bottom)-o);u!=i&&(a.scrollTop=u)}var d=t.options.fixedGutter?0:n.gutters.offsetWidth,h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-d,f=Pn(t)-n.gutters.offsetWidth,p=e.right-e.left>f;return p&&(e.right=e.left+f),e.left<10?a.scrollLeft=0:e.leftf+h-3&&(a.scrollLeft=e.right+(p?0:10)-f),a}function Dr(t,e){null!=e&&(_r(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Ar(t){_r(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Lr(t,e,n){null==e&&null==n||_r(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function _r(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Nr(t,Yn(t,e.from),Yn(t,e.to),e.margin))}function Nr(t,e,n,r){var i=Mr(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-r,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+r});Lr(t,i.scrollLeft,i.scrollTop)}function Ir(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||ci(t,{top:e}),Fr(t,e,!0),n&&ci(t),ii(t,100))}function Fr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Vr(t,e,n,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,hi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Rr(t){var e=t.display,n=e.gutters.offsetWidth,r=Math.round(t.doc.height+kn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Tn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var zr=function(t,e,n){this.cm=n;var r=this.vert=E("div",[E("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=E("div",[E("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,t(r),t(i),ht(r,"scroll",(function(){r.clientHeight&&e(r.scrollTop,"vertical")})),ht(i,"scroll",(function(){i.clientWidth&&e(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};zr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var i=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:e?r:0}},zr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},zr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},zr.prototype.zeroWidthHack=function(){var t=b&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},zr.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,(function r(){var i=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,r)}))},zr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Hr=function(){};function $r(t,e){e||(e=Rr(t));var n=t.display.barWidth,r=t.display.barHeight;Ur(t,e);for(var i=0;i<4&&n!=t.display.barWidth||r!=t.display.barHeight;i++)n!=t.display.barWidth&&t.options.lineWrapping&&Tr(t),Ur(t,Rr(t)),n=t.display.barWidth,r=t.display.barHeight}function Ur(t,e){var n=t.display,r=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Hr.prototype.update=function(){return{bottom:0,right:0}},Hr.prototype.setScrollLeft=function(){},Hr.prototype.setScrollTop=function(){},Hr.prototype.clear=function(){};var Br={native:zr,null:Hr};function Wr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&j(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Br[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ht(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,n){"horizontal"==n?Vr(t,e):Ir(t,e)}),t),t.display.scrollbars.addClass&&L(t.display.wrapper,t.display.scrollbars.addClass)}var qr=0;function Gr(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++qr},e=t.curOp,sn?sn.ops.push(e):e.ownsGroup=sn={ops:[e],delayedCallbacks:[]}}function Kr(t){var e=t.curOp;e&&function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ai(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Xr(t){t.updatedDisplay=t.mustUpdate&&si(t.cm,t.update)}function Jr(t){var e=t.cm,n=e.display;t.updatedDisplay&&Tr(e),t.barMeasure=Rr(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Dn(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Tn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Pn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Zr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=E("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Sn(t.display))+"px;\n height: "+(e.bottom-e.top+Tn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(i),t.display.lineSpace.removeChild(o)}}}(e,function(t,e,n,r){var i;null==r&&(r=0),t.options.lineWrapping||e!=n||(n="before"==(e=e.ch?ee(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?ee(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var a=!1,s=Kn(t,e),l=n&&n!=e?Kn(t,n):s,c=Mr(t,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=t.doc.scrollTop,d=t.doc.scrollLeft;if(null!=c.scrollTop&&(Ir(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Vr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}(e,le(r,t.scrollToPos.from),le(r,t.scrollToPos.to),t.scrollToPos.margin));var i=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(i)for(var a=0;a=t.display.viewTo)){var n=+new Date+t.options.workTime,r=pe(t,e.highlightFrontier),i=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(o){if(r.line>=t.display.viewFrom){var a=o.styles,s=o.text.length>t.options.maxHighlightLength?Ut(e.mode,r.state):null,l=he(t,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&hn)return ii(t,t.options.workDelay),!0})),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),i.length&&ti(t,(function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==vr(t))return!1;fi(t)&&(pr(t),e.dims=ar(t));var i=r.first+r.size,o=Math.max(e.visible.from-t.options.viewportMargin,r.first),a=Math.min(i,e.visible.to+t.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Ce&&(o=ze(t.doc,o),a=He(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var r=t.display;0==r.view.length||e>=r.viewTo||n<=r.viewFrom?(r.view=an(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=an(t,e,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,dr(t,n)))),r.viewTo=n}(t,o,a),n.viewOffset=Be(Gt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=vr(t);if(!s&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=A();if(!e||!D(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(t.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(t);return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var r=t.display,i=t.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(e){var n=e.nextSibling;return l&&b&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=r.view,u=r.viewFrom,d=0;d-1&&(f=!1),dn(t,h,u,n)),f&&(T(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(te(t.options,u)))),a=h.node.nextSibling}else{var p=bn(t,h,u,n);o.insertBefore(p,a)}u+=h.size}for(;a;)a=s(a)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=A()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&D(document.body,t.anchorNode)&&D(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,ii(t,400)),n.updateLineNumbers=null,!0}function li(t,e){for(var n=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=Pn(t))r&&(e.visible=Er(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+kn(t.display)-En(t),n.top)}),e.visible=Er(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!si(t,e))break;Tr(t);var i=Rr(t);mr(t),$r(t,i),di(t,i),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function ci(t,e){var n=new ai(t,e);if(si(t,n)){Tr(t),li(t,n);var r=Rr(t);mr(t),$r(t,r),di(t,r),n.finish()}}function ui(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function di(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Tn(t)+"px"}function hi(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=sr(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&b&&l)t:for(var h=e.target,f=a.view;h!=s;h=h.parentNode)for(var p=0;p=0&&ne(t,r.to())<=0)return n}return-1};var Si=function(t,e){this.anchor=t,this.head=e};function ki(t,e,n){var r=t&&t.options.selectionsMayTouch,i=e[n];e.sort((function(t,e){return ne(t.from(),e.from())})),n=z(e,i);for(var o=1;o0:l>=0){var c=ae(s.from(),a.from()),u=oe(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,e.splice(--o,2,new Si(d?u:c,d?c:u))}}return new Ci(e,n)}function ji(t,e){return new Ci([new Si(t,e||t)],0)}function Ti(t){return t.text?ee(t.from.line+t.text.length-1,Y(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Pi(t,e){if(ne(t,e.from)<0)return t;if(ne(t,e.to)<=0)return Ti(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=Ti(e).ch-e.to.ch),ee(n,r)}function Ei(t,e){for(var n=[],r=0;r1&&t.remove(s.line+1,p-1),t.insert(s.line+1,m)}cn(t,"change",t,e)}function Ni(t,e,n){!function t(r,i,o){if(r.linked)for(var a=0;as-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(zi(t.done),Y(t.done)):t.done.length&&!Y(t.done).ranges?Y(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),Y(t.done)):void 0}(i,i.lastOp==r)))a=Y(o.changes),0==ne(e.from,e.to)&&0==ne(e.from,a.to)?a.to=Ti(e):o.changes.push(Ri(t,e));else{var l=Y(i.done);for(l&&l.ranges||Ui(t.sel,i.done),o={changes:[Ri(t,e)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,a||gt(t,"historyAdded")}function $i(t,e,n,r){var i=t.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(t,e,n,r){var i=e.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,Y(i.done),e))?i.done[i.done.length-1]=e:Ui(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&zi(i.undone)}function Ui(t,e){var n=Y(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Bi(t,e,n,r){var i=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),(function(n){n.markedSpans&&((i||(i=e["spans_"+t.id]={}))[o]=n.markedSpans),++o}))}function Wi(t){if(!t)return null;for(var e,n=0;n-1&&(Y(s)[d]=c[d],delete c[d])}}}return r}function Ki(t,e,n,r){if(r){var i=t.anchor;if(n){var o=ne(e,i)<0;o!=ne(n,i)<0?(i=e,e=n):o!=ne(e,n)<0&&(e=n)}return new Si(i,e)}return new Si(n||e,e)}function Yi(t,e,n,r,i){null==i&&(i=t.cm&&(t.cm.display.shift||t.extend)),to(t,new Ci([Ki(t.sel.primary(),e,n,i)],0),r)}function Xi(t,e,n){for(var r=[],i=t.cm&&(t.cm.display.shift||t.extend),o=0;o=e.ch:s.to>e.ch))){if(i&&(gt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),h=void 0;if((r<0?u:c)&&(d=so(t,d,-r,d&&d.line==e.line?o:null)),d&&d.line==e.line&&(h=ne(d,n))&&(r<0?h<0:h>0))return oo(t,d,e,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=so(t,f,r,f.line==e.line?o:null)),f?oo(t,f,e,r,i):null}}return e}function ao(t,e,n,r,i){var o=r||1,a=oo(t,e,n,o,i)||!i&&oo(t,e,n,o,!0)||oo(t,e,n,-o,i)||!i&&oo(t,e,n,-o,!0);return a||(t.cantEdit=!0,ee(t.first,0))}function so(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?le(t,ee(e.line-1)):null:n>0&&e.ch==(r||Gt(t,e.line)).text.length?e.line0)){var u=[l,1],d=ne(c.from,s.from),h=ne(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(t,e.from,e.to);if(r)for(var i=r.length-1;i>=0;--i)ho(t,{from:r[i].from,to:r[i].to,text:i?[""]:e.text,origin:e.origin});else ho(t,e)}}function ho(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ne(e.from,e.to)){var n=Ei(t,e);Hi(t,e,n,t.cm?t.cm.curOp.id:NaN),go(t,e,n,Te(t,e));var r=[];Ni(t,(function(t,n){n||-1!=z(r,t.history)||(yo(t.history,e),r.push(t.history)),go(t,e,null,Te(t,e))}))}}function fo(t,e,n){var r=t.cm&&t.cm.state.suppressEdits;if(!r||n){for(var i,o=t.history,a=t.sel,s="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c=0;--f){var p=h(f);if(p)return p.v}}}}function po(t,e){if(0!=e&&(t.first+=e,t.sel=new Ci(X(t.sel.ranges,(function(t){return new Si(ee(t.anchor.line+e,t.anchor.ch),ee(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){hr(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,r=n.viewFrom;rt.lastLine())){if(e.from.lineo&&(e={from:e.from,to:ee(o,Gt(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Kt(t,e.from,e.to),n||(n=Ei(t,e)),t.cm?function(t,e,n){var r=t.doc,i=t.display,o=e.from,a=e.to,s=!1,l=o.line;t.options.lineWrapping||(l=Jt(Re(Gt(r,o.line))),r.iter(l,a.line+1,(function(t){if(t==i.maxLine)return s=!0,!0}))),r.sel.contains(e.from,e.to)>-1&&mt(t),_i(r,e,n,lr(t)),t.options.lineWrapping||(r.iter(l,o.line+e.text.length,(function(t){var e=We(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,s=!1)})),s&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;r--){var i=Gt(t,r).stateAfter;if(i&&(!(i instanceof ue)||r+i.lookAhead1||!(this.children[0]instanceof xo))){var s=[];this.collapse(s),this.children=[new xo(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var a=i.lines.length%25+25,s=a;s10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=M("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ve(t,e.line,e,n,o)||e.line!=n.line&&Ve(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ce=!0}o.addToHistory&&Hi(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,n.line+1,(function(t){c&&o.collapsed&&!c.options.lineWrapping&&Re(t)==c.display.maxLine&&(s=!0),o.collapsed&&l!=e.line&&Xt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new Se(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&t.iter(e.line,n.line+1,(function(e){$e(t,e)&&Xt(e,0)})),o.clearOnEnter&&ht(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Oe=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++ko,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)hr(c,e.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=e.line;u<=n.line;u++)fr(c,u,"text");o.atomic&&ro(c.doc),cn(c,"markerAdded",c,o)}return o}jo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Gr(t),bt(this,"clear")){var n=this.find();n&&cn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;ot.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&hr(t,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&ro(t.doc)),t&&cn(t,"markerCleared",t,this,r,i),e&&Kr(t),this.parent&&this.parent.clear()}},jo.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i=0;l--)uo(this,r[l]);s?Qi(this,s):this.cm&&Ar(this.cm)})),undo:ri((function(){fo(this,"undo")})),redo:ri((function(){fo(this,"redo")})),undoSelection:ri((function(){fo(this,"undo",!0)})),redoSelection:ri((function(){fo(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,r=0;r=t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(t,e,n){t=le(this,t),e=le(this,e);var r=[],i=t.line;return this.iter(t.line,e.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=t.line||null!=l.from&&i==e.line&&l.from>=e.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var r=0;rt)return e=t,!0;t-=o,++n})),le(this,ee(n,e))},indexFromPos:function(t){var e=(t=le(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var d=t.dataTransfer.getData("Text");if(d){var h;if(e.state.draggingText&&!e.state.draggingText.copy&&(h=e.listSelections()),eo(e.doc,ji(n,n)),h)for(var f=0;f=0;e--)vo(t.doc,"",r[e].from,r[e].to,"+delete");Ar(t)}))}function Qo(t,e,n){var r=ot(t.text,e+n,n);return r<0||r>t.text.length?null:r}function ta(t,e,n){var r=Qo(t,e.ch,n);return null==r?null:new ee(e.line,r,n<0?"after":"before")}function ea(t,e,n,r,i){if(t){"rtl"==e.doc.direction&&(i=-i);var o=ut(n,e.doc.direction);if(o){var a,s=i<0?Y(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var c=Ln(e,n);a=i<0?n.text.length-1:0;var u=_n(e,c,a).top;a=at((function(t){return _n(e,c,t).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Qo(n,a,1))}else a=i<0?s.to:s.from;return new ee(r,a,l)}}return new ee(r,i<0?n.text.length:0,i<0?"before":"after")}Bo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Bo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Bo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Bo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Bo["default"]=b?Bo.macDefault:Bo.pcDefault;var na={selectAll:lo,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),U)},killLine:function(t){return Zo(t,(function(e){if(e.empty()){var n=Gt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)i=new ee(i.line,i.ch+1),t.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ee(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var a=Gt(t.doc,i.line-1).text;a&&(i=new ee(i.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),ee(i.line-1,a.length-1),i,"+transpose"))}n.push(new Si(i,i))}t.setSelections(n)}))},newlineAndIndent:function(t){return ti(t,(function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var r=0;r-1&&(ne((i=c.ranges[i]).from(),e)<0||e.xRel>0)&&(ne(i.to(),e)>0||e.xRel<0)?function(t,e,n,r){var i=t.display,o=!1,c=ei(t,(function(e){l&&(i.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:Sr(t)),pt(i.wrapper.ownerDocument,"mouseup",c),pt(i.wrapper.ownerDocument,"mousemove",u),pt(i.scroller,"dragstart",d),pt(i.scroller,"drop",c),o||(wt(e),r.addNew||Yi(t.doc,n,null,null,r.extend),l&&!h||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),t.state.draggingText=c,c.copy=!r.moveOnDrag,ht(i.wrapper.ownerDocument,"mouseup",c),ht(i.wrapper.ownerDocument,"mousemove",u),ht(i.scroller,"dragstart",d),ht(i.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}(t,r,e,o):function(t,e,n,r){a&&Sr(t);var i=t.display,o=t.doc;wt(e);var s,l,c=o.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?u[l]:new Si(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new Si(n,n)),n=ur(t,e,!0,!0),l=-1;else{var d=ya(t,n,r.unit);s=r.extend?Ki(s,d.anchor,d.head,r.extend):d}r.addNew?-1==l?(l=u.length,to(o,ki(t,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?(to(o,ki(t,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):Ji(o,l,s,B):(l=0,to(o,new Ci([s],0),B),c=o.sel);var h=n;function f(e){if(0!=ne(h,e))if(h=e,"rectangle"==r.unit){for(var i=[],a=t.options.tabSize,u=V(Gt(o,n.line).text,n.ch,a),d=V(Gt(o,e.line).text,e.ch,a),f=Math.min(u,d),p=Math.max(u,d),g=Math.min(n.line,e.line),v=Math.min(t.lastLine(),Math.max(n.line,e.line));g<=v;g++){var m=Gt(o,g).text,b=q(m,f,a);f==p?i.push(new Si(ee(g,b),ee(g,b))):m.length>b&&i.push(new Si(ee(g,b),ee(g,q(m,p,a))))}i.length||i.push(new Si(n,n)),to(o,ki(t,c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var y,w=s,x=ya(t,e,r.unit),O=w.anchor;ne(x.anchor,O)>0?(y=x.head,O=ae(w.from(),x.anchor)):(y=x.anchor,O=oe(w.to(),x.head));var C=c.ranges.slice(0);C[l]=function(t,e){var n=e.anchor,r=e.head,i=Gt(t.doc,n.line);if(0==ne(n,r)&&n.sticky==r.sticky)return e;var o=ut(i);if(!o)return e;var a=lt(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return e;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return e;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=lt(o,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var h=o[c+(l?-1:0)],f=l==(1==h.level),p=f?h.from:h.to,g=f?"after":"before";return n.ch==p&&n.sticky==g?e:new Si(new ee(n.line,p,g),r)}(t,new Si(le(o,O),y)),to(o,ki(t,C,l),B)}}var p=i.wrapper.getBoundingClientRect(),g=0;function v(e){t.state.selectingText=!1,g=1/0,e&&(wt(e),i.input.focus()),pt(i.wrapper.ownerDocument,"mousemove",m),pt(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var m=ei(t,(function(e){0!==e.buttons&&kt(e)?function e(n){var a=++g,s=ur(t,n,!0,"rectangle"==r.unit);if(s)if(0!=ne(s,h)){t.curOp.focus=A(),f(s);var l=Er(i,o);(s.line>=l.to||s.linep.bottom?20:0;c&&setTimeout(ei(t,(function(){g==a&&(i.scroller.scrollTop+=c,e(n))})),50)}}(e):v(e)})),b=ei(t,v);t.state.selectingText=b,ht(i.wrapper.ownerDocument,"mousemove",m),ht(i.wrapper.ownerDocument,"mouseup",b)}(t,r,e,o)}(e,r,o,t):St(t)==n.scroller&&wt(t):2==i?(r&&Yi(e.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(C?e.display.input.onContextMenu(t):Sr(e)))}}function ya(t,e,n){if("char"==n)return new Si(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Si(ee(e.line,0),le(t.doc,ee(e.line+1,0)));var r=n(t,e);return new Si(r.from,r.to)}function wa(t,e,n,r){var i,o;if(e.touches)i=e.touches[0].clientX,o=e.touches[0].clientY;else try{i=e.clientX,o=e.clientY}catch(t){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&wt(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!bt(t,n))return Ot(e);o-=s.top-a.viewOffset;for(var l=0;l=i)return gt(t,n,t,Zt(t.doc,o),t.display.gutterSpecs[l].className,e),Ot(e)}}function xa(t,e){return wa(t,e,"gutterClick",!0)}function Oa(t,e){Cn(t.display,e)||function(t,e){return!!bt(t,"gutterContextMenu")&&wa(t,e,"gutterContextMenu",!1)}(t,e)||vt(t,e,"contextmenu")||C||t.display.input.onContextMenu(e)}function Ca(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Hn(t)}ma.prototype.compare=function(t,e,n){return this.time+va>t&&0==ne(e,this.pos)&&n==this.button};var Sa={toString:function(){return"CodeMirror.Init"}},ka={},ja={};function Ta(t,e,n){if(!e!=!(n&&n!=Sa)){var r=t.display.dragFunctions,i=e?ht:pt;i(t.display.scroller,"dragstart",r.start),i(t.display.scroller,"dragenter",r.enter),i(t.display.scroller,"dragover",r.over),i(t.display.scroller,"dragleave",r.leave),i(t.display.scroller,"drop",r.drop)}}function Pa(t){t.options.lineWrapping?(L(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(j(t.display.wrapper,"CodeMirror-wrap"),qe(t)),cr(t),hr(t),Hn(t),setTimeout((function(){return $r(t)}),100)}function Ea(t,e){var n=this;if(!(this instanceof Ea))return new Ea(t,e);this.options=e=e?F(e):{},F(ka,e,!1);var r=e.value;"string"==typeof r?r=new Ao(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var i=new Ea.inputStyles[e.inputStyle](this),o=this.display=new mi(t,r,i,e);for(var c in o.wrapper.CodeMirror=this,Ca(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Wr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new R,keySeq:null,specialChars:null},e.autofocus&&!m&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(t){var e=t.display;ht(e.scroller,"mousedown",ei(t,ba)),ht(e.scroller,"dblclick",a&&s<11?ei(t,(function(e){if(!vt(t,e)){var n=ur(t,e);if(n&&!xa(t,e)&&!Cn(t.display,e)){wt(e);var r=t.findWordAt(n);Yi(t.doc,r.anchor,r.head)}}})):function(e){return vt(t,e)||wt(e)}),ht(e.scroller,"contextmenu",(function(e){return Oa(t,e)})),ht(e.input.getField(),"contextmenu",(function(n){e.scroller.contains(n.target)||Oa(t,n)}));var n,r={end:0};function i(){e.activeTouch&&(n=setTimeout((function(){return e.activeTouch=null}),1e3),(r=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,r=e.top-t.top;return n*n+r*r>20*20}ht(e.scroller,"touchstart",(function(i){if(!vt(t,i)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(i)&&!xa(t,i)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(e.activeTouch.left=i.touches[0].pageX,e.activeTouch.top=i.touches[0].pageY)}})),ht(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ht(e.scroller,"touchend",(function(n){var r=e.activeTouch;if(r&&!Cn(e,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=t.coordsChar(e.activeTouch,"page");a=!r.prev||o(r,r.prev)?new Si(s,s):!r.prev.prev||o(r,r.prev.prev)?t.findWordAt(s):new Si(ee(s.line,0),le(t.doc,ee(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),wt(n)}i()})),ht(e.scroller,"touchcancel",i),ht(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Ir(t,e.scroller.scrollTop),Vr(t,e.scroller.scrollLeft,!0),gt(t,"scroll",t))})),ht(e.scroller,"mousewheel",(function(e){return Oi(t,e)})),ht(e.scroller,"DOMMouseScroll",(function(e){return Oi(t,e)})),ht(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){vt(t,e)||Ct(e)},over:function(e){vt(t,e)||(function(t,e){var n=ur(t,e);if(n){var r=document.createDocumentFragment();yr(t,n,r),t.display.dragCursor||(t.display.dragCursor=E("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),P(t.display.dragCursor,r)}}(t,e),Ct(e))},start:function(e){return function(t,e){if(a&&(!t.state.draggingText||+new Date-Lo<100))Ct(e);else if(!vt(t,e)&&!Cn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!h)){var n=E("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(t,e)},drop:ei(t,_o),leave:function(e){vt(t,e)||No(t)}};var l=e.input.getField();ht(l,"keyup",(function(e){return ha.call(t,e)})),ht(l,"keydown",ei(t,da)),ht(l,"keypress",ei(t,fa)),ht(l,"focus",(function(e){return kr(t,e)})),ht(l,"blur",(function(e){return jr(t,e)}))}(this),Vo(),Gr(this),this.curOp.forceUpdate=!0,Ii(this,r),e.autofocus&&!m||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&kr(n)}),20):jr(this),ja)ja.hasOwnProperty(c)&&ja[c](this,e[c],Sa);fi(this),e.finishInit&&e.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?V(Gt(o,e-1).text,null,a):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",h=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)h+=a,d+="\t";if(ha,l=At(e),c=null;if(s&&r.ranges.length>1)if(Aa&&Aa.text.join("\n")==e){if(r.ranges.length%Aa.text.length==0){c=[];for(var u=0;u=0;h--){var f=r.ranges[h],p=f.from(),g=f.to();f.empty()&&(n&&n>0?p=ee(p.line,p.ch-n):t.state.overwrite&&!s?g=ee(g.line,Math.min(Gt(o,g.line).text.length,g.ch+Y(l).length)):s&&Aa&&Aa.lineWise&&Aa.text.join("\n")==l.join("\n")&&(p=g=ee(p.line,0)));var v={from:p,to:g,text:c?c[h%c.length]:l,origin:i||(s?"paste":t.state.cutIncoming>a?"cut":"+input")};uo(t.doc,v),cn(t,"inputRead",t,v)}e&&!s&&Ia(t,e),Ar(t),t.curOp.updateInput<2&&(t.curOp.updateInput=d),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Na(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||ti(e,(function(){return _a(e,n,0,null,"paste")})),!0}function Ia(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=t.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Da(t,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Gt(t.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Da(t,i.head.line,"smart"));a&&cn(t,"electricInput",t,i.head.line)}}}function Fa(t){for(var e=[],n=[],r=0;r0?0:-1));if(isNaN(u))a=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new ee(e.line,Math.max(0,Math.min(s.text.length,e.ch+n*(d?2:1))),-n)}}else a=i?function(t,e,n,r){var i=ut(e,t.doc.direction);if(!i)return ta(e,n,r);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=lt(i,n.ch,n.sticky),a=i[o];if("ltr"==t.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&h>=u.begin)){var f=d?"before":"after";return new ee(n.line,h,f)}}var p=function(t,e,r){for(var o=function(t,e){return e?new ee(n.line,l(t,1),"before"):new ee(n.line,t,"after")};t>=0&&t0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==v||r>0&&v==e.text.length||!(g=p(r>0?0:i.length-1,r,c(v)))?null:g}(t.cm,s,e,n):ta(s,e,n);if(null==a){if(o||(c=e.line+l)=t.first+t.size||(e=new ee(c,e.ch,e.sticky),!(s=Gt(t,c))))return!1;e=ea(i,t.cm,s,e.line,l)}else e=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,d="group"==r,h=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||c(!f);f=!1){var p=s.text.charAt(e.ch)||"\n",g=et(p,h)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||f||g||(g="s"),u&&u!=g){n<0&&(n=1,c(),e.sticky="after");break}if(g&&(u=g),n>0&&!c(!f))break}var v=ao(t,e,o,a,!0);return re(o,v)&&(v.hitSide=!0),v}function Ha(t,e,n,r){var i,o,a=t.doc,s=e.left;if("page"==r){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*ir(t.display),3);i=(n>0?e.bottom:e.top)+n*c}else"line"==r&&(i=n>0?e.bottom+3:e.top-3);for(;(o=Jn(t,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var $a=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ua(t,e){var n=An(t,e.line);if(!n||n.hidden)return null;var r=Gt(t.doc,e.line),i=Mn(n,r,e.line),o=ut(r,t.doc.direction),a="left";o&&(a=lt(o,e.ch)%2?"right":"left");var s=Fn(i.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ba(t,e){return e&&(t.bad=!0),t}function Wa(t,e,n){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[n]))return Ba(t.clipPos(ee(t.display.viewTo-1)),!0);e=null,n=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var i=0;i=e.display.viewTo||o.line=e.display.viewFrom&&Ua(e,i)||{node:l[0].measure.map[2],offset:0},u=o.liner.firstLine()&&(a=ee(a.line-1,Gt(r.doc,a.line-1).length)),s.ch==Gt(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(t=dr(r,a.line))?(e=Jt(i.view[0].line),n=i.view[0].node):(e=Jt(i.view[t].line),n=i.view[t-1].node.nextSibling);var l,c,u=dr(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=Jt(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(t,e,n,r,i){var o="",a=!1,s=t.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(t){t&&(c(),o+=t)}function d(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var o,h=e.getAttribute("cm-marker");if(h){var f=t.findMarks(ee(r,0),ee(i+1,0),(v=+h,function(t){return t.id==v}));return void(f.length&&(o=f[0].find(0))&&u(Kt(t.doc,o.from,o.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;p&&c();for(var g=0;g1&&h.length>1;)if(Y(d)==Y(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),e++}for(var f=0,p=0,g=d[0],v=h[0],m=Math.min(g.length,v.length);fa.ch&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)f--,p++;d[d.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var x=ee(e,f),O=ee(l,h.length?Y(h).length-p:0);return d.length>1||d[0]||ne(x,O)?(vo(r.doc,d,x,O,"+input"),!0):void 0},$a.prototype.ensurePolled=function(){this.forceCompositionEnd()},$a.prototype.reset=function(){this.forceCompositionEnd()},$a.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},$a.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},$a.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||ti(this.cm,(function(){return hr(t.cm)}))},$a.prototype.setUneditable=function(t){t.contentEditable="false"},$a.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||ei(this.cm,_a)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},$a.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},$a.prototype.onContextMenu=function(){},$a.prototype.resetPosition=function(){},$a.prototype.needsContentAttribute=!0;var Ga=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(t){var e=this,n=this,r=this.cm;this.createField(t);var i=this.textarea;function o(t){if(!vt(r,t)){if(r.somethingSelected())La({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Fa(r);La({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,U):(n.prevInput="",i.value=e.text.join("\n"),N(i))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(i.style.width="0px"),ht(i,"input",(function(){a&&s>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),ht(i,"paste",(function(t){vt(r,t)||Na(t,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),ht(i,"cut",o),ht(i,"copy",o),ht(t.scroller,"paste",(function(e){if(!Cn(t,e)&&!vt(r,e)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=e.clipboardData,i.dispatchEvent(o)}})),ht(t.lineSpace,"selectstart",(function(e){Cn(t,e)||wt(e)})),ht(i,"compositionstart",(function(){var t=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}})),ht(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ga.prototype.createField=function(t){this.wrapper=Ra(),this.textarea=this.wrapper.firstChild},Ga.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute('aria-label',t):this.textarea.removeAttribute('aria-label')},Ga.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,r=br(t);if(t.options.moveInputWithCursor){var i=Kn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Ga.prototype.showSelection=function(t){var e=this.cm.display;P(e.cursorDiv,t.cursors),P(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ga.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&N(this.textarea),a&&s>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||A()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Ga.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}))},Ga.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||Lt(n)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=n.value;if(i==r&&!e.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=i,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(t){var e=this,n=e.cm,r=n.display,i=e.textarea;e.contextMenuPending&&e.contextMenuPending();var o=ur(n,t),c=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ei(n,to)(n.doc,ji(o),U);var u,h=i.style.cssText,f=e.wrapper.style.cssText,p=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-p.top-5)+"px; left: "+(t.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=e.prevInput=" "),e.contextMenuPending=m,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&v(),C){Ct(t);var g=function(){pt(window,"mouseup",g),setTimeout(m,20)};ht(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var t=n.somethingSelected(),o="​"+(t?i.value:"");i.value="⇚",i.value=o,e.prevInput=t?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function m(){if(e.contextMenuPending==m&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,i.style.cssText=h,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&v();var t=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==e.prevInput?ei(n,lo)(n):t++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Ga.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,r,i,o){t.defaults[n]=r,i&&(e[n]=o?function(t,e,n){n!=Sa&&i(t,e,n)}:i)}t.defineOption=n,t.Init=Sa,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,Di(t)}),!0),n("indentUnit",2,Di,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){Ai(t),Hn(t),hr(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],r=t.doc.first;t.doc.iter((function(t){for(var i=0;;){var o=t.text.indexOf(e,i);if(-1==o)break;i=o+e.length,n.push(ee(r,o))}r++}));for(var i=n.length-1;i>=0;i--)vo(t.doc,e,n[i],ee(n[i].line,n[i].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Sa&&t.refresh()})),n("specialCharPlaceholder",Qe,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",m?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),n("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){Ca(t),vi(t)}),!0),n("keyMap","default",(function(t,e,n){var r=Jo(e),i=n!=Sa&&Jo(n);i&&i.detach&&i.detach(t,r),r.attach&&r.attach(t,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Pa,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=pi(e,t.options.lineNumbers),vi(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?sr(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return $r(t)}),!0),n("scrollbarStyle","native",(function(t){Wr(t),$r(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=pi(t.options.gutters,e),vi(t)}),!0),n("firstLineNumber",1,vi,!0),n("lineNumberFormatter",(function(t){return t}),vi,!0),n("showCursorWhenSelecting",!1,mr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(jr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("screenReaderLabel",null,(function(t,e){e=''===e?null:e,t.display.input.screenReaderLabelChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,Ta),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,mr,!0),n("singleCursorHeightPerLine",!0,mr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ai,!0),n("addModeClass",!1,Ai,!0),n("pollInterval",100),n("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),n("historyEventDelay",1250),n("viewportMargin",10,(function(t){return t.refresh()}),!0),n("maxHighlightLength",1e4,Ai,!0),n("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),n("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),n("autofocus",null),n("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),n("phrases",null)}(Ea),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var r=this.options,i=r[t];r[t]==n&&"mode"!=t||(r[t]=n,e.hasOwnProperty(t)&&ei(this,e[t])(this,n,i),gt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Jo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;nn&&(Da(this,i.head.line,t,!0),n=i.head.line,r==this.doc.sel.primIndex&&Ar(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&Ji(this.doc,r,new Si(o,c[r].to()),U)}}})),getTokenAt:function(t,e){return ye(this,t,e)},getLineTokens:function(t,e){return ye(this,ee(t),e,!0)},getTokenTypeAt:function(t){t=le(this.doc,t);var e,n=fe(this,Gt(this.doc,t.line)),r=0,i=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(t=o,i=!0),r=Gt(this.doc,t)}else r=t;return Wn(this,r,{top:0,left:0},e||"page",n||i).top+(i?this.doc.height-Be(r):0)},defaultTextHeight:function(){return ir(this.display)},defaultCharWidth:function(){return or(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,r,i){var o,a,s,l=this.display,c=(t=Kn(this,le(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==r)c=t.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),h=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);('above'==r||t.bottom+e.offsetHeight>d)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=d&&(c=t.bottom),u+e.offsetWidth>h&&(u=h-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==i?(u=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),n&&(o=this,a={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(s=Mr(o,a)).scrollTop&&Ir(o,s.scrollTop),null!=s.scrollLeft&&Vr(o,s.scrollLeft))},triggerOnKeyDown:ni(da),triggerOnKeyPress:ni(fa),triggerOnKeyUp:ha,triggerOnMouseDown:ni(ba),execCommand:function(t){if(na.hasOwnProperty(t))return na[t].call(null,this)},triggerElectric:ni((function(t){Ia(this,t)})),findPosH:function(t,e,n,r){var i=1;e<0&&(i=-1,e=-e);for(var o=le(this.doc,t),a=0;a0&&a(e.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&cr(this),gt(this,"refresh",this)})),swapDoc:ni((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Ii(this,t),Hn(this),this.display.input.reset(),Lr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,cn(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yt(t),t.registerHelper=function(e,r,i){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][r]=i},t.registerGlobalHelper=function(e,r,i,o){t.registerHelper(e,r,o),n[e]._global.push({pred:i,val:o})}}(Ea);var Ka="iter insert remove copy getEditor constructor".split(" ");for(var Ya in Ao.prototype)Ao.prototype.hasOwnProperty(Ya)&&z(Ka,Ya)<0&&(Ea.prototype[Ya]=function(t){return function(){return t.apply(this.doc,arguments)}}(Ao.prototype[Ya]));return yt(Ao),Ea.inputStyles={textarea:Ga,contenteditable:$a},Ea.defineMode=function(t){Ea.defaults.mode||"null"==t||(Ea.defaults.mode=t),Vt.apply(this,arguments)},Ea.defineMIME=function(t,e){Ft[t]=e},Ea.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Ea.defineMIME("text/plain","null"),Ea.defineExtension=function(t,e){Ea.prototype[t]=e},Ea.defineDocExtension=function(t,e){Ao.prototype[t]=e},Ea.fromTextArea=function(t,e){if((e=e?F(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=A();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function r(){t.value=s.getValue()}var i;if(t.form&&(ht(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(t){}}e.finishInit=function(n){n.save=r,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,r(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(pt(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=i))}},t.style.display="none";var s=Ea((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return s},function(t){t.off=pt,t.on=ht,t.wheelEventPixels=xi,t.Doc=Ao,t.splitLines=At,t.countColumn=V,t.findColumn=q,t.isWordChar=tt,t.Pass=$,t.signal=gt,t.Line=Ge,t.changeEnd=Ti,t.scrollbarModel=Br,t.Pos=ee,t.cmpPos=ne,t.modes=It,t.mimeModes=Ft,t.resolveMode=Rt,t.getMode=zt,t.modeExtensions=Ht,t.extendMode=$t,t.copyState=Ut,t.startState=Wt,t.innerMode=Bt,t.commands=na,t.keyMap=Bo,t.keyName=Xo,t.isModifierKey=Ko,t.lookupKey=Go,t.normalizeKeyMap=qo,t.StringStream=qt,t.SharedTextMarker=Po,t.TextMarker=jo,t.LineWidget=Co,t.e_preventDefault=wt,t.e_stopPropagation=xt,t.e_stop=Ct,t.addClass=L,t.contains=D,t.rmClass=j,t.keyNames=zo}(Ea),Ea.version="5.59.1",Ea}())},function(t,e,n){"use strict";n.r(e);var r=n(8),i=n.n(r),o=n(2),a=n.n(o),s=n(1),l=n.n(s),c=n(0),u=n(3),d=n(9),h=n(20);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=t.config,n=void 0===e?{}:e;this.em=n.em,this.editor=n.editor},handleClick:function(t){t.preventDefault(),t.stopPropagation();var e=this.editor,n=this.em,r=e.Canvas.getFrameEl().getBoundingClientRect(),i=r.left,o=r.top,a=p(p({},t),{},{clientX:t.clientX-i,clientY:t.clientY-o});n.trigger('toolbar:run:before'),this.execCommand(a)},execCommand:function(t){var e={event:t},n=this.model.get('command'),r=this.editor;'function'==typeof n&&n(r,null,e),'string'==typeof n&&r.runCommand(n,e)},render:function(){var t=this.editor,e=this.$el,n=this.model,r=n.get('id'),i=n.get('label'),o=t.getConfig('stylePrefix');return e.addClass("".concat(o,"toolbar-item")),r&&e.addClass("".concat(o,"toolbar-item__").concat(r)),i&&e.append(i),this}}),v=h["a"].extend({itemView:g,initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config={editor:t.editor||'',em:t.em},this.listenTo(this.collection,'reset',this.render)}}),m=l.a.Model.extend({defaults:{command:'',attributes:{}}}),b=l.a.Collection.extend({model:m});function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{},r=n.el||this.canvas.getToolsEl(e);return r&&(r.style.display=t?'':'none'),r||{}},showElementOffset:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};x&&this.editor.runCommand('show-offset',{el:t,elPos:e,view:n.view,force:1,top:0,left:0})},hideElementOffset:function(t){this.editor.stopCommand('show-offset',{view:t})},showFixedElementOffset:function(t,e){this.editor.runCommand('show-offset',{el:t,elPos:e,state:'Fixed'})},hideFixedElementOffset:function(t,e){this.editor&&this.editor.stopCommand('show-offset',{state:'Fixed'})},hideHighlighter:function(t){this.canvas.getHighlighter(t).style.opacity=0},onClick:function(t){t.stopPropagation(),t.preventDefault();var e=this.em;if(e.get('_cmpDrag'))return e.set('_cmpDrag');var n=O(t.target),r=n.data('model');if(!r)for(var i=n.parent();!r&&i.length&&!Object(d["g"])(i[0]);)r=i.data('model'),i=i.parent();if(r)if(r.get('selectable'))this.select(r,t);else{for(var o=r.parent();o&&!o.get('selectable');)o=o.parent();this.select(o,t)}},select:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&(this.editor.select(t,{scroll:{},event:e}),this.initResize(t))},updateBadge:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=O(t).data('model');if(r&&r.get('badgable')){var i=this.getBadge(n);if(!n.posOnly){var o=this.canvas.getConfig(),a=r.getIcon(),s=o.pStylePrefix||'',l="".concat(s,"badge"),c=o.customBadgeLabel,u="".concat(a?"
").concat(a,"
"):'',"\n
").concat(r.getName(),"
");i.innerHTML=c?c(r):u}var d='px',h=i.style;h.display='block';var f=i?i.offsetHeight:0,p=0-f,g=n.topOff-f<0?-n.topOff:p,v=n.leftOff<0?-n.leftOff:0;h.top=g+d,h.left=v+d}},showHighlighter:function(t){this.canvas.getHighlighter(t).style.opacity=''},initResize:function(t){var e,n=this.em,r=this.canvas,o=n?n.get('Editor'):'',a=(n?n.get('Config'):'').stylePrefix||'',s="".concat(a,"resizing"),l=!Object(c["isElement"])(t)&&Object(u["r"])(t)?t:n.getSelected(),d=l&&l.get('resizable'),h={},f=function(t,e,n){var r=n.docs;r&&r.forEach((function(e){var n=e.body,r=n.className||'';n.className=('add'==t?"".concat(r," ").concat(s):r.replace(s,'')).trim()}))};if(o&&d){var p=Object(c["isElement"])(t)?t:l.getEl();h={onStart:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.el,a=i.config,s=i.resizer,c=a.keyHeight,d=a.keyWidth,h=a.currentUnit,p=a.keepAutoHeight,g=a.keepAutoWidth;f('add',0,i),e=n.get('StyleManager').getModelToStyle(l),r.toggleFramesEvents();var v=getComputedStyle(o),m=e.getStyle(),b=m[d];a.autoWidth=g&&'auto'===b,isNaN(parseFloat(b))&&(b=v[d]);var y=m[c];a.autoHeight=p&&'auto'===y,isNaN(parseFloat(y))&&(y=v[c]),s.startDim.w=parseFloat(b),s.startDim.h=parseFloat(y),x=0,h&&(a.unitHeight=Object(u["i"])(y),a.unitWidth=Object(u["i"])(b))},onMove:function(){o.trigger('component:resize')},onEnd:function(t,e){f('remove',0,e),o.trigger('component:resize'),r.toggleFramesEvents(1),x=1},updateTarget:function(t,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var a=o.store,s=o.selectedHandler,l=o.config,c=l.keyHeight,u=l.keyWidth,d=l.autoHeight,h=l.autoWidth,f=l.unitWidth,p=l.unitHeight,g=['tc','bc'].indexOf(s)>=0,v=['cl','cr'].indexOf(s)>=0,m={},b=a?'':1;if(!g){var y=r.getBody().offsetWidth,x=i.w0&&void 0!==arguments[0]?arguments[0]:{};return this.canvas.getBadgeEl(t.view)},onFrameScroll:function(){this.updateTools()},updateTools:function(){this.updateToolsLocal(),this.updateGlobalPos()},isCompSelected:function(t){return t&&'selected'===t.get('status')},updateToolsLocal:function(t){var e=t||this.getElHovered(),n=e.el,r=e.pos,i=e.view,o=e.component;if(n){var a=o.get('hoverable'),s=this.lastHovered!==n,l=s?{}:{posOnly:1};s&&a&&(this.lastHovered=n,this.showHighlighter(i),this.showElementOffset(n,r,{view:i})),this.isCompSelected(o)&&(this.hideHighlighter(i),this.hideElementOffset(i));var c='px',u=this.toggleToolsEl(1,i).style,d=this.canvas.canvasRectOffset(n,r),h=d.top,f=d.left;this.updateBadge(n,r,w(w({},l),{},{view:i,topOff:h,leftOff:f})),u.top=h+c,u.left=f+c,u.width=r.width+c,u.height=r.height+c}else this.lastHovered=0},_upToolbar:Object(c["debounce"])((function(){this.updateToolsGlobal({force:1})})),updateToolsGlobal:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.getElSelected(),n=e.el,r=e.pos,i=e.component;if(!n)return this.toggleToolsEl(),void(this.lastSelected=0);var o=this.canvas,a=this.lastSelected!==n;(a||t.force)&&(this.lastSelected=n,this.updateToolbar(i));var s='px',l=this.toggleToolsEl(1),c=l.style,u=o.getTargetToElementFixed(n,o.getToolbarEl(),{pos:r}),d=u.canvasOffsetTop,h=u.canvasOffsetLeft;c.top=d+s,c.left=h+s,c.width=r.width+s,c.height=r.height+s,this.updateToolbarPos({top:u.top,left:u.left})},updateAttached:Object(c["debounce"])((function(){this.updateGlobalPos()})),onContainerChange:Object(c["debounce"])((function(){this.em.refreshCanvas()}),150),getElementPos:function(t){return this.canvas.getCanvasView().getElementPos(t)},hideBadge:function(){this.getBadge().style.display='none'},cleanPrevious:function(t){t&&t.set({status:'',state:''})},getContentWindow:function(){return this.canvas.getWindow()},run:function(t){this.editor=t&&t.get('Editor'),this.enable()},stop:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.em,i=this.editor;this.onHovered(),this.stopSelectComponent(),!n.preserveSelected&&r.setSelected(null),this.toggleToolsEl(),i&&i.stopCommand('resize')}}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return a()(this,t),this.opts={container:null,onStart:null,onDrag:null,onEnd:null,setPosition:null,getPosition:null,guidesStatic:null,guidesTarget:null,snapOffset:5,doc:0,scale:1},Object(c["bindAll"])(this,'drag','stop','keyHandle','handleScroll'),this.setOptions(e),this.delta={x:0,y:0},this}return l()(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opts=h(h({},this.opts),t)}},{key:"toggleDrag",value:function(t){var e=this.getDocumentEl(),n=this.getContainerEl(),r=this.getWindowEl(),i=t?'on':'off',o={on:u["w"],off:u["v"]};o[i](n,'mousemove dragover',this.drag),o[i](e,'mouseup dragend touchend',this.stop),o[i](e,'keydown',this.keyHandle),o[i](r,'scroll',this.handleScroll)}},{key:"handleScroll",value:function(){var t=this.lastScroll,e=this.delta,n=this.getScrollInfo(),r={x:n.x-t.x,y:n.y-t.y};this.move(e.x+r.x,e.y+r.y),this.lastScrollDiff=r}},{key:"start",value:function(t){var e=this.opts,n=e.onStart;this.toggleDrag(1),this.startPointer=this.getPointerPos(t),this.guidesStatic=Object(c["result"])(e,'guidesStatic')||[],this.guidesTarget=Object(c["result"])(e,'guidesTarget')||[],Object(c["isFunction"])(n)&&n(t,this),this.startPosition=this.getStartPosition(),this.lastScrollDiff={x:0,y:0},this.globScrollDiff={x:0,y:0},this.drag(t)}},{key:"drag",value:function(t){var e=this,n=this.opts,r=this.lastScrollDiff,i=this.globScrollDiff,o=n.onDrag,a=this.startPointer,s=this.getPointerPos(t),l={x:i.x+r.x,y:i.y+r.y};this.globScrollDiff=l;var u={x:s.x-a.x+l.x,y:s.y-a.y+l.y};this.lastScrollDiff={x:0,y:0};var d=this.lockedAxis;'x'===(d=t.shiftKey?!d&&this.detectAxisLock(u.x,u.y):null)?u.x=a.x:'y'===d&&(u.y=a.y);var f=function(r){['x','y'].forEach((function(t){return r[t]=r[t]*Object(c["result"])(n,'scale')})),e.delta=r,e.move(r.x,r.y),Object(c["isFunction"])(o)&&o(t,e)},p=h({},u);if(this.currentPointer=s,this.lockedAxis=d,this.lastScroll=this.getScrollInfo(),f(u),this.guidesTarget.length){var g=this.snapGuides(p),v=g.newDelta,m=g.trgX,b=g.trgY;(m||b)&&f(v)}0===t.which&&this.stop(t)}},{key:"snapGuides",value:function(t){var e=this,n=t,r=this.trgX,i=this.trgY;return this.guidesTarget.forEach((function(n){n.x&&e.trgX||n.y&&e.trgY||(n.active=0,e.guidesStatic.forEach((function(o){if(!(n.y&&o.x||n.x&&o.y)){var a=n.y&&o.y,s=a?'y':'x',l=n[s],u=o[s],d=t[s],h=a?i:r;if(e.isPointIn(l,u)&&Object(c["isUndefined"])(h)){var f=d-(l-u);e.setGuideLock(n,f)}}})))})),r=this.trgX,i=this.trgY,['x','y'].forEach((function(r){var i=r.toUpperCase(),o=e["trg".concat(i)];o&&!e.isPointIn(t[r],o.lock)&&(e.setGuideLock(o,null),o=null),o&&!Object(c["isUndefined"])(o.lock)&&(n[r]=o.lock)})),{newDelta:n,trgX:this.trgX,trgY:this.trgY}}},{key:"isPointIn",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.offset,i=r||this.opts.snapOffset;return t>=e&&t<=e+i||t<=e&&t>=e-i}},{key:"setGuideLock",value:function(t,e){var n=Object(c["isUndefined"])(t.x)?'Y':'X',r="trg".concat(n);return null!==e?(t.active=1,t.lock=e,this[r]=t):(delete t.active,delete t.lock,delete this[r]),t}},{key:"stop",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.delta,r=e.cancel,i=r?0:n.x,o=r?0:n.y;this.toggleDrag(),this.lockedAxis=null,this.move(i,o,1);var a=this.opts.onEnd;Object(c["isFunction"])(a)&&a(t,this,{cancelled:r})}},{key:"keyHandle",value:function(t){Object(u["o"])(t)&&this.stop(t,{cancel:1})}},{key:"move",value:function(t,e,n){var r=this.el,i=this.opts,o=this.startPosition;if(o){var a=i.setPosition,s=o.x+t,l=o.y+e;this.position={x:s,y:l,end:n},Object(c["isFunction"])(a)&&a(this.position),r&&(r.style.left="".concat(s,"px"),r.style.top="".concat(l,"px"))}}},{key:"getContainerEl",value:function(){var t=this.opts.container;return t?[t]:this.getDocumentEl()}},{key:"getWindowEl",value:function(){return this.getContainerEl().map((function(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow}))}},{key:"getDocumentEl",value:function(t){var e=this.opts.doc;if(t=t||this.el,!this.docs){var n=[document];t&&n.push(t.ownerDocument),e&&n.push(e),this.docs=n}return this.docs}},{key:"getPointerPos",value:function(t){var e=this.opts.getPointerPosition,n=Object(u["h"])(t);return e?e(t):{x:n.clientX,y:n.clientY}}},{key:"getStartPosition",value:function(){var t=this.el,e=this.opts.getPosition,n={x:0,y:0};return Object(c["isFunction"])(e)?n=e():t&&(n={x:parseFloat(t.style.left),y:parseFloat(t.style.top)}),n}},{key:"getScrollInfo",value:function(){var t=this.opts.doc,e=t&&t.body;return{y:e?e.scrollTop:0,x:e?e.scrollLeft:0}}},{key:"detectAxisLock",value:function(t,e){var n=t,r=e,i=Math.abs(n),o=Math.abs(r);return r>=i||r<=-i?'x':n>o||n<-o?'y':void 0}}]),t}()},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=i.a.$;e["a"]=i.a.View.extend({events:{change:'handleChange'},template:function(){return"")},inputClass:function(){return"".concat(this.ppfx,"field")},holderClass:function(){return"".concat(this.ppfx,"input-holder")},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||'';this.opts=t,this.ppfx=e,this.em=t.target||{},this.listenTo(this.model,'change:value',this.handleModelChange)},elementUpdated:function(){this.model.trigger('el:change')},setValue:function(t){var e=this.model,n=t||e.get('defaults'),r=this.getInputEl();r&&(r.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},handleChange:function(t){t.stopPropagation();var e=this.getInputEl().value;this.model.set({value:e},{fromInput:1}),this.elementUpdated()},getInputEl:function(){if(!this.inputEl){var t=this.model,e=this.opts.type||'text',n=t.get('placeholder')||t.get('defaults')||t.get('default')||'';this.inputEl=o(""))}return this.inputEl.get(0)},render:function(){this.inputEl=null;var t=this.$el;return t.addClass(this.inputClass()),t.html(this.template()),t.find(".".concat(this.holderClass())).append(this.getInputEl()),this}})},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r),o=n(9);e["default"]=i.a.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||'',this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{},this.properties=[];var e=this.collection;this.listenTo(e,'add',this.addTo),this.listenTo(e,'reset',this.render)},addTo:function(t,e,n){this.add(t,null,n)},add:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e||this.el,i=new t.typeView({model:t,name:t.get('name'),id:this.pfx+t.get('property'),target:this.target,propTarget:this.propTarget,onChange:this.onChange,onInputRender:this.onInputRender,config:this.config});'composite'!=t.get('type')&&(i.customValue=this.customValue),i.render();var a=i.el;this.properties.push(i),i.updateVisibility(),Object(o["b"])(r,a,n.at)},render:function(){var t=this,e=this.$el;this.clearItems();var n=document.createDocumentFragment();return this.collection.each((function(e){return t.add(e,n)})),e.empty(),e.append(n),e.attr('class',"".concat(this.pfx,"properties")),this},remove:function(){i.a.View.prototype.remove.apply(this,arguments),this.clearItems()},clearItems:function(){this.properties.forEach((function(t){return t.remove()})),this.properties=[]}})},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n.n(i);e["a"]=o.a.View.extend({itemView:'',itemsView:'',itemType:'type',autoAdd:0,initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;this.config=e||t.config||{},this.autoAdd&&this.listenTo(this.collection,'add',this.addTo),this.items=[],this.init()},init:function(){},addTo:function(t){this.add(t)},itemViewNotFound:function(t){var e=this.config,n=this.ns,r=e.em,i="".concat(n?"[".concat(n,"]: "):'',"'").concat(t,"' type not found");r&&r.logWarning(i)},add:function(t,e){var n,i=this.config,o=this.reuseView,a=this.items,s=this.itemsView,l=void 0===s?{}:s,c=e||null,u=this.itemView,d=t.get(this.itemType);l[d]?u=l[d]:!d||l[d]||Object(r["includes"])(['button','checkbox','color','date','datetime-local','email','file','hidden','image','month','number','password','radio','range','reset','search','submit','tel','text','time','url','week'],d)||this.itemViewNotFound(d),n=t.view&&o?t.view:new u({model:t,config:i},i),a&&a.push(n);var h=n.render().el;c?c.appendChild(h):this.$el.append(h)},render:function(){var t=document.createDocumentFragment();return this.clearItems(),this.$el.empty(),this.collection.length&&this.collection.each((function(e){this.add(e,t)}),this),this.$el.append(t),this.onRender(),this},onRender:function(){},remove:function(){this.clearItems(),o.a.View.prototype.remove.apply(this,arguments)},clearItems:function(){this.items}})},function(t,e,n){"use strict";var r=n(8),i=n.n(r),o=n(2),a=n.n(o),s=n(1),l=n.n(s),c=n(0),u=n(5);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:[],r=e||[];return r.forEach((function(e){n.push(e.getId()),t(e.components(),n)})),n},p=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.map((function(e){n.push(e.getId()),t(e.components(),n)})),n};e["a"]=l.a.Collection.extend({initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.opt=e,this.listenTo(this,'add',this.onAdd),this.listenTo(this,'remove',this.removeChildren),this.listenTo(this,'reset',this.resetChildren),this.config=e.config,this.em=e.em,this.domc=e.domc},resetChildren:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this,i=n.previousModels||[],o=i.filter((function(e){return!t.get(e.cid)})),a=p(t);n.keepIds=f(i).filter((function(t){return a.indexOf(t)>=0})),o.forEach((function(t){return e.removeChildren(t,r,n)})),t.each((function(t){return e.onAdd(t)}))},removeChildren:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t){var i=this.domc,o=this.em,a=i?i.allById():{},s=r.temporary;if(t.prevColl=this,!s){var l=t.getId(),c=o.get('SelectorManager').getAll(),u=o.get('CssComposer').getAll(),d=(r.keepIds||[]).indexOf(l)<0;delete a[l];var h=d?u.remove(u.filter((function(t){return t.getSelectors().getFullString()==="#".concat(l)})),r):[];if(c.remove(h.map((function(t){return t.getSelectors().at(0)}))),!t.opt.temporary){var f=o.get('Commands'),p=t.get('style-signature'),g={target:t};p&&f.run('core:component-style-clear',g),t.removed(),t.trigger('removed'),o.trigger('component:remove',t)}var v=t.components();v.forEach((function(t){return n.removeChildren(t,e,r)}))}var m=t.components(),b=o.get('UndoManager');o.stopListening(m),o.stopListening(t),o.stopListening(t.get('classes')),b.remove(t),b.remove(m)}},model:function(t,e){var n,r=e.collection.opt,i=r.em,o=i.get('DomComponents').componentTypes;e.em=i,e.config=r.config,e.componentTypes=o,e.domc=r.domc;for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:{},n=this.em,r=this.opt.domc,i=n.get('CssComposer'),o=n.get('Parser').parseHtml(t);return u["a"].checkId(o.html,o.css,r.componentsById,e),o.css&&i&&!e.temporary&&i.addCollection(o.css,h(h({},e),{},{extend:1})),o.html},add:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.parent;n.keepIds=f(n.previousModels),Object(c["isString"])(t)?t=this.parseString(t,n):Object(c["isArray"])(t)&&t.forEach((function(r,i){if(Object(c["isString"])(r)){var o=e.parseString(r,n);t[i]=Object(c["isArray"])(o)&&!o.length?null:o}}));var r=Object(c["isArray"])(t);t=(r?t:[t]).filter((function(t){return t})).map((function(t){return e.processDef(t)})),t=r?Object(c["flatten"])(t,1):t[0];var i=l.a.Collection.prototype.add.apply(this,[t,n]);return this.__firstAdd=i,i},processDef:function(t){if(t.cid&&t.ccid)return t;var e=this.em,n=this.config,r=(void 0===n?{}:n).processor,o=t;if(r){var a=r(o=h({},o));a&&(Object(c["each"])(o,(function(t,e){return delete o[e]})),Object(c["extend"])(o,a))}if(o.$$typeof&&'object'==i()(o.props)){(o=h({},o)).props=h({},o.props);var s=e.get('DomComponents'),l=e.get('Parser').parserHtml;Object(c["each"])(o,(function(t,e){Object(c["includes"])(['props','type'],e)||delete o[e]}));var u=o.props,d=u.children;delete u.children,delete o.props;var f=l.splitPropsFromAttr(u);o.attributes=f.attrs,d&&(o.components=d),o.type?s.getType(o.type)||(o.tagName=o.type,delete o.type):o.type='textnode',Object(c["extend"])(o,f.props)}return o},onAdd:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.domc,i=this.em,o=t.getStyle(),a=i&&i.getConfig('avoidInlineStyle');if(r&&r.Component.ensureInList(t),!Object(c["isEmpty"])(o)&&!a&&i&&i.get&&i.getConfig('forceClass')&&!n.temporary){var s=t.cid;i.get('CssComposer').setClassRule(s,o);t.setStyle({}),t.addClass(s)}this.__onAddEnd()},__onAddEnd:Object(c["debounce"])((function(){}))})},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r);i.a.$;e["default"]=i.a.View.extend({initialize:function(t){this.config=t||{},this.editorModel=this.em=this.config.em||{},this.pfx=this.config.stylePrefix,this.ppfx=this.config.pStylePrefix,this.hoverClass=this.pfx+'hover',this.badgeClass=this.pfx+'badge',this.plhClass=this.pfx+'placeholder',this.freezClass=this.ppfx+'freezed',this.canvas=this.em.get&&this.em.get('Canvas'),this.em.get&&this.setElement(this.getCanvas()),this.canvas&&(this.$canvas=this.$el,this.canvasTool=this.getCanvasTools()),this.init(this.config)},onFrameScroll:function(t){},getCanvas:function(){return this.canvas.getElement()},getCanvasBody:function(){return this.canvas.getBody()},getCanvasWrapper:function(){return this.canvas.getWrapperEl()},getCanvasTools:function(){return this.canvas.getToolsEl()},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+t.ownerDocument.body.scrollTop,left:e.left+t.ownerDocument.body.scrollLeft}},init:function(t){},callRun:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id;if(t.trigger("run:".concat(n,":before"),e),!e||!e.abort){var r=e.sender||t,i=this.run(t,r,e);return t.trigger("run:".concat(n),i,e),t.trigger('run',n,i,e),i}t.trigger("abort:".concat(n),e)},callStop:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id,r=e.sender||t;t.trigger("stop:".concat(n,":before"),e);var i=this.stop(t,r,e);return t.trigger("stop:".concat(n),i,e),t.trigger('stop',n,i,e),i},stopCommand:function(){this.em.get('Commands').stop(this.id)},run:function(t,e){},stop:function(t,e){}})},function(t,e,n){"use strict";var r=n(2),i=n.n(r),o=n(0),a=n(3),s=n(29);function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(o["isString"])(e)&&(e=u(e));var r=this.getStyle(),i=c({},e);this.set('style',i,n);var s=Object(a["y"])(r,i);return Object(o["keys"])(s).forEach((function(e){var n=t.em;t.trigger("change:style:".concat(e)),n&&(n.trigger("styleable:change",t,e),n.trigger("styleable:change:".concat(e),t,e))})),i},addStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'',n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};'string'==typeof t?t={prop:e}:n=e||{},t=this.extendStyle(t),this.setStyle(t,n)},removeStyle:function(t){var e=this.getStyle();delete e[t],this.setStyle(e)},styleToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.getStyle();for(var r in n){var i=t.important,a=Object(o["isArray"])(i)?i.indexOf(r)>=0:i,s="".concat(n[r]).concat(a?' !important':''),l='__'==r.substr(0,2);s&&!l&&e.push("".concat(r,":").concat(s,";"))}return e.join('')},getSelectors:function(){return this.get('selectors')||this.get('classes')},getSelectorsString:function(){return this.selectorsToString?this.selectorsToString():this.getSelectors().getFullString()}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(1),a=n.n(o),s=n(30),l=n(0),c=n(3);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.get('id')||'',r=this.get('name')||'';!this.get('property')&&this.set('property',(r||n).replace(/ /g,'-'));var i=this.get('property');!this.get('id')&&this.set('id',i),!r&&this.set('name',Object(c["c"])(i).replace(/-/g,' ')),h.callInit(this,t,e)},init:function(){},clearValue:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0,status:''},t),this},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parseValue(t),i=!e;!i&&this.set({value:void 0},{avoidStore:i,silent:!0}),this.set(r,d({avoidStore:i},n))},setValueFromInput:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.setValue(t,e,d(d({},n),{},{fromInput:1}))},parseValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={value:t},r='!important';if(Object(l["isString"])(t)&&-1!==t.indexOf(r)&&(n.value=t.replace(r,'').trim(),n.important=1),!this.get('functionName')&&!e.complete)return n;var i=[],o="".concat(n.value),a=o.indexOf('(')+1,s=o.lastIndexOf(')'),c=o.substring(0,a-1);if(c&&(n.functionName=c),i.push(a),s>=0&&i.push(s),n.value=String.prototype.substring.apply(o,i),e.numeric){var u=parseFloat(n.value);n.unit=n.value.replace(u,''),n.value=u}return n},splitValues:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:',',n=[],r='(',i=')',o='',a=0;return(t||'').split('').forEach((function(t){t==r?(a++,o+=r):t==i&&a>0?(a--,o+=i):t===e&&0==a?(n.push(o),o=''):o+=t})),''!==o&&n.push(o),n.map((function(t){return t.trim()}))},getDefaultValue:function(){return this.get('defaults')},getFullValue:function(t){var e=this.get('functionName'),n=this.getDefaultValue(),r=Object(l["isUndefined"])(t)?this.get('value'):t,i=!Object(l["isUndefined"])(r)&&''!==r;if(r&&n&&r===n)return n;if(e&&i){var o='url'===e?"'".concat(r.replace(/'/g,''),"'"):r;r="".concat(e,"(").concat(o,")")}return i&&this.get('important')&&(r="".concat(r," !important")),r||''}},{callParentInit:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};t.prototype.initialize.apply(e,[n,d(d({},r),{},{skipInit:1})])},callInit:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!n.skipInit&&t.init(e,n)}}),f=h;function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f.callParentInit(f,this,t,e);var r=this.get('properties')||[],i=n(24).default;this.set('properties',new i(r)),this.listenTo(this,'change:value',this.updateValues),f.callInit(this,t,e)},clearValue:function(){return this.get('properties').each((function(t){return t.clearValue()})),f.prototype.clearValue.apply(this,arguments)},updateValues:function(){var t=this.getFullValue().split(this.getSplitSeparator());this.get('properties').each((function(e,n){var r=t.length;t[n]||t[n%r+(1!=r&&r%2?1:0)]}))},getSplitSeparator:function(){return new RegExp("".concat(this.get('separator'),"(?![^\\(]*\\))"))},getDefaultValue:function(t){var e=this.get('defaults');return e&&!t?e:(e='',this.get('properties').each((function(t,n){return e+="".concat(t.getDefaultValue()," ")})),e.trim())},getFullValue:function(){return this.get('detached')?'':this.get('properties').getFullValue()},getPropertyAt:function(t){return this.get('properties').at(t)}}),m=a.a.Model.extend({defaults:{index:'',value:'',values:{},active:!1,preview:!1,properties:[]},initialize:function(){var t=this.get('properties'),e=this.get('value');this.set('properties',t instanceof bt?t:new bt(t));var n=this.get('properties');if(n.forEach(this.onPropAdd,this),this.listenTo(n,'add',this.onPropAdd),!e){var r='',i=this.get('values');for(var o in i)r+=' '+i[o];this.set('value',r.trim())}},onPropAdd:function(t){var e=this.collection;t.parent=e&&e.property},getPropertyAt:function(t){return this.get('properties').at(t)},getPropertyValue:function(t){var e='';return this.get('properties').each((function(n){n.get('property')==t&&(e=n.getFullValue())})),e},getFullValue:function(){var t=[];return this.get('properties').each((function(e){return t.push(e.getFullValue())})),t.join(' ').trim()}});function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function y(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v.callParentInit(v,this,t,e);var n=this.get('layers'),r=new w(n);r.property=this,r.properties=this.get('properties'),this.set('layers',r),v.callInit(this,t,e)},getLayers:function(){return this.get('layers')},getCurrentLayer:function(){return this.getLayers().filter((function(t){return t.get('active')}))[0]},getFullValue:function(){return this.get('detached')?'':this.get('layers').getFullValue()},getValueFromStyle:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.getLayers().getLayersFromStyle(t);return new w(e).getFullValue()},clearValue:function(){return this.getLayers().reset(),v.prototype.clearValue.apply(this,arguments)},getValueFromTarget:function(t){var e=this.attributes,n=e.detached,r=e.property,i=e.properties,o=t.getStyle(),a={};return i.forEach((function(t){var e=t.get('property'),n=o[e];n&&(a[e]=n)})),n?Object(l["keys"])(a).length?a:'':o[r]},getLayersFromTarget:function(t){}}),S=n(25),k=n.n(S);function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function T(t){for(var e=1;e\n
\n ")},templateLabel:function(t){var e=this.pfx,n=this.em,r=t.parent,i=t.attributes,o=i.icon,a=void 0===o?'':o,s=i.info,l=void 0===s?'':s,c=i.id,u=i.name,d=n&&n.t("styleManager.properties.".concat(c))||u;return"\n \n ").concat(d,"\n \n ").concat(r?'':""),"\n ")},templateInput:function(t){return"\n
\n \n
\n ")},events:i()({change:'inputValueChanged'},"click [".concat(P,"]"),'clear'),initialize:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(l["bindAll"])(this,'targetUpdated','__change','__updateStyle'),this.config=e.config||{};var n=this.config.em;this.em=n,this.pfx=this.config.stylePrefix||'',this.ppfx=this.config.pStylePrefix||'',this.target=e.target||{},this.propTarget=e.propTarget||{},this.onChange=e.onChange,this.onInputRender=e.onInputRender||{},this.customValue=e.customValue||{};var r=this.model;this.property=r.get('property'),this.input=null;var i=this.pfx;if(this.inputHolderId='#'+i+'input-holder',this.sector=r.collection&&r.collection.sector,this.__destroyFn=this.destroy?this.destroy.bind(this):function(){},r.view=this,r.get('value')||r.set('value',r.getDefaultValue()),n){this.listenTo(n,"update:component:style:".concat(this.property),this.targetUpdated);var o=r.get('requires')||{};Object.keys(o).forEach((function(e){t.listenTo(n,"component:styleUpdate:".concat(e),t.targetUpdated)}))}this.listenTo(this.propTarget,'update',this.targetUpdated),this.listenTo(r,'destroy remove',this.remove),this.listenTo(r,'change:value',this.modelValueChanged),this.listenTo(r,'targetUpdated',this.targetUpdated),this.listenTo(r,'change:visible',this.updateVisibility),this.listenTo(r,'change:status',this.updateStatus),this.listenTo(r,'change:name change:className change:full',this.render);var a=this.init&&this.init.bind(this);a&&a()},remove:function(){var t=this;a.a.View.prototype.remove.apply(this,arguments),['em','target','input','$input','propTarget','sector'].forEach((function(e){return t[e]={}})),this.__destroyFn(this._getClbOpts())},updateStatus:function(){var t=this.model,e=t.get('status'),n=t.parent,r=this.pfx,i=this.ppfx,o=this.config,a="".concat(i,"four-color"),s="".concat(i,"color-warn"),l=this.$el.children(".".concat(r,"label")),c=this.getClearEl(),u=c?c.style:{};switch(l.removeClass("".concat(a," ").concat(s)),u.display='none',e){case'updated':!n&&l.addClass(a),o.clearProperties&&(u.display='inline');break;case'computed':l.addClass(s)}},clear:function(t){var e=this;t&&t.stopPropagation(),this.model.clearValue(),setTimeout((function(){return e.targetUpdated()}))},getClearEl:function(){return this.clearEl||(this.clearEl=this.el.querySelector("[".concat(P,"]"))),this.clearEl},getTarget:function(){return this.getTargetModel()},getTargets:function(){return this.propTarget.targets||[this.getTarget()]},getFirstTarget:function(){return this.getTargets()[0]},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(t){t&&t.stopPropagation(),this.emit||(this.model.setValueFromInput(this.getInputValue()),this.elementUpdated())},elementUpdated:function(){this.setStatus('updated')},setStatus:function(t){this.model.set('status',t);var e=this.model.parent;e&&'updated'==t&&e.set('status',t)},emitUpdateTarget:Object(l["debounce"])((function(){var t=this.config.em;t&&t.trigger('styleManager:update:target',this.getFirstTarget())})),_getTargetData:function(){var t=this.model,e=this.config,n=this.getTargetValue({ignoreDefault:1}),r=t.getDefaultValue(),i=this.getComputedValue(),o='',a='';return n?(o=n,e.highlightChanged&&(a='updated')):i&&e.showComputed&&i!=r?(o=i,e.highlightComputed&&(a='computed')):(o=r,a=''),{value:o,status:a,targetValue:n,defaultValue:r,computedValue:i}},targetUpdated:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.config.fromLayer&&(this.emitUpdateTarget(),this.checkVisibility())){var r=this.config,i=r.em,o=this.model,a=o.get('property'),s=this._getTargetData(),l=s.status,c=s.value,u=k()(s,["status","value"]),d=T({status:l,value:c},u);return this.setStatus(l),o.setValue(c,0,T({fromTarget:1},n)),i&&(i.trigger('styleManager:change',this,a,c,d),i.trigger("styleManager:change:".concat(a),this,c,d),this._emitUpdate(d)),d}},_emitUpdate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.em,n=this.model;if(e){var r=n.get('property'),i=T(T({},this._getEventData()),t),o=i.id;e.trigger('style:update',i),e.trigger("style:update:".concat(r),i),r!==o&&e.trigger("style:update:".concat(o),i)}},_getEventData:function(){var t=this.model;return{propertyView:this,targets:this.getTargets(),value:t.getFullValue(),property:t,id:t.get('id'),name:t.get('property')}},checkVisibility:function(){var t=1;return this.config.hideNotStylable&&(this.isTargetStylable()&&this.isComponentStylable()?this.show():(this.hide(),t=0),this.sector&&this.sector.trigger('updateVisibility')),t},getTargetValue:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.model,r=this.getFirstTarget(),i=this.customValue;if(!r)return t;if((t=r.getStyle()[n.get('property')])||e.ignoreDefault||(t=n.getDefaultValue()),'function'==typeof i&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),a=i(this,o,t);a&&(t=a)}return t},getComputedValue:function(){var t=this.propTarget,e=t.computed||{},n=t.computedDefault||{},r=this.config.avoidComputed||[],i=this.model.get('property'),o=r.indexOf(i)<0,a=e[i],s=n[Object(c["b"])(i)];return e&&o&&s!==a&&a||''},getInputValue:function(){var t=this.getInputEl();return t?t.value:''},modelValueChanged:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.model,a=o.getFullValue();if(r.fromInput||this.setValue(a),!r.fromTarget){this.getTargets().forEach((function(t){return n.__updateTarget(t,r)}));var s=this.config.em;if(!s)return;var l=o.get('property'),c=i()({},l,a);s.getSelectedAll().forEach((function(t){!r.noEmit&&s.trigger('component:update',t,c,r),s.trigger('component:styleUpdate',t,l,r),s.trigger("component:styleUpdate:".concat(l),t,a,r),t.trigger("change:style",t,c,r),t.trigger("change:style:".concat(l),t,a,r)}))}},__updateTarget:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,r=n.getFullValue(),i=this.onChange;t&&this.isComponentStylable()&&(e.fromTarget||(i&&!e.fromParent?i(t,this,e):this.updateTargetStyle(r,null,T(T({},e),{},{target:t}))),this._emitUpdate())},updateTargetStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'',n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e||this.model.get('property'),i=n.target||this.getFirstTarget(),o=i.getStyle();t?o[r]=t:delete o[r],n.avoidStore?o.__=1:delete o.__,i.setStyle(o,n);var a=this.getHelperModel();a&&a.setStyle(o,n)},isTargetStylable:function(t){var e=t||this.getFirstTarget(),n=this.model,r=n.get('id'),i=n.get('property'),o=n.get('toRequire'),a=e.get('unstylable'),s=e.get('stylable-require'),c=n.get('requires'),u=n.get('requiresParent'),d=this.sector?this.sector.collection:null,h=this.em?this.em.getSelected():null,f=e.get('stylable');if(Object(l["isArray"])(f)&&(f=f.indexOf(i)>=0),Object(l["isArray"])(a)&&(f=a.indexOf(i)<0),o&&(f=!t||s&&(s.indexOf(r)>=0||s.indexOf(i)>=0)),d&&c){var p=Object.keys(c);d.each((function(t){t.get('properties').each((function(t){if(Object(l["includes"])(p,t.id)){var e=c[t.id];f=f&&Object(l["includes"])(e,t.get('value'))}}))}))}if(u){var g=h&&h.parent(),v=g&&g.getEl();if(v){var m=window.getComputedStyle(v);Object(l["each"])(u,(function(t,e){f=f&&m[e]&&Object(l["includes"])(t,m[e])}))}else f=!1}return f},isComponentStylable:function(){var t=this.em,e=t&&t.getSelected();return!e||this.isTargetStylable(e)},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=this.model,n=Object(l["isUndefined"])(t)?e.getDefaultValue():t;if(this.update)return this.__update(n);var r=this.getInputEl();r&&(r.value=n)},getInputEl:function(){return this.input||(this.input=this.el.querySelector('input')),this.input},updateVisibility:function(){this.el.style.display=this.model.get('visible')?'':'none'},show:function(){this.model.set('visible',1)},hide:function(){this.model.set('visible',0)},cleanValue:function(){this.setValue('')},clearCached:function(){this.clearEl=null,this.input=null,this.$input=null},__update:function(t){var e=this.update&&this.update.bind(this);e&&e(T(T({},this._getClbOpts()),{},{value:t}))},__change:function(){for(var t=this.emit&&this.emit.bind(this),e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=e.complete,r=k()(e,["complete"]),i=!1!==n;Object(c["p"])(t)?this.getTargets().forEach((function(e){return e.addStyle(t,{avoidStore:!i})})):this.model.setValueFromInput(t,n,r),i&&this.elementUpdated()},_getClbOpts:function(){var t=this.model;return{el:this.el,props:t.attributes,setProps:function(){return t.set.apply(t,arguments)},change:this.__change,updateStyle:this.__updateStyle,targets:this.getTargets()}},render:function(){this.clearCached();var t=this.pfx,e=this.model,n=this.el,r=this.$el,i=e.get('property'),o=e.get('full'),a=e.get('className')||'',s="".concat(t,"property");this.createdEl&&this.__destroyFn(this._getClbOpts()),r.empty().append(this.template(e)),r.find('[data-sm-label]').append(this.templateLabel(e));var l=this.create&&this.create.bind(this);this.createdEl=l&&l(this._getClbOpts()),r.find('[data-sm-fields]').append(this.createdEl||this.templateInput(e)),n.className="".concat(s," ").concat(t).concat(e.get('type')," ").concat(s,"__").concat(i," ").concat(a).trim(),n.className+=o?" ".concat(s,"--full"):'',this.updateStatus();var c=this.onRender&&this.onRender.bind(this);c&&c(),this.setValue(e.get('value'),{fromTarget:1})}});function M(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function D(t){for(var e=1;e\n \n \n ")},inputValueChanged:function(){if(!this.model.get('detached')){for(var t=arguments.length,e=new Array(t),n=0;n'),this.input=this.$input.get(0)),this.props||(this.props=t.get('properties')),!this.$props)){this.props.each((function(e,n){e&&'composite'==e.get('type')&&(this.props.remove(e),console.warn('Nested composite types not yet allowed.')),e.parent=t}),this);var r=new(0,n(19).default)(this.getPropsConfig());this.$props=r.render().$el,this.properties=r.properties,this.$el.find("#".concat(this.pfx,"input-holder")).append(this.$props)}},getPropsConfig:function(t){var e=this,n=this.model,r={config:D(D({},this.config),{},{highlightComputed:0}),collection:this.props,target:this.target,propTarget:this.propTarget,onChange:function(t,e,r){n.set('value',n.getFullValue(),r)},customValue:function(t,n){return e.valueOnIndex(n,t)}};return n.get('detached')&&delete r.onChange,r},valueOnIndex:function(t,e){var n,r=this.getTargetValue({ignoreDefault:1});r?n=r.split(this.model.getSplitSeparator())[t]:n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return n},clearCached:function(){E.prototype.clearCached.apply(this,arguments),this.$input=null,this.props=null,this.$props=null}}),_=n(19);function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function I(t){for(var e=1;e\n \n \n
").concat(i,"
\n
\n \t
\n
\n
\n ⨯\n
\n
\n
\n ")},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model;this.stackModel=t.stackModel,this.config=t.config||{},this.em=this.config.em,this.pfx=this.config.stylePrefix||'',this.ppfx=this.config.pStylePrefix||'',this.sorter=t.sorter||null,this.propsConfig=t.propsConfig||{},this.customPreview=t.onPreview,this.listenTo(e,'destroy remove',this.remove),this.listenTo(e,'change:active',this.updateVisibility),this.listenTo(e.get('properties'),'change',this.updatePreview),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data('model',e)},initSorter:function(t){this.sorter&&this.sorter.startSort(this.el)},removeItem:function(t){t&&t.stopPropagation(),this.remove()},remove:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=this.props,r=e.collection,i=this.stackModel;a.a.View.prototype.remove.apply(this,arguments),r&&r.contains(e)&&r.remove(e),i&&i.set&&(i.set({stackIndex:null},{silent:!0}),!t.fromTarget&&i.trigger('updateValue')),n&&n.remove()},onPreview:function(t){var e=this.stackModel,n=e&&e.get('detached'),r=t.split(' '),i=3,o=[],a={};return this.model.get('properties').each((function(t,e){var s=t.get('property'),l=n?t.getFullValue():r[e]||'';if(l&&'integer'==t.get('type')){var c=parseInt(l,10),u=l.replace(c,'');l=(c=(c=(c=isNaN(c)?0:c)>i?i:c)<-i?-i:c)+u}o.push(l),a[s]=l})),n?a:o.join(' ')},updatePreview:function(){var t=this.stackModel,e=this.customPreview,n=this.getPreviewEl(),r=this.model.getFullValue(),i=e?e(r):this.onPreview(r);if(i&&t&&n){var o=n.style;if(Object(l["isString"])(i))o[t.get('property')]=i;else{var a=[];Object(l["each"])(i,(function(t,e){return a.push("".concat(e,":").concat(t))})),n.setAttribute('style',a.join(';'))}}},getPropertiesWrapper:function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector('[data-properties]')),this.propsWrapEl},getPreviewEl:function(){return this.previewEl||(this.previewEl=this.el.querySelector('[data-preview]')),this.previewEl},active:function(){var t=this.model,e=t.collection;e.active(e.indexOf(t))},updateVisibility:function(){var t=this.pfx,e=this.getPropertiesWrapper(),n=this.model.get('active');e.style.display=n?'':'none',this.$el[n?'addClass':'removeClass']("".concat(t,"active"))},render:function(){var t=this.propsConfig,e=this.model,n=this.el,r=this.pfx,i=e.get('preview'),o=new _["default"]({collection:e.get('properties'),config:I(I({},this.config),{},{fromLayer:1}),target:t.target,customValue:t.customValue,propTarget:t.propTarget,onChange:t.onChange}),a=o.render().el;return n.innerHTML=this.template(e),n.className="".concat(r,"layer").concat(i?'':" ".concat(r,"no-preview")),this.props=o,this.getPropertiesWrapper().appendChild(a),this.updateVisibility(),this.updatePreview(),this}}),V=a.a.View.extend({initialize:function(t){this.config=t.config||{},this.stackModel=t.stackModel,this.preview=t.preview,this.pfx=this.config.stylePrefix||'',this.ppfx=this.config.pStylePrefix||'',this.propsConfig=t.propsConfig;var e=this.pfx,n=this.ppfx,r=this.collection;this.className="".concat(e,"layers ").concat(n,"field"),this.listenTo(r,'add',this.addTo),this.listenTo(r,'deselectAll',this.deselectAll),this.listenTo(r,'reset',this.reset),this.items=[];var i=this.config.em||'',o=i?i.get('Utils'):'';this.sorter=o?new o.Sorter({container:this.el,ignoreViewChildren:1,containerSel:".".concat(e,"layers"),itemSel:".".concat(e,"layer"),pfx:this.config.pStylePrefix}):'',r.view=this,this.$el.data('model',r),this.$el.data('collection',r)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var r=e||null,i=this.stackModel,o=this.config,a=this.sorter,s=this.propsConfig;void 0!==this.preview&&t.set('preview',this.preview);var l=new F({model:t,config:o,sorter:a,stackModel:i,propsConfig:s}),c=l.render().el;if(this.items.push(l),r)r.appendChild(c);else if(void 0!==n){var u='before';this.$el.children().length==n&&(n--,u='after'),n<0?this.$el.append(c):this.$el.children().eq(n)[u](c)}else this.$el.append(c);return c},deselectAll:function(){this.$el.find('.'+this.pfx+'layer').removeClass(this.pfx+'active')},reset:function(t,e){this.clearItems(e),this.render()},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each((function(e){this.addToCollection(e,t)}),this),this.$el.append(t),this.$el.attr('class',this.className),this.sorter&&(this.sorter.plh=null),this},remove:function(){this.clearItems(),a.a.View.prototype.remove.apply(this,arguments)},clearItems:function(t){this.items.forEach((function(e){return e.remove(t)})),this.items=[]}});function R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var z=new(n(31)["a"]),H=L.extend({templateInput:function(){var t=this.pfx;this.ppfx;return"\n
\n \n
\n
\n ")},init:function(){var t=this.model;this.pfx;t.set('stackIndex',null),this.events["click [data-add-layer]"]='addLayer',this.listenTo(t,'change:stackIndex',this.indexChanged),this.listenTo(t,'updateValue',this.inputValueChanged),this.delegateEvents();var e=this.getPropsConfig();this.layers=new V({collection:this.getLayers(),stackModel:t,preview:t.get('preview'),config:this.config,propsConfig:e});var r=n(19).default;this.propsView=new r({target:this.target,collection:t.get('properties'),stackModel:t,config:this.config,onChange:e.onChange,propTarget:e.propTarget})},targetUpdated:function(){var t,e=this;if(this.model.get('detached'))t=this._getTargetData(),this.setStatus(t.status),this.checkVisibility();else{for(var n=arguments.length,r=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},e=this.model;t.up&&this.elementUpdated(),e.get('detached')?e.get('properties').each((function(t){return t.trigger('change:value')})):e.set('value',this.getLayerValues())},setValue:function(){},getLayerValues:function(){return this.getLayers().getFullValue()},_getClassRule:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.em,n=t.skipAdd,r=void 0===n?1:n,i=e.getSelected(),o=e.get('StyleManager').getModelToStyle(i,{skipAdd:r,useClasses:1});return o!==i&&o},_getParentTarget:function(t){for(var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em,i=this.model,o=i.get('property'),a=n.isValid||function(t){return t.getStyle()[o]},s=r.get('CssComposer').getAll().filter((function(e){return e.selectorsToString()===t.getSelectorsString()})),l=s.reduce((function(t,e){return t[e.getAtRule()]=e,t}),{}),c=z.sortMediaObject(l),u=c.map((function(t){return t.value})),d=u.indexOf(t),h=u.splice(0,d),f=h.length-1;f>-1;f--){var p=h[f];if(a(p)){e=p;break}}return e},refreshLayers:function(){var t,e,n,r,i,o,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=[],c=this.model,u=this.em,d=this.getLayers(),h=c.get('detached'),f=c.get('property'),p=this.getFirstTarget(),g=this.getComputedValue(),v=u.getSelected(),m={fromTarget:1};if(h){e=a.targetValue||{};var b=function(t){var e=c.get('properties').at(0).get('property');return t&&!Object(l["isUndefined"])(t.getStyle()[e])};if(!Object(l["keys"])(e).length&&g&&v){var y={isValid:function(t){return b(t)}};(r=this._getParentTarget(p,y))?e=r.getStyle():(n=this._getClassRule(),r=!(i=b(n)&&n.getStyle())&&this._getParentTarget(this._getClassRule({skipAdd:0}),y),o=b(r)&&r.getStyle(),e=i||o||{})}t=e,s=d.getLayersFromStyle(e)}else{var w=this.getTargetValue({ignoreDefault:1}),x=w;!x&&g&&((r=this._getParentTarget(p))?x=r.getStyle()[f]:(o=(r=!(i=(n=this._getClassRule())&&n.getStyle()[f])&&this._getParentTarget(this._getClassRule({skipAdd:0})))&&r.getStyle()[f],x=i||o||g)),t=x=x==c.getDefaultValue()?'':x,s=d.getLayersFromValue(x)}var O=c.getLayersFromTarget(p,{resultValue:t,layersObj:s})||s;d.reset(null,m),d.add(O,m),c.set({stackIndex:null},{silent:!0})},getTargetValue:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=e.attributes.detached,r=this.getFirstTarget(),i=L.prototype.getTargetValue.call(this,t);return Object(l["isUndefined"])(i)&&!n?i=e.getValueFromStyle(r.getStyle()):n&&(i=e.getValueFromTarget(r)),i},getPropsConfig:function(){var t=this,e=t.model;return{target:t.target,propTarget:t.propTarget,onChange:function(n,r,o){var a=r.model,s=e.get('status');if(e.get('detached')){var l=a.get('property'),c=a.getDefaultValue(),u=t.getLayers(),d=u.getPropertyValues(l,c);r.updateTargetStyle(d,null,o),'background-image'!=l||o.avoidStore||'computed'!=s||e.get('properties').filter((function(t){return'__'==t.get('property').substr(0,2)})).forEach((function(e){var n=e.get('property'),r=u.getPropertyValues(n,e.getDefaultValue());t.getTargets().forEach((function(t){return t.addStyle(i()({},n,r),o)}))}))}else if('updated'==s){var h=e.getFullValue();e.set('value',h,o),!h&&r.updateTargetStyle(h,null,o)}}}},onRender:function(){var t=this.el,e=this.layers,n=this.propsView,r=t.querySelector('[data-layers-wrapper]');n.render(),r.appendChild(e.render().el)}}),$=a.a.$,U=E.extend({templateInput:function(){var t=this.pfx,e=this.em;return"\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n ")},init:function(){var t=this.em;this.modal=t.get('Modal'),this.am=t.get('AssetManager'),this.events['click #'+this.pfx+'close']='removeFile',this.events['click #'+this.pfx+'images']='openAssetManager',this.delegateEvents()},onRender:function(){if(!this.$input){var t=this.model.getDefaultValue();this.$input=$(""))}this.$preview||(this.$preview=this.$el.find('#'+this.pfx+'preview-file')),this.$previewBox||(this.$previewBox=this.$el.find('#'+this.pfx+'preview-box')),this.setValue(this.componentValue,0)},clearCached:function(){E.prototype.clearCached.apply(this,arguments),this.$preview=null,this.$previewBox=null},setValue:function(t,e){E.prototype.setValue.apply(this,arguments),this.setPreviewView(t&&t!=this.model.getDefaultValue()),this.setPreview(t)},setPreviewView:function(t){var e=this.$previewBox;e&&e[t?'addClass':'removeClass']("".concat(this.pfx,"show")),e&&e.css({display:t?'block':'none'})},spreadUrl:function(t){this.model.set('value',t),this.setPreviewView(1)},setPreview:function(t){var e=this.$preview;t=t&&t.indexOf('url(')<0?"url(".concat(t,")"):t,e&&e.css('background-image',t)},cleanValue:function(){this.setPreviewView(0),this.model.set({value:''},{silent:!0})},removeFile:function(){this.model.set('value',this.model.getDefaultValue());for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};e=K(K({},e),{},{silent:1}),this.inputInst.setValue(t,e)},remove:function(){var t=this;W.prototype.remove.apply(this,arguments);var e=this.inputInst;e&&e.remove&&e.remove(),['inputInst','$color'].forEach((function(e){return t[e]={}}))},onRender:function(){if(!this.input){var t=this.ppfx,e=new q["a"]({target:this.target,model:this.model,ppfx:t}).render();this.el.querySelector(".".concat(t,"fields")).appendChild(e.el),this.$input=e.inputEl,this.$color=e.colorEl,this.input=this.$input.get(0),this.inputInst=e}}}),X=n(7),J=n.n(X);function Z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Q(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:[];return this.set('options',t),this},addOption:function(t){if(t){var e=this.getOptions();this.setOptions([].concat(J()(e),[t]))}return this}});function et(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function nt(t){for(var e=1;e\n \n
\n
\n
\n \n ")},initialize:function(){for(var t=arguments.length,e=new Array(t),n=0;n").concat(e,"")}));var r=this.el.querySelector("#".concat(t,"input-holder"));r.innerHTML=""),this.input=r.firstChild}}})),ot=E.extend({templateInput:function(){this.pfx;var t=this.ppfx;return"\n
\n
\n ")},onRender:function(){var t=this.pfx,e=this.ppfx,n="".concat(e,"radio-item-label"),r=this.model,i=r.get('property'),o=r.get('list')||r.get('options')||[],a=r.cid,s="".concat(t,"radio ").concat(t,"radio-").concat(i);if(!this.input&&o&&o.length){var l='';o.forEach((function(r){var o=r.className?"".concat(r.className," ").concat(t,"icon ").concat(n):'',c="".concat(i,"-").concat(r.value,"-").concat(a),u=r.name||r.value,d=r.title?"title=\"".concat(r.title,"\""):'';l+="\n
\n \n \n
\n ")}));var c=this.el.querySelector(".".concat(e,"field"));c.innerHTML="
").concat(l,"
"),this.input=c.firstChild}},getInputValue:function(){var t=this.getCheckedEl();return t?t.value:''},getCheckedEl:function(){var t=this.getInputEl();return t?t.querySelector('input:checked'):''},setValue:function(t){var e=this.model,n=t||e.get('value')||e.getDefaultValue(),r=this.getInputEl(),i=r?r.querySelector("[value=\"".concat(n,"\"]")):'';if(i)i.checked=!0;else{var o=this.getCheckedEl();o&&(o.checked=!1)}}}),at=n(32);function st(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function lt(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f.callParentInit(f,this,t,e);var n=this.get('unit'),r=this.get('units');this.input=new at["a"]({model:this}),r.length&&!n&&this.set('unit',r[0]),f.callInit(this,t,e)},clearValue:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0,unit:void 0},t),this},parseValue:function(t){var e=f.prototype.parseValue.apply(this,arguments),n=this.input.validateInputValue(e.value,{deepCheck:1}),r=n.value,i=n.unit;return e.value=r,e.unit=i,e},getFullValue:function(){var t=this.get('value'),e=this.get('unit');return t=Object(l["isUndefined"])(t)?'':t,e=!Object(l["isUndefined"])(e)&&t?e:'',t="".concat(t).concat(e),f.prototype.getFullValue.apply(this,[t])}});function ut(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function dt(t){for(var e=1;e\n \n \n ")},getSliderEl:function(){return this.slider||(this.slider=this.el.querySelector('input[type=range]')),this.slider},inputValueChanged:function(){var t=this.model,e=t.get('step');this.getInputEl().value=this.getSliderEl().value;var n=this.getInputValue()-e;t.set('value',n,{avoidStore:1}).set('value',n+e),this.elementUpdated()},inputValueChangedSoft:function(){this.getInputEl().value=this.getSliderEl().value,this.model.set('value',this.getInputValue(),{avoidStore:1}),this.elementUpdated()},setValue:function(t){var e=this.model.parseValue(t);this.getSliderEl().value=parseFloat(e.value),W.prototype.setValue.apply(this,arguments)},onRender:function(){W.prototype.onRender.apply(this,arguments),this.model.get('showInput')||(this.inputInst.el.style.display='none')},clearCached:function(){W.prototype.clearCached.apply(this,arguments),this.slider=null}});function vt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function mt(t){for(var e=1;e=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r).a.$;e["default"]={startSelectPosition:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.isPointed=!1;var i=this.editorModel.get('Utils'),o=t.ownerDocument.body;i&&!this.sorter&&(this.sorter=new i.Sorter({container:o,placer:this.canvas.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:this.ppfx,direction:'a',document:e,wmargin:1,nested:1,em:this.editorModel,canvasRelative:1,scale:function(){return n.em.getZoomDecimal()}})),r.onStart&&(this.sorter.onStart=r.onStart),t&&this.sorter.startSort(t,{container:o})},getOffsetDim:function(){var t=this.offset(this.canvas.getFrameEl()),e=this.offset(this.canvas.getElement());return{top:t.top-e.top,left:t.left-e.left}},stopSelectPosition:function(){this.posTargetCollection=null,this.posIndex='after'==this.posMethod&&0!==this.cDim.length?this.posIndex+1:this.posIndex,this.sorter&&(this.sorter.moved=0,this.sorter.endMove()),this.cDim&&(this.posIsLastEl=0!==this.cDim.length&&'after'==this.posMethod&&this.posIndex==this.cDim.length,this.posTargetEl=0===this.cDim.length?i(this.outsideElem):!this.posIsLastEl&&this.cDim[this.posIndex]?i(this.cDim[this.posIndex][5]).parent():i(this.outsideElem),this.posTargetModel=this.posTargetEl.data('model'),this.posTargetCollection=this.posTargetEl.data('model-comp'))},enable:function(){this.startSelectPosition()},nearFloat:function(t,e,n){var r=t||0,i=e||'before',o=n.length,a=0!==o&&'after'==i&&r==o;return 0!==o&&(!a&&!n[r][4]||n[r-1]&&!n[r-1][4]||a&&!n[r-1][4])?1:0},run:function(){this.enable()},stop:function(){this.stopSelectPosition(),this.$wrapper.css('cursor',''),this.$wrapper.unbind()}}},function(t,e,n){"use strict";var r=n(40);window.Promise=window.Promise||r["a"],e["a"]='function'==typeof fetch?fetch.bind():function(t,e){return new r["a"]((function(n,i){var o=new XMLHttpRequest;for(var a in o.open(e.method||'get',t),o.withCredentials='include'==e.credentials,e.headers||{})o.setRequestHeader(a,e.headers[a]);o.onload=function(t){return n({status:o.status,statusText:o.statusText,text:function(){return r["a"].resolve(o.responseText)}})},o.onerror=i,o.upload&&e.onProgress&&(o.upload.onprogress=e.onProgress),e.body?o.send(e.body):o.send()}))}},function(t,e,n){"use strict";var r=n(8),i=n.n(r),o=n(0);e["a"]=function(t){var e=t,n='data-gjs-';return{compTypes:'',modelAttrStart:n,splitPropsFromAttr:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r={},i={};return Object(o["each"])(e,(function(e,a){if(0===a.indexOf(t.modelAttrStart)){var s=a.replace(n,''),l=e.length,c=e&&Object(o["isString"])(e),u=c&&e.substr(0,1),d=c&&e.substr(l-1);e='false'!==(e='true'===e||e)&&e;try{e='{'==u&&'}'==d||'['==u&&']'==d?JSON.parse(e):e}catch(t){}r[s]=e}else i[a]=e})),{props:r,attrs:i}},parseStyle:function(t){for(var e={},n=t.split(';'),r=0,i=n.length;r0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i&&i.type){var a=n.getBaseType();t=(r=n.getType(i.type))?r.model:a.model,e=r?r.view:a.view}else{var s=n.recognizeType(i);t=(r=s.type).model,e=r.view,i=s.attributes}var l=new t(i,o);return l.typeView=e,l};var r=this.init&&this.init.bind(this);r&&r()},recognizeType:function(t){for(var e=this.getTypes(),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r='',i=this.em,o=i&&i.getConfig('avoidInlineStyle'),a=t.styleToString(),s=t.get('classes'),l=n.wrapperIsBody,c=t.get('wrapper');if(this.ids.push("#".concat(t.getId())),s.each((function(t){return e.compCls.push(t.getFullName())})),!o&&a){var u="#".concat(t.getId());r="".concat(u=l&&c?'body':u,"{").concat(a,"}")}var d=t.components();return d.each((function(t){return r+=e.buildFromModel(t,n)})),r},build:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.cssc,i=n.em||'';this.em=i,this.compCls=[],this.ids=[];var a=this.buildFromModel(t,n),s=Object(o["isUndefined"])(n.clearStyles)&&i?i.getConfig('clearStyles'):n.clearStyles;if(r){var l=r.getAll(),c={},u=[];l.each((function(t){var r=t.getAtRule();if(r){var i=c[r];i?i.push(t):c[r]=[t]}else a+=e.buildFromRule(t,u,n)})),this.sortMediaObject(c).forEach((function(t){var r='',i=t.key;t.value.forEach((function(t){var o=e.buildFromRule(t,u,n);t.get('singleAtRule')?a+="".concat(i,"{").concat(o,"}"):r+=o})),r&&(a+="".concat(i,"{").concat(r,"}"))})),i&&s&&l.remove(u)}return a},buildFromRule:function(t,e){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o='',a=t.selectorsToString({skipAdd:1}),s=t.get('selectorsAdd'),l=t.get('singleAtRule');if(t.get('selectors').each((function(t){var e=t.getFullName();(r.compCls.indexOf(e)>=0||r.ids.indexOf(e)>=0||i.keepUnusedStyles)&&(n=1)})),a&&n||s||l){var c=t.getDeclaration();c&&(o+=c)}else e.push(t);return o},getQueryLength:function(t){var e=/(-?\d*\.?\d+)\w{0,}/.exec(t);return e?parseFloat(e[1]):a},sortMediaObject:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[];return Object(o["each"])(e,(function(t,e){return n.push({key:e,value:t})})),n.sort((function(e,n){var r=[e.key,n.key].every((function(t){return-1!==t.indexOf('min-width')})),i=r?e.key:n.key,o=r?n.key:e.key;return t.getQueryLength(i)-t.getQueryLength(o)}))}})},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=n(0),a=n(3),s=n(18);i.a.$;e["a"]=s["a"].extend({events:{'change input':'handleChange','change select':'handleUnitChange','click [data-arrow-up]':'upArrowClick','click [data-arrow-down]':'downArrowClick','mousedown [data-arrows]':'downIncrement',keydown:'handleKeyDown'},template:function(){var t=this.ppfx;return"\n \n \n
\n
\n
\n
\n ")},inputClass:function(){var t=this.ppfx;return this.opts.contClass||"".concat(t,"field ").concat(t,"field-integer")},initialize:function(){s["a"].prototype.initialize.apply(this,arguments),Object(o["bindAll"])(this,'moveIncrement','upIncrement'),this.doc=document,this.listenTo(this.model,'change:unit',this.handleModelChange)},setValue:function(t,e){var n=e||{},r=this.validateInputValue(t,{deepCheck:1}),i={value:r.value};(r.unit||r.force)&&(i.unit=r.unit),this.model.set(i,n),n.silent&&this.handleModelChange()},handleChange:function(t){t.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()},handleUnitChange:function(t){t.stopPropagation();var e=this.getUnitEl().value;this.model.set('unit',e),this.elementUpdated()},handleKeyDown:function(t){'ArrowUp'===t.key&&(t.preventDefault(),this.upArrowClick()),'ArrowDown'===t.key&&(t.preventDefault(),this.downArrowClick())},elementUpdated:function(){this.model.trigger('el:change')},handleModelChange:function(){var t=this.model;this.getInputEl().value=t.get('value');var e=this.getUnitEl();e&&(e.value=t.get('unit')||'')},getUnitEl:function(){if(!this.unitEl){var t=this.model,e=t.get('units')||[];if(e.length){var n=[];e.forEach((function(e){var r=e==t.get('unit')?'selected':'';n.push(""))}));var r=document.createElement('div');r.innerHTML=""),this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get('step'),n=parseFloat(t.get('value'));n=this.normalizeValue(n+e);var r=this.validateInputValue(n);t.set('value',r.value),this.elementUpdated()},downArrowClick:function(){var t=this.model,e=t.get('step'),n=parseFloat(t.get('value')),r=this.normalizeValue(n-e),i=this.validateInputValue(r);t.set('value',i.value),this.elementUpdated()},downIncrement:function(t){t.preventDefault(),this.moved=0;var e=this.model.get('value');e=this.normalizeValue(e),this.current={y:t.pageY,val:e},Object(a["w"])(this.doc,'mousemove',this.moveIncrement),Object(a["w"])(this.doc,'mouseup',this.upIncrement)},moveIncrement:function(t){this.moved=1;var e=this.model,n=e.get('step'),r=this.current,i=this.normalizeValue(r.val+(r.y-t.pageY)*n);return this.prValue=this.validateInputValue(i).value,e.set('value',this.prValue,{avoidStore:1}),!1},upIncrement:function(){var t=this.model,e=t.get('step');if(Object(a["v"])(this.doc,'mouseup',this.upIncrement),Object(a["v"])(this.doc,'mousemove',this.moveIncrement),this.prValue&&this.moved){var n=this.prValue-e;t.set('value',n,{avoidStore:1}).set('value',n+e),this.elementUpdated()}},normalizeValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.model,r=n.get('step'),i=0;if(isNaN(t))return e;if(t=parseFloat(t),Math.floor(t)!==t){var o=r.toString().split('.')[1];i=o?o.length:0}return i?parseFloat(t.toFixed(i)):t},validateInputValue:function(t,e){var n=0,r=e||{},i=this.model,a='',s=Object(o["isUndefined"])(t)?a:t,l=i.get('units')||[],c=i.get('unit')||l.length&&l[0]||'',u=i.get('max'),d=i.get('min'),h=!!i.get('limitlessMax'),f=!!i.get('limitlessMin');if(r.deepCheck){var p=i.get('fixedValues')||[];if(s){var g=new RegExp('^'+p.join('|'),'g');if(p.length&&g.test(s))s=s.match(g)[0],c='',n=1;else{var v=s+'';s+='',s=parseFloat(s.replace(',','.')),s=isNaN(s)?a:s;var m=v.replace(s,'');Object(o["indexOf"])(l,m)>=0&&(c=m)}}}return h||Object(o["isUndefined"])(u)||''===u||(s=s>u?u:s),f||Object(o["isUndefined"])(d)||''===d||(s=s1&&void 0!==arguments[1]?arguments[1]:{};return'string'==typeof t&&(t=this.editor.get('Parser').parseCss(t)),e.em=this.editor,a.prototype.add.apply(this,[t,e])}})},function(t,e,n){"use strict";var r=n(7),i=n.n(r),o=n(2),a=n.n(o),s=n(0),l=n(1),c=n.n(l),u=n(23),d=n(12);function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};this.config=t||{},this.opt=e,this.em=e.em,this.ensureSelectors()},clone:function(){var t=f({},this.opt),e=f({},this.attributes);return e.selectors=this.get('selectors').map((function(t){return t.clone()})),new this.constructor(e,t)},ensureSelectors:function(){var t=this.em,e=t&&t.get('SelectorManager'),n=[this,'change:selectors',this.ensureSelectors],r=this.getSelectors();if(this.stopListening.apply(this,n),r.models&&(r=i()(r.models)),Array.isArray(r)){var o=r.filter((function(t){return t})).map((function(t){return e?e.add(t):t}));r=new d["a"](o)}this.set('selectors',r),this.listenTo.apply(this,n)},getAtRule:function(){var t=this.get('atRuleType'),e=this.get('mediaText'),n=t?"@".concat(t):e?'@media':'';return n+(e&&n?" ".concat(e):'')},selectorsToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.em,r=this.get('state'),i=this.get('wrapper'),o=this.get('selectorsAdd'),a=i&&n&&n.getConfig('wrapperIsBody'),s={escape:function(t){return p&&p.escape?p.escape(t):t}},l=a?'body':this.get('selectors').getFullString(0,s),c=r&&!t.skipState?":".concat(r):'';return l&&e.push("".concat(l).concat(c)),o&&!t.skipAdd&&e.push(o),e.join(', ')},getDeclaration:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e='',n=this.selectorsToString(),r=this.styleToString(t),i=this.get('singleAtRule');return(n||i)&&r&&(e=i?r:"".concat(n,"{").concat(r,"}")),e},toCSS:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e='',n=this.getAtRule(),r=this.getDeclaration(t);return r&&(e=r),n&&e&&(e="".concat(n,"{").concat(e,"}")),e},toJSON:function(){for(var t=arguments.length,e=new Array(t),n=0;n3&&void 0!==arguments[3]?arguments[3]:{},i=e||'',o=n||'',a=r.selectorsAdd||'',l=r.atRuleType||'';t instanceof Array||t.models||(t=[t]);var c=Object(s["map"])(t.models||t,(function(t){return t.get('name')})),u=Object(s["map"])(this.get('selectors').models,(function(t){return t.get('name')})),d=!1;if(c.length!==u.length)return d;for(var h=0;h2&&void 0!==arguments[2]?arguments[2]:{};t.views.forEach((function(t){if(t){var e=t.childrenView,n=t.scriptContainer;e&&e.stopListening(),n&&n.remove(),t.remove.apply(t)}}));var i=t.components();i.forEach((function(t){return n.removeChildren(t,e,r)}))},addTo:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.config.em,r=this.collection.indexOf(t);if(this.addToCollection(t,null,r),n&&!e.temporary){var i=function t(e){n.trigger('component:add',e),e.components().forEach((function(e){return t(e)}))};i(t)}},addToCollection:function(t,e,r){this.compView||(this.compView=n(6).default);for(var i=this.config,a=this.opts,s=this.em,l=e||null,c=i.frameView,u=void 0===c?{}:c,d=u.model&&t.getView(u.model),h=a.componentTypes||s&&s.get('DomComponents').getTypes(),f=t.get('type'),p=this.compView,g=0;g1&&void 0!==arguments[1]?arguments[1]:{},r=n.previousModels,i=void 0===r?[]:r;this.parentEl.innerHTML='',i.forEach((function(t){return e.removeChildren(t,e.collection)})),t.each((function(t){return e.addToCollection(t)}))},render:function(t){var e=this,n=this.el,r=document.createDocumentFragment();return this.parentEl=t||this.el,this.collection.each((function(t){return e.addToCollection(t,r)})),n.innerHTML='',n.appendChild(r),this}})},function(t,e,n){"use strict";var r,i=n(0),o=n(3),a=n(1),s=n.n(a),l=n(6),c=n(5),u='contentEditable',d=s.a.$;e["a"]=s.a.View.extend({events:{'mousedown [data-toggle-move]':'startSort','touchstart [data-toggle-move]':'startSort','click [data-toggle-visible]':'toggleVisibility','click [data-toggle-open]':'toggleOpening','click [data-toggle-select]':'handleSelect','mouseover [data-toggle-select]':'handleHover','mouseout [data-toggle-select]':'handleHoverOut','dblclick [data-name]':'handleEdit','keydown [data-name]':'handleEditKey','focusout [data-name]':'handleEditEnd'},template:function(t){var e=this.pfx,n=this.ppfx,r=this.config,i=this.clsNoEdit,o=r.hidable,a=this.countChildren(t),s=a?'':this.clsNoChild,l="".concat(this.clsTitle," ").concat(s),c="".concat(this.clsTitleC," ").concat(n,"one-bg"),u="".concat(this.clsCaret," fa fa-chevron-right"),d="".concat(this.inputNameCls," ").concat(i," ").concat(n,"no-app"),h=this.level+1,f="".concat(30+10*h,"px"),p=t.getName(),g=t.getIcon(),v="".concat(e,"layer");return"\n ".concat(o?""):'',"\n
\n
\n
\n \n ").concat(g?"").concat(g,""):'',"\n ").concat(p,"\n
\n
\n
\n
").concat(a||'',"
\n
\n \n
\n
")},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(i["bindAll"])(this,'__render'),this.opt=t,this.level=t.level;var e=t.config||{},n=e.onInit;this.config=e,this.em=t.config.em,this.ppfx=this.em.get('Config').stylePrefix,this.sorter=t.sorter||'',this.pfx=this.config.stylePrefix,this.parentView=t.parentView;var r=this.pfx,o=this.ppfx,a=this.model,s=a.get('components'),l=a.get('type')||'default';a.set('open',!1),this.listenTo(s,'remove add reset',this.checkChildren),this.listenTo(a,'change:status',this.updateStatus),this.listenTo(a,'change:open',this.updateOpening),this.listenTo(a,'change:layerable',this.updateLayerable),this.listenTo(a,'change:style:display',this.updateVisibility),this.className="".concat(r,"layer ").concat(r,"layer__t-").concat(l," no-select ").concat(o,"two-color"),this.inputNameCls="".concat(o,"layer-name"),this.clsTitleC="".concat(r,"layer-title-c"),this.clsTitle="".concat(r,"layer-title"),this.clsCaret="".concat(r,"layer-caret"),this.clsCount="".concat(r,"layer-count"),this.clsMove="".concat(r,"layer-move"),this.clsChildren="".concat(r,"layer-children"),this.clsNoChild="".concat(r,"layer-no-chld"),this.clsEdit="".concat(this.inputNameCls,"--edit"),this.clsNoEdit="".concat(this.inputNameCls,"--no-edit"),this.$el.data('model',a),this.$el.data('collection',s),a.viewLayer=this,n.bind(this)({component:a,render:this.__render,listenTo:this.listenTo})},getVisibilityEl:function(){return this.eyeEl||(this.eyeEl=this.$el.children(".".concat(this.pfx,"layer-vis"))),this.eyeEl},updateVisibility:function(){var t=this.pfx,e=this.model,n="".concat(t,"layer-hidden"),r='none'===e.getStyle().display?'addClass':'removeClass';this.$el[r](n),this.getVisibilityEl()[r]('fa-eye-slash')},toggleVisibility:function(t){t&&t.stopPropagation();var e=this.model,n=this.em,r='__prev-display',i=e.get(r),o=e.getStyle(),a=o.display;'none'==a?(delete o.display,i&&(o.display=i,e.unset(r))):(a&&e.set(r,a),o.display='none'),e.setStyle(o),n&&n.trigger('component:toggled')},handleEdit:function(t){t&&t.stopPropagation();var e=this.em,n=this.$el,r=this.clsNoEdit,i=this.clsEdit,o=this.getInputName();o[u]=!0,o.focus(),document.execCommand('selectAll',!1,null),e&&e.setEditing(1),n.find(".".concat(this.inputNameCls)).removeClass(r).addClass(i)},handleEditKey:function(t){t.stopPropagation(),(Object(o["o"])(t)||Object(o["n"])(t))&&this.handleEditEnd(t)},handleEditEnd:function(t){t&&t.stopPropagation();var e=this.em,n=this.$el,r=this.clsNoEdit,i=this.clsEdit,o=this.getInputName(),a=o.textContent;o.scrollLeft=0,o[u]=!1,this.model.set({'custom-name':a}),e&&e.setEditing(0),n.find(".".concat(this.inputNameCls)).addClass(r).removeClass(i)},getInputName:function(){return this.inputName||(this.inputName=this.el.querySelector(".".concat(this.inputNameCls))),this.inputName},updateOpening:function(){var t=this.opt.opened||{},e=this.model,n='fa-chevron-down';e.get('open')?(this.$el.addClass('open'),this.getCaret().addClass(n),t[e.cid]=e):(this.$el.removeClass('open'),this.getCaret().removeClass(n),delete t[e.cid])},toggleOpening:function(t){var e=this.model;t.stopImmediatePropagation(),e.get('components').length&&e.set('open',!e.get('open'))},handleSelect:function(t){t.stopPropagation();var e=this.em,n=this.config,r=this.model;if(e){e.setSelected(r,{fromLayers:1,event:t});var i=n.scrollCanvas;i&&r.views.forEach((function(t){return t.scrollIntoView(i)}))}},handleHover:function(t){t.stopPropagation();var e=this.em,n=this.config,r=this.model;e&&n.showHover&&e.setHovered(r,{fromLayers:1})},handleHoverOut:function(t){t.stopPropagation();var e=this.em,n=this.config;e&&n.showHover&&e.setHovered(0,{fromLayers:1})},startSort:function(t){t.stopPropagation();var e=this.em,n=this.sorter;t.button&&0!==t.button||n&&(n.onStart=function(t){return e.trigger("".concat(c["b"],":start"),t)},n.onMoveClb=function(t){return e.trigger(c["b"],t)},n.startSort(t.target))},freeze:function(){this.$el.addClass(this.pfx+'opac50'),this.model.set('open',0)},unfreeze:function(){this.$el.removeClass(this.pfx+'opac50')},updateStatus:function(t){l["default"].prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover}])},isVisible:function(){var t=this.model.getStyle().display;return!(t&&'none'===t)},checkChildren:function(){var t=this.model,e=this.clsNoChild,n=this.countChildren(t),r=this.$el.children(".".concat(this.clsTitleC)).children(".".concat(this.clsTitle)),i=this.cnt;i||(i=this.$el.children('[data-count]').get(0),this.cnt=i),r[n?'removeClass':'addClass'](e),i&&(i.innerHTML=n||''),!n&&t.set('open',0)},countChildren:function(t){var e=0;return t.get('components').each((function(t){var n=this.opt.isCountable,r=this.config.hideTextnode;n&&!n(t,r)||e++}),this),e},getCaret:function(){if(!this.caret||!this.caret.length){this.pfx;this.caret=this.$el.children(".".concat(this.clsTitleC)).find(".".concat(this.clsCaret))}return this.caret},setRoot:function(t){t=Object(i["isString"])(t)?this.em.getWrapper().find(t)[0]:t;var e=Object(o["g"])(t,d);e&&(this.stopListening(),this.model=e,this.initialize(this.opt),this.render())},updateLayerable:function(){(this.parentView||this).render()},render:function(){var t=this.model,e=this.config,o=this.pfx,a=this.ppfx,s=this.opt.isCountable,l=s&&!s(t,e.hideTextnode),c=this.isVisible(),u=this.$el.empty(),d=this.level+1;Object(i["isUndefined"])(r)&&(r=n(90).default);var h=new r({collection:t.get('components'),config:this.config,sorter:this.sorter,opened:this.opt.opened,parentView:this,parent:t,level:d}).render().$el;return this.config.showWrapper||1!==d?(u.html(this.template(t)),u.find(".".concat(this.clsChildren)).append(h)):u.append(h),t.get('draggable')&&this.config.sortable||u.children(".".concat(this.clsMove)).remove(),!c&&(this.className+=" ".concat(o,"hide")),l&&(this.className+=" ".concat(a,"hidden")),u.attr('class',this.className),this.updateOpening(),this.updateStatus(),this.updateVisibility(),this.__render(),this},__render:function(){var t=this.model,e=this.config,n=this.el;e.onRender.bind(this)({component:t,el:n})}})},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=i.a.View.extend({tagName:'style',initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{};var e=this.model,n='change:style change:state change:mediaText';this.listenTo(e,n,this.render),this.listenTo(e,'destroy remove',this.remove),this.listenTo(e.get('selectors'),'change',this.render)},render:function(){var t=this.model.get('important');return this.el.innerHTML=this.model.toCSS({important:t}),this}}),a=o.extend({_createElement:function(t){return document.createTextNode('')},render:function(){var t=this.model,e=t.get('important');return this.el.textContent=t.getDeclaration({important:e}),this}}),s=i.a.$,l=function(t,e){return"".concat(t).concat(e?"-".concat(parseFloat(e)):'')};e["a"]=i.a.View.extend({initialize:function(t){var e=t.config||{};this.atRules={},this.config=e,this.em=e.em,this.pfx=e.stylePrefix||'',this.className=this.pfx+'rules';var n=this.collection;this.listenTo(n,'add',this.addTo),this.listenTo(n,'reset',this.render)},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){if(this.renderStarted){var n,r,i=e||null,s={model:t,config:this.config};if('keyframes'===t.get('atRuleType')){var c=t.getAtRule(),u=this.atRules[c];if(!u){var d=document.createElement('style');u=document.createTextNode(''),d.appendChild(document.createTextNode("".concat(c,"{"))),d.appendChild(u),d.appendChild(document.createTextNode("}")),this.atRules[c]=u,n=d}r=new a(s),u.appendData(r.render().el.textContent)}else n=(r=new o(s)).render().el;var h=this.className,f=t.get('mediaText'),p=l(h),g=p;if(f&&(g=l(h,this.getMediaWidth(f))),n){var v,m=i||this.el;try{v=m.querySelector("#".concat(g))}catch(t){}v||(v=m.querySelector("#".concat(p))),v.appendChild(n)}return n}},getMediaWidth:function(t){return t&&t.replace("(".concat(this.em.getConfig('mediaCondition'),": "),'').replace(')','')},render:function(){var t=this;this.renderStarted=1,this.atRules={};var e=this.em,n=this.$el,r=this.className,i=this.collection,o=document.createDocumentFragment();n.empty();var a=e.get('DeviceManager').getAll().pluck('priority');return a.every((function(t){return t}))&&a.unshift(0),a.forEach((function(t){return s("
")).appendTo(o)})),i.each((function(e){return t.addToCollection(e,o)})),n.append(o),n.attr('class',r),this}})},function(t,e,n){"use strict";var r=n(2),i=n.n(r),o=n(1),a=n.n(o),s=n(0),l=n(8),c=n.n(l),u=n(18);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e","
","
",''].join(''),s=function(){var t='';if(i)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","",'
','
',"
","
","
","
","
","
","
","
",'
','
','
',"
",'
',"
","
",t,'
','
',"
",'
',"
","",'
',"
","
","","",'
','
','
'].join('')}();function l(e,n,r,i){for(var a=[],s=0;s')}else{a.push(t('
').append(t('').attr('title',i.noColorSelectedText)).html())}}return"
"+a.join('')+'
'}function u(c,u){var d,v,m,b,y=function(e,r){var i=t.extend({},n,e);return i.callbacks={move:f(i.move,r),change:f(i.change,r),show:f(i.show,r),hide:f(i.hide,r),beforeShow:f(i.beforeShow,r)},i}(u,c),w=y.flat,x=y.showSelectionPalette,O=y.localStorageKey,C=y.theme,S=y.callbacks,j=(d=Bt,v=10,function(){var t=this,e=arguments,n=function(){b=null,d.apply(t,e)};m&&clearTimeout(b),!m&&b||(b=setTimeout(n,v))}),T=!1,P=!1,E=0,M=0,D=0,A=0,L=0,_=0,N=0,I=0,F=0,V=0,R=1,z=[],H=[],$={},U=y.selectionPalette.slice(0),B=y.maxSelectionSize,W='sp-dragging',q=null,G=c.ownerDocument,K=(G.body,t(c)),Y=!1,X=t(s,G).addClass(C),J=X.find('.sp-picker-container'),Z=X.find('.sp-color'),Q=X.find('.sp-dragger'),tt=X.find('.sp-hue'),et=X.find('.sp-slider'),nt=X.find('.sp-alpha-inner'),rt=X.find('.sp-alpha'),it=X.find('.sp-alpha-handle'),ot=X.find('.sp-input'),at=X.find('.sp-palette'),st=X.find('.sp-initial'),lt=X.find('.sp-cancel'),ct=X.find('.sp-clear'),ut=X.find('.sp-choose'),dt=X.find('.sp-palette-toggle'),ht=K.is('input'),ft=ht&&'color'===K.attr('type')&&g(),pt=ht&&!w,gt=pt?t(a).addClass(C).addClass(y.className).addClass(y.replacerClassName):t([]),vt=pt?gt:K,mt=gt.find('.sp-preview-inner'),bt=y.color||ht&&K.val(),yt=!1,wt=y.preferredFormat,xt=!y.showButtons||y.clickoutFiresChange,Ot=!bt,Ct=y.allowEmpty&&!ft;function St(){if(y.showPaletteOnly&&(y.showPalette=!0),dt.text(y.showPaletteOnly?y.togglePaletteMoreText:y.togglePaletteLessText),y.palette){z=y.palette.slice(0),H=t.isArray(z[0])?z:[z],$={};for(var e=0;e1&&(delete window.localStorage[O],t.each(e,(function(t,e){jt(e)})))}catch(t){}try{U=window.localStorage[O].split(';')}catch(t){}}}function jt(e){if(x){var n=k(e).toRgbString();if(!$[n]&&-1===t.inArray(n,U))for(U.push(n);U.length>B;)U.shift();if(O&&window.localStorage)try{window.localStorage[O]=U.join(';')}catch(t){}}}function Tt(){var e=Rt(),n=t.map(H,(function(t,n){return l(t,e,'sp-palette-row sp-palette-row-'+n,y)}));kt(),U&&n.push(l(function(){var t=[];if(y.showPalette)for(var e=0;ef&&f>i?Math.abs(g.left+i-f):0),g.top-=Math.min(g.top,g.top+o>p&&p>o?Math.abs(o+a-r):r),g}(X,vt))),$t(),y.showPalette&&Tt(),K.trigger('reflow.spectrum'))}function Wt(){It(),Y=!0,K.attr('disabled',!0),vt.addClass('sp-disabled')}!function(){if(i&&X.find('*:not(input)').attr('unselectable','on'),St(),pt&&K.after(gt).hide(),Ct||ct.hide(),w)K.after(X).hide();else{var e='parent'===y.appendTo?K.parent():t(y.appendTo);1!==e.length&&(e=t('body')),e.append(X)}function n(e){return e.data&&e.data.ignore?(Vt(t(e.target).closest('.sp-thumb-el').data('color')),zt()):(Vt(t(e.target).closest('.sp-thumb-el').data('color')),zt(),Ut(!0),y.hideAfterPaletteSelect&&It()),!1}kt(),vt.bind('click.spectrum touchstart.spectrum',(function(e){Y||At(),e.stopPropagation(),t(e.target).is('input')||e.preventDefault()})),(K.is(':disabled')||!0===y.disabled)&&Wt(),X.click(h),ot.change(Dt),ot.bind('paste',(function(){setTimeout(Dt,1)})),ot.keydown((function(t){13==t.keyCode&&Dt()})),lt.text(y.cancelText),lt.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),Ft(),It()})),ct.attr('title',y.clearText),ct.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),Ot=!0,zt(),w&&Ut(!0)})),ut.text(y.chooseText),ut.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),i&&ot.is(':focus')&&ot.trigger('change'),ot.hasClass('sp-validation-error')||(Ut(!0),It())})),dt.text(y.showPaletteOnly?y.togglePaletteMoreText:y.togglePaletteLessText),dt.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),y.showPaletteOnly=!y.showPaletteOnly,y.showPaletteOnly||w||X.css('left','-='+(J.outerWidth(!0)+5)),St()})),p(rt,(function(t,e,n){R=t/L,Ot=!1,n.shiftKey&&(R=Math.round(10*R)/10),zt()}),Et,Mt),p(tt,(function(t,e){I=parseFloat(e/A),Ot=!1,y.showAlpha||(R=1),zt()}),Et,Mt),p(Z,(function(t,e,n){if(n.shiftKey){if(!q){var r=F*E,i=M-V*M,o=Math.abs(t-r)>Math.abs(e-i);q=o?'x':'y'}}else q=null;var a=!q||'y'===q;(!q||'x'===q)&&(F=parseFloat(t/E)),a&&(V=parseFloat((M-e)/M)),Ot=!1,y.showAlpha||(R=1),zt()}),Et,Mt),bt?(Vt(bt),Ht(),wt=y.preferredFormat||k(bt).format,jt(bt)):Ht(),w&&Lt();var r=i?'mousedown.spectrum':'click.spectrum touchstart.spectrum';at.delegate('.sp-thumb-el',r,n),st.delegate('.sp-thumb-el:nth-child(1)',r,{ignore:!0},n)}();var qt={show:Lt,hide:It,toggle:At,reflow:Bt,option:function(n,r){return n===e?t.extend({},y):r===e?y[n]:(y[n]=r,'preferredFormat'===n&&(wt=y.preferredFormat),void St())},enable:function(){Y=!1,K.attr('disabled',!1),vt.removeClass('sp-disabled')},disable:Wt,offset:function(t){y.offset=t,Bt()},set:function(t){Vt(t),Ut()},get:Rt,destroy:function(){K.show(),vt.unbind('click.spectrum touchstart.spectrum'),X.remove(),gt.remove(),r[qt.id]=null},container:X};return qt.id=r.push(qt)-1,qt}function d(){}function h(t){t.stopPropagation()}function f(t,e){var n=Array.prototype.slice,r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}function p(e,n,r,o){n=n||function(){},r=r||function(){},o=o||function(){};var a=document,s=!1,l={},c=0,u=0,d='ontouchstart'in window,h={};function f(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function p(t){if(s){if(i&&a.documentMode<9&&!t.button)return g();var r=t&&t.touches&&t.touches[0],o=r&&r.pageX||t.pageX,h=r&&r.pageY||t.pageY,p=Math.max(0,Math.min(o-l.left,u)),v=Math.max(0,Math.min(h-l.top,c));d&&f(t),n.apply(e,[p,v,t])}}function g(){s&&(t(a).unbind(h),t(a.body).removeClass('sp-dragging'),setTimeout((function(){o.apply(e,arguments)}),0)),s=!1}h['selectstart']=f,h['dragstart']=f,h['touchmove mousemove']=p,h['touchend mouseup']=g,t(e).bind('touchstart mousedown',(function(n){var i=n.which?3==n.which:2==n.button;i||s||!1!==r.apply(e,arguments)&&(s=!0,c=t(e).height(),u=t(e).width(),l=t(e).offset(),t(a).bind(h),t(a.body).addClass('sp-dragging'),p(n),f(n))}))}function g(){return t.fn.spectrum.inputTypeColorSupport()}var v='spectrum.id';t.fn.spectrum=function(e,n){if('string'==typeof e){var i=this,o=Array.prototype.slice.call(arguments,1);return this.each((function(){var n=r[t(this).data(v)];if(n){var a=n[e];if(!a)throw new Error("Spectrum: no such method: '"+e+"'");'get'==e?i=n.get():'container'==e?i=n.container:'option'==e?i=n.option.apply(n,o):'destroy'==e?(n.destroy(),t(this).removeData(v)):a.apply(n,o)}})),i}return this.spectrum('destroy').each((function(){var n=u(this,t.extend({},e,t(this).data()));t(this).data(v,n.id)}))},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=p,t.fn.spectrum.defaults=n,t.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var n=t("")[0];e._cachedResult='color'===n.type&&''!==n.value}return e._cachedResult},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t('input[type=color]');e.length&&!g()&&e.spectrum({preferredFormat:'hex6'})};var m=/^[\s,#]+/,b=/\s+$/,y=0,w=Math,x=w.round,O=w.min,C=w.max,S=w.random,k=function t(e,n){if(n=n||{},(e=e||'')instanceof t)return e;if(!(this instanceof t))return new t(e,n);var r=function(t){var e={r:0,g:0,b:0},n=1,r=!1,i=!1;'string'==typeof t&&(t=function(t){t=t.replace(m,'').replace(b,'').toLowerCase();var e,n=!1;if(U[t])t=U[t],n=!0;else if('transparent'==t)return{r:0,g:0,b:0,a:0,format:'name'};if(e=tt.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=tt.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=tt.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=tt.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=tt.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=tt.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=tt.hex8.exec(t))return{a:(r=e[1],K(r)/255),r:K(e[2]),g:K(e[3]),b:K(e[4]),format:n?'name':'hex8'};var r;if(e=tt.hex6.exec(t))return{r:K(e[1]),g:K(e[2]),b:K(e[3]),format:n?'name':'hex'};if(e=tt.hex3.exec(t))return{r:K(e[1]+''+e[1]),g:K(e[2]+''+e[2]),b:K(e[3]+''+e[3]),format:n?'name':'hex'};return!1}(t));'object'==c()(t)&&(t.hasOwnProperty('r')&&t.hasOwnProperty('g')&&t.hasOwnProperty('b')?(o=t.r,a=t.g,s=t.b,e={r:255*q(o,255),g:255*q(a,255),b:255*q(s,255)},r=!0,i='%'===String(t.r).substr(-1)?'prgb':'rgb'):t.hasOwnProperty('h')&&t.hasOwnProperty('s')&&t.hasOwnProperty('v')?(t.s=X(t.s),t.v=X(t.v),e=function(t,e,n){t=6*q(t,360),e=q(e,100),n=q(n,100);var r=w.floor(t),i=t-r,o=n*(1-e),a=n*(1-i*e),s=n*(1-(1-i)*e),l=r%6;return{r:255*[n,a,o,o,s,n][l],g:255*[s,n,n,a,o,o][l],b:255*[o,o,s,n,n,a][l]}}(t.h,t.s,t.v),r=!0,i='hsv'):t.hasOwnProperty('h')&&t.hasOwnProperty('s')&&t.hasOwnProperty('l')&&(t.s=X(t.s),t.l=X(t.l),e=function(t,e,n){var r,i,o;function a(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=q(t,360),e=q(e,100),n=q(n,100),0===e)r=i=o=n;else{var s=n<.5?n*(1+e):n+e-n*e,l=2*n-s;r=a(l,s,t+1/3),i=a(l,s,t),o=a(l,s,t-1/3)}return{r:255*r,g:255*i,b:255*o}}(t.h,t.s,t.l),r=!0,i='hsl'),t.hasOwnProperty('a')&&(n=t.a));var o,a,s;return n=W(n),{ok:r,format:t.format||i,r:O(255,C(e.r,0)),g:O(255,C(e.g,0)),b:O(255,C(e.b,0)),a:n}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=x(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=x(this._r)),this._g<1&&(this._g=x(this._g)),this._b<1&&(this._b=x(this._b)),this._ok=r.ok,this._tc_id=y++};function j(t,e,n){t=q(t,255),e=q(e,255),n=q(n,255);var r,i,o=C(t,e,n),a=O(t,e,n),s=(o+a)/2;if(o==a)r=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case t:r=(e-n)/l+(e>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(k(r));return o}function $(t,e){e=e||6;for(var n=k(t).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/e;e--;)a.push(k({h:r,s:i,v:o})),o=(o+s)%1;return a}k.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this._a=W(t),this._roundA=x(100*this._a)/100,this},toHsv:function(){var t=T(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=T(this._r,this._g,this._b),e=x(360*t.h),n=x(100*t.s),r=x(100*t.v);return 1==this._a?'hsv('+e+', '+n+'%, '+r+'%)':'hsva('+e+', '+n+'%, '+r+'%, '+this._roundA+')'},toHsl:function(){var t=j(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=j(this._r,this._g,this._b),e=x(360*t.h),n=x(100*t.s),r=x(100*t.l);return 1==this._a?'hsl('+e+', '+n+'%, '+r+'%)':'hsla('+e+', '+n+'%, '+r+'%, '+this._roundA+')'},toHex:function(t){return P(this._r,this._g,this._b,t)},toHexString:function(t){return'#'+this.toHex(t)},toHex8:function(){return E(this._r,this._g,this._b,this._a)},toHex8String:function(){return'#'+this.toHex8()},toRgb:function(){return{r:x(this._r),g:x(this._g),b:x(this._b),a:this._a}},toRgbString:function(){return 1==this._a?'rgb('+x(this._r)+', '+x(this._g)+', '+x(this._b)+')':'rgba('+x(this._r)+', '+x(this._g)+', '+x(this._b)+', '+this._roundA+')'},toPercentageRgb:function(){return{r:x(100*q(this._r,255))+'%',g:x(100*q(this._g,255))+'%',b:x(100*q(this._b,255))+'%',a:this._a}},toPercentageRgbString:function(){return 1==this._a?'rgb('+x(100*q(this._r,255))+'%, '+x(100*q(this._g,255))+'%, '+x(100*q(this._b,255))+'%)':'rgba('+x(100*q(this._r,255))+'%, '+x(100*q(this._g,255))+'%, '+x(100*q(this._b,255))+'%, '+this._roundA+')'},toName:function(){return 0===this._a?'transparent':!(this._a<1)&&(B[P(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e='#'+E(this._r,this._g,this._b,this._a),n=e,r=this._gradientType?'GradientType = 1, ':'';t&&(n=k(t).toHex8String());return'progid:DXImageTransform.Microsoft.gradient('+r+'startColorstr='+e+',endColorstr='+n+')'},toString:function(t){var e=!!t;t=t||this._format;var n=!1,r=this._a<1&&this._a>=0;return e||!r||'hex'!==t&&'hex6'!==t&&'hex3'!==t&&'name'!==t?('rgb'===t&&(n=this.toRgbString()),'prgb'===t&&(n=this.toPercentageRgbString()),'hex'!==t&&'hex6'!==t||(n=this.toHexString()),'hex3'===t&&(n=this.toHexString(!0)),'hex8'===t&&(n=this.toHex8String()),'name'===t&&(n=this.toName()),'hsl'===t&&(n=this.toHslString()),'hsv'===t&&(n=this.toHsvString()),n||this.toHexString()):'name'===t&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(N,arguments)},desaturate:function(){return this._applyModification(M,arguments)},saturate:function(){return this._applyModification(D,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(I,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(H,arguments)},complement:function(){return this._applyCombination(F,arguments)},monochromatic:function(){return this._applyCombination($,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(V,arguments)},tetrad:function(){return this._applyCombination(R,arguments)}},k.fromRatio=function(t,e){if('object'==c()(t)){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]='a'===r?t[r]:X(t[r]));t=n}return k(t,e)},k.equals=function(t,e){return!(!t||!e)&&k(t).toRgbString()==k(e).toRgbString()},k.random=function(){return k.fromRatio({r:S(),g:S(),b:S()})},k.mix=function(t,e,n){n=0===n?0:n||50;var r,i=k(t).toRgb(),o=k(e).toRgb(),a=n/100,s=2*a-1,l=o.a-i.a,c=1-(r=((r=s*l==-1?s:(s+l)/(1+s*l))+1)/2),u={r:o.r*r+i.r*c,g:o.g*r+i.g*c,b:o.b*r+i.b*c,a:o.a*a+i.a*(1-a)};return k(u)},k.readability=function(t,e){var n=k(t),r=k(e),i=n.toRgb(),o=r.toRgb(),a=n.getBrightness(),s=r.getBrightness(),l=Math.max(i.r,o.r)-Math.min(i.r,o.r)+Math.max(i.g,o.g)-Math.min(i.g,o.g)+Math.max(i.b,o.b)-Math.min(i.b,o.b);return{brightness:Math.abs(a-s),color:l}},k.isReadable=function(t,e){var n=k.readability(t,e);return n.brightness>125&&n.color>500},k.mostReadable=function(t,e){for(var n=null,r=0,i=!1,o=0;o125&&a.color>500,l=3*(a.brightness/125)+a.color/500;(s&&!i||s&&i&&l>r||!s&&!i&&l>r)&&(i=s,r=l,n=k(e[o]))}return n};var U=k.names={aliceblue:'f0f8ff',antiquewhite:'faebd7',aqua:'0ff',aquamarine:'7fffd4',azure:'f0ffff',beige:'f5f5dc',bisque:'ffe4c4',black:'000',blanchedalmond:'ffebcd',blue:'00f',blueviolet:'8a2be2',brown:'a52a2a',burlywood:'deb887',burntsienna:'ea7e5d',cadetblue:'5f9ea0',chartreuse:'7fff00',chocolate:'d2691e',coral:'ff7f50',cornflowerblue:'6495ed',cornsilk:'fff8dc',crimson:'dc143c',cyan:'0ff',darkblue:'00008b',darkcyan:'008b8b',darkgoldenrod:'b8860b',darkgray:'a9a9a9',darkgreen:'006400',darkgrey:'a9a9a9',darkkhaki:'bdb76b',darkmagenta:'8b008b',darkolivegreen:'556b2f',darkorange:'ff8c00',darkorchid:'9932cc',darkred:'8b0000',darksalmon:'e9967a',darkseagreen:'8fbc8f',darkslateblue:'483d8b',darkslategray:'2f4f4f',darkslategrey:'2f4f4f',darkturquoise:'00ced1',darkviolet:'9400d3',deeppink:'ff1493',deepskyblue:'00bfff',dimgray:'696969',dimgrey:'696969',dodgerblue:'1e90ff',firebrick:'b22222',floralwhite:'fffaf0',forestgreen:'228b22',fuchsia:'f0f',gainsboro:'dcdcdc',ghostwhite:'f8f8ff',gold:'ffd700',goldenrod:'daa520',gray:'808080',green:'008000',greenyellow:'adff2f',grey:'808080',honeydew:'f0fff0',hotpink:'ff69b4',indianred:'cd5c5c',indigo:'4b0082',ivory:'fffff0',khaki:'f0e68c',lavender:'e6e6fa',lavenderblush:'fff0f5',lawngreen:'7cfc00',lemonchiffon:'fffacd',lightblue:'add8e6',lightcoral:'f08080',lightcyan:'e0ffff',lightgoldenrodyellow:'fafad2',lightgray:'d3d3d3',lightgreen:'90ee90',lightgrey:'d3d3d3',lightpink:'ffb6c1',lightsalmon:'ffa07a',lightseagreen:'20b2aa',lightskyblue:'87cefa',lightslategray:'789',lightslategrey:'789',lightsteelblue:'b0c4de',lightyellow:'ffffe0',lime:'0f0',limegreen:'32cd32',linen:'faf0e6',magenta:'f0f',maroon:'800000',mediumaquamarine:'66cdaa',mediumblue:'0000cd',mediumorchid:'ba55d3',mediumpurple:'9370db',mediumseagreen:'3cb371',mediumslateblue:'7b68ee',mediumspringgreen:'00fa9a',mediumturquoise:'48d1cc',mediumvioletred:'c71585',midnightblue:'191970',mintcream:'f5fffa',mistyrose:'ffe4e1',moccasin:'ffe4b5',navajowhite:'ffdead',navy:'000080',oldlace:'fdf5e6',olive:'808000',olivedrab:'6b8e23',orange:'ffa500',orangered:'ff4500',orchid:'da70d6',palegoldenrod:'eee8aa',palegreen:'98fb98',paleturquoise:'afeeee',palevioletred:'db7093',papayawhip:'ffefd5',peachpuff:'ffdab9',peru:'cd853f',pink:'ffc0cb',plum:'dda0dd',powderblue:'b0e0e6',purple:'800080',rebeccapurple:'663399',red:'f00',rosybrown:'bc8f8f',royalblue:'4169e1',saddlebrown:'8b4513',salmon:'fa8072',sandybrown:'f4a460',seagreen:'2e8b57',seashell:'fff5ee',sienna:'a0522d',silver:'c0c0c0',skyblue:'87ceeb',slateblue:'6a5acd',slategray:'708090',slategrey:'708090',snow:'fffafa',springgreen:'00ff7f',steelblue:'4682b4',tan:'d2b48c',teal:'008080',thistle:'d8bfd8',tomato:'ff6347',turquoise:'40e0d0',violet:'ee82ee',wheat:'f5deb3',white:'fff',whitesmoke:'f5f5f5',yellow:'ff0',yellowgreen:'9acd32'},B=k.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(U);function W(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function q(t,e){(function(t){return'string'==typeof t&&-1!=t.indexOf('.')&&1===parseFloat(t)})(t)&&(t='100%');var n=function(t){return'string'==typeof t&&-1!=t.indexOf('%')}(t);return t=O(e,C(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),w.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function G(t){return O(1,C(0,t))}function K(t){return parseInt(t,16)}function Y(t){return 1==t.length?'0'+t:''+t}function X(t){return t<=1&&(t=100*t+'%'),t}var J,Z,Q,tt=(Z='[\\s|\\(]+('+(J='(?:'+'[-\\+]?\\d*\\.\\d+%?'+')|(?:'+'[-\\+]?\\d+%?'+')')+')[,|\\s]+('+J+')[,|\\s]+('+J+')\\s*\\)?',Q='[\\s|\\(]+('+J+')[,|\\s]+('+J+')[,|\\s]+('+J+')[,|\\s]+('+J+')\\s*\\)?',{rgb:new RegExp('rgb'+Z),rgba:new RegExp('rgba'+Q),hsl:new RegExp('hsl'+Z),hsla:new RegExp('hsla'+Q),hsv:new RegExp('hsv'+Z),hsva:new RegExp('hsva'+Q),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});window.tinycolor=k,t((function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()}))}(f);e["a"]=u["a"].extend({template:function(){var t=this.ppfx;return"\n
\n
\n
\n
\n
\n
\n ")},inputClass:function(){var t=this.ppfx;return"".concat(t,"field ").concat(t,"field-color")},holderClass:function(){return"".concat(this.ppfx,"input-holder")},remove:function(){u["a"].prototype.remove.apply(this,arguments),this.colorEl.spectrum('destroy')},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,r=n.get('defaults'),i=Object(s["isUndefined"])(t)?Object(s["isUndefined"])(r)?'':r:t,o=this.getInputEl(),a=this.getColorEl(),l='none'!=i?i:'';o.value=i,a.get(0).style.backgroundColor=l,(e.fromTarget||e.fromInput&&!e.avoidStore)&&(a.spectrum('set',l),this.noneColor='none'==i)},getColorEl:function(){if(!this.colorEl){var t,e=this.em,n=this,r=this.ppfx,i=this.model,o=f("
")),a=o.get(0).style,s=e&&e.config?e.config.el:'',l=e&&e.getConfig&&e.getConfig('colorPicker')||{},c=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,'')},u=0;this.$el.find("[data-colorp-c]").append(o),o.spectrum(h(h(h({containerClassName:"".concat(r,"one-bg ").concat(r,"two-color"),appendTo:s||'body',maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:'Ok',cancelText:'⨯',palette:[]},l),i.get('colorPicker')||{}),{},{move:function(t){var e=c(t);a.backgroundColor=e,i.setValueFromInput(e,0)},change:function(t){u=1;var e=c(t);a.backgroundColor=e,i.setValueFromInput(0,0),i.setValueFromInput(e),n.noneColor=0},show:function(e){u=0,t=c(e)},hide:function(e){!u&&t&&(n.noneColor&&(t=''),a.backgroundColor=t,o.spectrum('set',t),i.setValueFromInput(t,0))}})),e&&e.on&&e.on('component:selected',(function(){u=1,o.spectrum('hide')})),this.colorEl=o}return this.colorEl},render:function(){return u["a"].prototype.render.call(this),this.getColorEl(),this}})},function(t,e,n){!function(e){var n,r={},i={16:!1,18:!1,17:!1,91:!1},o='all',a={'⇧':16,shift:16,'⌥':18,alt:18,option:18,'⌃':17,ctrl:17,control:17,'⌘':91,command:91},s={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,',':188,'.':190,'/':191,'`':192,'-':189,'=':187,';':186,'\'':222,'[':219,']':221,'\\':220},l=function(t){return s[t]||t.toUpperCase().charCodeAt(0)},c=[];for(n=1;n<20;n++)s['f'+n]=111+n;function u(t,e){for(var n=t.length;n--;)if(t[n]===e)return n;return-1}function d(t,e){if(t.length!=e.length)return!1;for(var n=0;n1&&(o=m(t),t=[t[t.length-1]]),t=t[0],(t=l(t))in r||(r[t]=[]),r[t].push({shortcut:i[a],scope:e,method:n,key:i[a],mods:o})}for(n in a)p[n]=!1;function g(){return o||'all'}function v(t){var e;return''==(e=(t=t.replace(/\s/g,'')).split(','))[e.length-1]&&(e[e.length-2]+=','),e}function m(t){for(var e=t.slice(0,t.length-1),n=0;n0,i)(!i[o]&&u(n.mods,+o)>-1||i[o]&&-1==u(n.mods,+o))&&(l=!1);(0!=n.mods.length||i[16]||i[18]||i[17]||i[91])&&!l||!1===n.method(t,n)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}(t)})),b(document,'keyup',(function(t){var e,n=t.keyCode,r=u(c,n);if(r>=0&&c.splice(r,1),93!=n&&224!=n||(n=91),n in i)for(e in i[n]=!1,a)a[e]==n&&(p[e]=!1)})),b(window,'focus',(function(){for(n in i)i[n]=!1;for(n in a)p[n]=!1}));var y=e.key;e.key=p,e.key.setScope=function(t){o=t||'all'},e.key.getScope=g,e.key.deleteScope=function(t){var e,n,i;for(e in r)for(n=r[e],i=0;i1&&(c=m(i),t=i[i.length-1]),t=l(t),void 0===e&&(e=g()),!r[t])return;for(o=0;ot.length)&&(e=t.length);for(var n=0,r=new Array(e);n*\/]/.test(n)?O(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?O("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?O(null,n):t.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(t.current().toLowerCase())&&(e.tokenize=k),O("variable callee","variable")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),O("property","word")):O(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),O("number","unit")):t.match(/^-[\w\\\-]*/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?O("variable-2","variable-definition"):O("variable-2","variable")):t.match(/^\w+-/)?O("meta","meta"):void 0}function S(t){return function(e,n){for(var r,i=!1;null!=(r=e.next());){if(r==t&&!i){")"==t&&e.backUp(1);break}i=!i&&"\\"==r}return(r==t||!i&&")"!=t)&&(n.tokenize=null),O("string","string")}}function k(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=S(")"),O(null,"(")}function j(t,e,n){this.type=t,this.indent=e,this.prev=n}function T(t,e,n,r){return t.context=new j(n,e.indentation()+(!1===r?0:a),t.context),n}function P(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function E(t,e,n){return A[n.context.type](t,e,n)}function M(t,e,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return E(t,e,n)}function D(t){var e=t.current().toLowerCase();o=m.hasOwnProperty(e)?"atom":v.hasOwnProperty(e)?"keyword":"variable"}var A={top:function(t,e,n){if("{"==t)return T(n,e,"block");if("}"==t&&n.context.prev)return P(n);if(w&&/@component/i.test(t))return T(n,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return T(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return T(n,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return T(n,e,"at");if("hash"==t)o="builtin";else if("word"==t)o="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return T(n,e,"interpolation");if(":"==t)return"pseudo";if(b&&"("==t)return T(n,e,"parens")}return n.context.type},block:function(t,e,n){if("word"==t){var r=e.current().toLowerCase();return h.hasOwnProperty(r)?(o="property","maybeprop"):f.hasOwnProperty(r)?(o=x?"string-2":"property","maybeprop"):b?(o=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==t?"block":b||"hash"!=t&&"qualifier"!=t?A.top(t,e,n):(o="error","block")},maybeprop:function(t,e,n){return":"==t?T(n,e,"prop"):E(t,e,n)},prop:function(t,e,n){if(";"==t)return P(n);if("{"==t&&b)return T(n,e,"propBlock");if("}"==t||"{"==t)return M(t,e,n);if("("==t)return T(n,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)D(e);else if("interpolation"==t)return T(n,e,"interpolation")}else o+=" error";return"prop"},propBlock:function(t,e,n){return"}"==t?P(n):"word"==t?(o="property","maybeprop"):n.context.type},parens:function(t,e,n){return"{"==t||"}"==t?M(t,e,n):")"==t?P(n):"("==t?T(n,e,"parens"):"interpolation"==t?T(n,e,"interpolation"):("word"==t&&D(e),"parens")},pseudo:function(t,e,n){return"meta"==t?"pseudo":"word"==t?(o="variable-3",n.context.type):E(t,e,n)},documentTypes:function(t,e,n){return"word"==t&&l.hasOwnProperty(e.current())?(o="tag",n.context.type):A.atBlock(t,e,n)},atBlock:function(t,e,n){if("("==t)return T(n,e,"atBlock_parens");if("}"==t||";"==t)return M(t,e,n);if("{"==t)return P(n)&&T(n,e,b?"block":"top");if("interpolation"==t)return T(n,e,"interpolation");if("word"==t){var r=e.current().toLowerCase();o="only"==r||"not"==r||"and"==r||"or"==r?"keyword":c.hasOwnProperty(r)?"attribute":u.hasOwnProperty(r)?"property":d.hasOwnProperty(r)?"keyword":h.hasOwnProperty(r)?"property":f.hasOwnProperty(r)?x?"string-2":"property":m.hasOwnProperty(r)?"atom":v.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(t,e,n){return"}"==t?M(t,e,n):"{"==t?P(n)&&T(n,e,b?"block":"top",!1):("word"==t&&(o="error"),n.context.type)},atBlock_parens:function(t,e,n){return")"==t?P(n):"{"==t||"}"==t?M(t,e,n,2):A.atBlock(t,e,n)},restricted_atBlock_before:function(t,e,n){return"{"==t?T(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(o="variable","restricted_atBlock_before"):E(t,e,n)},restricted_atBlock:function(t,e,n){return"}"==t?(n.stateArg=null,P(n)):"word"==t?(o="@font-face"==n.stateArg&&!p.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!g.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(t,e,n){return"word"==t?(o="variable","keyframes"):"{"==t?T(n,e,"top"):E(t,e,n)},at:function(t,e,n){return";"==t?P(n):"{"==t||"}"==t?M(t,e,n):("word"==t?o="tag":"hash"==t&&(o="builtin"),"at")},interpolation:function(t,e,n){return"}"==t?P(n):"{"==t||";"==t?M(t,e,n):("word"==t?o="variable":"variable"!=t&&"("!=t&&")"!=t&&(o="error"),"interpolation")}};return{startState:function(t){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new j(r?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||C)(t,e);return n&&"object"==typeof n&&(i=n[1],n=n[0]),o=n,"comment"!=i&&(e.state=A[e.state](i,t,e)),o},indent:function(t,e){var n=t.context,r=e&&e.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-a)):i=(n=n.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:y,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],r=e(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=e(i),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme"],s=e(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],c=e(l),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=e(u),h=["border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],f=e(h),p=e(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],m=e(v),b=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],y=e(b),w=n.concat(i).concat(a).concat(l).concat(u).concat(h).concat(v).concat(b);function x(t,e){for(var n,r=!1;null!=(n=t.next());){if(r&&"/"==n){e.tokenize=null;break}r="*"==n}return["comment","comment"]}t.registerHelper("hintWords","css",w),t.defineMIME("text/css",{documentTypes:r,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:y,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=x,x(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:m,valueKeywords:y,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=x,x(t,e)):["operator","operator"]},":":function(t){return!!t.match(/\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:m,valueKeywords:y,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=x,x(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:o,mediaFeatures:s,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=x,x(t,e))}},name:"css",helperType:"gss"})}(n(13))},function(t,e,n){"use strict";n.r(e),e["default"]={run:function(t){t.DomComponents.clear(),t.CssComposer.clear()}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(3),o=n(17);e["default"]={run:function(t){Object(r["bindAll"])(this,'onKeyUp','enableDragger','disableDragger'),this.editor=t,this.canvasModel=this.canvas.getCanvasView().model,this.toggleMove(1)},stop:function(t){this.toggleMove(),this.disableDragger()},onKeyUp:function(t){' '===Object(i["f"])(t)&&this.editor.stopCommand(this.id)},enableDragger:function(t){this.toggleDragger(1,t)},disableDragger:function(t){this.toggleDragger(0,t)},toggleDragger:function(t,e){var n=this.canvasModel,r=this.em,i=this.dragger,a=t?'add':'remove';this.getCanvas().classList[a]("".concat(this.ppfx,"is__grabbing")),i||(i=new o["a"]({getPosition:function(){return{x:n.get('x'),y:n.get('y')}},setPosition:function(t){var e=t.x,r=t.y;n.set({x:e,y:r})},onStart:function(t,e){r.trigger('canvas:move:start',e)},onDrag:function(t,e){r.trigger('canvas:move',e)},onEnd:function(t,e){r.trigger('canvas:move:end',e)}}),this.dragger=i),t?i.start(e):i.stop()},toggleMove:function(t){var e=this.ppfx,n=t?'add':'remove',r=t?'on':'off',o={on:i["w"],off:i["v"]},a=this.getCanvas(),s=["".concat(e,"is__grab")];!t&&s.push("".concat(e,"is__grabbing")),s.forEach((function(t){return a.classList[n](t)})),o[r](document,'keyup',this.onKeyUp),o[r](a,'mousedown',this.enableDragger),o[r](document,'mouseup',this.disableDragger)}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r),o=n(0);e["default"]={run:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[],s=r.component||t.getSelectedAll();return s=Object(o["isArray"])(s)?i()(s):[s],t.select(null),s.forEach((function(t){if(!t||!t.get('removable'))return n.em.logWarning('The element is not removable',{component:t});t.remove(),t.collection&&a.push(t)})),a.length&&t.select(a),s}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(0),a=n(17);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{};Object(o["bindAll"])(this,'setPosition','onStart','onDrag','onEnd','getPosition','getGuidesStatic','renderGuide','getGuidesTarget');var i=r.target,s=r.event,u=r.mode,d=r.dragger,h=void 0===d?{}:d,f=i.getEl(),p=l({doc:f.ownerDocument,onStart:this.onStart,onEnd:this.onEnd,onDrag:this.onDrag,getPosition:this.getPosition,setPosition:this.setPosition,guidesStatic:function(){return n.guidesStatic},guidesTarget:function(){return n.guidesTarget}},h);this.setupGuides(),this.opts=r,this.editor=t,this.em=t.getModel(),this.target=i,this.isTran='translate'==u,this.guidesContainer=this.getGuidesContainer(),this.guidesTarget=this.getGuidesTarget(),this.guidesStatic=this.getGuidesStatic();var g=this.dragger;return g?g.setOptions(p):(g=new a["a"](p),this.dragger=g),s&&g.start(s),this.toggleDrag(1),this.em.trigger("".concat(c,":start"),this.getEventOpts()),g},getEventOpts:function(){return{mode:this.opts.mode,target:this.target,guidesTarget:this.guidesTarget,guidesStatic:this.guidesStatic}},stop:function(){this.toggleDrag()},setupGuides:function(){(this.guides||[]).forEach((function(t){var e=t.guide;e&&e.parentNode.removeChild(e)})),this.guides=[]},getGuidesContainer:function(){var t=this,e=this.guidesEl;if(!e){var n=this.editor,r=this.em,i=this.opts,a=n.getConfig('stylePrefix'),s=document.createElement('div'),l=document.createElement('div'),c="
\n
\n
");(e=document.createElement('div')).className="".concat(a,"guides"),s.className="".concat(a,"guide-info ").concat(a,"guide-info__x"),l.className="".concat(a,"guide-info ").concat(a,"guide-info__y"),s.innerHTML=c,l.innerHTML=c,e.appendChild(s),e.appendChild(l),n.Canvas.getGlobalToolsEl().appendChild(e),this.guidesEl=e,this.elGuideInfoX=s,this.elGuideInfoY=l,this.elGuideInfoContentX=s.querySelector(".".concat(a,"guide-info__content")),this.elGuideInfoContentY=l.querySelector(".".concat(a,"guide-info__content")),r.on('canvas:update frame:scroll',Object(o["debounce"])((function(){t.updateGuides(),i.debug&&t.guides.forEach((function(e){return t.renderGuide(e)}))}),200))}return e},getGuidesStatic:function(){var t=this,e=[],n=this.target.getEl(),r=n.parentNode,i=void 0===r?{}:r;return Object(o["each"])(i.children,(function(r){return e=e.concat(n!==r?t.getElementGuides(r):[])})),e.concat(this.getElementGuides(i))},getGuidesTarget:function(){return this.getElementGuides(this.target.getEl())},updateGuides:function(t){var e,n,r=this;(t||this.guides).forEach((function(t){var i=t.origin,a=e===i?n:r.getElementPos(i);e=i,n=a,Object(o["each"])(r.getGuidePosUpdate(t,a),(function(e,n){return t[n]=e})),t.originRect=a}))},getGuidePosUpdate:function(t,e){var n={},r=e.top,i=e.height,o=e.left,a=e.width;switch(t.type){case't':n.y=r;break;case'b':n.y=r+i;break;case'l':n.x=o;break;case'r':n.x=o+a;break;case'x':n.x=o+a/2;break;case'y':n.y=r+i/2}return n},renderGuide:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.guide||document.createElement('div'),n='px',r=t.active?2:1,i=e.children[0];return e.style="position: absolute; background-color: ".concat(t.active?'green':'red',";"),e.children.length||((i=document.createElement('div')).style='position: absolute; color: red; padding: 5px; top: 0; left: 0;',e.appendChild(i)),t.y?(e.style.width='100%',e.style.height="".concat(r).concat(n),e.style.top="".concat(t.y).concat(n),e.style.left=0):(e.style.width="".concat(r).concat(n),e.style.height='100%',e.style.left="".concat(t.x).concat(n),e.style.top="0".concat(n)),!t.guide&&this.guidesContainer.appendChild(e),e},getElementPos:function(t){return this.editor.Canvas.getElementPos(t,{noScroll:1})},getElementGuides:function(t){var e=this,n=this.opts,r=this.getElementPos(t),i=r.top,o=r.height,a=r.left,s=r.width,c=[{type:'t',y:i},{type:'b',y:i+o},{type:'l',x:a},{type:'r',x:a+s},{type:'x',x:a+s/2},{type:'y',y:i+o/2}].map((function(i){return l(l({},i),{},{origin:t,originRect:r,guide:n.debug&&e.renderGuide(i)})}));return c.forEach((function(t){return e.guides.push(t)})),c},getTranslate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'x',n=0;return(t||'').split(' ').forEach((function(t){var r=t.trim(),i="translate".concat(e.toUpperCase(),"(");0===r.indexOf(i)&&(n=parseFloat(r.replace(i,'')))})),n},setTranslate:function(t,e,n){var r="translate".concat(e.toUpperCase(),"("),i="".concat(r).concat(n,")"),o=(t||'').split(' ').map((function(t){return 0===t.trim().indexOf(r)&&(t=i),t})).join(' ');return o.indexOf(r)<0&&(o+=" ".concat(i)),o},getPosition:function(){var t=this.target,e=this.isTran,n=t.getStyle(),r=n.left,i=n.top,o=n.transform,a=0,s=0;return e?(a=this.getTranslate(o),s=this.getTranslate(o,'y')):(a=parseFloat(r),s=parseFloat(i)),{x:a,y:s}},setPosition:function(t){var e=t.x,n=t.y,r=t.end,i=t.position,a=t.width,s=t.height,l=this.target,c=this.isTran,u='px',d=r?'':1,h="".concat(e).concat(u),f="".concat(n).concat(u);if(c){var p=l.getStyle()['transform']||'';return p=this.setTranslate(p,'x',h),p=this.setTranslate(p,'y',f),l.addStyle({transform:p,en:d},{avoidStore:!r})}var g={position:i,width:a,height:s},v={left:h,top:f,en:d};Object(o["keys"])(g).forEach((function(t){var e=g[t];e&&(v[t]=e)})),l.addStyle(v,{avoidStore:!r})},_getDragData:function(){var t=this.target;return{target:t,parent:t.parent(),index:t.index()}},onStart:function(t){var e=this.target,n=this.editor,r=this.isTran,i=this.opts,o=i.center,a=i.onStart,s=n.Canvas,l=e.getStyle(),c='absolute';if(a&&a(this._getDragData()),!r&&l.position!==c){var u=s.offset(e.getEl()),d=u.left,h=u.top,f=u.width,p=u.height;if(o){var g=s.getMouseRelativeCanvas(t);d=g.x,h=g.y}this.setPosition({x:d,y:h,width:"".concat(f,"px"),height:"".concat(p,"px"),position:c})}},onDrag:function(){var t=this,e=this.guidesTarget,n=this.opts,r=n.onDrag;this.updateGuides(e),n.debug&&e.forEach((function(e){return t.renderGuide(e)})),n.guidesInfo&&this.renderGuideInfo(e.filter((function(t){return t.active}))),r&&r(this._getDragData())},onEnd:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.editor,i=this.opts,o=this.id,a=i.onEnd;a&&a(t,n,l(l({event:t},n),this._getDragData())),r.stopCommand(o),this.hideGuidesInfo(),this.em.trigger("".concat(c,":end"),this.getEventOpts())},hideGuidesInfo:function(){var t=this;['X','Y'].forEach((function(e){var n=t["elGuideInfo".concat(e)];n&&(n.style.display='none')}))},renderGuideInfo:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=this.guidesStatic;this.hideGuidesInfo(),e.forEach((function(e){var r=e.origin,i=e.x,a=t.getElementPos(r),s=Object(o["isUndefined"])(i)?'y':'x',u='y'===s,d=a[u?'left':'top'],h=a.rect[u?'left':'top'],f=u?d+a.width:d+a.height,p=u?h+a.rect.width:h+a.rect.height,g=t["elGuideInfo".concat(s.toUpperCase())],v=t["elGuideInfoContent".concat(s.toUpperCase())],m=g.style,b=n.filter((function(t){return t.type===e.type})).map((function(t){var e=t.originRect,n=e.left,r=e.width,i=e.top,o=e.height,a=u?n+r:i+o;return{gap:a0})).sort((function(t,e){return t.gap-e.gap})).map((function(t){return t.guide}))[0];if(b){var y=b.originRect,w=y.left,x=y.width,O=y.top,C=y.height,S=y.rect,k=u?w2&&void 0!==arguments[2]?arguments[2]:{};if(t.Canvas.hasFocus()||n.force){var r=[];t.getSelectedAll().forEach((function(t){for(var e=t.parent();e&&!e.get('selectable');)e=e.parent();e&&r.push(e)})),r.length&&t.select(r)}}}},function(t,e,n){"use strict";n.r(e),e["default"]={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.collection,r=n.indexOf(t),i=n.at(r+1);e.push(i||t)})),e.length&&t.select(e)}}}},function(t,e,n){"use strict";n.r(e),e["default"]={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.collection,r=n.indexOf(t),i=n.at(r-1);e.push(i&&r-1>=0?i:t)})),e.length&&t.select(e)}}}},function(t,e,n){"use strict";n.r(e);var r=n(0);e["default"]={run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.target,o=t.DomComponents,a=i.get('type'),s=o.getWrapper().findType(a).length,l=[];if(!s){var c=t.CssComposer.getAll(),u=i.get('style-signature');u=Object(r["isArray"])(u)?u:[u],c.forEach((function(t){var e=t.selectorsToString();u.forEach((function(n){n&&e.indexOf(n)>=0&&l.push(t)}))})),c.remove(l)}return l}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r);e["default"]={run:function(t){var e=t.getModel(),n=i()(t.getSelectedAll());n.length&&e.set('clipboard',n)}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(1),o=n.n(i),a=n(14),s=o.a.$;e["default"]=Object(r["extend"])({},a["default"],{init:function(t){Object(r["bindAll"])(this,'startDelete','stopDelete','onDelete'),this.hoverClass=this.pfx+'hover-delete',this.badgeClass=this.pfx+'badge-red'},enable:function(){this.$el.find('*').mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=s(t.target);e.data('model').get('removable')&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),s(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=s(t.target);e.data('model').get('removable')&&(e.data('model').destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html('Remove '+t.getName())}})},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r).a.$;e["default"]={run:function(t,e){var n=this;e&&e.set&&e.set('active',0);var r=t.getConfig(),o=t.Modal,a=r.stylePrefix;if(this.cm=t.CodeManager||null,!this.$editors){var s=this.buildEditor('htmlmixed','hopscotch','HTML'),l=this.buildEditor('css','hopscotch','CSS');this.htmlEditor=s.el,this.cssEditor=l.el;var c=i("
"));c.append(s.$el).append(l.$el),this.$editors=c}o.open({title:r.textViewCode,content:this.$editors}).getModel().once('change:open',(function(){return t.stopCommand(n.id)})),this.htmlEditor.setContent(t.getHtml()),this.cssEditor.setContent(t.getCss())},stop:function(t){var e=t.Modal;e&&e.close()},buildEditor:function(t,e,n){var r=document.createElement('textarea');!this.codeMirror&&(this.codeMirror=this.cm.getViewer('CodeMirror'));var i=this.codeMirror.clone().set({label:n,codeName:t,theme:e,input:r}),o=new this.cm.EditorView({model:i,config:this.cm.getConfig()}).render().$el;return i.init(r),{el:i,$el:o}}}},function(t,e,n){"use strict";n.r(e);var r=n(0);e["default"]={isEnabled:function(){var t=document;return t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement?1:0},enable:function(t){var e='';return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?(e='webkit',t.webkitRequestFullscreen()):t.mozRequestFullScreen?(e='moz',t.mozRequestFullScreen()):t.msRequestFullscreen?t.msRequestFullscreen():console.warn('Fullscreen not supported'),e},disable:function(){var t=document;this.isEnabled()&&(t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen())},fsChanged:function(t,e){document;var n=(t||'')+'fullscreenchange';this.isEnabled()||(this.stop(null,this.sender),document.removeEventListener(n,this.fsChanged))},run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.sender=e;var i=n.target,o=Object(r["isElement"])(i)?i:document.querySelector(i),a=this.enable(o||t.getContainer());this.fsChanged=this.fsChanged.bind(this,a),document.addEventListener(a+'fullscreenchange',this.fsChanged),t.trigger('change:canvasOffset')},stop:function(t,e){e&&e.set&&e.set('active',!1),this.disable(),t&&t.trigger('change:canvasOffset')}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(1),o=n.n(i),a=n(3),s=n(14),l=n(27),c=o.a.$;e["default"]=Object(r["extend"])({},l["default"],s["default"],{init:function(t){s["default"].init.apply(this,arguments),Object(r["bindAll"])(this,'initSorter','rollback','onEndMove'),this.opt=t,this.hoverClass=this.ppfx+'highlighter-warning',this.badgeClass=this.ppfx+'badge-warning',this.noSelClass=this.ppfx+'no-select'},enable:function(){for(var t=arguments.length,e=new Array(t),n=0;n2&&void 0!==arguments[2]?arguments[2]:{},i=t.Modal,o=t.AssetManager,a=o.getConfig(),s=o.getContainer(),l=r.modalTitle||t.t('assetManager.modalTitle')||'',c=r.types,u=r.accept;if(o.setTarget(r.target),o.onClick(r.onClick),o.onDblClick(r.onDblClick),o.onSelect(r.onSelect),!this.rendered||c){var d=o.getAll().filter((function(t){return 1}));c&&c.length&&(d=d.filter((function(t){return-1!==c.indexOf(t.get('type'))}))),o.render(d),this.rendered=1}if(u){var h=s.querySelector("input#".concat(a.stylePrefix,"uploadFile"));h&&h.setAttribute('accept',u)}return i.open({title:l,content:s}).getModel().once('change:open',(function(){return t.stopCommand(n.id)})),this},stop:function(t){return t.Modal.close(),this}}},function(t,e,n){"use strict";n.r(e),e["default"]={run:function(t,e){var n=t.BlockManager,r=t.Panels;if(!this.blocks){n.render();var i='views-container',o=document.createElement('div'),a=r.getPanel(i)||r.addPanel({id:i});o.appendChild(n.getContainer()),a.set('appendContent',o).trigger('change:appendContent'),this.blocks=o}this.blocks.style.display='block'},stop:function(){var t=this.blocks;t&&(t.style.display='none')}}},function(t,e,n){"use strict";n.r(e);var r=n(1);n.n(r).a.$;e["default"]={run:function(t){var e=t.LayerManager,n=t.Panels;if(!this.layers){var r='views-container',i=document.createElement('div'),o=n.getPanel(r)||n.addPanel({id:r});i.appendChild(e.render()),o.set('appendContent',i).trigger('change:appendContent'),this.layers=i}this.layers.style.display='block'},stop:function(){var t=this.layers;t&&(t.style.display='none')}}},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r).a.$;e["default"]={run:function(t,e){if(this.sender=e,!this.$cn){var n=t.getConfig(),r=t.Panels;this.$cn=i('
'),this.$cn2=i('
'),this.$cn.append(this.$cn2);var o=t.DeviceManager;if(o&&n.showDevices)r.addPanel({id:'devices-c'}).set('appendContent',o.render()).trigger('change:appendContent');var a=t.SelectorManager;a&&this.$cn2.append(a.render([])),this.$cn2.append(t.StyleManager.render());var s=t.StyleManager.getConfig().stylePrefix;this.$header=i("
").concat(t.t('styleManager.empty'),"
")),this.$cn.append(this.$header),r.getPanel('views-container')?this.panel=r.getPanel('views-container'):this.panel=r.addPanel({id:'views-container'}),this.panel.set('appendContent',this.$cn).trigger('change:appendContent'),this.target=t.editor,this.listenTo(this.target,'component:toggled',this.toggleSm)}this.toggleSm()},toggleSm:function(){var t=this.target,e=this.sender;if(!e||!e.get||e.get('active')){var n=t.get('SelectorManager').getConfig().componentFirst,r=t.getSelectedAll().length;1===r||r>1&&n?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show())}},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r).a.$;e["default"]={run:function(t,e){this.sender=e;var n=t.getModel(),r=t.Config.stylePrefix,o=t.TraitManager;if(!this.$cn){var a=o.getTraitsViewer(),s=o.getConfig();this.$cn=i('
'),this.$cn2=i('
'),this.$cn.append(this.$cn2),this.$header=i('
').append("
").concat(n.t('traitManager.empty'),"
")),this.$cn.append(this.$header),this.$cn2.append("
").concat(n.t('traitManager.label'),"
")),this.$cn2.append(a.render().el);var l=t.Panels;(l.getPanel('views-container')?l.getPanel('views-container'):l.addPanel({id:'views-container'})).set('appendContent',this.$cn.get(0)).trigger('change:appendContent'),this.target=t.getModel(),this.listenTo(this.target,'component:toggled',this.toggleTm)}this.toggleTm()},toggleTm:function(){var t=this.sender;t&&t.get&&!t.get('active')||(1===this.target.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";n.r(e);var r=n(0);e["default"]={run:function(t){var e=t.getModel().get('clipboard'),n=t.getSelected();e&&n&&(t.getSelectedAll().forEach((function(n){if(n){var i,o=n.collection,a=o.indexOf(n)+1,s=e.filter((function(t){return t.get('copyable')}));i=Object(r["contains"])(e,n)&&n.get('copyable')?o.add(n.clone(),{at:a}):o.add(s.map((function(t){return t.clone()})),{at:a}),(i=Object(r["isArray"])(i)?i:[i]).forEach((function(e){return t.trigger('component:paste',e)}))}})),n.emitUpdate())}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r),o=n(0),a='sw-visibility';e["default"]={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanels()),this.panels},preventDrag:function(t){t.abort=1},tglEffects:function(t){var e=this.em,n=t?'on':'off';if(e){var r=e.get('Canvas'),i=r.getBody(),a=r.getToolbarEl();a&&(a.style.display=t?'none':'');var s=i.querySelectorAll(".".concat(this.ppfx,"no-pointer"));Object(o["each"])(s,(function(e){return e.style.pointerEvents=t?'all':''})),e[n]('run:tlb-move:before',this.preventDrag)}},run:function(t,e){var n=this;this.sender=e,this.selected=i()(t.getSelectedAll()),t.select(),this.shouldRunSwVisibility||(this.shouldRunSwVisibility=t.Commands.isActive(a)),this.shouldRunSwVisibility&&t.stopCommand(a),t.getModel().stopDefault();var r=this.getPanels(t),o=t.Canvas.getElement(),s=t.getEl(),l=t.Config.stylePrefix;if(!this.helper){var c=document.createElement('span');c.className="".concat(l,"off-prv fa fa-eye-slash"),s.appendChild(c),c.onclick=function(){return n.stopCommand()},this.helper=c}this.helper.style.display='inline-block',r.forEach((function(t){return t.set('visible',!1)}));var u=o.style;u.width='100%',u.height='100%',u.top='0',u.left='0',u.padding='0',u.margin='0',t.refresh(),this.tglEffects(1)},stop:function(t){var e=this.sender,n=void 0===e?{}:e,r=this.selected;n.set&&n.set('active',0);var i=this.getPanels(t);this.shouldRunSwVisibility&&(t.runCommand(a),this.shouldRunSwVisibility=!1),t.getModel().runDefault(),i.forEach((function(t){return t.set('visible',!0)})),t.Canvas.getElement().setAttribute('style',''),r&&t.select(r),delete this.selected,this.helper&&(this.helper.style.display='none'),t.refresh(),this.tglEffects()}}},function(t,e,n){"use strict";n.r(e),e["default"]={run:function(t,e,n){var r=n||{},i=r.el||'',o=t.Canvas,a=this.canvasResizer,s=r.options||{},l=o.getCanvasView();return s.appendTo=o.getResizerEl(),s.prefix=t.getConfig().stylePrefix,s.posFetcher=l.getElementPos.bind(l),s.mousePosFetcher=o.getMouseRelativePos,a&&!r.forceNew||(this.canvasResizer=t.Utils.Resizer.init(s),a=this.canvasResizer),a.setOptions(s),a.blur(),a.focus(i),a},stop:function(){var t=this.canvasResizer;t&&t.blur()}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(1),a=n.n(o),s=n(0),l=n(3);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var u=a.a.$;e["default"]={getOffsetMethod:function(t){return'get'+(t||'')+'OffsetViewerEl'},run:function(t,e,n){var r=n||{},o=r.state||'',a=t.getConfig(),d=this.em.getZoomDecimal(),h=r.el||'';if(!a.showOffsets||Object(l["s"])(h)||!a.showOffsetsSelected&&'Fixed'==o)t.stopCommand(this.id,n);else{var f=t.Canvas,p=function(t){for(var e=1;e")).get(0),D=u("
")).get(0),A=v+E+'-el',L="".concat(v+P+'-el'," ").concat(v+P),_="".concat(A," ").concat(v+E);y=u("
")).get(0),w=u("
")).get(0),x=u("
")).get(0),O=u("
")).get(0),C=u("
")).get(0),S=u("
")).get(0),k=u("
")).get(0),j=u("
")).get(0),this['marginT'+o]=y,this['marginB'+o]=w,this['marginL'+o]=x,this['marginR'+o]=O,this['padT'+o]=C,this['padB'+o]=S,this['padL'+o]=k,this['padR'+o]=j,M.appendChild(y),M.appendChild(w),M.appendChild(x),M.appendChild(O),D.appendChild(C),D.appendChild(S),D.appendChild(k),D.appendChild(j),b.appendChild(M),b.appendChild(D),this[m]='1'}var N='px',I=parseFloat(g.marginLeft.replace(N,''))*d,F=parseFloat(g.marginRight.replace(N,''))*d,V=parseFloat(g.marginTop.replace(N,''))*d,R=parseFloat(g.marginBottom.replace(N,''))*d,z=y.style,H=w.style,$=x.style,U=O.style,B=C.style,W=S.style,q=k.style,G=j.style,K=parseFloat(p.left),Y=parseFloat(g.width)*d+N;z.height=V+N,z.width=Y,z.top=p.top-V+N,z.left=K+N,H.height=R+N,H.width=Y,H.top=p.top+p.height+N,H.left=K+N;var X=p.height+V+R+N,J=p.top-V+N;$.height=X,$.width=I+N,$.top=J,$.left=K-I+N,U.height=X,U.width=F+N,U.top=J,U.left=K+p.width+N;var Z=parseFloat(g.paddingTop)*d;B.height=Z+N;var Q=parseFloat(g.paddingBottom)*d;W.height=Q+N;var tt=p.height-Q-Z+N,et=p.top+Z+N;q.height=tt,q.width=parseFloat(g.paddingLeft)*d+N,q.top=et;var nt=parseFloat(g.paddingRight)*d;G.height=tt,G.width=nt+N,G.top=et}},stop:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n||{},i=r.state||'',o=this.getOffsetMethod(i),a=t.Canvas,s=a[o](n.view);s.style.opacity=0}}},function(t,e,n){"use strict";n.r(e),e["default"]={run:function(t){this.toggleVis(t)},stop:function(t){this.toggleVis(t,0)},toggleVis:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!t.Commands.isActive('preview')){var r=n?'add':'remove';t.Canvas.getFrames().forEach((function(t){t.view.getBody().classList[r]("".concat(e.ppfx,"dashed"))}))}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o={stylePrefix:'',appendTo:'',sortable:1,hidable:1,hideTextnode:1,root:'',showWrapper:1,showHover:1,scrollCanvas:{behavior:'smooth',block:'nearest'},scrollLayers:{behavior:'auto',block:'nearest'},highlightHover:1,onInit:function(){},onRender:function(){}},a=n(36),s=n(0);function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return(n=c(c({},o),e)).stylePrefix=e.pStylePrefix,t=n.em,this},getConfig:function(){return n},onLoad:function(){e=new a["a"]({level:0,config:n,opened:n.opened||{},model:t.get('DomComponents').getWrapper()}),t&&t.on('component:selected',this.componentChanged),this.componentChanged()},postRender:function(){var t=n.appendTo,e=n.root;(e&&this.setRoot(e),t)&&(Object(s["isElement"])(t)?t:document.querySelector(t)).appendChild(this.render())},setRoot:function(t){return e.setRoot(t),this},getRoot:function(){return e.model},getAll:function(){return e},componentChanged:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!r.fromLayers){var i=t.get('opened'),o=t.getSelected(),a=n.scrollLayers,s=o&&o.collection?o.collection.parent:null;for(var l in i)i[l].set('open',0);for(;s;)s.set('open',1),i[s.cid]=s,s=s.collection?s.collection.parent:null;if(o&&a){var c=o.viewLayer&&o.viewLayer.el;c&&c.scrollIntoView(a)}}},render:function(){return e.render().el},destroy:function(){e&&e.remove(),[t,e,n].forEach((function(t){return{}}))}}}},function(t,e,n){var r,i,o; true&&(i=[n(0),n(1)],void 0===(o='function'==typeof(r=function(t,e){var n=Array.prototype.slice;function r(t,e,n){return n.length<=4?t.call(e,n[0],n[1],n[2],n[3]):t.apply(e,n)}function i(t,e){return n.call(t,e)}function o(e,n){return null!=e&&(t.isArray(n)||(n=i(arguments,1)),t.all(n,(function(t){return t in e})))}var a,s,l=(a=!1,s=-1,function(){return a||(s++,a=!0,t.defer((function(){a=!1}))),s});function c(){this.registeredObjects=[],this.cidIndexes=[]}function u(e,n,r,i){for(var o,a=0,s=n.length;at.maximumStackLength&&(t.shift(),t.pointer--)}}}c.prototype={isRegistered:function(e){return e&&e.cid?this.registeredObjects[e.cid]:t.contains(this.registeredObjects,e)},register:function(t){return!this.isRegistered(t)&&(t&&t.cid?(this.registeredObjects[t.cid]=t,this.cidIndexes.push(t.cid)):this.registeredObjects.push(t),!0)},unregister:function(e){if(this.isRegistered(e)){if(e&&e.cid)delete this.registeredObjects[e.cid],this.cidIndexes.splice(t.indexOf(this.cidIndexes,e.cid),1);else{var n=t.indexOf(this.registeredObjects,e);this.registeredObjects.splice(n,1)}return!0}return!1},get:function(){return t.map(this.cidIndexes,(function(t){return this.registeredObjects[t]}),this).concat(this.registeredObjects)}};var p={add:{undo:function(t,e,n,r){t.remove(n,r)},redo:function(t,e,n,r){r.index&&(r.at=r.index),t.add(n,r)},on:function(e,n,r){return{object:n,before:void 0,after:e,options:t.clone(r)}}},remove:{undo:function(t,e,n,r){"index"in r&&(r.at=r.index),t.add(e,r)},redo:function(t,e,n,r){t.remove(e,r)},on:function(e,n,r){return{object:n,before:e,after:void 0,options:t.clone(r)}}},change:{undo:function(e,n,r,i){t.isEmpty(n)?t.each(t.keys(r),e.unset,e):(e.set(n),i&&i.unsetData&&i.unsetData.before&&i.unsetData.before.length&&t.each(i.unsetData.before,e.unset,e))},redo:function(e,n,r,i){t.isEmpty(r)?t.each(t.keys(n),e.unset,e):(e.set(r),i&&i.unsetData&&i.unsetData.after&&i.unsetData.after.length&&t.each(i.unsetData.after,e.unset,e))},on:function(e,n){var r=e.changedAttributes(),i=t.keys(r),o=t.pick(e.previousAttributes(),i),a=t.keys(o),s=(n||(n={})).unsetData={after:[],before:[]};return i.length!=a.length&&(i.length>a.length?t.each(i,(function(t){t in o||s.before.push(t)}),this):t.each(a,(function(t){t in r||s.after.push(t)}))),{object:e,before:o,after:r,options:t.clone(n)}}},reset:{undo:function(t,e,n){t.reset(e)},redo:function(t,e,n){t.reset(n)},on:function(e,n){return{object:e,before:n.previousModels,after:t.clone(e.models)}}}};function g(){}function v(e,n,r,i){if("object"==typeof n)return t.each(n,(function(t,n){2===e?v(e,t,r,i):v(e,n,t,r)}));switch(e){case 0:o(r,"undo","redo","on")&&t.all(t.pick(r,"undo","redo","on"),t.isFunction)&&(i[n]=r);break;case 1:i[n]&&t.isObject(r)&&(i[n]=t.extend({},i[n],r));break;case 2:delete i[n]}return this}g.prototype=p;var m=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){d("undo",this.attributes)},redo:function(t){d("redo",this.attributes)}}),b=e.Collection.extend({model:m,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(t){this.maximumStackLength=t}}),y=e.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(e){this.stack=new b,this.objectRegistry=new c,this.undoTypes=new g,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",(function(t,e){this.stack.setMaxLength(e)}),this),e&&e.track&&this.startTracking(),e&&e.register&&(t.isArray(e.register)||t.isArguments(e.register)?r(this.register,this,e.register):this.register(e.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")},_addToStack:function(t){f(this.stack,t,i(arguments,1),this.undoTypes)},register:function(){u("on",arguments,this._addToStack,this)},unregister:function(){u("off",arguments,this._addToStack,this)},unregisterAll:function(){r(this.unregister,this,this.objectRegistry.get())},undo:function(t){h("undo",this,this.stack,t)},undoAll:function(){h("undo",this,this.stack,!1,!0)},redo:function(t){h("redo",this,this.stack,t)},redoAll:function(){h("redo",this,this.stack,!1,!0)},isAvailable:function(t){var e=this.stack,n=e.length;switch(t){case"undo":return n>0&&e.pointer>-1;case"redo":return n>0&&e.pointer0&&void 0!==arguments[0]?arguments[0]:{};return e=d(d({},r),n),t=e.em,this.em=t,this},onLoad:function(){var t=e.defaults;for(var n in t){var r=t[n];this.add(n,r.keys,r.handler,r.opts||{})}},add:function(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=this.em,l=a.get('Commands'),u=a.getEditor(),d=a.get('Canvas'),h={id:t,keys:e,handler:r},f=n[t];return f&&this.remove(t),n[t]=h,c()(e,(function(e,n){var c={event:e,h:n};if(r=Object(s["isString"])(r)?l.get(r):r,!a.isEditing()&&!u.Canvas.isInputFocused()||o.force){o.prevent&&d.getCanvasView().preventDefault(e),'object'==i()(r)?l.runCommand(r,c):r(u,0,c);var h=[t,n.shortcut,e];a.trigger.apply(a,['keymap:emit'].concat(h)),a.trigger.apply(a,["keymap:emit:".concat(t)].concat(h))}})),a.trigger('keymap:add',h),h},get:function(t){return n[t]},getAll:function(){return n},remove:function(t){var e=this.em,r=this.get(t);if(r)return delete n[t],r.keys.split(', ').forEach((function(t){return c.a.unbind(t.trim())})),e&&e.trigger('keymap:remove',r),r},removeAll:function(){var t=this;return Object.keys(n).forEach((function(e){return t.remove(e)})),this},destroy:function(){this.removeAll(),[t,e,n].forEach((function(t){return{}})),this.em={}}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(70),a=n.n(o);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};n=l(l({},s),i),t=n.em,this.em=t,(e=new a.a(l({track:!0,register:[]},n))).changeUndoType('change',{condition:!1}),e.changeUndoType('add',{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!o(n))return{object:e,before:void 0,after:t,options:l({},n)}}}),e.changeUndoType('remove',{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!o(n))return{object:e,before:t,after:void 0,options:l({},n)}}});var c={on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!r&&(r=t.previousAttributes()),!o(n)){var i={object:t,before:r,after:t.toJSON({keepSymbols:1})};return r=null,i}},undo:function(t,e,n,r){t.set(e)},redo:function(t,e,n,r){t.set(n)}},u=['style','attributes','content','src'];return u.forEach((function(t){return e.addUndoType("change:".concat(t),c)})),e.on('undo redo',(function(){return t.trigger('component:toggled change:canvasOffset')})),['undo','redo'].forEach((function(n){return e.on(n,(function(){return t.trigger(n)}))})),this},getConfig:function(){return n},add:function(t){return e.register(t),this},remove:function(t){return e.unregister(t),this},removeAll:function(){return e.unregisterAll(),this},start:function(){return e.startTracking(),this},stop:function(){return e.stopTracking(),this},undo:function(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!t.isEditing()&&e.undo(n),this},undoAll:function(){return e.undoAll(),this},redo:function(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!t.isEditing()&&e.redo(n),this},redoAll:function(){return e.redoAll(),this},hasUndo:function(){return e.isAvailable('undo')},hasRedo:function(){return e.isAvailable('redo')},getStack:function(){return e.stack},getStackGroup:function(){var t=[],e=[];return this.getStack().forEach((function(n){var r=n.get('magicFusionIndex');e.indexOf(r)<0&&(e.push(r),t.push(n))})),t},getPointer:function(){return this.getStack().pointer},clear:function(){return e.clear(),this},getInstance:function(){return e},destroy:function(){this.clear().removeAll(),[t,e,n,r].forEach((function(t){return{}})),this.em={}}}}},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(80),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(26))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,l=1,c={},u=!1,d=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},r=function(t){o.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(t){var e=d.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(p,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n=0||(i[n]=t[n]);return i}},function(t,e,n){ true&&function(t){"use strict";var e={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},n={};function r(t,e){var r=t.match(function(t){var e=n[t];return e||(n[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(e));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function i(t,e){return new RegExp((e?"^":"")+"","i")}function o(t,e){for(var n in t)for(var r=e[n]||(e[n]=[]),i=t[n],o=i.length-1;o>=0;o--)r.unshift(i[o])}t.defineMode("htmlmixed",(function(n,a){var s=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:a.multilineTagIndentFactor,multilineTagIndentPastTag:a.multilineTagIndentPastTag,allowMissingTagName:a.allowMissingTagName}),l={},c=a&&a.tags,u=a&&a.scriptTypes;if(o(e,l),c&&o(c,l),u)for(var d=u.length-1;d>=0;d--)l.script.unshift(["type",u[d].matches,u[d].mode]);function h(e,o){var a,c=s.token(e,o.htmlState),u=/\btag\b/.test(c);if(u&&!/[<>\s\/]/.test(e.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&u&&/>$/.test(e.current())){var d=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var f=">"==e.current()&&function(t,e){for(var n=0;n-1?t.backUp(r.length-i):r.match(/<\/?$/)&&(t.backUp(r.length),t.match(e,!1)||t.match(r)),n}(t,v,e.localMode.token(t,e.localState))},o.localMode=p,o.localState=t.startState(p,s.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=e.current(),e.eol()&&(o.inTag+=" "));return c}return{startState:function(){return{token:h,inTag:null,localMode:null,localState:null,htmlState:t.startState(s)}},copyState:function(e){var n;return e.localState&&(n=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:n,htmlState:t.copyState(s,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,r){return!e.localMode||/^\s*<\//.test(n)?s.indent(e.htmlState,n,r):e.localMode.indent?e.localMode.indent(e.localState,n,r):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||s}}}}),"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")}(n(13),n(84),n(85),n(44))},function(t,e,n){ true&&function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(r,i){var o,a,s=r.indentUnit,l={},c=i.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function d(t,e){function n(n){return e.tokenize=n,n(t,e)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(f("atom","]]>")):null:t.match("--")?n(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(function t(e){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=t(e+1),r.tokenize(n,r);if(">"==i){if(1==e){r.tokenize=d;break}return r.tokenize=t(e-1),r.tokenize(n,r)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(o=t.eat("/")?"closeTag":"openTag",e.tokenize=h,"tag bracket"):"&"==r?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function h(t,e){var n,r,i=t.next();if(">"==i||"/"==i&&t.eat(">"))return e.tokenize=d,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){e.tokenize=d,e.state=m,e.tagName=e.tagStart=null;var a=e.tokenize(t,e);return a?a+" tag error":"tag error"}return/[\'\"]/.test(i)?(e.tokenize=(n=i,(r=function(t,e){for(;!t.eol();)if(t.next()==n){e.tokenize=h;break}return"string"}).isInAttribute=!0,r),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t,e){return function(n,r){for(;!n.eol();){if(n.match(e)){r.tokenize=d;break}n.next()}return t}}function p(t,e,n){this.prev=t.context,this.tagName=e||"",this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function g(t){t.context&&(t.context=t.context.prev)}function v(t,e){for(var n;1;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(e))return;g(t)}}function m(t,e,n){return"openTag"==t?(n.tagStart=e.column(),b):"closeTag"==t?y:m}function b(t,e,n){return"word"==t?(n.tagName=e.current(),a="tag",O):l.allowMissingTagName&&"endTag"==t?(a="tag bracket",O(t,0,n)):(a="error",b)}function y(t,e,n){if("word"==t){var r=e.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&g(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",w):(a="tag error",x)}return l.allowMissingTagName&&"endTag"==t?(a="tag bracket",w(t,0,n)):(a="error",x)}function w(t,e,n){return"endTag"!=t?(a="error",w):(g(n),m)}function x(t,e,n){return a="error",w(t,0,n)}function O(t,e,n){if("word"==t)return a="attribute",C;if("endTag"==t||"selfcloseTag"==t){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(r)?v(n,r):(v(n,r),n.context=new p(n,r,i==n.indented)),m}return a="error",O}function C(t,e,n){return"equals"==t?S:(l.allowMissing||(a="error"),O(t,0,n))}function S(t,e,n){return"string"==t?k:"word"==t&&l.allowUnquoted?(a="string",O):(a="error",O(t,0,n))}function k(t,e,n){return"string"==t?k:O(t,0,n)}return d.isInText=!0,{startState:function(t){var e={tokenize:d,state:m,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;o=null;var n=e.tokenize(t,e);return(n||o)&&"comment"!=n&&(a=null,e.state=e.state(o||n,t,e),a&&(n="error"==a?n+" error":a)),n},indent:function(e,n,r){var i=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(i&&i.noIndent)return t.Pass;if(e.tokenize!=h&&e.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==S&&(t.state=O)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)e.push(n.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(13))},function(t,e,n){ true&&function(t){"use strict";t.defineMode("javascript",(function(e,n){var r,i,o=e.indentUnit,a=n.statementIndent,s=n.jsonld,l=n.json||s,c=n.typescript,u=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),r=t("keyword c"),i=t("keyword d"),o=t("operator"),a={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:r,void:r,throw:r,debugger:t("debugger"),var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:t("this"),class:t("class"),super:t("atom"),yield:r,export:t("export"),import:t("import"),extends:r,await:r}}(),h=/[+\-*&%=<>!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(t,e,n){return r=t,i=n,e}function g(t,e){var n,r=t.next();if('"'==r||"'"==r)return e.tokenize=(n=r,function(t,e){var r,i=!1;if(s&&"@"==t.peek()&&t.match(f))return e.tokenize=g,p("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(e.tokenize=g),p("string","string")}),e.tokenize(t,e);if("."==r&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return p("number","number");if("."==r&&t.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return p(r);if("="==r&&t.eat(">"))return p("=>","operator");if("0"==r&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return p("number","number");if(/\d/.test(r))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),p("number","number");if("/"==r)return t.eat("*")?(e.tokenize=v,v(t,e)):t.eat("/")?(t.skipToEnd(),p("comment","comment")):Yt(t,e,1)?(function(t){for(var e,n=!1,r=!1;null!=(e=t.next());){if(!n){if("/"==e&&!r)return;"["==e?r=!0:r&&"]"==e&&(r=!1)}n=!n&&"\\"==e}}(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),p("regexp","string-2")):(t.eat("="),p("operator","operator",t.current()));if("`"==r)return e.tokenize=m,m(t,e);if("#"==r&&"!"==t.peek())return t.skipToEnd(),p("meta","meta");if("#"==r&&t.eatWhile(u))return p("variable","property");if("<"==r&&t.match("!--")||"-"==r&&t.match("->")&&!/\S/.test(t.string.slice(0,t.start)))return t.skipToEnd(),p("comment","comment");if(h.test(r))return">"==r&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=r&&"="!=r||t.eat("="):/[<>*+\-|&?]/.test(r)&&(t.eat(r),">"==r&&t.eat(r))),"?"==r&&t.eat(".")?p("."):p("operator","operator",t.current());if(u.test(r)){t.eatWhile(u);var i=t.current();if("."!=e.lastType){if(d.propertyIsEnumerable(i)){var o=d[i];return p(o.type,o.style,i)}if("async"==i&&t.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return p("async","keyword",i)}return p("variable","variable",i)}}function v(t,e){for(var n,r=!1;n=t.next();){if("/"==n&&r){e.tokenize=g;break}r="*"==n}return p("comment","comment")}function m(t,e){for(var n,r=!1;null!=(n=t.next());){if(!r&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=g;break}r=!r&&"\\"==n}return p("quasi","string-2",t.current())}var b="([{}])";function y(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=t.string.charAt(a),l=b.indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(u.test(s))o=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(t.string.charAt(a-1)==s&&"\\"!=t.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(e.fatArrowAt=a)}}var w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function x(t,e,n,r,i,o){this.indented=t,this.column=e,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function O(t,e){for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var r=t.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==e)return!0}var C={state:null,column:null,marked:null,cc:null};function S(){for(var t=arguments.length-1;t>=0;t--)C.cc.push(arguments[t])}function k(){return S.apply(null,arguments),!0}function j(t,e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}function T(t){var e=C.state;if(C.marked="def",e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var r=function t(e,n){if(n){if(n.block){var r=t(e,n.prev);return r?r==n.prev?n:new E(r,n.vars,!0):null}return j(e,n.vars)?n:new E(n.prev,new M(e,n.vars),!1)}return null}(t,e.context);if(null!=r)return void(e.context=r)}else if(!j(t,e.localVars))return void(e.localVars=new M(t,e.localVars));n.globalVars&&!j(t,e.globalVars)&&(e.globalVars=new M(t,e.globalVars))}function P(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function E(t,e,n){this.prev=t,this.vars=e,this.block=n}function M(t,e){this.name=t,this.next=e}var D=new M("this",new M("arguments",null));function A(){C.state.context=new E(C.state.context,C.state.localVars,!1),C.state.localVars=D}function L(){C.state.context=new E(C.state.context,C.state.localVars,!0),C.state.localVars=null}function _(){C.state.localVars=C.state.context.vars,C.state.context=C.state.context.prev}function N(t,e){var n=function(){var n=C.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new x(r,C.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function I(){var t=C.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function F(t){return function e(n){return n==t?k():";"==t||"}"==n||")"==n||"]"==n?S():k(e)}}function V(t,e){return"var"==t?k(N("vardef",e),wt,F(";"),I):"keyword a"==t?k(N("form"),$,V,I):"keyword b"==t?k(N("form"),V,I):"keyword d"==t?C.stream.match(/^\s*$/,!1)?k():k(N("stat"),B,F(";"),I):"debugger"==t?k(F(";")):"{"==t?k(N("}"),L,at,I,_):";"==t?k():"if"==t?("else"==C.state.lexical.info&&C.state.cc[C.state.cc.length-1]==I&&C.state.cc.pop()(),k(N("form"),$,V,I,jt)):"function"==t?k(Mt):"for"==t?k(N("form"),Tt,V,I):"class"==t||c&&"interface"==e?(C.marked="keyword",k(N("form","class"==t?t:e),Nt,I)):"variable"==t?c&&"declare"==e?(C.marked="keyword",k(V)):c&&("module"==e||"enum"==e||"type"==e)&&C.stream.match(/^\s*\w/,!1)?(C.marked="keyword","enum"==e?k(Gt):"type"==e?k(At,F("operator"),dt,F(";")):k(N("form"),xt,F("{"),N("}"),at,I,I)):c&&"namespace"==e?(C.marked="keyword",k(N("form"),z,V,I)):c&&"abstract"==e?(C.marked="keyword",k(V)):k(N("stat"),Q):"switch"==t?k(N("form"),$,F("{"),N("}","switch"),L,at,I,I,_):"case"==t?k(z,F(":")):"default"==t?k(F(":")):"catch"==t?k(N("form"),A,R,V,I,_):"export"==t?k(N("stat"),Rt,I):"import"==t?k(N("stat"),Ht,I):"async"==t?k(V):"@"==e?k(z,V):S(N("stat"),z,F(";"),I)}function R(t){if("("==t)return k(Lt,F(")"))}function z(t,e){return U(t,e,!1)}function H(t,e){return U(t,e,!0)}function $(t){return"("!=t?S():k(N(")"),B,F(")"),I)}function U(t,e,n){if(C.state.fatArrowAt==C.stream.start){var r=n?X:Y;if("("==t)return k(A,N(")"),it(Lt,")"),I,F("=>"),r,_);if("variable"==t)return S(A,xt,F("=>"),r,_)}var i=n?q:W;return w.hasOwnProperty(t)?k(i):"function"==t?k(Mt,i):"class"==t||c&&"interface"==e?(C.marked="keyword",k(N("form"),_t,I)):"keyword c"==t||"async"==t?k(n?H:z):"("==t?k(N(")"),B,F(")"),I,i):"operator"==t||"spread"==t?k(n?H:z):"["==t?k(N("]"),qt,I,i):"{"==t?ot(et,"}",null,i):"quasi"==t?S(G,i):"new"==t?k(function(t){return function(e){return"."==e?k(t?Z:J):"variable"==e&&c?k(mt,t?q:W):S(t?H:z)}}(n)):"import"==t?k(z):k()}function B(t){return t.match(/[;\}\)\],]/)?S():S(z)}function W(t,e){return","==t?k(B):q(t,e,!1)}function q(t,e,n){var r=0==n?W:q,i=0==n?z:H;return"=>"==t?k(A,n?X:Y,_):"operator"==t?/\+\+|--/.test(e)||c&&"!"==e?k(r):c&&"<"==e&&C.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?k(N(">"),it(dt,">"),I,r):"?"==e?k(z,F(":"),i):k(i):"quasi"==t?S(G,r):";"!=t?"("==t?ot(H,")","call",r):"."==t?k(tt,r):"["==t?k(N("]"),B,F("]"),I,r):c&&"as"==e?(C.marked="keyword",k(dt,r)):"regexp"==t?(C.state.lastType=C.marked="operator",C.stream.backUp(C.stream.pos-C.stream.start-1),k(i)):void 0:void 0}function G(t,e){return"quasi"!=t?S():"${"!=e.slice(e.length-2)?k(G):k(z,K)}function K(t){if("}"==t)return C.marked="string-2",C.state.tokenize=m,k(G)}function Y(t){return y(C.stream,C.state),S("{"==t?V:z)}function X(t){return y(C.stream,C.state),S("{"==t?V:H)}function J(t,e){if("target"==e)return C.marked="keyword",k(W)}function Z(t,e){if("target"==e)return C.marked="keyword",k(q)}function Q(t){return":"==t?k(I,V):S(W,F(";"),I)}function tt(t){if("variable"==t)return C.marked="property",k()}function et(t,e){return"async"==t?(C.marked="property",k(et)):"variable"==t||"keyword"==C.style?(C.marked="property","get"==e||"set"==e?k(nt):(c&&C.state.fatArrowAt==C.stream.start&&(n=C.stream.match(/^\s*:\s*/,!1))&&(C.state.fatArrowAt=C.stream.pos+n[0].length),k(rt))):"number"==t||"string"==t?(C.marked=s?"property":C.style+" property",k(rt)):"jsonld-keyword"==t?k(rt):c&&P(e)?(C.marked="keyword",k(et)):"["==t?k(z,st,F("]"),rt):"spread"==t?k(H,rt):"*"==e?(C.marked="keyword",k(et)):":"==t?S(rt):void 0;var n}function nt(t){return"variable"!=t?S(rt):(C.marked="property",k(Mt))}function rt(t){return":"==t?k(H):"("==t?S(Mt):void 0}function it(t,e,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var a=C.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),k((function(n,r){return n==e||r==e?S():S(t)}),r)}return i==e||o==e?k():n&&n.indexOf(";")>-1?S(t):k(F(e))}return function(n,i){return n==e||i==e?k():S(t,r)}}function ot(t,e,n){for(var r=3;r"),dt):void 0}function ht(t){if("=>"==t)return k(dt)}function ft(t){return"}"==t?k():","==t||";"==t?k(ft):S(pt,ft)}function pt(t,e){return"variable"==t||"keyword"==C.style?(C.marked="property",k(pt)):"?"==e||"number"==t||"string"==t?k(pt):":"==t?k(dt):"["==t?k(F("variable"),lt,F("]"),pt):"("==t?S(Dt,pt):t.match(/[;\}\)\],]/)?void 0:k()}function gt(t,e){return"variable"==t&&C.stream.match(/^\s*[?:]/,!1)||"?"==e?k(gt):":"==t?k(dt):"spread"==t?k(gt):S(dt)}function vt(t,e){return"<"==e?k(N(">"),it(dt,">"),I,vt):"|"==e||"."==t||"&"==e?k(dt):"["==t?k(dt,F("]"),vt):"extends"==e||"implements"==e?(C.marked="keyword",k(dt)):"?"==e?k(dt,F(":"),dt):void 0}function mt(t,e){if("<"==e)return k(N(">"),it(dt,">"),I,vt)}function bt(){return S(dt,yt)}function yt(t,e){if("="==e)return k(dt)}function wt(t,e){return"enum"==e?(C.marked="keyword",k(Gt)):S(xt,st,St,kt)}function xt(t,e){return c&&P(e)?(C.marked="keyword",k(xt)):"variable"==t?(T(e),k()):"spread"==t?k(xt):"["==t?ot(Ct,"]"):"{"==t?ot(Ot,"}"):void 0}function Ot(t,e){return"variable"!=t||C.stream.match(/^\s*:/,!1)?("variable"==t&&(C.marked="property"),"spread"==t?k(xt):"}"==t?S():"["==t?k(z,F(']'),F(':'),Ot):k(F(":"),xt,St)):(T(e),k(St))}function Ct(){return S(xt,St)}function St(t,e){if("="==e)return k(H)}function kt(t){if(","==t)return k(wt)}function jt(t,e){if("keyword b"==t&&"else"==e)return k(N("form","else"),V,I)}function Tt(t,e){return"await"==e?k(Tt):"("==t?k(N(")"),Pt,I):void 0}function Pt(t){return"var"==t?k(wt,Et):"variable"==t?k(Et):S(Et)}function Et(t,e){return")"==t?k():";"==t?k(Et):"in"==e||"of"==e?(C.marked="keyword",k(z,Et)):S(z,Et)}function Mt(t,e){return"*"==e?(C.marked="keyword",k(Mt)):"variable"==t?(T(e),k(Mt)):"("==t?k(A,N(")"),it(Lt,")"),I,ct,V,_):c&&"<"==e?k(N(">"),it(bt,">"),I,Mt):void 0}function Dt(t,e){return"*"==e?(C.marked="keyword",k(Dt)):"variable"==t?(T(e),k(Dt)):"("==t?k(A,N(")"),it(Lt,")"),I,ct,_):c&&"<"==e?k(N(">"),it(bt,">"),I,Dt):void 0}function At(t,e){return"keyword"==t||"variable"==t?(C.marked="type",k(At)):"<"==e?k(N(">"),it(bt,">"),I):void 0}function Lt(t,e){return"@"==e&&k(z,Lt),"spread"==t?k(Lt):c&&P(e)?(C.marked="keyword",k(Lt)):c&&"this"==t?k(st,St):S(xt,st,St)}function _t(t,e){return"variable"==t?Nt(t,e):It(t,e)}function Nt(t,e){if("variable"==t)return T(e),k(It)}function It(t,e){return"<"==e?k(N(">"),it(bt,">"),I,It):"extends"==e||"implements"==e||c&&","==t?("implements"==e&&(C.marked="keyword"),k(c?dt:z,It)):"{"==t?k(N("}"),Ft,I):void 0}function Ft(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||c&&P(e))&&C.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(C.marked="keyword",k(Ft)):"variable"==t||"keyword"==C.style?(C.marked="property",k(Vt,Ft)):"number"==t||"string"==t?k(Vt,Ft):"["==t?k(z,st,F("]"),Vt,Ft):"*"==e?(C.marked="keyword",k(Ft)):c&&"("==t?S(Dt,Ft):";"==t||","==t?k(Ft):"}"==t?k():"@"==e?k(z,Ft):void 0}function Vt(t,e){if("?"==e)return k(Vt);if(":"==t)return k(dt,St);if("="==e)return k(H);var n=C.state.lexical.prev;return S(n&&"interface"==n.info?Dt:Mt)}function Rt(t,e){return"*"==e?(C.marked="keyword",k(Wt,F(";"))):"default"==e?(C.marked="keyword",k(z,F(";"))):"{"==t?k(it(zt,"}"),Wt,F(";")):S(V)}function zt(t,e){return"as"==e?(C.marked="keyword",k(F("variable"))):"variable"==t?S(H,zt):void 0}function Ht(t){return"string"==t?k():"("==t?S(z):S($t,Ut,Wt)}function $t(t,e){return"{"==t?ot($t,"}"):("variable"==t&&T(e),"*"==e&&(C.marked="keyword"),k(Bt))}function Ut(t){if(","==t)return k($t,Ut)}function Bt(t,e){if("as"==e)return C.marked="keyword",k($t)}function Wt(t,e){if("from"==e)return C.marked="keyword",k(z)}function qt(t){return"]"==t?k():S(it(H,"]"))}function Gt(){return S(N("form"),xt,F("{"),N("}"),it(Kt,"}"),I,I)}function Kt(){return S(xt,St)}function Yt(t,e,n){return e.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}return _.lex=!0,I.lex=!0,{startState:function(t){var e={tokenize:g,lastType:"sof",cc:[],lexical:new x((t||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new E(null,null,!1),indented:t||0};return n.globalVars&&"object"==typeof n.globalVars&&(e.globalVars=n.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),y(t,e)),e.tokenize!=v&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==r?n:(e.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",function(t,e,n,r,i){var o=t.cc;for(C.state=t,C.stream=i,C.marked=null,C.cc=o,C.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);1;)if((o.length?o.pop():l?z:V)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return C.marked?C.marked:"variable"==n&&O(t,r)?"variable-2":e}}(e,n,r,i,t))},indent:function(e,r){if(e.tokenize==v||e.tokenize==m)return t.Pass;if(e.tokenize!=g)return 0;var i,s=r&&r.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(r))for(var c=e.cc.length-1;c>=0;--c){var u=e.cc[c];if(u==I)l=l.prev;else if(u!=jt)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=e.cc[e.cc.length-1])&&(i==W||i==q)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var d=l.type,f=s==d;return"vardef"==d?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==d&&"{"==s?l.indented:"form"==d?l.indented+o:"stat"==d?l.indented+(function(t,e){return"operator"==t.lastType||","==t.lastType||h.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}(e,r)?a||o:0):"switch"!=l.info||f||0==n.doubleIndentSwitch?l.align?l.column+(f?0:1):l.indented+(f?0:o):l.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:Yt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=z&&e!=H||t.cc.pop()}}})),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/manifest+json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(13))},function(t,e,n){ true&&function(t){t.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e){return/^[;{}]$/.test(e)}}),t.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e,n,r){return this.jsonMode?/^[\[,{]$/.test(e)||/^}/.test(n):(";"!=e||!r.lexical||")"!=r.lexical.type)&&/^[;{}]$/.test(e)&&!/^;/.test(n)}});var e=/^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;t.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",newlineAfterToken:function(t,n,r,i){var o=!1;return"html"==this.configuration&&(o=!!i.context&&e.test(i.context.tagName)),!o&&("tag"==t&&/>$/.test(n)&&i.context||/^-1&&s>-1&&s>a&&(t=t.substr(0,a)+t.substring(a+o.commentStart.length,s)+t.substr(s+o.commentEnd.length)),i.replaceRange(t,n,r)}}))})),t.defineExtension("autoIndentRange",(function(t,e){var n=this;this.operation((function(){for(var r=t.line;r<=e.line;r++)n.indentLine(r,"smart")}))})),t.defineExtension("autoFormatRange",(function(e,n){var r=this,i=r.getMode(),o=r.getRange(e,n).split("\n"),a=t.copyState(i,r.getTokenAt(e).state),s=r.getOption("tabSize"),l="",c=0,u=0===e.ch;function d(){l+="\n",u=!0,++c}for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||'',this.pfx=e.stylePrefix||'',this.parent=t.parent,this.parentView=t.parentView;var n=this.pfx,r=this.ppfx,i=this.parent,o=this.collection;this.listenTo(o,'add',this.addTo),this.listenTo(o,'reset resetNavigator',this.render),this.listenTo(o,'remove',this.removeChildren),this.className="".concat(n,"layers");var s=e.em;if(e.sortable&&!this.opt.sorter){var l=s.get('Utils');this.opt.sorter=new l.Sorter({container:e.sortContainer||this.el,containerSel:".".concat(this.className),itemSel:".".concat(n,"layer"),ignoreViewChildren:1,onEndMove:function(t,e,n){var r=e.getSourceModel();s.setSelected(r,{forceChange:1}),s.trigger("".concat(a["b"],":end"),n)},avoidSelectOnEnd:1,nested:1,ppfx:r,pfx:n})}this.sorter=this.opt.sorter||'',this.$el.data('collection',o),i&&this.$el.data('model',i)},removeChildren:function(t){var e=t.viewLayer;e&&(e.remove(),t.viewLayer=0)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var r=this.level,i=this.parentView,a=e||null,s=new(0,o["a"])({level:r,model:t,parentView:i,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}).render().el;if(a)a.appendChild(s);else if(void 0!==n){var l='before';this.$el.children().length==n&&(n--,l='after'),n<0?this.$el.append(s):this.$el.children().eq(n)[l](s)}else this.$el.append(s);return s},isCountable:function(t,e){var n=t.get('type'),r=t.get('tagName');return!(('textnode'==n||'br'==r)&&e||!t.get('layerable'))},render:function(){var t=this,e=document.createDocumentFragment(),n=this.el;return n.innerHTML='',this.collection.each((function(n){return t.addToCollection(n,e)})),n.appendChild(e),n.className=this.className,this}})},function(t,e,n){var r={"./CanvasClear":45,"./CanvasClear.js":45,"./CanvasMove":46,"./CanvasMove.js":46,"./CommandAbstract":22,"./CommandAbstract.js":22,"./ComponentDelete":47,"./ComponentDelete.js":47,"./ComponentDrag":48,"./ComponentDrag.js":48,"./ComponentEnter":49,"./ComponentEnter.js":49,"./ComponentExit":50,"./ComponentExit.js":50,"./ComponentNext":51,"./ComponentNext.js":51,"./ComponentPrev":52,"./ComponentPrev.js":52,"./ComponentStyleClear":53,"./ComponentStyleClear.js":53,"./CopyComponent":54,"./CopyComponent.js":54,"./DeleteComponent":55,"./DeleteComponent.js":55,"./ExportTemplate":56,"./ExportTemplate.js":56,"./Fullscreen":57,"./Fullscreen.js":57,"./MoveComponent":58,"./MoveComponent.js":58,"./OpenAssets":59,"./OpenAssets.js":59,"./OpenBlocks":60,"./OpenBlocks.js":60,"./OpenLayers":61,"./OpenLayers.js":61,"./OpenStyleManager":62,"./OpenStyleManager.js":62,"./OpenTraitManager":63,"./OpenTraitManager.js":63,"./PasteComponent":64,"./PasteComponent.js":64,"./Preview":65,"./Preview.js":65,"./Resize":66,"./Resize.js":66,"./SelectComponent":14,"./SelectComponent.js":14,"./SelectPosition":27,"./SelectPosition.js":27,"./ShowOffset":67,"./ShowOffset.js":67,"./SwitchVisibility":68,"./SwitchVisibility.js":68};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code='MODULE_NOT_FOUND',e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=91},function(t,e,n){"use strict";n.r(e);var r=n(8),i=n.n(r),o=n(2),a=n.n(o),s=n(1),l=n.n(s),c=n(0),u={stylePrefix:'comp-',wrapperId:'wrapper',wrapperName:'Body',wrapper:{removable:!1,copyable:!1,draggable:!1,components:[],traits:[],stylable:['background','background-color','background-image','background-repeat','background-attachment','background-position','background-size']},components:[],draggableComponents:1,storeWrapper:0,processor:0,voidElements:['area','base','br','col','embed','hr','img','input','keygen','link','menuitem','meta','param','source','track','wbr']},d=n(5),h=n(21),f=n(6),p=n(35);function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function v(t){for(var e=1;e\n \n "),fallback:"\n \n "),file:''}),initialize:function(t,e){d["a"].prototype.initialize.apply(this,arguments);var n=this.get('attributes'),r=n.src;r&&this.set('src',r,{silent:1})},initToolbar:function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},e=this.get(t.fallback?'fallback':'src')||'',n=e;return e&&'2&&void 0!==arguments[2]?arguments[2]:{};!n.fromDisable&&this.disableEditing()},onActive:function(t){var e=this.rte,n=this.em;if(!(this.rteEnabled||!this.model.get('editable')||n&&n.isEditing())){if(t&&t.stopPropagation&&t.stopPropagation(),e)try{this.activeRte=e.enable(this,this.activeRte)}catch(t){n.logError(t)}this.toggleEvents(1)}},onDisable:function(){this.disableEditing()},disableEditing:function(){var t=this.model,e=this.rte,n=this.activeRte,r=this.em,i=t.get('editable');if(e&&i){try{e.disable(this,n)}catch(t){r.logError(t)}this.syncContent()}this.toggleEvents()},getContent:function(){var t=this.activeRte;return t&&'function'==typeof t.getContent?t.getContent():this.getChildrenContainer().innerHTML},syncContent:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=this.rte,r=this.rteEnabled;if(r||t.force){var i=this.getContent(),o=e.components(),a=nt({fromDisable:1},t);if(e.set('content','',a),n.customRte)o.length&&o.reset(null,t),e.set('content',i,a);else{var s=function e(n){var r=!!n.get('textable'),i=!['text','default',''].some((function(t){return n.is(t)}))||r;n.set(nt({_innertext:!i,editable:i&&n.get('editable'),selectable:i,hoverable:i,removable:r,draggable:r,highlightable:0,copyable:r},!r&&{toolbar:''}),t),n.get('components').each((function(t){return e(t)}))};o.reset(i,t),o.each((function(t){return s(t)})),o.trigger('resetNavigator')}}},onInput:function(){var t=this.em,e='component',n=["".concat(e,":update"),"".concat(e,":input")].join(' ');t&&t.trigger(n,this.model)},disablePropagation:function(t){t.stopPropagation()},toggleEvents:function(t){var e=this.em,n=this.model,r={on:tt["w"],off:tt["v"]},i=t?'on':'off';e.setEditing(t),this.rteEnabled=!!t;var o=[this.el.ownerDocument,document];if(r.off(o,'mousedown',this.disableEditing),r[i](o,'mousedown',this.disableEditing),e[i]('toolbar:run:before',this.disableEditing),n[i]('removed',this.disableEditing),this.$el.off('mousedown',this.disablePropagation),this.$el[i]('mousedown',this.disablePropagation),this.config.draggableComponents)for(var a=this.el;a;)a.draggable=!t,(a=a.parentNode)&&'BODY'==a.tagName&&(a=0)}}),ot=it.extend({render:function(){for(var t=arguments.length,e=new Array(t),n=0;n/g,'>').replace(/"/g,'"').replace(/'/g,''')}},{isComponent:function(t){var e='';return 3===t.nodeType&&(e={type:'textnode',content:t.textContent}),e}});function Dt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var At=Mt.extend({defaults:function(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{},o=e.components(),a=t.get('UndoManager'),s=t.handleUpdates.bind(t),l=this.handleChanges.bind(this),c=this.handleChangesColl.bind(this),u=this.handleRemoves.bind(this);a&&a.add(e),a&&o&&a.add(o);var d='change:style change:content change:attributes change:src';[[e,d,s],[e,'change:components',c],[o,'add',l],[o,'remove reset',u],[e.get('classes'),'add remove',s]].forEach((function(e){t.stopListening(e[0],e[1],e[2]),t.listenTo(e[0],e[1],e[2])})),!i.avoidStore&&s('','',i),o.each((function(t){return r.handleChanges(t,n,i)}))},handleChangesColl:function(e,n){var r=t.get('UndoManager');if(r&&n instanceof l.a.Collection){var i=this.handleChanges.bind(this),o=this.handleRemoves.bind(this);r.add(n),[[n,'add',i],[n,'remove reset',o]].forEach((function(e){t.stopListening(e[0],e[1],e[2]),t.listenTo(e[0],e[1],e[2])}))}},handleRemoves:function(e,n,r){var i=r||n;t.handleUpdates(e,n,i)},load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'',e=this.em,n='';!t&&r.stm&&(t=r.em.getCacheLoad());var i=t,o=i.components,a=i.html;if(o)if(Object(c["isObject"])(o)||Object(c["isArray"])(o))n=o;else try{n=JSON.parse(o)}catch(t){e&&e.logError(t)}else a&&(n=a);var s=n&&n.constructor===Object;return(n&&n.length||s)&&(this.clear(),s?this.getWrapper().set(n):this.getComponents().add(n)),n},store:function(t){if(r.stm){var e={},n=this.storageKey();if(n.indexOf('html')>=0&&(e.html=r.em.getHtml()),n.indexOf('components')>=0){this.em;var i=r.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(i)}return t||r.stm.store(e),e}},getComponent:function(){return e},getWrapper:function(){return this.getComponent()},getComponents:function(){return this.getWrapper().get('components')},addComponent:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getComponents().add(t,e)},render:function(){return n.render().el},clear:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.getComponents().map((function(t){return t})).forEach((function(e){return e.remove(t)})),this},setComponents:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.clear(e).addComponent(t,e)},addType:function(t,e){var n=this.em,r=e.model,o=void 0===r?{}:r,s=e.view,l=void 0===s?{}:s,u=e.isComponent,d=e.extend,h=e.extendView,f=e.extendFn,p=void 0===f?[]:f,g=e.extendFnView,v=void 0===g?[]:g,m=this.getType(t),b=this.getType(d),y=this.getType(h),w=b||(m||this.getType('default')),x=w.model,O=y?y.view:w.view,C=function(t,e,n){return t.reduce((function(t,r){var i=e[r],o=n.prototype[r];return i&&o&&(t[r]=function(){o.bind(this).apply(void 0,arguments),i.bind(this).apply(void 0,arguments)}),t}),{})};'object'===i()(o)&&(e.model=x.extend(Ft(Ft(Ft({},o),C(p,o,x)),{},{defaults:Ft(Ft({},x.prototype.defaults),Object(c["result"])(o,'defaults')||{})}),{isComponent:!m||b||u?u||function(){return 0}:x.isComponent})),'object'===i()(l)&&(e.view=O.extend(Ft(Ft({},l),C(v,l,O)))),m?(m.model=e.model,m.view=e.view):(e.id=t,a.unshift(e));var S="component:type:".concat(m?'update':'add');return n&&n.trigger(S,m||e),this},getType:function(t){for(var e=a,n=0;n1&&void 0!==arguments[1]?arguments[1]:{};t&&(t.set({status:'selected'}),['component:selected','component:toggled'].forEach((function(r){return e.em.trigger(r,t,n)})))},selectRemove:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){this.em;t.set({status:'',state:''}),['component:deselected','component:toggled'].forEach((function(r){return e.em.trigger(r,t,n)}))}},componentHovered:function(){var t=r.em,e=t.get('componentHovered'),n=t.previous('componentHovered'),i='hovered';n&&n.get('status')==i&&n.set({status:'',state:''}),e&&Object(c["isEmpty"])(e.get('status'))&&e.set('status',i)},allById:function(){return o},destroy:function(){this.clear(),n.remove(),[r,t,o,e,n].forEach((function(t){return{}})),this.em={}}}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r),o=n(2),a=n.n(o),s=n(3),l=n(15),c=n.n(l),u=n(16),d=n.n(u),h=n(0),f=function(){function t(e,n){var r=this;c()(this,t),this.em=e;var i=n||e.get('Canvas').getFrames().map((function(t){return t.get('root').getEl()})),o=Array.isArray(i)?i:[i];return this.el=i,this.counter=0,Object(h["bindAll"])(this,'handleDragEnter','handleDragOver','handleDrop','handleDragLeave'),o.forEach((function(t){return r.toggleEffects(t,1)})),this}return d()(t,[{key:"toggleEffects",value:function(t,e){var n={on:s["w"],off:s["v"]},r=e?'on':'off';n[r](t,'dragenter',this.handleDragEnter),n[r](t,'dragover',this.handleDragOver),n[r](t,'drop',this.handleDrop),n[r](t,'dragleave',this.handleDragLeave)}},{key:"endDrop",value:function(t,e){var n=this.em,r=this.dragStop;this.counter=0,r&&r(t),n.trigger('canvas:dragend',e)}},{key:"handleDragLeave",value:function(t){this.updateCounter(-1,t)}},{key:"updateCounter",value:function(t,e){this.counter+=t,0===this.counter&&this.endDrop(1,e)}},{key:"handleDragEnter",value:function(t){var e=this,n=this.em,r=t.dataTransfer;if(this.updateCounter(1,t),!this.over){this.over=1;var i,o,a=n.get('Utils'),s=n.get('Canvas'),l=s.getBody(),c=n.get('dragContent')||'
';if(n.stopDefault(),n.inAbsoluteMode()){var u=n.get('DomComponents').getWrapper(),d=u.append({})[0],h=n.get('Commands').run('core:component-drag',{event:t,guidesInfo:1,center:1,target:d,onEnd:function(t,n,i){var o;if(!i.cancelled){o=u.append(c)[0];var a=d.getStyle(),s=a.left,l=a.top,h=a.position;o.addStyle({left:s,top:l,position:h})}e.handleDragEnd(o,r),d.remove()}});i=function(e){return h.stop(t,{cancel:e})},o=function(t){return c=t}}else{var f=new a.Sorter({em:n,wmargin:1,nested:1,canvasRelative:1,direction:'a',container:l,placer:s.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:'gjs-',onEndMove:function(t){return e.handleDragEnd(t,r)},document:s.getFrameEl().contentDocument});f.setDropContent(c),f.startSort(),this.sorter=f,i=function(t){t&&(f.moved=0),f.endMove()},o=function(t){return f.setDropContent(t)}}this.dragStop=i,this.dragContent=o,n.trigger('canvas:dragenter',r,c)}}},{key:"handleDragEnd",value:function(t,e){var n=this.em;this.over=0,t&&(n.set('dragResult',t),n.trigger('canvas:drop',e,t)),n.runDefault({preserveSelected:1})}},{key:"handleDragOver",value:function(t){t.preventDefault(),this.em.trigger('canvas:dragover',t)}},{key:"handleDrop",value:function(t){t.preventDefault();var e=this.dragContent,n=t.dataTransfer,r=this.getContentByData(n).content;t.target.style.border='',r&&e&&e(r),this.endDrop(!r,t)}},{key:"getContentByData",value:function(t){var e=this.em,n=t.types,r=t.files||[],i=e.get('dragContent'),o=t.getData('text');if(r.length){o=[];for(var a=0;a=0)o=t.getData('text/html').replace(/<\/?meta[^>]*>/g,'');else if(Object(h["indexOf"])(n,'text/uri-list')>=0)o={type:'link',attributes:{href:o},content:o};else if(Object(h["indexOf"])(n,'text/json')>=0){var c=t.getData('text/json');c&&(o=JSON.parse(c))}else 1===n.length&&'text/plain'===n[0]&&(o="
".concat(o,"
"));var u={content:o};return e.trigger('canvas:dragdata',t,u),u}}]),t}(),p={stylePrefix:'cv-',scripts:[],styles:[],customBadgeLabel:'',autoscrollLimit:50,notTextable:['button','a','input[type=checkbox]','input[type=radio]']},g=n(1),v=n.n(g),m=n(5),b=n(33);function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n=this.attributes,r=n.root,i=n.styles,o=n.components;this.set('head',[]),this.em=e.em;var a={em:e.em,config:e.em.get('DomComponents').getConfig(),frame:this};!r&&this.set('root',new m["a"]({type:'wrapper',components:o||[]},a)),(!i||Object(h["isString"])(i))&&this.set('styles',new b["a"](i,a))},remove:function(){this.view=0;var t=this.collection;return t&&t.remove(this)},getHead:function(){return i()(this.get('head'))},setHead:function(t){return this.set('head',i()(t))},addHeadItem:function(t){var e=this.getHead();e.push(t),this.setHead(e)},getHeadByAttr:function(t,e,n){return this.getHead().filter((function(r){return r.attributes&&r.attributes[t]==e&&(!n||n===r.tag)}))[0]},removeHeadByAttr:function(t,e,n){var r=this.getHead(),i=this.getHeadByAttr(t,e,n),o=r.indexOf(i);o>=0&&(r.splice(o,1),this.setHead(r))},addLink:function(t){var e='link';!this.getHeadByAttr('href',t,e)&&this.addHeadItem({tag:e,attributes:{href:t,rel:'stylesheet'}})},removeLink:function(t){this.removeHeadByAttr('href',t,'link')},addScript:function(t){var e='script';!this.getHeadByAttr('src',t,e)&&this.addHeadItem({tag:e,attributes:{src:t}})},removeScript:function(t){this.removeHeadByAttr('src',t,'script')},_emitUpdated:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.em.trigger('frame:updated',w({frame:this},t))}}),O=v.a.Collection.extend({model:x,initialize:function(){Object(h["bindAll"])(this,'itemLoaded')},itemLoaded:function(){this.loadedItems++,this.loadedItems>=this.itemsToLoad&&(this.trigger('loaded:all'),this.listenToLoadItems(0))},listenToLoad:function(){this.loadedItems=0,this.itemsToLoad=this.length,this.listenToLoadItems(1)},listenToLoadItems:function(t){var e=this;this.forEach((function(n){return n[t?'on':'off']('loaded',e.itemLoaded)}))}}),C=v.a.Model.extend({defaults:{frame:'',frames:'',wrapper:'',rulers:!1,zoom:100,x:0,y:0},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.em,n=t.styles,r=void 0===n?[]:n,i=t.scripts,o=void 0===i?[]:i,a=e&&e.getWrapper(),s=e&&e.getStyle(),l=new x({root:a,styles:s},t);r.forEach((function(t){return l.addLink(t)})),o.forEach((function(t){return l.addScript(t)})),this.em=e,this.set('frame',l),this.set('frames',new O([l],t)),this.listenTo(this,'change:zoom',this.onZoomChange),this.listenTo(e,'change:device',this.updateDevice)},updateDevice:function(){var t=this.em,e=t.getDeviceModel(),n=t.getCurrentFrameModel();if(n&&e){var r=e.attributes,i=r.width,o=r.height;n.set({width:i,height:o})}},onZoomChange:function(){this.get('zoom')<1&&this.set('zoom',1)}}),S=n(20),k=n(37),j=n(6),T=n(9);function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function E(t){for(var e=1;ea&&(s+=i-a),!Object(h["isUndefined"])(t)&&s!==r&&s>0&&s0){var i=r.shift(),o=Object(T["e"])('script',E({type:'text/javascript'},Object(h["isString"])(i)?{src:i}:i));o.onerror=o.onload=n.bind(null,r),e.contentDocument.head.appendChild(o)}else t.renderBody()}(i()(n.scripts))}},renderBody:function(){var t=this,e=this.config,n=this.model,r=this.ppfx,i=n.get('root'),o=n.get('styles'),a=e.em,l=this.getDoc(),c=this.getHead(),u=this.getBody(),d=this.getWindow(),f=a.get('Config'),p=[];d._isEditor=!0,e.styles.forEach((function(t){return p.push(Object(h["isString"])(t)?{tag:'link',attributes:{href:t,rel:'stylesheet'}}:{tag:'link',attributes:E({rel:'stylesheet'},t)})})),p.length&&Object(T["c"])(c,p);Object(T["a"])(u,"")),this.root=new j["default"]({model:i,config:E(E({},i.config),{},{frameView:this})}).render(),Object(T["a"])(u,this.root.el),Object(T["a"])(u,new k["a"]({collection:o,config:E(E({},a.get('CssComposer').getConfig()),{},{frameView:this})}).render().el),Object(T["a"])(u,this.getJsContainer()),Object(s["w"])(u,'click',(function(t){return t&&'A'==t.target.tagName&&t.preventDefault()})),Object(s["w"])(u,'submit',(function(t){return t&&t.preventDefault()})),[{event:'keydown keyup keypress',class:'KeyboardEvent'},{event:'mousedown mousemove mouseup',class:'MouseEvent'},{event:'wheel',class:'WheelEvent'}].forEach((function(e){return e.event.split(' ').forEach((function(n){l.addEventListener(n,(function(n){return t.el.dispatchEvent(Object(T["d"])(n,e.class))}))}))})),this._toggleEffects(1),n.trigger('loaded')},_toggleEffects:function(t){(t?s["w"]:s["v"])(this.getWindow(),"".concat(T["i"]," resize"),this._emitUpdate)},_emitUpdate:function(){this.model._emitUpdated()}}),D=n(17);function A(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function L(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(h["bindAll"])(this,'onScroll','frameLoaded','updateOffset','remove','startDrag');var n=this.model,r=L(L({},t.config||e),{},{frameWrapView:this}),i=r.canvasView,o=r.em;this.cv=i,this.config=r,this.em=o,this.canvas=o&&o.get('Canvas'),this.ppfx=r.pStylePrefix||'',this.frame=new M({model:n,config:r}),this.classAnim="".concat(this.ppfx,"frame-wrapper--anim"),this.listenTo(n,'loaded',this.frameLoaded),this.listenTo(n,'change:x change:y',this.updatePos),this.listenTo(n,'change:width change:height',this.updateSize),this.listenTo(n,'destroy remove',this.remove),this.updatePos(),this.setupDragger()},setupDragger:function(){var t,e,n,r=this,i=this.canvas,o=this.model,a=function(t){i.toggleFramesEvents(t)};this.dragger=new D["a"]({onStart:function(){var i=o.attributes,s=i.x,l=i.y;n=r.em.getZoomMultiplier(),t=s,e=l,a()},onEnd:function(){return a(1)},setPosition:function(r){o.set({x:t+r.x*n,y:e+r.y*n})}})},startDrag:function(t){t&&this.dragger.start(t)},remove:function(){return this.frame.remove(),this.frame={},v.a.View.prototype.remove.apply(this,arguments),this},updateOffset:Object(h["debounce"])((function(){var t=this.em,e=this.$el,n=this.frame;t.runDefault({preserveSelected:1}),e.removeClass(this.classAnim),n.model._emitUpdated()})),updatePos:function(t){var e=this.model,n=this.el,r=e.attributes,i=r.x,o=r.y,a=n.style;this.frame.rect=0,a.left=isNaN(i)?i:"".concat(i,"px"),a.top=isNaN(o)?o:"".concat(o,"px"),t&&this.updateOffset()},updateSize:Object(h["debounce"])((function(){this.updateDim()})),updateDim:function(){var t=this.em,e=this.el,n=this.$el,r=this.model,i=this.classAnim,o=r.attributes,a=o.width,s=o.height,l=e.style,c=l.width||'',u=l.height||'',d=a||'',f=s||'',p=c==d&&u==f,g='px';if(this.frame.rect=0,n.addClass(i),l.width=Object(h["isNumber"])(d)?"".concat(d).concat(g):d,l.height=Object(h["isNumber"])(f)?"".concat(f).concat(g):f,Object(h["isNull"])(a)||Object(h["isNull"])(s)){var v=L(L({},a?{}:{width:e.offsetWidth}),s?{}:{height:e.offsetHeight});r.set(v,{silent:1})}t.stopDefault({preserveSelected:1}),p?this.updateOffset():n.one(T["i"],this.updateOffset)},onScroll:function(){var t=this.frame;this.em.trigger('frame:scroll',{frame:t,body:t.getBody(),target:t.getWindow()})},frameLoaded:function(){this.frame.getWindow().onscroll=this.onScroll,this.updateDim()},render:function(){var t=this.frame,e=this.$el,n=this.ppfx,r=this.cv,i=this.model,o=this.el,a=i.attributes.onRender;t.render(),e.empty().attr({class:"".concat(n,"frame-wrapper")}).append("\n
\n
\n ").concat(i.get('name')||'',"\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n ")).append(t.el);var s=Object(T["e"])('div',{class:"".concat(n,"tools"),style:'pointer-events:none; display: none'},"\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n "));return this.elTools=s,r.toolsWrapper.appendChild(s),a&&a({el:o,elTop:o.querySelector('[data-frame-top]'),elRight:o.querySelector('[data-frame-right]'),elBottom:o.querySelector('[data-frame-bottom]'),elLeft:o.querySelector('[data-frame-left]'),frame:i,frameWrapperView:this,remove:this.remove,startDrag:this.startDrag}),this}}),N=S["a"].extend({itemView:_,autoAdd:1,init:function(){this.listenTo(this.collection,'reset',this.render)},onRender:function(){var t=this.config,e=this.$el,n=t.em;n&&e.attr({class:"".concat(n.getConfig('stylePrefix'),"frames")})}});function I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function F(t){for(var e=1;e
\n
\n ")},initialize:function(t){Object(h["bindAll"])(this,'clearOff','onKeyPress','onCanvasMove'),Object(s["w"])(window,'scroll resize',this.clearOff);var e=this.model,n=e.get('frames');this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||'',this.ppfx=this.config.pStylePrefix||'',this.className=this.config.stylePrefix+'canvas';var r=this.em,i=this.config;this.frames=new N({collection:n,config:F(F({},i),{},{canvasView:this,renderContent:1})}),this.listenTo(r,'change:canvasOffset',this.clearOff),this.listenTo(r,'component:selected',this.checkSelected),this.listenTo(e,'change:zoom change:x change:y',this.updateFrames),this.listenTo(n,'loaded:all',(function(){return r.trigger('loaded')})),this.toggleListeners(1)},checkSelected:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.scroll,r=this.em.get('currentFrame');n&&t.views.forEach((function(t){t._getFrame()!==r&&t.scrollIntoView(n)}))},remove:function(){var t=this.model.get('frames');t.remove(t.models),this.frames.remove(),this.frames={},v.a.View.prototype.remove.apply(this,arguments),this.toggleListeners()},preventDefault:function(t){t&&(t.preventDefault(),t._parentEvent&&t._parentEvent.preventDefault())},onCanvasMove:function(t){},toggleListeners:function(t){this.el;(t?s["w"]:s["v"])(document,'keypress',this.onKeyPress)},onKeyPress:function(t){var e=this.em;' '!==Object(s["f"])(t)||1===e.getZoomDecimal()||e.get('Canvas').isInputFocused()||(this.preventDefault(t),e.get('Editor').runCommand('core:canvas-move'))},onWheel:function(t){if((t.ctrlKey||t.metaKey)&&this.em.getConfig('multiFrames')){this.preventDefault(t);var e=this.model,n=Math.max(-1,Math.min(1,t.wheelDelta||-t.detail)),r=e.get('zoom');e.set('zoom',r+2*n)}},updateFrames:function(t){var e=this.em,n=this.model.attributes,r=n.x,i=n.y,o=this.getZoom(),a={preserveSelected:1},s=o?1/o:1;this.framesArea.style.transform="scale(".concat(o,") translate(").concat(r*s,"px, ").concat(i*s,"px)"),this.clearOff(),e.stopDefault(a),e.trigger('canvas:update',t),V&&clearTimeout(V),V=setTimeout((function(){return e.runDefault(a)}),300)},getZoom:function(){return this.em.getZoomDecimal()},isElInViewport:function(t){var e=Object(s["e"])(t),n=Object(s["d"])(e),r=this.getFrameOffset(e),i=n.top,o=n.left;return i>=0&&o>=0&&i<=r.height&&o<=r.width},offset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(s["d"])(t),r=t.ownerDocument.body,i=e.noScroll;return{top:n.top+(i?0:r.scrollTop),left:n.left+(i?0:r.scrollLeft),width:n.width,height:n.height}},clearOff:function(){this.frmOff=null,this.cvsOff=null},getFrameOffset:function(t){if(!this.frmOff||t){var e=this.frame.el,n=t?t.ownerDocument.defaultView.frameElement:e;this.frmOff=this.offset(n||e)}return this.frmOff},getCanvasOffset:function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},getElementPos:function(t,e){var n=this.getZoom(),r=e||{},i=this.getFrameOffset(t),o=this.getCanvasOffset(),a=this.offset(t,e),s=r.avoidFrameOffset?0:i.top,l=r.avoidFrameOffset?0:i.left;return{top:a.top*n+s-o.top,left:a.left*n+l-o.left,height:a.height*n,width:a.width*n,zoom:n,rect:a}},getElementOffsets:function(t){var e=this;if(!t||Object(s["s"])(t))return{};var n={},r=window.getComputedStyle(t);return['marginTop','marginRight','marginBottom','marginLeft','paddingTop','paddingRight','paddingBottom','paddingLeft'].forEach((function(t){n[t]=parseFloat(r[t])*e.getZoom()})),n},getPosition:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.frame.el.contentDocument;if(e){var n=e.body,r=this.getZoom(),i=this.getFrameOffset(),o=this.getCanvasOffset(),a=t.noScroll;return{top:i.top+(a?0:n.scrollTop)*r-o.top,left:i.left+(a?0:n.scrollLeft)*r-o.left,width:o.width,height:o.height}}},updateScript:function(t){var e=t.model,n=e.getId();t.scriptContainer||(t.scriptContainer=R("
")),this.getJsContainer().appendChild(t.scriptContainer.get(0))),t.el.id=n,t.scriptContainer.html('');var r=document.createElement('script'),i=e.getScriptString(),o=e.get('script-props')?i:"function(){\n".concat(i,"\n;}"),a=JSON.stringify(e.__getScriptProps());r.innerHTML="\n setTimeout(function() {\n var item = document.getElementById('".concat(n,"');\n if (!item) return;\n (").concat(o,".bind(item))(").concat(a,")\n }, 1);"),setTimeout((function(){var e=t.scriptContainer;e&&e.get(0).appendChild(r)}),0)},getJsContainer:function(t){var e=this.getFrameView(t);return e&&e.getJsContainer()},getFrameView:function(t){return t&&t._getFrame()||this.em.get('currentFrame')},render:function(){var t=this.el,e=this.$el,n=this.ppfx,r=this.model,i=this.em,o=this.frames,a=i.get('CssComposer'),s=r.get('wrapper');e.html(this.template());var l=e.find('[data-frames]');this.framesArea=l.get(0),this.wrapper=s,s&&'function'==typeof s.render&&r.get('frame').set({wrapper:s,root:s.getWrapper(),styles:a.getAll()});var c=e.find('[data-tools]');this.toolsWrapper=c.get(0),c.append("\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n "));var u=t.querySelector("#".concat(n,"tools"));this.hlEl=t.querySelector(".".concat(n,"highlighter")),this.badgeEl=t.querySelector(".".concat(n,"badge")),this.placerEl=t.querySelector(".".concat(n,"placeholder")),this.ghostEl=t.querySelector(".".concat(n,"ghost")),this.toolbarEl=t.querySelector(".".concat(n,"toolbar")),this.resizerEl=t.querySelector(".".concat(n,"resizer")),this.offsetEl=t.querySelector(".".concat(n,"offset-v")),this.fixedOffsetEl=t.querySelector(".".concat(n,"offset-fixed-v")),this.toolsGlobEl=t.querySelector(".".concat(n,"tools-gl")),this.toolsEl=u,this.el.className=this.className;var d=r.get('frames');return d.listenToLoad(),o.render(),i.setCurrentFrame(d.at(0).view),l.append(o.el),this.frame=d.at(0).view,this}});function H(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function $(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};n=$($($({},p),r),{},{module:this}),this.em=n.em;var i=n.pStylePrefix;i&&(n.stylePrefix=i+n.stylePrefix),t=new C(r),e=new z({model:t,config:n});var o=n.em.get('DomComponents');return o&&this.setWrapper(o),this.model=t,this.startAutoscroll=this.startAutoscroll.bind(this),this.stopAutoscroll=this.stopAutoscroll.bind(this),this},getConfig:function(){return n},setWrapper:function(e){t.set('wrapper',e)},getElement:function(){return e.el},getFrame:function(e){return e?this.getFrames()[e]:t.get('frame')},getFrameEl:function(){var t=e.frame;return t&&t.el},getFramesEl:function(){return e.framesArea},getWindow:function(){return this.getFrameEl().contentWindow},getDocument:function(){var t=this.getFrameEl();return t&&t.contentDocument},getBody:function(){var t=this.getDocument();return t&&t.body},getWrapperEl:function(){var t=this.getBody();return t&&t.querySelector('#wrapper')},_getCompFrame:function(t){return t&&t._getFrame()},_getLocalEl:function(t,e,n){var r=t,i=this._getCompFrame(e);return r=i?i[n]():r},getGlobalToolsEl:function(){return e.toolsGlobEl},getToolsEl:function(t){return this._getLocalEl(e.toolsEl,t,'getToolsEl')},getHighlighter:function(t){return this._getLocalEl(e.hlEl,t,'getHighlighter')},getBadgeEl:function(t){return this._getLocalEl(e.badgeEl,t,'getBadgeEl')},getPlacerEl:function(){return e.placerEl},getGhostEl:function(){return e.ghostEl},getToolbarEl:function(){return e.toolbarEl},getResizerEl:function(){return e.resizerEl},getOffsetViewerEl:function(t){return this._getLocalEl(e.offsetEl,t,'getOffsetViewerEl')},getFixedOffsetViewerEl:function(){return e.fixedOffsetEl},render:function(){return e.render().el},getOffset:function(){var t=this.offset(this.getFrameEl()),e=this.offset(this.getElement());return{top:t.top-e.top,left:t.left-e.left}},offset:function(t){return e.offset(t)},setCustomBadgeLabel:function(t){n.customBadgeLabel=t},getElementPos:function(t,n){return e.getElementPos(t,n)},getElementOffsets:function(t){return e.getElementOffsets(t)},getRect:function(){var t=e.getPosition(),n=t.top,r=t.left;return $($({},e.getCanvasOffset()),{},{topScroll:n,leftScroll:r})},getTargetToElementDim:function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i||{},a=e.getPosition();if(a){var s=o.elPos||e.getElementPos(r),l=i.toRight||0,c=o.targetHeight||t.offsetHeight,u=o.targetWidth||t.offsetWidth,d=o.event||null,h=s.top-c,f=s.left;f+=l?s.width:0;var p=(f=l?f-u:f)s.top+s.height?s.top+s.height:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:a.top,canvasLeft:a.left,canvasWidth:a.width,canvasHeight:a.height};return d&&n.em&&n.em.trigger(d,v),v}},canvasRectOffset:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=function(t){var e=t.defaultView;return e&&e.frameElement},o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0,a=n.em.getZoomDecimal(),s=e?'top':'left',l=t.ownerDocument,c=r.offset?i(l):{},u=c.offsetTop,d=void 0===u?0:u,h=c.offsetLeft,f=void 0===h?0:h,p=l.body||{},g=p.scrollTop,v=void 0===g?0:g,m=p.scrollLeft,b=void 0===m?0:m,y=e?v:b,w=e?d:f;return o[s]-(y-w)*a};return{top:o(t,1,e),left:o(t,0,e)}},getTargetToElementFixed:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.pos||this.getElementPos(t),i=n.canvasOff||this.canvasRectOffset(t,r),o=e.offsetHeight||0,a=e.offsetWidth||0,s=r.left+r.width,l=this.getCanvasView(),c=l.getPosition(),u=l.getFrameOffset(t),d=n.event,h=-o,f=r.width-a;f=r.left<-f?-r.left:f,f=s>c.width?f-(s-c.width):f;var p=r.height+o,g=p1&&void 0!==arguments[1]?arguments[1]:{},n=Object(s["e"])(t),r=n&&Object(s["j"])(n);r&&r.scrollIntoView(e)},startAutoscroll:function(t){var e=t&&t.view||this.em.getCurrentFrame();e&&e.startAutoscroll()},stopAutoscroll:function(t){var e=t&&t.view||this.em.getCurrentFrame();e&&e.stopAutoscroll()},postRender:function(){Object(s["k"])(n.em)&&(this.droppable=new f(n.em))},setZoom:function(e){return t.set('zoom',parseFloat(e)),this},getZoom:function(){return parseFloat(t.get('zoom'))},getZoomDecimal:function(){return this.getZoom()/100},getZoomMultiplier:function(){var t=this.getZoomDecimal();return t?1/t:1},toggleFramesEvents:function(t){this.getFramesEl().style.pointerEvents=t?'':'none'},getFrameWrapperEl:function(){return e.frame.getWrapper()},getFrames:function(){return t.get('frames').map((function(t){return t}))},addFrame:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.get('frames').add($({},e),$($({},n),{},{em:this.em}))},destroy:function(){var r=this;t.stopListening(),e.remove(),[n,t,e].forEach((function(t){return{}})),['em','model','droppable'].forEach((function(t){return r[t]={}}))}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(11),a={stylePrefix:'gjs-',components:'',style:'',fromElement:0,noticeOnUnload:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:'900px',width:'100%',log:['warning','error'],baseCss:"\n * {\n box-sizing: border-box;\n }\n html, body, [data-gjs-type=wrapper] {\n min-height: 100%;\n }\n body {\n margin: 0;\n height: 100%;\n background-color: #fff\n }\n [data-gjs-type=wrapper] {\n overflow: auto;\n overflow-x: hidden;\n }\n\n * ::-webkit-scrollbar-track {\n background: rgba(0, 0, 0, 0.1)\n }\n\n * ::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2)\n }\n\n * ::-webkit-scrollbar {\n width: 10px\n }\n ",protectedCss:'* { box-sizing: border-box; } body {margin: 0;}',canvasCss:'',defaultCommand:'select-comp',showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:'max-width',tagVarStart:'{[ ',tagVarEnd:' ]}',keepEmptyTextNodes:0,jsInHtml:!0,nativeDnD:1,multipleSelection:1,exportWrapper:0,wrapperIsBody:1,optsHtml:{},optsCss:{},avoidInlineStyle:1,avoidDefaults:1,clearStyles:0,dragMode:0,listenToEl:[],cssIcons:'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css',el:'',i18n:{},undoManager:{},assetManager:{},canvas:{},layers:{},storageManager:{},richTextEditor:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{devices:[{id:'desktop',name:'Desktop',width:''},{id:'tablet',name:'Tablet',width:'768px',widthMedia:'992px'},{id:'mobileLandscape',name:'Mobile landscape',width:'568px',widthMedia:'768px'},{id:'mobilePortrait',name:'Mobile portrait',width:'320px',widthMedia:'480px'}]},styleManager:{sectors:[{name:'General',open:!1,buildProps:['float','display','position','top','right','left','bottom']},{name:'Flex',open:!1,buildProps:['flex-direction','flex-wrap','justify-content','align-items','align-content','order','flex-basis','flex-grow','flex-shrink','align-self']},{name:'Dimension',open:!1,buildProps:['width','height','max-width','min-height','margin','padding']},{name:'Typography',open:!1,buildProps:['font-family','font-size','font-weight','letter-spacing','color','line-height','text-align','text-shadow'],properties:[{property:'text-align',list:[{value:'left',className:'fa fa-align-left'},{value:'center',className:'fa fa-align-center'},{value:'right',className:'fa fa-align-right'},{value:'justify',className:'fa fa-align-justify'}]}]},{name:'Decorations',open:!1,buildProps:['border-radius-c','background-color','border-radius','border','box-shadow','background']},{name:'Extra',open:!1,buildProps:['transition','perspective','transform']}]},blockManager:{},traitManager:{},textViewCode:'Code',keepUnusedStyles:0,multiFrames:0},s=n(0),l=n(1),c=n.n(l),u=n(3);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};this.config=e,this.set('Config',e),this.set('modules',[]),this.set('toLoad',[]),this.set('storables',[]),this.set('selected',new v),this.set('dmode',e.dragMode);var n=e.el,r=e.log,i=!0===r?Object(s["keys"])(m):Object(s["isArray"])(r)?r:[];Object(s["bindAll"])(this,'initBaseColorPicker'),n&&e.fromElement&&(this.config.components=n.innerHTML),this.attrsOrig=n?Object(s["toArray"])(n.attributes).reduce((function(t,e){return t[e.nodeName]=e.nodeValue,t}),{}):'',g.forEach((function(e){return t.loadModule(e)})),this.on('change:componentHovered',this.componentHovered,this),this.on('change:changesCount',this.updateChanges,this),i.forEach((function(e){return t.listenLog(e)})),[{from:'change:selectedComponent',to:'component:toggled'}].forEach((function(e){var n=e.from,r=e.to;t.listenTo(t,n,(function(){for(var e=arguments.length,i=new Array(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:null,n=this.get('StorageManager');this.get('toLoad').forEach((function(t){t.onLoad()}));var r=function(){t.get('modules').forEach((function(e){return e.postLoad&&e.postLoad(t)})),e&&e()};n&&n.canAutoload()?this.load(r):r()},updateChanges:function(){var t=this,e=this.get('StorageManager'),n=this.get('changesCount');p&&clearTimeout(p),p=setTimeout((function(){return t.trigger('update')})),this.config.noticeOnUnload&&(window.onbeforeunload=n?function(t){return 1}:null),e.isAutosave()&&n>=e.getStepsBeforeSave()&&this.store()},loadModule:function(t){var e=this.config,n=new(t.default||t),r=n.name.charAt(0).toLowerCase()+n.name.slice(1),i=Object(s["isUndefined"])(e[r])?e[n.name]:e[r],o=i||{},a=this.get('StorageManager');if(o.pStylePrefix=e.pStylePrefix||'',Object(s["isUndefined"])(i)||i||(o._disable=1),n.storageKey&&n.store&&n.load&&a){o.stm=a;var l='domComponents'==r?'unshift':'push';this.get('storables')[l](n)}return o.em=this,n.init(h({},o)),!n.private&&this.set(n.name,n),n.onLoad&&this.get('toLoad').push(n),this.get('modules').push(n),this},init:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.destroyed&&(this.initialize(e),this.destroyed=0),this.set('Editor',t)},getEditor:function(){return this.get('Editor')},handleUpdates:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.temporary||r.noCount||r.avoidStore||(f&&clearTimeout(f),f=setTimeout((function(){n.set('changesCount',n.get('changesCount')+1,r)}),0))},componentHovered:function(t,e,n){var r=this.previous('componentHovered');r&&this.trigger('component:unhovered',r,n),e&&this.trigger('component:hovered',e,n)},getSelected:function(){return this.get('selected').last()},getSelectedAll:function(){var t=this.get('selected');return t&&t.models||[]},setSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.event,i=r&&(r.ctrlKey||r.metaKey),a=r||{},l=a.shiftKey,c=Object(s["isArray"])(t),d=c?t:[t],h=this.get('selected'),f=this.getConfig('multipleSelection');c&&this.removeSelected(h.filter((function(t){return!Object(s["contains"])(d,t)}))),d.forEach((function(t){var r=Object(u["g"])(t,o["default"]);if(!r||r.get('selectable')){if(i&&f)return e.toggleSelected(r);if(l&&f){e.clearSelection(e.get('Canvas').getWindow());var a,d,p=r.collection,g=r.index();if(e.getSelectedAll().forEach((function(t){var e=t.collection,n=t.index();e===p&&(ng&&(d=Object(s["isUndefined"])(d)?n:Math.min(d,n)))})),!Object(s["isUndefined"])(a))for(;a!==g;)e.addSelected(p.at(a)),a++;if(!Object(s["isUndefined"])(d))for(;d!==g;)e.addSelected(p.at(d)),d--;return e.addSelected(r)}!c&&e.removeSelected(h.filter((function(t){return t!==r}))),e.addSelected(r,n),r}}))},addSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(u["g"])(t,o["default"]),i=Object(s["isArray"])(r)?r:[r];i.forEach((function(t){if(!t||t.get('selectable')){var r=e.get('selected');n.forceChange&&r.remove(t,n),r.push(t,n)}}))},removeSelected:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.get('selected').remove(Object(u["g"])(t,o["default"]),e)},toggleSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(u["g"])(t,o["default"]),i=Object(s["isArray"])(r)?r:[r];i.forEach((function(t){e.get('selected').contains(t)?e.removeSelected(t,n):e.addSelected(t,n)}))},setHovered:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(u["g"])(t,o["default"]);n&&!n.get('hoverable')||(e.forceChange&&this.set('componentHovered',''),this.set('componentHovered',n,e))},getHovered:function(){return this.get('componentHovered')},setComponents:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.get('DomComponents').setComponents(t,e)},getComponents:function(){var t=this.get('DomComponents'),e=this.get('CodeManager');if(t&&e){var n=t.getComponents();return e.getCode(n,'json')}},setStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.get('CssComposer');return n.clear(e),n.getAll().add(t,e),this},getStyle:function(){return this.get('CssComposer').getAll()},setState:function(t){return this.set('state',t),this},getState:function(){return this.get('state')||''},getHtml:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.config,n=e.optsHtml,r=e.exportWrapper,i=e.wrapperIsBody,o=e.jsInHtml?this.getJs():'',a=this.get('DomComponents').getComponent(),s=this.get('CodeManager').getCode(a,'html',h(h({exportWrapper:r,wrapperIsBody:i},n),t));return s+=o?"