From 312a50f4e51eb3b4b5de67e1b5feb623b8dc7619 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 5 Sep 2016 22:05:12 +0200 Subject: [PATCH] Refactor tool positioning --- .gitignore | 1 + bower.json | 2 +- dist/css/grapes.min.css | 2 +- dist/grapes.min.js | 8 +-- index.html | 1 + package.json | 2 +- src/canvas/view/CanvasView.js | 29 +++++++- src/commands/view/Fullscreen.js | 6 +- src/commands/view/SelectComponent.js | 102 +++++++++++---------------- src/editor/view/EditorView.js | 2 +- 10 files changed, 85 insertions(+), 70 deletions(-) diff --git a/.gitignore b/.gitignore index 50312a441..43fccba1a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .settings/ .sass-cache/ .project +.eslintrc npm-debug.log style/.sass-cache/ diff --git a/bower.json b/bower.json index 446d07bb8..cf06e6b87 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "grapesjs", "description": "Open source Web Template Editor", - "version": "0.3.13", + "version": "0.3.14", "author": "Artur Arseniev", "homepage": "http://grapesjs.com", "main": [ diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index f7dd11316..f9f37bbe4 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -3,4 +3,4 @@ @charset "UTF-8";.sp-alpha-handle,.sp-slider{opacity:.8;background-color:#ccc}.fa,.gjs-fonts:before{-moz-osx-font-smoothing:grayscale}.fa-fw,.fa-li,.gjs-pn-panel,.sp-container button{text-align:center}.sp-container{position:absolute;top:0;left:0;display:inline-block;z-index:9999994;overflow:hidden}.sp-container.sp-flat,.sp-top{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{width:100%;display:inline-block}.sp-alpha-handle,.sp-color,.sp-dragger,.sp-hue,.sp-sat,.sp-slider,.sp-top-inner,.sp-val{position:absolute}.sp-top-inner{top:0;left:0;bottom:0;right:0}.sp-color{top:0;left:0;bottom:0}.sp-hue{top:0;right:0;bottom:0;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{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,.sp-clear{display:none}.sp-alpha-handle{top:-4px;bottom:-4px;left:50%;background:#fff;opacity:.8}.sp-alpha{bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:1px solid #333}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0;right:0;bottom:0;left:84%;height:28px}.sp-alpha,.sp-alpha-handle,.sp-clear,.sp-container,.sp-container button,.sp-container.sp-dragging .sp-input,.sp-dragger,.sp-preview,.sp-replacer,.sp-slider{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-buttons-disabled .sp-button-container,.sp-container.sp-input-disabled .sp-input-container,.sp-container.sp-palette-buttons-disabled .sp-palette-button-container,.sp-initial-disabled .sp-initial,.sp-palette-disabled .sp-palette-container,.sp-palette-only .sp-picker-container{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%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-ms-linear-gradient(top,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-o-linear-gradient(top,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-webkit-gradient(linear,left top,left bottom,from(red),color-stop(.17,#ff0),color-stop(.33,#0f0),color-stop(.5,#0ff),color-stop(.67,#00f),color-stop(.83,#f0f),to(red));background:-webkit-linear-gradient(top,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:linear-gradient(to bottom,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 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:after,.sp-cf:before{content:"";display:table}.sp-cf:after{clear:both}@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;top:0;left:0}.sp-slider{top:0;right:-1px;background:#fff;opacity:.8}.sp-container{border:1px solid #f0c49B;padding:0}.sp-clear,.sp-color,.sp-container,.sp-container button,.sp-container input,.sp-hue{font:400 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-clear,.sp-color,.sp-hue{border:1px solid #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container,.sp-input{width:100%}.sp-input{font-size:12px!important;border:1px inset;padding:4px 5px;margin:0;background:0 0;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-palette-container,.sp-picker-container{float:left;position:relative;padding:10px 10px 300px;margin-bottom:-290px}.sp-picker-container{width:172px}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;cursor:pointer}.sp-palette .sp-thumb-el.sp-thumb-active,.sp-palette .sp-thumb-el:hover{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:1px solid #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-button-container,.sp-palette-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;border:1px solid #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer.sp-active,.sp-replacer:hover{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{width:25px;height:20px;border:1px solid #222;margin-right:5px;float:left;z-index:0}.sp-palette{max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:1px solid #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eee;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;font-size:14px;line-height:1;vertical-align:middle}.sp-container button:hover{background-color:#ddd;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}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-moz-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-ms-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-o-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee}.sp-cancel{margin:0 5px 0 0;padding:2px;vertical-align:middle}.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}.sp-palette span.sp-thumb-active,.sp-palette span:hover{border-color:#000}.sp-alpha,.sp-preview,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-alpha-inner,.sp-preview-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.fa,.fa-stack{display:inline-block}.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.5.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.5.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0) format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff2?v=4.5.0) format("woff2"),url(../fonts/fontawesome-webfont.woff?v=4.5.0) format("woff"),url(../fonts/fontawesome-webfont.ttf?v=4.5.0) format("truetype"),url(../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.fa-lg{font-size:1.3333333333em;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.2857142857em}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right,.pull-right{float:right}.pull-left{float:left}.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(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.gjs-clm-tags #gjs-clm-close,.gjs-freezed,.opac50{opacity:.5;filter:alpha(opacity=50)}.fa-stack{position:relative;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-close:before,.fa-remove: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-cog:before,.fa-gear: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-repeat:before,.fa-rotate-right: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-image:before,.fa-photo: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-exclamation-triangle:before,.fa-warning: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-cogs:before,.fa-gears: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-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder: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-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste: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-chain-broken:before,.fa-unlink: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-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won: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-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira: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-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board: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: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-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-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-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-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-futbol-o:before,.fa-soccer-ball-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-ils:before,.fa-shekel:before,.fa-sheqel: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-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4: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-paper-o:before,.fa-hand-stop-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-television:before,.fa-tv: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:""}@font-face{font-family:font3336;src:url(../fonts/main-fonts.eot?v=5);src:url(../fonts/main-fonts.woff?v=5) format("woff"),url(../fonts/main-fonts.ttf?v=5) format("truetype"),url(../fonts/main-fonts.svg?v=5) format("svg"),url(../fonts/main-fonts.eot?v=5) format("embedded-opentype");font-weight:400;font-style:normal}.gjs-fonts:before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;font-size:5em}.gjs-editor,.gjs-mdl-container{font-family:Helvetica,sans-serif}.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-clm-tags #gjs-clm-new,.gjs-invis-invis,.gjs-no-app{background-color:transparent;border:none;color:inherit}#gjs-rte-toolbar,.gjs-bg-main,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-editor,.gjs-mdl-dialog,.gjs-nv-item .gjs-nv-title-c,.gjs-off-prv,.gjs-pn-panel,.gjs-sm-sector .gjs-sm-colorp-c,.sp-container{background-color:#444}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.checker-bg,.gjs-checker-bg,.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-box{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}#gjs-rte-toolbar .gjs-rte-btn,.gjs-btn-prim,.gjs-btnt,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-color-main,.gjs-mdl-dialog,.gjs-off-prv,.gjs-pn-btn,.gjs-pn-panel,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add{color:#ddd}.gjs-btnt.gjs-pn-active,.gjs-color-active,.gjs-pn-btn.gjs-pn-active{color:#f8f8f8}.gjs-bdrag{position:absolute;z-index:10;width:auto}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.clear{clear:both}.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label,.gjs-com-no-select,.gjs-com-no-select img,.no-select{-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{position:relative;box-sizing:border-box;height:100%;min-width:1250px}.gjs-btn-prim,.gjs-btn-prim:active{background-color:rgba(255,255,255,.1)}.gjs-freezed{pointer-events:none}.gjs-btn-prim{border-radius:2px;cursor:pointer;padding:.5em;border:none}.gjs-input,.gjs-select{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);border-radius:2px;box-shadow:1px 1px 0 rgba(255,255,255,.1);box-sizing:border-box;color:#ddd;padding:.5em 1em}div.gjs-select{padding:0}.gjs-select select{padding-right:10px}.gjs-select select:-moz-focusring,.gjs-select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,.7)}.gjs-btn-prim:focus,.gjs-button:focus,.gjs-input:focus,.gjs-select select:focus,.gjs-select:focus{outline:0}.gjs-cv-canvas{background-color:rgba(0,0,0,.15);box-sizing:border-box;position:absolute;width:83%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{background-color:#fff;height:100%;outline:0;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:#3b97e3 solid 1px;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:#ffca6f solid 3px}.gjs-cv-canvas .gjs-highlighter-sel{outline:#3b97e3 solid 3px}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:0}.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 .35s ease}.btn-cl,.gjs-am-assets-cont #gjs-am-close,.gjs-mdl-dialog .gjs-mdl-btn-close{font-size:25px;opacity:.3;filter:alpha(opacity=30);cursor:pointer}.btn-cl:hover,.gjs-am-assets-cont #gjs-am-close:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover{opacity:.7;filter:alpha(opacity=70)}.dragged,.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}#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;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:0!important}.gjs-com-dashed *{outline:#888 dashed 1px;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:#3b97e3 solid 3px!important}.gjs-com-hover,div.gjs-com-hover{outline:#3b97e3 solid 1px}.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:#DD3636 solid 2px;opacity:.5;filter:alpha(opacity=50)}.gjs-com-hover-move,div.gjs-com-hover-move{outline:#ffca6f solid 3px}.gjs-badge,.gjs-com-badge,.gjs-com-badge-red{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:0;display:none}.gjs-com-badge-red{background-color:#DD3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-com-placeholder,.gjs-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder{border-style:solid!important;border-color:#62c462;outline:0}.gjs-com-placeholder-int,.gjs-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,.2);height:100%;width:100%;pointer-events:'none';padding:1.5px;outline:0}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:83%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,.3)}.gjs-pn-panel#gjs-pn-options{right:17%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-redo,.gjs-pn-panel .icon-undo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,.3);right:0;width:17%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:17%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-btnt,.gjs-pn-btn{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-btnt.gjs-pn-active,.gjs-pn-btn.gjs-pn-active{background-color:rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.25) inset}.gjs-btnt>.gjs-pn-arrow-rd,.gjs-pn-btn>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-btnt>.gjs-pn-buttons,.gjs-pn-btn>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible,.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-pn-btn>.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-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,.2)}.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;color:#aaa;cursor:pointer;z-index:1}.gjs-nv-navigator .gjs-nv-item .gjs-nv-title{font-size:11px;padding:7px 10px 7px 30px}.gjs-nv-navigator .gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px}.gjs-nv-item .gjs-nv-title{background-color:rgba(0,0,0,.1);font-size:13px;letter-spacing:1px;padding:7px 10px 7px 25px;border-bottom:1px solid rgba(0,0,0,.3);border-top:1px solid rgba(255,255,255,.1);cursor:pointer}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,.3)}.gjs-nv-item>.gjs-nv-children{margin-left:15px;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{color:#aaa;position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-item.gjs-nv-selected{border:2px solid #3b97e3}.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:#ffca6f solid 3px;outline-offset:-3px;text-align:center;font-size:16.67px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-field{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 rgba(255,255,255,.1);border-radius:2px;box-sizing:border-box;padding:0 5px;position:relative}.gjs-field input,.gjs-field select{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:rgba(255,255,255,.7);border:none;background-color:transparent;width:100%;position:relative;z-index:1}.gjs-field select{height:20px}.gjs-field option{margin:5px 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,.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-add-trasp{background:0 0;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:.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-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-sm-close-btn,.gjs-sm-sector .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-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-sm-close-btn:hover,.gjs-sm-sector .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-clm-tags,.gjs-sm-sector{clear:both;border-bottom:1px solid rgba(0,0,0,.3);font-weight:lighter;text-align:left}.gjs-clm-tags #gjs-sm-caret,.gjs-sm-sector #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-clm-tags .gjs-sm-title,.gjs-sm-sector .gjs-sm-title{background-color:rgba(0,0,0,.1);font-size:13px;letter-spacing:1px;padding:12px 10px 12px 20px;border-top:1px solid rgba(255,255,255,.1);cursor:pointer}.gjs-clm-tags .gjs-sm-label,.gjs-sm-sector .gjs-sm-label{margin:5px 5px 2px 0}.gjs-clm-tags .gjs-clm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-sm-sector .gjs-sm-field{width:100%;position:relative}.gjs-clm-tags .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field select,.gjs-clm-tags .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field input,.gjs-sm-sector .gjs-clm-field select,.gjs-sm-sector .gjs-sm-field input,.gjs-sm-sector .gjs-sm-field select{background-color:transparent;color:rgba(255,255,255,.7);border:none;width:100%}.gjs-clm-tags .gjs-clm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field input{box-sizing:border-box;padding:3px 21px 3px 0}.gjs-clm-tags .gjs-clm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-sm-sector .gjs-sm-field select{padding:2px 10px 2px 2px;position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-clm-tags .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-sm-sector .gjs-sm-field select::-ms-expand{display:none}.gjs-clm-tags .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-sm-sector .gjs-sm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,.7)}.gjs-clm-tags .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field select:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-sm-sector .gjs-sm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus{outline:0}.gjs-clm-tags .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-sm-sector .gjs-sm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,.7);cursor:pointer}.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-clm-tags .gjs-clm-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-sm-sector .gjs-sm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-clm-tags .gjs-clm-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-sm-sector .gjs-sm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,.7);top:4px}.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,.7);bottom:4px}.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-clm-tags #gjs-clm-tags-field,.gjs-clm-tags .gjs-clm-select,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-select.gjs-clm-field{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 rgba(255,255,255,.1);color:rgba(255,255,255,.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite{border-radius:2px;background-color:rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.25)}.gjs-clm-tags .gjs-clm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field{padding:0}.gjs-clm-tags .gjs-clm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select{height:20px}.gjs-clm-tags .gjs-clm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option{margin:5px 0}.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input,.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input{display:none}.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label,.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-sm-sector .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{background-color:rgba(255,255,255,.2)}.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-clm-tags #gjs-clm-tags-field select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-clm-tags .gjs-sm-list .gjs-sm-el,.gjs-sm-sector .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,.3)}.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child,.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover,.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,.3)}.gjs-clm-tags .gjs-sm-properties,.gjs-sm-sector .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-clm-tags .gjs-sm-property,.gjs-sm-sector .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack{width:100%}.gjs-clm-tags .gjs-sm-property .gjs-sm-btn,.gjs-sm-sector .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,.3),1px 1px 0 rgba(43,43,43,.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,.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c,.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,.05);padding:3px 5px}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-clm-tags .gjs-sm-property .gjs-sm-layers,.gjs-sm-sector .gjs-sm-property .gjs-sm-layers{background-color:rgba(0,0,0,.13);border:1px solid rgba(0,0,0,.13);box-shadow:1px 1px 0 rgba(255,255,255,.1);border-radius:2px;margin-top:5px;min-height:30px}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,.055);border-radius:2px;box-shadow:1px 1px 0 rgba(0,0,0,.2),1px 1px 0 rgba(255,255,255,.055) inset;margin:2px;padding:7px;position:relative;cursor:pointer}.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-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.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-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-sm-sector .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-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:#fff;height:100%;width:100%;background-size:cover!important}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,.12)}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties,.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add{background:0 0;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:.75}.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-clm-tags .gjs-sm-colorp-c,.gjs-sm-sector .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg{height:100%;width:100%;border-radius:1px}.gjs-clm-tags .gjs-sm-color-picker,.gjs-sm-sector .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,.3);border-radius:1px}.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload,.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label,.gjs-sm-sector .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{-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;margin:2.5%;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-mdl-backlayer,.gjs-mdl-container{position:absolute;top:0;left:0;width:100%;height:100%}.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,.2);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,.2) inset;border:1px solid rgba(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}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-mdl-backlayer{background-color:#000;z-index:1;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{z-index:10}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,.05);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-content,.gjs-mdl-header{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,.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 input{width:70%}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-assets-cont{background-color:rgba(0,0,0,.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-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,.1)}.gjs-am-assets-cont .gjs-am-asset{border-bottom:1px solid rgba(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,.1);border:2px dashed #999;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}#gjs-rte-toolbar .gjs-rte-btn.btn-info,.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,.3)}.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,.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,.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,.3);position:absolute;border-radius:3px;overflow:hidden;z-index:5}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,.3);text-align:center;cursor:pointer;outline:0}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-handle,.sp-alpha-inner{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,.3);box-shadow:0 0 7px rgba(0,0,0,.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:rgba(0,0,0,.3) solid 1px}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777!important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333}.sp-slider{border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:0 0;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:active,.sp-container button:hover{background:rgba(0,0,0,.3);border-color:rgba(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,.8)}.gjs-hidden{display:none} \ No newline at end of file + */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.5.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0) format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff2?v=4.5.0) format("woff2"),url(../fonts/fontawesome-webfont.woff?v=4.5.0) format("woff"),url(../fonts/fontawesome-webfont.ttf?v=4.5.0) format("truetype"),url(../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.fa-lg{font-size:1.3333333333em;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.2857142857em}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right,.pull-right{float:right}.pull-left{float:left}.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(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.gjs-clm-tags #gjs-clm-close,.gjs-freezed,.opac50{opacity:.5;filter:alpha(opacity=50)}.fa-stack{position:relative;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-close:before,.fa-remove: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-cog:before,.fa-gear: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-repeat:before,.fa-rotate-right: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-image:before,.fa-photo: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-exclamation-triangle:before,.fa-warning: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-cogs:before,.fa-gears: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-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder: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-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste: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-chain-broken:before,.fa-unlink: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-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won: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-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira: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-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board: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: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-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-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-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-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-futbol-o:before,.fa-soccer-ball-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-ils:before,.fa-shekel:before,.fa-sheqel: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-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4: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-paper-o:before,.fa-hand-stop-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-television:before,.fa-tv: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:""}@font-face{font-family:font3336;src:url(../fonts/main-fonts.eot?v=5);src:url(../fonts/main-fonts.woff?v=5) format("woff"),url(../fonts/main-fonts.ttf?v=5) format("truetype"),url(../fonts/main-fonts.svg?v=5) format("svg"),url(../fonts/main-fonts.eot?v=5) format("embedded-opentype");font-weight:400;font-style:normal}.gjs-fonts:before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;font-size:5em}.gjs-editor,.gjs-mdl-container{font-family:Helvetica,sans-serif}.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-clm-tags #gjs-clm-new,.gjs-invis-invis,.gjs-no-app{background-color:transparent;border:none;color:inherit}#gjs-rte-toolbar,.gjs-bg-main,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-editor,.gjs-mdl-dialog,.gjs-nv-item .gjs-nv-title-c,.gjs-off-prv,.gjs-pn-panel,.gjs-sm-sector .gjs-sm-colorp-c,.sp-container{background-color:#444}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.checker-bg,.gjs-checker-bg,.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-box{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}#gjs-rte-toolbar .gjs-rte-btn,.gjs-btn-prim,.gjs-btnt,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-color-main,.gjs-mdl-dialog,.gjs-off-prv,.gjs-pn-btn,.gjs-pn-panel,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add{color:#ddd}.gjs-btnt.gjs-pn-active,.gjs-color-active,.gjs-pn-btn.gjs-pn-active{color:#f8f8f8}.gjs-bdrag{position:absolute;z-index:10;width:auto}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.clear{clear:both}.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label,.gjs-com-no-select,.gjs-com-no-select img,.no-select{-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{position:relative;box-sizing:border-box;height:100%}.gjs-btn-prim,.gjs-btn-prim:active{background-color:rgba(255,255,255,.1)}.gjs-freezed{pointer-events:none}.gjs-btn-prim{border-radius:2px;cursor:pointer;padding:.5em;border:none}.gjs-input,.gjs-select{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);border-radius:2px;box-shadow:1px 1px 0 rgba(255,255,255,.1);box-sizing:border-box;color:#ddd;padding:.5em 1em}div.gjs-select{padding:0}.gjs-select select{padding-right:10px}.gjs-select select:-moz-focusring,.gjs-select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,.7)}.gjs-btn-prim:focus,.gjs-button:focus,.gjs-input:focus,.gjs-select select:focus,.gjs-select:focus{outline:0}.gjs-cv-canvas{background-color:rgba(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{background-color:#fff;height:100%;outline:0;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:#3b97e3 solid 1px;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:#ffca6f solid 3px}.gjs-cv-canvas .gjs-highlighter-sel{outline:#3b97e3 solid 3px}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:0}.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 .35s ease}.btn-cl,.gjs-am-assets-cont #gjs-am-close,.gjs-mdl-dialog .gjs-mdl-btn-close{font-size:25px;opacity:.3;filter:alpha(opacity=30);cursor:pointer}.btn-cl:hover,.gjs-am-assets-cont #gjs-am-close:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover{opacity:.7;filter:alpha(opacity=70)}.dragged,.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}#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;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:0!important}.gjs-com-dashed *{outline:#888 dashed 1px;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:#3b97e3 solid 3px!important}.gjs-com-hover,div.gjs-com-hover{outline:#3b97e3 solid 1px}.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:#DD3636 solid 2px;opacity:.5;filter:alpha(opacity=50)}.gjs-com-hover-move,div.gjs-com-hover-move{outline:#ffca6f solid 3px}.gjs-badge,.gjs-com-badge,.gjs-com-badge-red{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:0;display:none}.gjs-com-badge-red{background-color:#DD3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-com-placeholder,.gjs-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder{border-style:solid!important;border-color:#62c462;outline:0}.gjs-com-placeholder-int,.gjs-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,.2);height:100%;width:100%;pointer-events:'none';padding:1.5px;outline:0}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;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,.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-redo,.gjs-pn-panel .icon-undo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(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,.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-btnt,.gjs-pn-btn{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-btnt.gjs-pn-active,.gjs-pn-btn.gjs-pn-active{background-color:rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.25) inset}.gjs-btnt>.gjs-pn-arrow-rd,.gjs-pn-btn>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-btnt>.gjs-pn-buttons,.gjs-pn-btn>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible,.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-pn-btn>.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-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,.2)}.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;color:#aaa;cursor:pointer;z-index:1}.gjs-nv-navigator .gjs-nv-item .gjs-nv-title{font-size:11px;padding:7px 10px 7px 30px}.gjs-nv-navigator .gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px}.gjs-nv-item .gjs-nv-title{background-color:rgba(0,0,0,.1);font-size:13px;letter-spacing:1px;padding:7px 10px 7px 25px;border-bottom:1px solid rgba(0,0,0,.3);border-top:1px solid rgba(255,255,255,.1);cursor:pointer}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,.3)}.gjs-nv-item>.gjs-nv-children{margin-left:15px;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{color:#aaa;position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-item.gjs-nv-selected{border:2px solid #3b97e3}.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:#ffca6f solid 3px;outline-offset:-3px;text-align:center;font-size:16.67px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-field{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 rgba(255,255,255,.1);border-radius:2px;box-sizing:border-box;padding:0 5px;position:relative}.gjs-field input,.gjs-field select{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:rgba(255,255,255,.7);border:none;background-color:transparent;width:100%;position:relative;z-index:1}.gjs-field select{height:20px}.gjs-field option{margin:5px 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,.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-add-trasp{background:0 0;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:.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-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-sm-close-btn,.gjs-sm-sector .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-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-sm-close-btn:hover,.gjs-sm-sector .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-clm-tags,.gjs-sm-sector{clear:both;border-bottom:1px solid rgba(0,0,0,.3);font-weight:lighter;text-align:left}.gjs-clm-tags #gjs-sm-caret,.gjs-sm-sector #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-clm-tags .gjs-sm-title,.gjs-sm-sector .gjs-sm-title{background-color:rgba(0,0,0,.1);font-size:13px;letter-spacing:1px;padding:12px 10px 12px 20px;border-top:1px solid rgba(255,255,255,.1);cursor:pointer}.gjs-clm-tags .gjs-sm-label,.gjs-sm-sector .gjs-sm-label{margin:5px 5px 2px 0}.gjs-clm-tags .gjs-clm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-sm-sector .gjs-sm-field{width:100%;position:relative}.gjs-clm-tags .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field select,.gjs-clm-tags .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field input,.gjs-sm-sector .gjs-clm-field select,.gjs-sm-sector .gjs-sm-field input,.gjs-sm-sector .gjs-sm-field select{background-color:transparent;color:rgba(255,255,255,.7);border:none;width:100%}.gjs-clm-tags .gjs-clm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field input{box-sizing:border-box;padding:3px 21px 3px 0}.gjs-clm-tags .gjs-clm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-sm-sector .gjs-sm-field select{padding:2px 10px 2px 2px;position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-clm-tags .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-sm-sector .gjs-sm-field select::-ms-expand{display:none}.gjs-clm-tags .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-sm-sector .gjs-sm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,.7)}.gjs-clm-tags .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field select:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-sm-sector .gjs-sm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus{outline:0}.gjs-clm-tags .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-sm-sector .gjs-sm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,.7);cursor:pointer}.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-clm-tags .gjs-clm-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-sm-sector .gjs-sm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-clm-tags .gjs-clm-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-sm-sector .gjs-sm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,.7);top:4px}.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,.7);bottom:4px}.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-clm-tags #gjs-clm-tags-field,.gjs-clm-tags .gjs-clm-select,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-select.gjs-clm-field{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 rgba(255,255,255,.1);color:rgba(255,255,255,.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite{border-radius:2px;background-color:rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.25)}.gjs-clm-tags .gjs-clm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field{padding:0}.gjs-clm-tags .gjs-clm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select{height:20px}.gjs-clm-tags .gjs-clm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option{margin:5px 0}.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input,.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input{display:none}.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label,.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-sm-sector .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{background-color:rgba(255,255,255,.2)}.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-clm-tags #gjs-clm-tags-field select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-clm-tags .gjs-sm-list .gjs-sm-el,.gjs-sm-sector .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,.3)}.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child,.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover,.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,.3)}.gjs-clm-tags .gjs-sm-properties,.gjs-sm-sector .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-clm-tags .gjs-sm-property,.gjs-sm-sector .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack{width:100%}.gjs-clm-tags .gjs-sm-property .gjs-sm-btn,.gjs-sm-sector .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,.3),1px 1px 0 rgba(43,43,43,.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,.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c,.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,.05);padding:3px 5px}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-clm-tags .gjs-sm-property .gjs-sm-layers,.gjs-sm-sector .gjs-sm-property .gjs-sm-layers{background-color:rgba(0,0,0,.13);border:1px solid rgba(0,0,0,.13);box-shadow:1px 1px 0 rgba(255,255,255,.1);border-radius:2px;margin-top:5px;min-height:30px}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,.055);border-radius:2px;box-shadow:1px 1px 0 rgba(0,0,0,.2),1px 1px 0 rgba(255,255,255,.055) inset;margin:2px;padding:7px;position:relative;cursor:pointer}.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-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.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-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-sm-sector .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-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:#fff;height:100%;width:100%;background-size:cover!important}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,.12)}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties,.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add{background:0 0;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:.75}.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-clm-tags .gjs-sm-colorp-c,.gjs-sm-sector .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg{height:100%;width:100%;border-radius:1px}.gjs-clm-tags .gjs-sm-color-picker,.gjs-sm-sector .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,.3);border-radius:1px}.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload,.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label,.gjs-sm-sector .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{-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;margin:2.5%;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-mdl-backlayer,.gjs-mdl-container{position:absolute;top:0;left:0;width:100%;height:100%}.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,.2);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,.2) inset;border:1px solid rgba(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}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-mdl-backlayer{background-color:#000;z-index:1;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{z-index:10}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,.05);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-content,.gjs-mdl-header{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,.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 input{width:70%}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-assets-cont{background-color:rgba(0,0,0,.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-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,.1)}.gjs-am-assets-cont .gjs-am-asset{border-bottom:1px solid rgba(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,.1);border:2px dashed #999;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}#gjs-rte-toolbar .gjs-rte-btn.btn-info,.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,.3)}.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,.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,.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,.3);position:absolute;border-radius:3px;overflow:hidden;z-index:5}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,.3);text-align:center;cursor:pointer;outline:0}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-handle,.sp-alpha-inner{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,.3);box-shadow:0 0 7px rgba(0,0,0,.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:rgba(0,0,0,.3) solid 1px}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777!important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333}.sp-slider{border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:0 0;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:active,.sp-container button:hover{background:rgba(0,0,0,.3);border-color:rgba(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,.8)}.gjs-hidden{display:none} \ No newline at end of file diff --git a/dist/grapes.min.js b/dist/grapes.min.js index 3ff269503..d0f3e07f8 100644 --- a/dist/grapes.min.js +++ b/dist/grapes.min.js @@ -1,4 +1,4 @@ -/*! grapesjs - v0.3.13 */ +/*! grapesjs - v0.3.14 */ !function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof exports&&"object"==typeof module?module.exports=mod():a.grapesjs=a.GrapesJS=b()}(this,function(){var a,b,c;!function(d){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,b){return function(){var c=v.call(arguments,0);return"string"!=typeof c[0]&&1===c.length&&c.push(null),n.apply(d,c.concat([a,b]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var b=r[a];delete r[a],t[a]=!0,m.apply(d,b)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,b,c,f){var h,k,l,m,n,s,u=[],v=typeof c;if(f=f||a,"undefined"===v||"function"===v){for(b=!b.length&&c.length?["require","exports","module"]:b,n=0;n
',attributes:{"class":"gjs-fonts gjs-f-b1"}},{id:"b2",label:"2 Blocks",content:'
',attributes:{"class":"gjs-fonts gjs-f-b2"}},{id:"b3",label:"3 Blocks",content:'
',attributes:{"class":"gjs-fonts gjs-f-b3"}},{id:"b4",label:"3/7 Block",content:'
',attributes:{"class":"gjs-fonts gjs-f-b37"}},{id:"hero",label:"Hero section",content:'
Build your templates without coding
Try it now
',attributes:{"class":"gjs-fonts gjs-f-hero"}},{id:"h1p",label:"Text section",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",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"},content:{type:"text",content:"Insert your text here",style:{padding:"10px"},activeOnRender:1}},{id:"image",label:"Image",attributes:{"class":"gjs-fonts gjs-f-image"},content:{type:"image",activeOnRender:1}},{id:"quo",label:"Quote",content:'
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
',attributes:{"class":"gjs-fonts gjs-f-quo"}}]}}}),function(){function a(a){function b(b,c,d,e,f,g){for(;f>=0&&g>f;f+=a){var h=e?e[f]:f;d=c(d,b[h],h,b)}return d}return function(c,d,e,f){d=u(d,f,4);var g=!B(c)&&t.keys(c),h=(g||c).length,i=a>0?0:h-1;return arguments.length<3&&(e=c[g?g[i]:i],i+=a),b(c,d,e,g,i,h)}}function b(a){return function(b,c,d){c=v(c,d);for(var e=A(b),f=a>0?0:e-1;f>=0&&e>f;f+=a)if(c(b[f],f,b))return f;return-1}}function d(a,b,c){return function(d,e,f){var g=0,h=A(d);if("number"==typeof f)a>0?g=f>=0?f:Math.max(f+h,g):h=f>=0?Math.min(f+1,h):f+h+1;else if(c&&f&&h)return f=c(d,e),d[f]===e?f:-1;if(e!==e)return f=b(l.call(d,g,h),t.isNaN),f>=0?f+g:-1;for(f=a>0?g:h-1;f>=0&&h>f;f+=a)if(d[f]===e)return f;return-1}}function e(a,b){var c=G.length,d=a.constructor,e=t.isFunction(d)&&d.prototype||i,f="constructor";for(t.has(a,f)&&!t.contains(b,f)&&b.push(f);c--;)f=G[c],f in a&&a[f]!==e[f]&&!t.contains(b,f)&&b.push(f)}var f=this,g=f._,h=Array.prototype,i=Object.prototype,j=Function.prototype,k=h.push,l=h.slice,m=i.toString,n=i.hasOwnProperty,o=Array.isArray,p=Object.keys,q=j.bind,r=Object.create,s=function(){},t=function(a){return a instanceof t?a:this instanceof t?void(this._wrapped=a):new t(a)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=t),exports._=t):f._=t,t.VERSION="1.8.3";var u=function(a,b,c){if(void 0===b)return a;switch(null==c?3:c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return function(){return a.apply(b,arguments)}},v=function(a,b,c){return null==a?t.identity:t.isFunction(a)?u(a,b,c):t.isObject(a)?t.matcher(a):t.property(a)};t.iteratee=function(a,b){return v(a,b,1/0)};var w=function(a,b){return function(c){var d=arguments.length;if(2>d||null==c)return c;for(var e=1;d>e;e++)for(var f=arguments[e],g=a(f),h=g.length,i=0;h>i;i++){var j=g[i];b&&void 0!==c[j]||(c[j]=f[j])}return c}},x=function(a){if(!t.isObject(a))return{};if(r)return r(a);s.prototype=a;var b=new s;return s.prototype=null,b},y=function(a){return function(b){return null==b?void 0:b[a]}},z=Math.pow(2,53)-1,A=y("length"),B=function(a){var b=A(a);return"number"==typeof b&&b>=0&&z>=b};t.each=t.forEach=function(a,b,c){b=u(b,c);var d,e;if(B(a))for(d=0,e=a.length;e>d;d++)b(a[d],d,a);else{var f=t.keys(a);for(d=0,e=f.length;e>d;d++)b(a[f[d]],f[d],a)}return a},t.map=t.collect=function(a,b,c){b=v(b,c);for(var d=!B(a)&&t.keys(a),e=(d||a).length,f=Array(e),g=0;e>g;g++){var h=d?d[g]:g;f[g]=b(a[h],h,a)}return f},t.reduce=t.foldl=t.inject=a(1),t.reduceRight=t.foldr=a(-1),t.find=t.detect=function(a,b,c){var d;return d=B(a)?t.findIndex(a,b,c):t.findKey(a,b,c),void 0!==d&&-1!==d?a[d]:void 0},t.filter=t.select=function(a,b,c){var d=[];return b=v(b,c),t.each(a,function(a,c,e){b(a,c,e)&&d.push(a)}),d},t.reject=function(a,b,c){return t.filter(a,t.negate(v(b)),c)},t.every=t.all=function(a,b,c){b=v(b,c);for(var d=!B(a)&&t.keys(a),e=(d||a).length,f=0;e>f;f++){var g=d?d[f]:f;if(!b(a[g],g,a))return!1}return!0},t.some=t.any=function(a,b,c){b=v(b,c);for(var d=!B(a)&&t.keys(a),e=(d||a).length,f=0;e>f;f++){var g=d?d[f]:f;if(b(a[g],g,a))return!0}return!1},t.contains=t.includes=t.include=function(a,b,c,d){return B(a)||(a=t.values(a)),("number"!=typeof c||d)&&(c=0),t.indexOf(a,b,c)>=0},t.invoke=function(a,b){var c=l.call(arguments,2),d=t.isFunction(b);return t.map(a,function(a){var e=d?b:a[b];return null==e?e:e.apply(a,c)})},t.pluck=function(a,b){return t.map(a,t.property(b))},t.where=function(a,b){return t.filter(a,t.matcher(b))},t.findWhere=function(a,b){return t.find(a,t.matcher(b))},t.max=function(a,b,c){var d,e,f=-1/0,g=-1/0;if(null==b&&null!=a){a=B(a)?a:t.values(a);for(var h=0,i=a.length;i>h;h++)d=a[h],d>f&&(f=d)}else b=v(b,c),t.each(a,function(a,c,d){e=b(a,c,d),(e>g||e===-1/0&&f===-1/0)&&(f=a,g=e)});return f},t.min=function(a,b,c){var d,e,f=1/0,g=1/0;if(null==b&&null!=a){a=B(a)?a:t.values(a);for(var h=0,i=a.length;i>h;h++)d=a[h],f>d&&(f=d)}else b=v(b,c),t.each(a,function(a,c,d){e=b(a,c,d),(g>e||1/0===e&&1/0===f)&&(f=a,g=e)});return f},t.shuffle=function(a){for(var b,c=B(a)?a:t.values(a),d=c.length,e=Array(d),f=0;d>f;f++)b=t.random(0,f),b!==f&&(e[f]=e[b]),e[b]=c[f];return e},t.sample=function(a,b,c){return null==b||c?(B(a)||(a=t.values(a)),a[t.random(a.length-1)]):t.shuffle(a).slice(0,Math.max(0,b))},t.sortBy=function(a,b,c){return b=v(b,c),t.pluck(t.map(a,function(a,c,d){return{value:a,index:c,criteria:b(a,c,d)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==d){if(c>d||void 0===c)return 1;if(d>c||void 0===d)return-1}return a.index-b.index}),"value")};var C=function(a){return function(b,c,d){var e={};return c=v(c,d),t.each(b,function(d,f){var g=c(d,f,b);a(e,d,g)}),e}};t.groupBy=C(function(a,b,c){t.has(a,c)?a[c].push(b):a[c]=[b]}),t.indexBy=C(function(a,b,c){a[c]=b}),t.countBy=C(function(a,b,c){t.has(a,c)?a[c]++:a[c]=1}),t.toArray=function(a){return a?t.isArray(a)?l.call(a):B(a)?t.map(a,t.identity):t.values(a):[]},t.size=function(a){return null==a?0:B(a)?a.length:t.keys(a).length},t.partition=function(a,b,c){b=v(b,c);var d=[],e=[];return t.each(a,function(a,c,f){(b(a,c,f)?d:e).push(a)}),[d,e]},t.first=t.head=t.take=function(a,b,c){return null==a?void 0:null==b||c?a[0]:t.initial(a,a.length-b)},t.initial=function(a,b,c){return l.call(a,0,Math.max(0,a.length-(null==b||c?1:b)))},t.last=function(a,b,c){return null==a?void 0:null==b||c?a[a.length-1]:t.rest(a,Math.max(0,a.length-b))},t.rest=t.tail=t.drop=function(a,b,c){return l.call(a,null==b||c?1:b)},t.compact=function(a){return t.filter(a,t.identity)};var D=function(a,b,c,d){for(var e=[],f=0,g=d||0,h=A(a);h>g;g++){var i=a[g];if(B(i)&&(t.isArray(i)||t.isArguments(i))){b||(i=D(i,b,c));var j=0,k=i.length;for(e.length+=k;k>j;)e[f++]=i[j++]}else c||(e[f++]=i)}return e};t.flatten=function(a,b){return D(a,b,!1)},t.without=function(a){return t.difference(a,l.call(arguments,1))},t.uniq=t.unique=function(a,b,c,d){t.isBoolean(b)||(d=c,c=b,b=!1),null!=c&&(c=v(c,d));for(var e=[],f=[],g=0,h=A(a);h>g;g++){var i=a[g],j=c?c(i,g,a):i;b?(g&&f===j||e.push(i),f=j):c?t.contains(f,j)||(f.push(j),e.push(i)):t.contains(e,i)||e.push(i)}return e},t.union=function(){return t.uniq(D(arguments,!0,!0))},t.intersection=function(a){for(var b=[],c=arguments.length,d=0,e=A(a);e>d;d++){var f=a[d];if(!t.contains(b,f)){for(var g=1;c>g&&t.contains(arguments[g],f);g++);g===c&&b.push(f)}}return b},t.difference=function(a){var b=D(arguments,!0,!0,1);return t.filter(a,function(a){return!t.contains(b,a)})},t.zip=function(){return t.unzip(arguments)},t.unzip=function(a){for(var b=a&&t.max(a,A).length||0,c=Array(b),d=0;b>d;d++)c[d]=t.pluck(a,d);return c},t.object=function(a,b){for(var c={},d=0,e=A(a);e>d;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},t.findIndex=b(1),t.findLastIndex=b(-1),t.sortedIndex=function(a,b,c,d){c=v(c,d,1);for(var e=c(b),f=0,g=A(a);g>f;){var h=Math.floor((f+g)/2);c(a[h])f;f++,a+=c)e[f]=a;return e};var E=function(a,b,c,d,e){if(!(d instanceof b))return a.apply(c,e);var f=x(a.prototype),g=a.apply(f,e);return t.isObject(g)?g:f};t.bind=function(a,b){if(q&&a.bind===q)return q.apply(a,l.call(arguments,1));if(!t.isFunction(a))throw new TypeError("Bind must be called on a function");var c=l.call(arguments,2),d=function(){return E(a,d,b,this,c.concat(l.call(arguments)))};return d},t.partial=function(a){var b=l.call(arguments,1),c=function(){for(var d=0,e=b.length,f=Array(e),g=0;e>g;g++)f[g]=b[g]===t?arguments[d++]:b[g];for(;d=d)throw new Error("bindAll must be passed function names");for(b=1;d>b;b++)c=arguments[b],a[c]=t.bind(a[c],a);return a},t.memoize=function(a,b){var c=function(d){var e=c.cache,f=""+(b?b.apply(this,arguments):d);return t.has(e,f)||(e[f]=a.apply(this,arguments)),e[f]};return c.cache={},c},t.delay=function(a,b){var c=l.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)},t.defer=t.partial(t.delay,t,1),t.throttle=function(a,b,c){var d,e,f,g=null,h=0;c||(c={});var i=function(){h=c.leading===!1?0:t.now(),g=null,f=a.apply(d,e),g||(d=e=null)};return function(){var j=t.now();h||c.leading!==!1||(h=j);var k=b-(j-h);return d=this,e=arguments,0>=k||k>b?(g&&(clearTimeout(g),g=null),h=j,f=a.apply(d,e),g||(d=e=null)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},t.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=t.now()-g;b>j&&j>=0?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),d||(f=e=null)))};return function(){f=this,e=arguments,g=t.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},t.wrap=function(a,b){return t.partial(b,a)},t.negate=function(a){return function(){return!a.apply(this,arguments)}},t.compose=function(){var a=arguments,b=a.length-1;return function(){for(var c=b,d=a[b].apply(this,arguments);c--;)d=a[c].call(this,d);return d}},t.after=function(a,b){return function(){return--a<1?b.apply(this,arguments):void 0}},t.before=function(a,b){var c;return function(){return--a>0&&(c=b.apply(this,arguments)),1>=a&&(b=null),c}},t.once=t.partial(t.before,2);var F=!{toString:null}.propertyIsEnumerable("toString"),G=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];t.keys=function(a){if(!t.isObject(a))return[];if(p)return p(a);var b=[];for(var c in a)t.has(a,c)&&b.push(c);return F&&e(a,b),b},t.allKeys=function(a){if(!t.isObject(a))return[];var b=[];for(var c in a)b.push(c);return F&&e(a,b),b},t.values=function(a){for(var b=t.keys(a),c=b.length,d=Array(c),e=0;c>e;e++)d[e]=a[b[e]];return d},t.mapObject=function(a,b,c){b=v(b,c);for(var d,e=t.keys(a),f=e.length,g={},h=0;f>h;h++)d=e[h],g[d]=b(a[d],d,a);return g},t.pairs=function(a){for(var b=t.keys(a),c=b.length,d=Array(c),e=0;c>e;e++)d[e]=[b[e],a[b[e]]];return d},t.invert=function(a){for(var b={},c=t.keys(a),d=0,e=c.length;e>d;d++)b[a[c[d]]]=c[d];return b},t.functions=t.methods=function(a){var b=[];for(var c in a)t.isFunction(a[c])&&b.push(c);return b.sort()},t.extend=w(t.allKeys),t.extendOwn=t.assign=w(t.keys),t.findKey=function(a,b,c){b=v(b,c);for(var d,e=t.keys(a),f=0,g=e.length;g>f;f++)if(d=e[f],b(a[d],d,a))return d},t.pick=function(a,b,c){var d,e,f={},g=a;if(null==g)return f;t.isFunction(b)?(e=t.allKeys(g),d=u(b,c)):(e=D(arguments,!1,!1,1),d=function(a,b,c){return b in c},g=Object(g));for(var h=0,i=e.length;i>h;h++){var j=e[h],k=g[j];d(k,j,g)&&(f[j]=k)}return f},t.omit=function(a,b,c){if(t.isFunction(b))b=t.negate(b);else{var d=t.map(D(arguments,!1,!1,1),String);b=function(a,b){return!t.contains(d,b)}}return t.pick(a,b,c)},t.defaults=w(t.allKeys,!0),t.create=function(a,b){var c=x(a);return b&&t.extendOwn(c,b),c},t.clone=function(a){return t.isObject(a)?t.isArray(a)?a.slice():t.extend({},a):a},t.tap=function(a,b){return b(a),a},t.isMatch=function(a,b){var c=t.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;d>f;f++){var g=c[f];if(b[g]!==e[g]||!(g in e))return!1}return!0};var H=function(a,b,c,d){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;a instanceof t&&(a=a._wrapped),b instanceof t&&(b=b._wrapped);var e=m.call(a);if(e!==m.call(b))return!1;switch(e){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var f="[object Array]"===e;if(!f){if("object"!=typeof a||"object"!=typeof b)return!1;var g=a.constructor,h=b.constructor;if(g!==h&&!(t.isFunction(g)&&g instanceof g&&t.isFunction(h)&&h instanceof h)&&"constructor"in a&&"constructor"in b)return!1}c=c||[],d=d||[];for(var i=c.length;i--;)if(c[i]===a)return d[i]===b;if(c.push(a),d.push(b),f){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!H(a[i],b[i],c,d))return!1}else{var j,k=t.keys(a);if(i=k.length,t.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!t.has(b,j)||!H(a[j],b[j],c,d))return!1}return c.pop(),d.pop(),!0};t.isEqual=function(a,b){return H(a,b)},t.isEmpty=function(a){return null==a?!0:B(a)&&(t.isArray(a)||t.isString(a)||t.isArguments(a))?0===a.length:0===t.keys(a).length},t.isElement=function(a){return!(!a||1!==a.nodeType)},t.isArray=o||function(a){return"[object Array]"===m.call(a)},t.isObject=function(a){var b=typeof a;return"function"===b||"object"===b&&!!a},t.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(a){t["is"+a]=function(b){return m.call(b)==="[object "+a+"]"}}),t.isArguments(arguments)||(t.isArguments=function(a){return t.has(a,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(t.isFunction=function(a){return"function"==typeof a||!1}),t.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))},t.isNaN=function(a){return t.isNumber(a)&&a!==+a},t.isBoolean=function(a){return a===!0||a===!1||"[object Boolean]"===m.call(a)},t.isNull=function(a){return null===a},t.isUndefined=function(a){return void 0===a},t.has=function(a,b){return null!=a&&n.call(a,b)},t.noConflict=function(){return f._=g,this},t.identity=function(a){return a},t.constant=function(a){return function(){return a}},t.noop=function(){},t.property=y,t.propertyOf=function(a){return null==a?function(){}:function(b){return a[b]}},t.matcher=t.matches=function(a){return a=t.extendOwn({},a),function(b){return t.isMatch(b,a)}},t.times=function(a,b,c){var d=Array(Math.max(0,a));b=u(b,c,1);for(var e=0;a>e;e++)d[e]=b(e);return d},t.random=function(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))},t.now=Date.now||function(){return(new Date).getTime()};var I={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},J=t.invert(I),K=function(a){var b=function(b){return a[b]},c="(?:"+t.keys(a).join("|")+")",d=RegExp(c),e=RegExp(c,"g");return function(a){return a=null==a?"":""+a,d.test(a)?a.replace(e,b):a}};t.escape=K(I),t.unescape=K(J),t.result=function(a,b,c){var d=null==a?void 0:a[b];return void 0===d&&(d=c),t.isFunction(d)?d.call(a):d};var L=0;t.uniqueId=function(a){var b=++L+"";return a?a+b:b},t.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var M=/(.)^/,N={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\u2028|\u2029/g,P=function(a){return"\\"+N[a]};t.template=function(a,b,c){!b&&c&&(b=c),b=t.defaults({},b,t.templateSettings);var d=RegExp([(b.escape||M).source,(b.interpolate||M).source,(b.evaluate||M).source].join("|")+"|$","g"),e=0,f="__p+='";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(O,P),e=h+b.length,c?f+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'":d?f+="'+\n((__t=("+d+"))==null?'':__t)+\n'":g&&(f+="';\n"+g+"\n__p+='"),b}),f+="';\n",b.variable||(f="with(obj||{}){\n"+f+"}\n"),f="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+f+"return __p;\n";try{var g=new Function(b.variable||"obj","_",f)}catch(h){throw h.source=f,h}var i=function(a){return g.call(this,a,t)},j=b.variable||"obj";return i.source="function("+j+"){\n"+f+"}",i},t.chain=function(a){var b=t(a);return b._chain=!0,b};var Q=function(a,b){return a._chain?t(b).chain():b};t.mixin=function(a){t.each(t.functions(a),function(b){var c=t[b]=a[b];t.prototype[b]=function(){var a=[this._wrapped];return k.apply(a,arguments),Q(this,c.apply(t,a))}})},t.mixin(t),t.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=h[a];t.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!==a&&"splice"!==a||0!==c.length||delete c[0],Q(this,c)}}),t.each(["concat","join","slice"],function(a){var b=h[a];t.prototype[a]=function(){return Q(this,b.apply(this._wrapped,arguments))}}),t.prototype.value=function(){return this._wrapped},t.prototype.valueOf=t.prototype.toJSON=t.prototype.value,t.prototype.toString=function(){return""+this._wrapped},"function"==typeof c&&c.amd&&c("underscore",[],function(){return t})}.call(this),c("jquery",[],function(){return jQuery}),function(a){var d="object"==typeof self&&self.self==self&&self||"object"==typeof global&&global.global==global&&global;if("function"==typeof c&&c.amd)c("backbone",["underscore","jquery","exports"],function(b,c,e){d.Backbone=a(d,e,b,c)});else if("undefined"!=typeof exports){var e,f=b("underscore");try{e=b("jquery")}catch(g){}a(d,exports,f,e)}else d.Backbone=a(d,{},d._,d.jQuery||d.Zepto||d.ender||d.$)}(function(a,b,c,d){var e=a.Backbone,f=Array.prototype.slice;b.VERSION="1.2.3",b.$=d,b.noConflict=function(){return a.Backbone=e,this},b.emulateHTTP=!1,b.emulateJSON=!1;var g=function(a,b,d){switch(a){case 1:return function(){return c[b](this[d])};case 2:return function(a){return c[b](this[d],a)};case 3:return function(a,e){return c[b](this[d],i(a,this),e)};case 4:return function(a,e,f){return c[b](this[d],i(a,this),e,f)};default:return function(){var a=f.call(arguments);return a.unshift(this[d]),c[b].apply(c,a)}}},h=function(a,b,d){c.each(b,function(b,e){c[e]&&(a.prototype[e]=g(b,e,d))})},i=function(a,b){return c.isFunction(a)?a:c.isObject(a)&&!b._isModel(a)?j(a):c.isString(a)?function(b){return b.get(a)}:a},j=function(a){var b=c.matches(a);return function(a){return b(a.attributes)}},k=b.Events={},l=/\s+/,m=function(a,b,d,e,f){var g,h=0;if(d&&"object"==typeof d){void 0!==e&&"context"in f&&void 0===f.context&&(f.context=e);for(g=c.keys(d);hd;d++)c[d]=arguments[d+1];return m(r,this._events,a,void 0,c),this};var r=function(a,b,c,d){if(a){var e=a[b],f=a.all;e&&f&&(f=f.slice()),e&&s(e,d),f&&s(f,[b].concat(d))}return a},s=function(a,b){var c,d=-1,e=a.length,f=b[0],g=b[1],h=b[2];switch(b.length){case 0:for(;++df;f++)a[f+c]=b[f];for(f=0;fe&&(e+=this.length+1);for(var f,g=[],h=[],i=[],j={},k=b.add,l=b.merge,m=b.remove,n=!1,o=this.comparator&&null==e&&b.sort!==!1,p=c.isString(this.comparator)?this.comparator:null,q=0;qa&&(a+=this.length),this.models[a]},where:function(a,b){return this[b?"find":"filter"](a)},findWhere:function(a){return this.where(a,!0)},sort:function(a){var b=this.comparator;if(!b)throw new Error("Cannot sort a set without a comparator");a||(a={});var d=b.length;return c.isFunction(b)&&(b=c.bind(b,this)),1===d||c.isString(b)?this.models=this.sortBy(b):this.models.sort(b),a.silent||this.trigger("sort",this,a),this},pluck:function(a){return c.invoke(this.models,"get",a)},fetch:function(a){a=c.extend({parse:!0},a);var b=a.success,d=this;return a.success=function(c){var e=a.reset?"reset":"set";d[e](c,a),b&&b.call(a.context,d,c,a),d.trigger("sync",d,c,a)},P(this,a),this.sync("read",this,a)},create:function(a,b){b=b?c.clone(b):{};var d=b.wait;if(a=this._prepareModel(a,b),!a)return!1;d||this.add(a,b);var e=this,f=b.success;return b.success=function(a,b,c){d&&e.add(a,c),f&&f.call(c.context,a,b,c)},a.save(null,b),a},parse:function(a,b){return a},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(a){return a[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(a,b){if(this._isModel(a))return a.collection||(a.collection=this),a;b=b?c.clone(b):{},b.collection=this;var d=new this.model(a,b);return d.validationError?(this.trigger("invalid",this,d.validationError,b),!1):d},_removeModels:function(a,b){for(var c=[],d=0;d7),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(L,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var b=this.root.slice(0,-1)||"/";return this.location.replace(b+"#"+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 d=document.body,e=d.insertBefore(this.iframe,d.firstChild).contentWindow;e.document.open(),e.document.close(),e.location.hash="#"+this.fragment}var f=window.addEventListener||function(a,b){return attachEvent("on"+a,b)};return this._usePushState?f("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?f("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.options.silent?void 0:this.loadUrl()},stop:function(){var a=window.removeEventListener||function(a,b){return detachEvent("on"+a,b)};this._usePushState?a("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&a("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),J.started=!1},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(a){var b=this.getFragment();return b===this.fragment&&this.iframe&&(b=this.getHash(this.iframe.contentWindow)),b===this.fragment?!1:(this.iframe&&this.navigate(b),void this.loadUrl())},loadUrl:function(a){return this.matchRoot()?(a=this.fragment=this.getFragment(a),c.some(this.handlers,function(b){return b.route.test(a)?(b.callback(a),!0):void 0})):!1},navigate:function(a,b){if(!J.started)return!1;b&&b!==!0||(b={trigger:!!b}),a=this.getFragment(a||"");var c=this.root;(""===a||"?"===a.charAt(0))&&(c=c.slice(0,-1)||"/");var d=c+a;if(a=this.decodeFragment(a.replace(M,"")),this.fragment!==a){if(this.fragment=a,this._usePushState)this.history[b.replace?"replaceState":"pushState"]({},document.title,d);else{if(!this._wantsHashChange)return this.location.assign(d);if(this._updateHash(this.location,a,b.replace),this.iframe&&a!==this.getHash(this.iframe.contentWindow)){var e=this.iframe.contentWindow;b.replace||(e.document.open(),e.document.close()),this._updateHash(e.location,a,b.replace)}}return b.trigger?this.loadUrl(a):void 0}},_updateHash:function(a,b,c){if(c){var d=a.href.replace(/(javascript:|#).*$/,"");a.replace(d+"#"+b)}else a.hash="#"+b}}),b.history=new J;var N=function(a,b){var d,e=this;d=a&&c.has(a,"constructor")?a.constructor:function(){return e.apply(this,arguments)},c.extend(d,e,b);var f=function(){this.constructor=d};return f.prototype=e.prototype,d.prototype=new f,a&&c.extend(d.prototype,a),d.__super__=e.prototype,d};t.extend=v.extend=E.extend=A.extend=J.extend=N;var O=function(){throw new Error('A "url" property or function must be specified')},P=function(a,b){var c=b.error;b.error=function(d){c&&c.call(b.context,a,d,b),a.trigger("error",a,d,b)}};return b}),function(a){"function"==typeof c&&c.amd?c("backboneUndo",["underscore","backbone"],a):"undefined"!=typeof exports?module.exports=a(b("underscore"),b("backbone")):a(_,Backbone)}(function(a,b){function c(a,b,c){return c.length<=4?a.call(b,c[0],c[1],c[2],c[3]):a.apply(b,c)}function d(a,b){return n.call(a,b)}function e(b,c){return null==b?!1:(a.isArray(c)||(c=d(arguments,1)),a.all(c,function(a){return a in b}))}function f(){this.registeredObjects=[],this.cidIndexes=[]}function g(b,c,d,e){for(var f,g=0,h=c.length;h>g;g++)if(f=c[g]){if("on"===b){if(!e.objectRegistry.register(f))continue}else if(!e.objectRegistry.unregister(f))continue;a.isFunction(f[b])&&f[b]("all",d,e)}}function h(b,c){var d=c.type,e=c.undoTypes,f=!e[d]||e[d][b];a.isFunction(f)&&f(c.object,c.before,c.after,c.options)}function i(b,c,d,e,f){if(!(d.isCurrentlyUndoRedoing||"undo"===b&&-1===d.pointer||"redo"===b&&d.pointer===d.length-1)){d.isCurrentlyUndoRedoing=!0;var g,h,i="undo"===b;for(f?h=i&&d.pointer===d.length-1||!i&&-1===d.pointer?a.clone(d.models):n.apply(d.models,i?[0,d.pointer]:[d.pointer,d.length-1]):(g=d.at(i?d.pointer:d.pointer+1),h=e?d.where({magicFusionIndex:g.get("magicFusionIndex")}):[g]),d.pointer+=(i?-1:1)*h.length;g=i?h.pop():h.shift();)g[b]();d.isCurrentlyUndoRedoing=!1,c.trigger(b,c)}}function j(a,b){var d=a.condition,e=typeof d;return"function"===e?!!c(d,a,b):"boolean"===e?d:!0}function k(a,b,d,f){if(a.track&&!a.isCurrentlyUndoRedoing&&b in f&&j(f[b],d)){var g,h=c(f[b].on,f[b],d);if(e(h,"object","before","after")){if(h.type=b,h.magicFusionIndex=o(),h.undoTypes=f,a.pointera.maximumStackLength&&(a.shift(),a.pointer--)}}}function l(){}function m(b,c,d,f){if("object"==typeof c)return a.each(c,function(a,c){2===b?m(b,a,d,f):m(b,c,a,d)});switch(b){case 0:e(d,"undo","redo","on")&&a.all(a.pick(d,"undo","redo","on"),a.isFunction)&&(f[c]=d);break;case 1:f[c]&&a.isObject(d)&&(f[c]=a.extend({},f[c],d));break;case 2:delete f[c]}return this}var n=Array.prototype.slice,o=function(){function b(){d++,c=!0,a.defer(function(){c=!1})}var c=!1,d=-1;return function(){return c||b(),d}}();f.prototype={isRegistered:function(b){return b&&b.cid?this.registeredObjects[b.cid]:a.contains(this.registeredObjects,b)},register:function(a){return this.isRegistered(a)?!1:(a&&a.cid?(this.registeredObjects[a.cid]=a,this.cidIndexes.push(a.cid)):this.registeredObjects.push(a),!0)},unregister:function(b){if(this.isRegistered(b)){if(b&&b.cid)delete this.registeredObjects[b.cid],this.cidIndexes.splice(a.indexOf(this.cidIndexes,b.cid),1);else{var c=a.indexOf(this.registeredObjects,b);this.registeredObjects.splice(c,1)}return!0}return!1},get:function(){return a.map(this.cidIndexes,function(a){return this.registeredObjects[a]},this).concat(this.registeredObjects)}};var p={add:{undo:function(a,b,c,d){a.remove(c,d)},redo:function(a,b,c,d){d.index&&(d.at=d.index),a.add(c,d)},on:function(b,c,d){return{object:c,before:void 0,after:b,options:a.clone(d)}}},remove:{undo:function(a,b,c,d){"index"in d&&(d.at=d.index),a.add(b,d)},redo:function(a,b,c,d){a.remove(b,d)},on:function(b,c,d){return{object:c,before:b,after:void 0,options:a.clone(d)}}},change:{undo:function(b,c,d,e){a.isEmpty(c)?a.each(a.keys(d),b.unset,b):(b.set(c),e&&e.unsetData&&e.unsetData.before&&e.unsetData.before.length&&a.each(e.unsetData.before,b.unset,b))},redo:function(b,c,d,e){a.isEmpty(d)?a.each(a.keys(c),b.unset,b):(b.set(d),e&&e.unsetData&&e.unsetData.after&&e.unsetData.after.length&&a.each(e.unsetData.after,b.unset,b))},on:function(b,c){var d=b.changedAttributes(),e=a.keys(d),f=a.pick(b.previousAttributes(),e),g=a.keys(f),h=(c||(c={})).unsetData={after:[],before:[]};return e.length!=g.length&&(e.length>g.length?a.each(e,function(a){a in f||h.before.push(a)},this):a.each(g,function(a){a in d||h.after.push(a)})),{object:b,before:f,after:d,options:a.clone(c)}}},reset:{undo:function(a,b,c){a.reset(b)},redo:function(a,b,c){a.reset(c)},on:function(b,c){return{object:b,before:c.previousModels,after:a.clone(b.models)}}}};l.prototype=p;var q=b.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(a){h("undo",this.attributes)},redo:function(a){h("redo",this.attributes)}}),r=b.Collection.extend({model:q,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(a){this.maximumStackLength=a}}),s=b.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(b){this.stack=new r,this.objectRegistry=new f,this.undoTypes=new l,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",function(a,b){this.stack.setMaxLength(b)},this),b&&b.track&&this.startTracking(),b&&b.register&&(a.isArray(b.register)||a.isArguments(b.register)?c(this.register,this,b.register):this.register(b.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")},_addToStack:function(a){k(this.stack,a,d(arguments,1),this.undoTypes)},register:function(){g("on",arguments,this._addToStack,this)},unregister:function(){g("off",arguments,this._addToStack,this)},unregisterAll:function(){c(this.unregister,this,this.objectRegistry.get())},undo:function(a){i("undo",this,this.stack,a)},undoAll:function(){i("undo",this,this.stack,!1,!0)},redo:function(a){i("redo",this,this.stack,a)},redoAll:function(){i("redo",this,this.stack,!1,!0)},isAvailable:function(a){var b=this.stack,c=b.length;switch(a){case"undo":return c>0&&b.pointer>-1;case"redo":return c>0&&b.pointer0;for(f in v)(!v[f]&&b(e.mods,+f)>-1||v[f]&&-1==b(e.mods,+f))&&(i=!1);(0!=e.mods.length||v[16]||v[18]||v[17]||v[91])&&!i||e.method(a,e)===!1&&(a.preventDefault?a.preventDefault():a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.cancelBubble&&(a.cancelBubble=!0))}}function f(a){var c,d=a.keyCode,e=b(A,d);if(e>=0&&A.splice(e,1),(93==d||224==d)&&(d=91),d in v){v[d]=!1;for(c in x)x[c]==d&&(h[c]=!1)}}function g(){for(t in v)v[t]=!1;for(t in x)h[t]=!1}function h(a,b,c){var d,e;d=p(a),void 0===c&&(c=b,b="all");for(var f=0;f1&&(e=q(a),a=[a[a.length-1]]),a=a[0],a=z(a),a in u||(u[a]=[]),u[a].push({shortcut:d[f],scope:b,method:c,key:d[f],mods:e})}function i(a,b){var d,e,f,g,h,i=[];for(d=p(a),g=0;g1&&(i=q(e)),a=e[e.length-1],a=z(a),void 0===b&&(b=n()),!u[a])return;for(f=0;ft;t++)y["f"+t]=111+t;var B={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey"};for(t in x)h[t]=!1;r(document,"keydown",function(a){e(a)}),r(document,"keyup",f),r(window,"focus",g);var C=a.key;a.key=h,a.key.setScope=m,a.key.getScope=n,a.key.deleteScope=o,a.key.filter=l,a.key.isPressed=j,a.key.getPressedKeyCodes=k,a.key.noConflict=s,a.key.unbind=i,"undefined"!=typeof module&&(module.exports=h)}(this),c("keymaster",function(a){return function(){var b;return b||a.keymaster}}(this)),c("Utils/Sorter",["backbone"],function(a){return a.View.extend({initialize:function(a){_.bindAll(this,"startSort","onMove","endMove","rollback","udpateOffset");var b=a||{};this.elT=0,this.elL=0,this.borderOffset=b.borderOffset||10;var c=b.container;this.el="string"==typeof c?document.querySelector(b.container):c,this.$el=$(this.el),this.containerSel=b.containerSel||"div",this.itemSel=b.itemSel||"div",this.nested=b.nested||0,this.pfx=b.pfx||"",this.freezeClass=b.freezeClass||this.pfx+"freezed",this.onStart=b.onStart||"",this.onEndMove=b.onEndMove||"",this.direction=b.direction||"v",this.onMoveClb=b.onMove||"",this.relative=b.relative||0,this.plh=b.placer||"",this.wmargin=b.wmargin||0,this.offTop=b.offsetTop||0,this.offLeft=b.offsetLeft||0,this.document=b.document||document,this.dropContent="",this.helper="",this.em=b.em||"",this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.udpateOffset),this.udpateOffset())},udpateOffset:function(){var a=this.em.get("canvasOffset");this.offTop=a.top,this.offLeft=a.left},setDropContent:function(a){this.dropContent=a},matches:function(a,b){for(var c=(a.parentNode||document.body).querySelectorAll(b),d=0;c[d]&&c[d]!==a;)++d;return!!c[d]},closest:function(a,b){if(a){for(var c=a.parentNode;c&&1===c.nodeType;){if(this.matches(c,b))return c;c=c.parentNode}return null}},offset:function(a){var b=a.getBoundingClientRect();return{top:b.top+document.body.scrollTop,left:b.left+document.body.scrollLeft}},createPlaceholder:function(){var a=this.pfx,b=document.createElement("div"),c=document.createElement("div");return b.className=a+"placeholder",b.style.display="none",b.style["pointer-events"]="none",c.className=a+"placeholder-int",b.appendChild(c),b},startSort:function(a){this.moved=0,this.eV=a,a&&!this.matches(a,this.itemSel+","+this.containerSel)&&(this.eV=this.closest(a,this.itemSel)),this.plh||(this.plh=this.createPlaceholder(),this.el.appendChild(this.plh)),this.eV&&(this.eV.className+=" "+this.freezeClass,$(this.document).on("mouseup",this.endMove)),this.helper&&(this.helperEl=this.helper,this.helperEl.className+=" "+this.ppfx+"bdrag",document.body.appendChild(this.helperEl)),this.$el.on("mousemove",this.onMove),$(document).on("keypress",this.rollback),"function"==typeof this.onStart&&this.onStart()},onMove:function(a){this.moved=1;var b=this.plh,c=b.style.display;c&&"none"!==c||(b.style.display="block");var d=this.offset(this.el);this.elT=this.wmargin?Math.abs(d.top):d.top,this.elL=this.wmargin?Math.abs(d.left):d.left,this.rY=a.pageY-this.elT+this.el.scrollTop,this.rX=a.pageX-this.elL+this.el.scrollLeft;var e=this.dimsFromTarget(a.target,this.rX,this.rY);this.lastDims=e;var f=this.findPosition(e,this.rX,this.rY);if(this.lastPos&&this.lastPos.index==f.index&&this.lastPos.method==f.method||(this.movePlaceholder(this.plh,e,f,this.prevTargetDim),this.$plh||(this.$plh=$(this.plh)),this.offTop&&this.$plh.css("top","+="+this.offTop+"px"),this.offLeft&&this.$plh.css("left","+="+this.offLeft+"px"),this.lastPos=f),this.helperEl){var g=this.helperEl.style;g.left=this.rX+"px",g.top=this.rY+"px"}"function"==typeof this.onMoveClb&&this.onMoveClb(a)},isInFlow:function(a,b){if(!a)return!1;b=b||document.body;var c,d=a;return c=d.offsetHeight,this.styleInFlow(d,b)?!0:!1},styleInFlow:function(a,b){var c=a.style,d=$(a);if(!(c.overflow&&"visible"!==c.overflow||"none"!==d.css("float")||b&&"flex"==$(b).css("display"))){switch(c.position){case"static":case"relative":case"":break;default:return}switch(d.css("display")){case"block":case"list-item":case"table":case"flex":return!0}}},dimsFromTarget:function(a,b,c){var d=[];return this.matches(a,this.itemSel+","+this.containerSel)||(a=this.closest(a,this.itemSel)),a?(this.prevTarget&&this.prevTarget!=a&&(this.prevTarget=null),this.prevTarget||(this.targetP=this.closest(a,this.containerSel),this.prevTarget=a,this.prevTargetDim=this.getDim(a),this.cacheDimsP=this.getChildrenDim(this.targetP),this.cacheDims=this.getChildrenDim(a)),this.prevTarget==a&&(d=this.cacheDims),this.target=this.prevTarget,(this.nearBorders(this.prevTargetDim,b,c)||!this.nested&&!this.cacheDims.length)&&(d=this.cacheDimsP,this.target=this.targetP),this.lastPos=null,d):d},getDim:function(a){var b=this.offset(a),c=this.relative?a.offsetTop:b.top-(this.wmargin?-1:1)*this.elT,d=this.relative?a.offsetLeft:b.left-(this.wmargin?-1:1)*this.elL;return[c,d,a.offsetHeight,a.offsetWidth]},getChildrenDim:function(a){var b=[];if(!a)return b;for(var c=a.children,d=0,e=c.length;e>d;d++){var f=c[d];if(this.matches(f,this.itemSel)){var g=this.getDim(f),h=this.direction;h="v"==h?!0:"h"==h?!1:this.isInFlow(f,a),g.push(h),g.push(f),b.push(g)}}return b},nearBorders:function(a,b,c){var d=0,e=this.borderOffset,f=b||0,g=c||0,h=a[0],i=a[1],j=a[2],k=a[3];return(h+e>g||g>h+j-e||i+e>f||f>i+k-e)&&(d=1),!!d},findPosition:function(a,b,c){for(var d={index:0,method:"before"},e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=a.length;n>m;m++)if(l=a[m],g=l[1]+l[3],k=l[0]+l[2],i=l[1]+l[3]/2,j=l[0]+l[2]/2,!(f&&l[1]>f||h&&j>=h||e&&e>g))if(d.index=m,l[4]){if(j>c){d.method="before";break}d.method="after"}else k>c&&(h=k),i>b?(f=i,d.method="before"):(e=i,d.method="after");return d},movePlaceholder:function(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j="px",k=5,l="#62c462",m=3,n=c.method,o=b[c.index];if(a.style.borderColor="transparent "+l,a.style.borderWidth=m+j+" "+(m+2)+j,a.style.margin="-"+m+"px 0 0",o)o[4]?(h=o[3]+j,i="auto",f="before"==n?o[0]-e:o[0]+o[2]-e,g=o[1]):(h="auto",i=o[2]-2*e+j,f=o[0]+e,g="before"==n?o[1]-e:o[1]+o[3]-e,a.style.borderColor=l+" transparent",a.style.borderWidth=m+2+j+" "+m+j,a.style.margin="0 0 0 -"+m+"px");else{if(!this.nested)return void(a.style.display="none");d&&(f=d[0]+k,g=d[1]+k,h=parseInt(d[3])-2*k+j,i="auto")}a.style.top=f+j,a.style.left=g+j,h&&(a.style.width=h),i&&(a.style.height=i)},endMove:function(a){var b;this.$el.off("mousemove",this.onMove),$(this.document).off("mouseup",this.endMove),$(this.document).off("keypress",this.rollback),this.plh.style.display="none";var c=new RegExp("(?:^|\\s)"+this.freezeClass+"(?!\\S)","gi");this.eV&&(this.eV.className=this.eV.className.replace(c,"")),this.moved&&(b=this.move(this.target,this.eV,this.lastPos)),this.plh&&(this.plh.style.display="none"),this.helperEl="",this.helper&&this.helper.parentNode.removeChild(this.helper),"function"==typeof this.onEndMove&&this.onEndMove(b)},move:function(a,b,c){var d=c.index,e=$(b).data("model"),f=$(a),g=f.data("collection"),h=f.data("model"),i=h?h.get("droppable"):1;if(g&&i){d="after"===c.method?d+1:d;var j,k,l={at:d,noIncrement:1};this.dropContent?(j=this.dropContent,l.silent=!1):(k=g.add({},l),e&&(j=e.collection.remove(e)));var m=g.add(j,l);return this.dropContent?this.dropContent=null:g.remove(k),this.prevTarget=null,m}console.warn("Invalid target position")},rollback:function(a){$(document).off("keypress",this.rollback);var b=a.which||a.keyCode;27==b&&(this.moved=!1,this.endMove())}})}),c("Utils/main",["require","./Sorter"],function(a){var b=function(){var b=a("./Sorter");return{name:"Utils",init:function(){return this},Sorter:b}};return b}),c("Utils",["Utils/main"],function(a){return a}),c("StorageManager/config/config",[],function(){return{id:"gjs-",autosave:1,autoload:1,type:"local",stepsBeforeSave:1,storeComponents:!1,storeStyles:!1,storeHtml:!0,storeCss:!0,checkLocal:!0,params:{},urlStore:"",urlLoad:"",beforeSend:function(a,b){}, onComplete:function(a,b){}}}),c("StorageManager/model/LocalStorage",["backbone"],function(a){return a.Model.extend({defaults:{checkLocal:!0},store:function(a){this.checkStorageEnvironment();for(var b in a)localStorage.setItem(b,a[b])},load:function(a){this.checkStorageEnvironment();for(var b={},c=0,d=a.length;d>c;c++){var e=localStorage.getItem(a[c]);e&&(b[a[c]]=e)}return b},remove:function(a){this.checkStorageEnvironment();for(var b=0,c=a.length;c>b;b++)localStorage.removeItem(a[b])},checkStorageEnvironment:function(){this.get("checkLocal")&&!localStorage&&console.warn("Your browser doesn't support localStorage")}})}),c("StorageManager/model/RemoteStorage",["backbone"],function(a){return a.Model.extend({defaults:{urlStore:"",urlLoad:"",params:{},beforeSend:function(){},onComplete:function(){}},store:function(a){var b={},c=this.get("params");for(var d in a)b[d]=a[d];for(var e in c)b[e]=c[e];$.ajax({url:this.get("urlStore"),beforeSend:this.get("beforeSend"),complete:this.get("onComplete"),method:"POST",dataType:"json",data:b})},load:function(a){var b={},c={},d=this.get("params");for(var e in d)c[e]=d[e];return c.keys=a,$.ajax({url:this.get("urlLoad"),beforeSend:this.get("beforeSend"),complete:this.get("onComplete"),data:c,async:!1,method:"GET"}).done(function(a){b=a}),b}})}),c("StorageManager/main",["require","./config/config","./model/LocalStorage","./model/RemoteStorage"],function(a){var b=function(){var b={},c=a("./config/config"),d=a("./model/LocalStorage"),e=a("./model/RemoteStorage"),f={},g={};return{name:"StorageManager",init:function(a){b=a||{};for(var f in c)f in b||(b[f]=c[f]);return g.remote=new e(b),g.local=new d(b),b.currentStorage=b.type,this},onLoad:function(){this.loadDefaultProviders().setCurrent(b.type)},isAutosave:function(){return!!b.autosave},setAutosave:function(a){return b.autosave=!!a,this},getStepsBeforeSave:function(){return b.stepsBeforeSave},setStepsBeforeSave:function(a){return b.stepsBeforeSave=a,this},add:function(a,b){return f[a]=b,this},get:function(a){return f[a]||null},getStorages:function(){return f},getCurrent:function(){return b.currentStorage},setCurrent:function(a){return b.currentStorage=a,this},store:function(a){var c=this.get(this.getCurrent()),d={};for(var e in a)d[b.id+e]=a[e];return c?c.store(d):null},load:function(a){var c=this.get(this.getCurrent()),d=[],e={};"string"==typeof a&&(a=[a]);for(var f=0,g=a.length;g>f;f++)d.push(b.id+a[f]);var h=c?c.load(d):{};for(var i in h){var j=new RegExp("^"+b.id),k=i.replace(j,"");e[k]=h[i]}return e},loadDefaultProviders:function(){for(var a in g)this.add(a,g[a]);return this},getConfig:function(){return b}}};return b}),c("StorageManager",["StorageManager/main"],function(a){return a}),c("DeviceManager/config/config",[],function(){return{devices:[],deviceLabel:"Device"}}),c("DeviceManager/model/Device",["backbone"],function(a){return a.Model.extend({idAttribute:"name",defaults:{name:"",width:""}})}),c("DeviceManager/model/Devices",["backbone","./Device"],function(a,b){return a.Collection.extend({model:b})}),c("text",["module"],function(a){"use strict";var c,d,e,f,g,h=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],i=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,j=/]*>\s*([\s\S]+)\s*<\/body>/im,k="undefined"!=typeof location&&location.href,l=k&&location.protocol&&location.protocol.replace(/\:/,""),m=k&&location.hostname,n=k&&(location.port||void 0),o={},p=a.config&&a.config()||{};return c={version:"2.0.14",strip:function(a){if(a){a=a.replace(i,"");var b=a.match(j);b&&(a=b[1])}else a="";return a},jsEscape:function(a){return a.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:p.createXhr||function(){var a,b,c;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(b=0;3>b;b+=1){c=h[b];try{a=new ActiveXObject(c)}catch(d){}if(a){h=[c];break}}return a},parseName:function(a){var b,c,d,e=!1,f=a.lastIndexOf("."),g=0===a.indexOf("./")||0===a.indexOf("../");return-1!==f&&(!g||f>1)?(b=a.substring(0,f),c=a.substring(f+1)):b=a,d=c||b,f=d.indexOf("!"),-1!==f&&(e="strip"===d.substring(f+1),d=d.substring(0,f),c?c=d:b=d),{moduleName:b,ext:c,strip:e}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,b,d,e){var f,g,h,i=c.xdRegExp.exec(a);return i?(f=i[2],g=i[3],g=g.split(":"),h=g[1],g=g[0],!(f&&f!==b||g&&g.toLowerCase()!==d.toLowerCase()||(h||g)&&h!==e)):!0},finishLoad:function(a,b,d,e){d=b?c.strip(d):d,p.isBuild&&(o[a]=d),e(d)},load:function(a,b,d,e){if(e&&e.isBuild&&!e.inlineText)return void d();p.isBuild=e&&e.isBuild;var f=c.parseName(a),g=f.moduleName+(f.ext?"."+f.ext:""),h=b.toUrl(g),i=p.useXhr||c.useXhr;return 0===h.indexOf("empty:")?void d():void(!k||i(h,l,m,n)?c.get(h,function(b){c.finishLoad(a,f.strip,b,d)},function(a){d.error&&d.error(a)}):b([g],function(a){c.finishLoad(f.moduleName+"."+f.ext,f.strip,a,d)}))},write:function(a,b,d,e){if(o.hasOwnProperty(b)){var f=c.jsEscape(o[b]);d.asModule(a+"!"+b,"define(function () { return '"+f+"';});\n")}},writeFile:function(a,b,d,e,f){var g=c.parseName(b),h=g.ext?"."+g.ext:"",i=g.moduleName+h,j=d.toUrl(g.moduleName+h)+".js";c.load(i,d,function(b){var d=function(a){return e(j,a)};d.asModule=function(a,b){return e.asModule(a,j,b)},c.write(a,i,d,f)},f)}},"node"===p.env||!p.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]&&!process.versions["atom-shell"]?(d=b.nodeRequire("fs"),c.get=function(a,b,c){try{var e=d.readFileSync(a,"utf8");"\ufeff"===e[0]&&(e=e.substring(1)),b(e)}catch(f){c&&c(f)}}):"xhr"===p.env||!p.env&&c.createXhr()?c.get=function(a,b,d,e){var f,g=c.createXhr();if(g.open("GET",a,!0),e)for(f in e)e.hasOwnProperty(f)&&g.setRequestHeader(f.toLowerCase(),e[f]);p.onXhr&&p.onXhr(g,a),g.onreadystatechange=function(c){var e,f;4===g.readyState&&(e=g.status||0,e>399&&600>e?(f=new Error(a+" HTTP status: "+e),f.xhr=g,d&&d(f)):b(g.responseText),p.onXhrComplete&&p.onXhrComplete(g,a))},g.send(null)}:"rhino"===p.env||!p.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?c.get=function(a,b){var c,d,e="utf-8",f=new java.io.File(a),g=java.lang.System.getProperty("line.separator"),h=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(f),e)),i="";try{for(c=new java.lang.StringBuffer,d=h.readLine(),d&&d.length()&&65279===d.charAt(0)&&(d=d.substring(1)),null!==d&&c.append(d);null!==(d=h.readLine());)c.append(g),c.append(d);i=String(c.toString())}finally{h.close()}b(i)}:("xpconnect"===p.env||!p.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(e=Components.classes,f=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),g="@mozilla.org/windows-registry-key;1"in e,c.get=function(a,b){var c,d,h,i={};g&&(a=a.replace(/\//g,"\\")),h=new FileUtils.File(a);try{c=e["@mozilla.org/network/file-input-stream;1"].createInstance(f.nsIFileInputStream),c.init(h,1,0,!1),d=e["@mozilla.org/intl/converter-input-stream;1"].createInstance(f.nsIConverterInputStream),d.init(c,"utf-8",c.available(),f.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),d.readString(c.available(),i),d.close(),c.close(),b(i.value)}catch(j){throw new Error((h&&h.path||"")+": "+j)}}),c}),c("text!DeviceManager/template/devices.html",[],function(){return'
<%= deviceLabel %>
\n
\n \n \n \n
\n
\n
\n
\n'}),c("DeviceManager/view/DevicesView",["backbone","text!./../template/devices.html"],function(a,b){return a.View.extend({template:_.template(b),events:{change:"updateDevice"},initialize:function(a){this.config=a.config||{},this.em=this.config.em,this.ppfx=this.config.pStylePrefix||"",this.events["click ."+this.ppfx+"add-trasp"]=this.startAdd,this.listenTo(this.em,"change:device",this.updateSelect),this.delegateEvents()},startAdd:function(){},updateDevice:function(){var a=this.em;if(a){var b=this.devicesEl,c=b?b.val():"";a.set("device",c)}},updateSelect:function(){var a=this.em,b=this.devicesEl;if(a&&a.getDeviceModel&&b){var c=a.getDeviceModel(),d=c?c.get("name"):"";b.val(d)}},getOptions:function(){var a="";return this.collection.each(function(b){var c=b.get("name");a+='"}),a},render:function(){var a=this.ppfx;return this.$el.html(this.template({ppfx:a,deviceLabel:this.config.deviceLabel})),this.devicesEl=this.$el.find("."+a+"devices"),this.devicesEl.append(this.getOptions()),this.el.className=a+"devices-c",this}})}),c("DeviceManager/main",["require","./config/config","./model/Devices","./view/DevicesView"],function(a){return function(){var b,c,d={},e=a("./config/config"),f=a("./model/Devices"),g=a("./view/DevicesView");return{name:"DeviceManager",init:function(a){d=a||{};for(var h in e)h in d||(d[h]=e[h]);return b=new f(d.devices),c=new g({collection:b,config:d}),this},add:function(a,c,d){var e=d||{};return e.name=a,e.width=c,b.add(e)},get:function(a){return b.get(a)},getAll:function(){return b},render:function(){return c.render().el}}}}),c("DeviceManager",["DeviceManager/main"],function(a){return a}),c("Parser/config/config",[],function(){return{textTags:["br","b","i","u"]}}),c("Parser/model/ParserCss",["require"],function(a){return function(a){return{parseSelector:function(a){for(var b=[],c=a.split(","),d=0,e=c.length;e>d;d++){var f=c[d].trim();if(/^(\.{1}[\w\-]+)+(:{1,2}[\w\-()]+)?$/gi.test(f)){var g=f.split(".").filter(Boolean);b.push(g)}}return b},parseNode:function(a){for(var b=[],c=a.cssRules,d=0,e=c.length;e>d;d++){var f=c[d],g=f.selectorText;if(f.cssRules){for(var h=this.parseNode(f),i=f.media.mediaText.match(/-width:(.*)\)/i)[1],j=0,k=h.length;k>j;j++){var l=h[j];l.maxWidth=i?i.trim():""}b=b.concat(h)}if(g){g=this.parseSelector(g);for(var m=f.style,n={},o=0,p=m.length;p>o;o++)n[m[o]]=m[m[o]];for(var q=0,r=g.length;r>q;q++){var s=g[q],t={},u=s[s.length-1].split(/:(.+)/);u[1]&&(s[s.length-1]=u[0],t.state=u[1],u.splice(u.length-1,1)),t.selectors=s,t.style=n,b.push(t)}}}return b},parse:function(a){var b=document.createElement("style");b.innerHTML=a,document.head.appendChild(b);var c=b.sheet;document.head.removeChild(b);var d=this.parseNode(c);return 1==d.length&&(d=d[0]),d}}}}),c("Parser/model/ParserHtml",["require"],function(a){return function(a){var b="span",c=a;return{parseStyle:function(a){for(var b={},c=a.split(";"),d=0,e=c.length;e>d;d++){var f=c[d].trim();if(f){var g=f.split(":");b[g[0].trim()]=g[1].trim()}}return b},parseClass:function(a){for(var b=[],c=a.split(" "),d=0,e=c.length;e>d;d++){var f=c[d].trim();f&&b.push(f)}return b},parseNode:function(a){for(var d=[],e=a.childNodes,f=0,g=e.length;g>f;f++){var h=e[f],i={},j=h.attributes||[],k=j.length,l=d.length-1,m=d[l];i.tagName=h.tagName?h.tagName.toLowerCase():"",k&&(i.attributes={});for(var n=0;k>n;n++){var o=j[n].nodeName,p=j[n].nodeValue;"style"==o?i.style=this.parseStyle(p):"class"==o?i.classes=this.parseClass(p):"src"==o&&"img"==i.tagName?(i.type="image",i.src=p):i.attributes[o]=p}var q=h.childNodes.length;if(q){var r=h.childNodes[0];if(1===q&&3===r.nodeType)i.type="text",i.content=r.nodeValue;else{var s=this.parseNode(h);1==s.length&&"text"==s[0].type&&q>1&&s[0].tagName==b?(i.type="text",i.content=s[0].content):i.components=s}}var t=m&&"text"==m.type&&m.tagName==b;if(!i.tagName&&3===h.nodeType){if(t){m.content+=h.nodeValue;continue}h.nodeValue.trim()&&(i.type="text",i.tagName=b,i.content=h.nodeValue)}if(c.textTags.indexOf(i.tagName)>=0){if(t){m.content+=h.outerHTML;continue}i={type:"text",tagName:b,content:h.outerHTML}}i.tagName&&d.push(i)}return d},parse:function(a,b){var c={html:"",css:""},d=document.createElement("div");d.innerHTML=a;for(var e=d.querySelectorAll("script"),f=e.length;f--;)e[f].parentNode.removeChild(e[f]);if(b){for(var g="",h=d.querySelectorAll("style"),i=h.length;i--;)g=h[i].innerHTML+g,h[i].parentNode.removeChild(h[i]);g&&(c.css=b.parse(g))}var j=this.parseNode(d);return 1==j.length&&(j=j[0]),c.html=j,c}}}}),c("Parser/main",["require","./config/config","./model/ParserCss","./model/ParserHtml"],function(a){var b=function(){var b,c,d={},e=a("./config/config"),f=a("./model/ParserCss"),g=a("./model/ParserHtml");return{name:"Parser",init:function(a){d=a||{};for(var h in e)h in d||(d[h]=e[h]);return b=new g(d),c=new f(d),this},parseHtml:function(a){return b.parse(a,c)},parseCss:function(a){return c.parse(a)}}};return b}),c("Parser",["Parser/main"],function(a){return a}),c("SelectorManager/config/config",[],function(){return{stylePrefix:"clm-",selectors:[],label:"Classes",statesLabel:"- State -",states:[{name:"hover",label:"Hover"},{name:"active",label:"Click"},{name:"nth-of-type(2n)",label:"Even/Odd"}]}}),c("SelectorManager/model/Selector",["backbone"],function(a){return a.Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:"class",active:!0},initialize:function(){this.set("name",this.escapeName(this.get("name")));var a=this.get("label").trim();a||this.set("label",this.get("name"))},escapeName:function(a){return a.toLowerCase().replace(/([^a-z0-9\w]+)/gi,"-")}})}),c("SelectorManager/model/Selectors",["backbone","./Selector"],function(a,b){return a.Collection.extend({model:b})}),c("text!SelectorManager/template/classTags.html",[],function(){return'
\n
<%= label %>
\n
\n \n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
Selected
\n
\n
\n
\n'}),c("text!SelectorManager/template/classTag.html",[],function(){return'\n \n />\n \n'}),c("SelectorManager/view/ClassTagView",["backbone","text!./../template/classTag.html"],function(a,b){return a.View.extend({template:_.template(b),events:{},initialize:function(a){this.config=a.config||{},this.coll=a.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.inputProp="readonly",this.target=this.config.em,this.className=this.pfx+"tag",this.closeId=this.pfx+"close",this.chkId=this.pfx+"checkbox",this.labelId=this.pfx+"tag-label",this.events["click #"+this.closeId]="removeTag",this.events["click #"+this.chkId]="changeStatus",this.events["dblclick #"+this.labelId]="startEditTag",this.events["keypress #"+this.labelId+" input"]="updateInputLabel",this.events["blur #"+this.labelId+" input"]="endEditTag",this.listenTo(this.model,"change:active",this.updateStatus),this.delegateEvents()},startEditTag:function(){this.$labelInput.prop(this.inputProp,!1)},endEditTag:function(){var a=this.$labelInput.val(),b=this.model.escapeName(a);if(this.target){var c=this.target.get("SelectorManager");c&&(c.get(b)?this.$labelInput.val(this.model.get("label")):this.model.set({name:b,label:a}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(a){var b=this.target.get("selectedComponent");b&&b.get("classes").remove(this.model),this.coll&&(this.coll.remove(this.model),this.target.trigger("targetClassRemoved")),this.remove()},updateStatus:function(){this.$chk||(this.$chk=this.$el.find("#"+this.pfx+"checkbox")),this.model.get("active")?(this.$chk.removeClass("fa-circle-o").addClass("fa-dot-circle-o"),this.$el.removeClass("opac50")):(this.$chk.removeClass("fa-dot-circle-o").addClass("fa-circle-o"),this.$el.addClass("opac50"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input"));var a=this.$labelInput.val().length-2;a=1>a?1:a,this.$labelInput.attr("size",a)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.updateStatus(),this.$el.attr("class",this.className),this.updateInputLabel(),this}})}),c("SelectorManager/view/ClassTagsView",["backbone","text!./../template/classTags.html","./ClassTagView"],function(a,b,c){return a.View.extend({template:_.template(b),events:{},initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.className=this.pfx+"tags",this.addBtnId=this.pfx+"add-tag",this.newInputId=this.pfx+"new",this.stateInputId=this.pfx+"states",this.stateInputC=this.pfx+"input-c",this.states=this.config.states||[],this.events["click #"+this.addBtnId]="startNewTag",this.events["blur #"+this.newInputId]="endNewTag",this.events["keyup #"+this.newInputId]="onInputKeyUp",this.events["change #"+this.stateInputId]="stateChanged",this.target=this.config.em,this.listenTo(this.target,"change:selectedComponent",this.componentChanged),this.listenTo(this.target,"targetClassUpdated",this.updateSelector),this.listenTo(this.collection,"add",this.addNew),this.listenTo(this.collection,"reset",this.renderClasses),this.listenTo(this.collection,"remove",this.tagRemoved),this.delegateEvents()},tagRemoved:function(a){this.updateStateVis()},getStateOptions:function(){for(var a="",b=0;b'+this.states[b].label+"";return a},addNew:function(a){this.addToClasses(a)},startNewTag:function(a){this.$addBtn.hide(),this.$input.show().focus()},endNewTag:function(a){this.$addBtn.show(),this.$input.hide().val("")},onInputKeyUp:function(a){13===a.keyCode?this.addNewTag(this.$input.val()):27===a.keyCode&&this.endNewTag()},componentChanged:function(a){this.compTarget=this.target.get("selectedComponent"),this.compTarget&&this.getStates().val(this.compTarget.get("state"));var b=this.compTarget?this.compTarget.get("classes").models:[];this.collection.reset(b),this.updateStateVis()},updateStateVis:function(){this.collection.length?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){if(this.compTarget=this.target.get("selectedComponent"),this.compTarget&&this.compTarget.get){var a="",b=this.compTarget.get("classes");b.each(function(b){b.get("active")&&(a+="."+b.get("name"))});var c=this.compTarget.get("state");a=c?a+":"+c:a;var d=this.el.querySelector("#"+this.pfx+"sel");d&&(d.innerHTML=a)}},stateChanged:function(a){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(a){if(a){if(this.target){var b=this.target.get("SelectorManager"),c=b.add(a);if(this.compTarget){var d=this.compTarget.get("classes"),e=d.length;d.add(c);var f=d.length;this.collection.add(c),f>e&&this.target.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(a,b){var d=b||null,e=new c({model:a,config:this.config,coll:this.collection}),f=e.render().el;return d?d.appendChild(f):this.getClasses().append(f),f},renderClasses:function(){var a=document.createDocumentFragment();return this.collection.each(function(b){this.addToClasses(b,a)},this),this.getClasses()&&this.getClasses().empty().append(a),this},getClasses:function(){return this.$classes||(this.$classes=this.$el.find("#"+this.pfx+"tags-c")),this.$classes},getStates:function(){return this.$states||(this.$states=this.$el.find("#"+this.stateInputId)),this.$states},getStatesC:function(){return this.$statesC||(this.$statesC=this.$el.find("#"+this.stateInputC)),this.$statesC},render:function(){return this.$el.html(this.template({label:this.config.label,statesLabel:this.config.statesLabel,pfx:this.pfx,ppfx:this.ppfx})),this.$input=this.$el.find("input#"+this.newInputId),this.$addBtn=this.$el.find("#"+this.addBtnId),this.$classes=this.$el.find("#"+this.pfx+"tags-c"),this.$states=this.$el.find("#"+this.stateInputId),this.$statesC=this.$el.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),this.$el.attr("class",this.className),this}})}),c("SelectorManager/main",["require","./config/config","./model/Selectors","./view/ClassTagsView"],function(a){return function(b){var c=b||{},d=a("./config/config");Selectors=a("./model/Selectors"),ClassTagsView=a("./view/ClassTagsView");var e,f;return{name:"SelectorManager",init:function(a){c=a||{};for(var b in d)b in c||(c[b]=d[b]);var g=c.pStylePrefix;return g&&(c.stylePrefix=g+c.stylePrefix),e=new Selectors(c.selectors),f=new ClassTagsView({collection:e,config:c}),this},add:function(a,b){var c=b||{};return c.name=a,e.add(c)},get:function(a){return e.where({name:a})[0]},getAll:function(){return e},render:function(a){if(a){var b=new ClassTagsView({collection:new Selectors(a),config:c});return b.render().el}return f.render().el}}}}),c("SelectorManager",["SelectorManager/main"],function(a){return a}),c("ModalDialog/config/config",[],function(){return{stylePrefix:"mdl-",title:"",content:"",backdrop:!0}}),c("ModalDialog/model/Modal",["backbone"],function(a){return a.Model.extend({defaults:{title:"",content:"",open:!1}})}),c("text!ModalDialog/template/modal.html",[],function(){return'
\n
\n
<%= title %>
\n
\n
\n
\n
<%= content %>
\n
\n
\n
\n
'}),c("ModalDialog/view/ModalView",["backbone","text!./../template/modal.html"],function(a,b){return a.View.extend({template:_.template(b),events:{},initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"change:title",this.updateTitle),this.listenTo(this.model,"change:content",this.updateContent),this.events["click ."+this.pfx+"btn-close"]="hide",this.config.backdrop&&(this.events["click ."+this.pfx+"backlayer"]="hide"),this.delegateEvents()},getContent:function(){return this.$content||(this.$content=this.$el.find("."+this.pfx+"content #"+this.pfx+"c")),this.$content},getTitle:function(){return this.$title||(this.$title=this.$el.find("."+this.pfx+"title")),this.$title.get(0)},updateContent:function(){var a=this.getContent();a&&a.html(this.model.get("content"))},updateTitle:function(){var a=this.getTitle();a&&(a.innerHTML=this.model.get("title"))},updateOpen:function(){this.model.get("open")?this.$el.show():this.$el.hide()},hide:function(){this.model.set("open",0)},show:function(){this.model.set("open",1)},render:function(){var a=this.model.toJSON();return a.pfx=this.pfx,this.$el.html(this.template(a)),this.$el.attr("class",this.pfx+"container"),this.updateOpen(),this}})}),c("ModalDialog/main",["require","./config/config","./model/Modal","./view/ModalView"],function(a){return function(){var b,c,d={},e=a("./config/config"),f=a("./model/Modal"),g=a("./view/ModalView");return{name:"Modal",init:function(a){d=a||{};for(var h in e)h in d||(d[h]=e[h]);var i=d.pStylePrefix;return i&&(d.stylePrefix=i+d.stylePrefix),b=new f(d),c=new g({model:b,config:d}),d.em&&d.em.on("loaded",function(){this.render().appendTo(d.em.config.el||"body")},this),this},open:function(){return c.show(),this},close:function(){return c.hide(),this},isOpen:function(){return!!b.get("open")},setTitle:function(a){return b.set("title",a),this},getTitle:function(){return b.get("title")},setContent:function(a){return b.set("content",a),this},getContent:function(){return b.get("content")},getContentEl:function(){return c.getContent().get(0)},getModel:function(){return b},render:function(){return c.render().$el}}}}),c("ModalDialog",["ModalDialog/main"],function(a){return a}),c("CodeManager/config/config",[],function(){return{stylePrefix:"cm-"}}),c("CodeManager/model/HtmlGenerator",["backbone"],function(a){return a.Model.extend({build:function(a){var b=a.get("components")||a,c="";return b.each(function(a){var b=a.get("tagName"),d="",e="",f="",g=a.get("components"),h=a.get("attributes"),i=a.get("void"),j=a.get("classes");_.each(h,function(a,b){"onmousedown"!=b&&(d+=a&&"style"!=b?" "+b+'="'+a+'"':"")}),"image"==a.get("type")&&(b="img",i=1,d+=' src="'+a.get("src")+'"'),_.isEmpty(a.get("style"))||(e=' id="'+a.cid+'" '),j.each(function(a){f+=" "+a.get("name")}),f=""!==f?' class="'+f.trim()+'"':"",c+="<"+b+f+e+d+(i?"/":"")+">"+a.get("content"),g.length&&(c+=this.build(g)),i||(c+="")},this),c}})}),c("CodeManager/model/CssGenerator",["backbone"],function(a){return a.Model.extend({initialize:function(){this.compCls=[]},buildFromComp:function(a){var b=a.get("components")||a,c="";return b.each(function(a){var b=a.get("style"),d=a.get("classes"),e=a.get("components");if(d.each(function(a){this.compCls.push(a.get("name"))},this),b&&0!==Object.keys(b).length){c+="#"+a.cid+"{";for(var f in b)b.hasOwnProperty(f)&&(c+=f+":"+b[f]+";");c+="}"}e.length&&(c+=this.buildFromComp(e))},this),c},build:function(a,b){this.compCls=[];var c=this.buildFromComp(a);this.compCls;if(b){var d=b.getAll(),e={};d.each(function(a){var b=a.get("maxWidth");if(b){var d=e[b];return void(d?d.push(a):e[b]=[a])}c+=this.buildFromRule(a)},this);for(var f in e){for(var g=e[f],h="",i=0,j=g.length;j>i;i++)h+=this.buildFromRule(g[i]);h&&(c+="@media (max-width: "+f+"){"+h+"}")}}return c},buildFromRule:function(a){var b="",c=a.get("selectors"),d=a.get("style"),e=a.get("state"),f="",g=0,h=this.compCls;if(c.each(function(a){f+="."+a.get("name"),h.indexOf(a.get("name"))>-1&&(g=1)}),f&&g){f+=e?":"+e:"";var i="";if(d&&0!==Object.keys(d).length)for(var j in d)d.hasOwnProperty(j)&&(i+=j+":"+d[j]+";");i&&(b+=f+"{"+i+"}")}return b}})}),c("CodeManager/model/JsonGenerator",["backbone"],function(a){return a.Model.extend({build:function(b){var c=b.toJSON();return this.beforeEach(c),_.each(c,function(b,d){var e=c[d];if(e instanceof a.Model)c[d]=this.build(e);else if(e instanceof a.Collection){var f=e;c[d]=[],f.length&&f.each(function(a,b){c[d][b]=this.build(a)},this)}},this),c},beforeEach:function(a){delete a.status}})}),function(a){if("object"==typeof exports&&"object"==typeof module)module.exports=a();else{if("function"==typeof c&&c.amd)return c("codemirror/lib/codemirror",[],a);(this||window).CodeMirror=a()}}(function(){"use strict";function a(c,d){if(!(this instanceof a))return new a(c,d);this.options=d=d?Ke(d):{},Ke($f,d,!1),n(d);var e=d.value;"string"==typeof e&&(e=new wg(e,d.mode,null,d.lineSeparator)),this.doc=e;var f=new a.inputStyles[d.inputStyle](this),g=this.display=new b(c,e,f);g.wrapper.CodeMirror=this,j(this),h(this),d.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),d.autofocus&&!Cf&&g.input.focus(),r(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new De,keySeq:null,specialChars:null};var i=this;sf&&11>tf&&setTimeout(function(){i.display.input.reset(!0)},20),Qb(this),We(),ub(this),this.curOp.forceUpdate=!0,Xd(this,e),d.autofocus&&!Cf||i.hasFocus()?setTimeout(Le(qc,this),20):rc(this);for(var k in _f)_f.hasOwnProperty(k)&&_f[k](this,d[k],ag);w(this),d.finishInit&&d.finishInit(this);for(var l=0;ltf&&(d.gutters.style.zIndex=-1,d.scroller.style.paddingRight=0),uf||pf&&Cf||(d.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(d.wrapper):a(d.wrapper)),d.viewFrom=d.viewTo=b.first,d.reportedViewFrom=d.reportedViewTo=b.first,d.view=[],d.renderedView=null,d.externalMeasured=null,d.viewOffset=0,d.lastWrapHeight=d.lastWrapWidth=0,d.updateLineNumbers=null,d.nativeBarWidth=d.barHeight=d.barWidth=0,d.scrollbarsClipped=!1,d.lineNumWidth=d.lineNumInnerWidth=d.lineNumChars=null,d.alignWidgets=!1,d.cachedCharWidth=d.cachedTextHeight=d.cachedPaddingH=null,d.maxLine=null,d.maxLineLength=0,d.maxLineChanged=!1,d.wheelDX=d.wheelDY=d.wheelStartX=d.wheelStartY=null,d.shift=!1,d.selForContextMenu=null,d.activeTouch=null,c.init(d)}function c(b){b.doc.mode=a.getMode(b.options,b.doc.modeOption),d(b)}function d(a){a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null)}),a.doc.frontier=a.doc.first,Na(a,100),a.state.modeGen++,a.curOp&&Jb(a)}function e(a){a.options.lineWrapping?(Yg(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(Xg(a.display.wrapper,"CodeMirror-wrap"),m(a)),g(a),Jb(a),hb(a),setTimeout(function(){s(a)},100)}function f(a){var b=sb(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/tb(a.display)-3);return function(e){if(vd(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;g-1?a.backUp(d.length-e):d.match(/<\/?$/)&&(a.backUp(d.length),a.match(b,!1)||a.match(d)),c}function c(a){var b=i[a];return b?b:i[a]=new RegExp("\\s+"+a+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function d(a,b){for(var d,e=a.pos;e>=0&&"<"!==a.string.charAt(e);)e--;return 0>e?e:(d=a.string.slice(e,a.pos).match(c(b)))?d[2]:""}function e(a,b){return new RegExp((b?"^":"")+"","i")}function f(a,b){for(var c in a)for(var d=b[c]||(b[c]=[]),e=a[c],f=e.length-1;f>=0;f--)d.unshift(e[f])}function g(a,b){for(var c=0;c"===d.current()&&(h=g(m,d))){var o=a.getMode(c,h),p=e(l,!0),q=e(l,!1);f.token=function(a,c){return a.match(p,!1)?(c.token=i,c.localState=c.localMode=null,null):b(a,q,c.localMode.token(a,c.localState))},f.localMode=o,f.localState=a.startState(o,j.indent(f.htmlState,""))}return n}var j=a.getMode(c,{name:"xml",htmlMode:!0,multilineTagIndentFactor:d.multilineTagIndentFactor,multilineTagIndentPastTag:d.multilineTagIndentPastTag}),k={},l=d&&d.tags,m=d&&d.scriptTypes;if(f(h,k),l&&f(l,k),m)for(var n=m.length-1;n>=0;n--)k.script.unshift(["type",m[n].matches,m[n].mode]);return{startState:function(){var a=j.startState();return{token:i,localMode:null,localState:null,htmlState:a}},copyState:function(b){var c;return b.localState&&(c=a.copyState(b.localMode,b.localState)),{token:b.token,localMode:b.localMode,localState:c,htmlState:a.copyState(j,b.htmlState)}},token:function(a,b){return b.token(a,b)},indent:function(b,c){return!b.localMode||/^\s*<\//.test(c)?j.indent(b.htmlState,c):b.localMode.indent?b.localMode.indent(b.localState,c):a.Pass},innerMode:function(a){return{state:a.localState||a.htmlState,mode:a.localMode||j}}}},"xml","javascript","css"),a.defineMIME("text/html","htmlmixed")}),function(a){"object"==typeof exports&&"object"==typeof module?a(b("codemirror/lib/codemirror")):"function"==typeof c&&c.amd?c("formatting",["codemirror/lib/codemirror"],a):a(CodeMirror)}(function(a){a.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(a,b){return/^[;{}]$/.test(b)}}),a.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(a,b,c,d){return this.jsonMode?/^[\[,{]$/.test(b)||/^}/.test(c):";"==b&&d.lexical&&")"==d.lexical.type?!1:/^[;{}]$/.test(b)&&!/^;/.test(c)}});var b=/^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;a.extendMode("xml",{commentStart:"",newlineAfterToken:function(a,c,d,e){var f=!1;return"html"==this.configuration&&(f=e.context?b.test(e.context.tagName):!1),!f&&("tag"==a&&/>$/.test(c)&&e.context||/^-1&&h>-1&&h>g&&(a=a.substr(0,g)+a.substring(g+f.commentStart.length,h)+a.substr(h+f.commentEnd.length)),e.replaceRange(a,c,d)}})}),a.defineExtension("autoIndentRange",function(a,b){var c=this;this.operation(function(){for(var d=a.line;d<=b.line;d++)c.indentLine(d,"smart")})}),a.defineExtension("autoFormatRange",function(b,c){function d(){j+="\n",l=!0,++k}for(var e=this,f=e.getMode(),g=e.getRange(b,c).split("\n"),h=a.copyState(f,e.getTokenAt(b).state),i=e.getOption("tabSize"),j="",k=0,l=0===b.ch,m=0;m=a;++a)e.indentLine(a,"smart");e.setSelection(b,e.getCursor(!1))})})}),c("CodeManager/model/CodeMirrorEditor",["backbone","codemirror/lib/codemirror","codemirror/mode/htmlmixed/htmlmixed","codemirror/mode/css/css","formatting"],function(a,b,c,d,e){return a.Model.extend({defaults:{input:"",label:"",codeName:"",theme:"",readOnly:!0,lineNumbers:!0},init:function(a){return this.editor=b.fromTextArea(a,{dragDrop:!1,lineNumbers:this.get("lineNumbers"),readOnly:this.get("readOnly"),mode:this.get("codeName"),theme:this.get("theme")}),this},setContent:function(a){this.editor&&(this.editor.setValue(a),this.editor.autoFormatRange&&(b.commands.selectAll(this.editor),this.editor.autoFormatRange(this.editor.getCursor(!0),this.editor.getCursor(!1)),b.commands.goDocStart(this.editor)))}})}),c("text!CodeManager/template/editor.html",[],function(){return'
\n
<%= label %>
\n
\n
\n'}),c("CodeManager/view/EditorView",["backbone","text!./../template/editor.html"],function(a,b){return a.View.extend({template:_.template(b),initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix},render:function(){var a=this.model.toJSON();return a.pfx=this.pfx,this.$el.html(this.template(a)),this.$el.attr("class",this.pfx+"editor-c"),this.$el.find("#"+this.pfx+"code").html(this.model.get("input")),this}})}),c("CodeManager/main",["require","./config/config","./model/HtmlGenerator","./model/CssGenerator","./model/JsonGenerator","./model/CodeMirrorEditor","./view/EditorView"],function(a){var b=function(){var b={},c=a("./config/config"),d=a("./model/HtmlGenerator"),e=a("./model/CssGenerator"),f=a("./model/JsonGenerator"),g=a("./model/CodeMirrorEditor"),h=a("./view/EditorView"),i={},j={},k={},l={};return{getConfig:function(){return b},config:b,EditorView:h,name:"CodeManager",init:function(a){b=a||{};for(var h in c)h in b||(b[h]=c[h]);var i=b.pStylePrefix;return i&&(b.stylePrefix=i+b.stylePrefix),j.html=new d,j.css=new e,j.json=new f,l.CodeMirror=new g,this},onLoad:function(){this.loadDefaultGenerators().loadDefaultViewers()},addGenerator:function(a,b){return i[a]=b,this},getGenerator:function(a){return i[a]||null},getGenerators:function(){return i},addViewer:function(a,b){return k[a]=b,this},getViewer:function(a){return k[a]||null},getViewers:function(){return k},updateViewer:function(a,b){a.setContent(b)},getCode:function(a,b,c){var d=this.getGenerator(b);return d?d.build(a,c):""},loadDefaultGenerators:function(){for(var a in j)this.addGenerator(a,j[a]);return this},loadDefaultViewers:function(){for(var a in l)this.addViewer(a,l[a]);return this}}};return b}),c("CodeManager",["CodeManager/main"],function(a){return a}),c("Panels/config/config",[],function(){var a="create-comp",b="move-comp",c="sw-visibility",d="export-template",e="open-sm",f="open-layers",g="open-blocks",h="fullscreen",i="preview";return{stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{id:a,command:a,className:"fa fa-pencil-square-o",attributes:{title:"Create element"},stopDefaultCommand:1},{id:b,command:b,className:"fa fa-arrows",attributes:{title:"Move elements"},stopDefaultCommand:1}]},{id:"options",buttons:[{active:!0,id:c,className:"fa fa-square-o",command:c,context:c,attributes:{title:"View components"}},{id:i,className:"fa fa-eye",command:i,context:i,stopDefaultCommand:1,attributes:{title:"Preview"}},{id:h,className:"fa fa-arrows-alt",command:h,context:h,attributes:{title:"Fullscreen"}},{id:d,className:"fa fa-code",command:d,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:e,className:"fa fa-paint-brush",command:e,active:!0,attributes:{title:"Open Style Manager"}},{id:f,className:"fa fa-bars",command:f,attributes:{title:"Open Layer Manager"}},{id:g,className:"fa fa-th-large",command:g,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}}),c("Panels/model/Button",["backbone","require"],function(a,b){return a.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(a){if(this.get("buttons").length){var c=b("./Buttons");this.set("buttons",new c(this.get("buttons")))}}})}),c("Panels/model/Buttons",["backbone","./Button"],function(a,b){return a.Collection.extend({model:b,deactivateAllExceptOne:function(a,b){this.forEach(function(c,d){c!==a&&(c.set("active",!1),b&&c.get("buttons").length&&c.get("buttons").deactivateAllExceptOne(a,b))})},deactivateAll:function(a){var b=a||"";this.forEach(function(a,c){a.get("context")==b&&(a.set("active",!1),a.get("buttons").length&&a.get("buttons").deactivateAll(b))})}})}),c("Panels/model/Panel",["backbone","./Buttons"],function(a,b){return a.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(a){this.btn=this.get("buttons")||[],this.buttons=new b(this.btn),this.set("buttons",this.buttons)}})}),c("Panels/model/Panels",["backbone","./Panel"],function(a,b){return a.Collection.extend({model:b})}),c("Panels/view/ButtonView",["backbone","require"],function(a,b){return a.View.extend({tagName:"span",initialize:function(a){_.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var b=this.model.get("className");this.config=a.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.id=this.pfx+this.model.get("id"),this.activeCls=this.pfx+"active",this.btnsVisCls=this.pfx+"visible",this.parentM=a.parentM||null,this.className=this.pfx+"btn"+(b?" "+b:""),this.listenTo(this.model,"change:active updateActive",this.updateActive),this.listenTo(this.model,"checkActive",this.checkActive),this.listenTo(this.model,"change:bntsVis",this.updateBtnsVis),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:className",this.updateClassName),this.model.get("buttons").length&&(this.$el.on("mousedown",this.startTimer),this.$el.append($("
",{"class":this.pfx+"arrow-rd"}))),this.em&&this.em.get&&(this.commands=this.em.get("Commands")),this.events={},this.model.get("dragDrop")?(this.events.mousedown="initDrag",this.em.on("loaded",this.initSorter)):this.events.click="clicked",this.delegateEvents()},initSorter:function(){if(this.em.Canvas){var a=this.em.Canvas;this.canvasEl=a.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:a.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:a.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var b=a.getOffset();this.sorter.offTop=b.top,this.sorter.offLeft=b.left}},initDrag:function(){this.model.collection.deactivateAll(this.model.get("context")),this.sorter.startSort(this.el),this.sorter.setDropContent(this.model.get("options").content),this.canvasEl.style.cursor="grabbing",$(document).on("mouseup",this.stopDrag)},stopDrag:function(){$(document).off("mouseup",this.stopDrag),this.sorter.endMove()},onDrag:function(a){},onDrop:function(a){this.canvasEl.style.cursor="default"},updateClassName:function(){var a=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(a?" "+a:""))},updateAttributes:function(){this.$el.attr(this.model.get("attributes"))},updateBtnsVis:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},startTimer:function(){this.timeout=setTimeout(this.showButtons,this.config.delayBtnsShow),$(document).on("mouseup",this.stopTimer)},stopTimer:function(){$(document).off("mouseup",this.stopTimer),this.timeout&&clearTimeout(this.timeout)},showButtons:function(){clearTimeout(this.timeout),this.model.set("bntsVis",!0),$(document).on("mousedown",this.hideButtons),$(document).on("keypress",this.closeOnKeyPress)},hideButtons:function(a){a&&$(a.target).trigger("click"),this.model.set("bntsVis",!1),$(document).off("mousedown",this.hideButtons),$(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(a){var b=a.which||a.keyCode;27==b&&this.hideButtons()},updateActive:function(){var a=null,b=this.em&&this.em.get?this.em.get("Editor"):null,c=this.model.get("command");this.commands&&(a=this.commands.get(c)),this.model.get("active")?(this.model.collection.deactivateAll(this.model.get("context")),this.model.set("active",!0,{silent:!0}).trigger("checkActive"),this.parentM&&this.parentM.set("active",!0,{silent:!0}).trigger("checkActive"),a&&(a.run(b,this.model,this.model.get("options")),b.trigger("run:"+c))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),a&&(a.stop(b,this.model,this.model.get("options")),b.trigger("stop:"+c)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(a){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var b=this.model.get("active");this.model.set("active",!b);this.em.get("Commands").get("select-comp");b?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()}},swapParent:function(){this.parentM.collection.deactivateAll(this.model.get("context")),this.parentM.set("attributes",this.model.get("attributes")),this.parentM.set("options",this.model.get("options")),this.parentM.set("command",this.model.get("command")),this.parentM.set("className",this.model.get("className")),this.parentM.set("active",!0,{silent:!0}).trigger("checkActive")},render:function(){if(this.updateAttributes(),this.$el.attr("class",this.className),this.model.get("buttons").length){var a=b("./ButtonsView"),c=new a({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=c.render().$el,this.$buttons.append($("
",{"class":this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}),c("Panels/view/ButtonsView",["backbone","./ButtonView"],function(a,b){return a.View.extend({initialize:function(a){this.opt=a||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"buttons"},addTo:function(a){this.addToCollection(a)},addToCollection:function(a,c){var d=c||null,e=b,f=new e({model:a,config:this.config,parentM:this.parentM}),g=f.render().el;return d?d.appendChild(g):this.$el.append(g),g},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addToCollection(b,a)},this),this.$el.append(a),this.$el.attr("class",_.result(this,"className")),this}})}),c("Panels/view/PanelView",["backbone","./ButtonsView"],function(a,b){return a.View.extend({initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.buttons=this.model.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+this.model.get("id"),this.listenTo(this.model,"change:appendContent",this.appendContent),this.listenTo(this.model,"change:content",this.updateContent)},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},render:function(){if(this.$el.attr("class",_.result(this,"className")),this.id&&this.$el.attr("id",this.id),this.buttons.length){var a=new b({collection:this.buttons,config:this.config});this.$el.append(a.render().el)}return this.$el.append(this.model.get("content")),this}})}),c("Panels/view/PanelsView",["backbone","./PanelView"],function(a,b){return a.View.extend({initialize:function(a){this.opt=a||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"panels"},addTo:function(a){this.addToCollection(a)},addToCollection:function(a,c){var d=c||null,e=b,f=new e({model:a,config:this.config}),g=f.render().el;return d?d.appendChild(g):this.$el.append(g),g},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addToCollection(b,a)},this),this.$el.append(a),this.$el.attr("class",_.result(this,"className")),this}})}),c("Panels/main",["require","./config/config","./model/Panel","./model/Panels","./view/PanelView","./view/PanelsView"],function(a){return function(){var b,c,d={},e=a("./config/config"),f=a("./model/Panel"),g=a("./model/Panels"),h=(a("./view/PanelView"),a("./view/PanelsView"));return{name:"Panels",init:function(a){d=a||{};for(var f in e)f in d||(d[f]=e[f]);var i=d.pStylePrefix;return i&&(d.stylePrefix=i+d.stylePrefix),b=new g(d.defaults),c=new h({collection:b,config:d}),this},getPanels:function(){return b},getPanelsEl:function(){return c.el},addPanel:function(a){return b.add(a)},getPanel:function(a){var c=b.where({id:a});return c.length?c[0]:null},addButton:function(a,b){var c=this.getPanel(a);return c?c.get("buttons").add(b):null},getButton:function(a,b){var c=this.getPanel(a);if(c){var d=c.get("buttons").where({id:b});return d.length?d[0]:null}return null},render:function(){return c.render().el},active:function(){this.getPanels().each(function(a){a.get("buttons").each(function(a){a.get("active")&&a.trigger("updateActive")})})},Panel:f}}}),c("Panels",["Panels/main"],function(a){return a}),c("RichTextEditor/config/config",[],function(){return{stylePrefix:"rte-",toolbarId:"toolbar",containerId:"wrapper",commands:[{command:"bold",title:"Bold","class":"fa fa-bold"},{command:"italic",title:"Italic","class":"fa fa-italic"},{command:"underline",title:"Underline","class":"fa fa-underline"},{command:"strikethrough",title:"Strikethrough","class":"fa fa-strikethrough",group:"format"}]}}),c("RichTextEditor/view/TextEditorView",["jquery"],function(a){var b=function(b){var c=a.Deferred(),d=new FileReader;return d.onload=function(a){c.resolve(a.target.result)},d.onerror=c.reject,d.onprogress=c.notify,d.readAsDataURL(b),c.promise()};return a.fn.cleanHtml=function(){var b=a(this).html();return b&&b.replace(/(
|\s|

<\/div>| )*$/,"")},a.fn.wysiwyg=function(c){var d,e,f,g=this,h=function(){var b=e.activeToolbarClass;b&&a(e.toolbarSelector).find(f).each(function(){var c=a(this),d=c.data(e.commandRole),f=g.get(0).ownerDocument;f.queryCommandState(d)?c.addClass(b):c.removeClass(b)})},i=function(a,b){var c=a.split(" "),d=c.shift(),e=c.join(" ")+(b||"");g.get(0).ownerDocument.execCommand("styleWithCSS",!1,!0),g.get(0).ownerDocument.execCommand(d,0,e),h()},j=function(){var a=window.getSelection();return a.getRangeAt&&a.rangeCount?a.getRangeAt(0):void 0},k=function(){d=j()},l=function(){var a=window.getSelection();if(d){try{a.removeAllRanges()}catch(b){document.body.createTextRange().select(),document.selection.empty()}a.addRange(d)}},m=function(c){g.focus(),a.each(c,function(c,d){/^image\//.test(d.type)?a.when(b(d)).done(function(a){i("insertimage",a)}).fail(function(a){e.fileUploadError("file-reader",a)}):e.fileUploadError("unsupported-file-type",d.type)})},n=function(a,b){l(),document.queryCommandSupported("hiliteColor")&&document.execCommand("hiliteColor",0,b||"transparent"),k(),a.data(e.selectionMarker,b)},o=function(b,c){b.find(f).unbind().click(function(){l(),g.get(0).ownerDocument.execCommand(a(this).data(c.commandRole)),k()}),b.find("[data-toggle=dropdown]").click(l);var d="[data-"+c.commandRole+"]";b.find("select"+d).on("webkitspeechchange change",function(){var b=this.value;l(),b&&(g.focus(),i(a(this).data(c.commandRole),b)),console.log("change isolated2 ",b),k()}),b.find("input[type=text]"+d,", select"+d).on("webkitspeechchange change",function(){console.log("on changed ",b);var b=this.value;this.value="",l(),b&&(g.focus(),i(a(this).data(c.commandRole),b)),k()}).on("focus",function(){console.log("on focus ");var b=a(this);b.data(c.selectionMarker)||(console.log("i have no ",c.selectionMarker),n(b,c.selectionColor),b.focus())}).on("blur",function(){var b=a(this);b.data(c.selectionMarker)&&n(b,!1)}),b.find("input[type=file][data-"+c.commandRole+"]").change(function(){l(),"file"===this.type&&this.files&&this.files.length>0&&m(this.files),k(),this.value=""})},p=function(){g.on("dragenter dragover",!1).on("drop",function(a){var b=a.originalEvent.dataTransfer;a.stopPropagation(),a.preventDefault(),b&&b.files&&b.files.length>0&&m(b.files)})};if("string"==typeof c&&"destroy"==c)return g.attr("contenteditable",!1).unbind("mouseup keyup mouseout dragenter dragover"),a(window).unbind("touchend"),this;e=a.extend({},a.fn.wysiwyg.defaults,c);var q="[data-"+e.commandRole+"]";return f="a"+q+",button"+q+",input[type=button]"+q+", select"+q,e.dragAndDropImages&&p(),o(a(e.toolbarSelector),e),g.attr("contenteditable",!0).on("mouseup keyup mouseout",function(){k(),h()}),a(window).bind("touchend",function(a){var b=g.is(a.target)||g.has(a.target).length>0,c=j(),d=c&&c.startContainer===c.endContainer&&c.startOffset===c.endOffset;(!d||b)&&(k(),h())}),this},a.fn.wysiwyg.defaults={toolbarSelector:"[data-role=editor-toolbar]",commandRole:"edit",activeToolbarClass:"btn-info",selectionMarker:"edit-focus-marker",selectionColor:"darkgrey",dragAndDropImages:!0,fileUploadError:function(a,b){console.log("File upload error",a,b)}},a}),c("RichTextEditor/model/CommandButton",["backbone"],function(a){return a.Model.extend({idAttribute:"command",defaults:{command:"",type:"",title:"","class":"",options:[]},initialize:function(){var a=this.get("options");a.length&&this.set("type","select")}})}),c("RichTextEditor/model/CommandButtons",["backbone","./CommandButton"],function(a,b){return a.Collection.extend({model:b})}),c("RichTextEditor/view/CommandButtonView",["backbone"],function(a){return a.View.extend({tagName:"a",initialize:function(a,b){this.config=b||{},this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"btn "+this.model.get("class")},render:function(){return this.$el.addClass(this.className),this}})}),c("RichTextEditor/view/CommandButtonSelectView",["backbone","./CommandButtonView"],function(a,b){return b.extend({initialize:function(a,c){b.prototype.initialize.apply(this,arguments)},getInput:function(){var a=this.model;if(!this.input){var b=a.get("command"),c='",this.input=$(c)}return this.input},getInputCont:function(){var a=this.getInput(),b=this.ppfx,c=$('
');return c.append(a)},render:function(){return b.prototype.render.apply(this,arguments),this.$el.html(this.getInputCont()),this}})}),c("RichTextEditor/view/CommandButtonsView",["backbone","./CommandButtonView","./CommandButtonSelectView"],function(a,b,c){return a.View.extend({attributes:{"data-role":"editor-toolbar"},initialize:function(a){this.config=a.config||{};var b=this.config.stylePrefix||"";this.id=b+this.config.toolbarId,this.listenTo(this.collection,"add",this.addTo),this.$el.data("helper",1)},addTo:function(a){this.add(a)},add:function(a,d){var e=d||null,f=b;switch(a.get("type")){case"select":f=c}var g=new f({model:a,attributes:{title:a.get("title"),"data-edit":a.get("command")}},this.config),h=g.render().el;e?e.appendChild(h):this.$el.append(h)},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.add(b,a)},this),this.$el.append(a),this.$el.attr("id",this.id),this}})}),c("RichTextEditor/main",["require","./config/config","./view/TextEditorView","./model/CommandButtons","./view/CommandButtonsView"],function(a){return function(){var b,c,d,e={},f=a("./config/config"),g=(a("./view/TextEditorView"),a("./model/CommandButtons")),h=a("./view/CommandButtonsView");return{name:"rte",init:function(a){e=a||{};for(var i in f)i in e||(e[i]=f[i]);var j=e.pStylePrefix;return j&&(e.stylePrefix=j+e.stylePrefix),b=e.stylePrefix,d=new g(e.commands),c=new h({collection:d,config:e}),this},add:function(a,b){var c=b||{};return c.command=a,d.add(c)},get:function(a){return d.where({command:a})[0]},getAll:function(){return d},udpatePosition:function(){if(this.lastEl&&e.em){var a="px",b=e.em.get("canvasOffset"),d=e.em.get("Canvas").getCanvasView(),f=d.getElementPos(this.lastEl),g=c.el.style,h=c.$el.outerHeight();g.top=f.top-h+a,g.left=f.left+b.left+a}},attach:function(a){a.$el.wysiwyg({}).focus(),this.lastEl=a.el,e.em&&(this.udpatePosition(),e.em.off("change:canvasOffset",this.udpatePosition,this),e.em.on("change:canvasOffset",this.udpatePosition,this)),this.show(),c.$el.on("mousedown",this.disableProp)},detach:function(a){a.$el.wysiwyg("destroy"),this.hide(),c.$el.off("mousedown",this.disableProp)},show:function(){c.el.style.display="block"},hide:function(){c.el.style.display="none"},disableProp:function(a){a.stopPropagation()},getToolbarEl:function(){return c.el},render:function(){return c.render().el}}}}),c("RichTextEditor",["RichTextEditor/main"],function(a){return a}),c("StyleManager/config/config",[],function(){return{stylePrefix:"sm-",sectors:[{name:"General",open:!1,buildProps:["float","display","position","top","right","left","bottom"]},{name:"Dimension",open:!1,buildProps:["width","height","max-width","min-height","margin","padding"]},{name:"Typography",open:!1,buildProps:["font-family","font-size","font-weight","letter-spacing","color","line-height","text-align","text-shadow"],properties:[{property:"text-align",list:[{value:"left",className:"fa fa-align-left"},{value:"center",className:"fa fa-align-center"},{value:"right",className:"fa fa-align-right"},{value:"justify",className:"fa fa-align-justify"}]}]},{name:"Decorations",open:!1,buildProps:["border-radius-c","background-color","border-radius","border","box-shadow","background"]},{name:"Extra",open:!1,buildProps:["transition","perspective","transform"]}],textNoElement:"Select an element before using Style Manager"}}),c("StyleManager/model/Layer",["backbone"],function(a){return a.Model.extend({defaults:{index:"",active:!0,value:"",values:{},preview:!1},initialize:function(){var a=this.get("value");if(!a){var b="",c=this.get("values");for(var d in c)b+=" "+c[d];this.set("value",b.trim())}}})}),c("StyleManager/model/Layers",["backbone","./Layer"],function(a,b){return a.Collection.extend({model:b,initialize:function(){this.idx=1,this.on("add",this.onAdd),this.on("reset",this.onReset)},onAdd:function(a,b,c){c.noIncrement||a.set("index",this.idx++)},onReset:function(){this.idx=1}})}),c("StyleManager/model/Property",["backbone","./Layers"],function(a,b){return a.Model.extend({defaults:{name:"",property:"",type:"",units:[],unit:"",defaults:"",info:"",value:"",icon:"",preview:!1,detached:!1,functionName:"",properties:[],layers:[],list:[]},initialize:function(a){var c=this.get("type"),d=this.get("name"),e=this.get("property");switch(d||this.set("name",e.charAt(0).toUpperCase()+e.slice(1).replace(/-/g," ")),c){case"stack":this.set("layers",new b)}},getValue:function(){var a="",b=this.get("type");switch(b){case"integer":a=this.get("value")+this.get("unit");break;default:a=this.get("value")}return a}})}),c("StyleManager/model/Properties",["backbone","./Property"],function(a,b){return a.Collection.extend({model:b})}),c("StyleManager/model/PropertyFactory",["backbone"],function(a){return function(){return{build:function(a){var b=[];"string"==typeof a&&(a=[a]);for(var c=0,d=a.length;d>c;c++){var e={},f=a[c];switch(e.property=f,f){case"border-radius-c":e.property="border-radius"}switch(f){case"float":case"position":case"text-align":e.type="radio";break;case"display":case"font-family":case"font-weight":case"border-style":case"box-shadow-type":case"background-repeat":case"background-position":case"background-attachment":case"background-size":case"transition-property":case"transition-timing-function":case"cursor":case"overflow":e.type="select";break;case"top":case"right":case"bottom":case"left":case"margin-top":case"margin-right":case"margin-bottom":case"margin-left":case"padding-top":case"padding-right":case"padding-bottom":case"padding-left":case"min-height":case"min-width":case"max-height":case"max-width":case"width":case"height":case"font-size":case"letter-spacing":case"line-height":case"text-shadow-h":case"text-shadow-v":case"text-shadow-blur":case"border-radius-c":case"border-top-left-radius":case"border-top-right-radius":case"border-bottom-left-radius":case"border-bottom-right-radius":case"border-width":case"box-shadow-h":case"box-shadow-v":case"box-shadow-blur":case"box-shadow-spread":case"transition-duration":case"perspective":case"transform-rotate-x":case"transform-rotate-y":case"transform-rotate-z":case"transform-scale-x":case"transform-scale-y":case"transform-scale-z":e.type="integer";break;case"margin":case"padding":case"border-radius":case"border":case"transform":e.type="composite";break;case"color":case"text-shadow-color":case"background-color":case"border-color":case"box-shadow-color":e.type="color";break;case"text-shadow":case"box-shadow":case"background":case"transition":e.type="stack";break;case"background-image":e.type="file"}switch(f){case"float":case"background-color":case"background-image":e.defaults="none";break;case"display":e.defaults="block";break;case"position":e.defaults="static";break;case"top":case"right":case"bottom":case"left":case"margin-top":case"margin-right":case"margin-bottom":case"margin-left":case"padding-top":case"padding-right":case"padding-bottom":case"padding-left":case"text-shadow-h":case"text-shadow-v":case"text-shadow-blur":case"border-radius-c":case"border-top-left-radius":case"border-top-right-radius":case"border-bottom-left-radius":case"border-bottom-right-radius":case"box-shadow-h":case"box-shadow-v":case"box-shadow-spread":case"perspective":case"transform-rotate-x":case"transform-rotate-y":case"transform-rotate-z":e.defaults=0;break;case"transform-scale-x":case"transform-scale-y":case"transform-scale-z":e.defaults=1;break;case"box-shadow-blur":e.defaults=5;break;case"min-height":case"min-width":case"max-height":case"max-width":case"width":case"height":case"background-size":case"cursor":e.defaults="auto";break;case"font-family":e.defaults="Arial, Helvetica, sans-serif";break;case"font-size":case"border-width":e.defaults="medium";break;case"font-weight":e.defaults="400";break;case"letter-spacing":case"line-height":e.defaults="normal";break;case"color":case"text-shadow-color":case"border-color":case"box-shadow-color":e.defaults="black";break;case"text-align":e.defaults="left";break;case"border-style":e.defaults="solid";break;case"box-shadow-type": e.defaults="";break;case"background-repeat":e.defaults="repeat";break;case"background-position":e.defaults="left top";break;case"background-attachment":e.defaults="scroll";break;case"transition-property":e.defaults="width";break;case"transition-duration":e.defaults="2";break;case"transition-timing-function":e.defaults="ease";break;case"overflow":e.defaults="visible"}switch(f){case"top":case"right":case"bottom":case"left":case"margin-top":case"margin-right":case"margin-bottom":case"margin-left":case"padding-top":case"padding-right":case"padding-bottom":case"padding-left":case"min-height":case"min-width":case"max-height":case"max-width":case"width":case"height":case"text-shadow-h":case"text-shadow-v":case"text-shadow-blur":case"border-radius-c":case"border-top-left-radius":case"border-top-right-radius":case"border-bottom-left-radius":case"border-bottom-right-radius":case"box-shadow-h":case"box-shadow-v":e.units=["px","%"];break;case"font-size":case"letter-spacing":case"line-height":e.units=["px","em","rem","%"];break;case"border-width":e.units=["px","em"];break;case"box-shadow-blur":case"box-shadow-spread":case"perspective":e.units=["px"];break;case"transition-duration":e.units=["s"];break;case"transform-rotate-x":case"transform-rotate-y":case"transform-rotate-z":e.units=["deg"]}switch(f){case"min-height":case"min-width":case"max-height":case"max-width":case"width":case"height":case"font-size":case"text-shadow-blur":case"border-radius-c":case"border-top-left-radius":case"border-top-right-radius":case"border-bottom-left-radius":case"border-bottom-right-radius":case"border-width":case"box-shadow-blur":case"transition-duration":case"perspective":e.min=0}switch(f){case"text-shadow":case"box-shadow":case"background":e.preview=!0}switch(f){case"background":e.detached=!0}switch(f){case"transform-rotate-x":e.functionName="rotateX";break;case"transform-rotate-y":e.functionName="rotateY";break;case"transform-rotate-z":e.functionName="rotateZ";break;case"transform-scale-x":e.functionName="scaleX";break;case"transform-scale-y":e.functionName="scaleY";break;case"transform-scale-z":e.functionName="scaleZ"}switch(f){case"float":e.list=[{value:"none"},{value:"left"},{value:"right"}];break;case"display":e.list=[{value:"block"},{value:"inline"},{value:"inline-block"},{value:"none"}];break;case"position":e.list=[{value:"static"},{value:"relative"},{value:"absolute"},{value:"fixed"}];break;case"font-family":var g=", sans-serif",h=["Arial, Helvetica"+g,"Arial Black, Gadget"+g,"Brush Script MT"+g,"Comic Sans MS, cursive"+g,"Courier New, Courier, monospace","Georgia, serif","Helvetica, serif","Impact, Charcoal"+g,"Lucida Sans Unicode, Lucida Grande"+g,"Tahoma, Geneva"+g,"Times New Roman, Times, serif","Trebuchet MS, Helvetica"+g,"Verdana, Geneva"+g];e.list=[];for(var i=0,j=h.length;j>i;i++){var k={};k.value=h[i],k.name=h[i].split(",")[0],k.style="font-family: "+h[i]+"; font-size:15px",e.list.push(k)}break;case"font-weight":e.list=[{value:"100",name:"Thin"},{value:"200",name:"Extra-Light"},{value:"300",name:"Light"},{value:"400",name:"Normal"},{value:"500",name:"Medium"},{value:"600",name:"Semi-Bold"},{value:"700",name:"Bold"},{value:"800",name:"Extra-Bold"},{value:"900",name:"Ultra-Bold"}];break;case"text-align":e.list=[{value:"left"},{value:"center"},{value:"right"},{value:"justify"}];break;case"border-style":e.list=[{value:"none"},{value:"solid"},{value:"dotted"},{value:"dashed"},{value:"double"},{value:"groove"},{value:"ridge"},{value:"inset"},{value:"outset"}];break;case"box-shadow-type":e.list=[{value:"",name:"Outside"},{value:"inset",name:"Inside"}];break;case"background-repeat":e.list=[{value:"repeat"},{value:"repeat-x"},{value:"repeat-y"},{value:"no-repeat"}];break;case"background-position":e.list=[{value:"left top"},{value:"left center"},{value:"left bottom"},{value:"right top"},{value:"right center"},{value:"right bottom"},{value:"center top"},{value:"center center"},{value:"center bottom"}];break;case"background-attachment":e.list=[{value:"scroll"},{value:"fixed"},{value:"local"}];break;case"background-size":e.list=[{value:"auto"},{value:"cover"},{value:"contain"}];break;case"transition-property":e.list=[{value:"all"},{value:"width"},{value:"height"},{value:"background-color"},{value:"transform"},{value:"box-shadow"},{value:"opacity"}];break;case"transition-timing-function":e.list=[{value:"linear"},{value:"ease"},{value:"ease-in"},{value:"ease-out"},{value:"ease-in-out"}];break;case"cursor":e.list=[{value:"auto"},{value:"pointer"},{value:"copy"},{value:"crosshair"},{value:"grab"},{value:"grabbing"},{value:"help"},{value:"move"},{value:"text"}];break;case"overflow":e.list=[{value:"visible"},{value:"hidden"},{value:"scroll"},{value:"auto"}]}switch(f){case"margin":e.properties=this.build(["margin-top","margin-right","margin-bottom","margin-left"]);break;case"padding":e.properties=this.build(["padding-top","padding-right","padding-bottom","padding-left"]);break;case"text-shadow":e.properties=this.build(["text-shadow-h","text-shadow-v","text-shadow-blur","text-shadow-color"]);break;case"border":e.properties=this.build(["border-width","border-style","border-color"]);break;case"border-radius":e.properties=this.build(["border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius"]);break;case"box-shadow":e.properties=this.build(["box-shadow-h","box-shadow-v","box-shadow-blur","box-shadow-spread","box-shadow-color","box-shadow-type"]);break;case"background":e.properties=this.build(["background-image","background-repeat","background-position","background-attachment","background-size"]);break;case"transition":e.properties=this.build(["transition-property","transition-duration","transition-timing-function"]);break;case"transform":e.properties=this.build(["transform-rotate-x","transform-rotate-y","transform-rotate-z","transform-scale-x","transform-scale-y","transform-scale-z"])}b.push(e)}return b}}}}),c("StyleManager/model/Sector",["backbone","./Properties","./PropertyFactory"],function(a,b,c){return a.Model.extend({defaults:{id:"",name:"",open:!0,buildProps:"",extendBuilded:1,properties:[]},initialize:function(a){var c=a||{},d=[],e=this.buildProperties(c.buildProps);d=e?this.extendProperties(e):this.get("properties"),this.set("properties",new b(d))},extendProperties:function(a){for(var b=a.length,c=this.get("properties"),d=this.get("extendBuilded"),e=0,f=c.length;f>e;e++){for(var g=c[e],h=0,i=0;b>i;i++){var j=a[i];g.property!=j.property||(a[i]=d?_.extend(j,g):g,h=1)}h||a.push(g)}return a},buildProperties:function(a){var b,d=a||[];return d.length?(this.propFactory||(this.propFactory=new c),b=this.propFactory.build(d)):void 0}})}),c("StyleManager/model/Sectors",["backbone","./Sector"],function(a,b){return a.Collection.extend({model:b})}),c("text!StyleManager/templates/propertyLabel.html",[],function(){return'
\n
\n <%= label %>\n
\n
'}),c("text!StyleManager/templates/propertyInput.html",[],function(){return'
\n input-holder\'>\n
\n
'}),c("StyleManager/view/PropertyView",["backbone","text!./../templates/propertyLabel.html","text!./../templates/propertyInput.html"],function(a,b,c){return a.View.extend({template:_.template(c),templateLabel:_.template(b),events:{change:"valueUpdated"},initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=a.target||{},this.propTarget=a.propTarget||{},this.onChange=a.onChange||{},this.onInputRender=a.onInputRender||{},this.customValue=a.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.model.get("value")||this.model.set("value",this.model.get("defaults")),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(this.model,"change:value",this.valueChanged),this.listenTo(this.model,"targetUpdated",this.targetUpdated)},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.getTarget()&&(this.sameValue()||this.renderInputRequest())},sameValue:function(){return this.getComponentValue()==this.model.get("value")+this.model.get("unit")},getComponentValue:function(){var a=this.getTarget();if(a){var b=a.get("style")[this.property];if(b?this.componentValue=b:this.componentValue=this.defaultValue+(this.unit||""),this.model.get("functionName")){var c=this.fetchFromFunction(this.componentValue);c&&(this.componentValue=c)}if(this.customValue&&"function"==typeof this.customValue){var d=this.model.collection.indexOf(this.model),e=this.customValue(this,d);e&&(this.componentValue=e)}return this.componentValue}},fetchFromFunction:function(a){return a.substring(a.indexOf("(")+1,a.lastIndexOf(")"))},getValueForTarget:function(){return this.model.getValue()},getInputValue:function(){return this.$input?this.$input.val():""},valueChanged:function(a,b,c){var d=this.getValueForTarget();if(this.$input&&this.setValue(d),this.getTarget()&&this.isTargetStylable()){value=this.getValueForTarget();var e=this.model.get("functionName");e&&(value=e+"("+value+")");var f=this.getTarget(),g=this.onChange;g&&"function"==typeof g?g(f,this,c):this.updateTargetStyle(value,null,c)}},updateTargetStyle:function(a,b,c){var d=b||this.property,e=a||"",f=c?c.avoidStore:0,g=this.getTarget(),h=_.clone(g.get("style"));e?h[d]=e:delete h[d],g.set("style",h,{avoidStore:f}),this.helperComponent&&this.helperComponent.set("style",h,{avoidStore:f})},isTargetStylable:function(){var a=this.getTarget().get("stylable");return a instanceof Array&&(a=_.indexOf(a,this.property)>=0),a},setValue:function(a,b){var c=0===b?0:1,d=this.model.get("defaults"),e=this.model.get("value")||d;(a||c)&&(e=a),this.$input&&this.$input.val(e),this.model.set({value:e},{silent:!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}})}),c("text!StyleManager/templates/propertyInteger.html",[],function(){return'
\n input-holder\'>\n units-holder\'>\n
\n
\n
\n
\n
'}),c("StyleManager/view/PropertyIntegerView",["backbone","./PropertyView","text!./../templates/propertyInteger.html"],function(a,b,c){return b.extend({template:_.template(c),initialize:function(a){b.prototype.initialize.apply(this,arguments),_.bindAll(this,"moveIncrement","upIncrement"),this.min=this.model.get("min")||0===this.model.get("min")?this.model.get("min"):null,this.max=this.model.get("max")||0===this.model.get("max")?this.model.get("max"):null,this.units=this.model.get("units"),this.unit=this.model.get("unit")?this.model.get("unit"):this.units.length?this.units[0]:"",this.events["click ."+this.pfx+"u-arrow"]="upArrowClick",this.events["click ."+this.pfx+"d-arrow"]="downArrowClick",this.events["mousedown ."+this.pfx+"int-arrows"]="downIncrement",this.listenTo(this.model,"change:unit",this.valueChanged),this.delegateEvents()},valueUpdated:function(){this.$input&&this.$unit&&this.model.set({value:this.validateValue(this.$input.val()),unit:this.$unit.val()})},validateValue:function(a){var b=a;return null!==this.max&&(b=b>this.max?this.max:b),null!==this.min&&(b=bthis.max?this.max:b),this.model.set("value",b)},downArrowClick:function(a){var b=this.model.get("value");b=isNaN(b)?0:parseInt(b,10)-1,null!==this.min&&(b=b",{placeholder:"auto",type:"text"}),this.$el.find("#"+a+"input-holder").html(this.$input)),this.$unit||this.units&&this.units.length&&(this.unitS='",this.$unit=$(this.unitS),this.$el.find("#"+a+"units-holder").html(this.$unit)),this.setValue(this.componentValue)},setValue:function(a){var b=this.unit,c=this.model.get("value")||this.defaultValue;if(a){a+="",c=parseFloat(a.replace(",",".")),c=isNaN(c)?this.defaultValue:c;var d=a.replace(c,"");_.indexOf(this.units,d)>-1&&(b=d)}this.$input&&this.$input.val(c),this.$unit&&this.$unit.val(b),this.model.set({value:c,unit:b},{silent:!0})}})}),c("text!StyleManager/templates/propertyRadio.html",[],function(){return'
\n input-holder\'>\n
\n
'}),c("StyleManager/view/PropertyRadioView",["backbone","./PropertyView","text!./../templates/propertyRadio.html"],function(a,b,c){return b.extend({template:_.template(c),initialize:function(a){b.prototype.initialize.apply(this,arguments),this.list=this.model.get("list")||[],this.className=this.className+" "+this.pfx+"list"},renderInput:function(){var a=this.pfx;this.$input||this.list&&this.list.length&&(this.input="",_.each(this.list,function(b){var c=b.className?b.className+" "+a+"icon":"",d=this.property+"-"+b.value,e=b.name?b.name:b.value;titleAttr=b.title?'title="'+b.title+'"':"",this.input+='
"},this),this.$inputEl=$(this.input),this.$el.find("#"+a+"input-holder").html(this.$inputEl),this.$input=this.$inputEl.find('input[name="'+this.property+'"]')),this.setValue(this.componentValue)},getInputValue:function(){return this.$input?this.$el.find("input:checked").val():""},setValue:function(a){var b=this.model.get("value")||this.defaultValue;a&&(b=a),this.$input&&this.$input.filter('[value="'+b+'"]').prop("checked",!0),this.model.set({value:b},{silent:!0})}})}),c("text!StyleManager/templates/propertySelect.html",[],function(){return'
\n input-holder\'>\n
\n
\n
'}),c("StyleManager/view/PropertySelectView",["backbone","./PropertyView","text!./../templates/propertySelect.html"],function(a,b,c){return b.extend({template:_.template(c),initialize:function(a){b.prototype.initialize.apply(this,arguments),this.list=this.model.get("list")||[]},renderInput:function(){var a=this.pfx;this.$input||(this.input="",this.$input=$(this.input),this.$el.find("#"+a+"input-holder").html(this.$input)),this.setValue(this.componentValue,0)}})}),function(a){"use strict";"function"==typeof c&&c.amd?c("Spectrum",["jquery"],a):"object"==typeof exports&&"object"==typeof module?module.exports=a(b("jquery")):a(jQuery)}(function(a,b){"use strict";function c(b,c,d,e){for(var f=[],g=0;g')}else{var m="sp-clear-display";f.push(a("
").append(a('').attr("title",e.noColorSelectedText)).html())}}return"
"+f.join("")+"
"}function d(){for(var a=0;aMath.abs(b-e);ta=f?"x":"y"}}else ta=null;var g=!ta||"x"===ta,h=!ta||"y"===ta;g&&(ka=parseFloat(a/ba)),h&&(la=parseFloat((ca-b)/ca)),Xa=!1,U.showAlpha||(ma=1),K()},y,z),Ta?(H(Ta),L(),Va=U.preferredFormat||tinycolor(Ta).format,u(Ta)):L(),V&&C();var d=p?"mousedown.spectrum":"click.spectrum touchstart.spectrum";Ha.delegate(".sp-thumb-el",d,b),Ia.delegate(".sp-thumb-el:nth-child(1)",d,{ignore:!0},b)}function t(){if(X&&window.localStorage){try{var b=window.localStorage[X].split(",#");b.length>1&&(delete window.localStorage[X],a.each(b,function(a,b){u(b)}))}catch(c){}try{qa=window.localStorage[X].split(";")}catch(c){}}}function u(b){if(W){var c=tinycolor(b).toRgbString();if(!pa[c]&&-1===a.inArray(c,qa))for(qa.push(c);qa.length>ra;)qa.shift();if(X&&window.localStorage)try{window.localStorage[X]=qa.join(";")}catch(d){}}}function v(){var a=[];if(U.showPalette)for(var b=0;b=ca||0>=ba||0>=ea)&&O(),aa=!0,xa.addClass(sa),ta=null,va.trigger("dragstart.spectrum",[I()])}function z(){aa=!1,xa.removeClass(sa),va.trigger("dragstop.spectrum",[I()])}function A(){var a=Ga.val();if(null!==a&&""!==a||!Ya){var b=tinycolor(a);b.isValid()?(H(b),N(!0)):Ga.addClass("sp-validation-error")}else H(null),N(!0)}function B(){_?F():C()}function C(){var b=a.Event("beforeShow.spectrum");return _?void O():(va.trigger(b,[I()]),void(Z.beforeShow(I())===!1||b.isDefaultPrevented()||(d(),_=!0,a(ua).bind("keydown.spectrum",D),a(ua).bind("click.spectrum",E),a(window).bind("resize.spectrum",$),Qa.addClass("sp-active"),xa.removeClass("sp-hidden"),O(),L(),Ua=I(),x(),Z.show(Ua),va.trigger("show.spectrum",[Ua]))))}function D(a){27===a.keyCode&&F()}function E(a){2!=a.button&&(aa||(Wa?N(!0):G(),F()))}function F(){_&&!V&&(_=!1,a(ua).unbind("keydown.spectrum",D),a(ua).unbind("click.spectrum",E),a(window).unbind("resize.spectrum",$),Qa.removeClass("sp-active"),xa.addClass("sp-hidden"),Z.hide(I()),va.trigger("hide.spectrum",[I()]))}function G(){H(Ua,!0)}function H(a,b){if(tinycolor.equals(a,I()))return void L();var c,d;!a&&Ya?Xa=!0:(Xa=!1,c=tinycolor(a),d=c.toHsv(),ja=d.h%360/360,ka=d.s,la=d.v,ma=d.a),L(),c&&c.isValid()&&!b&&(Va=U.preferredFormat||c.getFormat())}function I(a){return a=a||{},Ya&&Xa?null:tinycolor.fromRatio({h:ja,s:ka,v:la,a:Math.round(100*ma)/100},{format:a.format||Va})}function J(){return!Ga.hasClass("sp-validation-error")}function K(){L(),Z.move(I()),va.trigger("move.spectrum",[I()])}function L(){Ga.removeClass("sp-validation-error"),M();var a=tinycolor.fromRatio({h:ja,s:1,v:1});za.css("background-color",a.toHexString());var b=Va;1>ma&&(0!==ma||"name"!==b)&&("hex"===b||"hex3"===b||"hex6"===b||"name"===b)&&(b="rgb");var c=I({format:b}),d="";if(Sa.removeClass("sp-clear-display"),Sa.css("background-color","transparent"),!c&&Ya)Sa.addClass("sp-clear-display");else{var e=c.toHexString(),f=c.toRgbString();if(q||1===c.alpha?Sa.css("background-color",f):(Sa.css("background-color","transparent"),Sa.css("filter",c.toFilter())),U.showAlpha){var g=c.toRgb();g.a=0;var h=tinycolor(g).toRgbString(),i="linear-gradient(left, "+h+", "+e+")";p?Da.css("filter",tinycolor(h).toFilter({gradientType:1},e)):(Da.css("background","-webkit-"+i),Da.css("background","-moz-"+i),Da.css("background","-ms-"+i),Da.css("background","linear-gradient(to right, "+h+", "+e+")"))}d=c.toString(b)}U.showInput&&Ga.val(d),U.showPalette&&w(),x()}function M(){var a=ka,b=la;if(Ya&&Xa)Fa.hide(),Ca.hide(),Aa.hide();else{Fa.show(),Ca.show(),Aa.show();var c=a*ba,d=ca-b*ca;c=Math.max(-da,Math.min(ba-da,c-da)),d=Math.max(-da,Math.min(ca-da,d-da)),Aa.css({top:d+"px",left:c+"px"});var e=ma*ga;Fa.css({left:e-ha/2+"px"});var f=ja*ea;Ca.css({top:f-ia+"px"})}}function N(a){var b=I(),c="",d=!tinycolor.equals(b,Ua);b&&(c=b.toString(Va),u(b)),Na&&va.val(c),a&&d&&(Z.change(b),va.trigger("change",[b]))}function O(){_&&(ba=za.width(),ca=za.height(),da=Aa.height(),fa=Ba.width(),ea=Ba.height(),ia=Ca.height(),ga=Ea.width(),ha=Fa.width(),V||(xa.css("position","absolute"),U.offset?xa.offset(U.offset):xa.offset(g(xa,Ra))),M(),U.showPalette&&w(),va.trigger("reflow.spectrum"))}function P(){va.show(),Ra.unbind("click.spectrum touchstart.spectrum"),xa.remove(),Qa.remove(),o[Za.id]=null}function Q(c,d){return c===b?a.extend({},U):d===b?U[c]:(U[c]=d,"preferredFormat"===c&&(Va=U.preferredFormat),void j())}function R(){wa=!1,va.attr("disabled",!1),Ra.removeClass("sp-disabled")}function S(){F(),wa=!0,va.attr("disabled",!0),Ra.addClass("sp-disabled")}function T(a){U.offset=a,O()}var U=e(h,f),V=U.flat,W=U.showSelectionPalette,X=U.localStorageKey,Y=U.theme,Z=U.callbacks,$=l(O,10),_=!1,aa=!1,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=1,na=[],oa=[],pa={},qa=U.selectionPalette.slice(0),ra=U.maxSelectionSize,sa="sp-dragging",ta=null,ua=f.ownerDocument,va=(ua.body,a(f)),wa=!1,xa=a(s,ua).addClass(Y),ya=xa.find(".sp-picker-container"),za=xa.find(".sp-color"),Aa=xa.find(".sp-dragger"),Ba=xa.find(".sp-hue"),Ca=xa.find(".sp-slider"),Da=xa.find(".sp-alpha-inner"),Ea=xa.find(".sp-alpha"),Fa=xa.find(".sp-alpha-handle"),Ga=xa.find(".sp-input"),Ha=xa.find(".sp-palette"),Ia=xa.find(".sp-initial"),Ja=xa.find(".sp-cancel"),Ka=xa.find(".sp-clear"),La=xa.find(".sp-choose"),Ma=xa.find(".sp-palette-toggle"),Na=va.is("input"),Oa=Na&&"color"===va.attr("type")&&m(),Pa=Na&&!V,Qa=Pa?a(r).addClass(Y).addClass(U.className).addClass(U.replacerClassName):a([]),Ra=Pa?Qa:va,Sa=Qa.find(".sp-preview-inner"),Ta=U.color||Na&&va.val(),Ua=!1,Va=U.preferredFormat,Wa=!U.showButtons||U.clickoutFiresChange,Xa=!Ta,Ya=U.allowEmpty&&!Oa;n();var Za={show:C,hide:F,toggle:B,reflow:O,option:Q,enable:R,disable:S,offset:T,set:function(a){H(a),N()},get:I,destroy:P,container:xa};return Za.id=o.push(Za)-1,Za}function g(b,c){var d=0,e=b.outerWidth(),f=b.outerHeight(),g=c.outerHeight(),h=b[0].ownerDocument,i=h.documentElement,j=i.clientWidth+a(h).scrollLeft(),k=i.clientHeight+a(h).scrollTop(),l=c.offset();return l.top+=g,l.left-=Math.min(l.left,l.left+e>j&&j>e?Math.abs(l.left+e-j):0),l.top-=Math.min(l.top,l.top+f>k&&k>f?Math.abs(f+g-d):d),l}function h(){}function i(a){a.stopPropagation()}function j(a,b){var c=Array.prototype.slice,d=c.call(arguments,2);return function(){return a.apply(b,d.concat(c.call(arguments)))}}function k(b,c,d,e){function f(a){a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),a.returnValue=!1}function g(a){if(k){if(p&&j.documentMode<9&&!a.button)return i();var d=a.originalEvent&&a.originalEvent.touches&&a.originalEvent.touches[0],e=d&&d.pageX||a.pageX,g=d&&d.pageY||a.pageY,h=Math.max(0,Math.min(e-l.left,n)),q=Math.max(0,Math.min(g-l.top,m));o&&f(a),c.apply(b,[h,q,a])}}function h(c){var e=c.which?3==c.which:2==c.button;e||k||d.apply(b,arguments)!==!1&&(k=!0,m=a(b).height(),n=a(b).width(),l=a(b).offset(),a(j).bind(q),a(j.body).addClass("sp-dragging"),g(c),f(c))}function i(){k&&(a(j).unbind(q),a(j.body).removeClass("sp-dragging"),setTimeout(function(){e.apply(b,arguments)},0)),k=!1}c=c||function(){},d=d||function(){},e=e||function(){};var j=document,k=!1,l={},m=0,n=0,o="ontouchstart"in window,q={};q.selectstart=f,q.dragstart=f,q["touchmove mousemove"]=g,q["touchend mouseup"]=i,a(b).bind("touchstart mousedown",h)}function l(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,a.apply(e,f)};c&&clearTimeout(d),(c||!d)&&(d=setTimeout(g,b))}}function m(){return a.fn.spectrum.inputTypeColorSupport()}var n={beforeShow:h,move:h,change:h,show:h,hide:h,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:!1,className:"",containerClassName:"",replacerClassName:"",showAlpha:!1,theme:"sp-light",palette:[["#ffffff","#000000","#ff0000","#ff8000","#ffff00","#008000","#0000ff","#4b0082","#9400d3"]],selectionPalette:[],disabled:!1,offset:null},o=[],p=!!/msie/i.exec(window.navigator.userAgent),q=function(){function a(a,b){return!!~(""+a).indexOf(b)}var b=document.createElement("div"),c=b.style;return c.cssText="background-color:rgba(0,0,0,.5)",a(c.backgroundColor,"rgba")||a(c.backgroundColor,"hsla")}(),r=["
","
","
","
"].join(""),s=function(){var a="";if(p)for(var b=1;6>=b;b++)a+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",a,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}(),t="spectrum.id";a.fn.spectrum=function(b,c){if("string"==typeof b){var d=this,e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=o[a(this).data(t)];if(c){var f=c[b];if(!f)throw new Error("Spectrum: no such method: '"+b+"'");"get"==b?d=c.get():"container"==b?d=c.container:"option"==b?d=c.option.apply(c,e):"destroy"==b?(c.destroy(),a(this).removeData(t)):f.apply(c,e)}}),d}return this.spectrum("destroy").each(function(){var c=a.extend({},b,a(this).data()),d=f(this,c);a(this).data(t,d.id)})},a.fn.spectrum.load=!0,a.fn.spectrum.loadOpts={},a.fn.spectrum.draggable=k,a.fn.spectrum.defaults=n,a.fn.spectrum.inputTypeColorSupport=function u(){if("undefined"==typeof u._cachedResult){var b=a("")[0];u._cachedResult="color"===b.type&&""!==b.value}return u._cachedResult},a.spectrum={},a.spectrum.localization={},a.spectrum.palettes={},a.fn.spectrum.processNativeColorInputs=function(){var b=a("input[type=color]");b.length&&!m()&&b.spectrum({preferredFormat:"hex6"})},function(){function a(a){var c={r:0,g:0,b:0},e=1,g=!1,h=!1;return"string"==typeof a&&(a=G(a)),"object"==typeof a&&(a.hasOwnProperty("r")&&a.hasOwnProperty("g")&&a.hasOwnProperty("b")?(c=b(a.r,a.g,a.b),g=!0,h="%"===String(a.r).substr(-1)?"prgb":"rgb"):a.hasOwnProperty("h")&&a.hasOwnProperty("s")&&a.hasOwnProperty("v")?(a.s=D(a.s),a.v=D(a.v),c=f(a.h,a.s,a.v),g=!0,h="hsv"):a.hasOwnProperty("h")&&a.hasOwnProperty("s")&&a.hasOwnProperty("l")&&(a.s=D(a.s), a.l=D(a.l),c=d(a.h,a.s,a.l),g=!0,h="hsl"),a.hasOwnProperty("a")&&(e=a.a)),e=w(e),{ok:g,format:a.format||h,r:M(255,N(c.r,0)),g:M(255,N(c.g,0)),b:M(255,N(c.b,0)),a:e}}function b(a,b,c){return{r:255*x(a,255),g:255*x(b,255),b:255*x(c,255)}}function c(a,b,c){a=x(a,255),b=x(b,255),c=x(c,255);var d,e,f=N(a,b,c),g=M(a,b,c),h=(f+g)/2;if(f==g)d=e=0;else{var i=f-g;switch(e=h>.5?i/(2-f-g):i/(f+g),f){case a:d=(b-c)/i+(c>b?6:0);break;case b:d=(c-a)/i+2;break;case c:d=(a-b)/i+4}d/=6}return{h:d,s:e,l:h}}function d(a,b,c){function d(a,b,c){return 0>c&&(c+=1),c>1&&(c-=1),1/6>c?a+6*(b-a)*c:.5>c?b:2/3>c?a+(b-a)*(2/3-c)*6:a}var e,f,g;if(a=x(a,360),b=x(b,100),c=x(c,100),0===b)e=f=g=c;else{var h=.5>c?c*(1+b):c+b-c*b,i=2*c-h;e=d(i,h,a+1/3),f=d(i,h,a),g=d(i,h,a-1/3)}return{r:255*e,g:255*f,b:255*g}}function e(a,b,c){a=x(a,255),b=x(b,255),c=x(c,255);var d,e,f=N(a,b,c),g=M(a,b,c),h=f,i=f-g;if(e=0===f?0:i/f,f==g)d=0;else{switch(f){case a:d=(b-c)/i+(c>b?6:0);break;case b:d=(c-a)/i+2;break;case c:d=(a-b)/i+4}d/=6}return{h:d,s:e,v:h}}function f(a,b,c){a=6*x(a,360),b=x(b,100),c=x(c,100);var d=K.floor(a),e=a-d,f=c*(1-b),g=c*(1-e*b),h=c*(1-(1-e)*b),i=d%6,j=[c,g,f,f,h,c][i],k=[h,c,c,g,f,f][i],l=[f,f,h,c,c,g][i];return{r:255*j,g:255*k,b:255*l}}function g(a,b,c,d){var e=[C(L(a).toString(16)),C(L(b).toString(16)),C(L(c).toString(16))];return d&&e[0].charAt(0)==e[0].charAt(1)&&e[1].charAt(0)==e[1].charAt(1)&&e[2].charAt(0)==e[2].charAt(1)?e[0].charAt(0)+e[1].charAt(0)+e[2].charAt(0):e.join("")}function h(a,b,c,d){var e=[C(E(d)),C(L(a).toString(16)),C(L(b).toString(16)),C(L(c).toString(16))];return e.join("")}function i(a,b){b=0===b?0:b||10;var c=P(a).toHsl();return c.s-=b/100,c.s=y(c.s),P(c)}function j(a,b){b=0===b?0:b||10;var c=P(a).toHsl();return c.s+=b/100,c.s=y(c.s),P(c)}function k(a){return P(a).desaturate(100)}function l(a,b){b=0===b?0:b||10;var c=P(a).toHsl();return c.l+=b/100,c.l=y(c.l),P(c)}function m(a,b){b=0===b?0:b||10;var c=P(a).toRgb();return c.r=N(0,M(255,c.r-L(255*-(b/100)))),c.g=N(0,M(255,c.g-L(255*-(b/100)))),c.b=N(0,M(255,c.b-L(255*-(b/100)))),P(c)}function n(a,b){b=0===b?0:b||10;var c=P(a).toHsl();return c.l-=b/100,c.l=y(c.l),P(c)}function o(a,b){var c=P(a).toHsl(),d=(L(c.h)+b)%360;return c.h=0>d?360+d:d,P(c)}function p(a){var b=P(a).toHsl();return b.h=(b.h+180)%360,P(b)}function q(a){var b=P(a).toHsl(),c=b.h;return[P(a),P({h:(c+120)%360,s:b.s,l:b.l}),P({h:(c+240)%360,s:b.s,l:b.l})]}function r(a){var b=P(a).toHsl(),c=b.h;return[P(a),P({h:(c+90)%360,s:b.s,l:b.l}),P({h:(c+180)%360,s:b.s,l:b.l}),P({h:(c+270)%360,s:b.s,l:b.l})]}function s(a){var b=P(a).toHsl(),c=b.h;return[P(a),P({h:(c+72)%360,s:b.s,l:b.l}),P({h:(c+216)%360,s:b.s,l:b.l})]}function t(a,b,c){b=b||6,c=c||30;var d=P(a).toHsl(),e=360/c,f=[P(a)];for(d.h=(d.h-(e*b>>1)+720)%360;--b;)d.h=(d.h+e)%360,f.push(P(d));return f}function u(a,b){b=b||6;for(var c=P(a).toHsv(),d=c.h,e=c.s,f=c.v,g=[],h=1/b;b--;)g.push(P({h:d,s:e,v:f})),f=(f+h)%1;return g}function v(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[a[c]]=c);return b}function w(a){return a=parseFloat(a),(isNaN(a)||0>a||a>1)&&(a=1),a}function x(a,b){A(a)&&(a="100%");var c=B(a);return a=M(b,N(0,parseFloat(a))),c&&(a=parseInt(a*b,10)/100),K.abs(a-b)<1e-6?1:a%b/parseFloat(b)}function y(a){return M(1,N(0,a))}function z(a){return parseInt(a,16)}function A(a){return"string"==typeof a&&-1!=a.indexOf(".")&&1===parseFloat(a)}function B(a){return"string"==typeof a&&-1!=a.indexOf("%")}function C(a){return 1==a.length?"0"+a:""+a}function D(a){return 1>=a&&(a=100*a+"%"),a}function E(a){return Math.round(255*parseFloat(a)).toString(16)}function F(a){return z(a)/255}function G(a){a=a.replace(H,"").replace(I,"").toLowerCase();var b=!1;if(Q[a])a=Q[a],b=!0;else if("transparent"==a)return{r:0,g:0,b:0,a:0,format:"name"};var c;return(c=S.rgb.exec(a))?{r:c[1],g:c[2],b:c[3]}:(c=S.rgba.exec(a))?{r:c[1],g:c[2],b:c[3],a:c[4]}:(c=S.hsl.exec(a))?{h:c[1],s:c[2],l:c[3]}:(c=S.hsla.exec(a))?{h:c[1],s:c[2],l:c[3],a:c[4]}:(c=S.hsv.exec(a))?{h:c[1],s:c[2],v:c[3]}:(c=S.hsva.exec(a))?{h:c[1],s:c[2],v:c[3],a:c[4]}:(c=S.hex8.exec(a))?{a:F(c[1]),r:z(c[2]),g:z(c[3]),b:z(c[4]),format:b?"name":"hex8"}:(c=S.hex6.exec(a))?{r:z(c[1]),g:z(c[2]),b:z(c[3]),format:b?"name":"hex"}:(c=S.hex3.exec(a))?{r:z(c[1]+""+c[1]),g:z(c[2]+""+c[2]),b:z(c[3]+""+c[3]),format:b?"name":"hex"}:!1}var H=/^[\s,#]+/,I=/\s+$/,J=0,K=Math,L=K.round,M=K.min,N=K.max,O=K.random,P=function(b,c){if(b=b?b:"",c=c||{},b instanceof P)return b;if(!(this instanceof P))return new P(b,c);var d=a(b);this._originalInput=b,this._r=d.r,this._g=d.g,this._b=d.b,this._a=d.a,this._roundA=L(100*this._a)/100,this._format=c.format||d.format,this._gradientType=c.gradientType,this._r<1&&(this._r=L(this._r)),this._g<1&&(this._g=L(this._g)),this._b<1&&(this._b=L(this._b)),this._ok=d.ok,this._tc_id=J++};P.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var a=this.toRgb();return(299*a.r+587*a.g+114*a.b)/1e3},setAlpha:function(a){return this._a=w(a),this._roundA=L(100*this._a)/100,this},toHsv:function(){var a=e(this._r,this._g,this._b);return{h:360*a.h,s:a.s,v:a.v,a:this._a}},toHsvString:function(){var a=e(this._r,this._g,this._b),b=L(360*a.h),c=L(100*a.s),d=L(100*a.v);return 1==this._a?"hsv("+b+", "+c+"%, "+d+"%)":"hsva("+b+", "+c+"%, "+d+"%, "+this._roundA+")"},toHsl:function(){var a=c(this._r,this._g,this._b);return{h:360*a.h,s:a.s,l:a.l,a:this._a}},toHslString:function(){var a=c(this._r,this._g,this._b),b=L(360*a.h),d=L(100*a.s),e=L(100*a.l);return 1==this._a?"hsl("+b+", "+d+"%, "+e+"%)":"hsla("+b+", "+d+"%, "+e+"%, "+this._roundA+")"},toHex:function(a){return g(this._r,this._g,this._b,a)},toHexString:function(a){return"#"+this.toHex(a)},toHex8:function(){return h(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:L(this._r),g:L(this._g),b:L(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+L(this._r)+", "+L(this._g)+", "+L(this._b)+")":"rgba("+L(this._r)+", "+L(this._g)+", "+L(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:L(100*x(this._r,255))+"%",g:L(100*x(this._g,255))+"%",b:L(100*x(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+L(100*x(this._r,255))+"%, "+L(100*x(this._g,255))+"%, "+L(100*x(this._b,255))+"%)":"rgba("+L(100*x(this._r,255))+"%, "+L(100*x(this._g,255))+"%, "+L(100*x(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":this._a<1?!1:R[g(this._r,this._g,this._b,!0)]||!1},toFilter:function(a){var b="#"+h(this._r,this._g,this._b,this._a),c=b,d=this._gradientType?"GradientType = 1, ":"";if(a){var e=P(a);c=e.toHex8String()}return"progid:DXImageTransform.Microsoft.gradient("+d+"startColorstr="+b+",endColorstr="+c+")"},toString:function(a){var b=!!a;a=a||this._format;var c=!1,d=this._a<1&&this._a>=0,e=!b&&d&&("hex"===a||"hex6"===a||"hex3"===a||"name"===a);return e?"name"===a&&0===this._a?this.toName():this.toRgbString():("rgb"===a&&(c=this.toRgbString()),"prgb"===a&&(c=this.toPercentageRgbString()),("hex"===a||"hex6"===a)&&(c=this.toHexString()),"hex3"===a&&(c=this.toHexString(!0)),"hex8"===a&&(c=this.toHex8String()),"name"===a&&(c=this.toName()),"hsl"===a&&(c=this.toHslString()),"hsv"===a&&(c=this.toHsvString()),c||this.toHexString())},_applyModification:function(a,b){var c=a.apply(null,[this].concat([].slice.call(b)));return this._r=c._r,this._g=c._g,this._b=c._b,this.setAlpha(c._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(n,arguments)},desaturate:function(){return this._applyModification(i,arguments)},saturate:function(){return this._applyModification(j,arguments)},greyscale:function(){return this._applyModification(k,arguments)},spin:function(){return this._applyModification(o,arguments)},_applyCombination:function(a,b){return a.apply(null,[this].concat([].slice.call(b)))},analogous:function(){return this._applyCombination(t,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(u,arguments)},splitcomplement:function(){return this._applyCombination(s,arguments)},triad:function(){return this._applyCombination(q,arguments)},tetrad:function(){return this._applyCombination(r,arguments)}},P.fromRatio=function(a,b){if("object"==typeof a){var c={};for(var d in a)a.hasOwnProperty(d)&&("a"===d?c[d]=a[d]:c[d]=D(a[d]));a=c}return P(a,b)},P.equals=function(a,b){return a&&b?P(a).toRgbString()==P(b).toRgbString():!1},P.random=function(){return P.fromRatio({r:O(),g:O(),b:O()})},P.mix=function(a,b,c){c=0===c?0:c||50;var d,e=P(a).toRgb(),f=P(b).toRgb(),g=c/100,h=2*g-1,i=f.a-e.a;d=h*i==-1?h:(h+i)/(1+h*i),d=(d+1)/2;var j=1-d,k={r:f.r*d+e.r*j,g:f.g*d+e.g*j,b:f.b*d+e.b*j,a:f.a*g+e.a*(1-g)};return P(k)},P.readability=function(a,b){var c=P(a),d=P(b),e=c.toRgb(),f=d.toRgb(),g=c.getBrightness(),h=d.getBrightness(),i=Math.max(e.r,f.r)-Math.min(e.r,f.r)+Math.max(e.g,f.g)-Math.min(e.g,f.g)+Math.max(e.b,f.b)-Math.min(e.b,f.b);return{brightness:Math.abs(g-h),color:i}},P.isReadable=function(a,b){var c=P.readability(a,b);return c.brightness>125&&c.color>500},P.mostReadable=function(a,b){for(var c=null,d=0,e=!1,f=0;f125&&g.color>500,i=3*(g.brightness/125)+g.color/500;(h&&!e||h&&e&&i>d||!h&&!e&&i>d)&&(e=h,d=i,c=P(b[f]))}return c};var Q=P.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},R=P.hexNames=v(Q),S=function(){var a="[-\\+]?\\d+%?",b="[-\\+]?\\d*\\.\\d+%?",c="(?:"+b+")|(?:"+a+")",d="[\\s|\\(]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")\\s*\\)?",e="[\\s|\\(]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")\\s*\\)?";return{rgb:new RegExp("rgb"+d),rgba:new RegExp("rgba"+e),hsl:new RegExp("hsl"+d),hsla:new RegExp("hsla"+e),hsv:new RegExp("hsv"+d),hsva:new RegExp("hsva"+e),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();window.tinycolor=P}(),a(function(){a.fn.spectrum.load&&a.fn.spectrum.processNativeColorInputs()})}),c("text!StyleManager/templates/propertyColor.html",[],function(){return'
\n input-holder\'>\n
\n
\n
\n
\n
'}),c("StyleManager/view/PropertyColorView",["backbone","./PropertyView","Spectrum","text!./../templates/propertyColor.html"],function(a,b,c,d){return b.extend({template:_.template(d),renderInput:function(){if(this.$input||(this.$input=$("",{placeholder:this.defaultValue,type:"text"}),this.$el.find("#"+this.pfx+"input-holder").html(this.$input)),!this.$colorPicker){this.$colorPicker=$("
",{"class":this.pfx+"color-picker"}),cpStyle=this.$colorPicker.get(0).style;var a=this,b=this.target.config?this.target.config.el:"";this.$colorPicker.spectrum({appendTo:b||"body",showPalette:!0,maxSelectionSize:8,palette:[],showAlpha:!0,chooseText:"Ok",cancelText:"⨯",move:function(a){var b=1==a.getAlpha()?a.toHexString():a.toRgbString();cpStyle.backgroundColor=b},change:function(b){var c=1==b.getAlpha()?b.toHexString():b.toRgbString();c=c.replace(/ /g,""),cpStyle.backgroundColor=c,a.model.set("value",c)}}),this.$el.find("."+this.pfx+"colorp-c").append(this.$colorPicker)}this.setValue(this.componentValue,0)},setValue:function(a,c){b.prototype.setValue.apply(this,arguments);var d=this.model.get("value")||this.defaultValue;d=a||d,this.$colorPicker&&(d="none"===d?"#fff":d,this.$colorPicker.spectrum("set",d),this.$colorPicker.get(0).style.backgroundColor=d)}})}),c("text!StyleManager/templates/propertyFile.html",[],function(){return'
\n
input-holder\'>\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
'}),c("StyleManager/view/PropertyFileView",["backbone","./PropertyView","text!./../templates/propertyFile.html"],function(a,b,c){return b.extend({template:_.template(c),initialize:function(a){b.prototype.initialize.apply(this,arguments),this.assets=this.target.get("assets"),this.modal=this.target.get("Modal"),this.am=this.target.get("AssetManager"),this.className=this.className+" "+this.pfx+"file",this.events["click #"+this.pfx+"close"]="removeFile",this.events["click #"+this.pfx+"images"]="openAssetManager",this.delegateEvents()},renderInput:function(){this.$input||(this.$input=$("",{placeholder:this.defaultValue,type:"text"})),this.$preview||(this.$preview=this.$el.find("#"+this.pfx+"preview-file")),this.$previewBox||(this.$previewBox=this.$el.find("#"+this.pfx+"preview-box")),this.componentValue&&this.componentValue!=this.defaultValue?this.setPreviewView(1):this.setPreviewView(0),this.setValue(this.componentValue,0)},setPreviewView:function(a){this.$previewBox&&(a?this.$previewBox.addClass(this.pfx+"show"):this.$previewBox.removeClass(this.pfx+"show"))},spreadUrl:function(a){this.setValue('url("'+a+'")'),this.setPreviewView(1)},setPreview:function(a){this.$preview&&this.$preview.css("background-image",a)},setValue:function(a,c){b.prototype.setValue.apply(this,arguments),this.setPreview(a)},renderTemplate:function(){this.$el.append(this.template({upload:"Upload",assets:"Images",pfx:this.pfx}))},cleanValue:function(){this.setPreviewView(0),this.model.set({value:""},{silent:!0})},removeFile:function(){this.model.set("value",this.defaultValue),b.prototype.cleanValue.apply(this,arguments),this.setPreviewView(0)},openAssetManager:function(a){var b=this;this.modal&&this.am&&(this.modal.setTitle("Select image"),this.modal.setContent(this.am.render()),this.am.setTarget(null),this.modal.open(),this.am.onSelect(function(c){b.modal.close(),b.spreadUrl(c.get("src")),b.valueChanged(a)}))}})}),c("text!StyleManager/templates/propertyComposite.html",[],function(){return'
\n input-holder\'>\n
\n
'}),c("StyleManager/view/PropertyCompositeView",["backbone","./PropertyView","text!./../templates/propertyComposite.html","require"],function(a,b,c,d){return b.extend({template:_.template(c),initialize:function(a){b.prototype.initialize.apply(this,arguments),_.bindAll(this,"build"),this.config=a.config||{},this.className=this.className+" "+this.pfx+"composite"},valueUpdated:function(){this.model.get("detached")||b.prototype.valueUpdated.apply(this,arguments)},renderInput:function(){var a=this.model.get("properties");this.model.get("detached");if(a&&a.length){if(this.$input||(this.$input=$("",{value:0,type:"hidden"})),!this.props){var b=d("./../model/Properties");this.props=new b(a),this.model.set("properties",this.props)}if(!this.$props){this.props.each(function(a,b){a&&"composite"==a.get("type")&&(this.props.remove(a),console.warn("Nested composite types not yet allowed."))},this);var c=d("./PropertiesView"),e=new c(this.getPropsConfig());this.$props=e.render().$el,this.$el.find("#"+this.pfx+"input-holder").html(this.$props)}}},getPropsConfig:function(a){var b=this;return result={config:this.config,collection:this.props,target:this.target,propTarget:this.propTarget,onChange:function(a,c,d){var e=b.build();b.model.set("value",e,d)},customValue:function(a,c){return b.valueOnIndex(c,a)}},this.model.get("detached")&&delete result.onChange,result},getDefaultValue:function(){var a="";return this.props.each(function(b,c){a+=b.get("defaults")+b.get("unit")+" "}),a.replace(/ +$/,"")},valueOnIndex:function(a,b){var c=null,d=this.getComponentValue().split(" ");if(d.length&&d[a]&&(c=d[a],b&&b.model&&b.model.get("functionName"))){var e=this.fetchFromFunction(c);e&&(c=e)}return c},build:function(a,b,c){var d="";return this.model.get("properties").each(function(a){var b=a.getValue();func=a.get("functionName"),func&&(b=func+"("+b+")"),d+=b+" "}),d.replace(/ +$/,"")}})}),c("text!StyleManager/templates/propertyStack.html",[],function(){return"
field <%= pfx %>stack\">\n \n \n
\n
"}),c("text!StyleManager/templates/layer.html",[],function(){return'
\n \n
\n
<%= label %>
\n
\n
\n
\n
\n
\n
'}),c("StyleManager/view/LayerView",["backbone","text!./../templates/layer.html"],function(a,b){return a.View.extend({events:{click:"updateIndex"},template:_.template(b),initialize:function(a){this.stackModel=a.stackModel||{},this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"layer",this.sorter=a.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.events["click #"+this.pfx+"close-layer"]="remove",this.events["mousedown > #"+this.pfx+"move"]="initSorter",this.model.get("preview")||this.$el.addClass(this.pfx+"no-preview"),this.$el.data("model",this.model),this.delegateEvents()},initSorter:function(a){this.sorter&&this.sorter.startSort(this.el)},getProps:function(){return this.stackModel.get?this.stackModel.get("properties"):null},valueChanged:function(){var a=this.model.get("preview");if(a){this.$preview||(this.$preview=this.$el.find("#"+this.pfx+"preview"));"function"==typeof a?a(this.getProps(),this.$preview):this.onPreview(this.getProps(),this.$preview)}},onPreview:function(a,b){var c=this.model.get("value").split(" "),d=3,e="";if(a.each(function(a,b){var f=c[b]||"";if(f&&"integer"==a.get("type")){var g=parseInt(f,10),h=f.replace(g,"");g=isNaN(g)?0:g,g>d&&(g=d),-d>g&&(g=-d),f=g+h}e+=f+" "}),this.stackModel.get){var f=this.stackModel.get("property");f&&(this.$preview.get(0).style[f]=e)}},showProps:function(){this.$props=this.model.get("props"),this.$el.find("#"+this.pfx+"inputs").html(this.$props.show()),this.model.set({props:null},{silent:!0})},remove:function(b){this.$props&&this.$props.detach(),b&&b.stopPropagation&&b.stopPropagation(),a.View.prototype.remove.apply(this,arguments),this.model.collection.contains(this.model)&&this.model.collection.remove(this.model),this.stackModel&&this.stackModel.set&&(this.stackModel.set({stackIndex:null},{silent:!0}),this.stackModel.trigger("updateValue"))},updateIndex:function(a){var b=this.getIndex();this.stackModel.set("stackIndex",b),this.model.collection&&this.model.collection.trigger("deselectAll"),this.$el.addClass(this.pfx+"active")},getIndex:function(){var a=0;return this.model.collection&&(a=this.model.collection.indexOf(this.model)),a},render:function(){return this.$el.html(this.template({label:"Layer "+this.model.get("index"),pfx:this.pfx})),this.$el.attr("class",this.className),this.valueChanged(),this}})}),c("StyleManager/view/LayersView",["backbone","./LayerView"],function(a,b){return a.View.extend({initialize:function(a){this.config=a.config||{},this.stackModel=a.stackModel,this.preview=a.preview,this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"layers",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"deselectAll",this.deselectAll),this.listenTo(this.collection,"reset",this.render);var b=this.config.em||"",c=b?b.get("Utils"):"";this.sorter=c?new c.Sorter({container:this.el,containerSel:"."+this.pfx+"layers",itemSel:"."+this.pfx+"layer",pfx:this.config.pStylePrefix}):"",this.$el.data("collection",this.collection)},addTo:function(a){var b=this.collection.indexOf(a);this.addToCollection(a,null,b)},addToCollection:function(a,c,d){var e=c||null,f=b;"undefined"!=typeof this.preview&&a.set("preview",this.preview);var g=new f({model:a,stackModel:this.stackModel,config:this.config,sorter:this.sorter}),h=g.render().el;if(e)e.appendChild(h);else if("undefined"!=typeof d){var i="before";this.$el.children().length==d&&(d--,i="after"),0>d?this.$el.append(h):this.$el.children().eq(d)[i](h)}else this.$el.append(h);return h},deselectAll:function(){this.$el.find("."+this.pfx+"layer").removeClass(this.pfx+"active")},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addToCollection(b,a)},this),this.$el.append(a),this.$el.attr("class",this.className),this.sorter&&(this.sorter.plh=null),this}})}),c("StyleManager/view/PropertyStackView",["backbone","./PropertyCompositeView","text!./../templates/propertyStack.html","./../model/Layers","./LayersView"],function(a,b,c,d,e){return b.extend({template:_.template(c),initialize:function(a){b.prototype.initialize.apply(this,arguments),this.model.set("stackIndex",null),this.className=this.pfx+"property "+this.pfx+"stack",this.events["click #"+this.pfx+"add"]="addLayer",this.listenTo(this.model,"change:stackIndex",this.indexChanged),this.listenTo(this.model,"updateValue",this.valueUpdated),this.delegateEvents()},targetUpdated:function(){this.model.get("detached")?this.refreshLayers():b.prototype.targetUpdated.apply(this,arguments)},getLayers:function(){return this.model.get("layers")},indexChanged:function(a){var b=this.getLayers().at(this.model.get("stackIndex"));b.set("props",this.$props),this.model.get("properties").each(function(a){a.trigger("targetUpdated")})},getStackValues:function(){return this.getLayers().pluck("value")},getPropsConfig:function(a){var c=this,d=b.prototype.getPropsConfig.apply(this,arguments);return d.onChange=function(a,b,d){var e=b.model,f=c.build();if(c.model.get("detached")){var g="";e.collection.indexOf(e);c.getLayers().each(function(a){var b=a.get("values")[e.get("property")];b&&(g+=(g?",":"")+b)}),b.updateTargetStyle(g,null,d)}else c.model.set("value",f,d)},d},valueOnIndex:function(a,b){var c=null;if(this.model.get("detached")){var d=b.componentValue.split(",");c=d[this.model.get("stackIndex")],c=c?c.trim():c}else{var e=this.getStackValues(),f=e[this.model.get("stackIndex")];if(!f)return;var g=f.split(" ");g.length&&g[a]&&(c=g[a])}return c},build:function(){var a=this.model.get("stackIndex");if(null!==a){var c=b.prototype.build.apply(this,arguments),d=this.getLayers().at(a);if(d){var e={};return this.model.get("properties").each(function(a){var b=a.getValue(),c=a.get("functionName");c&&(b=c+"("+b+")"),e[a.get("property")]=b}),d.set("values",e),d.set("value",c),this.createValue()}}},addLayer:function(a){if(this.getTarget()){var b=this.getLayers(),c=b.add({name:"test"}),d=b.indexOf(c);return c.set("value",this.getDefaultValue()),this.valueUpdated(),this.model.set("stackIndex",d),c}},valueUpdated:function(){this.model.get("detached")?this.model.get("properties").each(function(a){a.trigger("change:value")}):this.model.set("value",this.createValue())},createValue:function(){return this.getStackValues().join(", ")},renderLayers:function(){return this.$field||(this.$field=this.$el.find("> ."+this.pfx+"field")),this.$layers||(this.$layers=new e({collection:this.getLayers(),stackModel:this.model,preview:this.model.get("preview"),config:this.config})),this.$field.append(this.$layers.render().el),this.$props.hide(),this},renderInput:function(){b.prototype.renderInput.apply(this,arguments),this.refreshLayers()},getLayersFromTarget:function(){var a=[],b=this.getTarget();if(!b)return a;var c=b.get("style");return this.model.get("properties").each(function(b){var d=c[b.get("property")];if(d)for(var e=d.split(","),f=0,g=e.length;g>f;f++){var h=e[f].trim();if(a[f])a[f][b.get("property")]=h;else{var i={};i[b.get("property")]=h,a[f]=i}}}),a},refreshLayers:function(){var a=[],b=[],c="value";if(this.model.get("detached"))c="values",b=this.getLayersFromTarget();else{var d=this.getComponentValue();d&&(d.replace(/\(([\w\s,.]*)\)/g,function(a){var b=a.replace(/,\s*/g,",");d=d.replace(a,b)}),b=d.split(", "))}_.each(b,function(b){var d={};d[c]=b,a.push(d)},this),this.$props.detach();var e=this.getLayers();e.reset(),e.add(a),this.model.get("detached")||this.valueUpdated(),this.model.set({stackIndex:null},{silent:!0})},render:function(){return this.renderLabel(),this.renderField(),this.renderLayers(),this.$el.attr("class",this.className),this}})}),c("StyleManager/view/PropertiesView",["backbone","./PropertyView","./PropertyIntegerView","./PropertyRadioView","./PropertySelectView","./PropertyColorView","./PropertyFileView","./PropertyCompositeView","./PropertyStackView"],function(a,b,c,d,e,f,g,h,i){return a.View.extend({initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.target=a.target||{},this.propTarget=a.propTarget||{},this.onChange=a.onChange||{},this.onInputRender=a.onInputRender||{},this.customValue=a.customValue||{}},render:function(){var a=document.createDocumentFragment();return this.collection.each(function(j){var k=b;switch(j.get("type")){case"integer":k=c;break;case"radio":k=d;break;case"select":k=e;break;case"color":k=f;break;case"file":k=g;break;case"composite":k=h;break;case"stack":k=i}var l=new k({model:j,name:j.get("name"),id:this.pfx+j.get("property"),target:this.target,propTarget:this.propTarget,onChange:this.onChange,onInputRender:this.onInputRender,config:this.config});"composite"!=j.get("type")&&(l.customValue=this.customValue),a.appendChild(l.render().el)},this),this.$el.append(a),this.$el.append($("
",{"class":"clear"})),this.$el.attr("class",this.pfx+"properties"),this}})}),c("text!StyleManager/templates/sector.html",[],function(){return'
\n \n <%= label %>\n
'}),c("StyleManager/view/SectorView",["backbone","./PropertiesView","text!./../templates/sector.html"],function(a,b,c){return a.View.extend({template:_.template(c),events:{},initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.target=a.target||{},this.propTarget=a.propTarget||{},this.open=this.model.get("open"),this.caretR="fa-caret-right",this.caretD="fa-caret-down",this.listenTo(this.model,"change:open",this.updateOpen),this.events["click ."+this.pfx+"title"]="toggle",this.delegateEvents()},updateOpen:function(){this.model.get("open")?this.show():this.hide()},show:function(){this.$el.addClass(this.pfx+"open"),this.$el.find("."+this.pfx+"properties").show(),this.$caret.removeClass(this.caretR).addClass(this.caretD)},hide:function(){this.$el.removeClass(this.pfx+"open"),this.$el.find("."+this.pfx+"properties").hide(),this.$caret.removeClass(this.caretD).addClass(this.caretR)},toggle:function(){var a=this.model.get("open")?0:1;this.model.set("open",a)},render:function(){return this.$el.html(this.template({pfx:this.pfx,label:this.model.get("name")})),this.$caret=this.$el.find("#"+this.pfx+"caret"),this.renderProperties(),this.$el.attr("class",this.pfx+"sector no-select"),this.updateOpen(),this},renderProperties:function(){var a=this.model.get("properties");if(a){var c=new b({collection:a,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(c.render().el)}}})}),c("StyleManager/view/SectorsView",["backbone","./SectorView"],function(a,b){return a.View.extend({initialize:function(b){this.config=b.config||{},this.pfx=this.config.stylePrefix||"",this.target=b.target||{},this.propTarget={},_.extend(this.propTarget,a.Events),this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.listenTo(this.target,"change:selectedComponent targetClassAdded targetClassRemoved targetClassUpdated targetStateUpdated change:device",this.targetUpdated)},addTo:function(a){this.addToCollection(a)},targetUpdated:function(){var a=this.target.get("selectedComponent");if(a){var b=a.get("classes"),c=a.get("state"),d=this.propTarget,e=this.target.getDeviceModel(),f=e?e.get("width"):"";if(d.helper=null,b.length){var g=this.target.get("CssComposer"),h=_.filter(b.models,function(a){return a.get("active")}),i=g.get(h,c,f);if(i?1==b.length&&a.set("style",{}):(i=g.add(h,c,f),i.set("style",a.get("style")),a.set("style",{})),c){var j=this.target.get("SelectorManager"),k=j.add("hc-state"),l=g.get([k]);l?(g.getAll().remove(l),g.getAll().add(l)):l=g.add([k]),l.set("style",i.get("style")),d.helper=l}return d.model=i,void d.trigger("update")}d.model=a,d.trigger("update")}},addToCollection:function(a,c){var d=c||null,e=b,f=new e({model:a,id:this.pfx+a.get("name").replace(" ","_").toLowerCase(),name:a.get("name"),properties:a.get("properties"),target:this.target,propTarget:this.propTarget,config:this.config}),g=f.render().el;return d?d.appendChild(g):this.$el.append(g), -g},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addToCollection(b,a)},this),this.$el.attr("id",this.pfx+"sectors"),this.$el.append(a),this}})}),c("StyleManager/main",["require","./config/config","./model/Sectors","./view/SectorsView"],function(a){return function(){var b,c,d={},e=a("./config/config"),f=a("./model/Sectors"),g=a("./view/SectorsView");return{name:"StyleManager",init:function(a){d=a||{};for(var h in e)h in d||(d[h]=e[h]);var i=d.pStylePrefix;return i&&(d.stylePrefix=i+d.stylePrefix),b=new f(d.sectors),c=new g({collection:b,target:d.em,config:d}),this},addSector:function(a,c){var d=this.getSector(a);return d||(c.id=a,d=b.add(c)),d},getSector:function(a){var c=b.where({id:a});return c.length?c[0]:null},getSectors:function(){return b},addProperty:function(a,b){var c=null,d=this.getSector(a);return d&&(c=d.get("properties").add(b)),c},getProperty:function(a,b){var c=null,d=this.getSector(a);return d&&(c=d.get("properties").where({property:b}),c=1==c.length?c[0]:c),c},getProperties:function(a){var b=null,c=this.getSector(a);return c&&(b=c.get("properties")),b},render:function(){return c.render().el}}}}),c("StyleManager",["StyleManager/main"],function(a){return a}),c("AssetManager/model/Asset",["backbone"],function(a){return a.Model.extend({idAttribute:"src",defaults:{type:"",src:""},getFilename:function(){return this.get("src").split("/").pop()},getExtension:function(){return this.getFilename().split(".").pop()}})}),c("AssetManager/model/AssetImage",["backbone","./Asset"],function(a,b){return b.extend({defaults:_.extend({},b.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})}),c("AssetManager/model/Assets",["backbone","./Asset","./AssetImage"],function(a,b,c){return a.Collection.extend({model:c,initialize:function(a,b){this.model=function(a,b){var d;switch(a.type){default:d=new c(a,b)}return d}},addImg:function(a,b){return this.add({type:"image",src:a},b),this},add:function(b,c){var d=[];b=b instanceof Array?b:[b];for(var e=0,f=b.length;f>e;e++){var g=b[e];if("string"==typeof g&&(g={src:g,type:"image"}),g&&g.src){var h=this.where({src:g.src});h.length||d.push(g)}}return 1==d.length&&(d=d[0]),a.Collection.prototype.add.apply(this,[d,c])}})}),c("AssetManager/view/AssetView",["backbone"],function(a){return a.View.extend({initialize:function(a){this.options=a,this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.className=this.pfx+"asset",this.listenTo(this.model,"destroy remove",this.remove)}})}),c("text!AssetManager/template/assetImage.html",[],function(){return'
\n
\n
\n
\n
\n
<%= name %>
\n
<%= dim %>
\n
\n
\n
'}),c("AssetManager/view/AssetImageView",["./AssetView","text!./../template/assetImage.html"],function(a,b){return a.extend({events:{click:"selected",dblclick:"chosen"},template:_.template(b),initialize:function(b){a.prototype.initialize.apply(this,arguments),this.className+=" "+this.pfx+"asset-image",this.events["click #"+this.pfx+"close"]="removeItem",this.delegateEvents()},selected:function(){this.model.collection.trigger("deselectAll"),this.$el.addClass(this.pfx+"highlight"),this.updateTarget(this.model.get("src"))},chosen:function(){this.updateTarget(this.model.get("src"));var a=this.model.collection.onSelect;a&&"function"==typeof a&&a(this.model)},updateTarget:function(a){var b=this.model.collection.target;if(b&&b.set){var c=_.clone(b.get("attributes"));b.set("attributes",c),b.set("src",a)}},removeItem:function(a){a.stopPropagation(),this.model.collection.remove(this.model)},render:function(){var a=this.model.get("name"),b=this.model.get("width")&&this.model.get("height")?this.model.get("width")+" x "+this.model.get("height"):"";return a=a?a:this.model.get("src").split("/").pop(),a=a&&a.length>30?a.substring(0,30)+"...":a,b=b?b+(this.model.get("unitDim")?this.model.get("unitDim"):" px"):"",this.$el.html(this.template({name:a,src:this.model.get("src"),dim:b,pfx:this.pfx,ppfx:this.ppfx})),this.$el.attr("class",this.className),this}})}),c("text!AssetManager/template/fileUploader.html",[],function(){return'
\n
<%= title %>
\n multiple/>\n
\n
'}),c("AssetManager/view/FileUploader",["backbone","text!./../template/fileUploader.html"],function(a,b){return a.View.extend({template:_.template(b),events:{},initialize:function(a){this.options=a||{},this.config=a.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",this.delegateEvents()},uploadFile:function(a){for(var b=a.dataTransfer?a.dataTransfer.files:a.target.files,c=new FormData,d=0;d\n
\n
\n \n \n
\n
\n \n
\n
\n
\n
'}),c("AssetManager/view/AssetsView",["backbone","./AssetView","./AssetImageView","./FileUploader","text!./../template/assets.html"],function(a,b,c,d,e){return a.View.extend({template:_.template(e),initialize:function(a){this.options=a,this.config=a.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(a){a.preventDefault();var b=this.getInputUrl(),c=b.value.trim();return c?(this.collection.addImg(c,{at:0}),this.getAssetsEl().scrollTop=0,b.value="",this):void 0},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(a){this.addAsset(a)},addAsset:function(a,d){var e=d||null,f=b;a.get("type").indexOf("image")>-1&&(f=c);var g=new f({model:a,config:this.config}),h=g.render().el;if(e)e.appendChild(h);else{var i=this.getAssetsEl();i&&i.insertBefore(h,i.firstChild)}return h},deselectAll:function(){this.$el.find("."+this.pfx+"highlight").removeClass(this.pfx+"highlight")},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addAsset(b,a)},this),this.$el.html(this.template({pfx:this.pfx,ppfx:this.ppfx})),this.$el.find("."+this.pfx+"assets").append(a),this}})}),c("AssetManager/config/config",[],function(){return{assets:[],stylePrefix:"am-",upload:"http://localhost/assets/upload",uploadText:"Drop files here or click to upload"}}),c("AssetManager/main",["require","./model/Assets","./view/AssetsView","./view/FileUploader","./config/config"],function(a){return function(){var b,c,d,e={},f=a("./model/Assets"),g=a("./view/AssetsView"),h=a("./view/FileUploader");return{name:"AssetManager",storageKey:"assets",init:function(i){e=i||{};var j=a("./config/config");for(var k in j)k in e||(e[k]=j[k]);var l=e.pStylePrefix;l&&(e.stylePrefix=l+e.stylePrefix),b=new f(e.assets);var m={collection:b,config:e};return c=new g(m),d=new h(m),this},add:function(a){return b.add(a)},get:function(a){return b.where({src:a})[0]},getAll:function(){return b},remove:function(a){var b=this.get(a);return this.getAll().remove(b),this},store:function(a){var b={},c=JSON.stringify(this.getAll().toJSON());return b[this.storageKey]=c,!a&&e.stm&&e.stm.store(b),b},load:function(a){var b=a||"",c=this.storageKey;!b&&e.stm&&(b=e.stm.load(c));var d=[];try{d=JSON.parse(b[c])}catch(f){}return this.getAll().add(d),d},render:function(a){return(!this.rendered||a)&&(this.rendered=c.render().$el.add(d.render().$el)),this.rendered},setTarget:function(a){c.collection.target=a},onSelect:function(a){c.collection.onSelect=a}}}}),c("AssetManager",["AssetManager/main"],function(a){return a}),c("CssComposer/config/config",[],function(){return{stylePrefix:"css-",staticRules:"",rules:[]}}),c("CssComposer/model/Selectors",["backbone","require"],function(a,b){return a.Collection.extend({initialize:function(a,c){this.model=function(a,c){var d;return this.ClassTag||(this.ClassTag=b("SelectorManager/model/Selector")),d=new this.ClassTag(a,c)}}})}),c("CssComposer/model/CssRule",["backbone","./Selectors"],function(a,b){return a.Model.extend({defaults:{selectors:{},style:{},maxWidth:"",state:"",stylable:!0},initialize:function(a,c){if(this.config=a||{},this.sm=c?c.sm||{}:{},this.slct=this.config.selectors||[],this.sm.get){for(var d=[],e=0;e=0&&(c.css=d.em.getCss()),e.indexOf("style")>=0&&(c.styles=JSON.stringify(b)),a||d.stm.store(c),c}},add:function(a,c,d){var e=c||"",g=d||"",h=this.get(a,e,g);return h?h:(h=new f({state:e,maxWidth:g}),h.get("selectors").add(a),b.add(h),h)},get:function(a,c,d){var e=null;return b.each(function(b){e||b.compare(a,c,d)&&(e=b)}),e},getAll:function(){return b},render:function(){return c.render().el}}}}),c("CssComposer",["CssComposer/main"],function(a){return a}),c("DomComponents/config/config",[],function(){return{stylePrefix:"comp-",wrapperId:"wrapper",wrapper:{removable:!1,copyable:!1,stylable:["background","background-color","background-image","background-repeat","background-attachment","background-position"],draggable:!1,badgable:!1,components:[]},components:[],rte:{},imageCompClass:"fa fa-picture-o",oAssetsOnCreate:!0,voidElements:["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]}}),c("DomComponents/model/Components",["backbone","require"],function(a,b){return a.Collection.extend({initialize:function(a,c){this.on("add",this.onAdd),this.config=c&&c.config?c.config:null,c&&c.sm&&(this.editor=c.sm),this.model=function(a,d){var e;switch(!d.sm&&c&&c.sm&&(d.sm=c.sm),c&&c.config&&(d.config=c.config),a.type){case"text":this.mComponentText||(this.mComponentText=b("./ComponentText")),e=new this.mComponentText(a,d);break;case"image":this.mComponentImage||(this.mComponentImage=b("./ComponentImage")),e=new this.mComponentImage(a,d);break;default:this.mComponent||(this.mComponent=b("./Component")),e=new this.mComponent(a,d)}return e}},add:function(b,c){if("string"==typeof b){var d=this.editor.get("Parser").parseHtml(b);b=d.html;var e=this.editor.get("CssComposer");d.css&&e&&e.getAll().add(d.css)}return a.Collection.prototype.add.apply(this,[b,c])},onAdd:function(a,b,c){var d=a.get("style");if(!_.isEmpty(d)&&this.editor){var e=this.editor.get("CssComposer"),f=this.editor.get("SelectorManager").add(a.cid);a.set({style:{}}),a.get("classes").add(f);var g=e.add(f);g.set("style",d)}}})}),c("DomComponents/model/Component",["backbone","./Components","SelectorManager/model/Selectors"],function(a,b,c){return a.Model.extend({defaults:{tagName:"div",type:"",editable:!1,removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,copyable:!0,"void":!1,state:"",status:"",previousModel:"",content:"",style:{},attributes:{}},initialize:function(a,d){d&&d.config&&d.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.sm=d?d.sm||{}:{},this.config=a||{},this.defaultC=this.config.components||[],this.defaultCl=this.normalizeClasses(this.config.classes||[]),this.components=new b(this.defaultC,d),this.set("components",this.components),this.set("classes",new c(this.defaultCl))},normalizeClasses:function(a){var b=[];if(this.sm.get){var c=this.sm.get("SelectorManager");if(c)return a.forEach(function(a){var d="";d="string"==typeof a?a:a.name;var e=c.add(d);b.push(e)}),b}},clone:function(){var a=_.clone(this.attributes),b=this.get("components"),c=this.get("classes");return a.components=[],a.classes=[],b.length&&b.each(function(b,c){a.components[c]=b.clone()}),c.length&&c.each(function(b,c){a.classes[c]=b.get("name")}),a.status="",new this.constructor(a,{sm:this.sm})},getName:function(){if(!this.name){var a=this.cid.replace(/\D/g,""),b=this.get("type"),c=this.get("tagName");c="div"==c?"box":c,c=b?b:c,this.name=c.charAt(0).toUpperCase()+c.slice(1)+" "+a}return this.name}})}),c("DomComponents/model/ComponentText",["./Component"],function(a){return a.extend({defaults:_.extend({},a.prototype.defaults,{content:"",droppable:!1})})}),c("DomComponents/model/ComponentImage",["./Component"],function(a){return a.extend({defaults:_.extend({},a.prototype.defaults,{src:"",droppable:!1})})}),c("DomComponents/view/ComponentsView",["backbone","require"],function(a,b){return a.View.extend({initialize:function(a){this.config=a.config,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render)},addTo:function(a){var b=this.collection.indexOf(a);this.addToCollection(a,null,b)},addToCollection:function(a,c,d){this.compView||(this.compView=b("./ComponentView"));var e=c||null,f=this.compView;switch(a.get("type")){case"text":this.compViewText||(this.compViewText=b("./ComponentTextView")),f=this.compViewText;break;case"image":this.compViewImage||(this.compViewImage=b("./ComponentImageView")),f=this.compViewImage}var g=new f({model:a,config:this.config}),h=g.render().el;if(e)e.appendChild(h);else{var i=this.$parent;if("undefined"!=typeof d){var j="before";i.children().length==d&&(d--,j="after"),0>d?i.append(h):i.children().eq(d)[j](h)}else i.append(h)}return h},render:function(a){var b=document.createDocumentFragment();return this.$parent=a||this.$el,this.$el.empty(),this.collection.each(function(a){this.addToCollection(a,b)},this),this.$el.append(b),this}})}),c("DomComponents/view/ComponentView",["backbone","./ComponentsView"],function(a,b){return a.View.extend({className:function(){return this.getClasses()},tagName:function(){return this.model.get("tagName")},initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.components=this.model.get("components"),this.attr=this.model.get("attributes"),this.classe=this.attr["class"]||[],this.listenTo(this.model,"destroy remove",this.remove),this.listenTo(this.model,"change:style",this.updateStyle),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:status",this.updateStatus),this.listenTo(this.model,"change:state",this.updateState),this.listenTo(this.model.get("classes"),"add remove change",this.updateClasses),this.$el.data("model",this.model),this.$el.data("collection",this.components),this.model.get("classes").length&&this.importClasses()},importClasses:function(){var a=this.config.em.get("SelectorManager");a&&this.model.get("classes").each(function(b){a.add(b.get("name"))})},updateState:function(a){var b="hc-state",c=this.model.get("state");c?this.$el.addClass(b):this.$el.removeClass(b)},updateStatus:function(a){var b=this.model.get("status"),c=this.pfx;switch(b){case"selected":this.$el.addClass(c+"selected");break;case"moving":break;default:this.$el.removeClass(c+"selected")}},getClasses:function(){var a=this.model.get("attributes"),b=a["class"]||[];return b.length?b.join(" "):null},updateAttributes:function(){var a={},b=this.model.get("attributes");for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);this.model.get("src")&&(a.src=this.model.get("src"));var d=this.getStyleString();d&&(a.style=d),this.$el.attr(a)},updateStyle:function(){this.$el.attr("style",this.getStyleString())},getStyleString:function(){var a="";this.style=this.model.get("style");for(var b in this.style)this.style.hasOwnProperty(b)&&(a+=b+":"+this.style[b]+";");return a},updateClasses:function(){var a="";this.model.get("classes").each(function(b){a+=b.get("name")+" "}),a=a.trim(),a?this.$el.attr("class",a):this.$el.removeAttr("class"),this.updateStatus()},eventCall:function(a){a.viewResponse=this},render:function(){this.updateAttributes(),this.updateClasses(),this.$el.html(this.model.get("content"));var a=new b({collection:this.components,config:this.config});return this.$el.append(a.render(this.$el).el.childNodes),this}})}),c("DomComponents/view/ComponentImageView",["backbone","./ComponentView"],function(a,b){return b.extend({tagName:"img",events:{dblclick:"openModal"},initialize:function(a){b.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 a=this.model.get("src");this.$el.attr("src",a),a?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(a){var b=this;this.modal&&this.am&&(this.modal.setTitle("Select image"),this.modal.setContent(this.am.render(1)),this.am.setTarget(this.model),this.modal.open(),this.am.onSelect(function(){b.modal.close(),b.am.setTarget(null)}))},render:function(){return this.updateAttributes(),this.updateClasses(),this.model.get("src")||this.$el.attr("class",this.classEmpty),this.$el.attr("onmousedown","return false"),this}})}),c("DomComponents/view/ComponentTextView",["backbone","./ComponentView"],function(a,b){return b.extend({events:{dblclick:"enableEditing"},initialize:function(a){b.prototype.initialize.apply(this,arguments),_.bindAll(this,"disableEditing"),this.listenTo(this.model,"focus active",this.enableEditing),this.rte=this.config.rte||""},enableEditing:function(a){this.rte&&this.rte.attach(this),this.toggleEvents(1)},disableEditing:function(a){this.rte&&this.rte.detach(this),this.toggleEvents(),this.updateContents()},disablePropagation:function(a){a.stopPropagation()},updateContents:function(){this.model.set("content",this.el.innerHTML)},toggleEvents:function(a){var b=a?"on":"off",c=[this.el.ownerDocument,document,this.rte];$(c)[b]("mousedown",this.disableEditing),this.$el[b]("mousedown",this.disablePropagation)},render:function(){return this.updateAttributes(),this.updateClasses(),this.el.innerHTML=this.model.get("content"),this}})}),c("DomComponents/main",["require","./config/config","./model/Component","./model/ComponentText","./model/ComponentImage","./view/ComponentView","./view/ComponentImageView","./view/ComponentTextView"],function(a){return function(){var b,c,d={},e=a("./config/config"),f=a("./model/Component"),g=(a("./model/ComponentText"),a("./model/ComponentImage"),a("./view/ComponentView"));a("./view/ComponentImageView"),a("./view/ComponentTextView");return{name:"DomComponents",storageKey:function(){var a=[],b=d.stm&&d.stm.getConfig()||{};return b.storeHtml&&a.push("html"),b.storeComponents&&a.push("components"),a},init:function(a){d=a||{},d.em&&(d.components=d.em.config.components||d.components);for(var h in e)h in d||(d[h]=e[h]);var i=d.pStylePrefix;return i&&(d.stylePrefix=i+d.stylePrefix),d.em&&(d.rte=d.em.get("rte")||"",d.modal=d.em.get("Modal")||"",d.am=d.em.get("AssetManager")||""),b=new f(d.wrapper,{sm:d.em,config:d}),b.set({attributes:{id:"wrapper"}}),b.get("components").add(d.components),c=new g({model:b,config:d}),this},onLoad:function(){d.stm&&d.stm.getConfig().autoload&&this.load(),d.stm&&d.stm.isAutosave()&&(d.em.initUndoManager(),d.em.initChildrenComp(this.getWrapper()))},load:function(a){var b=a||"";!b&&d.stm&&(b=d.em.getCacheLoad());var c="";if(b.components)try{c=JSON.parse(b.components)}catch(e){}else b.html&&(c=b.html);return c&&this.getComponents().reset(c),c},store:function(a){if(d.stm){var b={},c=this.storageKey();return c.indexOf("html")>=0&&(b.html=d.em.getHtml()),c.indexOf("components")>=0&&(b.components=JSON.stringify(d.em.getComponents())),a||d.stm.store(b),b}},getComponent:function(){return b},getWrapper:function(){return this.getComponent()},getComponents:function(){return this.getWrapper().get("components")},addComponent:function(a){return this.getComponents().add(a)},render:function(){return c.render().el},clear:function(){for(var a=this.getComponents(),b=0,c=a.length;c>b;b++)a.pop();return this},setComponents:function(a){this.clear().addComponent(a)}}}}),c("DomComponents",["DomComponents/main"],function(a){return a}),c("Canvas/config/config",[],function(){return{stylePrefix:"cv-",rulers:!1}}),c("Canvas/model/Frame",["backbone"],function(a){return a.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})}),c("Canvas/model/Canvas",["backbone","./Frame"],function(a,b){return a.Model.extend({defaults:{frame:"",wrapper:"",rulers:!1},initialize:function(a){var c=this.conf||{};this.set("frame",new b(c.frame))}})}),c("Canvas/view/FrameView",["backbone"],function(a){return a.View.extend({tagName:"iframe",attributes:{src:"about:blank"},initialize:function(a){_.bindAll(this,"udpateOffset"),this.config=a.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.motionsEv="transitionend oTransitionEnd transitionend webkitTransitionEnd",this.listenTo(this.em,"change:device",this.updateWidth)},updateWidth:function(a){var b=this.em.getDeviceModel();this.el.style.width=b?b.get("width"):"",this.udpateOffset(),this.$el.on(this.motionsEv,this.udpateOffset)},udpateOffset:function(){var a=this.em.get("Canvas").getOffset();this.em.set("canvasOffset",a),this.$el.off(this.motionsEv,this.udpateOffset)},getBody:function(){this.$el.contents().find("body")},getWrapper:function(){return this.$el.contents().find("body > div")},render:function(){return this.$el.attr({"class":this.ppfx+"frame"}),this}})}),c("Canvas/view/CanvasView",["backbone","./FrameView"],function(a,b){return a.View.extend({initialize:function(a){_.bindAll(this,"renderBody","onFrameScroll"),this.config=a.config||{},this.em=this.config.em||{},this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"canvas",this.frame=new b({model:this.model.get("frame"),config:this.config})},onFrameScroll:function(){var a="px",b=this.frame.el.contentDocument.body;this.toolsEl.style.top="-"+b.scrollTop+a,this.toolsEl.style.left="-"+b.scrollLeft+a},renderBody:function(){var a=this.model.get("frame").get("wrapper");if(a){var b=this.frame.$el.contents().find("body"),c=this.config.em.get("CssComposer"),d=this.config.em.get("Config");b.append(a.render()).append(c.render());var e=d.protectedCss,f="."+this.ppfx+"dashed *{outline: 1px dashed rgba(170,170,170,0.7); outline-offset: -2px}."+this.ppfx+"comp-selected{outline: 3px solid #3b97e3 !important}."+this.ppfx+"no-select{user-select: none; -webkit-user-select:none; -moz-user-select: none}."+this.ppfx+"freezed{opacity: 0.5; pointer-events: none}."+this.ppfx+"plh-image{background:#f5f5f5; border:none; height:50px; width:50px; display:block; outline:3px solid #ffca6f; cursor:pointer}";e&&b.append(""),this.config.em.trigger("loaded"),this.frame.el.contentWindow.onscroll=this.onFrameScroll,this.frame.udpateOffset();var g=document,h=this.frame.el.contentDocument;h.addEventListener("keydown",function(a){g.dispatchEvent(new KeyboardEvent(a.type,a))}),h.addEventListener("keyup",function(a){g.dispatchEvent(new KeyboardEvent(a.type,a))})}},offset:function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument.body;return{top:b.top+c.scrollTop,left:b.left+c.scrollLeft}},getElementPos:function(a){this.frmOff||(this.frmOff=this.offset(this.frame.el)),this.cvsOff||(this.cvsOff=this.offset(this.el));var b=this.offset(a),c=b.top+this.frmOff.top-this.cvsOff.top,d=b.left+this.frmOff.left-this.cvsOff.left;return{top:c,left:d,height:a.offsetHeight,width:a.offsetWidth}},render:function(){if(this.wrapper=this.model.get("wrapper"),this.wrapper&&"function"==typeof this.wrapper.render){this.model.get("frame").set("wrapper",this.wrapper),this.$el.append(this.frame.render().el);var a=this.frame;a.el.onload=this.renderBody}this.toolsEl=$("
",{id:this.ppfx+"tools"}).get(0),this.hlEl=$("
",{"class":this.ppfx+"highlighter"}).get(0),this.badgeEl=$("
",{"class":this.ppfx+"badge"}).get(0),this.placerEl=$("
",{"class":this.ppfx+"placeholder"}).get(0),this.placerIntEl=$("
",{"class":this.ppfx+"placeholder-int"}).get(0),this.ghostEl=$("
",{"class":this.ppfx+"ghost"}).get(0),this.placerEl.appendChild(this.placerIntEl),this.toolsEl.appendChild(this.hlEl),this.toolsEl.appendChild(this.badgeEl),this.toolsEl.appendChild(this.placerEl),this.toolsEl.appendChild(this.ghostEl),this.$el.append(this.toolsEl);var b=this.em.get("rte");return b&&this.toolsEl.appendChild(b.render()),this.$el.attr({"class":this.className}),this}})}),c("Canvas/main",["require","./config/config","./model/Canvas","./view/CanvasView"],function(a){return function(){var b,c={},d=a("./config/config"),e=a("./model/Canvas"),f=a("./view/CanvasView");return{getCanvasView:function(){return f},name:"Canvas",init:function(a){c=a||{};for(var g in d)g in c||(c[g]=d[g]);var h=c.pStylePrefix;h&&(c.stylePrefix=h+c.stylePrefix),b=new e(a),f=new f({model:b,config:c});var i=c.em.get("DomComponents");return i&&this.setWrapper(i),this},setWrapper:function(a){b.set("wrapper",a)},getElement:function(){return f.el},getFrameEl:function(){return f.frame.el},getBody:function(){return f.frame.el.contentDocument.body},getWrapperEl:function(){return this.getBody().querySelector("#wrapper")},getToolsEl:function(){return f.toolsEl},getHighlighter:function(){return f.hlEl},getBadgeEl:function(){return f.badgeEl},getPlacerEl:function(){return f.placerEl},getGhostEl:function(){return f.ghostEl},render:function(){return f.render().el},getOffset:function(){var a=this.offset(this.getFrameEl()),b=this.offset(this.getElement());return{top:a.top-b.top,left:a.left-b.left}},offset:function(a){var b=a.getBoundingClientRect();return{top:b.top+document.body.scrollTop,left:b.left+document.body.scrollLeft}},getFrameWrapperEl:function(){return f.frame.getWrapper()}}}}),c("Canvas",["Canvas/main"],function(a){return a}),c("Commands/config/config",[],function(){return{ESCAPE_KEY:27,stylePrefix:"com-",defaults:[],em:null,firstCentered:!0,newFixedH:!1,minComponentH:50,minComponentW:50}}),c("Commands/view/CommandAbstract",["backbone"],function(a){return a.View.extend({initialize:function(a){this.config=a||{},this.editorModel=this.em=this.config.em||{},this.pfx=this.config.stylePrefix,this.ppfx=this.config.pStylePrefix,this.hoverClass=this.pfx+"hover",this.badgeClass=this.pfx+"badge",this.plhClass=this.pfx+"placeholder",this.freezClass=this.ppfx+"freezed",this.canvas=this.em.get&&this.em.get("Canvas"),this.em.get&&this.setElement(this.getCanvas()),this.canvas&&(this.$canvas=this.$el, -this.$wrapper=$(this.getCanvasWrapper()),this.frameEl=this.canvas.getFrameEl(),this.canvasTool=this.getCanvasTools(),this.bodyEl=this.getCanvasBody()),this.init(this.config)},onFrameScroll:function(a){},getCanvas:function(){return this.canvas.getElement()},getCanvasBody:function(){return this.canvas.getBody()},getCanvasWrapper:function(){return this.canvas.getWrapperEl()},getCanvasTools:function(){return this.canvas.getToolsEl()},offset:function(a){var b=a.getBoundingClientRect();return{top:b.top+a.ownerDocument.body.scrollTop,left:b.left+a.ownerDocument.body.scrollLeft}},init:function(a){},run:function(a,b){},stop:function(a,b){}})}),c("Commands/view/SelectComponent",[],function(){return{init:function(a){_.bindAll(this,"onHover","onOut","onClick","onKeyPress","clearOff")},enable:function(){_.bindAll(this,"copyComp","pasteComp","onFrameScroll"),this.frameOff=this.canvasOff=this.adjScroll=null;var a=this.config.em.get("Config");this.startSelectComponent(),this.toggleClipboard(a.copyPaste)},toggleClipboard:function(a){var b=a||0;b?(key("⌘+c, ctrl+c",this.copyComp),key("⌘+v, ctrl+v",this.pasteComp)):(key.unbind("⌘+c, ctrl+c"),key.unbind("⌘+v, ctrl+v"))},clearOff:function(){this.frameOff=null,this.canvasOff=null},copyComp:function(){var a=this.editorModel.get("selectedComponent");a&&a.get("copyable")&&this.editorModel.set("clipboard",a)},pasteComp:function(){var a=this.editorModel.get("clipboard"),b=this.editorModel.get("selectedComponent");if(a&&b&&b.collection){var c=b.collection.indexOf(b),d=a.clone();b.collection.add(d,{at:c+1})}},startSelectComponent:function(){this.listenTo(this.em,"change:canvasOffset",this.clearOff),this.selEl=$(this.getCanvasBody()).find("*"),this.selEl.on("mouseover",this.onHover).on("mouseout",this.onOut).on("click",this.onClick);var a=this.getContentWindow();a.on("scroll",this.onFrameScroll),a.on("keydown",this.onKeyPress)},stopSelectComponent:function(){this.stopListening(this.em,"change:canvasOffset",this.clearOff),this.selEl&&this.selEl.trigger("mouseout").off("mouseover",this.onHover).off("mouseout",this.onOut).off("click",this.onClick),this.selEl=null;var a=this.getContentWindow();a.off("scroll",this.onFrameScroll),a.off("keydown",this.onKeyPress)},onKeyPress:function(a){var b=a.which||a.keyCode,c=this.editorModel.get("selectedComponent"),d="BODY"!==this.frameEl.contentDocument.activeElement.tagName;if((8==b||46==b)&&(d||a.preventDefault(),c&&!d)){if(!c.get("removable"))return;c.set("status",""),c.destroy(),this.hideBadge(),this.clean(),this.editorModel.set("selectedComponent",null)}},onHover:function(a){a.stopPropagation();var b=a.target;this.adjScroll||(this.adjScroll=1,this.onFrameScroll(a)),this.updateBadge(b),this.updateHighlighter(b)},onOut:function(a){a.stopPropagation(),this.hideBadge(),this.hl&&this.hl.css({left:-1e4,top:-1e4})},onClick:function(a){var b=$(a.target).data("model");if(b){var c=b.get("stylable");(c instanceof Array||c)&&this.onSelect(a,a.target)}},updateHighlighter:function(a){this.hl||(this.hl=$(this.canvas.getHighlighter()));var b=this.getElementPos($(a));this.hl.css({left:b.left,top:b.topP,height:b.height,width:b.width})},onSelect:function(a,b){a.stopPropagation();var c=this.editorModel.get("selectedComponent");this.cleanPrevious(c);var d=$(b),e=d.data("model");if(e){this.editorModel.set("selectedComponent",e),e.set("status","selected");this.getElementPos(d)}},clean:function(){this.selEl&&this.selEl.removeClass(this.hoverClass)},updateBadge:function(a){var b=$(a);this.cacheEl=b;var c=b.data("model");if(c&&c.get("badgable")){var d=this.getBadge();d.innerHTML=c.getName();var e=d.style,f="px";e.display="block";var g=this.getElementPos(b,d);e.left=g.leftP+f,e.top=g.top+f}},getBadge:function(){return this.canvas.getBadgeEl()},onFrameScroll:function(a){this.cacheEl&&this.updateBadge(this.cacheEl)},getElementPos:function(a,b){this.frameOff||(this.frameOff=this.offset(this.canvas.getFrameEl())),this.canvasOff||(this.canvasOff=this.offset(this.canvas.getElement()));var c=a.offset(),d=this.getCanvasBody(),e=b?b:null,f=e?e.offsetHeight:0,g=e?e.offsetWidth:0,h=c.top+this.frameOff.top-this.canvasOff.top,i=c.left+this.frameOff.left-this.canvasOff.left,j=this.frameOff.top+d.scrollTop,k=this.frameOff.left+d.scrollLeft,l=h;h=j>h-f?j:h-f;var m=k>i+g?k-g:i;return{topP:l,leftP:m,top:h,left:i,height:a.outerHeight(),width:a.outerWidth()}},hideBadge:function(){this.getBadge().style.display="none"},cleanPrevious:function(a){a&&a.set({status:"",state:""})},getContentWindow:function(){return this.contWindow||(this.contWindow=$(this.frameEl.contentWindow)),this.contWindow},run:function(a,b){this.enable()},stop:function(){this.stopSelectComponent(),this.cleanPrevious(this.em.get("selectedComponent")),this.clean(),this.em.set("selectedComponent",null),this.toggleClipboard(),this.hideBadge()}}}),c("Commands/view/SelectPosition",[],function(){return{startSelectPosition:function(a,b){this.isPointed=!1;var c=this.editorModel.get("Utils");c&&!this.sorter&&(this.sorter=new c.Sorter({container:this.getCanvasBody(),placer:this.canvas.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,direction:"a",document:b,wmargin:1,nested:1,em:this.editorModel})),this.sorter.startSort(a)},getOffsetDim:function(){var a=this.offset(this.canvas.getFrameEl()),b=this.offset(this.canvas.getElement()),c=a.top-b.top,d=a.left-b.left;return{top:c,left:d}},stopSelectPosition:function(){this.posTargetCollection=null,this.posIndex="after"==this.posMethod&&0!==this.cDim.length?this.posIndex+1:this.posIndex,this.sorter&&(this.sorter.moved=0,this.sorter.endMove()),this.cDim&&(this.posIsLastEl=0!==this.cDim.length&&"after"==this.posMethod&&this.posIndex==this.cDim.length,this.posTargetEl=0===this.cDim.length?$(this.outsideElem):!this.posIsLastEl&&this.cDim[this.posIndex]?$(this.cDim[this.posIndex][5]).parent():$(this.outsideElem),this.posTargetModel=this.posTargetEl.data("model"),this.posTargetCollection=this.posTargetEl.data("model-comp"))},enable:function(){this.startSelectPosition()},nearFloat:function(a,b,c){var d=a||0,e=b||"before",f=c.length,g=0!==f&&"after"==e&&d==f;return 0!==f&&(!g&&!c[d][4]||c[d-1]&&!c[d-1][4]||g&&!c[d-1][4])?1:0},run:function(){this.enable()},stop:function(){this.stopSelectPosition(),this.$wrapper.css("cursor",""),this.$wrapper.unbind()}}}),c("Commands/view/CreateComponent",["backbone","./SelectPosition"],function(a,b){return _.extend({},b,{init:function(a){_.bindAll(this,"startDraw","draw","endDraw","rollback"),this.config=a||{},this.hType=this.config.newFixedH?"height":"min-height",this.allowDraw=1},enable:function(){b.enable.apply(this,arguments),this.$wr.css("cursor","crosshair"),this.allowDraw&&this.$wr.on("mousedown",this.startDraw),this.ghost=this.canvas.getGhostEl()},startDraw:function(a){a.preventDefault(),this.stopSelectPosition(),this.ghost.style.display="block",this.frameOff=this.getOffsetDim(),this.startPos={top:a.pageY+this.frameOff.top,left:a.pageX+this.frameOff.left},this.isDragged=!1,this.tempComponent={style:{}},this.beforeDraw(this.tempComponent),this.updateSize(this.startPos.top,this.startPos.left,0,0),this.toggleEvents(1)},toggleEvents:function(a){var b=a?"on":"off";this.$wr[b]("mousemove",this.draw),this.$wr[b]("mouseup",this.endDraw),this.$canvas[b]("mousemove",this.draw),$(document)[b]("mouseup",this.endDraw),$(document)[b]("keypress",this.rollback)},draw:function(a){this.isDragged=!0,this.updateComponentSize(a)},endDraw:function(a){this.toggleEvents();var b={};if(this.isDragged){this.updateComponentSize(a),this.setRequirements(this.tempComponent);var c=this.sorter.lastPos;b=this.create(this.sorter.target,this.tempComponent,c.index,c.method),this.sorter.prevTarget=null}this.ghost.style.display="none",this.startSelectPosition(),this.afterDraw(b)},create:function(a,b,c,d,e){c="after"===d?c+1:c;var f=e||{},g=$(a),h=g.data("model"),i=g.data("collection"),j=h?h.get("droppable"):1;return f.at=c,i&&j?i.add(b,f):void console.warn("Invalid target position")},setRequirements:function(a){var b=this.config,c=a.style;c.width.replace(/\D/g,"")c&&(f=c,h=d.left-c),e>b&&(e=b,g=d.top-b),this.updateSize(e,f,h,g)},updateSize:function(a,b,c,d){var e="px",f=this.ghost.style,g=this.tempComponent.style;f.top=g.top=a+e,f.left=g.left=b+e,f.width=g.width=c+e,f[this.hType]=g[this.hType]=d+e},rollback:function(a,b){var c=a.which||a.keyCode;(c==this.config.ESCAPE_KEY||b)&&(this.isDragged=!1,this.endDraw())},beforeDraw:function(a){a.editable=!1},afterDraw:function(a){},run:function(a,b,c){this.editor=a,this.sender=b,this.$wr=this.$wrapper,this.enable()},stop:function(){this.stopSelectPosition(),this.$wrapper.css("cursor",""),this.$wrapper.unbind()}})}),c("Commands/view/DeleteComponent",["backbone","./SelectComponent"],function(a,b){return _.extend({},b,{init:function(a){_.bindAll(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(a){a.stopPropagation();var b=$(a.target);b.data("model").get("removable")&&(b.addClass(this.hoverClass),this.attachBadge(b.get(0)))},stopDelete:function(a){a.stopPropagation();var b=$(a.target);b.removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(a){a.stopPropagation();var b=$(a.target);b.data("model").get("removable")&&(b.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(a){this.badge.html("Remove "+a.getName())}})}),c("Commands/view/InsertCustom",["backbone","./CreateComponent"],function(a,b){return _.extend({},b,{init:function(){b.init.apply(this,arguments),_.bindAll(this,"insertComponent"),this.allowDraw=0},run:function(a,b,c){this.em=a,this.sender=b,this.opt=c||{},this.$wr=this.$wrapper,this.enable()},enable:function(){b.enable.apply(this,arguments),this.$wr.on("click",this.insertComponent)},insertComponent:function(){this.$wr.off("click",this.insertComponent),this.stopSelectPosition();var a=this.buildContent();this.beforeInsert(a);var b=this.sorter.lastPos.index,c=this.create(this.sorter.target,a,b,null,{silent:!1});this.opt.terminateAfterInsert&&this.sender?this.sender.set("active",!1):this.enable(),c&&(this.em&&this.em.editor.initChildrenComp(c),this.afterInsert(c,this))},beforeInsert:function(a){},afterInsert:function(a){},buildContent:function(){return this.opt.content||{}}})}),c("Commands/view/ImageComponent",["backbone","./InsertCustom"],function(a,b){return _.extend({},b,{beforeInsert:function(a){a.type="image",a.style={},a.attributes={},a.attributes.onmousedown="return false",this.config.firstCentered&&this.getCanvasWrapper()==this.sorter.target&&(a.style.margin="0 auto")},afterInsert:function(a){a.trigger("dblclick"),this.sender&&this.sender.set("active",!1)}})}),c("Commands/view/MoveComponent",["backbone","./SelectComponent","./SelectPosition"],function(a,b,c){return _.extend({},c,b,{init:function(a){b.init.apply(this,arguments),_.bindAll(this,"initSorter","rollback","onEndMove"),this.opt=a,this.hoverClass=this.ppfx+"highlighter-warning",this.badgeClass=this.ppfx+"badge-warning",this.noSelClass=this.ppfx+"no-select"},enable:function(){b.enable.apply(this,arguments),this.getBadgeEl().addClass(this.badgeClass),this.getHighlighterEl().addClass(this.hoverClass);var a=this.$wrapper;a.css("cursor","move"),a.on("mousedown",this.initSorter),a.addClass(this.noSelClass)},toggleClipboard:function(){},initSorter:function(a){var b=$(a.target).data("model");b.get("draggable")&&(this.cacheEl=null,this.startSelectPosition(a.target,this.frameEl.contentDocument),this.sorter.onEndMove=this.onEndMove.bind(this),this.stopSelectComponent(),this.$wrapper.off("mousedown",this.initSorter),this.getContentWindow().on("keydown",this.rollback))},onEndMove:function(){this.enable(),this.getContentWindow().off("keydown",this.rollback)},onSelect:function(a,b){},rollback:function(a,b){var c=a.which||a.keyCode;(c==this.opt.ESCAPE_KEY||b)&&(this.sorter.moved=!1,this.sorter.endMove())},getBadgeEl:function(){return this.$badge||(this.$badge=$(this.getBadge())),this.$badge},getHighlighterEl:function(){return this.$hl||(this.$hl=$(this.canvas.getHighlighter())),this.$hl},stop:function(){b.stop.apply(this,arguments),this.getBadgeEl().removeClass(this.badgeClass),this.getHighlighterEl().removeClass(this.hoverClass);var a=this.$wrapper;a.css("cursor","").unbind().removeClass(this.noSelClass)}})}),c("Commands/view/TextComponent",["backbone","./CreateComponent"],function(a,b){return _.extend({},b,{beforeDraw:function(a){a.type="text",a.style||(a.style={}),a.style.padding="10px"},afterDraw:function(a){a&&a.set&&(a.trigger("focus"),this.sender&&this.sender.set("active",!1))}})}),c("Commands/view/ExportTemplate",[],function(){return{run:function(a,b){this.sender=b,this.components=a.DomComponents.getComponents(),this.modal=a.Modal||null,this.cm=a.CodeManager||null,this.cssc=a.CssComposer||null,this.protCss=a.Config.protectedCss,this.pfx=a.Config.stylePrefix||"",this.enable()},buildEditor:function(a,b,c){this.codeMirror||(this.codeMirror=this.cm.getViewer("CodeMirror"));var d=$("