diff --git a/README.md b/README.md index 9adf9e201..467d15754 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,23 @@ Newsletter Demo - http://grapesjs.com/demo-newsletter-editor.html +## Table of contents + +* [Features](#features) +* [Installation](#installation) +* [Development](#development) +* [Usage](#usage) +* [Documentation](#documentation) +* [API](#api) +* [Testing](#testing) +* [Plugins](#plugins) +* [Sponsors](#sponsors) +* [Support](#support) +* [License](#license) + + + + ## Features @@ -61,7 +78,7 @@ For development purpose you should follow instructions below. ## Development -GrapesJS uses [Webpack2](https://github.com/webpack/webpack) as a module bundler and [Babel](https://github.com/babel/babel) as a compiler. +GrapesJS uses [Webpack](https://github.com/webpack/webpack) as a module bundler and [Babel](https://github.com/babel/babel) as a compiler. Clone the repository and install all the necessary dependencies @@ -159,6 +176,23 @@ $ npm test +## Plugins + +### Extensions +* [grapesjs-plugin-export](https://github.com/artf/grapesjs-plugin-export) - Export GrapesJS templates in a zip archive +* [grapesjs-plugin-filestack](https://github.com/artf/grapesjs-plugin-filestack) - Add Filestack uploader in Asset Manager +* [grapesjs-plugin-ckeditor](https://github.com/artf/grapesjs-plugin-ckeditor) - Replaces the built-in RTE with CKEditor +* [grapesjs-aviary](https://github.com/artf/grapesjs-aviary) - Add the Aviary Image Editor +* [grapesjs-blocks-basic](https://github.com/artf/grapesjs-blocks-basic) - Basic set of blocks +* [grapesjs-plugin-forms](https://github.com/artf/grapesjs-plugin-forms) - Set of form components and blocks +* [grapesjs-navbar](https://github.com/artf/grapesjs-navbar) - Simple navbar component + +### Presets +* [grapesjs-preset-newsletter](https://github.com/artf/grapesjs-preset-newsletter) - Newsletter Builder +* [grapesjs-mjml](https://github.com/artf/grapesjs-mjml) - Newsletter Builder with MJML components + + + ## Sponsors The project is sponsored by @@ -171,11 +205,15 @@ The project is sponsored by ## Support -If you like the project support it with a donation of your choice. +If you like the project support it with a donation of your choice or become a backer/sponsor via [Open Collective](https://opencollective.com/grapesjs) [![PayPalMe](http://grapesjs.com/img/ppme.png)](https://paypal.me/grapesjs) + + + + diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index 28f9b54d9..0ba2a9f38 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -1,4 +1,4 @@ .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 *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;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;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:-webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-moz-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-o-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-ms-linear-gradient(left, #fff, rgba(204,154,129,0));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:-webkit-gradient(linear, 0 100%, 0 0, from(#000), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-o-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom, #000, rgba(204,154,129,0));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:-moz-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-ms-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-o-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-webkit-gradient(linear, left top, left bottom, from(red), color-stop(0.17, #ff0), color-stop(0.33, lime), color-stop(0.5, cyan), color-stop(0.67, blue), color-stop(0.83, #f0f), to(red));background:-webkit-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:linear-gradient(to bottom, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 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;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-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:#eeeeee;background-image:-webkit-linear-gradient(top, #eee, #ccc);background-image:-moz-linear-gradient(top, #eee, #ccc);background-image:-ms-linear-gradient(top, #eee, #ccc);background-image:-o-linear-gradient(top, #eee, #ccc);background-image:linear-gradient(to bottom, #eee, #ccc);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:#dddddd;background-image:-webkit-linear-gradient(top, #ddd, #bbb);background-image:-moz-linear-gradient(top, #ddd, #bbb);background-image:-ms-linear-gradient(top, #ddd, #bbb);background-image:-o-linear-gradient(top, #ddd, #bbb);background-image:linear-gradient(to bottom, #ddd, #bbb);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;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee}.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==)}/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.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-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;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:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{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:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.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:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display: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:-30px}.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{-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;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;-webkit-font-variant-ligatures:none;font-variant-ligatures:none}.CodeMirror-wrap pre{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;overflow:auto}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;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::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:#ffa;background: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("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.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,.gjs-clm-tags #gjs-clm-close{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-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bg-main,.gjs-off-prv,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-pn-panel,.gjs-nv-item .gjs-nv-title-c,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-btn-prim,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.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-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.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,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;cursor:pointer;padding:0.5em;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-input,.gjs-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);border-radius:2px;box-shadow:1px 1px 0 rgba(255,255,255,0.1);box-sizing:border-box;color:#ddd;padding:0.5em 1em}div.gjs-select{padding:0}.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,0.7)}.gjs-input:focus,.gjs-select:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.3);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.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;pointer-events:none}.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{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;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:yellow}.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,0.2);border:none;opacity:0;transition:opacity 0.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-mdl-dialog .gjs-mdl-btn-close,.gjs-am-assets-cont #gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-assets-cont #gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.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-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.3);right:0;width:15%;z-index:4}.gjs-pn-panel#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,0.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-nv-navigator{position:relative;height:100%}.gjs-nv-navigator #gjs-nv-placeholder{width:100%;position:absolute}.gjs-nv-navigator #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-nv-navigator #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-nv-navigator .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-nv-navigator .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-nv-navigator .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-nv-navigator .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:5px;cursor:pointer;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{background-color:rgba(0,0,0,0.1);font-size:11px;letter-spacing:1px;padding:3px 10px 5px 30px;border-bottom:1px solid rgba(0,0,0,0.3);border-top:1px solid rgba(255,255,255,0.1);display:flex;align-items:center}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.3)}.gjs-nv-item>.gjs-nv-children{margin-left:7px;display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:10px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.btn.expand,.gjs-nv-navigator .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.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.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-field{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);border-radius:2px;box-sizing:border-box;padding:0;position:relative}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:rgba(255,255,255,0.7);border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:3px 4px 4px;z-index:1}.gjs-field textarea{resize:vertical}.gjs-field select{height:20px;padding-right:12px}.gjs-field option{padding:3px 0}.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:7px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.3);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,0.3);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.3)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;right:0;top:0}.gjs-field-units select{padding:0 12px 0 0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrows{z-index:10;cursor:ns-resize;height:100%;position:absolute;right:0;top:0;width:9px}.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,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.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}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-5px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);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,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.15);border-radius:1px;height:2px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.15);border-radius:1px;height:2px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.15);border-radius:1px;height:2px}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.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,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;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-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.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-header{font-size:11px;font-weight:lighter;padding:10px}.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-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.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-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-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field 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-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-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-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus,.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input: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-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,0.7);cursor:pointer}.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-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-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow,.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-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-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-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{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-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-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-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-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.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-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-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-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.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-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-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.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-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.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-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.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-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow{bottom:7px}.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-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select,.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-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{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.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-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-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{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-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select 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-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select 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-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,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-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-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-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-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,0.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-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-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,0.3)}.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,0.3)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.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.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.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-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list{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,0.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.3),1px 1px 0 rgba(43,43,43,0.3) 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,0.3);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%;padding:0 5px}.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,0.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,0.05);padding:3px 5px}.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}.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;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,0.055);border-radius:2px;box-shadow:1px 1px 0 rgba(0,0,0,0.2),1px 1px 0 rgba(255,255,255,0.055) inset;margin:2px;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-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview{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:white;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,0.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-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.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,0.3);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-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.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-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.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,0.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-am-assets{height:290px;overflow:auto;clear:both}.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-add-field input{padding:6px}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-assets-cont #gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-assets-cont #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-assets-cont #gjs-am-preview-bg{position:absolute;height:100%;width:100%;opacity:.5;filter:alpha(opacity=50);z-index:0}.gjs-am-assets-cont .gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont .gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.3);padding:5px;cursor:pointer;position:relative}.gjs-am-assets-cont .gjs-am-asset:hover #gjs-am-close{display:block}.gjs-am-assets-cont #gjs-am-close{position:absolute;right:5px;top:0;display:none}.gjs-am-assets-cont #gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-assets-cont #gjs-am-meta>div{margin-bottom:5px}.gjs-am-assets-cont #gjs-am-meta #gjs-am-dimensions{font-size:10px;opacity:.5;filter:alpha(opacity=50)}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,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,0.3)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.3);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.3);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.3);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.3)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 7px rgba(0,0,0,0.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.3)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.3);border-color:rgba(0,0,0,0.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} + */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.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-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;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:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{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:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.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:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display: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:-30px}.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{-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;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;-webkit-font-variant-ligatures:none;font-variant-ligatures:none}.CodeMirror-wrap pre{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;overflow:auto}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;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::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:#ffa;background: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("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-pn-panel,.gjs-nv-item .gjs-nv-title-c,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-btn-prim,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.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-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-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,.gjs-clm-tags #gjs-clm-close{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-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{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,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;cursor:pointer;padding:0.5em;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-input,.gjs-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);border-radius:2px;box-shadow:1px 1px 0 rgba(255,255,255,0.1);box-sizing:border-box;color:#ddd;padding:0.5em 1em}div.gjs-select{padding:0}.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,0.7)}.gjs-input:focus,.gjs-select:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.3);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.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;pointer-events:none}.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{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;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:yellow}.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,0.2);border:none;opacity:0;transition:opacity 0.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-mdl-dialog .gjs-mdl-btn-close,.gjs-am-assets-cont #gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-assets-cont #gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.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-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.3);right:0;width:15%;z-index:4}.gjs-pn-panel#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,0.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-nv-navigator{position:relative;height:100%}.gjs-nv-navigator #gjs-nv-placeholder{width:100%;position:absolute}.gjs-nv-navigator #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-nv-navigator #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-nv-navigator .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-nv-navigator .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-nv-navigator .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-nv-navigator .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:5px;cursor:pointer;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{background-color:rgba(0,0,0,0.1);font-size:11px;letter-spacing:1px;padding:3px 10px 5px 30px;border-bottom:1px solid rgba(0,0,0,0.3);border-top:1px solid rgba(255,255,255,0.1);display:flex;align-items:center}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.3)}.gjs-nv-item>.gjs-nv-children{margin-left:7px;display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:10px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.btn.expand,.gjs-nv-navigator .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.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.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-field{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);border-radius:2px;box-sizing:border-box;padding:0;position:relative}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:rgba(255,255,255,0.7);border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:3px 4px 4px;z-index:1}.gjs-field textarea{resize:vertical}.gjs-field select{height:20px;padding-right:12px}.gjs-field option{padding:3px 0}.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:7px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.3);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,0.3);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.3)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;right:0;top:0}.gjs-field-units select{padding:0 12px 0 0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrows{z-index:10;cursor:ns-resize;height:100%;position:absolute;right:0;top:0;width:9px}.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,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.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}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-5px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);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,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.15);border-radius:1px;height:2px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.15);border-radius:1px;height:2px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.15);border-radius:1px;height:2px}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.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,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;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-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.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-header{font-size:11px;font-weight:lighter;padding:10px}.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-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.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-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-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field 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-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-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-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field 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-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-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,0.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-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-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-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-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-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-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-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-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-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.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-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-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-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,0.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-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-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-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.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-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-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{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-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select 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-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select 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-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,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-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-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-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-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,0.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-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-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,0.3)}.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,0.3)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.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.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{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,0.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.3),1px 1px 0 rgba(43,43,43,0.3) 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,0.3);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%;padding:0 5px}.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,0.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,0.05);padding:3px 5px}.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}.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;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,0.055);border-radius:2px;box-shadow:1px 1px 0 rgba(0,0,0,0.2),1px 1px 0 rgba(255,255,255,0.055) inset;margin:2px;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:white;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,0.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-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.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,0.3);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-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.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-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.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,0.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.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:5;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both}.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-add-field input{padding:6px}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-assets-cont #gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-assets-cont #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-assets-cont #gjs-am-preview-bg{position:absolute;height:100%;width:100%;opacity:.5;filter:alpha(opacity=50);z-index:0}.gjs-am-assets-cont .gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont .gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.3);padding:5px;cursor:pointer;position:relative}.gjs-am-assets-cont .gjs-am-asset:hover #gjs-am-close{display:block}.gjs-am-assets-cont #gjs-am-close{position:absolute;right:5px;top:0;display:none}.gjs-am-assets-cont #gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-assets-cont #gjs-am-meta>div{margin-bottom:5px}.gjs-am-assets-cont #gjs-am-meta #gjs-am-dimensions{font-size:10px;opacity:.5;filter:alpha(opacity=50)}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,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,0.3)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.3);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.3);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.3);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.3)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 7px rgba(0,0,0,0.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.3)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.3);border-color:rgba(0,0,0,0.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} diff --git a/dist/grapes.min.js b/dist/grapes.min.js index 6aeb6e4ff..e69bb948c 100644 --- a/dist/grapes.min.js +++ b/dist/grapes.min.js @@ -1,5 +1,5 @@ -/*! grapesjs - 0.8.19 */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("jQuery")):"function"==typeof define&&define.amd?define(["jQuery"],e):"object"==typeof exports?exports.grapesjs=e(require("jQuery")):t.grapesjs=e(t.jQuery)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};return e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=132)}([function(t,e,i){(function(n){var r,s;!function(o){var a="object"==typeof self&&self.self===self&&self||"object"==typeof n&&n.global===n&&n;r=[i(1),i(11),e],void 0!==(s=function(t,e,i){a.Backbone=o(a,i,t,e)}.apply(e,r))&&(t.exports=s)}(function(t,e,i,n){var r=t.Backbone,s=Array.prototype.slice;e.VERSION="1.3.3",e.$=n,e.noConflict=function(){return t.Backbone=r,this},e.emulateHTTP=!1,e.emulateJSON=!1;var o=function(t,e,n){switch(t){case 1:return function(){return i[e](this[n])};case 2:return function(t){return i[e](this[n],t)};case 3:return function(t,r){return i[e](this[n],l(t,this),r)};case 4:return function(t,r,s){return i[e](this[n],l(t,this),r,s)};default:return function(){var t=s.call(arguments);return t.unshift(this[n]),i[e].apply(i,t)}}},a=function(t,e,n){i.each(e,function(e,r){i[r]&&(t.prototype[r]=o(e,r,n))})},l=function(t,e){return i.isFunction(t)?t:i.isObject(t)&&!e._isModel(t)?c(t):i.isString(t)?function(e){return e.get(t)}:t},c=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}},u=e.Events={},h=/\s+/,d=function(t,e,n,r,s){var o,a=0;if(n&&"object"==typeof n){void 0!==r&&"context"in s&&void 0===s.context&&(s.context=r);for(o=i.keys(n);athis.length&&(r=this.length),r<0&&(r+=this.length+1);var s,o,a=[],l=[],c=[],u=[],h={},d=e.add,f=e.merge,p=e.remove,g=!1,m=this.comparator&&null==r&&!1!==e.sort,v=i.isString(this.comparator)?this.comparator:null;for(o=0;o7),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(I,"/"),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 n=document.body,r=n.insertBefore(this.iframe,n.firstChild).contentWindow;r.document.open(),r.document.close(),r.location.hash="#"+this.fragment}var s=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?s("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?s("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),O.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),i.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!O.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var i=this.root;""!==t&&"?"!==t.charAt(0)||(i=i.slice(0,-1)||"/");var n=i+t;if(t=this.decodeFragment(t.replace(_,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var r=this.iframe.contentWindow;e.replace||(r.document.open(),r.document.close()),this._updateHash(r.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,"");t.replace(n+"#"+e)}else t.hash="#"+e}}),e.history=new O;var z=function(t,e){var n,r=this;return n=t&&i.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},i.extend(n,r,e),n.prototype=i.create(r.prototype,t),n.prototype.constructor=n,n.__super__=r.prototype,n};b.extend=x.extend=P.extend=S.extend=O.extend=z;var F=function(){throw new Error('A "url" property or function must be specified')},H=function(t,e){var i=e.error;e.error=function(n){i&&i.call(e.context,t,n,e),t.trigger("error",t,n,e)}};return e})}).call(e,i(41))},function(t,e,i){var n,r;(function(){function i(t){function e(e,i,n,r,s,o){for(;s>=0&&s0?0:a-1;return arguments.length<3&&(r=i[o?o[l]:l],l+=t),e(i,n,r,o,l,a)}}function s(t){return function(e,i,n){i=S(i,n);for(var r=$(e),s=t>0?0:r-1;s>=0&&s0?o=s>=0?s:Math.max(s+a,o):a=s>=0?Math.min(s+1,a):s+a+1;else if(i&&s&&a)return s=i(n,r),n[s]===r?s:-1;if(r!==r)return s=e(p.call(n,o,a),C.isNaN),s>=0?s+o:-1;for(s=t>0?o:a-1;s>=0&&s=0&&e<=P};C.each=C.forEach=function(t,e,i){e=k(e,i);var n,r;if(L(t))for(n=0,r=t.length;n=0},C.invoke=function(t,e){var i=p.call(arguments,2),n=C.isFunction(e);return C.map(t,function(t){var r=n?e:t[e];return null==r?r:r.apply(t,i)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,i){var n,r,s=-1/0,o=-1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;as&&(s=n)}else e=S(e,i),C.each(t,function(t,i,n){((r=e(t,i,n))>o||r===-1/0&&s===-1/0)&&(s=t,o=r)});return s},C.min=function(t,e,i){var n,r,s=1/0,o=1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;an||void 0===i)return 1;if(ie?(o&&(clearTimeout(o),o=null),a=c,s=t.apply(n,r),o||(n=r=null)):o||!1===i.trailing||(o=setTimeout(l,u)),s}},C.debounce=function(t,e,i){var n,r,s,o,a,l=function(){var c=C.now()-o;c=0?n=setTimeout(l,e-c):(n=null,i||(a=t.apply(s,r),n||(s=r=null)))};return function(){s=this,r=arguments,o=C.now();var c=i&&!n;return n||(n=setTimeout(l,e)),c&&(a=t.apply(s,r),s=r=null),a}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.compose=function(){var t=arguments,e=t.length-1;return function(){for(var i=e,n=t[e].apply(this,arguments);i--;)n=t[i].call(this,n);return n}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var i;return function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=null),i}},C.once=C.partial(C.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var i in t)C.has(t,i)&&e.push(i);return D&&a(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var i in t)e.push(i);return D&&a(t,e),e},C.values=function(t){for(var e=C.keys(t),i=e.length,n=Array(i),r=0;r":">",'"':""","'":"'","`":"`"},F=C.invert(z),H=function(t){var e=function(e){return t[e]},i="(?:"+C.keys(t).join("|")+")",n=RegExp(i),r=RegExp(i,"g");return function(t){return t=null==t?"":""+t,n.test(t)?t.replace(r,e):t}};C.escape=H(z),C.unescape=H(F),C.result=function(t,e,i){var n=null==t?void 0:t[e];return void 0===n&&(n=i),C.isFunction(n)?n.call(t):n};var R=0;C.uniqueId=function(t){var e=++R+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},W=/\\|'|\r|\n|\u2028|\u2029/g,j=function(t){return"\\"+B[t]};C.template=function(t,e,i){!e&&i&&(e=i),e=C.defaults({},e,C.templateSettings);var n=RegExp([(e.escape||V).source,(e.interpolate||V).source,(e.evaluate||V).source].join("|")+"|$","g"),r=0,s="__p+='";t.replace(n,function(e,i,n,o,a){return s+=t.slice(r,a).replace(W,j),r=a+e.length,i?s+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'":n?s+="'+\n((__t=("+n+"))==null?'':__t)+\n'":o&&(s+="';\n"+o+"\n__p+='"),e}),s+="';\n",e.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{var o=new Function(e.variable||"obj","_",s)}catch(t){throw t.source=s,t}var a=function(t){return o.call(this,t,C)};return a.source="function("+(e.variable||"obj")+"){\n"+s+"}",a},C.chain=function(t){var e=C(t);return e._chain=!0,e};var U=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var i=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return f.apply(t,arguments),U(this,i.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];C.prototype[t]=function(){var i=this._wrapped;return e.apply(i,arguments),"shift"!==t&&"splice"!==t||0!==i.length||delete i[0],U(this,i)}}),C.each(["concat","join","slice"],function(t){var e=u[t];C.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},n=[],void 0!==(r=function(){return C}.apply(e,n))&&(t.exports=r)}).call(this)},function(t,e,i){"use strict";(function(e){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=i(0),s=i(111),o=i(32),a=i(38);t.exports=r.Model.extend({defaults:{tagName:"div",type:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,highlightable:!0,copyable:!0,resizable:!1,editable:!1,hiddenLayer:!1,void:!1,state:"",status:"",content:"",style:{},attributes:"",classes:"",script:"",traits:["id","title"],toolbar:null,previousModel:"",mirror:""},initialize:function(t,e){e&&e.config&&e.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.opt=e,this.sm=e?e.sm||{}:{},this.config=t||{},this.defaultC=this.config.components||[],this.defaultCl=this.normalizeClasses(this.get("classes")||this.config.classes||[]),this.components=new s(this.defaultC,e),this.components.parent=this,this.listenTo(this,"change:script",this.scriptUpdated),this.set("attributes",this.get("attributes")||{}),this.set("components",this.components),this.set("classes",new o(this.defaultCl));var i=new a;i.setTarget(this),i.add(this.get("traits")),this.set("traits",i),this.initToolbar(),["stylable"].forEach(function(t){var e=this.get(t);if("string"==typeof e){var i=e.split(",").map(function(t){return t.trim()});this.set(t,i)}},this),this.set("status",""),this.init()},init:function(){},scriptUpdated:function(){this.set("scriptUpdated",1)},initToolbar:function(){var t=this;if(!t.get("toolbar")){var e=[];t.get("draggable")&&e.push({attributes:{class:"fa fa-arrows"},command:"tlb-move"}),t.get("copyable")&&e.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),t.get("removable")&&e.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),t.set("toolbar",e)}},loadTraits:function(t){var e=new a;e.setTarget(this),e.add(t),this.set("traits",e)},normalizeClasses:function(t){var e=[];if(this.sm.get){var i=this.sm.get("SelectorManager");if(i)return t.forEach(function(t){var n="";n="string"==typeof t?t:t.name;var r=i.add(n);e.push(r)}),e}},clone:function(t){var i=e.clone(this.attributes),n=this.get("components"),r=this.get("traits"),s=this.get("classes");return i.components=[],i.classes=[],i.traits=[],n.each(function(t,e){i.components[e]=t.clone(1)}),r.each(function(t,e){i.traits[e]=t.clone()}),s.each(function(t,e){i.classes[e]=t.get("name")}),i.status="",i.view="",t&&(this.opt.collection=null),new this.constructor(i,this.opt)},getName:function(){if(!this.name){var t=(this.cid.replace(/\D/g,""),this.get("type")),e=this.get("tagName");e="div"==e?"box":e,e=t||e,this.name=e.charAt(0).toUpperCase()+e.slice(1)}return this.name},getCurrentName:function(){return this.get("custom-name")||this.getName()},toHTML:function(t){var i="",r=this,s=r.get("tagName"),o=r.get("void"),a="",l="",c=this.getAttrToHTML();for(var u in c){var h=c[u];l+=void 0!==(void 0===h?"undefined":n(h))&&""!==h?" "+u+'="'+h+'"':""}var d="";return r.get("classes").each(function(t){d+=" "+t.get("name")}),d=""!==d?' class="'+d.trim()+'"':"",e.isEmpty(r.get("style"))||(a=' id="'+r.cid+'" '),i+="<"+s+d+a+l+(o?"/":"")+">"+r.get("content"),r.get("components").each(function(t){i+=t.toHTML()}),o||(i+=""),i},getAttrToHTML:function(){var t=this.get("attributes")||{};return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),i=0;i\n input-holder\'>\n \n
'),templateLabel:e.template('\n
\n
\n <%= label %>\n
\n
'),events:{change:"valueUpdated"},initialize:function(t){this.config=t.config||{},this.em=this.config.em,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange||{},this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{},this.defaultValue=this.model.get("defaults"),this.property=this.model.get("property"),this.input=this.$input=null,this.className=this.pfx+"property",this.inputHolderId="#"+this.pfx+"input-holder",this.sector=this.model.collection&&this.model.collection.sector,this.model.get("value")||this.model.set("value",this.model.get("defaults")),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(this.model,"destroy remove",this.remove),this.listenTo(this.model,"change:value",this.valueChanged),this.listenTo(this.model,"targetUpdated",this.targetUpdated),this.listenTo(this.model,"change:visible",this.updateVisibility)},getTarget:function(){return this.selectedComponent?this.selectedComponent:this.propTarget?this.propTarget.model:null},valueUpdated:function(){this.$input&&this.model.set("value",this.getInputValue())},targetUpdated:function(){this.selectedComponent=this.propTarget.model,this.helperComponent=this.propTarget.helper,this.checkVisibility(),this.getTarget()&&(this.sameValue()||this.renderInputRequest())},checkVisibility:function(){this.config.hideNotStylable&&(this.isTargetStylable()&&this.isComponentStylable()?this.show():this.hide(),this.sector&&this.sector.trigger("updateVisibility"))},sameValue:function(){return this.getComponentValue()==this.getValueForTarget()},getComponentValue:function(){var t=this.model,e=this.getTarget();if(e){var i=e.get("style")[this.property];if(this.componentValue=i||this.defaultValue+(this.unit||""),t.get("functionName")){var n=this.fetchFromFunction(this.componentValue);n&&(this.componentValue=n)}if(this.customValue&&"function"==typeof this.customValue){var r=t.collection.indexOf(t),s=this.customValue(this,r);s&&(this.componentValue=s)}return this.componentValue}},getTargetValue:function(t){var e,i=t||{},n=this.model,r=this.getTarget();return r?(e=r.get("style")[n.get("property")],e||i.ignoreDefault||(e=this.getDefaultValue()),e):e},getDefaultValue:function(){return this.model.get("defaults")},fetchFromFunction:function(t){return t.substring(t.indexOf("(")+1,t.lastIndexOf(")"))},tryFetchFromFunction:function(t){if(!this.model.get("functionName"))return t;var e=t.indexOf("(")+1,i=t.lastIndexOf(")");return t.substring(e,i)},getValueForTarget:function(){return this.model.get("value")},getInputValue:function(){return this.$input?this.$input.val():""},valueChanged:function(t,e,i){var n=this.getValueForTarget(),r=this.config.em,s=this.model;if(this.$input&&this.setValue(n),this.getTarget()&&this.isTargetStylable()&&this.isComponentStylable()){var o=this.getValueForTarget(),a=s.get("functionName");a&&(o=a+"("+o+")");var l=this.getTarget(),c=this.onChange;c&&"function"==typeof c?c(l,this,i):this.updateTargetStyle(o,null,i),r&&(r.trigger("component:update",s),r.trigger("component:styleUpdate",s),r.trigger("component:styleUpdate:"+s.get("property"),s))}},updateTargetStyle:function(t,i,n){var r=i||this.property,s=t||"",o=n?n.avoidStore:0,a=this.getTarget(),l=e.clone(a.get("style"));s?l[r]=s:delete l[r],a.set("style",l,{avoidStore:o}),this.helperComponent&&this.helperComponent.set("style",l,{avoidStore:o})},isTargetStylable:function(){var t=this.getTarget().get("stylable");return t instanceof Array&&(t=e.indexOf(t,this.property)>=0),t},isComponentStylable:function(){var t=this.em,i=t&&t.get("selectedComponent");if(!i)return!0;var n=i.get("stylable");return n instanceof Array&&(n=e.indexOf(n,this.property)>=0),n},setValue:function(t,e){var i=0===e?0:1,n=this.model.get("defaults"),r=this.model.get("value")||n;(t||i)&&(r=t),this.$input&&this.$input.val(r),this.model.set({value:r},{silent:!0})},updateVisibility:function(){this.el.style.display=this.model.get("visible")?"block":"none"},show:function(){this.model.set("visible",1)},hide:function(){this.model.set("visible",0)},renderLabel:function(){this.$el.html(this.templateLabel({pfx:this.pfx,ppfx:this.ppfx,icon:this.model.get("icon"),info:this.model.get("info"),label:this.model.get("name")}))},renderField:function(){this.renderTemplate(),this.renderInput(),delete this.componentValue},renderTemplate:function(){this.$el.append(this.template({pfx:this.pfx,ppfx:this.ppfx,icon:this.model.get("icon"),info:this.model.get("info"),label:this.model.get("name")}))},renderInput:function(){this.$input||(this.$input=$("",{placeholder:this.model.get("defaults"),type:"text"}),this.$el.find(this.inputHolderId).html(this.$input)),this.setValue(this.componentValue,0)},renderInputRequest:function(){this.renderInput()},cleanValue:function(){this.setValue("")},render:function(){return this.renderLabel(),this.renderField(),this.$el.attr("class",this.className),this}})}).call(e,i(1))},function(t,e,i){!function(e,i){t.exports=i()}(0,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function i(t,i){return e(t).appendChild(i)}function n(t,e,i,n){var r=document.createElement(t);if(i&&(r.className=i),n&&(r.style.cssText=n),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var s=0;s=e)return o+(e-s);o+=a-s,o+=i-o%i,s=a+1}}function h(){this.id=null}function d(t,e){for(var i=0;i=e)return n+Math.min(o,e-r);if(r+=s-n,r+=i-r%i,n=s+1,r>=e)return n}}function p(t){for(;Ao.length<=t;)Ao.push(g(Ao)+" ");return Ao[t]}function g(t){return t[t.length-1]}function m(t,e){for(var i=[],n=0;n"€"&&(t.toUpperCase()!=t.toLowerCase()||No.test(t))}function w(t,e){return e?!!(e.source.indexOf("\\w")>-1&&x(t))||e.test(t):x(t)}function C(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Oo.test(t)}function S(t,e,i){var r=this;this.input=i,r.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=n("div",null,"CodeMirror-code"),r.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=n("div",null,"CodeMirror-cursors"),r.measure=n("div",null,"CodeMirror-measure"),r.lineMeasure=n("div",null,"CodeMirror-measure"),r.lineSpace=n("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none"),r.mover=n("div",[n("div",[r.lineSpace],"CodeMirror-lines")],null,"position: relative"),r.sizer=n("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=n("div",null,null,"position: absolute; height: "+Mo+"px; width: 1px;"),r.gutters=n("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=n("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=n("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),no&&ro<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),so||to&&po||(r.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(r.wrapper):t(r.wrapper)),r.viewFrom=r.viewTo=e.first,r.reportedViewFrom=r.reportedViewTo=e.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,i.init(r)}function T(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 i=t;!i.lines;)for(var n=0;;++n){var r=i.children[n],s=r.chunkSize();if(e=t.first&&ei?O(i,T(t,i).text.length):R(e,T(t,e.line).text.length)}function R(t,e){var i=t.ch;return null==i||i>e?O(t.line,e):i<0?O(t.line,0):t}function V(t,e){for(var i=[],n=0;n=e:s.to>e);(n||(n=[])).push(new j(o,s.from,l?null:s.to))}}return n}function Y(t,e,i){var n;if(t)for(var r=0;r=e:s.to>e);if(a||s.from==e&&"bookmark"==o.type&&(!i||s.marker.insertLeft)){var l=null==s.from||(o.inclusiveLeft?s.from<=e:s.from0&&a)for(var w=0;w0)){var u=[l,1],h=D(c.from,a.from),f=D(c.to,a.to);(h<0||!o.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!o.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-1}}return r}function Q(t){var e=t.markedSpans;if(e){for(var i=0;i=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?D(c.to,i)>=0:D(c.to,i)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?D(c.from,n)<=0:D(c.from,n)<0)))return!0}}}function lt(t){for(var e;e=st(t);)t=e.find(-1,!0).line;return t}function ct(t){for(var e,i;e=ot(t);)t=e.find(1,!0).line,(i||(i=[])).push(t);return i}function ut(t,e){var i=T(t,e),n=lt(i);return i==n?e:$(n)}function ht(t,e){if(e>t.lastLine())return e;var i,n=T(t,e);if(!dt(t,n))return e;for(;i=ot(n);)n=i.find(1,!0).line;return $(n)+1}function dt(t,e){var i=Io&&e.markedSpans;if(i)for(var n=void 0,r=0;re.maxLineLength&&(e.maxLineLength=i,e.maxLine=t)})}function vt(t,e,i,n){if(!t)return n(e,i,"ltr");for(var r=!1,s=0;se||e==i&&o.to==e)&&(n(Math.max(o.from,e),Math.min(o.to,i),1==o.level?"rtl":"ltr"),r=!0)}r||n(e,i,"ltr")}function yt(t){return t.level%2?t.to:t.from}function bt(t){return t.level%2?t.from:t.to}function xt(t){var e=Et(t);return e?yt(e[0]):0}function wt(t){var e=Et(t);return e?bt(g(e)):t.text.length}function Ct(t,e,i){var n=t[0].level;return e==n||i!=n&&ee)return n;if(r.from==e||r.to==e){if(null!=i)return Ct(t,r.level,t[i].level)?(r.from!=r.to&&(_o=i),n):(r.from!=r.to&&(_o=n),i);i=n}}return i}function St(t,e,i,n){if(!n)return e+i;do{e+=i}while(e>0&&k(t.text.charAt(e)));return e}function Tt(t,e,i,n){var r=Et(t);if(!r)return Mt(t,e,i,n);for(var s=kt(r,e),o=r[s],a=St(t,e,o.level%2?-i:i,n);;){if(a>o.from&&a0==o.level%2?o.to:o.from);if(!(o=r[s+=i]))return null;a=i>0==o.level%2?St(t,o.to,-1,n):St(t,o.from,1,n)}}function Mt(t,e,i,n){var r=e+i;if(n)for(;r>0&&k(t.text.charAt(r));)r+=i;return r<0||r>t.text.length?null:r}function Et(t){var e=t.order;return null==e&&(e=t.order=zo(t.text)),e}function Pt(t,e){return t._handlers&&t._handlers[e]||Fo}function $t(t,e,i){if(t.removeEventListener)t.removeEventListener(e,i,!1);else if(t.detachEvent)t.detachEvent("on"+e,i);else{var n=t._handlers,r=n&&n[e];if(r){var s=d(r,i);s>-1&&(n[e]=r.slice(0,s).concat(r.slice(s+1)))}}}function Lt(t,e){var i=Pt(t,e);if(i.length)for(var n=Array.prototype.slice.call(arguments,2),r=0;r0}function Dt(t){t.prototype.on=function(t,e){Ho(this,t,e)},t.prototype.off=function(t,e){$t(this,t,e)}}function It(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function _t(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function zt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ft(t){It(t),_t(t)}function Ht(t){return t.target||t.srcElement}function Rt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),go&&t.ctrlKey&&1==e&&(e=3),e}function Vt(t){if(null==So){var e=n("span","​");i(t,n("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(So=e.offsetWidth<=1&&e.offsetHeight>2&&!(no&&ro<8))}var r=So?n("span","​"):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Bt(t){if(null!=To)return To;var n=i(t,document.createTextNode("AخA")),r=bo(n,0,1).getBoundingClientRect(),s=bo(n,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(To=s.right-r.right<3)}function Wt(t){if(null!=jo)return jo;var e=i(t,n("span","x")),r=e.getBoundingClientRect(),s=bo(e,0,1).getBoundingClientRect();return jo=Math.abs(r.left-s.left)>1}function jt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Uo[t]=e}function Ut(t,e){qo[t]=e}function qt(t){if("string"==typeof t&&qo.hasOwnProperty(t))t=qo[t];else if(t&&"string"==typeof t.name&&qo.hasOwnProperty(t.name)){var e=qo[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return qt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return qt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Kt(t,e){e=qt(e);var i=Uo[e.name];if(!i)return Kt(t,"text/plain");var n=i(t,e);if(Ko.hasOwnProperty(e.name)){var r=Ko[e.name];for(var s in r)r.hasOwnProperty(s)&&(n.hasOwnProperty(s)&&(n["_"+s]=n[s]),n[s]=r[s])}if(n.name=e.name,e.helperType&&(n.helperType=e.helperType),e.modeProps)for(var o in e.modeProps)n[o]=e.modeProps[o];return n}function Gt(t,e){c(e,Ko.hasOwnProperty(t)?Ko[t]:Ko[t]={})}function Yt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var i={};for(var n in e){var r=e[n];r instanceof Array&&(r=r.concat([])),i[n]=r}return i}function Xt(t,e){for(var i;t.innerMode&&(i=t.innerMode(e))&&i.mode!=t;)e=i.state,t=i.mode;return i||{mode:t,state:e}}function Jt(t,e,i){return!t.startState||t.startState(e,i)}function Zt(t,e,i,n){var r=[t.state.modeGen],s={};oe(t,e.text,t.doc.mode,i,function(t,e){return r.push(t,e)},s,n);for(var o=0;ot&&r.splice(o,1,t,r[o+1],s),o+=2,a=Math.min(t,s)}if(e)if(n.opaque)r.splice(i,o-i,t,"overlay "+e),o=i+2;else for(;it.options.maxHighlightLength?Yt(t.doc.mode,n):n);e.stateAfter=n,e.styles=r.styles,r.classes?e.styleClasses=r.classes:e.styleClasses&&(e.styleClasses=null),i===t.doc.frontier&&t.doc.frontier++}return e.styles}function te(t,e,i){var n=t.doc,r=t.display;if(!n.mode.startState)return!0;var s=ae(t,e,i),o=s>n.first&&T(n,s-1).stateAfter;return o=o?Yt(n.mode,o):Jt(n.mode),n.iter(s,e,function(i){ee(t,i.text,o);var a=s==e-1||s%5==0||s>=r.viewFrom&&se.start)return s}throw new Error("Mode "+t.name+" failed to advance stream.")}function re(t,e,i,n){var r,s=function(t){return{start:h.start,end:h.pos,string:h.current(),type:r||null,state:t?Yt(o.mode,u):u}},o=t.doc,a=o.mode;e=H(o,e);var l,c=T(o,e.line),u=te(t,e.line,i),h=new Go(c.text,t.options.tabSize);for(n&&(l=[]);(n||h.post.options.maxHighlightLength?(a=!1,o&&ee(t,e,n,h.pos),h.pos=e.length,l=null):l=se(ne(i,h,n,d),s),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;co;--a){if(a<=s.first)return s.first;var l=T(s,a-1);if(l.stateAfter&&(!i||a<=s.frontier))return a;var c=u(l.text,null,t.options.tabSize);(null==r||n>c)&&(r=a-1,n=c)}return r}function le(t,e,i){this.text=t,tt(this,e),this.height=i?i(this):1}function ce(t,e,i,n){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Q(t),tt(t,i);var r=n?n(t):1;r!=t.height&&P(t,r)}function ue(t){t.parent=null,Q(t)}function he(t,e){if(!t||/^\s*$/.test(t))return null;var i=e.addModeClass?Jo:Xo;return i[t]||(i[t]=t.replace(/\S+/g,"cm-$&"))}function de(t,e){var i=n("span",null,null,so?"padding-right: .1px":null),r={pre:n("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:(no||so)&&t.getOption("lineWrapping")};e.measure={};for(var s=0;s<=(e.rest?e.rest.length:0);s++){var o=s?e.rest[s-1]:e.line,l=void 0;r.pos=0,r.addToken=pe,Bt(t.display.measure)&&(l=Et(o))&&(r.addToken=me(r.addToken,l)),r.map=[];ye(o,r,Qt(t,o,e!=t.display.externalMeasured&&$(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=a(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=a(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Vt(t.display.measure))),0==s?(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(so){var c=r.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Lt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=a(r.pre.className,r.textClass||"")),r}function fe(t){var e=n("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function pe(t,e,i,r,s,o,a){if(e){var l,c=t.splitSpaces?ge(e,t.trailingSpace):e,u=t.cm.state.specialChars,h=!1;if(u.test(e)){l=document.createDocumentFragment();for(var d=0;;){u.lastIndex=d;var f=u.exec(e),g=f?f.index-d:e.length-d;if(g){var m=document.createTextNode(c.slice(d,d+g));no&&ro<9?l.appendChild(n("span",[m])):l.appendChild(m),t.map.push(t.pos,t.pos+g,m),t.col+=g,t.pos+=g}if(!f)break;d+=g+1;var v=void 0;if("\t"==f[0]){var y=t.cm.options.tabSize,b=y-t.col%y;v=l.appendChild(n("span",p(b),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),t.col+=b}else"\r"==f[0]||"\n"==f[0]?(v=l.appendChild(n("span","\r"==f[0]?"␍":"␤","cm-invalidchar")),v.setAttribute("cm-text",f[0]),t.col+=1):(v=t.cm.options.specialCharPlaceholder(f[0]),v.setAttribute("cm-text",f[0]),no&&ro<9?l.appendChild(n("span",[v])):l.appendChild(v),t.col+=1);t.map.push(t.pos,t.pos+1,v),t.pos++}}else t.col+=e.length,l=document.createTextNode(c),t.map.push(t.pos,t.pos+e.length,l),no&&ro<9&&(h=!0),t.pos+=e.length;if(t.trailingSpace=32==c.charCodeAt(e.length-1),i||r||s||h||a){var x=i||"";r&&(x+=r),s&&(x+=s);var w=n("span",[l],x,a);return o&&(w.title=o),t.content.appendChild(w)}t.content.appendChild(l)}}function ge(t,e){if(t.length>1&&!/ /.test(t))return t;for(var i=e,n="",r=0;rc&&h.from<=c));d++);if(h.to>=u)return t(i,n,r,s,o,a,l);t(i,n.slice(0,h.to-c),r,s,null,a,l),s=null,n=n.slice(h.to-c),c=h.to}}}function ve(t,e,i,n){var r=!n&&i.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!n&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",i.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function ye(t,e,i){var n=t.markedSpans,r=t.text,s=0;if(n)for(var o,a,l,c,u,h,d,f=r.length,p=0,g=1,m="",v=0;;){if(v==p){l=c=u=h=a="",d=null,v=1/0;for(var y=[],b=void 0,x=0;xp||C.collapsed&&w.to==p&&w.from==p)?(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,c=""),C.className&&(l+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&w.from==p&&(u+=" "+C.startStyle),C.endStyle&&w.to==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||nt(d.marker,C)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var M=p+m.length;if(!d){var E=M>T?m.slice(0,T-p):m;e.addToken(e,E,o?o+l:l,u,p+E.length==v?c:"",h,a)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,u=""}m=r.slice(s,s=i[g++]),o=he(i[g++],e.cm.options)}}else for(var P=1;P2&&s.push((l.bottom+c.top)/2-i.top)}}s.push(i.bottom-i.top)}}function Ke(t,e,i){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var n=0;ni)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ge(t,e){e=lt(e);var n=$(e),r=t.display.externalMeasured=new be(t.doc,e,n);r.lineN=n;var s=r.built=de(t,r);return r.text=s.pre,i(t.display.lineMeasure,s.pre),r}function Ye(t,e,i,n){return Ze(t,Je(t,e),i,n)}function Xe(t,e){if(e>=t.display.viewFrom&&e=i.lineN&&ee)&&(s=l-a,r=s-1,e>=l&&(o="right")),null!=r){if(n=t[c+2],a==l&&i==(n.insertLeft?"left":"right")&&(o=i),"left"==i&&0==r)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)n=t[2+(c-=3)],o="left";if("right"==i&&r==l-a)for(;c=0&&(i=t[r]).left==i.right;r--);return i}function ei(t,e,i,n){var r,s=Qe(e.map,i,n),o=s.node,a=s.start,l=s.end,c=s.collapse;if(3==o.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(s.coverStart+a));)--a;for(;s.coverStart+l0&&(c=n="right");var h;r=t.options.lineWrapping&&(h=o.getClientRects()).length>1?h["right"==n?h.length-1:0]:o.getBoundingClientRect()}if(no&&ro<9&&!a&&(!r||!r.left&&!r.right)){var d=o.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+vi(t.display),top:d.top,bottom:d.bottom}:ta}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,m=e.view.measure.heights,v=0;vi.from?o(t-1):o(t,n)}n=n||T(t.doc,e.line),r||(r=Je(t,n));var l=Et(n),c=e.ch;if(!l)return o(c);var u=kt(l,c),h=a(c,u);return null!=_o&&(h.other=a(c,_o)),h}function di(t,e){var i=0;e=H(t.doc,e),t.options.lineWrapping||(i=vi(t.display)*e.ch);var n=T(t.doc,e.line),r=pt(n)+Re(t.display);return{left:i,right:i,top:r,bottom:r+n.height}}function fi(t,e,i,n){var r=O(t,e);return r.xRel=n,i&&(r.outside=!0),r}function pi(t,e,i){var n=t.doc;if((i+=t.display.viewOffset)<0)return fi(n.first,0,!0,-1);var r=L(n,i),s=n.first+n.size-1;if(r>s)return fi(n.first+n.size-1,T(n,s).text.length,!0,1);e<0&&(e=0);for(var o=T(n,r);;){var a=gi(t,o,r,e,i),l=ot(o),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=$(o=c.to.line)}}function gi(t,e,i,n,r){function s(n){var r=hi(t,O(i,n),"line",e,c);return a=!0,o>r.bottom?r.left-l:om)return fi(i,f,v,1);for(;;){if(u?f==d||f==Tt(e,d,1):f-d<=1){var y=n0&&y1){var w=Ze(t,c,y,"right");o<=w.bottom&&o>=w.top&&Math.abs(n-w.right)1?1:0)}var C=Math.ceil(h/2),S=d+C;if(u){S=d;for(var T=0;Tn?(f=S,m=M,(v=a)&&(m+=1e3),h=C):(d=S,p=M,g=a,h-=C)}}function mi(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Yo){Yo=n("pre");for(var r=0;r<49;++r)Yo.appendChild(document.createTextNode("x")),Yo.appendChild(n("br"));Yo.appendChild(document.createTextNode("x"))}i(t.measure,Yo);var s=Yo.offsetHeight/50;return s>3&&(t.cachedTextHeight=s),e(t.measure),s||1}function vi(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=n("span","xxxxxxxxxx"),r=n("pre",[e]);i(t.measure,r);var s=e.getBoundingClientRect(),o=(s.right-s.left)/10;return o>2&&(t.cachedCharWidth=o),o||10}function yi(t){for(var e=t.display,i={},n={},r=e.gutters.clientLeft,s=e.gutters.firstChild,o=0;s;s=s.nextSibling,++o)i[t.options.gutters[o]]=s.offsetLeft+s.clientLeft+r,n[t.options.gutters[o]]=s.clientWidth;return{fixedPos:bi(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:e.wrapper.clientWidth}}function bi(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function xi(t){var e=mi(t.display),i=t.options.lineWrapping,n=i&&Math.max(5,t.display.scroller.clientWidth/vi(t.display)-3);return function(r){if(dt(t.doc,r))return 0;var s=0;if(r.widgets)for(var o=0;o=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var i=t.display.view,n=0;n=t.display.viewTo||a.to().line3&&(r(f,g.top,null,g.bottom),f=u,g.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),f0?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(i=!i)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function $i(t){t.state.focused||(t.display.input.focus(),Ai(t))}function Li(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Ni(t))},100)}function Ai(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Lt(t,"focus",t,e),t.state.focused=!0,o(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),so&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Pi(t))}function Ni(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Lt(t,"blur",t,e),t.state.focused=!1,Co(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function Oi(t){var e=t.display,i=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var n=bi(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,s=n+"px",o=0;o.001||l<-.001)&&(P(r.line,s),_i(r.line),r.rest))for(var c=0;c=o&&(s=L(e,pt(T(e,l))-t.wrapper.clientHeight),o=l)}return{from:s,to:Math.max(o,s+1)}}function Fi(t,e){Math.abs(t.doc.scrollTop-e)<2||(t.doc.scrollTop=e,to||En(t,{top:e}),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e),t.display.scrollbars.setScrollTop(e),to&&En(t),wn(t,100))}function Hi(t,e,i){(i?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)||(e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),t.doc.scrollLeft=e,Oi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Ri(t){var e=t.wheelDeltaX,i=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==i&&t.detail&&t.axis==t.VERTICAL_AXIS?i=t.detail:null==i&&(i=t.wheelDelta),{x:e,y:i}}function Vi(t){var e=Ri(t);return e.x*=ia,e.y*=ia,e}function Bi(t,e){var i=Ri(e),n=i.x,r=i.y,s=t.display,o=s.scroller,a=o.scrollWidth>o.clientWidth,l=o.scrollHeight>o.clientHeight;if(n&&a||r&&l){if(r&&go&&so)t:for(var c=e.target,u=s.view;c!=o;c=c.parentNode)for(var h=0;h(window.innerHeight||document.documentElement.clientHeight)&&(s=!1),null!=s&&!ho){var o=n("div","​",null,"position: absolute;\n top: "+(e.top-i.viewOffset-Re(t.display))+"px;\n height: "+(e.bottom-e.top+We(t)+i.barHeight)+"px;\n left: "+e.left+"px; width: 2px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(s),t.display.lineSpace.removeChild(o)}}}function Xi(t,e,i,n){null==n&&(n=0);for(var r,s=0;s<5;s++){var o=!1;r=hi(t,e);var a=i&&i!=e?hi(t,i):r,l=Zi(t,Math.min(r.left,a.left),Math.min(r.top,a.top)-n,Math.max(r.left,a.left),Math.max(r.bottom,a.bottom)+n),c=t.doc.scrollTop,u=t.doc.scrollLeft;if(null!=l.scrollTop&&(Fi(t,l.scrollTop),Math.abs(t.doc.scrollTop-c)>1&&(o=!0)),null!=l.scrollLeft&&(Hi(t,l.scrollLeft),Math.abs(t.doc.scrollLeft-u)>1&&(o=!0)),!o)break}return r}function Ji(t,e,i,n,r){var s=Zi(t,e,i,n,r);null!=s.scrollTop&&Fi(t,s.scrollTop),null!=s.scrollLeft&&Hi(t,s.scrollLeft)}function Zi(t,e,i,n,r){var s=t.display,o=mi(t.display);i<0&&(i=0);var a=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:s.scroller.scrollTop,l=Ue(t),c={};r-i>l&&(r=i+l);var u=t.doc.height+Ve(s),h=iu-o;if(ia+l){var f=Math.min(i,(d?u:r)-l);f!=a&&(c.scrollTop=f)}var p=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:s.scroller.scrollLeft,g=je(t)-(t.options.fixedGutter?s.gutters.offsetWidth:0),m=n-e>g;return m&&(n=e+g),e<10?c.scrollLeft=0:eg+p-3&&(c.scrollLeft=n+(m?0:10)-g),c}function Qi(t,e,i){null==e&&null==i||en(t),null!=e&&(t.curOp.scrollLeft=(null==t.curOp.scrollLeft?t.doc.scrollLeft:t.curOp.scrollLeft)+e),null!=i&&(t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+i)}function tn(t){en(t);var e=t.getCursor(),i=e,n=e;t.options.lineWrapping||(i=e.ch?O(e.line,e.ch-1):e,n=O(e.line,e.ch+1)),t.curOp.scrollToPos={from:i,to:n,margin:t.options.cursorScrollMargin,isCursor:!0}}function en(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var i=di(t,e.from),n=di(t,e.to),r=Zi(t,Math.min(i.left,n.left),Math.min(i.top,n.top)-e.margin,Math.max(i.right,n.right),Math.max(i.bottom,n.bottom)+e.margin);t.scrollTo(r.scrollLeft,r.scrollTop)}}function nn(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ra},we(t.curOp)}function rn(t){ke(t.curOp,function(t){for(var e=0;e=i.viewTo)||i.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new kn(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function an(t){t.updatedDisplay=t.mustUpdate&&Tn(t.cm,t.update)}function ln(t){var e=t.cm,i=e.display;t.updatedDisplay&&Ii(e),t.barMeasure=Wi(e),i.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ye(e,i.maxLine,i.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+t.adjustWidthTo+We(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+t.adjustWidthTo-je(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=i.input.prepareSelection(t.focus))}function cn(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Io&&ut(t.doc,e)r.viewFrom?vn(t):(r.viewFrom+=n,r.viewTo+=n);else if(e<=r.viewFrom&&i>=r.viewTo)vn(t);else if(e<=r.viewFrom){var s=yn(t,i,i+n,1);s?(r.view=r.view.slice(s.index),r.viewFrom=s.lineN,r.viewTo+=n):vn(t)}else if(i>=r.viewTo){var o=yn(t,e,e,-1);o?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):vn(t)}else{var a=yn(t,e,e,-1),l=yn(t,i,i+n,1);a&&l?(r.view=r.view.slice(0,a.index).concat(xe(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=n):vn(t)}var c=r.externalMeasured;c&&(i=r.lineN&&e=n.viewTo)){var s=n.view[ki(t,e)];if(null!=s.node){var o=s.changes||(s.changes=[]);-1==d(o,i)&&o.push(i)}}}function vn(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function yn(t,e,i,n){var r,s=ki(t,e),o=t.display.view;if(!Io||i==t.doc.first+t.doc.size)return{index:s,lineN:i};for(var a=t.display.viewFrom,l=0;l0){if(s==o.length-1)return null;r=a+o[s].size-e,s++}else r=a-e;e+=r,i+=r}for(;ut(t.doc,i)!=i;){if(s==(n<0?0:o.length-1))return null;i+=n*o[s-(n<0?1:0)].size,s+=n}return{index:s,lineN:i}}function bn(t,e,i){var n=t.display;0==n.view.length||e>=n.viewTo||i<=n.viewFrom?(n.view=xe(t,e,i),n.viewFrom=e):(n.viewFrom>e?n.view=xe(t,e,n.viewFrom).concat(n.view):n.viewFromi&&(n.view=n.view.slice(0,ki(t,i)))),n.viewTo=i}function xn(t){for(var e=t.display.view,i=0,n=0;n=t.display.viewTo)){var i=+new Date+t.options.workTime,n=Yt(e.mode,te(t,e.frontier)),r=[];e.iter(e.frontier,Math.min(e.first+e.size,t.display.viewTo+500),function(s){if(e.frontier>=t.display.viewFrom){var o=s.styles,a=s.text.length>t.options.maxHighlightLength,l=Zt(t,s,a?Yt(e.mode,n):n,!0);s.styles=l.styles;var c=s.styleClasses,u=l.classes;u?s.styleClasses=u:c&&(s.styleClasses=null);for(var h=!o||o.length!=s.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&di)return wn(t,t.options.workDelay),!0}),r.length&&hn(t,function(){for(var e=0;e=n.viewFrom&&i.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==xn(t))return!1;Di(t)&&(vn(t),i.dims=yi(t));var o=r.first+r.size,a=Math.max(i.visible.from-t.options.viewportMargin,r.first),l=Math.min(o,i.visible.to+t.options.viewportMargin);n.viewFroml&&n.viewTo-l<20&&(l=Math.min(o,n.viewTo)),Io&&(a=ut(t.doc,a),l=ht(t.doc,l));var c=a!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=i.wrapperHeight||n.lastWrapWidth!=i.wrapperWidth;bn(t,a,l),n.viewOffset=pt(T(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var u=xn(t);if(!c&&0==u&&!i.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var h=s();return u>4&&(n.lineDiv.style.display="none"),Pn(t,n.updateLineNumbers,i.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,h&&s()!=h&&h.offsetHeight&&h.focus(),e(n.cursorDiv),e(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,c&&(n.lastWrapHeight=i.wrapperHeight,n.lastWrapWidth=i.wrapperWidth,wn(t,400)),n.updateLineNumbers=null,!0}function Mn(t,e){for(var i=e.viewport,n=!0;(n&&t.options.lineWrapping&&e.oldDisplayWidth!=je(t)||(i&&null!=i.top&&(i={top:Math.min(t.doc.height+Ve(t.display)-Ue(t),i.top)}),e.visible=zi(t.display,t.doc,i),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Tn(t,e);n=!1){Ii(t);var r=Wi(t);Si(t),qi(t,r),Ln(t,r)}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 En(t,e){var i=new kn(t,e);if(Tn(t,i)){Ii(t),Mn(t,i);var n=Wi(t);Si(t),qi(t,n),Ln(t,n),i.finish()}}function Pn(t,i,n){function r(e){var i=e.nextSibling;return so&&go&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),i}for(var s=t.display,o=t.options.lineNumbers,a=s.lineDiv,l=a.firstChild,c=s.view,u=s.viewFrom,h=0;h-1&&(p=!1),Me(t,f,u,n)),p&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(N(t.options,u)))),l=f.node.nextSibling}else{var g=De(t,f,u,n);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function $n(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Ln(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+We(t)+"px"}function An(t){var i=t.display.gutters,r=t.options.gutters;e(i);for(var s=0;s-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function On(t,e){this.ranges=t,this.primIndex=e}function Dn(t,e){this.anchor=t,this.head=e}function In(t,e){var i=t[e];t.sort(function(t,e){return D(t.from(),e.from())}),e=d(t,i);for(var n=1;n=0){var o=z(s.from(),r.from()),a=_(s.to(),r.to()),l=s.empty()?r.from()==r.head:s.from()==s.head;n<=e&&--e,t.splice(--n,2,new Dn(l?a:o,l?o:a))}}return new On(t,e)}function _n(t,e){return new On([new Dn(t,e||t)],0)}function zn(t){return t.text?O(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Fn(t,e){if(D(t,e.from)<0)return t;if(D(t,e.to)<=0)return zn(e);var i=t.line+e.text.length-(e.to.line-e.from.line)-1,n=t.ch;return t.line==e.to.line&&(n+=zn(e).ch-e.to.ch),O(i,n)}function Hn(t,e){for(var i=[],n=0;n1&&t.remove(a.line+1,p-1),t.insert(a.line+1,y)}Se(t,"change",t,e)}function qn(t,e,i){function n(t,r,s){if(t.linked)for(var o=0;o1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function Zn(t,e,i,n){var r=t.history;r.undone.length=0;var s,o,a=+new Date;if((r.lastOp==n||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(s=Jn(r,r.lastOp==n)))o=g(s.changes),0==D(e.from,e.to)&&0==D(e.from,o.to)?o.to=zn(e):s.changes.push(Yn(t,e));else{var l=g(r.done);for(l&&l.ranges||er(t.sel,r.done),s={changes:[Yn(t,e)],generation:r.generation},r.done.push(s);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(i),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=n,r.lastOrigin=r.lastSelOrigin=e.origin,o||Lt(t,"historyAdded")}function Qn(t,e,i,n){var r=e.charAt(0);return"*"==r||"+"==r&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function tr(t,e,i,n){var r=t.history,s=n&&n.origin;i==r.lastSelOp||s&&r.lastSelOrigin==s&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==s||Qn(t,s,g(r.done),e))?r.done[r.done.length-1]=e:er(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=s,r.lastSelOp=i,n&&!1!==n.clearRedo&&Xn(r.undone)}function er(t,e){var i=g(e);i&&i.ranges&&i.equals(t)||e.push(t)}function ir(t,e,i,n){var r=e["spans_"+t.id],s=0;t.iter(Math.max(t.first,i),Math.min(t.first+t.size,n),function(i){i.markedSpans&&((r||(r=e["spans_"+t.id]={}))[s]=i.markedSpans),++s})}function nr(t){if(!t)return null;for(var e,i=0;i-1&&(g(a)[h]=c[h],delete c[h])}}}return n}function ar(t,e,i,n){if(t.cm&&t.cm.display.shift||t.extend){var r=e.anchor;if(n){var s=D(i,r)<0;s!=D(n,r)<0?(r=i,i=n):s!=D(i,n)<0&&(i=n)}return new Dn(r,i)}return new Dn(n||i,i)}function lr(t,e,i,n){pr(t,new On([ar(t,t.sel.primary(),e,i)],0),n)}function cr(t,e,i){for(var n=[],r=0;r=e.ch:a.to>e.ch))){if(r&&(Lt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(s.markedSpans){--o;continue}break}if(!l.atomic)continue;if(i){var c=l.find(n<0?1:-1),u=void 0;if((n<0?l.inclusiveRight:l.inclusiveLeft)&&(c=wr(t,c,-n,c&&c.line==e.line?s:null)),c&&c.line==e.line&&(u=D(c,i))&&(n<0?u<0:u>0))return br(t,c,e,n,r)}var h=l.find(n<0?-1:1);return(n<0?l.inclusiveLeft:l.inclusiveRight)&&(h=wr(t,h,n,h.line==e.line?s:null)),h?br(t,h,e,n,r):null}}return e}function xr(t,e,i,n,r){var s=n||1,o=br(t,e,i,s,r)||!r&&br(t,e,i,s,!0)||br(t,e,i,-s,r)||!r&&br(t,e,i,-s,!0);return o||(t.cantEdit=!0,O(t.first,0))}function wr(t,e,i,n){return i<0&&0==e.ch?e.line>t.first?H(t,O(e.line-1)):null:i>0&&e.ch==(n||T(t,e.line)).text.length?e.line=0;--r)Tr(t,{from:n[r].from,to:n[r].to,text:r?[""]:e.text});else Tr(t,e)}}function Tr(t,e){if(1!=e.text.length||""!=e.text[0]||0!=D(e.from,e.to)){var i=Hn(t,e);Zn(t,e,i,t.cm?t.cm.curOp.id:NaN),Pr(t,e,i,X(t,e));var n=[];qn(t,function(t,i){i||-1!=d(n,t.history)||(Or(t.history,e),n.push(t.history)),Pr(t,e,null,X(t,e))})}}function Mr(t,e,i){if(!t.cm||!t.cm.state.suppressEdits||i){for(var n,r=t.history,s=t.sel,o="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l=0;--h){var f=function(i){var r=n.changes[i];if(r.origin=e,u&&!kr(t,r,!1))return o.length=0,{};c.push(Yn(t,r));var s=i?Hn(t,r):g(o);Pr(t,r,s,sr(t,r)),!i&&t.cm&&t.cm.scrollIntoView({from:r.from,to:zn(r)});var a=[];qn(t,function(t,e){e||-1!=d(a,t.history)||(Or(t.history,r),a.push(t.history)),Pr(t,r,null,sr(t,r))})}(h);if(f)return f.v}}}}function Er(t,e){if(0!=e&&(t.first+=e,t.sel=new On(m(t.sel.ranges,function(t){return new Dn(O(t.anchor.line+e,t.anchor.ch),O(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){gn(t.cm,t.first,t.first-e,e);for(var i=t.cm.display,n=i.viewFrom;nt.lastLine())){if(e.from.lines&&(e={from:e.from,to:O(s,T(t,s).text.length),text:[e.text[0]],origin:e.origin}),e.removed=M(t,e.from,e.to),i||(i=Hn(t,e)),t.cm?$r(t.cm,e,n):Un(t,e,n),gr(t,i,Po)}}function $r(t,e,i){var n=t.doc,r=t.display,s=e.from,o=e.to,a=!1,l=s.line;t.options.lineWrapping||(l=$(lt(T(n,s.line))),n.iter(l,o.line+1,function(t){if(t==r.maxLine)return a=!0,!0})),n.sel.contains(e.from,e.to)>-1&&Nt(t),Un(n,e,i,xi(t)),t.options.lineWrapping||(n.iter(l,s.line+e.text.length,function(t){var e=gt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),n.frontier=Math.min(n.frontier,s.line),wn(t,400);var c=e.text.length-(o.line-s.line)-1;e.full?gn(t):s.line!=o.line||1!=e.text.length||jn(t.doc,e)?gn(t,s.line,o.line+1,c):mn(t,s.line,"text");var u=Ot(t,"changes"),h=Ot(t,"change");if(h||u){var d={from:s,to:o,text:e.text,removed:e.removed,origin:e.origin};h&&Se(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function Lr(t,e,i,n,r){if(n||(n=i),D(n,i)<0){var s=n;n=i,i=s}"string"==typeof e&&(e=t.splitLines(e)),Sr(t,{from:i,to:n,text:e,origin:r})}function Ar(t,e,i,n){i0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=n("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(at(t,e.line,e,i,o)||e.line!=i.line&&at(t,i.line,e,i,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");W()}o.addToHistory&&Zn(t,{from:e,to:i,origin:"markText"},t.sel,NaN);var l,u=e.line,h=t.cm;if(t.iter(u,i.line+1,function(t){h&&o.collapsed&&!h.options.lineWrapping&<(t)==h.display.maxLine&&(l=!0),o.collapsed&&u!=e.line&&P(t,0),K(t,new j(o,u==e.line?e.ch:null,u==i.line?i.ch:null)),++u}),o.collapsed&&t.iter(e.line,i.line+1,function(e){dt(t,e)&&P(e,0)}),o.clearOnEnter&&Ho(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(B(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++sa,o.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),o.collapsed)gn(h,e.line,i.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var d=e.line;d<=i.line;d++)mn(h,d,"text");o.atomic&&vr(h.doc),Se(h,"markerAdded",h,o)}return o}function Br(t,e){var i=this;this.markers=t,this.primary=e;for(var n=0;n-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var l=t.dataTransfer.getData("Text");if(l){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),gr(e.doc,_n(i,i)),c)for(var u=0;u=0;e--)Lr(t.doc,"",n[e].from,n[e].to,"+delete");tn(t)})}function ls(t,e){var i=T(t.doc,e),n=lt(i);n!=i&&(e=$(n));var r=Et(n);return O(e,r?r[0].level%2?wt(n):xt(n):0)}function cs(t,e){for(var i,n=T(t.doc,e);i=ot(n);)n=i.find(1,!0).line,e=null;var r=Et(n),s=r?r[0].level%2?xt(n):wt(n):n.text.length;return O(null==e?$(n):e,s)}function us(t,e){var i=ls(t,e.line),n=T(t.doc,i.line),r=Et(n);if(!r||0==r[0].level){var s=Math.max(0,n.text.search(/\S/)),o=e.line==i.line&&e.ch<=s&&e.ch;return O(i.line,o?0:s)}return i}function hs(t,e,i){if("string"==typeof e&&!(e=va[e]))return!1;t.display.input.ensurePolled();var n=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),i&&(t.display.shift=!1),r=e(t)!=Eo}finally{t.display.shift=n,t.state.suppressEdits=!1}return r}function ds(t,e,i){for(var n=0;nr-400&&0==D(ma.pos,i)?n="triple":ga&&ga.time>r-400&&0==D(ga.pos,i)?(n="double",ma={time:r,pos:i}):(n="single",ga={time:r,pos:i});var o,a=t.doc.sel,c=go?e.metaKey:e.ctrlKey;t.options.dragDrop&&Ro&&!t.isReadOnly()&&"single"==n&&(o=a.contains(i))>-1&&(D((o=a.ranges[o]).from(),i)<0||i.xRel>0)&&(D(o.to(),i)>0||i.xRel<0)?Cs(t,e,i,c):ks(t,e,i,n,c)}function Cs(t,e,i,n){var r=t.display,s=+new Date,o=dn(t,function(a){so&&(r.scroller.draggable=!1),t.state.draggingText=!1,$t(document,"mouseup",o),$t(r.scroller,"drop",o),Math.abs(e.clientX-a.clientX)+Math.abs(e.clientY-a.clientY)<10&&(It(a),!n&&+new Date-200x&&r.push(new Dn(O(m,x),O(m,f(y,c,s))))}r.length||r.push(new Dn(i,i)),pr(h,In(g.ranges.slice(0,p).concat(r),p),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w=d,C=w.anchor,k=e;if("single"!=n){var S;S="double"==n?t.findWordAt(e):new Dn(O(e.line,0),H(h,O(e.line+1,0))),D(S.anchor,C)>0?(k=S.head,C=z(w.from(),S.anchor)):(k=S.anchor,C=_(w.to(),S.head))}var M=g.ranges.slice(0);M[p]=new Dn(H(h,C),k),pr(h,In(M,p),$o)}}function a(e){var i=++w,r=Ci(t,e,!0,"rect"==n);if(r)if(0!=D(r,b)){t.curOp.focus=s(),o(r);var l=zi(c,h);(r.line>=l.to||r.linex.bottom?20:0;u&&setTimeout(dn(t,function(){w==i&&(c.scroller.scrollTop+=u,a(e))}),50)}}function l(e){t.state.selectingText=!1,w=1/0,It(e),c.input.focus(),$t(document,"mousemove",C),$t(document,"mouseup",k),h.history.lastSelOrigin=null}var c=t.display,h=t.doc;It(e);var d,p,g=h.sel,m=g.ranges;if(r&&!e.shiftKey?(p=h.sel.contains(i),d=p>-1?m[p]:new Dn(i,i)):(d=h.sel.primary(),p=h.sel.primIndex),mo?e.shiftKey&&e.metaKey:e.altKey)n="rect",r||(d=new Dn(i,i)),i=Ci(t,e,!0,!0),p=-1;else if("double"==n){var v=t.findWordAt(i);d=t.display.shift||h.extend?ar(h,d,v.anchor,v.head):v}else if("triple"==n){var y=new Dn(O(i.line,0),H(h,O(i.line+1,0)));d=t.display.shift||h.extend?ar(h,d,y.anchor,y.head):y}else d=ar(h,d,i);r?-1==p?(p=m.length,pr(h,In(m.concat([d]),p),{scroll:!1,origin:"*mouse"})):m.length>1&&m[p].empty()&&"single"==n&&!e.shiftKey?(pr(h,In(m.slice(0,p).concat(m.slice(p+1)),0),{scroll:!1,origin:"*mouse"}),g=h.sel):ur(h,p,d,$o):(p=0,pr(h,new On([d],0),$o),g=h.sel);var b=i,x=c.wrapper.getBoundingClientRect(),w=0,C=dn(t,function(t){Rt(t)?a(t):l(t)}),k=dn(t,l);t.state.selectingText=k,Ho(document,"mousemove",C),Ho(document,"mouseup",k)}function Ss(t,e,i,n){var r,s;try{r=e.clientX,s=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;n&&It(e);var o=t.display,a=o.lineDiv.getBoundingClientRect();if(s>a.bottom||!Ot(t,i))return zt(e);s-=a.top-o.viewOffset;for(var l=0;l=r){return Lt(t,i,t,L(t.doc,s),t.options.gutters[l],e),zt(e)}}}function Ts(t,e){return Ss(t,e,"gutterClick",!0)}function Ms(t,e){He(t.display,e)||Es(t,e)||At(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function Es(t,e){return!!Ot(t,"gutterContextMenu")&&Ss(t,e,"gutterContextMenu",!1)}function Ps(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),si(t)}function $s(t){An(t),gn(t),setTimeout(function(){return Oi(t)},20)}function Ls(t,e,i){if(!e!=!(i&&i!=xa)){var n=t.display.dragFunctions,r=e?Ho:$t;r(t.display.scroller,"dragstart",n.start),r(t.display.scroller,"dragenter",n.enter),r(t.display.scroller,"dragover",n.over),r(t.display.scroller,"dragleave",n.leave),r(t.display.scroller,"drop",n.drop)}}function As(t){t.options.lineWrapping?(o(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Co(t.display.wrapper,"CodeMirror-wrap"),mt(t)),wi(t),gn(t),si(t),setTimeout(function(){return qi(t)},100)}function Ns(t,e){var i=this;if(!(this instanceof Ns))return new Ns(t,e);this.options=e=e?c(e):{},c(wa,e,!1),Nn(e);var n=e.value;"string"==typeof n&&(n=new aa(n,e.mode,null,e.lineSeparator)),this.doc=n;var r=new Ns.inputStyles[e.inputStyle](this),s=this.display=new S(t,n,r);s.wrapper.CodeMirror=this,An(this),Ps(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),e.autofocus&&!po&&s.input.focus(),Gi(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 h,keySeq:null,specialChars:null},no&&ro<11&&setTimeout(function(){return i.display.input.reset(!0)},20),Os(this),Zr(),nn(this),this.curOp.forceUpdate=!0,Kn(this,n),e.autofocus&&!po||this.hasFocus()?setTimeout(l(Ai,this),20):Ni(this);for(var o in Ca)Ca.hasOwnProperty(o)&&Ca[o](i,e[o],xa);Di(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;Ho(r.scroller,"mousedown",dn(t,xs)),no&&ro<11?Ho(r.scroller,"dblclick",dn(t,function(e){if(!At(t,e)){var i=Ci(t,e);if(i&&!Ts(t,e)&&!He(t.display,e)){It(e);var n=t.findWordAt(i);lr(t.doc,n.anchor,n.head)}}})):Ho(r.scroller,"dblclick",function(e){return At(t,e)||It(e)}),wo||Ho(r.scroller,"contextmenu",function(e){return Ms(t,e)});var s,o={end:0};Ho(r.scroller,"touchstart",function(e){if(!At(t,e)&&!i(e)){r.input.ensurePolled(),clearTimeout(s);var n=+new Date;r.activeTouch={start:n,moved:!1,prev:n-o.end<=300?o:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),Ho(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Ho(r.scroller,"touchend",function(i){var s=r.activeTouch;if(s&&!He(r,i)&&null!=s.left&&!s.moved&&new Date-s.start<300){var o,a=t.coordsChar(r.activeTouch,"page");o=!s.prev||n(s,s.prev)?new Dn(a,a):!s.prev.prev||n(s,s.prev.prev)?t.findWordAt(a):new Dn(O(a.line,0),H(t.doc,O(a.line+1,0))),t.setSelection(o.anchor,o.head),t.focus(),It(i)}e()}),Ho(r.scroller,"touchcancel",e),Ho(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Fi(t,r.scroller.scrollTop),Hi(t,r.scroller.scrollLeft,!0),Lt(t,"scroll",t))}),Ho(r.scroller,"mousewheel",function(e){return Bi(t,e)}),Ho(r.scroller,"DOMMouseScroll",function(e){return Bi(t,e)}),Ho(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){At(t,e)||Ft(e)},over:function(e){At(t,e)||(Yr(t,e),Ft(e))},start:function(e){return Gr(t,e)},drop:dn(t,Kr),leave:function(e){At(t,e)||Xr(t)}};var a=r.input.getField();Ho(a,"keyup",function(e){return ys.call(t,e)}),Ho(a,"keydown",dn(t,ms)),Ho(a,"keypress",dn(t,bs)),Ho(a,"focus",function(e){return Ai(t,e)}),Ho(a,"blur",function(e){return Ni(t,e)})}function Ds(t,e,i,n){var r,s=t.doc;null==i&&(i="add"),"smart"==i&&(s.mode.indent?r=te(t,e):i="prev");var o=t.options.tabSize,a=T(s,e),l=u(a.text,null,o);a.stateAfter&&(a.stateAfter=null);var c,h=a.text.match(/^\s*/)[0];if(n||/\S/.test(a.text)){if("smart"==i&&((c=s.mode.indent(r,a.text.slice(h.length),a.text))==Eo||c>150)){if(!n)return;i="prev"}}else c=0,i="not";"prev"==i?c=e>s.first?u(T(s,e-1).text,null,o):0:"add"==i?c=l+t.options.indentUnit:"subtract"==i?c=l-t.options.indentUnit:"number"==typeof i&&(c=l+i),c=Math.max(0,c);var d="",f=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/o);g;--g)f+=o,d+="\t";if(f1)if(Sa&&Sa.text.join("\n")==e){if(n.ranges.length%Sa.text.length==0){l=[];for(var c=0;c=0;h--){var d=n.ranges[h],f=d.from(),p=d.to();d.empty()&&(i&&i>0?f=O(f.line,f.ch-i):t.state.overwrite&&!o?p=O(p.line,Math.min(T(s,p.line).text.length,p.ch+g(a).length)):Sa&&Sa.lineWise&&Sa.text.join("\n")==e&&(f=p=O(f.line,0))),u=t.curOp.updateInput;var v={from:f,to:p,text:l?l[h%l.length]:a,origin:r||(o?"paste":t.state.cutIncoming?"cut":"+input")};Sr(t.doc,v),Se(t,"inputRead",t,v)}e&&!o&&Fs(t,e),tn(t),t.curOp.updateInput=u,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function zs(t,e){var i=t.clipboardData&&t.clipboardData.getData("Text");if(i)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||hn(e,function(){return _s(e,i,0,null,"paste")}),!0}function Fs(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var i=t.doc.sel,n=i.ranges.length-1;n>=0;n--){var r=i.ranges[n];if(!(r.head.ch>100||n&&i.ranges[n-1].head.line==r.head.line)){var s=t.getModeAt(r.head),o=!1;if(s.electricChars){for(var a=0;a-1){o=Ds(t,r.head.line,"smart");break}}else s.electricInput&&s.electricInput.test(T(t.doc,r.head.line).text.slice(0,r.head.ch))&&(o=Ds(t,r.head.line,"smart"));o&&Se(t,"electricInput",t,r.head.line)}}}function Hs(t){for(var e=[],i=[],n=0;n=t.first+t.size)&&(a=e,u=T(t,e))}function o(t){var e=(r?Tt:Mt)(u,l,i,!0);if(null==e){if(t||!s())return!1;l=r?(i<0?wt:xt)(u):i<0?u.text.length:0}else l=e;return!0}var a=e.line,l=e.ch,c=i,u=T(t,a);if("char"==n)o();else if("column"==n)o(!0);else if("word"==n||"group"==n)for(var h=null,d="group"==n,f=t.cm&&t.cm.getHelper(e,"wordChars"),p=!0;!(i<0)||o(!p);p=!1){var g=u.text.charAt(l)||"\n",m=w(g,f)?"w":d&&"\n"==g?"n":!d||/\s/.test(g)?null:"p";if(!d||p||m||(m="s"),h&&h!=m){i<0&&(i=1,o());break}if(m&&(h=m),i>0&&!o(!p))break}var v=xr(t,O(a,l),e,c,!0);return D(e,v)||(v.hitSide=!0),v}function Ws(t,e,i,n){var r,s=t.doc,o=e.left;if("page"==n){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*mi(t.display),3);r=(i>0?e.bottom:e.top)+i*l}else"line"==n&&(r=i>0?e.bottom+3:e.top-3);for(var c;c=pi(t,o,r),c.outside;){if(i<0?r<=0:r>=s.height){c.hitSide=!0;break}r+=5*i}return c}function js(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new h,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null}function Us(t,e){var i=Xe(t,e.line);if(!i||i.hidden)return null;var n=T(t.doc,e.line),r=Ke(i,n,e.line),s=Et(n),o="left";if(s){o=kt(s,e.ch)%2?"right":"left"}var a=Qe(r.map,e.ch,o);return a.offset="right"==a.collapse?a.end:a.start,a}function qs(t,e){return e&&(t.bad=!0),t}function Ks(t,e,i,n,r){function s(t){return function(e){return e.id==t}}function o(e){if(1==e.nodeType){var i=e.getAttribute("cm-text");if(null!=i)return void(a+=""==i?e.textContent.replace(/\u200b/g,""):i);var u,h=e.getAttribute("cm-marker");if(h){var d=t.findMarks(O(n,0),O(r+1,0),s(+h));return void(d.length&&(u=d[0].find())&&(a+=M(t.doc,u.from,u.to).join(c)))}if("false"==e.getAttribute("contenteditable"))return;for(var f=0;f=15&&(lo=!1,so=!0);var bo,xo=go&&(oo||lo&&(null==yo||yo<12.11)),wo=to||no&&ro>=9,Co=function(e,i){var n=e.className,r=t(i).exec(n);if(r){var s=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(s?r[1]+s:"")}};bo=document.createRange?function(t,e,i,n){var r=document.createRange();return r.setEnd(n||t,i),r.setStart(t,e),r}:function(t,e,i){var n=document.body.createTextRange();try{n.moveToElementText(t.parentNode)}catch(t){return n}return n.collapse(!0),n.moveEnd("character",i),n.moveStart("character",e),n};var ko=function(t){t.select()};fo?ko=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:no&&(ko=function(t){try{t.select()}catch(t){}}),h.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var So,To,Mo=30,Eo={toString:function(){return"CodeMirror.Pass"}},Po={scroll:!1},$o={origin:"*mouse"},Lo={origin:"+move"},Ao=[""],No=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Oo=/[\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]/,Do=!1,Io=!1,_o=null,zo=function(){function t(t){return t<=247?i.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1773?n.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,i){this.level=t,this.from=e,this.to=i}var i="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,s=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(i){if(!r.test(i))return!1;for(var n=i.length,c=[],u=0;u=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pose},eatSpace:function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},backUp:function(t){this.pos-=t},column:function(){return this.lastColumnPos0?null:(n&&!1!==e&&(this.pos+=n[0].length),n)}var r=function(t){return i?t.toLowerCase():t};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}}},Dt(le),le.prototype.lineNo=function(){return $(this)};var Yo,Xo={},Jo={},Zo=null,Qo=null,ta={left:0,right:0,top:0,bottom:0},ea=0,ia=null;no?ia=-.53:to?ia=15:ao?ia=-.7:co&&(ia=-1/3),ji.prototype=c({update:function(t){var e=t.scrollWidth>t.clientWidth+1,i=t.scrollHeight>t.clientHeight+1,n=t.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=e?n+"px":"0";var r=t.viewHeight-(e?n:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=t.barLeft+"px";var s=t.viewWidth-t.barLeft-(i?n:0);this.horiz.firstChild.style.width=t.scrollWidth-t.clientWidth+s+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:e?n:0}},setScrollLeft:function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var t=go&&!uo?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new h,this.disableVert=new h},enableZeroWidthBar:function(t,e){function i(){var n=t.getBoundingClientRect();document.elementFromPoint(n.left+1,n.bottom-1)!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},clear:function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)}},ji.prototype),Ui.prototype=c({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},Ui.prototype);var na={native:ji,null:Ui},ra=0;kn.prototype.signal=function(t,e){Ot(t,e)&&this.events.push(arguments)},kn.prototype.finish=function(){for(var t=this,e=0;e=0&&D(t,r.to())<=0)return n}return-1}},Dn.prototype={from:function(){return z(this.anchor,this.head)},to:function(){return _(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}},Ir.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var i=this,n=t,r=t+e;n1||!(this.children[0]instanceof Ir))){var l=[];this.collapse(l),this.children=[new Ir(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,i=0;i50){for(var a=s.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,i){for(var n=this,r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&gn(e,r,s+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&vr(e.doc)),e&&Se(e,"markerCleared",e,this),i&&rn(e),this.parent&&this.parent.clear()}},Rr.prototype.find=function(t,e){var i=this;null==t&&"bookmark"==this.type&&(t=1);for(var n,r,s=0;s=0;c--)Sr(n,r[c]);l?fr(this,l):this.cm&&tn(this.cm)}),undo:pn(function(){Mr(this,"undo")}),redo:pn(function(){Mr(this,"redo")}),undoSelection:pn(function(){Mr(this,"undo",!0)}),redoSelection:pn(function(){Mr(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,i=0,n=0;n=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,i){t=H(this,t),e=H(this,e);var n=[],r=t.line;return this.iter(t.line,e.line+1,function(s){var o=s.markedSpans;if(o)for(var a=0;a=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||i&&!i(l.marker)||n.push(l.marker.parent||l.marker)}++r}),n},getAllMarks:function(){var t=[];return this.iter(function(e){var i=e.markedSpans;if(i)for(var n=0;nt)return e=t,!0;t-=s,++i}),H(this,O(i,e))},indexFromPos:function(t){t=H(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new O(r.line,r.ch+1),t.replaceRange(s.charAt(r.ch-1)+s.charAt(r.ch-2),O(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var o=T(t.doc,r.line-1).text;o&&(r=new O(r.line,1),t.replaceRange(s.charAt(0)+t.doc.lineSeparator()+o.charAt(o.length-1),O(r.line-1,o.length-1),r,"+transpose"))}i.push(new Dn(r,r))}t.setSelections(i)})},newlineAndIndent:function(t){return hn(t,function(){for(var e=t.listSelections(),i=e.length-1;i>=0;i--)t.replaceRange(t.doc.lineSeparator(),e[i].anchor,e[i].head,"+input");e=t.listSelections();for(var n=0;nt.firstLine()&&(n=O(n.line-1,T(t.doc,n.line-1).length)),r.ch==T(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var s,o,a;n.line==e.viewFrom||0==(s=ki(t,n.line))?(o=$(e.view[0].line),a=e.view[0].node):(o=$(e.view[s].line),a=e.view[s-1].node.nextSibling);var l,c,u=ki(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=$(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(Ks(t,a,c,o,l)),d=M(t.doc,O(o,0),O(l,T(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),o++}for(var f=0,p=0,m=h[0],v=d[0],y=Math.min(m.length,v.length);f1||h[0]||D(C,k)?(Lr(t.doc,h,C,k,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&(this.composing=null,this.pollContent()||gn(this.cm),this.div.blur(),this.div.focus())},readFromDOMSoon:function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){t.readDOMTimeout=null,t.composing||!t.cm.isReadOnly()&&t.pollContent()||hn(t.cm,function(){return gn(t.cm)})},80))},setUneditable:function(t){t.contentEditable="false"},onKeyPress:function(t){t.preventDefault(),this.cm.isReadOnly()||dn(this.cm,_s)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0)},readOnlyChanged:function(t){this.div.contentEditable=String("nocursor"!=t)},onContextMenu:y,resetPosition:y,needsContentAttribute:!0},js.prototype),Xs.prototype=c({init:function(t){function e(t){if(!At(r,t)){if(r.somethingSelected())Is({lineWise:!1,text:r.getSelections()}),n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,o.value=Sa.text.join("\n"),ko(o));else{if(!r.options.lineWiseCopyCut)return;var e=Hs(r);Is({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Po):(n.prevInput="",o.value=e.text.join("\n"),ko(o))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var i=this,n=this,r=this.cm,s=this.wrapper=Vs(),o=this.textarea=s.firstChild;t.wrapper.insertBefore(s,t.wrapper.firstChild),fo&&(o.style.width="0px"),Ho(o,"input",function(){no&&ro>=9&&i.hasSelection&&(i.hasSelection=null),n.poll()}),Ho(o,"paste",function(t){At(r,t)||zs(t,r)||(r.state.pasteIncoming=!0,n.fastPoll())}),Ho(o,"cut",e),Ho(o,"copy",e),Ho(t.scroller,"paste",function(e){He(t,e)||At(r,e)||(r.state.pasteIncoming=!0,n.focus())}),Ho(t.lineSpace,"selectstart",function(e){He(t,e)||It(e)}),Ho(o,"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"})}}),Ho(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var t=this.cm,e=t.display,i=t.doc,n=Ti(t);if(t.options.moveInputWithCursor){var r=hi(t,i.sel.primary().head,"div"),s=e.wrapper.getBoundingClientRect(),o=e.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+o.top-s.top)),n.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+o.left-s.left))}return n},showSelection:function(t){var e=this.cm,n=e.display;i(n.cursorDiv,t.cursors),i(n.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},reset:function(t){if(!this.contextMenuPending){var e,i,n=this.cm,r=n.doc;if(n.somethingSelected()){this.prevInput="";var s=r.sel.primary();e=Wo&&(s.to().line-s.from().line>100||(i=n.getSelection()).length>1e3);var o=e?"-":i||n.getSelection();this.textarea.value=o,n.state.focused&&ko(this.textarea),no&&ro>=9&&(this.hasSelection=o)}else t||(this.prevInput=this.textarea.value="",no&&ro>=9&&(this.hasSelection=null));this.inaccurateSelection=e}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!po||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},fastPoll:function(){function t(){i.poll()||e?(i.pollingFast=!1,i.slowPoll()):(e=!0,i.polling.set(60,t))}var e=!1,i=this;i.pollingFast=!0,i.polling.set(20,t)},poll:function(){var t=this,e=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||Bo(i)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=i.value;if(r==n&&!e.somethingSelected())return!1;if(no&&ro>=9&&this.hasSelection===r||go&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var s=r.charCodeAt(0);if(8203!=s||n||(n="​"),8666==s)return this.reset(),this.cm.execCommand("undo")}for(var o=0,a=Math.min(n.length,r.length);o1e3||r.indexOf("\n")>-1?i.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){no&&ro>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(t){function e(){if(null!=o.selectionStart){var t=r.somethingSelected(),e="​"+(t?o.value:"");o.value="⇚",o.value=e,n.prevInput=t?"":"​",o.selectionStart=1,o.selectionEnd=e.length,s.selForContextMenu=r.doc.sel}}function i(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=u,o.style.cssText=c,no&&ro<9&&s.scrollbars.setScrollTop(s.scroller.scrollTop=l),null!=o.selectionStart){(!no||no&&ro<9)&&e();var t=0,i=function(){s.selForContextMenu==r.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"​"==n.prevInput?dn(r,Cr)(r):t++<10?s.detectingSelectAll=setTimeout(i,500):s.input.reset()};s.detectingSelectAll=setTimeout(i,200)}}var n=this,r=n.cm,s=r.display,o=n.textarea,a=Ci(r,t),l=s.scroller.scrollTop;if(a&&!lo){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&dn(r,pr)(r.doc,_n(a),Po);var c=o.style.cssText,u=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var h=n.wrapper.getBoundingClientRect();o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(no?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(so&&(d=window.scrollY),s.input.focus(),so&&window.scrollTo(null,d),s.input.reset(),r.somethingSelected()||(o.value=n.prevInput=" "),n.contextMenuPending=!0,s.selForContextMenu=r.doc.sel,clearTimeout(s.detectingSelectAll),no&&ro>=9&&e(),wo){Ft(t);var f=function(){$t(window,"mouseup",f),setTimeout(i,20)};Ho(window,"mouseup",f)}else setTimeout(i,50)}},readOnlyChanged:function(t){t||this.reset()},setUneditable:y,needsContentAttribute:!1},Xs.prototype),function(t){function e(e,n,r,s){t.defaults[e]=n,r&&(i[e]=s?function(t,e,i){i!=xa&&r(t,e,i)}:r)}var i=t.optionHandlers;t.defineOption=e,t.Init=xa,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Bn(t)},!0),e("indentUnit",2,Bn,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){Wn(t),si(t),gn(t)},!0),e("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var i=[],n=t.doc.first;t.doc.iter(function(t){for(var r=0;;){var s=t.text.indexOf(e,r);if(-1==s)break;r=s+e.length,i.push(O(n,s))}n++});for(var r=i.length-1;r>=0;r--)Lr(t.doc,e,i[r],O(i[r].line,i[r].ch+e.length))}}),e("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,e,i){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),i!=xa&&t.refresh()}),e("specialCharPlaceholder",fe,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",po?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!vo),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){Ps(t),$s(t)},!0),e("keyMap","default",function(t,e,i){var n=os(e),r=i!=xa&&os(i);r&&r.detach&&r.detach(t,n),n.attach&&n.attach(t,r||null)}),e("extraKeys",null),e("lineWrapping",!1,As,!0),e("gutters",[],function(t){Nn(t.options),$s(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?bi(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return qi(t)},!0),e("scrollbarStyle","native",function(t){Gi(t),qi(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Nn(t.options),$s(t)},!0),e("firstLineNumber",1,$s,!0),e("lineNumberFormatter",function(t){return t},$s,!0),e("showCursorWhenSelecting",!1,Si,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("readOnly",!1,function(t,e){"nocursor"==e?(Ni(t),t.display.input.blur(),t.display.disabled=!0):t.display.disabled=!1,t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,Ls),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,Si,!0),e("singleCursorHeightPerLine",!0,Si,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,Wn,!0),e("addModeClass",!1,Wn,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,Wn,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null)}(Ns),function(t){var e=t.optionHandlers,i=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,i){var n=this.options,r=n[t];n[t]==i&&"mode"!=t||(n[t]=i,e.hasOwnProperty(t)&&dn(this,e[t])(this,i,r))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](os(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,i=0;in&&(Ds(e,s.head.line,t,!0),n=s.head.line,r==e.doc.sel.primIndex&&tn(e));else{var o=s.from(),a=s.to(),l=Math.max(n,o.line);n=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&ur(e.doc,r,new Dn(o,u[r].to()),Po)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,O(t),e,!0)},getTokenTypeAt:function(t){t=H(this.doc,t);var e,i=Qt(this,T(this.doc,t.line)),n=0,r=(i.length-1)/2,s=t.ch;if(0==s)e=i[2];else for(;;){var o=n+r>>1;if((o?i[2*o-1]:0)>=s)r=o;else{if(!(i[2*o+1]s&&(t=s,r=!0),n=T(this.doc,t)}else n=t;return li(this,n,{top:0,left:0},e||"page",i).top+(r?this.doc.height-pt(n):0)},defaultTextHeight:function(){return mi(this.display)},defaultCharWidth:function(){return vi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,i,n,r){var s=this.display;t=hi(this,H(this.doc,t));var o=t.bottom,a=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),s.sizer.appendChild(e),"over"==n)o=t.top;else if("above"==n||"near"==n){var l=Math.max(s.wrapper.clientHeight,this.doc.height),c=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);("above"==n||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?o=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(o=t.bottom),a+e.offsetWidth>c&&(a=c-e.offsetWidth)}e.style.top=o+"px",e.style.left=e.style.right="","right"==r?(a=s.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(s.sizer.clientWidth-e.offsetWidth)/2),e.style.left=a+"px"),i&&Ji(this,a,o,a+e.offsetWidth,o+e.offsetHeight)},triggerOnKeyDown:fn(ms),triggerOnKeyPress:fn(bs),triggerOnKeyUp:ys,execCommand:function(t){if(va.hasOwnProperty(t))return va[t].call(null,this)},triggerElectric:fn(function(t){Fs(this,t)}),findPosH:function(t,e,i,n){var r=this,s=1;e<0&&(s=-1,e=-e);for(var o=H(this.doc,t),a=0;a0&&a(i.charAt(n-1));)--n;for(;r.5)&&wi(this),Lt(this,"refresh",this)}),swapDoc:fn(function(t){var e=this.doc;return e.cm=null,Kn(this,t),si(this),this.display.input.reset(),this.scrollTo(t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Se(this,"swapDoc",this,e),e}),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}},Dt(t),t.registerHelper=function(e,n,r){i.hasOwnProperty(e)||(i[e]=t[e]={_global:[]}),i[e][n]=r},t.registerGlobalHelper=function(e,n,r,s){t.registerHelper(e,n,s),i[e]._global.push({pred:r,val:s})}}(Ns);var Ta="iter insert remove copy getEditor constructor".split(" ");for(var Ma in aa.prototype)aa.prototype.hasOwnProperty(Ma)&&d(Ta,Ma)<0&&(Ns.prototype[Ma]=function(t){return function(){return t.apply(this.doc,arguments)}}(aa.prototype[Ma]));return Dt(aa),Ns.inputStyles={textarea:Xs,contenteditable:js},Ns.defineMode=function(t){Ns.defaults.mode||"null"==t||(Ns.defaults.mode=t),jt.apply(this,arguments)},Ns.defineMIME=Ut,Ns.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ns.defineMIME("text/plain","null"),Ns.defineExtension=function(t,e){Ns.prototype[t]=e},Ns.defineDocExtension=function(t,e){aa.prototype[t]=e},Ns.fromTextArea=Js,function(t){t.off=$t,t.on=Ho,t.wheelEventPixels=Vi,t.Doc=aa,t.splitLines=Vo,t.countColumn=u,t.findColumn=f,t.isWordChar=x,t.Pass=Eo,t.signal=Lt,t.Line=le,t.changeEnd=zn,t.scrollbarModel=na,t.Pos=O,t.cmpPos=D,t.modes=Uo,t.mimeModes=qo,t.resolveMode=qt,t.getMode=Kt,t.modeExtensions=Ko,t.extendMode=Gt,t.copyState=Yt,t.startState=Jt,t.innerMode=Xt,t.commands=va,t.keyMap=pa,t.keyName=ss,t.isModifierKey=rs,t.lookupKey=ns,t.normalizeKeyMap=is,t.StringStream=Go,t.SharedTextMarker=Br,t.TextMarker=Rr,t.LineWidget=zr,t.e_preventDefault=It,t.e_stopPropagation=_t,t.e_stop=Ft,t.addClass=o,t.contains=r,t.rmClass=Co,t.keyNames=ua}(Ns),Ns.version="5.21.0",Ns})},function(t,e,i){"use strict";(function(e){var n=i(0);t.exports=n.View.extend({events:{change:"onChange"},initialize:function(t){var e=this.model;this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=e.target,this.className=this.pfx+"trait",this.labelClass=this.ppfx+"label",this.fieldClass=this.ppfx+"field "+this.ppfx+"field-"+e.get("type"),this.inputhClass=this.ppfx+"input-holder",e.off("change:value",this.onValueChange),this.listenTo(e,"change:value",this.onValueChange),this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},onValueChange:function(){var t=this.model,i=this.target,n=t.get("name"),r=this.getValueForTarget();if(t.get("changeProp"))i.set(n,r);else{var s=e.clone(i.get("attributes"));s[n]=r,i.set("attributes",s)}},renderLabel:function(){this.$el.html('
'+this.getLabel()+"
")},getLabel:function(){var t=this.model,e=t.get("label")||t.get("name");return e.charAt(0).toUpperCase()+e.slice(1).replace(/-/g," ")},getInputEl:function(){if(!this.$input){var t=this.model,e=this.target,i=t.get("name"),n={placeholder:t.get("placeholder")||t.get("default"),type:t.get("type")||"text"};if(t.get("changeProp"))n.value=e.get(i);else{var r=e.get("attributes");n.value=t.get("value")||r[i]}t.get("min")&&(n.min=t.get("min")),t.get("max")&&(n.max=t.get("max")),this.$input=$("",n)}return this.$input.get(0)},getModelValue:function(){var t,e=this.model,i=this.target,n=e.get("name");if(e.get("changeProp"))t=i.get(n);else{var r=i.get("attributes");t=e.get("value")||r[n]}return t},renderField:function(){if(!this.$input){this.$el.append(this.tmpl);var t=this.getInputEl();this.$el.find("."+this.inputhClass).prepend(t)}},render:function(){return this.renderLabel(),this.renderField(),this.el.className=this.className,this}})}).call(e,i(1))},function(t,e,i){"use strict";var n=(i(0),i(3));t.exports=n.extend({tagName:"img",events:{dblclick:"openModal",click:"initResize"},initialize:function(t){n.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.listenTo(this.model,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image",this.config.modal&&(this.modal=this.config.modal),this.config.am&&(this.am=this.config.am)},updateSrc:function(){var t=this.model.get("src");this.$el.attr("src",t),t?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(t){var e=this.opts.config.em,i=e?e.get("Editor"):"";i&&i.runCommand("open-assets",{target:this.model,onSelect:function(){i.Modal.close(),i.AssetManager.setTarget(null)}})},render:function(){this.updateAttributes(),this.updateClasses();var t=this.$el.attr("class")||"";return this.model.get("src")||this.$el.attr("class",(t+" "+this.classEmpty).trim()),this.$el.attr("onmousedown","return false"),this}})},function(t,e,i){"use strict";(function(e){var n=(i(0),i(17));t.exports=e.extend({},n,{init:function(t){e.bindAll(this,"startDraw","draw","endDraw","rollback"),this.config=t||{},this.hType=this.config.newFixedH?"height":"min-height",this.allowDraw=1},enable:function(){for(var t=arguments.length,e=Array(t),i=0;i\n
<%= title %>
\n multiple/>\n
\n\n'),events:{},initialize:function(t){this.options=t||{},this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=this.collection||{},this.uploadId=this.pfx+"uploadFile",this.disabled=!this.config.upload,this.events["change #"+this.uploadId]="uploadFile";var e=this.config.uploadFile;e&&(this.uploadFile=e.bind(this)),this.delegateEvents()},uploadFile:function(t){for(var e=t.dataTransfer?t.dataTransfer.files:t.target.files,i=new FormData,n=0;ninput-holder\'>\n
\n
\n
\n
\n
'),initialize:function(t){n.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.colorCls=e+"field-color-picker",this.inputClass=e+"field "+e+"field-color",this.colorHolderClass=e+"field-colorp-c",this.listenTo(this.model,"change:value",this.handleModelChange)},handleModelChange:function(){for(var t=arguments.length,e=Array(t),i=0;i",{class:this.colorCls}),i=e.get(0).style,n=this.target&&this.target.config?this.target.config.el:"";e.spectrum({appendTo:n||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[],move:function(t){var e=1==t.getAlpha()?t.toHexString():t.toRgbString();i.backgroundColor=e},change:function(e){var n=1==e.getAlpha()?e.toHexString():e.toRgbString();n=n.replace(/ /g,""),i.backgroundColor=n,t.set("value",n)}}),this.colorEl=e}return this.colorEl},render:function(){for(var t=arguments.length,e=Array(t),i=0;iinput-holder\'>\n field-units\'>\n
\n
\n
\n
'),initialize:function(t){e.bindAll(this,"moveIncrement","upIncrement");var i=t||{},n=i.ppfx||"",r=i.contClass||n+"field";this.ppfx=n,this.docEl=$(document),this.inputCls=n+"input-number",this.unitCls=n+"input-unit",this.contClass=r,this.events["click ."+n+"field-arrow-u"]="upArrowClick",this.events["click ."+n+"field-arrow-d"]="downArrowClick",this.events["mousedown ."+n+"field-arrows"]="downIncrement",this.events["change ."+this.inputCls]="handleChange",this.events["change ."+this.unitCls]="handleUnitChange",this.listenTo(this.model,"change:unit change:value",this.handleModelChange),this.delegateEvents()},setValue:function(t,e){var i=e||{},n=this.validateInputValue(t,{deepCheck:1}),r={value:n.value};(n.unit||n.force)&&(r.unit=n.unit),this.model.set(r,i),i.silent&&this.handleModelChange()},handleChange:function(t){t.stopPropagation(),this.setValue(this.getInputEl().value)},handleUnitChange:function(t){t.stopPropagation();var e=this.getUnitEl().value;this.model.set("unit",e)},handleModelChange:function(){var t=this.model;this.getInputEl().value=t.get("value");var e=this.getUnitEl();e&&(e.value=t.get("unit"))},getInputEl:function(){return this.inputEl||(this.inputEl=$("",{type:"text",class:this.inputCls,placeholder:this.model.get("defaults")})),this.inputEl.get(0)},getUnitEl:function(){if(!this.unitEl){var t=this.model,i=t.get("units")||[];if(i.length){var n='",this.unitEl=$(n)}}return this.unitEl&&this.unitEl.get(0)},upArrowClick:function(){var t=this.model.get("value");t=isNaN(t)?1:parseInt(t,10)+1;var e=this.validateInputValue(t);this.model.set("value",e.value)},downArrowClick:function(){var t=this.model.get("value");t=isNaN(t)?0:parseInt(t,10)-1;var e=this.validateInputValue(t);this.model.set("value",e.value)},downIncrement:function(t){t.preventDefault(),this.moved=0;var e=this.model.get("value");e=isNaN(e)?0:parseInt(e,10);var i={y:t.pageY,val:e};this.docEl.mouseup(i,this.upIncrement),this.docEl.mousemove(i,this.moveIncrement)},moveIncrement:function(t){this.moved=1;var e=parseInt(t.data.val-t.pageY+t.data.y,10);return this.prValue=this.validateInputValue(e).value,this.model.set("value",this.prValue,{avoidStore:1}),!1},upIncrement:function(t){if(this.docEl.off("mouseup",this.upIncrement),this.docEl.off("mousemove",this.moveIncrement),this.prValue&&this.moved){var e=this.prValue-1;this.model.set("value",e,{avoidStore:1}).set("value",e+1)}},validateInputValue:function(t,i){var n=0,r=i||{},s=this.model,o=t||s.get("defaults"),a=s.get("units")||[],l=s.get("unit")||a.length&&a[0]||"",c=s.get("max"),u=s.get("min");if(r.deepCheck){var h=s.get("fixedValues")||[];if(o){var d=new RegExp("^"+h.join("|"),"g");if(h.length&&d.test(o))o=o.match(d)[0],l="",n=1;else{var f=o+"";o+="",o=parseFloat(o.replace(",",".")),o=isNaN(o)?s.get("defaults"):o;var p=f.replace(o,"");e.indexOf(a,p)>=0&&(l=p)}}}return void 0!==c&&""!==c&&(o=o>c?c:o),void 0!==u&&""!==u&&(o=o",{class:"clear"})),this.$el.attr("class",this.pfx+"properties"),this}})},function(t,e,i){"use strict";(function(e){var n=(i(0),i(4));t.exports=n.extend({template:e.template('\n
\n \tinput-holder\'>\n
\n
'),initialize:function(t){n.prototype.initialize.apply(this,arguments),e.bindAll(this,"build"),this.config=t.config||{},this.className=this.className+" "+this.pfx+"composite"},valueUpdated:function(){for(var t=arguments.length,e=Array(t),i=0;i",{value:0,type:"hidden"})),this.props||(this.props=t.get("properties")),!this.$props)){this.props.each(function(e,i){e&&"composite"==e.get("type")&&(this.props.remove(e),console.warn("Nested composite types not yet allowed.")),e.parent=t},this);var n=i(36),r=new n(this.getPropsConfig());this.$props=r.render().$el,this.$el.find("#"+this.pfx+"input-holder").html(this.$props)}},getPropsConfig:function(t){var e=this,i={config:this.config,collection:this.props,target:this.target,propTarget:this.propTarget,onChange:function(t,i,n){var r=e.build();e.model.set("value",r,n)},customValue:function(t,i){return e.valueOnIndex(i,t)}};return this.model.get("detached")&&delete i.onChange,i},getDefaultValue:function(){var t="";return this.props.each(function(e,i){t+=e.get("defaults")+e.get("unit")+" "}),t.replace(/ +$/,"")},valueOnIndex:function(t,e){var i=null,n=this.getComponentValue().split(" ");if(n.length&&n[t]&&(i=n[t],e&&e.model&&e.model.get("functionName"))){var r=this.fetchFromFunction(i);r&&(i=r)}return i},build:function(t,e,i){var n="";return this.model.get("properties").each(function(t){var e=t.getValue(),i=t.get("functionName");i&&(e=i+"("+e+")"),n+=e+" "}),n.replace(/ +$/,"")}})}).call(e,i(1))},function(t,e,i){"use strict";var n=i(0),r=i(185),s=i(186);t.exports=n.Collection.extend({model:r,setTarget:function(t){this.target=t},add:function(t,e){if("string"==typeof t||t instanceof Array){"string"==typeof t&&(t=[t]);for(var i=0,r=t.length;i*\/]/.test(i)?n(null,"select-op"):"."==i&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(i)?n(null,i):"u"==i&&t.match(/rl(-prefix)?\(/)||"d"==i&&t.match("omain(")||"r"==i&&t.match("egexp(")?(t.backUp(1),e.tokenize=o,n("property","word")):/[\w\\\-]/.test(i)?(t.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),n("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):t.match(/^\w+-/)?n("meta","meta"):void 0}function s(t){return function(e,i){for(var r,s=!1;null!=(r=e.next());){if(r==t&&!s){")"==t&&e.backUp(1);break}s=!s&&"\\"==r}return(r==t||!s&&")"!=t)&&(i.tokenize=null),n("string","string")}}function o(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=s(")"),n(null,"(")}function a(t,e,i){this.type=t,this.indent=e,this.prev=i}function l(t,e,i,n){return t.context=new a(i,e.indentation()+(!1===n?0:m),t.context),i}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,i){return L[i.context.type](t,e,i)}function h(t,e,i,n){for(var r=n||1;r>0;r--)i.context=i.context.prev;return u(t,e,i)}function d(t){var e=t.current().toLowerCase();g=E.hasOwnProperty(e)?"atom":M.hasOwnProperty(e)?"keyword":"variable"}var f=i.inline;i.propertyKeywords||(i=t.resolveMode("text/css"));var p,g,m=e.indentUnit,v=i.tokenHooks,y=i.documentTypes||{},b=i.mediaTypes||{},x=i.mediaFeatures||{},w=i.mediaValueKeywords||{},C=i.propertyKeywords||{},k=i.nonStandardPropertyKeywords||{},S=i.fontProperties||{},T=i.counterDescriptors||{},M=i.colorKeywords||{},E=i.valueKeywords||{},P=i.allowNested,$=!0===i.supportsAtComponent,L={};return L.top=function(t,e,i){if("{"==t)return l(i,e,"block");if("}"==t&&i.context.prev)return c(i);if($&&/@component/.test(t))return l(i,e,"atComponentBlock");if(/^@(-moz-)?document$/.test(t))return l(i,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(t))return l(i,e,"atBlock");if(/^@(font-face|counter-style)/.test(t))return i.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(i,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(i,e,"interpolation");if(":"==t)return"pseudo";if(P&&"("==t)return l(i,e,"parens")}return i.context.type},L.block=function(t,e,i){if("word"==t){var n=e.current().toLowerCase();return C.hasOwnProperty(n)?(g="property","maybeprop"):k.hasOwnProperty(n)?(g="string-2","maybeprop"):P?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":P||"hash"!=t&&"qualifier"!=t?L.top(t,e,i):(g="error","block")},L.maybeprop=function(t,e,i){return":"==t?l(i,e,"prop"):u(t,e,i)},L.prop=function(t,e,i){if(";"==t)return c(i);if("{"==t&&P)return l(i,e,"propBlock");if("}"==t||"{"==t)return h(t,e,i);if("("==t)return l(i,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 l(i,e,"interpolation")}else g+=" error";return"prop"},L.propBlock=function(t,e,i){return"}"==t?c(i):"word"==t?(g="property","maybeprop"):i.context.type},L.parens=function(t,e,i){return"{"==t||"}"==t?h(t,e,i):")"==t?c(i):"("==t?l(i,e,"parens"):"interpolation"==t?l(i,e,"interpolation"):("word"==t&&d(e),"parens")},L.pseudo=function(t,e,i){return"word"==t?(g="variable-3",i.context.type):u(t,e,i)},L.documentTypes=function(t,e,i){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",i.context.type):L.atBlock(t,e,i)},L.atBlock=function(t,e,i){if("("==t)return l(i,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,i);if("{"==t)return c(i)&&l(i,e,P?"block":"top");if("interpolation"==t)return l(i,e,"interpolation");if("word"==t){var n=e.current().toLowerCase();g="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":x.hasOwnProperty(n)?"property":w.hasOwnProperty(n)?"keyword":C.hasOwnProperty(n)?"property":k.hasOwnProperty(n)?"string-2":E.hasOwnProperty(n)?"atom":M.hasOwnProperty(n)?"keyword":"error"}return i.context.type},L.atComponentBlock=function(t,e,i){return"}"==t?h(t,e,i):"{"==t?c(i)&&l(i,e,P?"block":"top",!1):("word"==t&&(g="error"),i.context.type)},L.atBlock_parens=function(t,e,i){return")"==t?c(i):"{"==t||"}"==t?h(t,e,i,2):L.atBlock(t,e,i)},L.restricted_atBlock_before=function(t,e,i){return"{"==t?l(i,e,"restricted_atBlock"):"word"==t&&"@counter-style"==i.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,i)},L.restricted_atBlock=function(t,e,i){return"}"==t?(i.stateArg=null,c(i)):"word"==t?(g="@font-face"==i.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==i.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},L.keyframes=function(t,e,i){return"word"==t?(g="variable","keyframes"):"{"==t?l(i,e,"top"):u(t,e,i)},L.at=function(t,e,i){return";"==t?c(i):"{"==t||"}"==t?h(t,e,i):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},L.interpolation=function(t,e,i){return"}"==t?c(i):"{"==t||";"==t?h(t,e,i):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var i=(e.tokenize||r)(t,e);return i&&"object"==typeof i&&(p=i[1],i=i[0]),g=i,e.state=L[e.state](p,t,e),g},indent:function(t,e){var i=t.context,n=e&&e.charAt(0),r=i.indent;return"prop"!=i.type||"}"!=n&&")"!=n||(i=i.prev),i.prev&&("}"!=n||"block"!=i.type&&"top"!=i.type&&"interpolation"!=i.type&&"restricted_atBlock"!=i.type?(")"!=n||"parens"!=i.type&&"atBlock_parens"!=i.type)&&("{"!=n||"at"!=i.type&&"atBlock"!=i.type)||(r=Math.max(0,i.indent-m),i=i.prev):(i=i.prev,r=i.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var n=["domain","regexp","url","url-prefix"],r=e(n),s=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=e(s),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"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=e(h),f=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],p=e(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=e(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["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"],x=e(b),w=["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","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","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","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","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","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],C=e(w),k=n.concat(s).concat(a).concat(c).concat(h).concat(f).concat(b).concat(w);t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:o,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=i,i(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=i,i(t,e)):["operator","operator"]},":":function(t){return!!t.match(/\s*\{/)&&[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:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=i,i(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/,!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:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=i,i(t,e))}},name:"css",helperType:"gss"})})},function(t,e,i){!function(e){function i(t,e){for(var i=t.length;i--;)if(t[i]===e)return i;return-1}function n(t,e){if(t.length!=e.length)return!1;for(var i=0;i0;for(s in C)(!C[s]&&i(n.mods,+s)>-1||C[s]&&-1==i(n.mods,+s))&&(a=!1);(0!=n.mods.length||C[16]||C[18]||C[17]||C[91])&&!a||!1===n.method(t,n)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function o(t){var e,n=t.keyCode,r=i(E,n);if(r>=0&&E.splice(r,1),93!=n&&224!=n||(n=91),n in C){C[n]=!1;for(e in S)S[e]==n&&(l[e]=!1)}}function a(){for(x in C)C[x]=!1;for(x in S)l[x]=!1}function l(t,e,i){var n,r;n=m(t),void 0===i&&(i=e,e="all");for(var s=0;s1&&(r=v(t),t=[t[t.length-1]]),t=t[0],t=M(t),t in w||(w[t]=[]),w[t].push({shortcut:n[s],scope:e,method:i,key:n[s],mods:r})}function c(t,e){var i,r,s,o,a,l=[];for(i=m(t),o=0;o1&&(l=v(r),t=r[r.length-1]),t=M(t),void 0===e&&(e=p()),!w[t])return;for(s=0;s\n
\n
\n\n
\n\t
<%= name %>
\n\t
<%= dim %>
\n
\n
\n
\n'),initialize:function(t){n.prototype.initialize.apply(this,arguments),this.className+=" "+this.pfx+"asset-image",this.events["click #"+this.pfx+"close"]="removeItem",this.delegateEvents()},handleClick:function(){var t=this.config.onClick,e=this.model;e.collection.trigger("deselectAll"),this.$el.addClass(this.pfx+"highlight"),"function"==typeof t?t(e):this.updateTarget(e.get("src"))},handleDblClick:function(){var t=this.config.onDblClick,e=this.model;"function"==typeof t?t(e):this.updateTarget(e.get("src"));var i=e.collection.onSelect;"function"==typeof i&&i(this.model)},updateTarget:function(t){var i=this.model.collection.target;if(i&&i.set){var n=e.clone(i.get("attributes"));i.set("attributes",n),i.set("src",t)}},removeItem:function(t){t.stopPropagation(),this.model.collection.remove(this.model)},render:function(){var t=this.model.get("name"),e=this.model.get("width")&&this.model.get("height")?this.model.get("width")+" x "+this.model.get("height"):"";return t=t||this.model.get("src").split("/").pop(),t=t&&t.length>30?t.substring(0,30)+"...":t,e=e?e+(this.model.get("unitDim")?this.model.get("unitDim"):" px"):"",this.$el.html(this.template({name:t,src:this.model.get("src"),dim:e,pfx:this.pfx,ppfx:this.ppfx})),this.$el.attr("class",this.className),this}})}).call(e,i(1))},function(t,e,i){"use strict";(function(e){var n=i(0),r=i(13),s=i(47);i(14);t.exports=n.View.extend({template:e.template('\n
\n
\n
\n
\n \n
\n \n
\n
\n \n
\n
\n
\n
\n\n'),initialize:function(t){this.options=t,this.config=t.config,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.collection,"add",this.addToAsset),this.listenTo(this.collection,"deselectAll",this.deselectAll),this.className=this.pfx+"assets",this.events={},this.events.submit="addFromStr",this.delegateEvents()},addFromStr:function(t){t.preventDefault();var e=this.getInputUrl(),i=e.value.trim();if(i)return this.collection.addImg(i,{at:0}),this.getAssetsEl().scrollTop=0,e.value="",this},getAssetsEl:function(){return this.assets=this.el.querySelector("."+this.pfx+"assets"),this.assets},getInputUrl:function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector("."+this.pfx+"add-asset input")),this.inputUrl},addToAsset:function(t){this.addAsset(t)},addAsset:function(t,e){var i=e||null,n=r;t.get("type").indexOf("image")>-1&&(n=s);var o=new n({model:t,config:this.config}),a=o.render().el;if(i)i.appendChild(a);else{var l=this.getAssetsEl();l&&l.insertBefore(a,l.firstChild)}return a},deselectAll:function(){this.$el.find("."+this.pfx+"highlight").removeClass(this.pfx+"highlight")},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.addAsset(e,t)},this),this.$el.html(this.template({pfx:this.pfx,ppfx:this.ppfx,btnText:this.config.addBtnText})),this.$el.find("."+this.pfx+"assets").append(t),this}})}).call(e,i(1))},function(t,e,i){"use strict";t.exports={blocks:[],appendTo:""}},function(t,e,i){"use strict";t.exports=function(){var t,e,n={},r=i(49),s=i(52),o=i(53),a=i(55),l=[];return{name:"BlockManager",init:function(i){n=i||{};for(var c in r)c in n||(n[c]=r[c]);return t=new s(n.blocks),l=new o,e=new a({collection:t,categories:l},n),this},add:function(e,i){var n=i||{};return n.id=e,t.add(n)},get:function(e){return t.get(e)},getAll:function(){return t},getCategories:function(){return l},render:function(){return e.render().el}}}},function(t,e,i){"use strict";var n=i(0),r=i(15);t.exports=n.Model.extend({defaults:{label:"",content:"",category:"",attributes:{}},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("category"));if(t&&"string"==typeof t){new r({id:t,label:t})}}})},function(t,e,i){"use strict";var n=i(0),r=i(51);t.exports=n.Collection.extend({model:r})},function(t,e,i){"use strict";var n=i(0);t.exports=n.Collection.extend({model:i(15)})},function(t,e,i){"use strict";(function(e){var n=i(0);t.exports=n.View.extend({events:{mousedown:"onDrag"},initialize:function(t,i){e.bindAll(this,"onDrop"),this.config=i||{},this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.model,"destroy",this.remove),this.doc=$(document)},onDrag:function(t){if(0===t.button&&this.config.getSorter){this.config.em.refreshCanvas();var e=this.config.getSorter();e.setDragHelper(this.el,t),e.startSort(this.el),e.setDropContent(this.model.get("content")),this.doc.on("mouseup",this.onDrop)}},onDrop:function(){this.doc.off("mouseup",this.onDrop),this.config.getSorter().endMove()},render:function(){var t=this.ppfx+"block";return this.$el.addClass(t),this.el.innerHTML='
'+this.model.get("label")+"
",this}})}).call(e,i(1))},function(t,e,i){"use strict";(function(e){var n=i(0),r=i(54),s=i(56);t.exports=n.View.extend({initialize:function(t,i){e.bindAll(this,"getSorter","onDrag","onDrop"),this.config=i||{},this.categories=t.categories||"",this.renderedCategories=[];var n=this.config.pStylePrefix||"";this.ppfx=n,this.noCatClass=n+"blocks-no-cat",this.blockContClass=n+"blocks-c",this.catsClass=n+"block-categories",this.listenTo(this.collection,"add",this.addTo),this.em=this.config.em,this.tac="test-tac",this.grabbingCls=this.ppfx+"grabbing",this.em&&(this.config.getSorter=this.getSorter,this.canvas=this.em.get("Canvas"))},getSorter:function(){if(this.em){if(!this.sorter){var t=this.em.get("Utils"),e=this.canvas;this.sorter=new t.Sorter({container:e.getBody(),placer:e.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onStart:this.onDrag,onEndMove:this.onDrop,onMove:this.onMove,document:e.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1,em:this.em,canvasRelative:1})}return this.sorter}},onDrag:function(t){this.em.stopDefault(),this.em.trigger("block:drag:start",t)},onMove:function(t){this.em.trigger("block:drag:move",t)},onDrop:function(t){this.em.runDefault(),t&&t.get&&(t.get("activeOnRender")&&(t.trigger("active"),t.set("activeOnRender",0)),this.em.initChildrenComp(t)),this.em.trigger("block:drag:stop",t)},addTo:function(t){this.add(t)},add:function(t,e){var i=e||null,n=new r({model:t,attributes:t.get("attributes")},this.config),o=n.render().el,a=t.get("category");if(a&&this.categories){"string"==typeof a&&(a={id:a,label:a});var l=this.categories.add(a),c=l.get("id"),u=this.renderedCategories[c],h=this.getCategoriesEl();return t.set("category",l),!u&&h&&(u=new s({model:l},this.config).render(),this.renderedCategories[c]=u,h.appendChild(u.el)),void(u&&u.append(o))}i?i.appendChild(o):this.append(o)},getCategoriesEl:function(){return this.catsEl||(this.catsEl=this.el.querySelector("."+this.catsClass)),this.catsEl},getBlocksEl:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector("."+this.noCatClass+" ."+this.blockContClass)),this.blocksEl},append:function(t){var e=this.getBlocksEl();e&&e.appendChild(t)},render:function(){var t=(this.ppfx,document.createDocumentFragment());return this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n ',this.collection.each(function(e){this.add(e,t)},this),this.append(t),this.$el.addClass(this.blockContClass+"s"),this}})}).call(e,i(1))},function(t,e,i){"use strict";(function(e){var n=i(0);t.exports=n.View.extend({template:e.template('\n
\n \n <%= label %>\n
\n
\n '),events:{},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});this.config=t;var e=this.config.pStylePrefix||"";this.pfx=e,this.caretR="fa fa-caret-right",this.caretD="fa fa-caret-down",this.iconClass=e+"caret-icon",this.activeClass=e+"open",this.className=e+"block-category",this.events["click ."+e+"title"]="toggle",this.listenTo(this.model,"change:open",this.updateVisibility),this.delegateEvents()},updateVisibility:function(){this.model.get("open")?this.open():this.close()},open:function(){this.el.className=this.className+" "+this.activeClass,this.getIconEl().className=this.iconClass+" "+this.caretD,this.getBlocksEl().style.display=""},close:function(){this.el.className=this.className,this.getIconEl().className=this.iconClass+" "+this.caretR,this.getBlocksEl().style.display="none"},toggle:function(){var t=this.model;t.set("open",!t.get("open"))},getIconEl:function(){return this.iconEl||(this.iconEl=this.el.querySelector("."+this.iconClass)),this.iconEl},getBlocksEl:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector("."+this.pfx+"blocks-c")),this.blocksEl},append:function(t){this.getBlocksEl().appendChild(t)},render:function(){return this.el.innerHTML=this.template({pfx:this.pfx,label:this.model.get("label")}),this.el.className=this.className,this.updateVisibility(),this}})}).call(e,i(1))},function(t,e,i){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[]}},function(t,e,i){"use strict";t.exports=function(){var t,e,n={},r=i(57),s=i(59),o=i(61);return{getCanvasView:function(){return o},name:"Canvas",init:function(e){n=e||{};for(var i in r)i in n||(n[i]=r[i]);var a=n.pStylePrefix;a&&(n.stylePrefix=a+n.stylePrefix),t=new s(e),o=new o({model:t,config:n});var l=n.em.get("DomComponents");return l&&this.setWrapper(l),this.startAutoscroll=this.startAutoscroll.bind(this),this.stopAutoscroll=this.stopAutoscroll.bind(this),this.autoscroll=this.autoscroll.bind(this),this},setWrapper:function(e){t.set("wrapper",e)},getElement:function(){return o.el},getFrameEl:function(){return o.frame.el},getBody:function(){return o.frame.el.contentDocument.body},getWrapperEl:function(){return this.getBody().querySelector("#wrapper")},getToolsEl:function(){return o.toolsEl},getHighlighter:function(){return o.hlEl},getBadgeEl:function(){return o.badgeEl},getPlacerEl:function(){return o.placerEl},getGhostEl:function(){return o.ghostEl},getToolbarEl:function(){return o.toolbarEl},getResizerEl:function(){return o.resizerEl},getOffsetViewerEl:function(){return o.offsetEl},getFixedOffsetViewerEl:function(){return o.fixedOffsetEl},render:function(){return o.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){var e=t.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},getElementPos:function(t,e){return o.getElementPos(t,e)},getTargetToElementDim:function(t,e,i){var r=i||{},s=o.getPosition(),a=r.elPos||o.getElementPos(e),l=i.toRight||0,c=r.targetHeight||t.offsetHeight,u=r.targetWidth||t.offsetWidth,h=r.event||null,d=a.top-c,f=a.left;f+=l?a.width:0,f=l?f-u:f;var p=fa.top+a.height?a.top+a.height:g;var m={top:g,left:p,elementTop:a.top,elementLeft:a.left,elementWidth:a.width,elementHeight:a.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:s.top,canvasLeft:s.left};return h&&n.em&&n.em.trigger(h,m),m},getMouseRelativePos:function(t,e){var i=e||{},n=0,r=0,s=i.subWinOffset,o=t.target.ownerDocument,a=o.defaultView||o.parentWindow,l=a.frameElement,c=s?a.pageYOffset:0,u=s?a.pageXOffset:0;if(l){var h=l.getBoundingClientRect();n=h.top||0,r=h.left||0}return{y:t.clientY+n-c,x:t.clientX+r-u}},getMouseRelativeCanvas:function(t,e){var i=this.getFrameEl(),n=this.getBody(),r=i.offsetTop||0,s=i.offsetLeft||0,o=n.scrollTop||0,a=n.scrollLeft||0;return{y:t.clientY+r+o,x:t.clientX+s+a}},startAutoscroll:function(){this.dragging=1;var t=this.getScrollListeners();e=o.getFrameOffset(1),t.on("mousemove",this.autoscroll),t.on("mouseup",this.stopAutoscroll)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var i=this.getFrameEl().contentWindow,n=i.document.body.scrollTop,r=n,s=t.clientY,o=e.height-50;s<50&&(r-=50-s),s>o&&(r+=s-o),i.scrollTo(0,r)}},stopAutoscroll:function(){this.dragging=0;var t=this.getScrollListeners();t.off("mousemove",this.autoscroll),t.off("mouseup",this.stopAutoscroll)},getScrollListeners:function(){return this.scrollListeners||(this.scrollListeners=$(this.getFrameEl().contentWindow,this.getElement())),this.scrollListeners},getFrameWrapperEl:function(){return o.frame.getWrapper()}}}},function(t,e,i){"use strict";var n=i(0),r=i(60);t.exports=n.Model.extend({defaults:{frame:"",wrapper:"",rulers:!1},initialize:function(t){var e=this.conf||{};this.set("frame",new r(e.frame))}})},function(t,e,i){"use strict";var n=i(0);t.exports=n.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,i){"use strict";(function(e){var n=i(0),r=i(62);t.exports=n.View.extend({initialize:function(t){e.bindAll(this,"renderBody","onFrameScroll","clearOff"),this.config=t.config||{},this.em=this.config.em||{},this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"canvas",this.listenTo(this.em,"change:canvasOffset",this.clearOff),this.frame=new r({model:this.model.get("frame"),config:this.config})},onFrameScroll:function(){var t=this.frame.el.contentDocument.body;this.toolsEl.style.top="-"+t.scrollTop+"px",this.toolsEl.style.left="-"+t.scrollLeft+"px",this.em.trigger("canvasScroll")},renderScripts:function(){var t=this.frame,e=this;t.el.onload=function(){function i(n){if(n.length>0){var r=document.createElement("script");r.type="text/javascript",r.src=n.shift(),r.onerror=r.onload=i.bind(null,n),t.el.contentDocument.head.appendChild(r)}else e.renderBody()}var n=e.config.scripts.slice(0);i(n)}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var i=this.ppfx,n=this.frame.$el.contents().find("body"),r=e.get("CssComposer"),s=e.get("Config"),o=this.config,a=s.protectedCss,l="";o.styles.forEach(function(t){l+=''});var c="\n ."+i+"comp-selected{\n outline: 3px solid #3b97e3 !important\n }\n ."+i+"comp-selected-parent{\n outline: 2px solid #ffca6f !important\n }\n ",u="\n * {\n box-sizing: border-box;\n }\n html, body, #wrapper {\n min-height: 100%;\n }\n html {\n height: 100%;\n }\n body {\n margin: 0;\n height: auto;\n background-color: #fff\n }\n #wrapper {\n overflow: auto\n }\n ."+i+"dashed :not([contenteditable]) > *[data-highlightable]{outline: 1px dashed rgba(170,170,170,0.7); outline-offset: -2px}"+c+"."+i+"no-select{user-select: none; -webkit-user-select:none; -moz-user-select: none}."+i+"freezed{opacity: 0.5; pointer-events: none}."+i+"no-pointer{pointer-events: none}."+i+"plh-image{background:#f5f5f5; border:none; height:50px; width:50px; display:block; outline:3px solid #ffca6f; cursor:pointer}."+i+"grabbing{cursor: grabbing; cursor: -webkit-grabbing}* ::-webkit-scrollbar-track {background: rgba(0, 0, 0, 0.1)}* ::-webkit-scrollbar-thumb {background: rgba(255, 255, 255, 0.2)}* ::-webkit-scrollbar {width: 10px}"+(s.canvasCss||"");u+=a||"",l&&n.append(l),n.append(""),n.append(t.render()).append(r.render()),n.append(this.getJsContainer()),e.trigger("loaded"),this.frame.el.contentWindow.onscroll=this.onFrameScroll,this.frame.udpateOffset();var h=document,d=this.frame.el.contentDocument;d.addEventListener("keydown",function(t){h.dispatchEvent(new KeyboardEvent(t.type,t))}),d.addEventListener("keyup",function(t){h.dispatchEvent(new KeyboardEvent(t.type,t))})}},offset:function(t){var e=t.getBoundingClientRect(),i=t.ownerDocument.body;return{top:e.top+i.scrollTop,left:e.left+i.scrollLeft,width:e.width,height:e.height}},clearOff:function(){this.frmOff=null,this.cvsOff=null},getFrameOffset:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.frmOff&&!t||(this.frmOff=this.offset(this.frame.el)),this.frmOff},getCanvasOffset:function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},getElementPos:function(t,e){var i=e||{},n=this.getFrameOffset(),r=this.getCanvasOffset(),s=this.offset(t),o=i.avoidFrameOffset?0:n.top,a=i.avoidFrameOffset?0:n.left;return{top:s.top+o-r.top,left:s.left+a-r.left,height:t.offsetHeight,width:t.offsetWidth}},getPosition:function(){var t=this.frame.el.contentDocument.body,e=this.getFrameOffset(),i=this.getCanvasOffset();return{top:e.top+t.scrollTop-i.top,left:e.left+t.scrollLeft-i.left}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=$("
"),this.getJsContainer().append(t.scriptContainer.get(0)));var e=t.model.cid,i=t.model.get("script"),n="function(){"+i+"}";n="function"==typeof i?i.toString():n,t.el.id=e,t.scriptContainer.html(""),t.scriptContainer.append(" + @@ -774,6 +774,26 @@ width: 500px; } + .row { + display: table; + padding: 10px; + width: 100%; + } + + .cell { + width: 8%; + display: table-cell; + height: 75px; + } + + .cell30 { + width: 30%; + } + + .cell70 { + width: 70%; + } + @media (max-width: 768px){ .foot-form-cont{ width:400px; @@ -781,6 +801,11 @@ .foot-form-title{ width: auto; } + + .cell, .cell30, .cell70 { + width: 100%; + display: block; + } } @media (max-width: 480px){ @@ -792,6 +817,7 @@
diff --git a/package.json b/package.json index e919eaabd..bf19d5ffd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grapesjs", "description": "Free and Open Source Web Builder Framework", - "version": "0.8.19", + "version": "0.9.12", "author": "Artur Arseniev", "license": "BSD-3-Clause", "homepage": "http://grapesjs.com", @@ -26,11 +26,12 @@ "babel-loader": "^7.0.0", "babel-preset-es2015": "^6.24.1", "chai": "^3.5.0", + "cross-env": "^5.0.4", "documentation": "^4.0.0-beta2", "eslint": "^4.1.1", "expect": "^1.20.2", "istanbul": "^0.4.2", - "jsdom": "^11.0.0", + "jsdom": "^11.1.0", "mocha": "^3.1.2", "node-sass": "^3.4.2", "sinon": "^1.17.6", @@ -58,11 +59,11 @@ }, "scripts": { "lint": "eslint src", - "build": "WEBPACK_ENV=prod && npm run lint && npm run test && npm run v:patch && webpack && npm run build:css", + "build": "cross-env WEBPACK_ENV=prod && npm run lint && npm run test && npm run v:patch && webpack && npm run build:css", "build:css": "node-sass src/styles/scss/main.scss dist/css/grapes.min.css --output-style compressed", "v:patch": "npm version --no-git-tag-version patch", - "start": "WEBPACK_ENV=dev webpack-dev-server --progress --colors & npm run build:css -- -w", - "test": "NODE_PATH=./src mocha --compilers js:babel-core/register --require test/helper.js --timeout 10000 --recursive test/main.js", + "start": "cross-env WEBPACK_ENV=dev webpack-dev-server --progress --colors & npm run build:css -- -w", + "test": "cross-env NODE_PATH=./src mocha --compilers js:babel-core/register --require test/helper.js --timeout 10000 --recursive test/main.js", "test:dev": "npm test -- -R min -w" } } diff --git a/src/asset_manager/config/config.js b/src/asset_manager/config/config.js index efd60a8b1..531ddfa1e 100644 --- a/src/asset_manager/config/config.js +++ b/src/asset_manager/config/config.js @@ -21,4 +21,14 @@ module.exports = { // // ...send somewhere // } uploadFile: '', + + // Enable an upload dropzone on the entire editor (not document) when dragging + // files over it + dropzone: 1, + + // Open the asset manager once files are been dropped via the dropzone + openAssetsOnDrop: 1, + + // Any dropzone content to append inside dropzone element + dropzoneContent: '', }; diff --git a/src/asset_manager/index.js b/src/asset_manager/index.js index d02df0e38..a5d10a8a1 100644 --- a/src/asset_manager/index.js +++ b/src/asset_manager/index.js @@ -179,13 +179,18 @@ module.exports = () => { var name = this.storageKey; if(!d && c.stm) d = c.stm.load(name); - var assets = []; + var assets = d[name] || []; - try{ - assets = JSON.parse(d[name]); - }catch(err){} + if (typeof assets == 'string') { + try { + assets = JSON.parse(d[name]); + } catch(err) {} + } + + if (assets && assets.length) { + this.getAll().reset(assets); + } - this.getAll().reset(assets); return assets; }, @@ -201,6 +206,10 @@ module.exports = () => { return this.rendered; }, + postRender(editorView) { + fu.initDropzone(editorView); + }, + //------- /** diff --git a/src/asset_manager/view/AssetsView.js b/src/asset_manager/view/AssetsView.js index 0d0c6199d..94208064d 100644 --- a/src/asset_manager/view/AssetsView.js +++ b/src/asset_manager/view/AssetsView.js @@ -32,8 +32,9 @@ module.exports = Backbone.View.extend({ this.config = o.config; this.pfx = this.config.stylePrefix || ''; this.ppfx = this.config.pStylePrefix || ''; - this.listenTo( this.collection, 'add', this.addToAsset ); - this.listenTo( this.collection, 'deselectAll', this.deselectAll ); + this.listenTo(this.collection, 'add', this.addToAsset ); + this.listenTo(this.collection, 'deselectAll', this.deselectAll); + this.listenTo(this.collection, 'reset', this.render); this.className = this.pfx + 'assets'; this.events = {}; diff --git a/src/asset_manager/view/FileUploader.js b/src/asset_manager/view/FileUploader.js index 94722ac55..c6d47c2cb 100644 --- a/src/asset_manager/view/FileUploader.js +++ b/src/asset_manager/view/FileUploader.js @@ -13,15 +13,17 @@ module.exports = Backbone.View.extend({ events: {}, - initialize(o) { - this.options = o || {}; - this.config = o.config || {}; - this.pfx = this.config.stylePrefix || ''; - this.target = this.collection || {}; - this.uploadId = this.pfx + 'uploadFile'; - this.disabled = !this.config.upload; + initialize(opts = {}) { + this.options = opts; + const c = opts.config || {}; + this.config = c; + this.pfx = c.stylePrefix || ''; + this.ppfx = c.pStylePrefix || ''; + this.target = this.collection || {}; + this.uploadId = this.pfx + 'uploadFile'; + this.disabled = !c.upload; this.events['change #' + this.uploadId] = 'uploadFile'; - let uploadFile = this.config.uploadFile; + let uploadFile = c.uploadFile; if (uploadFile) { this.uploadFile = uploadFile.bind(this); @@ -94,6 +96,56 @@ module.exports = Backbone.View.extend({ } }, + initDropzone(ev) { + let addedCls = 0; + const c = this.config; + const em = ev.model; + const edEl = ev.el; + const editor = em && em.get('Editor'); + const frameEl = ev.model.get('Canvas').getBody(); + const ppfx = this.ppfx; + const updatedCls = `${ppfx}dropzone-active`; + const dropzoneCls = `${ppfx}dropzone`; + const cleanEditorElCls = () => { + edEl.className = edEl.className.replace(updatedCls, '').trim(); + addedCls = 0; + } + const onDragOver = () => { + if (!addedCls) { + edEl.className += ` ${updatedCls}`; + addedCls = 1; + } + return false; + }; + const onDragLeave = () => { + cleanEditorElCls(); + return false; + }; + const onDrop = (e) => { + cleanEditorElCls(); + e.preventDefault(); + this.uploadFile(e); + + if (c.openAssetsOnDrop && editor) { + const target = editor.getSelected(); + editor.runCommand('open-assets', {target}); + } + + return false; + }; + + ev.$el.append(`
${c.dropzoneContent}
`); + cleanEditorElCls(); + + if (c.dropzone && 'draggable' in edEl) { + [edEl, frameEl].forEach((item) => { + item.ondragover = onDragOver; + item.ondragleave = onDragLeave; + item.ondrop = onDrop; + }); + } + }, + render() { this.$el.html( this.template({ title: this.config.uploadText, diff --git a/src/block_manager/index.js b/src/block_manager/index.js index a0af59eec..b075c1d0e 100644 --- a/src/block_manager/index.js +++ b/src/block_manager/index.js @@ -135,6 +135,15 @@ module.exports = () => { return view.render().el; }, + /** + * Remove block by id + * @param {string} id Block id + * @return {Block} Removed block + */ + remove(id) { + return blocks.remove(id); + }, + }; }; diff --git a/src/block_manager/view/BlockView.js b/src/block_manager/view/BlockView.js index 505faa0b0..9ab5fcdc6 100644 --- a/src/block_manager/view/BlockView.js +++ b/src/block_manager/view/BlockView.js @@ -10,7 +10,7 @@ module.exports = Backbone.View.extend({ _.bindAll(this, 'onDrop'); this.config = config || {}; this.ppfx = this.config.pStylePrefix || ''; - this.listenTo(this.model, 'destroy', this.remove); + this.listenTo(this.model, 'destroy remove', this.remove); this.doc = $(document); }, diff --git a/src/canvas/config/config.js b/src/canvas/config/config.js index 4cf9dc6f9..084ac18da 100644 --- a/src/canvas/config/config.js +++ b/src/canvas/config/config.js @@ -24,4 +24,13 @@ module.exports = { */ styles: [], + /** + * Add custom badge naming strategy + * @example + * customBadgeLabel: function(ComponentModel) { + * return ComponentModel.getName(); + * } + */ + customBadgeLabel: '', + }; diff --git a/src/canvas/index.js b/src/canvas/index.js index 47a47eead..7cd64d7e8 100644 --- a/src/canvas/index.js +++ b/src/canvas/index.js @@ -54,6 +54,14 @@ module.exports = () => { return this; }, + /** + * Return config object + * @return {Object} + */ + getConfig() { + return c; + }, + /** * Add wrapper * @param {Object} wrp Wrapper @@ -203,6 +211,18 @@ module.exports = () => { }; }, + /** + * Set custom badge naming strategy + * @param {Function} f + * @example + * canvas.setCustomBadgeLabel(function(model){ + * return ComponentModel.getName(); + * }); + */ + setCustomBadgeLabel(f) { + c.customBadgeLabel = f; + }, + /** * Get element position relative to the canvas * @param {HTMLElement} el diff --git a/src/canvas/view/CanvasView.js b/src/canvas/view/CanvasView.js index e2e067f69..907749f05 100644 --- a/src/canvas/view/CanvasView.js +++ b/src/canvas/view/CanvasView.js @@ -244,20 +244,17 @@ module.exports = Backbone.View.extend({ this.getJsContainer().append(view.scriptContainer.get(0)); } - var id = view.model.cid; - var script = view.model.get('script'); - var scrStr = 'function(){' + script + '}'; - scrStr = typeof script == 'function' ? script.toString() : scrStr; - + var model = view.model; + var id = model.getId(); view.el.id = id; view.scriptContainer.html(''); - // In editor, I make use of setTimeout as during the append process of elements // those will not be available immediatly, therefore 'item' variable view.scriptContainer.append(``); }, diff --git a/src/code_manager/model/CssGenerator.js b/src/code_manager/model/CssGenerator.js index bb1bdfe7a..b4116d167 100644 --- a/src/code_manager/model/CssGenerator.js +++ b/src/code_manager/model/CssGenerator.js @@ -24,7 +24,7 @@ module.exports = Backbone.Model.extend({ } if(style && Object.keys(style).length !== 0) { - code += '#' + model.cid + '{'; + code += '#' + model.getId() + '{'; for(var prop in style){ if(style.hasOwnProperty(prop)) code += prop + ':' + style[prop] + ';'; diff --git a/src/code_manager/model/JsGenerator.js b/src/code_manager/model/JsGenerator.js index e6dc20440..ac8a0d530 100644 --- a/src/code_manager/model/JsGenerator.js +++ b/src/code_manager/model/JsGenerator.js @@ -7,16 +7,14 @@ module.exports = Backbone.Model.extend({ var script = model.get('script'); var type = model.get('type'); var comps = model.get('components'); - var id = model.cid; + var id = model.getId(); if (script) { // If the component has scripts we need to expose his ID var attr = model.get('attributes'); attr = _.extend({}, attr, {id}); model.set('attributes', attr); - - var scrStr = 'function(){' + script + '}'; - scrStr = typeof script == 'function' ? script.toString() : scrStr; + var scrStr = model.getScriptString(); // If the script was updated, I'll put its code in a separate container if (model.get('scriptUpdated')) { @@ -48,10 +46,11 @@ module.exports = Backbone.Model.extend({ for(var type in this.mapJs) { var mapType = this.mapJs[type]; var ids = '#' + mapType.ids.join(', #'); - code += 'var items = document.querySelectorAll("'+ids+'");' + - 'for (var i = 0, len = items.length; i < len; i++) {'+ - '(' + mapType.code + '.bind(items[i]))();' + - '}'; + code += ` + var items = document.querySelectorAll('${ids}'); + for (var i = 0, len = items.length; i < len; i++) { + (function(){${mapType.code}}.bind(items[i]))(); + }`; } diff --git a/src/commands/view/SelectComponent.js b/src/commands/view/SelectComponent.js index 1a81222ab..d30e37298 100644 --- a/src/commands/view/SelectComponent.js +++ b/src/commands/view/SelectComponent.js @@ -245,16 +245,21 @@ module.exports = { * */ updateBadge(el, pos) { var $el = $(el); + var canvas = this.canvas; + var config = canvas.getConfig(); + var customeLabel = config.customBadgeLabel; this.cacheEl = el; var model = $el.data("model"); if(!model || !model.get('badgable')) return; var badge = this.getBadge(); - badge.innerHTML = model.getCurrentName(); + var badgeLabel = model.getIcon() + model.getName(); + badgeLabel = customeLabel ? customeLabel(model) : badgeLabel; + badge.innerHTML = badgeLabel; var bStyle = badge.style; var u = 'px'; bStyle.display = 'block'; - var canvasPos = this.canvas.getCanvasView().getPosition(); + var canvasPos = canvas.getCanvasView().getPosition(); var badgeH = badge ? badge.offsetHeight : 0; var badgeW = badge ? badge.offsetWidth : 0; var top = pos.top - badgeH < canvasPos.top ? canvasPos.top : pos.top - badgeH; diff --git a/src/css_composer/index.js b/src/css_composer/index.js index 1c928f34a..2b87c89f3 100644 --- a/src/css_composer/index.js +++ b/src/css_composer/index.js @@ -221,8 +221,7 @@ module.exports = () => { * @return {Array} * @private */ - addCollection(data, opts) { - var opt = opts || {}; + addCollection(data, opts = {}) { var result = []; var d = data instanceof Array ? data : [data]; @@ -242,12 +241,15 @@ module.exports = () => { newSels.push(selec); } + var modelExists = this.get(newSels, rule.state, rule.mediaText, rule); var model = this.add(newSels, rule.state, rule.mediaText, rule); - if (opt.extend) { - var newStyle = _.extend({}, model.get('style'), rule.style || {}); - model.set('style', newStyle); - } else { - model.set('style', rule.style || {}); + var updateStyle = !modelExists || !opts.avoidUpdateStyle; + const style = rule.style || {}; + + if (updateStyle) { + let styleUpdate = opts.extend ? + Object.assign({}, model.get('style'), style) : style; + model.set('style', styleUpdate); } result.push(model); diff --git a/src/css_composer/model/CssRule.js b/src/css_composer/model/CssRule.js index 3447ee961..a478de592 100644 --- a/src/css_composer/model/CssRule.js +++ b/src/css_composer/model/CssRule.js @@ -1,7 +1,9 @@ +import Styleable from 'domain_abstract/model/Styleable'; + var Backbone = require('backbone'); var Selectors = require('./Selectors'); -module.exports = Backbone.Model.extend({ +module.exports = Backbone.Model.extend(Styleable).extend({ defaults: { // Css selectors diff --git a/src/dom_components/index.js b/src/dom_components/index.js index 7e6d4de78..fa9f35fde 100644 --- a/src/dom_components/index.js +++ b/src/dom_components/index.js @@ -216,7 +216,8 @@ module.exports = () => { }catch(err){} }else if(d.html) obj = d.html; - if (obj) { + + if (obj && obj.length) { this.clear(); this.getComponents().reset(); this.getComponents().add(obj); diff --git a/src/dom_components/model/Component.js b/src/dom_components/model/Component.js index 77e5cfd4e..46134133e 100644 --- a/src/dom_components/model/Component.js +++ b/src/dom_components/model/Component.js @@ -1,9 +1,15 @@ +import Styleable from 'domain_abstract/model/Styleable'; + var Backbone = require('backbone'); var Components = require('./Components'); var Selectors = require('selector_manager/model/Selectors'); var Traits = require('trait_manager/model/Traits'); -module.exports = Backbone.Model.extend({ +const escapeRegExp = (str) => { + return str.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&'); +} + +module.exports = Backbone.Model.extend(Styleable).extend({ defaults: { // HTML tag of the component @@ -58,6 +64,9 @@ module.exports = Backbone.Model.extend({ // Content of the component (not escaped) which will be appended before children rendering content: '', + // Component icon, this string will be inserted before the name, eg. '' + icon: '', + // Component related style style: {}, @@ -245,24 +254,25 @@ module.exports = Backbone.Model.extend({ }, /** - * Get name of the component + * Get the name of the component * @return {string} - * @private * */ getName() { - if(!this.name){ - var id = this.cid.replace(/\D/g,''), - type = this.get('type'); - var tag = this.get('tagName'); - tag = tag == 'div' ? 'box' : tag; - tag = type ? type : tag; - this.name = tag.charAt(0).toUpperCase() + tag.slice(1); - } - return this.name; + let customName = this.get('custom-name'); + let tag = this.get('tagName'); + tag = tag == 'div' ? 'box' : tag; + let name = this.get('type') || tag; + name = name.charAt(0).toUpperCase() + name.slice(1); + return customName || name; }, - getCurrentName() { - return this.get('custom-name') || this.getName(); + /** + * Get the icon string + * @return {string} + */ + getIcon() { + let icon = this.get('icon'); + return icon ? icon + ' ' : ''; }, /** @@ -274,17 +284,22 @@ module.exports = Backbone.Model.extend({ toHTML(opts) { var code = ''; var m = this; - var tag = m.get('tagName'), - sTag = m.get('void'), - attrId = ''; - // Build the string of attributes + var tag = m.get('tagName'); + var idFound = 0; + var sTag = m.get('void'); + var attrId = ''; var strAttr = ''; var attr = this.getAttrToHTML(); - for(var prop in attr){ + + for (var prop in attr) { + if (prop == 'id') { + idFound = 1; + } var val = attr[prop]; strAttr += typeof val !== undefined && val !== '' ? ' ' + prop + '="' + val + '"' : ''; } + // Build the string of classes var strCls = ''; m.get('classes').each(m => { @@ -293,9 +308,8 @@ module.exports = Backbone.Model.extend({ strCls = strCls !== '' ? ' class="' + strCls.trim() + '"' : ''; // If style is not empty I need an ID attached to the component - // TODO: need to refactor in case of 'ID Trait' - if(!_.isEmpty(m.get('style'))) - attrId = ' id="' + m.cid + '" '; + if(!_.isEmpty(m.get('style')) && !idFound) + attrId = ' id="' + m.getId() + '" '; code += '<' + tag + strCls + attrId + strAttr + (sTag ? '/' : '') + '>' + m.get('content'); @@ -329,6 +343,7 @@ module.exports = Backbone.Model.extend({ toJSON(...args) { var obj = Backbone.Model.prototype.toJSON.apply(this, args); var scriptStr = this.getScriptString(); + delete obj.toolbar; if (scriptStr) { obj.script = scriptStr; @@ -337,6 +352,15 @@ module.exports = Backbone.Model.extend({ return obj; }, + /** + * Return model id + * @return {string} + */ + getId() { + let attrs = this.get('attributes') || {}; + return attrs.id || this.cid; + }, + /** * Return script in string format, cleans 'function() {..' from scripts * if it's a function @@ -347,14 +371,28 @@ module.exports = Backbone.Model.extend({ getScriptString(script) { var scr = script || this.get('script'); - // Need to cast script functions to string + if (!scr) { + return scr; + } + + // Need to convert script functions to strings if (typeof scr == 'function') { var scrStr = scr.toString().trim(); - scrStr = scrStr.replace(/^function\s?\(\)\s?\{/, ''); - scrStr = scrStr.replace(/\}$/, ''); - scr = scrStr; + scrStr = scrStr.replace(/^function[\s\w]*\(\)\s?\{/, '').replace(/\}$/, ''); + scr = scrStr.trim(); } + var config = this.sm.config || {}; + var tagVarStart = escapeRegExp(config.tagVarStart || '{[ '); + var tagVarEnd = escapeRegExp(config.tagVarEnd || ' ]}'); + var reg = new RegExp(`${tagVarStart}(\\w+)${tagVarEnd}`, 'g'); + scr = scr.replace(reg, (match, v) => { + // If at least one match is found I have to track this change for a + // better optimization inside JS generator + this.scriptUpdated(); + return this.attributes[v]; + }) + return scr; } diff --git a/src/dom_components/model/ComponentSvg.js b/src/dom_components/model/ComponentSvg.js index 81fe5912f..183496c25 100644 --- a/src/dom_components/model/ComponentSvg.js +++ b/src/dom_components/model/ComponentSvg.js @@ -4,7 +4,9 @@ module.exports = Component.extend({ getName() { let name = this.get('tagName'); - return name.charAt(0).toUpperCase() + name.slice(1); + let customName = this.get('custom-name'); + name = name.charAt(0).toUpperCase() + name.slice(1); + return customName || name; }, }, { diff --git a/src/dom_components/model/Components.js b/src/dom_components/model/Components.js index 130da7189..b9d5c78e5 100644 --- a/src/dom_components/model/Components.js +++ b/src/dom_components/model/Components.js @@ -47,14 +47,19 @@ module.exports = Backbone.Collection.extend({ }, - add(models, opt) { - if(typeof models === 'string'){ + add(models, opt = {}) { + if (typeof models === 'string') { var parsed = this.editor.get('Parser').parseHtml(models); models = parsed.html; var cssc = this.editor.get('CssComposer'); - if(parsed.css && cssc){ - var added = cssc.addCollection(parsed.css, {extend: 1}); + + if (parsed.css && cssc) { + var {avoidUpdateStyle} = opt; + var added = cssc.addCollection(parsed.css, { + extend: 1, + avoidUpdateStyle + }); } } diff --git a/src/dom_components/view/ComponentView.js b/src/dom_components/view/ComponentView.js index e2246ced8..3ff711957 100644 --- a/src/dom_components/view/ComponentView.js +++ b/src/dom_components/view/ComponentView.js @@ -100,22 +100,34 @@ module.exports = Backbone.View.extend({ * @private * */ updateStatus(e) { - var s = this.model.get('status'); + var el = this.el; + var status = this.model.get('status'); var pfx = this.pfx; - var selectedClass = pfx + 'selected'; - var selectedParentClass = selectedClass + '-parent'; - - switch(s) { + var ppfx = this.ppfx; + var selectedCls = pfx + 'selected'; + var selectedParentCls = selectedCls + '-parent'; + var freezedCls = `${ppfx}freezed`; + var actualCls = el.getAttribute('class') || ''; + var cls = ''; + + switch (status) { case 'selected': - this.$el.addClass(selectedClass); - break; + cls = `${actualCls} ${selectedCls}`; + break; case 'selected-parent': - this.$el.addClass(selectedParentClass); - break; - case 'moving': - break; + cls = `${actualCls} ${selectedParentCls}`; + break; + case 'freezed': + cls = `${actualCls} ${freezedCls}`; + break; default: - this.$el.removeClass(`${selectedClass} ${selectedParentClass}`); + this.$el.removeClass(`${selectedCls} ${selectedParentCls} ${freezedCls}`); + } + + cls = cls.trim(); + + if (cls) { + el.setAttribute('class', cls); } }, diff --git a/src/domain_abstract/model/Styleable.js b/src/domain_abstract/model/Styleable.js new file mode 100644 index 000000000..5c590ca12 --- /dev/null +++ b/src/domain_abstract/model/Styleable.js @@ -0,0 +1,60 @@ +export default { + + /** + * To trigger the style change event on models I have to + * pass a new object instance + * @param {Object} prop + * @return {Object} + */ + extendStyle(prop) { + return Object.assign({}, this.getStyle(), prop); + }, + + /** + * Get style object + * @return {Object} + */ + getStyle() { + return this.get('style'); + }, + + /** + * Set new style object + * @param {Object} prop + * @param {Object} opts + */ + setStyle(prop = {}, opts = {}) { + this.set('style', Object.assign({}, prop), opts); + }, + + /** + * Add style property + * @param {Object|string} prop + * @param {string} value + * @example + * this.addStyle({color: 'red'}); + * this.addStyle('color', 'blue'); + */ + addStyle(prop, value = '', opts = {}) { + if (typeof prop == 'string') { + prop = { + prop: value + }; + } else { + opts = value || {}; + } + + prop = this.extendStyle(prop); + this.setStyle(prop, opts); + }, + + /** + * Remove style property + * @param {string} prop + */ + removeStyle(prop) { + let style = Object.assign({}, this.getStyle()); + delete style[prop]; + this.setStyle(style); + } +} diff --git a/src/domain_abstract/ui/InputColor.js b/src/domain_abstract/ui/InputColor.js index dc4962ba6..314fb13fd 100644 --- a/src/domain_abstract/ui/InputColor.js +++ b/src/domain_abstract/ui/InputColor.js @@ -47,6 +47,11 @@ module.exports = Input.extend({ var colorEl = $('
', {class: this.colorCls}); var cpStyle = colorEl.get(0).style; var elToAppend = this.target && this.target.config ? this.target.config.el : ''; + + if (typeof colorEl.spectrum == 'undefined') { + throw 'Spectrum missing, probably you load jQuery twice'; + } + colorEl.spectrum({ appendTo: elToAppend || 'body', maxSelectionSize: 8, diff --git a/src/domain_abstract/ui/InputNumber.js b/src/domain_abstract/ui/InputNumber.js index fb994e7fd..728fd5c2f 100644 --- a/src/domain_abstract/ui/InputNumber.js +++ b/src/domain_abstract/ui/InputNumber.js @@ -62,6 +62,7 @@ module.exports = Backbone.View.extend({ handleChange(e) { e.stopPropagation(); this.setValue(this.getInputEl().value); + this.elementUpdated(); }, /** @@ -71,6 +72,14 @@ module.exports = Backbone.View.extend({ e.stopPropagation(); var value = this.getUnitEl().value; this.model.set('unit', value); + this.elementUpdated(); + }, + + /** + * Fired when the element of the property is updated + */ + elementUpdated() { + this.model.trigger('el:change'); }, /** @@ -185,6 +194,7 @@ module.exports = Backbone.View.extend({ var value = this.prValue - 1; this.model.set('value', value, {avoidStore: 1}) .set('value', value + 1); + this.elementUpdated(); } }, diff --git a/src/editor/config/config.js b/src/editor/config/config.js index c11613f5d..947a4ad58 100644 --- a/src/editor/config/config.js +++ b/src/editor/config/config.js @@ -1,4 +1,3 @@ -var blkStyle = '.blk-row::after{ content: ""; clear: both; display: block;} .blk-row{padding: 10px;}'; module.exports = { // Style prefix stylePrefix: 'gjs-', @@ -63,6 +62,12 @@ module.exports = { // Comes handy for mobile-first cases mediaCondition: 'max-width', + // Starting tag for variable inside scripts in Components + tagVarStart: '{[ ', + + // Ending tag for variable inside scripts in Components + tagVarEnd: ' ]}', + // This option makes available custom component types also for loaded // elements inside canvas loadCompsOnRender: 1, @@ -163,150 +168,6 @@ module.exports = { }, //Configurations for Block Manager - blockManager: { - blocks: [{ - id: 'b1', - label: '1 Block', - category: 'Basic', - content: '
', - attributes: {class:'gjs-fonts gjs-f-b1'} - },{ - id: 'b2', - label: '2 Blocks', - category: 'Basic', - content: '
', - attributes: {class:'gjs-fonts gjs-f-b2'} - },{ - id: 'b3', - label: '3 Blocks', - category: 'Basic', - content: '
', - attributes: {class:'gjs-fonts gjs-f-b3'} - },{ - id: 'b4', - label: '3/7 Block', - category: 'Basic', - content: '
', - attributes: {class:'gjs-fonts gjs-f-b37'} - },{ - id: 'hero', - label: 'Hero section', - category: 'Section', - content: '
'+ - '
'+ - '
'+ - '
Build your templates without coding
'+ - '
Try it now
', - attributes: {class:'gjs-fonts gjs-f-hero'} - },{ - id: 'h1p', - label: 'Text section', - category: 'Typography', - content: '

Insert title here

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

', - attributes: {class:'gjs-fonts gjs-f-h1p'} - },{ - id: '3ba', - label: 'Badges', - category: 'Section', - content: '
'+ - '
'+ - '
'+ - ''+ - '
'+ - '
Adam Smith
CEO
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
'+ - '
'+ - '
ftln
'+ - '
'+ - '
'+ - '
'+ - ''+ - '
'+ - '
John Black
Software Engineer
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
'+ - '
'+ - '
ftln
'+ - '
'+ - '
'+ - '
'+ - ''+ - '
'+ - '
Jessica White
Web Designer
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
'+ - '
'+ - '
ftln'+ - '
'+ - '
', - attributes: {class:'gjs-fonts gjs-f-3ba'} - },{ - id: 'text', - label: 'Text', - attributes: {class:'gjs-fonts gjs-f-text'}, - category: 'Basic', - content: { - type:'text', - content:'Insert your text here', - style: {padding: '10px' }, - activeOnRender: 1 - }, - },{ - id: 'image', - label: 'Image', - category: 'Basic', - attributes: {class:'gjs-fonts gjs-f-image'}, - content: { - style: {color: 'black'}, - type:'image', - activeOnRender: 1 - }, - },{ - id: 'quo', - label: 'Quote', - category: 'Typography', - content: '
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
', - attributes: {class:'fa fa-quote-right'} - },{ - id: 'link', - label: 'Link', - category: 'Basic', - attributes: {class:'fa fa-link'}, - content: { - type:'link', - content:'Link', - style:{color: '#d983a6'} - }, - },{ - id: 'map', - label: 'Map', - category: 'Extra', - attributes: {class:'fa fa-map-o'}, - content: { - type: 'map', - style: {height: '350px'} - }, - },{ - id: 'video', - label: 'Video', - category: 'Basic', - attributes: {class:'fa fa-youtube-play'}, - content: { - type: 'video', - src: 'img/video2.webm', - style: { - height: '350px', - width: '615px', - } - }, - }/*,{ - id: 'table', - label: 'Table', - attributes: {class:'fa fa-table'}, - content: { - type: 'table', - columns: 3, - rows: 5, - style: {height: '150px', width: '100%'} - }, - }*/], - }, + blockManager: {}, }; diff --git a/src/editor/index.js b/src/editor/index.js index e11db0a8d..4df32e796 100644 --- a/src/editor/index.js +++ b/src/editor/index.js @@ -10,6 +10,7 @@ * * [getStyle](#getstyle) * * [setStyle](#setstyle) * * [getSelected](#getselected) + * * [getSelectedToStyle](#getselectedtostyle) * * [setDevice](#setdevice) * * [getDevice](#getdevice) * * [runCommand](#runcommand) @@ -36,6 +37,8 @@ * component:update:{propertyName} - Listen any property change * component:styleUpdate - Triggered when the style of the component is updated * component:styleUpdate:{propertyName} - Listen for a specific style property change + * styleManager:change - Triggered on style property change from new selected component, the view of the property is passed as an argument to the callback + * styleManager:change:{propertyName} - As above but for a specific style property * storage:load - Triggered when something was loaded from the storage, loaded object passed as an argumnet * storage:store - Triggered when something is stored to the storage, stored object passed as an argumnet * canvasScroll - Triggered when the canvas is scrolled @@ -82,10 +85,9 @@ module.exports = config => { if (!(name in c)) c[name] = defaults[name]; } - c.pStylePrefix = c.stylePrefix; + c.pStylePrefix = c.stylePrefix; var em = new EditorModel(c); - var editorView = new EditorView({ model: em, config: c, @@ -260,6 +262,10 @@ module.exports = config => { /** * Add components * @param {Array|Object|string} components HTML string or components model + * @param {Object} opts Options + * @param {Boolean} [opts.avoidUpdateStyle=false] If the HTML string contains styles, + * by default, they will be created and, if already exist, updated. When this option + * is true, styles already created will not be updated. * @return {Model|Array} * @example * editor.addComponents('
New component
'); @@ -270,8 +276,8 @@ module.exports = config => { * content: 'New component' * }); */ - addComponents(components) { - return this.getComponents().add(components); + addComponents(components, opts) { + return this.getComponents().add(components, opts); }, /** @@ -301,12 +307,28 @@ module.exports = config => { /** * Returns selected component, if there is one - * @return {grapesjs.Component} + * @return {Model} */ getSelected() { return em.getSelected(); }, + /** + * Get a stylable entity from the selected component. + * If you select a component without classes the entity is the Component + * itself and all changes will go inside its 'style' attribute. Otherwise, + * if the selected component has one or more classes, the function will + * return the corresponding CSS Rule + * @return {Model} + */ + getSelectedToStyle() { + let selected = em.getSelected(); + + if (selected) { + return this.StyleManager.getModelToStyle(selected); + } + }, + /** * Set device to the editor. If the device exists it will * change the canvas to the proper width @@ -379,10 +401,11 @@ module.exports = config => { /** * Load data from the current storage + * @param {Function} clb Callback function * @return {Object} Stored data */ - load() { - return em.load(); + load(clb) { + return em.load(clb); }, /** @@ -493,7 +516,16 @@ module.exports = config => { * @return {HTMLElement} */ render() { - return editorView.render().el; + // Do post render stuff after the iframe is loaded otherwise it'll + // be empty during tests + em.on('loaded', () => { + em.get('modules').forEach((module) => { + module.postRender && module.postRender(editorView); + }); + }); + + editorView.render(); + return editorView.el; }, }; diff --git a/src/editor/model/Editor.js b/src/editor/model/Editor.js index ff4dd09f6..5e3db033d 100644 --- a/src/editor/model/Editor.js +++ b/src/editor/model/Editor.js @@ -32,6 +32,7 @@ module.exports = Backbone.Model.extend({ previousModel: null, changesCount: 0, storables: [], + modules: [], toLoad: [], opened: {}, device: '', @@ -40,6 +41,7 @@ module.exports = Backbone.Model.extend({ initialize(c) { this.config = c; this.set('Config', c); + this.set('modules', []); if(c.el && c.fromElement) this.config.components = c.el.innerHTML; @@ -117,6 +119,7 @@ module.exports = Backbone.Model.extend({ if(M.onLoad) this.get('toLoad').push(M); + this.get('modules').push(M); return this; }, @@ -161,6 +164,12 @@ module.exports = Backbone.Model.extend({ * @private * */ componentsUpdated(model, val, opt) { + var temp = opt ? opt.temporary : 0; + if (temp) { + //component has been added temporarily - do not update storage or record changes + return; + } + timedInterval && clearInterval(timedInterval); timedInterval = setTimeout(() => { var count = this.get('changesCount') + 1; @@ -276,12 +285,12 @@ module.exports = Backbone.Model.extend({ this.stopListening(classes, 'add remove', this.componentsUpdated); this.listenTo(classes, 'add remove', this.componentsUpdated); - var evn = 'change:style change:content'; + var evn = 'change:style change:content change:attributes'; this.stopListening(model, evn, this.componentsUpdated); this.listenTo(model, evn, this.componentsUpdated); if(!avSt) - this.componentsUpdated(); + this.componentsUpdated(model, val, opt); }, /** @@ -310,7 +319,7 @@ module.exports = Backbone.Model.extend({ var avSt = opt ? opt.avoidStore : 0; if(!avSt) - this.componentsUpdated(); + this.componentsUpdated(model, val, opt); }, /** @@ -428,9 +437,9 @@ module.exports = Backbone.Model.extend({ sm.store(store, () => { clb && clb(); + this.set('changesCount', 0); this.trigger('storage:store', store); }); - this.set('changesCount', 0); return store; }, diff --git a/src/editor/view/EditorView.js b/src/editor/view/EditorView.js index 08fffc198..2e8e3bef2 100644 --- a/src/editor/view/EditorView.js +++ b/src/editor/view/EditorView.js @@ -3,6 +3,7 @@ var Backbone = require('backbone'); module.exports = Backbone.View.extend({ initialize() { + this.model.view = this; this.pn = this.model.get('Panels'); this.conf = this.model.config; this.className = this.conf.stylePrefix + 'editor'; diff --git a/src/grapesjs/index.js b/src/grapesjs/index.js index 7f14ff74c..54b2459b5 100644 --- a/src/grapesjs/index.js +++ b/src/grapesjs/index.js @@ -1,5 +1,4 @@ module.exports = (config => { - var c = config || {}, defaults = require('./config/config'), Editor = require('editor'), @@ -36,6 +35,11 @@ var c = config || {}; var els = c.container; + // Make a missing $ more verbose + if (typeof $ == 'undefined') { + throw 'jQuery not found'; + } + // Set default options for (var name in defaults) { if (!(name in c)) @@ -48,17 +52,18 @@ c.el = document.querySelector(els); var editor = new Editor(c).init(); - // Execute all plugins + // Execute plugins var plugs = plugins.getAll(); - for (var id in plugs){ - // Check if plugin is requested - if(c.plugins.indexOf(id) < 0) - continue; - - var opts = c.pluginsOpts[id] || {}; - var plug = plugins.get(id); - plug(editor, opts); - } + + c.plugins.forEach((pluginId) => { + let plugin = plugins.get(pluginId); + + if (plugin) { + plugin(editor, c.pluginsOpts[pluginId] || {}); + } else { + console.warn(`Plugin ${pluginId} not found`); + } + }); if(c.autorender) editor.render(); diff --git a/src/navigator/view/ItemView.js b/src/navigator/view/ItemView.js index 05555c589..462a00796 100644 --- a/src/navigator/view/ItemView.js +++ b/src/navigator/view/ItemView.js @@ -1,4 +1,5 @@ var Backbone = require('backbone'); +var ComponentView = require('dom_components/view/ComponentView'); var ItemsView; module.exports = Backbone.View.extend({ @@ -12,6 +13,7 @@ module.exports = Backbone.View.extend({
+ <%= icon %>
@@ -42,7 +44,6 @@ module.exports = Backbone.View.extend({ this.inputNameCls = this.ppfx + 'nav-comp-name'; this.caretCls = this.ppfx + 'nav-item-caret'; this.titleCls = this.pfx + 'title'; - this.customNameProp = 'custom-name'; this.events = {}; this.events['click > #'+this.pfx+'btn-eye'] = 'toggleVisibility'; this.events['click .' + this.caretCls] = 'toggleOpening'; @@ -76,7 +77,7 @@ module.exports = Backbone.View.extend({ e.stopPropagation(); var inputName = this.getInputName(); inputName.readOnly = true; - this.model.set(this.customNameProp, inputName.value); + this.model.set('custom-name', inputName.value); }, /** @@ -174,18 +175,7 @@ module.exports = Backbone.View.extend({ * @param Event * */ updateStatus(e) { - var status = this.model.get('status'); - var cls = this.pfx + 'selected'; - var el = this.$el; - switch(status) { - case 'selected': - el.addClass(cls); - break; - case 'moving': - break; - default: - el.removeClass(cls); - } + ComponentView.prototype.updateStatus.apply(this, arguments); }, /** @@ -265,12 +255,14 @@ module.exports = Backbone.View.extend({ }, render() { + let model = this.model; var pfx = this.pfx; var vis = this.isVisible(); - var count = this.countChildren(this.model); + var count = this.countChildren(model); this.$el.html( this.template({ - title: this.model.get(this.customNameProp) || this.model.getName(), + title: model.getName(), + icon: model.getIcon(), addClass: (count ? '' : pfx+'no-chld'), editBtnCls: this.editBtnCls, inputNameCls: this.inputNameCls, @@ -285,15 +277,15 @@ module.exports = Backbone.View.extend({ if(typeof ItemsView == 'undefined') ItemsView = require('./ItemsView'); this.$components = new ItemsView({ - collection : this.model.components, + collection : model.components, config: this.config, sorter: this.sorter, opened: this.opt.opened, - parent: this.model + parent: model }).render().$el; this.$el.find('.'+ pfx +'children').html(this.$components); this.$caret = this.$el.find('> .' + pfx + 'title-c > .' + pfx + 'title > #' + pfx + 'caret'); - if(!this.model.get('draggable') || !this.config.sortable){ + if(!model.get('draggable') || !this.config.sortable){ this.$el.find('> #' + pfx + 'move').detach(); } if(!vis) diff --git a/src/navigator/view/ItemsView.js b/src/navigator/view/ItemsView.js index e17cf95e9..7aba9c0ec 100644 --- a/src/navigator/view/ItemsView.js +++ b/src/navigator/view/ItemsView.js @@ -22,6 +22,7 @@ module.exports = Backbone.View.extend({ containerSel: '.' + pfx + 'items', itemSel: '.' + pfx + 'item', ppfx: this.ppfx, + ignoreViewChildren: 1, pfx, nested: 1 }); @@ -34,6 +35,10 @@ module.exports = Backbone.View.extend({ // For the sorter this.$el.data('collection', this.collection); + + if (this.parent) { + this.$el.data('model', this.parent); + } }, /** diff --git a/src/parser/model/ParserHtml.js b/src/parser/model/ParserHtml.js index 7e1ccc63e..8ef0a52ad 100644 --- a/src/parser/model/ParserHtml.js +++ b/src/parser/model/ParserHtml.js @@ -25,7 +25,7 @@ module.exports = config => { if(!decl) continue; var prop = decl.split(':'); - result[prop[0].trim()] = prop[1].trim(); + result[prop[0].trim()] = prop.slice(1).join(':').trim(); } return result; }, diff --git a/src/rich_text_editor/config/config.js b/src/rich_text_editor/config/config.js index 26d08007d..b2d8b6a56 100644 --- a/src/rich_text_editor/config/config.js +++ b/src/rich_text_editor/config/config.js @@ -1,7 +1,12 @@ module.exports = { stylePrefix : 'rte-', toolbarId : 'toolbar', - containerId : 'wrapper', + + // If true, moves the toolbar below the element when the top canvas + // edge is reached + adjustToolbar: 1, + + // Default toolbar commands commands : [{ command: 'bold', title: 'Bold', diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index 71c37b324..242f7d60b 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -113,7 +113,7 @@ module.exports = () => { }, /** - * Triggered when the offset of the editro is changed + * Triggered when the offset of the editor is changed * @private */ udpatePosition() { @@ -122,6 +122,14 @@ module.exports = () => { var pos = canvas.getTargetToElementDim(toolbar.el, this.lastEl, { event: 'rteToolbarPosUpdate', }); + + if (c.adjustToolbar) { + // Move the toolbar down when the top canvas edge is reached + if (pos.top <= pos.canvasTop) { + pos.top = pos.elementTop + pos.elementHeight; + } + } + var toolbarStyle = toolbar.el.style; toolbarStyle.top = pos.top + u; toolbarStyle.left = pos.left + u; diff --git a/src/selector_manager/view/ClassTagView.js b/src/selector_manager/view/ClassTagView.js index 2773ce39a..9ce1ee534 100644 --- a/src/selector_manager/view/ClassTagView.js +++ b/src/selector_manager/view/ClassTagView.js @@ -94,14 +94,17 @@ module.exports = Backbone.View.extend({ * @private */ updateStatus() { + var chkOn = 'fa-check-square-o'; + var chkOff = 'fa-square-o'; + if(!this.$chk) this.$chk = this.$el.find('#' + this.pfx + 'checkbox'); if(this.model.get('active')){ - this.$chk.removeClass('fa-circle-o').addClass('fa-dot-circle-o'); + this.$chk.removeClass(chkOff).addClass(chkOn); this.$el.removeClass('opac50'); }else{ - this.$chk.removeClass('fa-dot-circle-o').addClass('fa-circle-o'); + this.$chk.removeClass(chkOn).addClass(chkOff); this.$el.addClass('opac50'); } }, diff --git a/src/style_manager/config/config.js b/src/style_manager/config/config.js index 8712cf819..44160130b 100644 --- a/src/style_manager/config/config.js +++ b/src/style_manager/config/config.js @@ -9,4 +9,25 @@ module.exports = { // Hide the property in case it's not stylable for the // selected component (each component has 'stylable' property) hideNotStylable: true, + + // Highlight changed properties of the selected component + highlightChanged: true, + + // Highlight computed properties of the selected component + highlightComputed: true, + + // Show computed properties of the selected component, if this value + // is set to false, highlightComputed will not take effect + showComputed: true, + + // Adds the possibility to clear property value from the target style + clearProperties: false, + + // Properties which are valid to be shown as computed + // (Identified as inherited properties: https://developer.mozilla.org/en-US/docs/Web/CSS/inheritance) + validComputed: ['border-collapse', 'border-spacing', 'caption-side', 'color', 'cursor', 'direction', 'empty-cells', + 'font-family', 'font-size', 'font-style', 'font-variant', 'font-weight', 'font-size-adjust', 'font-stretch', 'font', + 'letter-spacing', 'line-height', 'list-style-image', 'list-style-position', 'list-style-type', 'list-style', 'orphans', + 'quotes', 'tab-size', 'text-align', 'text-align-last', 'text-decoration-color', 'text-indent', 'text-justify', + 'text-shadow', 'text-transform', 'visibility', 'white-space', 'widows', 'word-break', 'word-spacing', 'word-wrap'], }; diff --git a/src/style_manager/model/Layers.js b/src/style_manager/model/Layers.js index 41f09b7cd..2316620f7 100644 --- a/src/style_manager/model/Layers.js +++ b/src/style_manager/model/Layers.js @@ -18,6 +18,6 @@ module.exports = Backbone.Collection.extend({ onReset() { this.idx = 1; - }, + } }); diff --git a/src/style_manager/model/Property.js b/src/style_manager/model/Property.js index 059765856..ae8edb6e5 100644 --- a/src/style_manager/model/Property.js +++ b/src/style_manager/model/Property.js @@ -17,6 +17,7 @@ module.exports = Backbone.Model.extend({ detached: false, visible: true, functionName: '', + status: '', properties: [], layers: [], list: [], diff --git a/src/style_manager/model/PropertyFactory.js b/src/style_manager/model/PropertyFactory.js index ef3df0cf2..4e13cdfe1 100644 --- a/src/style_manager/model/PropertyFactory.js +++ b/src/style_manager/model/PropertyFactory.js @@ -95,9 +95,9 @@ module.exports = () => ({ } // Defaults - switch(prop){ + switch(prop) { case 'float': case 'background-color': - case 'background-image': + case 'background-image': case 'text-shadow': obj.defaults = 'none'; break; case 'display': diff --git a/src/style_manager/view/LayerView.js b/src/style_manager/view/LayerView.js index 79f8a2652..ffb721e08 100644 --- a/src/style_manager/view/LayerView.js +++ b/src/style_manager/view/LayerView.js @@ -19,21 +19,26 @@ module.exports = Backbone.View.extend({
`), initialize(o) { + let model = this.model; this.stackModel = o.stackModel || {}; this.config = o.config || {}; this.pfx = this.config.stylePrefix || ''; this.className = this.pfx + 'layer'; this.sorter = o.sorter || null; - this.listenTo(this.model, 'destroy remove', this.remove); - this.listenTo(this.model, 'change:value', this.valueChanged); - this.listenTo(this.model, 'change:props', this.showProps); + this.listenTo(model, 'destroy remove', this.remove); + this.listenTo(model, 'change:value', this.valueChanged); + this.listenTo(model, 'change:props', this.showProps); this.events['click #' + this.pfx + 'close-layer'] = 'remove'; this.events['mousedown > #' + this.pfx + 'move'] = 'initSorter'; - if( !this.model.get('preview') ){ + if (!model.get('preview')) { this.$el.addClass(this.pfx + 'no-preview'); } - this.$el.data('model', this.model); + + // For the sorter + model.view = this; + model.set({droppable: 0, draggable: 1}); + this.$el.data('model', model); this.delegateEvents(); }, diff --git a/src/style_manager/view/LayersView.js b/src/style_manager/view/LayersView.js index 51a6c1690..84a710aa0 100644 --- a/src/style_manager/view/LayersView.js +++ b/src/style_manager/view/LayersView.js @@ -9,23 +9,29 @@ module.exports = Backbone.View.extend({ this.preview = o.preview; this.pfx = this.config.stylePrefix || ''; this.ppfx = this.config.pStylePrefix || ''; - this.className = this.pfx + 'layers ' + this.ppfx + 'field'; - this.listenTo( this.collection, 'add', this.addTo); - this.listenTo( this.collection, 'deselectAll', this.deselectAll ); - this.listenTo( this.collection, 'reset', this.render); + let pfx = this.pfx; + let ppfx = this.ppfx; + let collection = this.collection; + this.className = `${pfx}layers ${ppfx}field`; + this.listenTo(collection, 'add', this.addTo); + this.listenTo(collection, 'deselectAll', this.deselectAll ); + this.listenTo(collection, 'reset', this.render); var em = this.config.em || ''; var utils = em ? em.get('Utils') : ''; this.sorter = utils ? new utils.Sorter({ container: this.el, - containerSel: '.' + this.pfx + 'layers', - itemSel: '.' + this.pfx + 'layer', + ignoreViewChildren: 1, + containerSel: `.${pfx}layers`, + itemSel: `.${pfx}layer`, pfx: this.config.pStylePrefix, }) : ''; - this.$el.data('model', {}); - this.$el.data('collection', this.collection); + // For the Sorter + collection.view = this; + this.$el.data('model', collection); + this.$el.data('collection', collection); }, /** diff --git a/src/style_manager/view/PropertyCompositeView.js b/src/style_manager/view/PropertyCompositeView.js index a25ed1122..f5d10d1a0 100644 --- a/src/style_manager/view/PropertyCompositeView.js +++ b/src/style_manager/view/PropertyCompositeView.js @@ -99,7 +99,7 @@ module.exports = PropertyView.extend({ this.props.each((prop, index) => { str += prop.get('defaults') + prop.get('unit') + ' '; }); - return str.replace(/ +$/,''); + return this.model.get('defaults') || str.replace(/ +$/,''); }, /** diff --git a/src/style_manager/view/PropertyFileView.js b/src/style_manager/view/PropertyFileView.js index 7fe463ee9..df6c4bac1 100644 --- a/src/style_manager/view/PropertyFileView.js +++ b/src/style_manager/view/PropertyFileView.js @@ -41,14 +41,15 @@ module.exports = PropertyView.extend({ this.$previewBox = this.$el.find('#' + this.pfx + 'preview-box'); } - if(!this.componentValue || this.componentValue == this.defaultValue) - this.setPreviewView(0); - else - this.setPreviewView(1); - this.setValue(this.componentValue, 0); }, + setValue(value, f) { + PropertyView.prototype.setValue.apply(this, arguments); + this.setPreviewView(value && value != this.getDefaultValue()); + this.setPreview(value); + }, + /** * Change visibility of the preview box * @param bool Visibility @@ -84,11 +85,6 @@ module.exports = PropertyView.extend({ this.$preview.css('background-image', "url(" + url + ")"); }, - /** @inheritdoc */ - setValue(value, f) { - PropertyView.prototype.setValue.apply(this, arguments); - this.setPreview(value); - }, /** @inheritdoc */ renderTemplate() { @@ -124,15 +120,20 @@ module.exports = PropertyView.extend({ * */ openAssetManager(e) { var that = this; - if(this.modal && this.am){ + var em = this.em; + var editor = em ? em.get('Editor') : ''; + + if(editor) { this.modal.setTitle('Select image'); this.modal.setContent(this.am.render()); this.am.setTarget(null); - this.modal.open(); - this.am.onSelect(model => { - that.modal.close(); - that.spreadUrl(model.get('src')); - that.valueChanged(e); + editor.runCommand('open-assets', { + target: this.model, + onSelect(target) { + that.modal.close(); + that.spreadUrl(target.get('src')); + that.valueChanged(e); + } }); } }, diff --git a/src/style_manager/view/PropertyIntegerView.js b/src/style_manager/view/PropertyIntegerView.js index 3711e7132..856ae3183 100644 --- a/src/style_manager/view/PropertyIntegerView.js +++ b/src/style_manager/view/PropertyIntegerView.js @@ -6,7 +6,8 @@ module.exports = PropertyView.extend({ initialize(options) { PropertyView.prototype.initialize.apply(this, arguments); - this.listenTo( this.model ,'change:unit', this.valueChanged); + this.listenTo(this.model, 'change:unit', this.valueChanged); + this.listenTo(this.model, 'el:change', this.elementUpdated); }, /** diff --git a/src/style_manager/view/PropertyStackView.js b/src/style_manager/view/PropertyStackView.js index 9a44b1b45..286bd87f3 100644 --- a/src/style_manager/view/PropertyStackView.js +++ b/src/style_manager/view/PropertyStackView.js @@ -7,7 +7,7 @@ module.exports = PropertyCompositeView.extend({ template: _.template(`
- +
`), @@ -28,18 +28,13 @@ module.exports = PropertyCompositeView.extend({ * so we gonna check all props and fine if there is some differences. * */ targetUpdated(...args) { - if(!this.model.get('detached')) + if (!this.model.get('detached')) { PropertyCompositeView.prototype.targetUpdated.apply(this, args); - else { + } else { this.checkVisibility(); - this.refreshLayers(); - - /* - this.model.get('properties').each(function(prop) { - console.log(prop.get('property'), ' - ', prop.get('value')); - }); - */ } + + this.refreshLayers(); }, /** @@ -115,7 +110,7 @@ module.exports = PropertyCompositeView.extend({ // If detached the value in this case is stacked, eg. substack-prop: 1px, 2px, 3px... if (this.model.get('detached')) { - var targetValue = propView.getTargetValue(); + var targetValue = propView.getTargetValue({ignoreCustomValue: 1}); var valist = (targetValue + '').split(','); result = valist[layerIndex]; result = result ? result.trim() : propView.getDefaultValue(); @@ -283,7 +278,10 @@ module.exports = PropertyCompositeView.extend({ fieldName = 'values'; a = this.getLayersFromTarget(); } else { - var v = this.getComponentValue(); + //var v = this.getComponentValue(); + var v = this.getTargetValue(); + var vDef = this.getDefaultValue(); + v = v == vDef ? '' : v; if (v) { // Remove spaces inside functions: // eg: @@ -321,6 +319,7 @@ module.exports = PropertyCompositeView.extend({ this.renderField(); this.renderLayers(); this.$el.attr('class', this.className); + this.updateStatus(); return this; }, diff --git a/src/style_manager/view/PropertyView.js b/src/style_manager/view/PropertyView.js index 172ed16af..9e2cf308c 100644 --- a/src/style_manager/view/PropertyView.js +++ b/src/style_manager/view/PropertyView.js @@ -9,12 +9,15 @@ module.exports = Backbone.View.extend({ templateLabel: _.template(`
-
+ <%= label %> -
+ +
`), - events: {'change': 'valueUpdated'}, + events: { + 'change': 'valueUpdated' + }, initialize(o) { this.config = o.config || {}; @@ -29,8 +32,9 @@ module.exports = Backbone.View.extend({ this.defaultValue = this.model.get('defaults'); this.property = this.model.get('property'); this.input = this.$input = null; - this.className = this.pfx + 'property'; - this.inputHolderId = '#' + this.pfx + 'input-holder'; + const pfx = this.pfx; + this.className = pfx + 'property'; + this.inputHolderId = '#' + pfx + 'input-holder'; this.sector = this.model.collection && this.model.collection.sector; if(!this.model.get('value')) @@ -41,46 +45,155 @@ module.exports = Backbone.View.extend({ this.listenTo(this.model, 'change:value', this.valueChanged); this.listenTo(this.model, 'targetUpdated', this.targetUpdated); this.listenTo(this.model, 'change:visible', this.updateVisibility); + this.listenTo(this.model, 'change:status', this.updateStatus); + this.events[`click .${pfx}clear`] = 'clear'; + this.delegateEvents(); + }, + + updateStatus() { + const status = this.model.get('status'); + const pfx = this.pfx; + const ppfx = this.ppfx; + const config = this.config; + const updatedCls = `${ppfx}color-hl`; + const computedCls = `${ppfx}color-warn`; + const labelEl = this.$el.find(`> .${pfx}label`); + const clearStyle = this.getClearEl().style; + labelEl.removeClass(`${updatedCls} ${computedCls}`); + clearStyle.display = 'none'; + + switch (status) { + case 'updated': + labelEl.addClass(updatedCls); + + if (config.clearProperties) { + clearStyle.display = 'inline'; + } + break; + case 'computed': + labelEl.addClass(computedCls); + break; + } + }, + + /** + * Clear the property + */ + clear() { + const target = this.getTargetModel(); + target.removeStyle(this.model.get('property')); + this.targetUpdated(); + }, + + /** + * Get clear element + * @return {HTMLElement} + */ + getClearEl() { + return this.el.querySelector(`.${this.pfx}clear`); }, /** * Returns selected target which should have 'style' property + * @deprecated * @return {Model|null} */ getTarget() { - if(this.selectedComponent) - return this.selectedComponent; - return this.propTarget ? this.propTarget.model : null; + return this.propTarget && this.propTarget.model; + }, + + /** + * Returns Styleable model + * @return {Model|null} + */ + getTargetModel() { + return this.propTarget && this.propTarget.model; + }, + + /** + * Returns helper Styleable model + * @return {Model|null} + */ + getHelperModel() { + return this.propTarget && this.propTarget.helper; }, /** * Fired when the input value is updated */ valueUpdated() { - if(this.$input) - this.model.set('value', this.getInputValue()); + this.model.set('value', this.getInputValue()); + this.elementUpdated(); }, /** - * Fired when the target is updated + * Fired when the element of the property is updated + */ + elementUpdated() { + this.model.set('status', 'updated'); + }, + + /** + * Fired when the target is changed * */ targetUpdated() { - this.selectedComponent = this.propTarget.model; - this.helperComponent = this.propTarget.helper; - this.checkVisibility(); + if (!this.checkVisibility()) { + return; + } + + let value = ''; + let status = ''; + let targetValue = this.getTargetValue({ignoreDefault: 1}); + let defaultValue = this.getDefaultValue(); + let computedValue = this.getComputedValue(); + const config = this.config; + const em = config.em; + const model = this.model; + + if (targetValue) { + value = targetValue; + if (config.highlightChanged) { + status = 'updated'; + } + } else if (computedValue && config.showComputed && + computedValue != defaultValue) { + value = computedValue; + + if (config.highlightComputed) { + status = 'computed'; + } + } else { + value = defaultValue; + status = ''; + } + + //value = this.tryFetchFromFunction(value); + this.setValue(value, 1); + this.model.set('status', status); + + if (em) { + em.trigger('styleManager:change', this); + em.trigger(`styleManager:change:${model.get('property')}`, this); + } + + /* if(this.getTarget()) { if(!this.sameValue()){ this.renderInputRequest(); } - } + }*/ + }, checkVisibility() { + var result = 1; + // Check if need to hide the property if (this.config.hideNotStylable) { if (!this.isTargetStylable() || !this.isComponentStylable()) { this.hide(); + result = 0; } else { this.show(); } @@ -89,6 +202,8 @@ module.exports = Backbone.View.extend({ this.sector.trigger('updateVisibility'); } } + + return result; }, /** @@ -104,12 +219,11 @@ module.exports = Backbone.View.extend({ /** * Get the value from the selected component of this property - * * @return {String} * */ getComponentValue() { var propModel = this.model; - var target = this.getTarget(); + var target = this.getTargetModel(); if(!target) return; @@ -147,22 +261,31 @@ module.exports = Backbone.View.extend({ * @return string * @private */ - getTargetValue(opts) { + getTargetValue(opts = {}) { var result; - var opt = opts || {}; var model = this.model; - var target = this.getTarget(); + var target = this.getTargetModel(); + var customFetchValue = this.customValue; if (!target) { return result; } - result = target.get('style')[model.get('property')]; + result = target.getStyle()[model.get('property')]; - if (!result && !opt.ignoreDefault) { + if (!result && !opts.ignoreDefault) { result = this.getDefaultValue(); } + if (typeof customFetchValue == 'function' && !opts.ignoreCustomValue) { + let index = model.collection.indexOf(model); + let customValue = customFetchValue(this, index); + + if (customValue) { + result = customValue; + } + } + return result; }, @@ -175,6 +298,18 @@ module.exports = Backbone.View.extend({ return this.model.get('defaults'); }, + /** + * Returns computed value + * @return {String} + * @private + */ + getComputedValue() { + let computed = this.propTarget.computed; + const valid = this.config.validComputed; + const property = this.model.get('property'); + return computed && valid.indexOf(property) >= 0 && computed[property]; + }, + /** * Fetch the string from function type value * @param {String} v Function type value @@ -190,9 +325,10 @@ module.exports = Backbone.View.extend({ return value; } - var start = value.indexOf("(") + 1; - var end = value.lastIndexOf(")"); - return value.substring(start, end); + var valueStr = value + ''; + var start = valueStr.indexOf("(") + 1; + var end = valueStr.lastIndexOf(")"); + return valueStr.substring(start, end); }, /** @@ -274,8 +410,9 @@ module.exports = Backbone.View.extend({ target.set('style', targetStyle, { avoidStore : avSt}); - if(this.helperComponent) - this.helperComponent.set('style', targetStyle, { avoidStore : avSt}); + // Helper exists when is active a State in Style Manager + let helper = this.getHelperModel(); + helper && helper.setStyle(targetStyle, {avoidStore: avSt}); }, /** @@ -346,12 +483,13 @@ module.exports = Backbone.View.extend({ }, renderLabel() { - this.$el.html( this.templateLabel({ - pfx : this.pfx, - ppfx : this.ppfx, - icon : this.model.get('icon'), - info : this.model.get('info'), - label : this.model.get('name'), + let model = this.model; + this.$el.html(this.templateLabel({ + pfx: this.pfx, + ppfx: this.ppfx, + icon: model.get('icon'), + info: model.get('info'), + label: model.get('name'), })); }, @@ -409,6 +547,7 @@ module.exports = Backbone.View.extend({ this.renderLabel(); this.renderField(); this.$el.attr('class', this.className); + this.updateStatus(); return this; }, diff --git a/src/style_manager/view/SectorsView.js b/src/style_manager/view/SectorsView.js index 1168c7069..5e45ce4c5 100644 --- a/src/style_manager/view/SectorsView.js +++ b/src/style_manager/view/SectorsView.js @@ -48,8 +48,14 @@ module.exports = Backbone.View.extend({ var widthMedia = device && device.get('widthMedia'); var mediaText = device && !previewMode && widthMedia ? `(${config.mediaCondition}: ${widthMedia})` : ''; + var stateStr = state ? `:${state}` : null; + var view = el.view; pt.helper = null; + if (view) { + pt.computed = window.getComputedStyle(view.el, stateStr); + } + if(classes.length){ var cssC = em.get('CssComposer'); var valid = _.filter(classes.models, item => item.get('active')); diff --git a/src/styles/scss/_gjs_assets.scss b/src/styles/scss/_gjs_assets.scss new file mode 100644 index 000000000..a6da503bd --- /dev/null +++ b/src/styles/scss/_gjs_assets.scss @@ -0,0 +1,117 @@ +.#{$app-prefix}dropzone { + display: none; + opacity: 0; + position: absolute; + top: 0; + left: 0; + z-index: 5; + width: 100%; + height: 100%; + transition: opacity 0.25s; + pointer-events: none; +} + +.#{$app-prefix}dropzone-active { + .#{$app-prefix}dropzone { + display: block; + opacity: 1; + } +} + +.#{$am-prefix}assets { + height: 290px; + overflow: auto; + clear: both; +} + +.#{$am-prefix}assets-header { + padding: 5px; +} + +.#{$am-prefix}add-asset { + .#{$am-prefix}add-field { + width: 70%; + float: left; + } + button{ + width: 25%; + float: right; + } +} + +.#{$am-prefix}add-field input { + padding: 6px; +} + +.#{$am-prefix}assets-cont { + background-color: $mainDklColor; + border-radius: 3px; + box-sizing: border-box; + padding: 10px; + width: 45%; + float:right; + height: 325px; + overflow: hidden; + + ##{$am-prefix}preview-cont{ + position: relative; + height: 70px; width: 30%; + background-color: $mainColor; + border-radius: 2px; + float: left; + overflow: hidden; + } + + ##{$am-prefix}preview{ + position: absolute; + background-position: center center; + background-size: cover; + background-repeat: no-repeat; + height: 100%; + width: 100%; + z-index: 1; + } + + ##{$am-prefix}preview-bg{ + position: absolute; + height: 100%; + width: 100%; + @include opacity(0.5); + z-index: 0; + } + + .#{$am-prefix}highlight { + background-color: $mainLhColor; + } + + .#{$am-prefix}asset { + border-bottom: 1px solid darken($mainDkColor, 3%); + padding: 5px; + cursor:pointer; + position: relative; + + &:hover ##{$am-prefix}close { display: block;} + + } + ##{$am-prefix}close { + @extend .btn-cl; + position: absolute; + right: 5px; + top: 0; + display: none; + } + + ##{$am-prefix}meta { + width: 70%; + float: left; + font-size: 12px; + padding: 5px 0 0 5px; + box-sizing: border-box; + + > div { margin-bottom: 5px;} + ##{$am-prefix}dimensions { + font-size: 10px; + @include opacity(0.5); + } + } +} diff --git a/src/styles/scss/_gjs_style_manager.scss b/src/styles/scss/_gjs_style_manager.scss new file mode 100644 index 000000000..c1e71d147 --- /dev/null +++ b/src/styles/scss/_gjs_style_manager.scss @@ -0,0 +1,454 @@ + +.#{$sm-prefix} { + &clear { + font-size: 1rem; + line-height: 0; + cursor: pointer; + } +} + +.#{$sm-prefix}close-btn { + display: block; + font-size: 23px; + position: absolute; + cursor: pointer; + right: 5px; + top: 0; + + @include opacity(0.2); + + &:hover { + @include opacity(0.7); + } +} + +.#{$sm-prefix}header { + font-size: 11px; + font-weight: lighter; + padding: 10px; +} + +.#{$sm-prefix}sector { + clear: both; + font-weight: lighter; + text-align: left; + + ##{$sm-prefix}caret { + padding-right: 5px; + font-size: 11px; + } + + &.#{$sm-prefix}open { + @extend .#{$app-prefix}category-open; + } + + .#{$sm-prefix}title { + @extend .#{$app-prefix}category-title; + } + + .#{$sm-prefix}label { + margin: 5px 5px 2px 0; + } + + /* ------------------Field-------------------- */ + + .#{$sm-prefix}field { + width: 100%; + position: relative; + + input, + select { + background-color: transparent; + color: $mainLhlColor; + border: none; + width: 100%; + } + + input { + box-sizing: border-box; + } + + select { + position: relative; + z-index: 1; + + @include appearance(none); + + &::-ms-expand { + display: none; + } + } + + select:-moz-focusring { + color: transparent; + text-shadow: 0 0 0 $mainLhlColor; + } + + input:focus, + select:focus { + outline: none; + } + + .#{$sm-prefix}unit { + position: absolute; + right: 10px; + top: 3px; + font-size: 10px; + color: $mainLhlColor; + cursor: pointer; + } + + .#{$clm-prefix}sel-arrow, + .#{$sm-prefix}int-arrows, + .#{$sm-prefix}sel-arrow { + height: 100%; + width: 9px; + position: absolute; + right: 0; + top: 0; + cursor: ns-resize; + } + + .#{$sm-prefix}sel-arrow { + cursor: pointer; + } + + .#{$clm-prefix}d-s-arrow, + .#{$sm-prefix}d-arrow, + .#{$sm-prefix}d-s-arrow, + .#{$sm-prefix}u-arrow { + position: absolute; + height: 0; + width: 0; + border-left: 3px solid transparent; + border-right: 4px solid transparent; + cursor: pointer; + } + + .#{$sm-prefix}u-arrow { + border-bottom: 4px solid $mainLhlColor; + top: 4px; + } + + .#{$clm-prefix}d-s-arrow, + .#{$sm-prefix}d-arrow, + .#{$sm-prefix}d-s-arrow { + border-top: 4px solid $mainLhlColor; + bottom: 4px; + } + + .#{$clm-prefix}d-s-arrow, + .#{$sm-prefix}d-s-arrow { + bottom: 7px; + } + + &.#{$sm-prefix}color, + &.#{$sm-prefix}input, + &.#{$sm-prefix}integer, + &.#{$sm-prefix}list, + &.#{$sm-prefix}select { + background-color: $mainDkColor; + border: 1px solid rgba(0, 0, 0, 0.1); + box-shadow: 1px 1px 0 $mainLhColor; + color: $mainLhlColor; + border-radius: 2px; + box-sizing: border-box; + padding: 0 5px; + } + + &.#{$sm-prefix}composite { + @extend .#{$app-prefix}color-main; + + border-radius: 2px; + } + + &.#{$sm-prefix}select { + padding: 0; + } + + &.#{$sm-prefix}select select { + height: 20px; + } + + &.#{$sm-prefix}select option { + padding: 3px 0; + } + + &.#{$sm-prefix}composite { + background-color: rgba(0, 0, 0, 0.1); + border: 1px solid rgba(0, 0, 0, 0.25); + } + + &.#{$sm-prefix}list { + width: auto; + padding: 0; + overflow: hidden; + float: left; + + input { + display: none; + } + + label { + cursor: pointer; + padding: 5px; + display: block; + } + + .#{$sm-prefix}radio:checked + label { + background-color: rgba(255, 255, 255, 0.2); + } + + .#{$sm-prefix}icon { + background-repeat: no-repeat; + background-position: center; + text-shadow: none; + line-height: normal; + //padding: 5px 19px; + } + } + + &.#{$sm-prefix}integer select { + width: auto; + padding: 0; + } + } + + /* ------------------END Field-------------------- */ + + .#{$sm-prefix}list .#{$sm-prefix}el { + float: left; + border-left: 1px solid $mainDkColor; + + &:first-child { + border: none; + } + + &:hover { + background: $mainDkColor; + } + } + + .#{$sm-prefix}properties { + font-size: 11px; + padding: 10px 5px; + } + + /* ------------------Property-------------------- */ + + .#{$sm-prefix}property { + box-sizing: border-box; + float: left; + width: 50%; + margin-bottom: 5px; + padding: 0 5px; + + &.#{$sm-prefix}composite, + &.#{$sm-prefix}file, + &.#{$sm-prefix}list, + &.#{$sm-prefix}stack { + width: 100%; + } + + .#{$sm-prefix}btn { + background-color: lighten($mainDkColor, 13%); + border-radius: 2px; + box-shadow: 1px 1px 0 lighten($mainDkColor, 2%), 1px 1px 0 lighten($mainDkColor, 17%) inset; + padding: 5px; + position: relative; + text-align: center; + height: auto; + width: 100%; + cursor: pointer; + color: $fontColor; + box-sizing: border-box; + text-shadow: -1px -1px 0 $mainDkColor; + border: none; + + @include opacity(0.85); + } + + .#{$sm-prefix}btn-c { + box-sizing: border-box; + float: left; + width: 100%; + padding: 0 5px; + } + + &.#{$sm-prefix}file ##{$sm-prefix}preview-box { + background-color: $lightBorder; + border-radius: 2px; + margin-top: 5px; + position: relative; + overflow: hidden; + + &.#{$sm-prefix}show { + border: 1px solid darken($lightBorder, 1%); + padding: 3px 5px; + } + + ##{$sm-prefix}close { + @extend .#{$sm-prefix}close-btn; + + display: block; + } + } + + &.#{$sm-prefix}file .#{$sm-prefix}show ##{$sm-prefix}preview-file { + height: 50px; + } + + &.#{$sm-prefix}file ##{$sm-prefix}preview-file { + background-size: auto 100%; + background-repeat: no-repeat; + background-position: center center; + } + + .#{$sm-prefix}layers { + margin-top: 5px; + min-height: 30px; + } + + .#{$sm-prefix}layer { + background-color: rgba(255, 255, 255, 0.055); + border-radius: 2px; + box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2), 1px 1px 0 rgba(255, 255, 255, 0.055) inset; + margin: 2px; + padding: 7px; + position: relative; + cursor: pointer; + + > ##{$sm-prefix}preview-box { + @extend .checker-bg; + + height: 15px; + position: absolute; + right: 27px; + top: 6px; + width: 15px; + } + + ##{$sm-prefix}preview, + ##{$sm-prefix}preview-box { + border-radius: 2px; + } + + ##{$sm-prefix}close-layer { + display: block; + font-size: 23px; + position: absolute; + cursor: pointer; + right: 5px; + top: 0; + + @include opacity(0.5); + + &:hover { + @include opacity(0.8); + } + } + + > ##{$sm-prefix}preview-box ##{$sm-prefix}preview { + background-color: white; + height: 100%; + width: 100%; + background-size: cover !important; + } + + &.#{$sm-prefix}active { + background-color: rgba(255, 255, 255, 0.12); + } + + &.#{$sm-prefix}no-preview ##{$sm-prefix}preview-box { + display: none; + } + } + } + + ##{$sm-prefix}text-shadow ##{$sm-prefix}preview::after { + color: #000; + content: "T"; + font-weight: 900; + line-height: 17px; + padding: 0 4px; + } + + /* ------------------END Property-------------------- */ + + .#{$sm-prefix}stack .#{$sm-prefix}properties { + padding-top: 5px; + } + + .#{$sm-prefix}stack ##{$sm-prefix}add { + @extend .#{$app-prefix}color-main; + + background: none; + border: none; + cursor: pointer; + font-size: 22px; + line-height: 10px; + position: absolute; + right: 0; + top: -20px; + opacity: 0.75; + + &:hover { + @include opacity(1); + } + } + + .#{$sm-prefix}colorp-c { + @extend .#{$app-prefix}bg-main; + + height: 100%; + width: 20px; + position: absolute; + right: 0; + top: 0; + box-sizing: border-box; + border-radius: 2px; + padding: 2px; + + .#{$app-prefix}checker-bg { + height: 100%; + width: 100%; + border-radius: 1px; + } + } + + .#{$sm-prefix}color-picker { + background-color: $fontColor; + cursor: pointer; + height: 16px; + width: 100%; + margin-top: -16px; + box-shadow: 0 0 1px $mainDkColor; + border-radius: 1px; + } + + .#{$sm-prefix}btn-upload ##{$sm-prefix}upload { + left: 0; + top: 0; + position: absolute; + width: 100%; + opacity: 0; + cursor: pointer; + } + + .#{$sm-prefix}btn-upload ##{$sm-prefix}label { + padding: 2px 0; + } +} + +.#{$sm-prefix}layer > ##{$sm-prefix}move { + @include opacity(0.7); + + cursor: move; + font-size: 12px; + float: left; + margin: 0 5px 0 0; + + &:hover { + @include opacity(0.9); + } +} diff --git a/src/styles/scss/main.scss b/src/styles/scss/main.scss index 3a44ec29d..5748a45c7 100644 --- a/src/styles/scss/main.scss +++ b/src/styles/scss/main.scss @@ -88,7 +88,37 @@ $fontV: 20;//random(1000) transform: $v; } -//.#{$app-prefix}fonts {} +/* Color Helpers */ +$colorHighlight: #71b7f1; +$colorWarn: #ffca6f; + +.#{$app-prefix}bg { + &-main { + background-color: $mainColor; + } +} + +.#{$app-prefix}color { + &-main { + color: $fontColor; + fill: $fontColor; + } + + &-active { + color: $fontColorActive; + fill: $fontColorActive; + } + + &-warn { + color: $colorWarn; + fill: $colorWarn; + } + + &-hl { + color: $colorHighlight; + fill: $colorHighlight; + } +} .#{$app-prefix}fonts::before { display: block; @@ -145,20 +175,6 @@ $fontV: 20;//random(1000) pointer-events: none; } -.#{$app-prefix}bg-main{ - background-color: $mainColor; -} - -.#{$app-prefix}color-main { - color: $fontColor; - fill: $fontColor; -} - -.#{$app-prefix}color-active { - color: $fontColorActive; - fill: $fontColorActive; -} - .#{$app-prefix}bdrag { pointer-events: none !important; position: absolute !important; @@ -530,6 +546,10 @@ ol.example li.placeholder:before {position: absolute;} /************* Navigator *************/ +.#{$nv-prefix}selected-parent { + border: 1px solid $colorYell; +} + .#{$nv-prefix}opac50{ @include opacity(0.50); } @@ -736,345 +756,9 @@ $lightBorder: rgba(255, 255, 255, 0.05); /********* Style Manager **********/ -.#{$sm-prefix}close-btn{ - display:block; - font-size: 23px; - position: absolute; - cursor: pointer; - right: 5px; - top: 0; - @include opacity(0.2); - - &:hover{ @include opacity(0.7); } -} -.#{$sm-prefix}header { - font-size: 11px; - font-weight: lighter; - padding: 10px; -} -.#{$sm-prefix}sector { - clear:both; - font-weight: lighter; - text-align:left; - - ##{$sm-prefix}caret{ - padding-right: 5px; - font-size: 11px; - } +@import "gjs_style_manager"; - &.#{$sm-prefix}open { - @extend .#{$app-prefix}category-open; - } - - .#{$sm-prefix}title { - @extend .#{$app-prefix}category-title; - } - - .#{$sm-prefix}label { - margin: 5px 5px 2px 0; - } - /*------------------Field--------------------*/ - .#{$sm-prefix}field { - width: 100%; - position:relative; - - input, select { - background-color: transparent; - color: $mainLhlColor; - border:none; - width: 100%; - } - input { - box-sizing: border-box; - } - select { - position: relative; - z-index:1; - @include appearance(none); - &::-ms-expand { display: none;} - } - - select:-moz-focusring{ - color: transparent; - text-shadow: 0 0 0 $mainLhlColor; - } - - select:focus, input:focus{ - outline: none; - } - - .#{$sm-prefix}unit { - position: absolute; - right: 10px; top: 3px; - font-size: 10px; - color: $mainLhlColor; - cursor:pointer; - } - - .#{$sm-prefix}int-arrows, .#{$sm-prefix}sel-arrow, .#{$clm-prefix}sel-arrow{ - height: 100%; width: 9px; - position: absolute; - right: 0; top: 0; - cursor: ns-resize; - } - .#{$sm-prefix}sel-arrow{ cursor:pointer } - - .#{$sm-prefix}u-arrow, .#{$sm-prefix}d-arrow, .#{$sm-prefix}d-s-arrow, .#{$clm-prefix}d-s-arrow{ - position: absolute; - height: 0; width: 0; - border-left: 3px solid transparent; - border-right: 4px solid transparent; - cursor:pointer; - } - - .#{$sm-prefix}u-arrow { - border-bottom: 4px solid $mainLhlColor; - top: 4px; - } - .#{$sm-prefix}d-arrow, .#{$sm-prefix}d-s-arrow, .#{$clm-prefix}d-s-arrow{ - border-top: 4px solid $mainLhlColor; - bottom: 4px; - } - .#{$sm-prefix}d-s-arrow, .#{$clm-prefix}d-s-arrow{ bottom: 7px; } - - &.#{$sm-prefix}integer, &.#{$sm-prefix}select, &.#{$sm-prefix}list, &.#{$sm-prefix}color, &.#{$sm-prefix}input { - background-color: $mainDkColor;/*353535*/ - border: 1px solid rgba(0, 0, 0, 0.1);/*292929*/ - box-shadow: 1px 1px 0 $mainLhColor;/*575757*/ - color: $mainLhlColor; - border-radius: 2px; - box-sizing: border-box; - padding: 0 5px; - } - &.#{$sm-prefix}composite{ - @extend .#{$app-prefix}color-main; - border-radius: 2px; - } - &.#{$sm-prefix}select{ padding:0; } - &.#{$sm-prefix}select select{ height: 20px; } - &.#{$sm-prefix}select option { padding: 3px 0;} - &.#{$sm-prefix}composite{ - background-color: rgba(0,0,0,0.1); - border: 1px solid rgba(0, 0, 0, 0.25); - } - &.#{$sm-prefix}list{ - width:auto; - padding:0; - overflow: hidden; - float:left; - - input{ display:none; } - label{ cursor:pointer; padding: 5px; display:block;} - .#{$sm-prefix}radio:checked + label{ - background-color: rgba(255, 255, 255, 0.2);/*5b5b5b*/ - } - .#{$sm-prefix}icon{ - background-repeat: no-repeat; - background-position:center; - text-shadow: none; - line-height: normal; - //padding: 5px 19px; - } - } - - &.#{$sm-prefix}integer select{ width:auto; padding: 0;} - - } - /*------------------END Field--------------------*/ - - .#{$sm-prefix}list .#{$sm-prefix}el{ - float:left; - border-left: 1px solid $mainDkColor; - - &:first-child{border:none} - &:hover{background: $mainDkColor; } - } - - .#{$sm-prefix}properties { - font-size: 11px; - padding: 10px 5px; - } - - /*------------------Property--------------------*/ - .#{$sm-prefix}property{ - box-sizing: border-box; - float:left; width:50%; - margin-bottom: 5px; - padding: 0 5px; - - &.#{$sm-prefix}file, &.#{$sm-prefix}composite, &.#{$sm-prefix}stack, &.#{$sm-prefix}list{ - width:100%; - } - .#{$sm-prefix}btn{ - background-color: lighten($mainDkColor, 13%);/*#5d5d5d*/ - border-radius: 2px; - box-shadow: 1px 1px 0 lighten($mainDkColor, 2%), 1px 1px 0 lighten($mainDkColor, 17%) inset; - padding: 5px; - position: relative; - text-align: center; - height: auto; width: 100%; - cursor: pointer; - color: $fontColor; - box-sizing: border-box; - text-shadow: -1px -1px 0 $mainDkColor; - border: none; - @include opacity(0.85); - } - .#{$sm-prefix}btn-c { - box-sizing: border-box; - float: left; - width: 100%; - padding: 0 5px; - } - - &.#{$sm-prefix}file ##{$sm-prefix}preview-box { - background-color: $lightBorder; - border-radius: 2px; - margin-top: 5px; - position:relative; - overflow: hidden; - - &.#{$sm-prefix}show{ - border: 1px solid darken($lightBorder,1%); - padding: 3px 5px; - } - ##{$sm-prefix}close{ - @extend .#{$sm-prefix}close-btn; - display:block; - } - } - &.#{$sm-prefix}file .#{$sm-prefix}show ##{$sm-prefix}preview-file{ height: 50px;} - &.#{$sm-prefix}file ##{$sm-prefix}preview-file { - background-size: auto 100%; - background-repeat: no-repeat; - background-position: center center; - } - - .#{$sm-prefix}layers { - margin-top: 5px; - min-height: 30px; - } - - .#{$sm-prefix}layer { - background-color: rgba(255, 255, 255, 0.055); - border-radius: 2px; - box-shadow: 1px 1px 0 rgba(0,0,0,0.2), 1px 1px 0 rgba(255, 255, 255, 0.055) inset; - margin: 2px; - padding: 7px; - position: relative; - cursor: pointer; - - > ##{$sm-prefix}preview-box { - @extend .checker-bg; - height: 15px; - position: absolute; - right: 27px; - top: 6px; - width: 15px; - } - ##{$sm-prefix}preview-box, ##{$sm-prefix}preview{ - border-radius:2px; - } - ##{$sm-prefix}close-layer{ - display:block; - font-size: 23px; - position: absolute; - cursor: pointer; - right: 5px; - top: 0; - @include opacity(0.5); - - &:hover{ - @include opacity(0.8); - } - } - > ##{$sm-prefix}preview-box ##{$sm-prefix}preview { - background-color: white; - height: 100%; - width: 100%; - background-size: cover !important; - } - &.#{$sm-prefix}active { - background-color: rgba(255, 255, 255, 0.12); - } - &.#{$sm-prefix}no-preview ##{$sm-prefix}preview-box{ - display:none; - } - } - } - ##{$sm-prefix}text-shadow ##{$sm-prefix}preview::after { - color: #000; - content: "T"; - font-weight: 900; - line-height: 17px; - padding: 0 4px; - } - /*------------------END Property--------------------*/ - - .#{$sm-prefix}stack .#{$sm-prefix}properties{padding-top: 5px;} - - .#{$sm-prefix}stack ##{$sm-prefix}add { - @extend .#{$app-prefix}color-main; - background: none; - border: none; - cursor: pointer; - font-size: 22px; - line-height: 10px; - position: absolute; - right: 0; top: -20px; - opacity: 0.75; - - &:hover{ @include opacity(1); } - } - - .#{$sm-prefix}colorp-c { - @extend .#{$app-prefix}bg-main; - height: 100%; width: 20px; - position: absolute; - right: 0; top: 0; - box-sizing: border-box; - border-radius: 2px; - padding: 2px; - - .#{$app-prefix}checker-bg{ - height: 100%; width: 100%; - border-radius: 1px; - } - } - - .#{$sm-prefix}color-picker { - background-color: $fontColor; - cursor: pointer; - height: 16px; - width: 100%; - margin-top: -16px; - box-shadow: 0 0 1px $mainDkColor; - border-radius: 1px; - } - - .#{$sm-prefix}btn-upload ##{$sm-prefix}upload { - left: 0; top: 0; - position: absolute; - width: 100%; - opacity: 0; - cursor: pointer; - } - - .#{$sm-prefix}btn-upload ##{$sm-prefix}label { padding: 2px 0;} - -} -.#{$sm-prefix}layer > ##{$sm-prefix}move { - @include opacity(0.7); - cursor: move; - font-size: 12px; - float: left; - margin: 0 5px 0 0; - - &:hover{ - @include opacity(0.9); - } -} -/********* END Style Manager **********/ +/********* Blocks **********/ @import "gjs_blocks"; @@ -1238,103 +922,8 @@ $paddElClm: 5px 6px; } /********* Assets Manager **********/ -.#{$am-prefix}assets { - height: 290px; - overflow: auto; - clear: both; -} - -.#{$am-prefix}assets-header { - padding: 5px; -} - -.#{$am-prefix}add-asset { - .#{$am-prefix}add-field { - width: 70%; - float: left; - } - button{ - width: 25%; - float: right; - } -} - -.#{$am-prefix}add-field input { - padding: 6px; -} - -.#{$am-prefix}assets-cont { - background-color: $mainDklColor; - border-radius: 3px; - box-sizing: border-box; - padding: 10px; - width: 45%; - float:right; - height: 325px; - overflow: hidden; - - ##{$am-prefix}preview-cont{ - position: relative; - height: 70px; width: 30%; - background-color: $mainColor; - border-radius: 2px; - float: left; - overflow: hidden; - } - - ##{$am-prefix}preview{ - position: absolute; - background-position: center center; - background-size: cover; - background-repeat: no-repeat; - height: 100%; - width: 100%; - z-index: 1; - } - ##{$am-prefix}preview-bg{ - position: absolute; - height: 100%; - width: 100%; - @include opacity(0.5); - z-index: 0; - } - - .#{$am-prefix}highlight { - background-color: $mainLhColor; - } - - .#{$am-prefix}asset { - border-bottom: 1px solid darken($mainDkColor, 3%); - padding: 5px; - cursor:pointer; - position: relative; - - &:hover ##{$am-prefix}close { display: block;} - - } - ##{$am-prefix}close { - @extend .btn-cl; - position: absolute; - right: 5px; - top: 0; - display: none; - } - - ##{$am-prefix}meta { - width: 70%; - float: left; - font-size: 12px; - padding: 5px 0 0 5px; - box-sizing: border-box; - - > div { margin-bottom: 5px;} - ##{$am-prefix}dimensions { - font-size: 10px; - @include opacity(0.5); - } - } -} +@import "gjs_assets"; /********* File uploader **********/ diff --git a/src/utils/Sorter.js b/src/utils/Sorter.js index 278f61b81..494518436 100644 --- a/src/utils/Sorter.js +++ b/src/utils/Sorter.js @@ -26,6 +26,8 @@ module.exports = Backbone.View.extend({ this.direction = o.direction || 'v'; // v (vertical), h (horizontal), a (auto) this.onMoveClb = o.onMove || ''; this.relative = o.relative || 0; + this.ignoreViewChildren = o.ignoreViewChildren || 0; + this.ignoreModels = o.ignoreModels || 0; this.plh = o.placer || ''; // Frame offset this.wmargin = o.wmargin || 0; @@ -134,10 +136,12 @@ module.exports = Backbone.View.extend({ * @param {Event} e */ moveDragHelper(e) { - if(!this.dragHelper) { + var doc = e.target.ownerDocument; + + if(!this.dragHelper || !doc) { return; } - var doc = e.target.ownerDocument; + var win = doc.defaultView || doc.parentWindow; var addTop = 0; var addLeft = 0; @@ -218,24 +222,27 @@ module.exports = Backbone.View.extend({ /** * Picking component to move - * @param {HTMLElement} trg + * @param {HTMLElement} src * */ - startSort(trg) { + startSort(src) { + this.dropModel = null; this.moved = 0; - this.eV = trg; + //this.$document = $([document, trg.ownerDocument]); - if(trg && !this.matches(trg, this.itemSel + ',' + this.containerSel)) - this.eV = this.closest(trg, this.itemSel); + if(src && !this.matches(src, this.itemSel + ',' + this.containerSel)) + src = this.closest(src, this.itemSel); + + this.eV = src; // Create placeholder if not exists - if(!this.plh) { + if (!this.plh) { this.plh = this.createPlaceholder(); this.getContainerEl().appendChild(this.plh); } - if(trg) { - var className = trg.getAttribute('class'); - trg.setAttribute('class', `${className} ${this.freezeClass}`); + if (src) { + var srcModel = this.getSourceModel(); + srcModel && srcModel.set && srcModel.set('status', 'freezed'); this.$document.on('mouseup', this.endMove); } @@ -258,16 +265,45 @@ module.exports = Backbone.View.extend({ * Get the model from HTMLElement target * @return {Model|null} */ - getModelFromTarget(el) { + getTargetModel(el) { let elem = el || this.target; return $(elem).data('model'); }, + /** + * Get the model of the current source element (element to drag) + * @return {Model} + */ + getSourceModel() { + var src = this.eV; + let dropContent = this.dropContent; + let dropModel = this.dropModel; + const em = this.em; + + if (dropContent && em) { + if (!dropModel) { + let comps = em.get('DomComponents').getComponents(); + let tempModel = comps.add(dropContent, {avoidUpdateStyle: 1, temporary: 1}); + dropModel = comps.remove(tempModel, {temporary: 1}); + this.dropModel = dropModel instanceof Array ? dropModel[0] : dropModel; + } + return dropModel; + } + + if (src) { + return $(src).data('model'); + } + }, + /** * Highlight target * @param {Model|null} model */ selectTargetModel(model) { + if (model instanceof Backbone.Collection) { + return; + } + var prevModel = this.targetModel; if (prevModel) { prevModel.set('status', ''); @@ -307,7 +343,7 @@ module.exports = Backbone.View.extend({ var dims = this.dimsFromTarget(e.target, rX, rY); - let targetModel = this.getModelFromTarget(this.target); + let targetModel = this.getTargetModel(this.target); this.selectTargetModel(targetModel); this.lastDims = dims; @@ -393,6 +429,51 @@ module.exports = Backbone.View.extend({ return; }, + /** + * Check if the target is valid with the actual source + * @param {HTMLElement} trg + * @return {Boolean} + */ + validTarget(trg) { + let srcModel = this.getSourceModel(); + let src = srcModel && srcModel.view && srcModel.view.el; + let trgModel = this.getTargetModel(trg); + trg = trgModel && trgModel.view && trgModel.view.el; + let result = { + valid: true, + src, + srcModel, + trg, + trgModel + }; + + if (!src || !trg) { + result.valid = false; + return result; + } + + // Check if the target could accept the source + let droppable = trgModel.get('droppable'); + droppable = droppable instanceof Backbone.Collection ? 1 : droppable; + droppable = droppable instanceof Array ? droppable.join(', ') : droppable; + result.dropInfo = droppable; + droppable = typeof droppable === 'string' ? src.matches(droppable) : droppable; + result.droppable = droppable; + + // check if the source is draggable in target + let draggable = srcModel.get('draggable'); + draggable = draggable instanceof Array ? draggable.join(', ') : draggable; + result.dragInfo = draggable; + draggable = typeof draggable === 'string' ? trg.matches(draggable) : draggable; + result.draggable = draggable; + + if (!droppable || !draggable) { + result.valid = false; + } + + return result; + }, + /** * Get dimensions of nodes relative to the coordinates * @param {HTMLElement} target @@ -403,30 +484,39 @@ module.exports = Backbone.View.extend({ dimsFromTarget(target, rX, rY) { var dims = []; + if (!target) { + return dims; + } + // Select the first valuable target - // TODO: avoid this check for every standard component, - // which generally is ok - if(!this.matches(target, this.itemSel + ',' + this.containerSel)) + if (!target.matches(`${this.itemSel}, ${this.containerSel}`)) { target = this.closest(target, this.itemSel); + } // If draggable is an array the target will be one of those - if(this.draggable instanceof Array){ - target = this.closest(target, this.draggable.join(',')); + if (this.draggable instanceof Array) { + target = this.closest(target, this.draggable.join(',')); } - if(!target) + if (!target) { return dims; + } // Check if the target is different from the previous one - if(this.prevTarget){ - if(this.prevTarget != target){ + if (this.prevTarget && this.prevTarget != target) { this.prevTarget = null; - } } - // New target encountered - if(!this.prevTarget){ + // New target found + if (!this.prevTarget) { this.targetP = this.closest(target, this.containerSel); + + // Check if the source is valid with the target + let validResult = this.validTarget(target); + if (!validResult.valid && this.targetP) { + return this.dimsFromTarget(this.targetP, rX, rY); + } + this.prevTarget = target; this.prevTargetDim = this.getDim(target); this.cacheDimsP = this.getChildrenDim(this.targetP); @@ -439,13 +529,18 @@ module.exports = Backbone.View.extend({ // Target when I will drop element to sort this.target = this.prevTarget; + // Generally also on every new target the poiner enters near // to borders, so have to to check always if(this.nearBorders(this.prevTargetDim, rX, rY) || - (!this.nested && !this.cacheDims.length)){ - dims = this.cacheDimsP; - this.target = this.targetP; + (!this.nested && !this.cacheDims.length)) { + if (!this.validTarget(this.targetP).valid) { + return this.dimsFromTarget(this.targetP, rX, rY); + } + dims = this.cacheDimsP; + this.target = this.targetP; } + this.lastPos = null; return dims; }, @@ -460,10 +555,15 @@ module.exports = Backbone.View.extend({ if (this.canvasRelative && this.em) { var pos = this.em.get('Canvas').getElementPos(el); - top = pos.top; - left = pos.left; - height = pos.height; - width = pos.width; + var styles = window.getComputedStyle(el); + var marginTop = parseFloat(styles['marginTop']); + var marginBottom = parseFloat(styles['marginBottom']); + var marginRight = parseFloat(styles['marginRight']); + var marginLeft = parseFloat(styles['marginLeft']); + top = pos.top - marginTop; + left = pos.left - marginLeft; + height = pos.height + marginTop + marginBottom; + width = pos.width + marginLeft + marginRight; } else { var o = this.offset(el); top = this.relative ? el.offsetTop : o.top - (this.wmargin ? -1 : 1) * this.elT; @@ -482,23 +582,26 @@ module.exports = Backbone.View.extend({ * @param {HTMLELement} el Element root * @retun {Array} * */ - getChildrenDim(elem) { + getChildrenDim(trg) { var dims = []; - if(!elem) + if(!trg) return dims; // Get children based on getChildrenContainer - var $elem = $(elem); - var elemData = $elem.data('model'); - if (elemData && elemData.view) { - elem = elemData.view.getChildrenContainer(); + var trgModel = this.getTargetModel(trg); + if (trgModel && trgModel.view && !this.ignoreViewChildren) { + trg = trgModel.view.getChildrenContainer(); } - var ch = elem.children; //TODO filter match + var ch = trg.children; + for (var i = 0, len = ch.length; i < len; i++) { var el = ch[i]; - if(!this.matches(el, this.itemSel)) + + if (!el.matches(this.itemSel)) { continue; + } + var dim = this.getDim(el); var dir = this.direction; @@ -507,12 +610,13 @@ module.exports = Backbone.View.extend({ else if(dir == 'h') dir = false; else - dir = this.isInFlow(el, elem); + dir = this.isInFlow(el, trg); dim.push(dir); dim.push(el); dims.push(dim); } + return dims; }, @@ -655,15 +759,18 @@ module.exports = Backbone.View.extend({ this.$document.off('keydown', this.rollback); this.plh.style.display = 'none'; var clsReg = new RegExp('(?:^|\\s)'+this.freezeClass+'(?!\\S)', 'gi'); - let trg = this.eV; + let src = this.eV; - if (trg) { - var className = (trg.getAttribute('class')+'').replace(clsReg, ''); - trg.setAttribute('class', className); + if (src) { + var srcModel = this.getSourceModel(); + if (srcModel && srcModel.set) { + srcModel.set('status', ''); + srcModel.set('status', 'selected'); + } } if(this.moved) - created = this.move(this.target, trg, this.lastPos); + created = this.move(this.target, src, this.lastPos); if(this.plh) this.plh.style.display = 'none'; @@ -689,101 +796,63 @@ module.exports = Backbone.View.extend({ * */ move(dst, src, pos) { var em = this.em; - if (em) em.trigger('component:dragEnd:before', dst, src, pos); + em && em.trigger('component:dragEnd:before', dst, src, pos); var warns = []; - var modelToDrop, modelTemp, created; var index = pos.index; - var model = $(src).data('model'); - var $dst = $(dst); - var targetModel; - - while ($dst.length && !targetModel) { - targetModel = $dst.data('model'); - dst = $dst.get(0); - - if (targetModel && targetModel.view) - dst = targetModel.view.el; - - if (!targetModel) - $dst = $dst.parent(); - } - - var targetCollection = $dst.data('collection'); - // Check if the elemenet is DRAGGABLE to the target - var drag = model && model.get('draggable'); - var draggable = typeof drag !== 'undefined' ? drag : 1; - var toDrag = draggable; - - if (this.dropContent instanceof Object) { - draggable = this.dropContent.draggable; - draggable = typeof draggable !== 'undefined' ? draggable : 1; - } else if (typeof this.dropContent === 'string' && targetCollection) { - var sandboxOpts = {silent: true}; - var sandboxModel = targetCollection.add(this.dropContent, sandboxOpts); - draggable = sandboxModel.get && sandboxModel.get('draggable'); - draggable = typeof draggable !== 'undefined' ? draggable : 1; - targetCollection.remove(sandboxModel, sandboxOpts); - } - - if(draggable instanceof Array) { - toDrag = draggable.join(', '); - draggable = this.matches(dst, toDrag); - }else if(typeof draggable === 'string') { - toDrag = draggable; - draggable = this.matches(dst, toDrag, 1); - } - - // Check if the target could accept the element to be DROPPED inside - var accepted = 1; - var droppable = targetModel && targetModel.get ? targetModel.get('droppable') : 1; - var toDrop = draggable; - if(droppable instanceof Array) { - // When I drag blocks src is the HTMLElement of the block - toDrop = droppable.join(', '); - accepted = this.matches(src, toDrop); - }else if(typeof droppable === 'string') { - toDrop = droppable; - accepted = this.matches(src, toDrop); - } - - if(targetCollection && droppable && accepted && draggable) { + var modelToDrop, modelTemp, created; + var validResult = this.validTarget(dst); + var targetCollection = $(dst).data('collection'); + var model = validResult.srcModel; + var droppable = validResult.droppable; + var draggable = validResult.draggable; + var dropInfo = validResult.dropInfo; + var dragInfo = validResult.dragInfo; + var dropContent = this.dropContent; + droppable = validResult.trgModel instanceof Backbone.Collection ? 1 : droppable; + + if (targetCollection && droppable && draggable) { index = pos.method === 'after' ? index + 1 : index; var opts = {at: index, noIncrement: 1}; - if(!this.dropContent){ + + if (!dropContent) { modelTemp = targetCollection.add({}, opts); - if(model) - modelToDrop = model.collection.remove(model); - }else{ - modelToDrop = this.dropContent; + if (model) { + modelToDrop = model.collection.remove(model); + } + } else { + modelToDrop = dropContent; opts.silent = false; + opts.avoidUpdateStyle = 1; } + created = targetCollection.add(modelToDrop, opts); - if(!this.dropContent){ + + if (!dropContent) { targetCollection.remove(modelTemp); - }else{ + } else { this.dropContent = null; } + // This will cause to recalculate children dimensions this.prevTarget = null; } else { - if(!targetCollection){ - warns.push('target collection not found'); - } - if(!droppable){ - warns.push('target is not droppable'); + if (!targetCollection) { + warns.push('Target collection not found'); } - if(!draggable){ - warns.push('component not draggable, accepted only by [' + toDrag + ']'); + + if (!droppable) { + warns.push(`Target is not droppable, accepts [${dropInfo}]`); } - if(!accepted){ - warns.push('target accepts only [' + toDrop + ']'); + + if (!draggable) { + warns.push(`Component not draggable, acceptable by [${dragInfo}]`); } + console.warn('Invalid target position: ' + warns.join(', ')); } - if (em) - em.trigger('component:dragEnd', targetCollection, modelToDrop, warns); + em && em.trigger('component:dragEnd', targetCollection, modelToDrop, warns); return created; }, diff --git a/test/specs/parser/model/ParserHtml.js b/test/specs/parser/model/ParserHtml.js index acbcefad8..a77cd6663 100644 --- a/test/specs/parser/model/ParserHtml.js +++ b/test/specs/parser/model/ParserHtml.js @@ -57,6 +57,16 @@ module.exports = { expect(obj.parseStyle(str)).toEqual(result) }); + it('Parse style string with values containing colon to object', () => { + var str = 'background-image:url("https://some-website.ex"); test:value;'; + var result = { + 'background-image': 'url("https://some-website.ex")', + 'test': 'value', + }; + expect(obj.parseStyle(str)).toEqual(result) + }); + + it('Parse class string to array', () => { var str = 'test1 test2 test3 test-4'; var result = ['test1', 'test2', 'test3', 'test-4']; diff --git a/test/specs/style_manager/model/Models.js b/test/specs/style_manager/model/Models.js index 94689261d..b4cc8d534 100644 --- a/test/specs/style_manager/model/Models.js +++ b/test/specs/style_manager/model/Models.js @@ -522,6 +522,7 @@ module.exports = { var res = { type: 'stack', preview: true, + defaults: "none", properties : [{ property: 'text-shadow-h', type: 'integer', diff --git a/test/specs/style_manager/view/PropertyColorView.js b/test/specs/style_manager/view/PropertyColorView.js index 6e5cb9c54..8d441ebf3 100644 --- a/test/specs/style_manager/view/PropertyColorView.js +++ b/test/specs/style_manager/view/PropertyColorView.js @@ -13,6 +13,7 @@ module.exports = { var target; var model; var view; + var propTarget; var propName = 'testprop'; var propValue = '#fff'; var defValue = 'test2value'; @@ -30,8 +31,11 @@ module.exports = { type: 'color', property: propName }); + propTarget = Object.assign({}, Backbone.Events); + propTarget.model = component; view = new PropertyColorView({ - model + model, + propTarget }); $fixture.empty().appendTo($fixtures); $fixture.html(view.render().el); diff --git a/test/specs/style_manager/view/PropertyIntegerView.js b/test/specs/style_manager/view/PropertyIntegerView.js index 2dcb7140c..14e6e0716 100644 --- a/test/specs/style_manager/view/PropertyIntegerView.js +++ b/test/specs/style_manager/view/PropertyIntegerView.js @@ -13,6 +13,7 @@ module.exports = { var target; var model; var view; + var propTarget; var propName = 'testprop'; var intValue = '55'; var unitValue = 'px'; @@ -36,8 +37,11 @@ module.exports = { units, property: propName }); + propTarget = Object.assign({}, Backbone.Events); + propTarget.model = component; view = new PropertyIntegerView({ - model + model, + propTarget }); $fixture.empty().appendTo($fixtures); $fixture.html(view.render().el); diff --git a/test/specs/style_manager/view/PropertyRadioView.js b/test/specs/style_manager/view/PropertyRadioView.js index 19b91ce2c..38d4b5de5 100644 --- a/test/specs/style_manager/view/PropertyRadioView.js +++ b/test/specs/style_manager/view/PropertyRadioView.js @@ -13,6 +13,7 @@ module.exports = { var target; var model; var view; + var propTarget; var propName = 'testprop'; var propValue = 'test1value'; var defValue = 'test2value'; @@ -34,8 +35,11 @@ module.exports = { list: options, property: propName }); + propTarget = Object.assign({}, Backbone.Events); + propTarget.model = component; view = new PropertyRadioView({ - model + model, + propTarget }); $fixture.empty().appendTo($fixtures); $fixture.html(view.render().el); diff --git a/test/specs/style_manager/view/PropertySelectView.js b/test/specs/style_manager/view/PropertySelectView.js index e4533a863..37f71d477 100644 --- a/test/specs/style_manager/view/PropertySelectView.js +++ b/test/specs/style_manager/view/PropertySelectView.js @@ -13,6 +13,8 @@ module.exports = { var target; var model; var view; + var propTarget; + var options; var propName = 'testprop'; var propValue = 'test1value'; var defValue = 'test2value'; @@ -27,6 +29,7 @@ module.exports = { }); beforeEach(() => { + propTarget = Object.assign({}, Backbone.Events); target = new Component(); component = new Component(); model = new Property({ @@ -34,8 +37,10 @@ module.exports = { list: options, property: propName }); + propTarget.model = component; view = new PropertySelectView({ - model + model, + propTarget }); $fixture.empty().appendTo($fixtures); $fixture.html(view.render().el); diff --git a/test/specs/style_manager/view/PropertyView.js b/test/specs/style_manager/view/PropertyView.js index 8bbfbc123..aee1d5382 100644 --- a/test/specs/style_manager/view/PropertyView.js +++ b/test/specs/style_manager/view/PropertyView.js @@ -13,6 +13,8 @@ module.exports = { var target; var model; var view; + var propTarget; + var options; var propName = 'testprop'; var propValue = 'testvalue'; var defValue = 'testDefault'; @@ -23,12 +25,16 @@ module.exports = { }); beforeEach(() => { + propTarget = Object.assign({}, Backbone.Events); target = new Component(); component = new Component(); model = new Property({property: propName}); - view = new PropertyView({ - model - }); + propTarget.model = component; + options = { + model, + propTarget + }; + view = new PropertyView(options); $fixture.empty().appendTo($fixtures); $fixture.html(view.render().el); }); @@ -82,34 +88,30 @@ module.exports = { }); it('Update target on value change', () => { - view.selectedComponent = component; view.model.set('value', propValue); - var compStyle = view.selectedComponent.get('style'); + var compStyle = view.getTargetModel().get('style'); var assertStyle = {}; assertStyle[propName] = propValue; expect(compStyle).toEqual(assertStyle); }); it('Update target on value change with functionName', () => { - view.selectedComponent = component; view.model.set('functionName', 'testfunc'); view.model.set('value', propValue); - var compStyle = view.selectedComponent.get('style'); + var compStyle = view.getTargetModel().get('style'); var assertStyle = {}; assertStyle[propName] = 'testfunc(' + propValue + ')'; expect(compStyle).toEqual(assertStyle); }); it('Clean target from the property if its value is empty', () => { - view.selectedComponent = component; view.model.set('value', propValue); view.model.set('value', ''); - var compStyle = view.selectedComponent.get('style'); + var compStyle = view.getTargetModel().get('style'); expect(compStyle).toEqual({}); }); it('Check stylable element', () => { - view.selectedComponent = component; expect(view.isTargetStylable()).toEqual(true); component.set('stylable', false); expect(view.isTargetStylable()).toEqual(false); @@ -122,12 +124,10 @@ module.exports = { }); it('Target style is empty without values', () => { - view.selectedComponent = component; expect(view.getComponentValue()).toNotExist(); }); it('Target style is correct', () => { - view.selectedComponent = component; var style = {}; style[propName] = propValue; component.set('style', style); @@ -135,7 +135,6 @@ module.exports = { }); it('Target style is empty with an other style', () => { - view.selectedComponent = component; var style = {}; style[propName + '2'] = propValue; component.set('style', style); diff --git a/yarn.lock b/yarn.lock index 16925d7fd..2abf66791 100644 --- a/yarn.lock +++ b/yarn.lock @@ -127,7 +127,7 @@ are-we-there-yet@~1.1.2: delegates "^1.0.0" readable-stream "^2.0.0 || ^1.1.13" -argparse@^1.0.6, argparse@^1.0.7: +argparse@^1.0.7: version "1.0.9" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" dependencies: @@ -994,10 +994,6 @@ binary-extensions@^1.0.0: version "1.7.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.7.0.tgz#6c1610db163abfb34edfe42fa423343a1e01185d" -bindings@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11" - block-stream@*: version "0.0.9" resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" @@ -1132,12 +1128,6 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" -bufferstreams@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/bufferstreams/-/bufferstreams-1.1.1.tgz#0161373060ac5988eff99058731114f6e195d51e" - dependencies: - readable-stream "^2.0.2" - builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -1362,15 +1352,7 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.0.0, concat-stream@^1.5.0, concat-stream@~1.5.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" - dependencies: - inherits "~2.0.1" - readable-stream "~2.0.0" - typedarray "~0.0.5" - -concat-stream@^1.6.0: +concat-stream@^1.0.0, concat-stream@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: @@ -1378,6 +1360,14 @@ concat-stream@^1.6.0: readable-stream "^2.2.2" typedarray "^0.0.6" +concat-stream@^1.5.0, concat-stream@~1.5.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" + dependencies: + inherits "~2.0.1" + readable-stream "~2.0.0" + typedarray "~0.0.5" + connect-history-api-fallback@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.3.0.tgz#e51d17f8f0ef0db90a64fdb47de3051556e9f169" @@ -1455,6 +1445,13 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" +cross-env@^5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.0.4.tgz#af93f5ce541ca9de49250b988104112e31c22563" + dependencies: + cross-spawn "^5.1.0" + is-windows "^1.0.0" + cross-spawn@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" @@ -1462,6 +1459,14 @@ cross-spawn@^3.0.0: lru-cache "^4.0.1" which "^1.2.9" +cross-spawn@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" @@ -1493,10 +1498,6 @@ cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": dependencies: cssom "0.3.x" -cubic2quad@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/cubic2quad/-/cubic2quad-1.1.0.tgz#78abec71b1b0244fdca863910ced8e07446a90e7" - currently-unhandled@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" @@ -1535,13 +1536,13 @@ debug@2.2.0, debug@~2.2.0: dependencies: ms "0.7.1" -debug@2.6.7, debug@^2.0.0, debug@^2.1.1, debug@^2.2.0: +debug@2.6.7, debug@^2.1.1: version "2.6.7" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.7.tgz#92bad1f6d05bbb6bba22cca88bcd0ec894c2861e" dependencies: ms "2.0.0" -debug@^2.6.8: +debug@^2.0.0, debug@^2.2.0, debug@^2.6.8: version "2.6.8" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" dependencies: @@ -2331,7 +2332,7 @@ glob-stream@^5.3.2: to-absolute-glob "^0.1.1" unique-stream "^2.0.2" -glob@7.0.5, glob@^7.0.0, glob@^7.0.3: +glob@7.0.5: version "7.0.5" resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" dependencies: @@ -2362,18 +2363,7 @@ glob@^6.0.1: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.5, glob@~7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.2: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.2, glob@~7.1.1: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -2388,11 +2378,7 @@ globals-docs@2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/globals-docs/-/globals-docs-2.2.0.tgz#28d9e2937cb9a6bce7e786510a5d4e337d61d3ef" -globals@^9.0.0: - version "9.14.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" - -globals@^9.17.0: +globals@^9.0.0, globals@^9.17.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" @@ -2846,16 +2832,7 @@ is-hexadecimal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.0.tgz#5c459771d2af9a2e3952781fd54fcb1bcfe4113c" -is-my-json-valid@^2.12.4: - version "2.15.0" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" - dependencies: - generate-function "^2.0.0" - generate-object-property "^1.1.0" - jsonpointer "^4.0.0" - xtend "^4.0.0" - -is-my-json-valid@^2.16.0: +is-my-json-valid@^2.12.4, is-my-json-valid@^2.16.0: version "2.16.0" resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" dependencies: @@ -2964,6 +2941,10 @@ is-windows@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" +is-windows@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.1.tgz#310db70f742d259a16a369202b51af84233310d9" + isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -3023,20 +3004,20 @@ js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" -js-yaml@3.x, js-yaml@^3.3.1: - version "3.7.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" - dependencies: - argparse "^1.0.7" - esprima "^2.6.0" - -js-yaml@^3.8.4: +js-yaml@3.x, js-yaml@^3.8.4: version "3.8.4" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" dependencies: argparse "^1.0.7" esprima "^3.1.1" +js-yaml@^3.3.1: + version "3.7.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + jsbn@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" @@ -3045,9 +3026,9 @@ jschardet@^1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.4.2.tgz#2aa107f142af4121d145659d44f50830961e699a" -jsdom@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.0.0.tgz#1ee507cb2c0b16c875002476b1a8557d951353e5" +jsdom@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.1.0.tgz#6c48d7a48ffc5c300283c312904d15da8360509b" dependencies: abab "^1.0.3" acorn "^4.0.4" @@ -3058,7 +3039,7 @@ jsdom@^11.0.0: cssstyle ">= 0.2.37 < 0.3.0" escodegen "^1.6.1" html-encoding-sniffer "^1.0.1" - nwmatcher ">= 1.3.9 < 2.0.0" + nwmatcher "^1.4.1" parse5 "^3.0.2" pn "^1.0.0" request "^2.79.0" @@ -3068,7 +3049,7 @@ jsdom@^11.0.0: tough-cookie "^2.3.2" webidl-conversions "^4.0.0" whatwg-encoding "^1.0.1" - whatwg-url "^4.3.0" + whatwg-url "^6.1.0" xml-name-validator "^2.0.1" jsesc@^1.3.0: @@ -3256,14 +3237,18 @@ lodash.keys@^3.0.0: lodash.isarguments "^3.0.0" lodash.isarray "^3.0.0" -lodash@^4.0.0, lodash@^4.11.1, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.2.0, lodash@^4.6.1: - version "4.17.2" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42" +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" -lodash@^4.17.4, lodash@^4.3.0: +lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" +lodash@^4.11.1, lodash@^4.2.0: + version "4.17.2" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42" + lodash@~4.16.4: version "4.16.6" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.16.6.tgz#d22c9ac660288f3843e16ba7d2b5d06cca27d777" @@ -3383,10 +3368,6 @@ methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" -microbuffer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/microbuffer/-/microbuffer-1.0.0.tgz#8b3832ed40c87d51f47bb234913a698a756d19d2" - micromatch@^2.1.5, micromatch@^2.1.6, micromatch@^2.3.11, micromatch@^2.3.7: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" @@ -3448,18 +3429,18 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@~3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" - dependencies: - brace-expansion "^1.0.0" - -minimatch@^3.0.4: +"minimatch@2 || 3", minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: brace-expansion "^1.1.7" +minimatch@^3.0.0, minimatch@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" + minimist@0.0.8, minimist@~0.0.1: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -3525,7 +3506,7 @@ mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" -nan@^2.1.0, nan@^2.3.0, nan@^2.3.2: +nan@^2.3.0, nan@^2.3.2: version "2.4.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.4.0.tgz#fb3c59d45fe4effe215f0b890f8adf6eb32d2232" @@ -3537,7 +3518,7 @@ negotiator@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" -node-gyp@^3.0.3, node-gyp@^3.3.1: +node-gyp@^3.3.1: version "3.4.0" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.4.0.tgz#dda558393b3ecbbe24c9e6b8703c71194c63fa36" dependencies: @@ -3672,9 +3653,9 @@ number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" -"nwmatcher@>= 1.3.9 < 2.0.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.0.tgz#b4389362170e7ef9798c3c7716d80ebc0106fccf" +nwmatcher@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.1.tgz#7ae9b07b0ea804db7e25f05cb5fe4097d4e4949f" oauth-sign@~0.8.1: version "0.8.2" @@ -3807,10 +3788,6 @@ osenv@0: os-homedir "^1.0.0" os-tmpdir "^1.0.0" -pako@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.3.tgz#5f515b0c6722e1982920ae8005eacb0b7ca73ccf" - pako@~0.2.0: version "0.2.9" resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" @@ -4133,16 +4110,16 @@ read-pkg@^1.0.0: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@~2.1.0, readable-stream@~2.1.4: - version "2.1.5" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" +readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.5, readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.9: + version "2.2.9" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" dependencies: - buffer-shims "^1.0.0" + buffer-shims "~1.0.0" core-util-is "~1.0.0" inherits "~2.0.1" isarray "~1.0.0" process-nextick-args "~1.0.6" - string_decoder "~0.10.x" + string_decoder "~1.0.0" util-deprecate "~1.0.1" readable-stream@^2.0.2, readable-stream@~2.0.0: @@ -4156,16 +4133,16 @@ readable-stream@^2.0.2, readable-stream@~2.0.0: string_decoder "~0.10.x" util-deprecate "~1.0.1" -readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.9: - version "2.2.9" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" +readable-stream@^2.0.4, readable-stream@~2.1.0, readable-stream@~2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" dependencies: - buffer-shims "~1.0.0" + buffer-shims "^1.0.0" core-util-is "~1.0.0" inherits "~2.0.1" isarray "~1.0.0" process-nextick-args "~1.0.6" - string_decoder "~1.0.0" + string_decoder "~0.10.x" util-deprecate "~1.0.1" readdirp@^2.0.0: @@ -4529,6 +4506,16 @@ sha.js@^2.4.0, sha.js@^2.4.8: dependencies: inherits "^2.0.1" +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + shellsubstitute@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shellsubstitute/-/shellsubstitute-1.2.0.tgz#e4f702a50c518b0f6fe98451890d705af29b6b70" @@ -4801,21 +4788,6 @@ supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" -svg2ttf@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/svg2ttf/-/svg2ttf-4.0.2.tgz#5e37123c7e9bf3dc6c7f26b141392a19fcec7a57" - dependencies: - argparse "^1.0.6" - cubic2quad "^1.0.0" - lodash "^4.6.1" - microbuffer "^1.0.0" - svgpath "^2.1.5" - xmldom "~0.1.22" - -svgpath@^2.1.5: - version "2.2.0" - resolved "https://registry.yarnpkg.com/svgpath/-/svgpath-2.2.0.tgz#6bbe4c4cad9170e3f338cc746cc2e0c0fc7a5064" - symbol-tree@^3.2.1: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" @@ -4966,30 +4938,6 @@ tryit@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" -ttf2eot@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ttf2eot/-/ttf2eot-2.0.0.tgz#8e6337a585abd1608a0c84958ab483ce69f6654b" - dependencies: - argparse "^1.0.6" - microbuffer "^1.0.0" - -ttf2woff2@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/ttf2woff2/-/ttf2woff2-2.0.3.tgz#5e020afe6e643287f3ad7687abed20fe654eb329" - dependencies: - bindings "^1.2.1" - bufferstreams "^1.1.0" - nan "^2.1.0" - node-gyp "^3.0.3" - -ttf2woff@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ttf2woff/-/ttf2woff-2.0.1.tgz#871832240024b09db9570904c7c1928b8057c969" - dependencies: - argparse "^1.0.6" - microbuffer "^1.0.0" - pako "^1.0.0" - tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" @@ -5278,11 +5226,7 @@ wbuf@^1.1.0, wbuf@^1.7.2: dependencies: minimalistic-assert "^1.0.0" -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - -webidl-conversions@^4.0.0: +webidl-conversions@^4.0.0, webidl-conversions@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0" @@ -5366,12 +5310,13 @@ whatwg-encoding@^1.0.1: dependencies: iconv-lite "0.4.13" -whatwg-url@^4.3.0: - version "4.8.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" +whatwg-url@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.1.0.tgz#5fc8279b93d75483b9ced8b26239854847a18578" dependencies: + lodash.sortby "^4.7.0" tr46 "~0.0.3" - webidl-conversions "^3.0.0" + webidl-conversions "^4.0.1" which-module@^1.0.0: version "1.0.0" @@ -5431,10 +5376,6 @@ xml-name-validator@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" -xmldom@~0.1.22: - version "0.1.22" - resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.22.tgz#10de4e5e964981f03c8cc72fadc08d14b6c3aa26" - "xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"