diff --git a/public/grapejs/dist/css/grapes.min.css b/public/grapejs/dist/css/grapes.min.css index 4f8b24c2..c321b38e 100755 --- a/public/grapejs/dist/css/grapes.min.css +++ b/public/grapejs/dist/css/grapes.min.css @@ -1,4 +1,4 @@ .sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-moz-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-o-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-ms-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:linear-gradient(to right, #fff, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-o-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:linear-gradient(to top, #000, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-ms-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-o-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-webkit-gradient(linear, left top, left bottom, from(red), color-stop(0.17, #ff0), color-stop(0.33, lime), color-stop(0.5, cyan), color-stop(0.67, blue), color-stop(0.83, #f0f), to(red));background:-webkit-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:linear-gradient(to bottom, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media (max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ECECEC;border:solid 1px #f0c49B;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eeeeee;background-image:-webkit-linear-gradient(top, #eee, #ccc);background-image:-moz-linear-gradient(top, #eee, #ccc);background-image:-ms-linear-gradient(top, #eee, #ccc);background-image:-o-linear-gradient(top, #eee, #ccc);background-image:linear-gradient(to bottom, #eee, #ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#dddddd;background-image:-webkit-linear-gradient(top, #ddd, #bbb);background-image:-moz-linear-gradient(top, #ddd, #bbb);background-image:-ms-linear-gradient(top, #ddd, #bbb);background-image:-o-linear-gradient(top, #ddd, #bbb);background-image:linear-gradient(to bottom, #ddd, #bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,0.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:0.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-one-bg{background-color:#444}.gjs-one-color{color:#444}.gjs-one-color-h:hover{color:#444}.gjs-two-bg{background-color:#ddd}.gjs-two-color{color:#ddd}.gjs-two-color-h:hover{color:#ddd}.gjs-three-bg{background-color:#804f7b}.gjs-three-color{color:#804f7b}.gjs-three-color-h:hover{color:#804f7b}.gjs-four-bg{background-color:#d278c9}.gjs-four-color{color:#d278c9}.gjs-four-color-h:hover{color:#d278c9}.gjs-bg-main,.gjs-off-prv,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{color:#ddd;fill:#ddd}.gjs-color-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-layer-name,.gjs-rte-toolbar{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-layer-title,.gjs-clm-tags #gjs-clm-close{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;font-size:.75rem;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.2);font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-header{font-weight:lighter;padding:10px}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-weight:lighter}.gjs-trt-traits{font-size:.75rem}.gjs-trt-trait .gjs-label{width:30%;text-align:left;text-overflow:ellipsis;overflow:hidden}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;width:85%;height:calc(100% - 40px);bottom:0;overflow:hidden;z-index:1;position:absolute;left:0;top:40px}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;outline-offset:-1px;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{outline:medium none;height:100%;width:100%;border:none;margin:auto;display:block;transition:width 0.35s ease,height 0.35s ease;position:absolute;top:0;bottom:0;left:0;right:0}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;left:0;top:0;width:100%;height:100%;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;position:absolute;box-sizing:border-box;text-align:center;padding:5px;z-index:3}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-commands{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-options{right:15%;top:0}.gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.2);right:0;width:15%;z-index:4}.gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:space-between}.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;padding:5px;position:relative;cursor:pointer}.gjs-pn-btn.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field-integer input{padding-right:30px}.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-fields option,.gjs-sm-unit option{background-color:#444;color:#ddd}.gjs-field{background-color:rgba(0,0,0,0.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative}.gjs-field textarea{resize:vertical}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color,.gjs-field-radio{width:100%}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px;position:absolute;top:0}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{flex:1 1 auto;text-align:center;border-left:1px solid rgba(0,0,0,0.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-items{display:flex}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{color:inherit;background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:3px}.gjs-devices-c .gjs-device-label{flex-grow:2;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-layer-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{line-height:0;cursor:pointer}.gjs-sm-header{font-weight:lighter;padding:10px}.gjs-sm-properties{font-size:.75rem;padding:10px 5px;display:flex;flex-wrap:wrap;align-items:flex-end;box-sizing:border-box;width:100%}.gjs-sm-label{margin:5px 5px 3px 0}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.2),1px 1px 0 rgba(43,43,43,0.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 20px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{top:-5px;display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding:5px 0 0}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;outline:none;font-size:22px;line-height:10px;position:absolute;right:0;top:-17px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-categories{display:flex;flex-direction:column}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-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;min-height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;text-align:center;display:flex;flex-direction:column;justify-content:space-between;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:54px;fill:currentColor}.gjs-block-svg-path{fill:currentColor}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif;overflow:hidden;text-overflow:ellipsis}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-selected-parent{border:1px solid #ffca6f}.gjs-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layer{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1);font-size:.75rem}.gjs-layer-hidden{opacity:.55;filter:alpha(opacity=55)}.gjs-layer-count{position:absolute;right:27px;top:9px}.gjs-layer-vis{height:auto !important;width:auto !important;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-layer-caret{font-size:0.5rem;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-layer-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-layer-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-layer-title-inn{position:relative}.gjs-layer-name{padding:5px;display:inline-block;box-sizing:content-box}.gjs-layer>.gjs-layer-children{display:none}.gjs-layer.open>.gjs-layer-children{display:block}.gjs-layer-no-chld>.gjs-layer-title-inn>.gjs-layer-caret{display:none}.gjs-layer-move{padding:7px 10px 7px 5px;position:absolute;font-size:12px;cursor:move;right:0;top:0}.gjs-layer.gjs-hovered .gjs-layer-title{background-color:rgba(255,255,255,0.015)}.gjs-layer.gjs-selected .gjs-layer-title{background-color:rgba(255,255,255,0.1)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-placeholder{width:100%;position:absolute}.gjs-layers #gjs-placeholder #gjs-plh-int{height:100%;padding:1px}.gjs-layers #gjs-placeholder #gjs-plh-int.gjs-insert{background-color:#62c462}.gjs-clm-tags{font-size:.75rem;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:5px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{padding:0 3px;cursor:text}.gjs-mdl-backlayer{opacity:.5;filter:alpha(opacity=50);background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-title{font-size:1rem}.gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.2);padding:15px 15px 7px}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.2);font-size:12px;padding:5px 10px 3px;text-align:right}.gjs-rte-toolbar{border:1px solid rgba(0,0,0,0.2);position:absolute;border-radius:3px;z-index:10}.gjs-rte-actionbar{display:flex}.gjs-rte-action{display:flex;align-items:center;justify-content:center;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.2);text-align:center;cursor:pointer;outline:none}.gjs-rte-action:last-child{border-right:none}.gjs-rte-action:hover{background-color:rgba(255,255,255,0.1)}.gjs-rte-active{background-color:rgba(0,0,0,0.2)}.gjs-editor-cont .sp-hue,.gjs-editor-cont .sp-slider{cursor:row-resize}.gjs-editor-cont .sp-color,.gjs-editor-cont .sp-dragger{cursor:crosshair}.gjs-editor-cont .sp-alpha-inner,.gjs-editor-cont .sp-alpha-handle{cursor:col-resize}.gjs-editor-cont .sp-hue{left:90%}.gjs-editor-cont .sp-color{right:15%}.gjs-editor-cont .sp-container{border:1px solid rgba(0,0,0,0.2);box-shadow:0 0 7px rgba(0,0,0,0.2);border-radius:3px}.gjs-editor-cont .sp-picker-container{border:none}.gjs-editor-cont .colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.2)}.gjs-editor-cont .sp-cancel,.gjs-editor-cont .sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.gjs-editor-cont .sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.gjs-editor-cont .sp-color,.gjs-editor-cont .sp-hue{border:1px solid #333333}.gjs-editor-cont .sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.gjs-editor-cont .sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.gjs-editor-cont .sp-button-container{float:none;width:100%;position:relative;text-align:right}.gjs-editor-cont .sp-container button,.gjs-editor-cont .sp-container button:hover,.gjs-editor-cont .sp-container button:active{background:rgba(0,0,0,0.2);border-color:rgba(0,0,0,0.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.gjs-editor-cont .sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.gjs-editor-cont .sp-palette .sp-thumb-el,.gjs-editor-cont .sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.gjs-editor-cont .sp-palette .sp-thumb-el:hover,.gjs-editor-cont .sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}}.cm-s-hopscotch span.cm-error{color:#ffffff} + */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,0.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:0.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-one-bg{background-color:#444}.gjs-one-color{color:#444}.gjs-one-color-h:hover{color:#444}.gjs-two-bg{background-color:#ddd}.gjs-two-color{color:#ddd}.gjs-two-color-h:hover{color:#ddd}.gjs-three-bg{background-color:#804f7b}.gjs-three-color{color:#804f7b}.gjs-three-color-h:hover{color:#804f7b}.gjs-four-bg{background-color:#d278c9}.gjs-four-color{color:#d278c9}.gjs-four-color-h:hover{color:#d278c9}.gjs-bg-main,.gjs-off-prv,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{color:#ddd;fill:#ddd}.gjs-color-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-layer-name,.gjs-rte-toolbar{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-layer-title,.gjs-clm-tags #gjs-clm-close{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;font-size:.75rem;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.2);font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-header{font-weight:lighter;padding:10px}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-weight:lighter}.gjs-trt-traits{font-size:.75rem}.gjs-trt-trait .gjs-label{width:30%;text-align:left;text-overflow:ellipsis;overflow:hidden}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;width:85%;height:calc(100% - 40px);bottom:0;overflow:hidden;z-index:1;position:absolute;left:0;top:40px}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;outline-offset:-1px;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{outline:medium none;height:100%;width:100%;border:none;margin:auto;display:block;transition:width 0.35s ease,height 0.35s ease;position:absolute;top:0;bottom:0;left:0;right:0}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10;top:0;left:0}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer;width:26px;vertical-align:middle;display:inline-block}.gjs-toolbar-item svg{fill:currentColor;vertical-align:middle}.gjs-resizer-c{position:absolute;left:0;top:0;width:100%;height:100%;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;position:absolute;box-sizing:border-box;text-align:center;padding:5px;z-index:3}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-commands{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-options{right:15%;top:0}.gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.2);right:0;width:15%;z-index:4}.gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:space-between}.gjs-pn-btn{box-sizing:border-box;min-height:30px;min-width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;padding:4px;position:relative;cursor:pointer}.gjs-pn-btn.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn svg{fill:currentColor}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field-integer input{padding-right:30px}.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-fields option,.gjs-sm-unit option{background-color:#444;color:#ddd}.gjs-field{background-color:rgba(0,0,0,0.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative}.gjs-field textarea{resize:vertical}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color,.gjs-field-radio{width:100%}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px;position:absolute;top:0}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{flex:1 1 auto;text-align:center;border-left:1px solid rgba(0,0,0,0.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-items{display:flex}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{color:inherit;background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:3px}.gjs-devices-c .gjs-device-label{flex-grow:2;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-layer-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{line-height:0;cursor:pointer}.gjs-sm-header{font-weight:lighter;padding:10px}.gjs-sm-properties{font-size:.75rem;padding:10px 5px;display:flex;flex-wrap:wrap;align-items:flex-end;box-sizing:border-box;width:100%}.gjs-sm-label{margin:5px 5px 3px 0}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.2),1px 1px 0 rgba(43,43,43,0.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 20px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{top:-5px;display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding:5px 0 0}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;outline:none;font-size:22px;line-height:10px;position:absolute;right:0;top:-17px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-categories{display:flex;flex-direction:column}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;min-width:45px;padding:1em;box-sizing:border-box;min-height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;text-align:center;display:flex;flex-direction:column;justify-content:space-between;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block svg{fill:currentColor}.gjs-block-svg{width:54px;fill:currentColor}.gjs-block-svg-path{fill:currentColor}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif;overflow:hidden;text-overflow:ellipsis}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-selected-parent{border:1px solid #ffca6f}.gjs-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layer{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1);font-size:.75rem}.gjs-layer-hidden{opacity:.55;filter:alpha(opacity=55)}.gjs-layer-count{position:absolute;right:27px;top:9px}.gjs-layer-vis{height:auto !important;width:auto !important;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-layer-caret{font-size:0.5rem;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-layer-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-layer-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-layer-title-inn{position:relative}.gjs-layer-name{padding:5px;display:inline-block;box-sizing:content-box}.gjs-layer>.gjs-layer-children{display:none}.gjs-layer.open>.gjs-layer-children{display:block}.gjs-layer-no-chld>.gjs-layer-title-inn>.gjs-layer-caret{display:none}.gjs-layer-move{padding:7px 10px 7px 5px;position:absolute;font-size:12px;cursor:move;right:0;top:0}.gjs-layer.gjs-hovered .gjs-layer-title{background-color:rgba(255,255,255,0.015)}.gjs-layer.gjs-selected .gjs-layer-title{background-color:rgba(255,255,255,0.1)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-placeholder{width:100%;position:absolute}.gjs-layers #gjs-placeholder #gjs-plh-int{height:100%;padding:1px}.gjs-layers #gjs-placeholder #gjs-plh-int.gjs-insert{background-color:#62c462}.gjs-clm-tags{font-size:.75rem;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:5px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{padding:0 3px;cursor:text}.gjs-mdl-container{font-family:Helvetica,sans-serif;overflow-y:auto;position:fixed;background-color:rgba(0,0,0,0.5);display:flex;top:0;left:0;right:0;bottom:0;z-index:100}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:auto;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-title{font-size:1rem}.gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.2);padding:15px 15px 7px}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.2);font-size:12px;padding:5px 10px 3px;text-align:right}.gjs-rte-toolbar{border:1px solid rgba(0,0,0,0.2);position:absolute;border-radius:3px;z-index:10}.gjs-rte-actionbar{display:flex}.gjs-rte-action{display:flex;align-items:center;justify-content:center;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.2);text-align:center;cursor:pointer;outline:none}.gjs-rte-action:last-child{border-right:none}.gjs-rte-action:hover{background-color:rgba(255,255,255,0.1)}.gjs-rte-active{background-color:rgba(0,0,0,0.2)}.gjs-editor-cont .sp-hue,.gjs-editor-cont .sp-slider{cursor:row-resize}.gjs-editor-cont .sp-color,.gjs-editor-cont .sp-dragger{cursor:crosshair}.gjs-editor-cont .sp-alpha-inner,.gjs-editor-cont .sp-alpha-handle{cursor:col-resize}.gjs-editor-cont .sp-hue{left:90%}.gjs-editor-cont .sp-color{right:15%}.gjs-editor-cont .sp-container{border:1px solid rgba(0,0,0,0.2);box-shadow:0 0 7px rgba(0,0,0,0.2);border-radius:3px}.gjs-editor-cont .sp-picker-container{border:none}.gjs-editor-cont .colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.2)}.gjs-editor-cont .sp-cancel,.gjs-editor-cont .sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.gjs-editor-cont .sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.gjs-editor-cont .sp-color,.gjs-editor-cont .sp-hue{border:1px solid #333333}.gjs-editor-cont .sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.gjs-editor-cont .sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.gjs-editor-cont .sp-button-container{float:none;width:100%;position:relative;text-align:right}.gjs-editor-cont .sp-container button,.gjs-editor-cont .sp-container button:hover,.gjs-editor-cont .sp-container button:active{background:rgba(0,0,0,0.2);border-color:rgba(0,0,0,0.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.gjs-editor-cont .sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.gjs-editor-cont .sp-palette .sp-thumb-el,.gjs-editor-cont .sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.gjs-editor-cont .sp-palette .sp-thumb-el:hover,.gjs-editor-cont .sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}}.cm-s-hopscotch span.cm-error{color:#ffffff} diff --git a/public/grapejs/dist/js/grapes.min.js b/public/grapejs/dist/js/grapes.min.js index f484d660..5ae4a192 100755 --- a/public/grapejs/dist/js/grapes.min.js +++ b/public/grapejs/dist/js/grapes.min.js @@ -1,5 +1,7 @@ -/*! grapesjs - 0.14.21 */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.grapesjs=e():t.grapesjs=e()}("undefined"!=typeof self?self:this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=60)}([function(t,e,n){(function(i){var r,o;!function(s){var a="object"==typeof self&&self.self===self&&self||"object"==typeof i&&i.global===i&&i;r=[n(1),n(10),e],void 0!==(o=function(t,e,n){a.Backbone=s(a,n,t,e)}.apply(e,r))&&(t.exports=o)}(function(t,e,n,i){var r=t.Backbone,o=Array.prototype.slice;e.VERSION="1.3.3",e.$=i,e.noConflict=function(){return t.Backbone=r,this},e.emulateHTTP=!1,e.emulateJSON=!1;var s=function(t,e,i){switch(t){case 1:return function(){return n[e](this[i])};case 2:return function(t){return n[e](this[i],t)};case 3:return function(t,r){return n[e](this[i],l(t,this),r)};case 4:return function(t,r,o){return n[e](this[i],l(t,this),r,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}},a=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=s(e,r,i))})},l=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?c(t):n.isString(t)?function(e){return e.get(t)}:t},c=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},u=e.Events={},h=/\s+/,d=function(t,e,i,r,o){var s,a=0;if(i&&"object"==typeof i){void 0!==r&&"context"in o&&void 0===o.context&&(o.context=r);for(s=n.keys(i);athis.length&&(r=this.length),r<0&&(r+=this.length+1);var o,s,a=[],l=[],c=[],u=[],h={},d=e.add,f=e.merge,p=e.remove,g=!1,v=this.comparator&&null==r&&!1!==e.sort,m=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(I,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var i=document.body,r=i.insertBefore(this.iframe,i.firstChild).contentWindow;r.document.open(),r.document.close(),r.location.hash="#"+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),N.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!N.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;""!==t&&"?"!==t.charAt(0)||(n=n.slice(0,-1)||"/");var i=n+t;if(t=this.decodeFragment(t.replace(F,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var r=this.iframe.contentWindow;e.replace||(r.document.open(),r.document.close()),this._updateHash(r.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var i=t.href.replace(/(javascript:|#).*$/,"");t.replace(i+"#"+e)}else t.hash="#"+e}}),e.history=new N;var R=function(t,e){var i,r=this;return i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};b.extend=x.extend=A.extend=S.extend=N.extend=R;var z=function(){throw new Error('A "url" property or function must be specified')},H=function(t,e){var n=e.error;e.error=function(i){n&&n.call(e.context,t,i,e),t.trigger("error",t,i,e)}};return e})}).call(e,n(7))},function(t,e,n){(function(t,n){var i,r;!function(){var o="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||this||{},s=o._,a=Array.prototype,l=Object.prototype,c="undefined"!=typeof Symbol?Symbol.prototype:null,u=a.push,h=a.slice,d=l.toString,f=l.hasOwnProperty,p=Array.isArray,g=Object.keys,v=Object.create,m=function(){},y=function(t){return t instanceof y?t:this instanceof y?void(this._wrapped=t):new y(t)};void 0===e||e.nodeType?o._=y:(void 0!==n&&!n.nodeType&&n.exports&&(e=n.exports=y),e._=y),y.VERSION="1.9.0";var b,x=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,i,r){return t.call(e,n,i,r)};case 4:return function(n,i,r,o){return t.call(e,n,i,r,o)}}return function(){return t.apply(e,arguments)}},w=function(t,e,n){return y.iteratee!==b?y.iteratee(t,e):null==t?y.identity:y.isFunction(t)?x(t,e,n):y.isObject(t)&&!y.isArray(t)?y.matcher(t):y.property(t)};y.iteratee=b=function(t,e){return w(t,e,1/0)};var C=function(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),i=Array(n),r=0;r=0&&e<=E};y.each=y.forEach=function(t,e,n){e=x(e,n);var i,r;if(A(t))for(i=0,r=t.length;i0?0:s-1;for(r||(i=e[o?o[a]:a],a+=t);a>=0&&a=3;return e(t,x(n,r,4),i,o)}};y.reduce=y.foldl=y.inject=O(1),y.reduceRight=y.foldr=O(-1),y.find=y.detect=function(t,e,n){var i=A(t)?y.findIndex:y.findKey,r=i(t,e,n);if(void 0!==r&&-1!==r)return t[r]},y.filter=y.select=function(t,e,n){var i=[];return e=w(e,n),y.each(t,function(t,n,r){e(t,n,r)&&i.push(t)}),i},y.reject=function(t,e,n){return y.filter(t,y.negate(w(e)),n)},y.every=y.all=function(t,e,n){e=w(e,n);for(var i=!A(t)&&y.keys(t),r=(i||t).length,o=0;o=0},y.invoke=C(function(t,e,n){var i,r;return y.isFunction(e)?r=e:y.isArray(e)&&(i=e.slice(0,-1),e=e[e.length-1]),y.map(t,function(t){var o=r;if(!o){if(i&&i.length&&(t=T(t,i)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)})}),y.pluck=function(t,e){return y.map(t,y.property(e))},y.where=function(t,e){return y.filter(t,y.matcher(e))},y.findWhere=function(t,e){return y.find(t,y.matcher(e))},y.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t){t=A(t)?t:y.values(t);for(var a=0,l=t.length;ao&&(o=i)}else e=w(e,n),y.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},y.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t){t=A(t)?t:y.values(t);for(var a=0,l=t.length;ai||void 0===n)return 1;if(n0?0:r-1;o>=0&&o0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(h.call(i,s,a),y.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&oe?(i&&(clearTimeout(i),i=null),a=c,s=t.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(l,u)),s};return c.cancel=function(){clearTimeout(i),a=0,i=r=o=null},c},y.debounce=function(t,e,n){var i,r,o=function(e,n){i=null,n&&(r=t.apply(e,n))},s=C(function(s){if(i&&clearTimeout(i),n){var a=!i;i=setTimeout(o,e),a&&(r=t.apply(this,s))}else i=y.delay(o,e,this,s);return r});return s.cancel=function(){clearTimeout(i),i=null},s},y.wrap=function(t,e){return y.partial(e,t)},y.negate=function(t){return function(){return!t.apply(this,arguments)}},y.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,i=t[e].apply(this,arguments);n--;)i=t[n].call(this,i);return i}},y.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},y.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},y.once=y.partial(y.before,2),y.restArguments=C;var F=!{toString:null}.propertyIsEnumerable("toString"),R=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],z=function(t,e){var n=R.length,i=t.constructor,r=y.isFunction(i)&&i.prototype||l,o="constructor";for(y.has(t,o)&&!y.contains(e,o)&&e.push(o);n--;)(o=R[n])in t&&t[o]!==r[o]&&!y.contains(e,o)&&e.push(o)};y.keys=function(t){if(!y.isObject(t))return[];if(g)return g(t);var e=[];for(var n in t)y.has(t,n)&&e.push(n);return F&&z(t,e),e},y.allKeys=function(t){if(!y.isObject(t))return[];var e=[];for(var n in t)e.push(n);return F&&z(t,e),e},y.values=function(t){for(var e=y.keys(t),n=e.length,i=Array(n),r=0;r1&&(i=x(i,e[1])),e=y.allKeys(t)):(i=V,e=_(e,!1,!1),t=Object(t));for(var r=0,o=e.length;r1&&(n=e[1])):(e=y.map(_(e,!1,!1),String),i=function(t,n){return!y.contains(e,n)}),y.pick(t,i,n)}),y.defaults=H(y.allKeys,!0),y.create=function(t,e){var n=k(t);return e&&y.extendOwn(n,e),n},y.clone=function(t){return y.isObject(t)?y.isArray(t)?t.slice():y.extend({},t):t},y.tap=function(t,e){return e(t),t},y.isMatch=function(t,e){var n=y.keys(e),i=n.length;if(null==t)return!i;for(var r=Object(t),o=0;o":">",'"':""","'":"'","`":"`"},U=y.invert(W),q=function(t){var e=function(e){return t[e]},n="(?:"+y.keys(t).join("|")+")",i=RegExp(n),r=RegExp(n,"g");return function(t){return t=null==t?"":""+t,i.test(t)?t.replace(r,e):t}};y.escape=q(W),y.unescape=q(U),y.result=function(t,e,n){y.isArray(e)||(e=[e]);var i=e.length;if(!i)return y.isFunction(n)?n.call(t):n;for(var r=0;r/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var G=/(.)^/,Y={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},X=/\\|'|\r|\n|\u2028|\u2029/g,J=function(t){return"\\"+Y[t]};y.template=function(t,e,n){!e&&n&&(e=n),e=y.defaults({},e,y.templateSettings);var i=RegExp([(e.escape||G).source,(e.interpolate||G).source,(e.evaluate||G).source].join("|")+"|$","g"),r=0,o="__p+='";t.replace(i,function(e,n,i,s,a){return o+=t.slice(r,a).replace(X,J),r=a+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?o+="'+\n((__t=("+i+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";var s;try{s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var a=function(t){return s.call(this,t,y)};return a.source="function("+(e.variable||"obj")+"){\n"+o+"}",a},y.chain=function(t){var e=y(t);return e._chain=!0,e};var Z=function(t,e){return t._chain?y(e).chain():e};y.mixin=function(t){return y.each(y.functions(t),function(e){var n=y[e]=t[e];y.prototype[e]=function(){var t=[this._wrapped];return u.apply(t,arguments),Z(this,n.apply(y,t))}}),y},y.mixin(y),y.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=a[t];y.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],Z(this,n)}}),y.each(["concat","join","slice"],function(t){var e=a[t];y.prototype[t]=function(){return Z(this,e.apply(this._wrapped,arguments))}}),y.prototype.value=function(){return this._wrapped},y.prototype.valueOf=y.prototype.toJSON=y.prototype.value,y.prototype.toString=function(){return String(this._wrapped)},i=[],void 0!==(r=function(){return y}.apply(e,i))&&(n.exports=r)}()}).call(e,n(7),n(64)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUnitFromValue=e.normalizeFloat=e.shallowDiff=e.getElement=e.camelCase=e.getModel=e.matches=e.upFirst=e.hasDnd=e.off=e.on=void 0;var i=n(1),r=window.Element.prototype,o=r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector,s=function(t,e){var n={},r=(0,i.keys)(e);for(var o in t)if(t.hasOwnProperty(o)){var s=t[o],a=e[o];r.indexOf(o)>=0?s!==a&&(n[o]=a):n[o]=null}for(var l in e)e.hasOwnProperty(l)&&(0,i.isUndefined)(t[l])&&(n[l]=e[l]);return n},a=function(t,e,n){e=e.split(/\s+/),t=t instanceof Array?t:[t];for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=0;if(isNaN(t))return n;if(t=parseFloat(t),Math.floor(t)!==t){var r=e.toString().split(".")[1];i=r?r.length:0}return i?parseFloat(t.toFixed(i)):t},f=function(t){return"draggable"in document.createElement("i")&&(t?t.get("Config").nativeDnD:1)},p=function(t){return(0,i.isElement)(t)?t:t&&t.getEl?t.getEl():void 0},g=function(t,e){var n=t;return(0,i.isElement)(t)&&(n=e(t).data("model")),n};e.on=a,e.off=l,e.hasDnd=f,e.upFirst=u,e.matches=o,e.getModel=g,e.camelCase=h,e.getElement=p,e.shallowDiff=s,e.normalizeFloat=d,e.getUnitFromValue=c},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1),s=n(52);t.exports=r.default.View.extend({className:function(){return this.getClasses()},tagName:function(){return this.model.get("tagName")},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=t.config||{};this.opts=t,this.config=n,this.em=n.em||"",this.pfx=n.stylePrefix||"",this.ppfx=n.pStylePrefix||"",this.attr=e.get("attributes"),this.classe=this.attr.class||[];var i=this.$el,r=e.get("classes");this.listenTo(e,"change:style",this.updateStyle),this.listenTo(e,"change:attributes",this.updateAttributes),this.listenTo(e,"change:highlightable",this.updateHighlight),this.listenTo(e,"change:status",this.updateStatus),this.listenTo(e,"change:state",this.updateState),this.listenTo(e,"change:script",this.render),this.listenTo(e,"change:content",this.updateContent),this.listenTo(e,"change",this.handleChange),this.listenTo(r,"add remove change",this.updateClasses),i.data("model",e),i.data("collection",e.get("components")),e.view=this,r.length&&this.importClasses(),this.init()},init:function(){},handleChange:function(){var t=this.model;t.emitUpdate();for(var e in t.changed)t.emitUpdate(e)},importClasses:function(){var t=this.config.em.get("SelectorManager");t&&this.model.get("classes").each(function(e){t.add(e.get("name"))})},updateState:function(t){var e="hc-state";this.model.get("state")?this.$el.addClass(e):this.$el.removeClass(e)},updateStatus:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(this.em,this.el),n=this.model.get("status"),i=this.pfx,r=this.ppfx,o=i+"selected",s=o+"-parent",a=r+"freezed",l=r+"hovered",c=[o,s,a,l];this.$el.removeClass(c.join(" "));var u=e.getAttribute("class")||"",h="";switch(n){case"selected":h=u+" "+o;break;case"selected-parent":h=u+" "+s;break;case"freezed":h=u+" "+a;break;case"freezed-selected":h=u+" "+a+" "+o;break;case"hovered":h=t.avoidHover?"":u+" "+l}(h=h.trim())&&e.setAttribute("class",h)},updateHighlight:function(){var t=this.model.get("highlightable");this.setAttribute("data-highlightable",t?1:"")},updateStyle:function(){var t=this.em,e=this.model;if(t&&t.get("avoidInlineStyle")){this.el.id=e.getId();var n=e.getStyle();!(0,o.isEmpty)(n)&&e.setStyle(n)}else this.setAttribute("style",e.styleToString())},updateClasses:function(){var t=this.model.get("classes").pluck("name").join(" ");this.setAttribute("class",t),this.updateStatus()},setAttribute:function(t,e){var n=this.$el;e?n.attr(t,e):n.removeAttr(t)},getClasses:function(){var t=this.model.get("attributes"),e=t.class||[];return e=(0,o.isArray)(e)?e:[e],e.length?e.join(" "):null},updateAttributes:function(){var t=this.model,e={"data-gjs-type":t.get("type")||"default"},n=t.get("attributes"),i=t.get("src");for(var r in n)e[r]=n[r];i&&(e.src=i),this.$el.attr(e),this.updateHighlight(),this.updateStyle()},updateContent:function(){this.getChildrenContainer().innerHTML=this.model.get("content")},prevDef:function(t){t.preventDefault()},updateScript:function(){if(this.model.get("script")){var t=this.em;if(t){t.get("Canvas").getCanvasView().updateScript(this)}}},getChildrenContainer:function(){var t=this.el;return"function"==typeof this.getChildrenSelector?t=this.el.querySelector(this.getChildrenSelector()):this.getTemplate,t},renderChildren:function(){var t=this.getChildrenContainer(),e=new s({collection:this.model.get("components"),config:this.config,componentTypes:this.opts.componentTypes});e.render(t),this.childrenView=e;for(var n=Array.prototype.slice.call(e.el.childNodes),i=0,r=n.length;i0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.em,s=this.parent(),a=s&&s.attributes;if(a&&a.propagate){var l={},c=a.propagate;c.forEach(function(t){return l[t]=s.get(t)}),l.propagate=c,l=i({},l,e),this.set(l)}var u=this.get("propagate");u&&this.set("propagate",(0,r.isArray)(u)?u:[u]),n&&n.config&&n.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),n.em=o,this.opt=n,this.em=o,this.config=n.config||{},this.ccid=v.createId(this),this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.listenTo(this,"change:tagName",this.tagUpdated),this.listenTo(this,"change:attributes",this.attrUpdated),this.initClasses(),this.loadTraits(),this.initComponents(),this.initToolbar(),this.set("status",""),["classes","traits"].forEach(function(e){return t.listenTo(t.get(e),"add remove change",function(){return t.emitUpdate(e)})}),this.init()},is:function(t){return!(this.get("type")!=t)},find:function(t){var e=[];return this.view.$el.find(t).each(function(t,n,i){var r=i.eq(n),o=r.data("model");o&&e.push(o)}),e},closest:function(t){var e=this.view.$el.closest(t);return e.length&&e.data("model")},tagUpdated:function(){var t=this.collection,e=t.indexOf(this);t.remove(this),t.add(this,{at:e})},replaceWith:function(t){var e=this.collection,n=e.indexOf(this);return e.remove(this),e.add(t,{at:n})},attrUpdated:function(){var t=this,e=i({},this.previous("attributes")),n=i({},this.get("attributes")),s=(0,o.shallowDiff)(e,n);(0,r.keys)(s).forEach(function(e){return t.trigger("change:attributes:"+e)})},setAttributes:function(t){t=i({},t);var e=t.class;e&&this.setClass(e),delete t.class;var n=t.style;n&&this.setStyle(n),delete t.style,this.set("attributes",t)},addAttributes:function(t){var e=i({},this.getAttributes(),t);this.setAttributes(e)},getStyle:function(){var t=this.em;if(t&&t.getConfig("avoidInlineStyle")){var e=this.get("state"),n=t.get("CssComposer"),i=n.getIdRule(this.getId(),{state:e});if(this.rule=i,i)return i.getStyle()}return a.default.getStyle.call(this)},setStyle:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=this.em;if(s&&s.getConfig("avoidInlineStyle")){e=(0,r.isString)(e)?this.parseStyle(e):e,e=i({},e,this.get("style"));var l=this.get("state"),c=s.get("CssComposer"),u=this.getStyle();this.rule=c.setIdRule(this.getId(),e,i({},n,{state:l}));var h=(0,o.shallowDiff)(u,e);this.set("style",{},{silent:1}),(0,r.keys)(h).forEach(function(e){return t.trigger("change:style:"+e)})}else e=a.default.setStyle.apply(this,arguments);return e},getAttributes:function(){var t=this.em,e=[],n=i({},this.get("attributes")),o=t&&t.get("SelectorManager"),s=this.getId();return this.get("classes").each(function(t){return e.push(t.get("name"))}),e.length&&(n.class=e.join(" ")),!(0,r.has)(n,"id")&&o&&o.get(s,o.Selector.TYPE_ID)&&(n.id=this.getId()),n},addClass:function(t){var e=this.em.get("SelectorManager").addClass(t);return this.get("classes").add(e)},setClass:function(t){return this.get("classes").reset(),this.addClass(t)},removeClass:function(t){var e=[];t=(0,r.isArray)(t)?t:[t];var n=this.get("classes"),i=u.TYPE_CLASS;return t.forEach(function(t){t.split(" ").forEach(function(t){var r=n.where({name:t,type:i})[0];r&&e.push(n.remove(r))})}),e},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||[]);return this.set("classes",new h(t)),this},initComponents:function(){var t=new c(null,this.opt);return t.parent=this,!this.opt.avoidChildren&&t.reset(this.get("components")),this.set("components",t),this},init:function(){},append:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.components().add(t,e);return(0,r.isArray)(n)?n:[n]},components:function(t){var e=this.get("components");if((0,r.isUndefined)(t))return e;e.reset(),t&&this.append(t)},parent:function(){var t=this.collection;return t&&t.parent},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=i({},this.get("attributes")),n=this.get("traits");if(!(n instanceof d))return void this.loadTraits();n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.get("name"),r=n.getInitValue();i&&r&&(e[i]=r)}}),t&&this.set("attributes",e)},initToolbar:function(){var t=this;if(!t.get("toolbar")){var e=[];t.collection&&e.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),t.get("draggable")&&e.push({attributes:{class:"fa fa-arrows",draggable:!0},command:"tlb-move"}),t.get("copyable")&&e.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),t.get("removable")&&e.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),t.set("toolbar",e)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new d([],this.opt);return n.setTarget(this),t=t||this.get("traits"),t.length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[],n=this.em;if(n){var i=n.get("SelectorManager");if(i)return t.forEach(function(t){var n="";n="string"==typeof t?t:t.name;var r=i.add(n);e.push(r)}),e}},clone:function(){var t=this.em,e=this.getStyle(),n=i({},this.attributes),o=i({},this.opt);return n.attributes=i({},n.attributes),delete n.attributes.id,n.components=[],n.classes=[],n.traits=[],this.get("components").each(function(t,e){n.components[e]=t.clone()}),this.get("traits").each(function(t,e){n.traits[e]=t.clone()}),this.get("classes").each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",o.collection=null,t&&t.getConfig("avoidInlineStyle")&&!(0,r.isEmpty)(e)&&(n.style=e),new this.constructor(n,o)},getName:function(){var t=this.get("name")||this.get("custom-name"),e=this.get("tagName");e="div"==e?"box":e;var n=this.get("type")||e;return n=n.charAt(0).toUpperCase()+n.slice(1),t||n},getIcon:function(){var t=this.get("icon");return t?t+" ":""},toHTML:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this,n=[],i=e.get("tagName"),o=e.get("void"),s=t.attributes,a=this.getAttrToHTML();s&&((0,r.isFunction)(s)?a=s(e,a)||{}:(0,r.isObject)(s)&&(a=s));for(var l in a){var c=a[l],u=(0,r.isString)(c)?c.replace(/"/g,"""):c;(0,r.isUndefined)(u)||((0,r.isBoolean)(u)?u&&n.push(l):n.push(l+'="'+u+'"'))}var h=n.length?" "+n.join(" "):"",d="<"+i+h+(o?"/":"")+">"+e.get("content");return e.get("components").each(function(e){return d+=e.toHTML(t)}),!o&&(d+=""),d},getAttrToHTML:function(){var t=this.getAttributes();return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]&&arguments[0],this.em),e=this.getId();if(e){var n=v.createId(this);this.setId(n);var i=t&&t.get("CssComposer").getIdRule(e),r=i&&i.get("selectors").at(0);return r&&r.set("name",n),this}}},{isComponent:function(t){return{tagName:t.tagName?t.tagName.toLowerCase():""}},createId:function(t){p++;var e=p.toString().length+2,n=(Math.random()+1.1).toString(36).slice(-e),i="i"+n;return f[i]=t,i},getList:function(){return f}});t.exports=v},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1),s=n(2);t.exports=r.default.View.extend({template:function(t){return'\n
\n '+this.templateLabel(t)+'\n
\n
\n '+this.templateInput(t)+"\n
\n "},templateLabel:function(t){var e=this.pfx;return'\n \n '+t.get("name")+'\n \n \n '},templateInput:function(t){return'\n
\n \n
\n '},events:function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({change:"inputValueChanged"},"click [data-clear-style]","clear"),initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,o.bindAll)(this,"targetUpdated"),this.config=t.config||{};var e=this.config.em;this.em=e,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{};var n=this.model;this.property=n.get("property"),this.input=null;var i=this.pfx;this.inputHolderId="#"+i+"input-holder",this.sector=n.collection&&n.collection.sector,n.view=this,n.get("value")||n.set("value",n.getDefaultValue()),e&&e.on("update:component:style:"+this.property,this.targetUpdated),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(n,"destroy remove",this.remove),this.listenTo(n,"change:value",this.modelValueChanged),this.listenTo(n,"targetUpdated",this.targetUpdated),this.listenTo(n,"change:visible",this.updateVisibility),this.listenTo(n,"change:status",this.updateStatus);var r=this.init&&this.init.bind(this);r&&r()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"four-color",o=n+"color-warn",s=this.$el.children("."+e+"label"),a=this.getClearEl().style;switch(s.removeClass(r+" "+o),a.display="none",t){case"updated":s.addClass(r),i.clearProperties&&(a.display="inline");break;case"computed":s.addClass(o)}},clear:function(t){t&&t.stopPropagation(),this.model.clearValue(),this.targetUpdated()},getClearEl:function(){return this.clearEl||(this.clearEl=this.el.querySelector("[data-clear-style]")),this.clearEl},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(t){t&&t.stopPropagation(),this.model.setValue(this.getInputValue(),1,{fromInput:1}),this.elementUpdated()},elementUpdated:function(){this.setStatus("updated")},setStatus:function(t){this.model.set("status",t);var e=this.model.parent;e&&e.set("status",t)},targetUpdated:function(){if(this.checkVisibility()){var t=this.config,e=t.em,n=this.model,i="",r="",o=this.getTargetValue({ignoreDefault:1}),s=n.getDefaultValue(),a=this.getComputedValue();o?(i=o,t.highlightChanged&&(r="updated")):a&&t.showComputed&&a!=s?(i=a,t.highlightComputed&&(r="computed")):(i=s,r=""),n.setValue(i,0,{fromTarget:1}),this.setStatus(r),e&&(e.trigger("styleManager:change",this),e.trigger("styleManager:change:"+n.get("property"),this))}},checkVisibility:function(){var t=1;return this.config.hideNotStylable&&(this.isTargetStylable()&&this.isComponentStylable()?this.show():(this.hide(),t=0),this.sector&&this.sector.trigger("updateVisibility")),t},getTargetValue:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.model,i=this.getTargetModel(),r=this.customValue;if(!i)return t;if(t=i.getStyle()[n.get("property")],t||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),s=r(this,o);s&&(t=s)}return t},getComputedValue:function(){var t=this.propTarget,e=t.computed||{},n=t.computedDefault||{},i=this.config.avoidComputed||[],r=this.model.get("property"),o=i.indexOf(r)<0,a=e[r],l=n[(0,s.camelCase)(r)];return e&&o&&l!==a&&a},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;n.fromInput||this.setValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(n.fromTarget||(a&&!n.fromParent?a(s,this,n):this.updateTargetStyle(o,null,n)),i&&(i.trigger("component:update",s),i.trigger("component:styleUpdate",s),i.trigger("component:styleUpdate:"+r.get("property"),s)))},updateTargetStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e||this.model.get("property"),r=this.getTarget(),o=r.getStyle();t?o[i]=t:delete o[i],r.setStyle(o,n);var s=this.getHelperModel();s&&s.setStyle(o,n)},isTargetStylable:function(t){var e=t||this.getTarget(),n=this.model,i=n.get("property"),r=n.get("toRequire"),s=e.get("unstylable"),a=e.get("stylable-require"),l=e.get("stylable");return(0,o.isArray)(l)&&(l=l.indexOf(i)>=0),(0,o.isArray)(s)&&(l=s.indexOf(i)<0),r&&(l=a&&a.indexOf(i)>=0||!t),l},isComponentStylable:function(){var t=this.em,e=t&&t.getSelected();return!e||this.isTargetStylable(e)},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=this.model,n=(0,o.isUndefined)(t)?e.getDefaultValue():t,i=this.getInputEl();i&&(i.value=n)},getInputEl:function(){return this.input||(this.input=this.el.querySelector("input")),this.input},updateVisibility:function(){this.el.style.display=this.model.get("visible")?"block":"none"},show:function(){this.model.set("visible",1)},hide:function(){this.model.set("visible",0)},cleanValue:function(){this.setValue("")},render:function(){var t=this.pfx,e=this.model,n=this.el;n.innerHTML=this.template(e),n.className=t+"property "+t+e.get("type"),this.updateStatus();var i=this.onRender&&this.onRender.bind(this);i&&i(),this.setValue(e.get("value"),{targetUpdate:1})}})},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function i(t,e,n,i){var r=document.createElement(t);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return s+(e-o);s+=a-o,s+=n-s%n,o=a+1}}function d(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=e)return i}}function p(t){for(;Gs.length<=t;)Gs.push(g(Gs)+" ");return Gs[t]}function g(t){return t[t.length-1]}function v(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Ys.test(t))}function w(t,e){return e?!!(e.source.indexOf("\\w")>-1&&x(t))||e.test(t):x(t)}function C(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Xs.test(t)}function S(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var r=(e+n)/2,o=i<0?Math.ceil(r):Math.floor(r);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+i}}function E(t,e,n){var o=this;this.input=n,o.scrollbarFiller=i("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=i("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=r("div",null,"CodeMirror-code"),o.selectionDiv=i("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=i("div",null,"CodeMirror-cursors"),o.measure=i("div",null,"CodeMirror-measure"),o.lineMeasure=i("div",null,"CodeMirror-measure"),o.lineSpace=r("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var s=r("div",[o.lineSpace],"CodeMirror-lines");o.mover=i("div",[s],null,"position: relative"),o.sizer=i("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=i("div",null,null,"position: absolute; height: "+Bs+"px; width: 1px;"),o.gutters=i("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=i("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=i("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),bs&&xs<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),ws||gs&&Ps||(o.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(o.wrapper):t(o.wrapper)),o.viewFrom=o.viewTo=e.first,o.reportedViewFrom=o.reportedViewTo=e.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,n.init(o)}function M(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(e=t.first&&en?I(n,M(t,n).text.length):B(e,M(t,e.line).text.length)}function B(t,e){var n=t.ch;return null==n||n>e?I(t.line,e):n<0?I(t.line,0):t}function W(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new K(s,o.from,l?null:o.to))}}return i}function Z(t,e,n){var i;if(t)for(var r=0;r=e:o.to>e);if(a||o.from==e&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=e:o.from0&&a)for(var w=0;w0)){var u=[l,1],h=F(c.from,a.from),f=F(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function nt(t){var e=t.markedSpans;if(e){for(var n=0;ne)&&(!n||st(n,o.marker)<0)&&(n=o.marker)}return n}function ht(t,e,n,i,r){var o=M(t,e),s=Zs&&o.markedSpans;if(s)for(var a=0;a=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?F(c.to,n)>=0:F(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?F(c.from,i)<=0:F(c.from,i)<0)))return!0}}}function dt(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function ft(t){for(var e;e=ct(t);)t=e.find(1,!0).line;return t}function pt(t){for(var e,n;e=ct(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function gt(t,e){var n=M(t,e),i=dt(n);return n==i?e:L(i)}function vt(t,e){if(e>t.lastLine())return e;var n,i=M(t,e);if(!mt(t,i))return e;for(;n=ct(i);)i=n.find(1,!0).line;return L(i)+1}function mt(t,e){var n=Zs&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function Ct(t,e,n,i){if(!t)return i(e,n,"ltr",0);for(var r=!1,o=0;oe||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr",o),r=!0)}r||i(e,n,"ltr")}function kt(t,e,n){var i;Qs=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Qs=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Qs=r)}return null!=i?i:Qs}function St(t,e){var n=t.order;return null==n&&(n=t.order=ta(t.text,e)),n}function Tt(t,e){return t._handlers&&t._handlers[e]||ea}function Et(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=d(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function Mt(t,e){var n=Tt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function Lt(t){t.prototype.on=function(t,e){na(this,t,e)},t.prototype.off=function(t,e){Et(this,t,e)}}function _t(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Nt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Dt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function It(t){_t(t),Nt(t)}function Ft(t){return t.target||t.srcElement}function Rt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),Ls&&t.ctrlKey&&1==e&&(e=3),e}function zt(t){if(null==js){var e=i("span","​");n(t,i("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(js=e.offsetWidth<=1&&e.offsetHeight>2&&!(bs&&xs<8))}var r=js?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Ht(t){if(null!=$s)return $s;var i=n(t,document.createTextNode("AخA")),r=Is(i,0,1).getBoundingClientRect(),o=Is(i,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&($s=o.right-r.right<3)}function Vt(t){if(null!=aa)return aa;var e=n(t,i("span","x")),r=e.getBoundingClientRect(),o=Is(e,0,1).getBoundingClientRect();return aa=Math.abs(r.left-o.left)>1}function jt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),la[t]=e}function $t(t,e){ca[t]=e}function Bt(t){if("string"==typeof t&&ca.hasOwnProperty(t))t=ca[t];else if(t&&"string"==typeof t.name&&ca.hasOwnProperty(t.name)){var e=ca[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Bt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Bt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Wt(t,e){e=Bt(e);var n=la[e.name];if(!n)return Wt(t,"text/plain");var i=n(t,e);if(ua.hasOwnProperty(e.name)){var r=ua[e.name];for(var o in r)r.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=r[o])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)i[s]=e.modeProps[s];return i}function Ut(t,e){u(e,ua.hasOwnProperty(t)?ua[t]:ua[t]={})}function qt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var i in e){var r=e[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n}function Kt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Gt(t,e,n){return!t.startState||t.startState(e,n)}function Yt(t,e,n,i){var r=[t.state.modeGen],o={};ie(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=0;at&&r.splice(l,1,t,r[l+1],i),l+=2,c=Math.min(t,i)}if(e)if(a.opaque)r.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&qt(t.doc.mode,i.state),o=Yt(t,e,i);r&&(i.state=r),e.stateAfter=i.save(!r),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function Jt(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new fa(i,!0,e);var o=re(t,e,n),s=o>i.first&&M(i,o-1).stateAfter,a=s?fa.fromSaved(i,s,o):new fa(i,Gt(i.mode),o);return i.iter(o,e,function(n){Zt(t,n.text,a);var i=a.line;n.stateAfter=i==e-1||i%5==0||i>=r.viewFrom&&ie.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}function ee(t,e,n,i){var r,o=t.doc,s=o.mode;e=$(o,e);var a,l=M(o,e.line),c=Jt(t,e.line,n),u=new ha(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&Zt(t,e,i,h.pos),h.pos=e.length,l=null):l=ne(te(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=M(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof da?c.lookAhead:0)<=o.modeFrontier))return a;var u=h(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function oe(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=M(t,i).stateAfter;if(r&&(!(r instanceof da)||i+r.lookAhead1&&!/ /.test(t))return t;for(var n=e,i="",r=0;rc&&h.from<=c));d++);if(h.to>=u)return t(n,i,r,o,s,a,l);t(n,i.slice(0,h.to-c),r,o,null,a,l),o=null,i=i.slice(h.to-c),c=h.to}}}function pe(t,e,n,i){var r=!i&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!i&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function ge(t,e,n){var i=t.markedSpans,r=t.text,o=0;if(i)for(var s,a,l,c,u,h,d,f=r.length,p=0,g=1,v="",m=0;;){if(m==p){l=c=u=h=a="",d=null,m=1/0;for(var y=[],b=void 0,x=0;xp||C.collapsed&&w.to==p&&w.from==p)?(null!=w.to&&w.to!=p&&m>w.to&&(m=w.to,c=""),C.className&&(l+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&w.from==p&&(u+=" "+C.startStyle),C.endStyle&&w.to==m&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||st(d.marker,C)<0)&&(d=w)):w.from>p&&m>w.from&&(m=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,m);;){if(v){var E=p+v.length;if(!d){var M=E>T?v.slice(0,T-p):v;e.addToken(e,M,s?s+l:l,u,p+M.length==m?c:"",h,a)}if(E>=T){v=v.slice(T-p),p=T;break}p=E,u=""}v=r.slice(o,o=n[g++]),s=le(n[g++],e.cm.options)}}else for(var A=1;A2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function We(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ue(t,e){e=dt(e);var i=L(e),r=t.display.externalMeasured=new ve(t.doc,e,i);r.lineN=i;var o=r.built=ce(t,r);return r.text=o.pre,n(t.display.lineMeasure,o.pre),r}function qe(t,e,n,i){return Ye(t,Ge(t,e),n,i)}function Ke(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(o=l-a,r=o-1,e>=l&&(s="right")),null!=r){if(i=t[c+2],a==l&&n==(i.insertLeft?"left":"right")&&(s=n),"left"==n&&0==r)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)i=t[2+(c-=3)],s="left";if("right"==n&&r==l-a)for(;c=0&&(n=t[r]).left==n.right;r--);return n}function Ze(t,e,n,i){var r,o=Xe(e.map,n,i),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=i="right");var h;r=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==i?h.length-1:0]:s.getBoundingClientRect()}if(bs&&xs<9&&!a&&(!r||!r.left&&!r.right)){var d=s.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+wn(t.display),top:d.top,bottom:d.bottom}:wa}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,v=e.view.measure.heights,m=0;m=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var h=kt(l,c,u),d=Qs,f=a(c,h,"before"==u);return null!=d&&(f.other=a(c,d,"before"!=u)),f}function hn(t,e){var n=0;e=$(t.doc,e),t.options.lineWrapping||(n=wn(t.display)*e.ch);var i=M(t.doc,e.line),r=bt(i)+Re(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function dn(t,e,n,i,r){var o=I(t,e,n);return o.xRel=r,i&&(o.outside=!0),o}function fn(t,e,n){var i=t.doc;if((n+=t.display.viewOffset)<0)return dn(i.first,0,null,!0,-1);var r=_(i,n),o=i.first+i.size-1;if(r>o)return dn(i.first+i.size-1,M(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=M(i,r);;){var a=mn(t,s,r,e,n),l=ut(s,a.ch+(a.xRel>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==r)return c;s=M(i,r=c.line)}}function pn(t,e,n,i){i-=sn(e);var r=e.text.length,o=T(function(e){return Ye(t,n,e-1).bottom<=i},r,0);return r=T(function(e){return Ye(t,n,e).top>i},o,r),{begin:o,end:r}}function gn(t,e,n,i){return n||(n=Ge(t,e)),pn(t,e,n,an(t,e,Ye(t,n,i),"line").top)}function vn(t,e,n,i){return!(t.bottom<=n)&&(t.top>n||(i?t.left:t.right)>e)}function mn(t,e,n,i,r){r-=bt(e);var o=Ge(t,e),s=sn(e),a=0,l=e.text.length,c=!0,u=St(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?bn:yn)(t,e,n,o,u,i,r);c=1!=h.level,a=c?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,g=null,v=T(function(e){var n=Ye(t,o,e);return n.top+=s,n.bottom+=s,!!vn(n,i,r,!1)&&(n.top<=r&&n.left<=i&&(p=e,g=n),!0)},a,l),m=!1;if(g){var y=i-g.left=x.bottom}return v=S(e.text,v,1),dn(n,v,f,m,i-d)}function yn(t,e,n,i,r,o,s){var a=T(function(a){var l=r[a],c=1!=l.level;return vn(un(t,I(n,c?l.to:l.from,c?"before":"after"),"line",e,i),o,s,!0)},0,r.length-1),l=r[a];if(a>0){var c=1!=l.level,u=un(t,I(n,c?l.from:l.to,c?"after":"before"),"line",e,i);vn(u,o,s,!0)&&u.top>s&&(l=r[a-1])}return l}function bn(t,e,n,i,r,o,s){var a=pn(t,e,i,s),l=a.begin,c=a.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=1!=f.level,g=Ye(t,i,p?Math.min(c,f.to)-1:Math.max(l,f.from)).right,v=gv)&&(u=f,h=v)}}return u||(u=r[r.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function xn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==va){va=i("pre");for(var r=0;r<49;++r)va.appendChild(document.createTextNode("x")),va.appendChild(i("br"));va.appendChild(document.createTextNode("x"))}n(t.measure,va);var o=va.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function wn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=i("span","xxxxxxxxxx"),r=i("pre",[e]);n(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function Cn(t){for(var e=t.display,n={},i={},r=e.gutters.clientLeft,o=e.gutters.firstChild,s=0;o;o=o.nextSibling,++s)n[t.options.gutters[s]]=o.offsetLeft+o.clientLeft+r,i[t.options.gutters[s]]=o.clientWidth;return{fixedPos:kn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function kn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Sn(t){var e=xn(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/wn(t.display)-3);return function(r){if(mt(t.doc,r))return 0;var o=0;if(r.widgets)for(var s=0;s=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,i=0;i=t.display.viewTo||a.to().line0?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Dn(t){t.state.focused||(t.display.input.focus(),Fn(t))}function In(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Rn(t))},100)}function Fn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Mt(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),ws&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Nn(t))}function Rn(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Mt(t,"blur",t,e),t.state.focused=!1,zs(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function zn(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||l<-.005)&&(P(r.line,o),Hn(r.line),r.rest))for(var c=0;c=s&&(o=_(e,bt(M(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function jn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=kn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!Ms){var s=i("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Re(t.display))+"px;\n height: "+(e.bottom-e.top+Ve(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function Wn(t,e,n,i){null==i&&(i=0);var r;t.options.lineWrapping||e!=n||(e=e.ch?I(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,n="before"==e.sticky?I(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=un(t,e),l=n&&n!=e?un(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var c=qn(t,r),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Qn(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(ei(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function Un(t,e){var n=qn(t,e);null!=n.scrollTop&&Qn(t,n.scrollTop),null!=n.scrollLeft&&ei(t,n.scrollLeft)}function qn(t,e){var n=t.display,i=xn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=$e(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+ze(n),l=e.topa-i;if(e.topr+o){var u=Math.min(e.top,(c?a:e.bottom)-o);u!=r&&(s.scrollTop=u)}var h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft,d=je(t)-(t.options.fixedGutter?n.gutters.offsetWidth:0),f=e.right-e.left>d;return f&&(e.right=e.left+d),e.left<10?s.scrollLeft=0:e.leftd+h-3&&(s.scrollLeft=e.right+(f?0:10)-d),s}function Kn(t,e){null!=e&&(Jn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Gn(t){Jn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Yn(t,e,n){null==e&&null==n||Jn(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Xn(t,e){Jn(t),t.curOp.scrollToPos=e}function Jn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;Zn(t,hn(t,e.from),hn(t,e.to),e.margin)}}function Zn(t,e,n,i){var r=qn(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-i,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+i});Yn(t,r.scrollLeft,r.scrollTop)}function Qn(t,e){Math.abs(t.doc.scrollTop-e)<2||(gs||Li(t,{top:e}),ti(t,e,!0),gs&&Li(t),Si(t,100))}function ti(t,e,n){e=Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function ei(t,e,n,i){e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!i||(t.doc.scrollLeft=e,jn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function ni(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+ze(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Ve(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function ii(t,e){e||(e=ni(t));var n=t.display.barWidth,i=t.display.barHeight;ri(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&zn(t),ri(t,ni(t)),n=t.display.barWidth,i=t.display.barHeight}function ri(t,e){var n=t.display,i=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}function oi(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&zs(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Sa[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),na(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?ei(t,e):Qn(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function si(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ta},ye(t.curOp)}function ai(t){xe(t.curOp,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new Ea(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function ui(t){t.updatedDisplay=t.mustUpdate&&Oi(t.cm,t.update)}function hi(t){var e=t.cm,n=e.display;t.updatedDisplay&&zn(e),t.barMeasure=ni(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=qe(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Ve(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-je(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function di(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Zs&>(t.doc,e)r.viewFrom?xi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)xi(t);else if(e<=r.viewFrom){var o=wi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):xi(t)}else if(n>=r.viewTo){var s=wi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):xi(t)}else{var a=wi(t,e,e,-1),l=wi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(me(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):xi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Mn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==d(s,n)&&s.push(n)}}}function xi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function wi(t,e,n,i){var r,o=Mn(t,e),s=t.display.view;if(!Zs||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var a=t.display.viewFrom,l=0;l0){if(o==s.length-1)return null;r=a+s[o].size-e,o++}else r=a-e;e+=r,n+=r}for(;gt(t.doc,n)!=n;){if(o==(i<0?0:s.length-1))return null;n+=i*s[o-(i<0?1:0)].size,o+=i}return{index:o,lineN:n}}function Ci(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=me(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=me(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Mn(t,n)))),i.viewTo=n}function ki(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=Jt(t,e.highlightFrontier),r=[];e.iter(i.line,Math.min(e.first+e.size,t.display.viewTo+500),function(o){if(i.line>=t.display.viewFrom){var s=o.styles,a=o.text.length>t.options.maxHighlightLength?qt(e.mode,i.state):null,l=Yt(t,o,i,!0);a&&(i.state=a),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&dn)return Si(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&pi(t,function(){for(var e=0;e=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==ki(t))return!1;$n(t)&&(xi(t),n.dims=Cn(t));var o=r.first+r.size,s=Math.max(n.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+t.options.viewportMargin);i.viewFroma&&i.viewTo-a<20&&(a=Math.min(o,i.viewTo)),Zs&&(s=gt(t.doc,s),a=vt(t.doc,a));var l=s!=i.viewFrom||a!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;Ci(t,s,a),i.viewOffset=bt(M(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=ki(t);if(!l&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=Mi(t);return c>4&&(i.lineDiv.style.display="none"),_i(t,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Ai(u),e(i.cursorDiv),e(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,Si(t,400)),i.updateLineNumbers=null,!0}function Pi(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=je(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+ze(t.display)-$e(t),n.top)}),e.visible=Vn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Oi(t,e);i=!1){zn(t);var r=ni(t);An(t),ii(t,r),Di(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Li(t,e){var n=new Ea(t,e);if(Oi(t,n)){zn(t),Pi(t,n);var i=ni(t);An(t),ii(t,i),Di(t,i),n.finish()}}function _i(t,n,i){function r(e){var n=e.nextSibling;return ws&&Ls&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,h=0;h-1&&(p=!1),ke(t,f,u,i)),p&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(D(t.options,u)))),l=f.node.nextSibling}else{var g=Le(t,f,u,i);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function Ni(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Di(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Ve(t)+"px"}function Ii(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var o=0;o-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function Ri(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function zi(t){var e=Ri(t);return e.x*=Aa,e.y*=Aa,e}function Hi(t,e){var n=Ri(e),i=n.x,r=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&Ls&&ws)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h=0){var s=V(o.from(),r.from()),a=H(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new Pa(l?a:s,l?s:a))}}return new Oa(t,e)}function ji(t,e){return new Oa([new Pa(t,e||t)],0)}function $i(t){return t.text?I(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Bi(t,e){if(F(t,e.from)<0)return t;if(F(t,e.to)<=0)return $i(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=$i(e).ch-e.to.ch),I(n,i)}function Wi(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,y)}we(t,"change",t,e)}function Ji(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function or(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&r.lastModTime>a-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=rr(r,r.lastOp==i)))s=g(o.changes),0==F(e.from,e.to)&&0==F(e.from,s.to)?s.to=$i(e):o.changes.push(nr(t,e));else{var l=g(r.done);for(l&&l.ranges||lr(t.sel,r.done),o={changes:[nr(t,e)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=e.origin,s||Mt(t,"historyAdded")}function sr(t,e,n,i){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function ar(t,e,n,i){var r=t.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||sr(t,o,g(r.done),e))?r.done[r.done.length-1]=e:lr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&ir(r.undone)}function lr(t,e){var n=g(e);n&&n.ranges&&n.equals(t)||e.push(t)}function cr(t,e,n,i){var r=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,i),function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[o]=n.markedSpans),++o})}function ur(t){if(!t)return null;for(var e,n=0;n-1&&(g(a)[h]=c[h],delete c[h])}}}return i}function pr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=F(e,r)<0;o!=F(n,r)<0?(r=e,e=n):o!=F(e,n)<0&&(e=n)}return new Pa(r,e)}return new Pa(n||e,e)}function gr(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),wr(t,new Oa([pr(t.sel.primary(),e,n,r)],0),i)}function vr(t,e,n){for(var i=[],r=t.cm&&(t.cm.display.shift||t.extend),o=0;o=e.ch:a.to>e.ch))){if(r&&(Mt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var c=l.find(i<0?1:-1),u=void 0;if((i<0?l.inclusiveRight:l.inclusiveLeft)&&(c=Ar(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=F(c,n))&&(i<0?u<0:u>0))return Er(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Ar(t,h,i,h.line==e.line?o:null)),h?Er(t,h,e,i,r):null}}return e}function Mr(t,e,n,i,r){var o=i||1,s=Er(t,e,n,o,r)||!r&&Er(t,e,n,o,!0)||Er(t,e,n,-o,r)||!r&&Er(t,e,n,-o,!0);return s||(t.cantEdit=!0,I(t.first,0))}function Ar(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?$(t,I(e.line-1)):null:n>0&&e.ch==(i||M(t,e.line)).text.length?e.line=0;--r)_r(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else _r(t,e)}}function _r(t,e){if(1!=e.text.length||""!=e.text[0]||0!=F(e.from,e.to)){var n=Wi(t,e);or(t,e,n,t.cm?t.cm.curOp.id:NaN),Ir(t,e,n,Q(t,e));var i=[];Ji(t,function(t,n){n||-1!=d(i,t.history)||(Vr(t.history,e),i.push(t.history)),Ir(t,e,null,Q(t,e))})}}function Nr(t,e,n){var i=t.cm&&t.cm.state.suppressEdits;if(!i||n){for(var r,o=t.history,s=t.sel,a="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c=0;--f){var p=function(n){var i=r.changes[n];if(i.origin=e,h&&!Pr(t,i,!1))return a.length=0,{};u.push(nr(t,i));var o=n?Wi(t,i):g(a);Ir(t,i,o,dr(t,i)),!n&&t.cm&&t.cm.scrollIntoView({from:i.from,to:$i(i)});var s=[];Ji(t,function(t,e){e||-1!=d(s,t.history)||(Vr(t.history,i),s.push(t.history)),Ir(t,i,null,dr(t,i))})}(f);if(p)return p.v}}}}function Dr(t,e){if(0!=e&&(t.first+=e,t.sel=new Oa(v(t.sel.ranges,function(t){return new Pa(I(t.anchor.line+e,t.anchor.ch),I(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){yi(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,i=n.viewFrom;it.lastLine())){if(e.from.lineo&&(e={from:e.from,to:I(o,M(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=A(t,e.from,e.to),n||(n=Wi(t,e)),t.cm?Fr(t.cm,e,i):Xi(t,e,i),Cr(t,n,Us)}}function Fr(t,e,n){var i=t.doc,r=t.display,o=e.from,s=e.to,a=!1,l=o.line;t.options.lineWrapping||(l=L(dt(M(i,o.line))),i.iter(l,s.line+1,function(t){if(t==r.maxLine)return a=!0,!0})),i.sel.contains(e.from,e.to)>-1&&Ot(t),Xi(i,e,n,Sn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=xt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),oe(i,o.line),Si(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?yi(t):o.line!=s.line||1!=e.text.length||Yi(t.doc,e)?yi(t,o.line,s.line+1,c):bi(t,o.line,"text");var u=Pt(t,"changes"),h=Pt(t,"change");if(h||u){var d={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&we(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function Rr(t,e,n,i,r){if(i||(i=n),F(i,n)<0){var o;o=[i,n],n=o[0],i=o[1]}"string"==typeof e&&(e=t.splitLines(e)),Lr(t,{from:n,to:i,text:e,origin:r})}function zr(t,e,n,i){n0||0==a&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ht(t,e.line,e,n,s)||e.line!=n.line&&ht(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");q()}s.addToHistory&&or(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,h=t.cm;if(t.iter(c,n.line+1,function(t){h&&s.collapsed&&!h.options.lineWrapping&&dt(t)==h.display.maxLine&&(l=!0),s.collapsed&&c!=e.line&&P(t,0),X(t,new K(s,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),s.collapsed&&t.iter(e.line,n.line+1,function(e){mt(t,e)&&P(e,0)}),s.clearOnEnter&&na(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(U(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++_a,s.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),s.collapsed)yi(h,e.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var d=e.line;d<=n.line;d++)bi(h,d,"text");s.atomic&&Sr(h.doc),we(h,"markerAdded",h,s)}return s}function Kr(t,e,n,i,r){i=u(i),i.shared=!1;var o=[qr(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Ji(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(qr(t,$(t,e),$(t,n),i,r));for(var l=0;l-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var l=t.dataTransfer.getData("Text");if(l){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),Cr(e.doc,ji(n,n)),c)for(var u=0;u=0;e--)Rr(t.doc,"",i[e].from,i[e].to,"+delete");Gn(t)})}function po(t,e,n){var i=S(t.text,e+n,n);return i<0||i>t.text.length?null:i}function go(t,e,n){var i=po(t,e.ch,n);return null==i?null:new I(e.line,i,n<0?"after":"before")}function vo(t,e,n,i,r){if(t){var o=St(n,e.doc.direction);if(o){var s,a=r<0?g(o):o[0],l=r<0==(1==a.level),c=l?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var u=Ge(e,n);s=r<0?n.text.length-1:0;var h=Ye(e,u,s).top;s=T(function(t){return Ye(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=po(n,s,1))}else s=r<0?a.to:a.from;return new I(i,s,c)}}return new I(i,r<0?n.text.length:0,r<0?"before":"after")}function mo(t,e,n,i){var r=St(e,t.doc.direction);if(!r)return go(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=kt(r,n.ch,n.sticky),s=r[o];if("ltr"==t.doc.direction&&s.level%2==0&&(i>0?s.to>n.ch:s.from=s.from&&d>=u.begin)){var f=h?"before":"after";return new I(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new I(n.line,l(t,1),"before"):new I(n.line,t,"after")};t>=0&&t0==(1!=s.level),c=a?i.begin:l(i.end,-1);if(s.from<=c&&c0?u.end:l(u.begin,-1);return null==v||i>0&&v==e.text.length||!(g=p(i>0?0:r.length-1,i,c(v)))?null:g}function yo(t,e){var n=M(t.doc,e),i=dt(n);return i!=n&&(e=L(i)),vo(!0,t,i,e,1)}function bo(t,e){var n=M(t.doc,e),i=ft(n);return i!=n&&(e=L(i)),vo(!0,t,n,e,-1)}function xo(t,e){var n=yo(t,e.line),i=M(t.doc,n.line),r=St(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return I(n.line,s?0:o,n.sticky)}return n}function wo(t,e,n){if("string"==typeof e&&!(e=Wa[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=Ws}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function Co(t,e,n){for(var i=0;i-1&&(F((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&(F(r.to(),e)>0||e.xRel<0)?Fo(t,i,e,o):zo(t,i,e,o)}function Fo(t,e,n,i){var r=t.display,o=!1,s=gi(t,function(e){ws&&(r.scroller.draggable=!1),t.state.draggingText=!1,Et(r.wrapper.ownerDocument,"mouseup",s),Et(r.wrapper.ownerDocument,"mousemove",a),Et(r.scroller,"dragstart",l),Et(r.scroller,"drop",s),o||(_t(e),i.addNew||gr(t.doc,n,null,null,i.extend),ws||bs&&9==xs?setTimeout(function(){r.wrapper.ownerDocument.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};ws&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),na(r.wrapper.ownerDocument,"mouseup",s),na(r.wrapper.ownerDocument,"mousemove",a),na(r.scroller,"dragstart",l),na(r.scroller,"drop",s),In(t),setTimeout(function(){return r.input.focus()},20)}function Ro(t,e,n){if("char"==n)return new Pa(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Pa(I(e.line,0),$(t.doc,I(e.line+1,0)));var i=n(t,e);return new Pa(i.from,i.to)}function zo(t,e,n,i){function r(e){if(0!=F(m,e))if(m=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,s=h(M(c,n.line).text,n.ch,o),a=h(M(c,e.line).text,e.ch,o),l=Math.min(s,a),g=Math.max(s,a),v=Math.min(n.line,e.line),y=Math.min(t.lastLine(),Math.max(n.line,e.line));v<=y;v++){var b=M(c,v).text,x=f(b,l,o);l==g?r.push(new Pa(I(v,x),I(v,x))):b.length>x&&r.push(new Pa(I(v,x),I(v,f(b,g,o))))}r.length||r.push(new Pa(n,n)),wr(c,Vi(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w,C=u,k=Ro(t,e,i.unit),S=C.anchor;F(k.anchor,S)>0?(w=k.head,S=V(C.from(),k.anchor)):(w=k.anchor,S=H(C.to(),k.head));var T=p.ranges.slice(0);T[d]=Ho(t,new Pa($(c,S),w)),wr(c,Vi(T,d),qs)}}function o(e){var n=++b,a=En(t,e,!0,"rectangle"==i.unit);if(a)if(0!=F(a,m)){t.curOp.focus=s(),r(a);var u=Vn(l,c);(a.line>=u.to||a.liney.bottom?20:0;h&&setTimeout(gi(t,function(){b==n&&(l.scroller.scrollTop+=h,o(e))}),50)}}function a(e){t.state.selectingText=!1,b=1/0,_t(e),l.input.focus(),Et(l.wrapper.ownerDocument,"mousemove",x),Et(l.wrapper.ownerDocument,"mouseup",w),c.history.lastSelOrigin=null}var l=t.display,c=t.doc;_t(e);var u,d,p=c.sel,g=p.ranges;if(i.addNew&&!i.extend?(d=c.sel.contains(n),u=d>-1?g[d]:new Pa(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),"rectangle"==i.unit)i.addNew||(u=new Pa(n,n)),n=En(t,e,!0,!0),d=-1;else{var v=Ro(t,n,i.unit);u=i.extend?pr(u,v.anchor,v.head,i.extend):v}i.addNew?-1==d?(d=g.length,wr(c,Vi(g.concat([u]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"char"==i.unit&&!i.extend?(wr(c,Vi(g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):mr(c,d,u,qs):(d=0,wr(c,new Oa([u],0),qs),p=c.sel);var m=n,y=l.wrapper.getBoundingClientRect(),b=0,x=gi(t,function(t){0!==t.buttons&&Rt(t)?o(t):a(t)}),w=gi(t,a);t.state.selectingText=w,na(l.wrapper.ownerDocument,"mousemove",x),na(l.wrapper.ownerDocument,"mouseup",w)}function Ho(t,e){var n=e.anchor,i=e.head,r=M(t.doc,n.line);if(0==F(n,i)&&n.sticky==i.sticky)return e;var o=St(r);if(!o)return e;var s=kt(o,n.ch,n.sticky),a=o[s];if(a.from!=n.ch&&a.to!=n.ch)return e;var l=s+(a.from==n.ch==(1!=a.level)?0:1);if(0==l||l==o.length)return e;var c;if(i.line!=n.line)c=(i.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=kt(o,i.ch,i.sticky),h=u-s||(i.ch-n.ch)*(1==a.level?-1:1);c=u==l-1||u==l?h<0:h>0}var d=o[l+(c?-1:0)],f=c==(1==d.level),p=f?d.from:d.to,g=f?"after":"before";return n.ch==p&&n.sticky==g?e:new Pa(new I(n.line,p,g),i)}function Vo(t,e,n,i){var r,o;if(e.touches)r=e.touches[0].clientX,o=e.touches[0].clientY;else try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&_t(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Pt(t,n))return Dt(e);o-=a.top-s.viewOffset;for(var l=0;l=r){return Mt(t,n,t,_(t.doc,o),t.options.gutters[l],e),Dt(e)}}}function jo(t,e){return Vo(t,e,"gutterClick",!0)}function $o(t,e){Fe(t.display,e)||Bo(t,e)||At(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function Bo(t,e){return!!Pt(t,"gutterContextMenu")&&Vo(t,e,"gutterContextMenu",!1)}function Wo(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),nn(t)}function Uo(t){Ii(t),yi(t),jn(t)}function qo(t,e,n){if(!e!=!(n&&n!=Xa)){var i=t.display.dragFunctions,r=e?na:Et;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Ko(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(zs(t.display.wrapper,"CodeMirror-wrap"),wt(t)),Tn(t),yi(t),nn(t),setTimeout(function(){return ii(t)},100)}function Go(t,e){var n=this;if(!(this instanceof Go))return new Go(t,e);this.options=e=e?u(e):{},u(Ja,e,!1),Fi(e);var i=e.value;"string"==typeof i&&(i=new Fa(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var r=new Go.inputStyles[e.inputStyle](this),o=this.display=new E(t,i,r);o.wrapper.CodeMirror=this,Ii(this),Wo(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),oi(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 Vs,keySeq:null,specialChars:null},e.autofocus&&!Ps&&o.input.focus(),bs&&xs<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Yo(this),no(),si(this),this.curOp.forceUpdate=!0,Zi(this,i),e.autofocus&&!Ps||this.hasFocus()?setTimeout(c(Fn,this),20):Rn(this);for(var s in Za)Za.hasOwnProperty(s)&&Za[s](n,e[s],Xa);$n(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;na(r.scroller,"mousedown",gi(t,_o)),bs&&xs<11?na(r.scroller,"dblclick",gi(t,function(e){if(!At(t,e)){var n=En(t,e);if(n&&!jo(t,e)&&!Fe(t.display,e)){_t(e);var i=t.findWordAt(n);gr(t.doc,i.anchor,i.head)}}})):na(r.scroller,"dblclick",function(e){return At(t,e)||_t(e)}),Rs||na(r.scroller,"contextmenu",function(e){return $o(t,e)});var o,s={end:0};na(r.scroller,"touchstart",function(e){if(!At(t,e)&&!n(e)&&!jo(t,e)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),na(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),na(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Fe(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new Pa(a,a):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(a):new Pa(I(a.line,0),$(t.doc,I(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),_t(n)}e()}),na(r.scroller,"touchcancel",e),na(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Qn(t,r.scroller.scrollTop),ei(t,r.scroller.scrollLeft,!0),Mt(t,"scroll",t))}),na(r.scroller,"mousewheel",function(e){return Hi(t,e)}),na(r.scroller,"DOMMouseScroll",function(e){return Hi(t,e)}),na(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){At(t,e)||It(e)},over:function(e){At(t,e)||(Qr(t,e),It(e))},start:function(e){return Zr(t,e)},drop:gi(t,Jr),leave:function(e){At(t,e)||to(t)}};var a=r.input.getField();na(a,"keyup",function(e){return Oo.call(t,e)}),na(a,"keydown",gi(t,Mo)),na(a,"keypress",gi(t,Po)),na(a,"focus",function(e){return Fn(t,e)}),na(a,"blur",function(e){return Rn(t,e)})}function Xo(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=Jt(t,e).state:n="prev");var s=t.options.tabSize,a=M(o,e),l=h(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==Ws||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?h(M(o,e-1).text,null,s):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",f=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)f+=s,d+="\t";if(f1)if(tl&&tl.text.join("\n")==e){if(i.ranges.length%tl.text.length==0){l=[];for(var c=0;c=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=I(f.line,f.ch-n):t.state.overwrite&&!s?p=I(p.line,Math.min(M(o,p.line).text.length,p.ch+g(a).length)):tl&&tl.lineWise&&tl.text.join("\n")==e&&(f=p=I(f.line,0))),u=t.curOp.updateInput;var m={from:f,to:p,text:l?l[h%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};Lr(t.doc,m),we(t,"inputRead",t,m)}e&&!s&&ts(t,e),Gn(t),t.curOp.updateInput=u,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Qo(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||pi(e,function(){return Zo(e,n,0,null,"paste")}),!0}function ts(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=t.getModeAt(r.head),s=!1;if(o.electricChars){for(var a=0;a-1){s=Xo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(M(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Xo(t,r.head.line,"smart"));s&&we(t,"electricInput",t,r.head.line)}}}function es(t){for(var e=[],n=[],i=0;i=t.first+t.size)&&(e=new I(i,e.ch,e.sticky),c=M(t,i))}function s(i){var s;if(null==(s=r?mo(t.cm,c,e,n):go(c,e,n))){if(i||!o())return!1;e=vo(r,t.cm,c,e.line,n)}else e=s;return!0}var a=e,l=n,c=M(t,e.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||s(!f);f=!1){var p=c.text.charAt(e.ch)||"\n",g=w(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,s(),e.sticky="after");break}if(g&&(u=g),n>0&&!s(!f))break}var v=Mr(t,e,a,l,!0);return R(a,v)&&(v.hitSide=!0),v}function os(t,e,n,i){var r,o=t.doc,s=e.left;if("page"==i){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*xn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(var c;c=fn(t,s,r),c.outside;){if(n<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*n}return c}function ss(t,e){var n=Ke(t,e.line);if(!n||n.hidden)return null;var i=M(t.doc,e.line),r=We(n,i,e.line),o=St(i,t.doc.direction),s="left";if(o){s=kt(o,e.ch)%2?"right":"left"}var a=Xe(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function as(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ls(t,e){return e&&(t.bad=!0),t}function cs(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function s(){u&&(c+=h,d&&(c+=h),u=d=!1)}function a(t){t&&(s(),c+=t)}function l(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void a(n);var c,f=e.getAttribute("cm-marker");if(f){var p=t.findMarks(I(i,0),I(r+1,0),o(+f));return void(p.length&&(c=p[0].find(0))&&a(A(t.doc,c.from,c.to).join(h)))}if("false"==e.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;g&&s();for(var v=0;v=15&&(Ss=!1,ws=!0);var Is,Fs=Ls&&(Cs||Ss&&(null==Ds||Ds<12.11)),Rs=gs||bs&&xs>=9,zs=function(e,n){var i=e.className,r=t(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(o?r[1]+o:"")}};Is=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var Hs=function(t){t.select()};As?Hs=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:bs&&(Hs=function(t){try{t.select()}catch(t){}});var Vs=function(){this.id=null};Vs.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var js,$s,Bs=30,Ws={toString:function(){return"CodeMirror.Pass"}},Us={scroll:!1},qs={origin:"*mouse"},Ks={origin:"+move"},Gs=[""],Ys=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Xs=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Js=!1,Zs=!1,Qs=null,ta=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?i.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var c="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var u=n.length,h=[],d=0;d=this.string.length},ha.prototype.sol=function(){return this.pos==this.lineStart},ha.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ha.prototype.next=function(){if(this.pose},ha.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},ha.prototype.skipToEnd=function(){this.pos=this.string.length},ha.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},ha.prototype.backUp=function(t){this.pos-=t},ha.prototype.column=function(){return this.lastColumnPos0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}var r=function(t){return n?t.toLowerCase():t};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},ha.prototype.current=function(){return this.string.slice(this.start,this.pos)},ha.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},ha.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},ha.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var da=function(t,e){this.state=t,this.lookAhead=e},fa=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};fa.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},fa.prototype.baseToken=function(t){var e=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)e.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},fa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},fa.fromSaved=function(t,e,n){return e instanceof da?new fa(t,qt(t.mode,e.state),n,e.lookAhead):new fa(t,qt(t.mode,e),n)},fa.prototype.save=function(t){var e=!1!==t?qt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new da(e,this.maxLookAhead):e};var pa=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n},ga=function(t,e,n){this.text=t,it(this,e),this.height=n?n(this):1};ga.prototype.lineNo=function(){return L(this)},Lt(ga);var va,ma={},ya={},ba=null,xa=null,wa={left:0,right:0,top:0,bottom:0},Ca=function(t,e,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,t(r),t(o),na(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),na(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,bs&&xs<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ca.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var r=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:e?i:0}},Ca.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ca.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ca.prototype.zeroWidthHack=function(){var t=Ls&&!Es?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Vs,this.disableVert=new Vs},Ca.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},Ca.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ka=function(){};ka.prototype.update=function(){return{bottom:0,right:0}},ka.prototype.setScrollLeft=function(){},ka.prototype.setScrollTop=function(){},ka.prototype.clear=function(){};var Sa={native:Ca,null:ka},Ta=0,Ea=function(t,e,n){var i=t.display;this.viewport=e,this.visible=Vn(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=je(t),this.force=n,this.dims=Cn(t),this.events=[]};Ea.prototype.signal=function(t,e){Pt(t,e)&&this.events.push(arguments)},Ea.prototype.finish=function(){for(var t=this,e=0;e=0&&F(t,r.to())<=0)return i}return-1};var Pa=function(t,e){this.anchor=t,this.head=e};Pa.prototype.from=function(){return V(this.anchor,this.head)},Pa.prototype.to=function(){return H(this.anchor,this.head)},Pa.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},$r.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,i=t,r=t+e;i1||!(this.children[0]instanceof $r))){var l=[];this.collapse(l),this.children=[new $r(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=o.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=this,r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&yi(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Sr(e.doc)),e&&we(e,"markerCleared",e,this,r,o),n&&ai(e),this.parent&&this.parent.clear()}},Na.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var i,r,o=0;o=0;c--)Lr(i,r[c]);l?xr(this,l):this.cm&&Gn(this.cm)}),undo:mi(function(){Nr(this,"undo")}),redo:mi(function(){Nr(this,"redo")}),undoSelection:mi(function(){Nr(this,"undo",!0)}),redoSelection:mi(function(){Nr(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,i=0;i=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,n){t=$(this,t),e=$(this,e);var i=[],r=t.line;return this.iter(t.line,e.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r}),i},getAllMarks:function(){var t=[];return this.iter(function(e){var n=e.markedSpans;if(n)for(var i=0;it)return e=t,!0;t-=o,++n}),$(this,I(n,e))},indexFromPos:function(t){t=$(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new I(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),I(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=M(t.doc,r.line-1).text;s&&(r=new I(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),I(r.line-1,s.length-1),r,"+transpose"))}n.push(new Pa(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return pi(t,function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var i=0;it&&0==F(e,this.pos)&&n==this.button};var Ga,Ya,Xa={toString:function(){return"CodeMirror.Init"}},Ja={},Za={};Go.defaults=Ja,Go.optionHandlers=Za;var Qa=[];Go.defineInitHook=function(t){return Qa.push(t)};var tl=null,el=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Vs,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};el.prototype.init=function(t){function e(t){if(!At(r,t)){if(r.somethingSelected())Jo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=es(r);Jo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,Us),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=tl.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=is(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=tl.text.join("\n");var l=document.activeElement;Hs(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=t.lineDiv;ns(o,r.options.spellcheck),na(o,"paste",function(t){At(r,t)||Qo(t,r)||xs<=11&&setTimeout(gi(r,function(){return n.updateFromDOM()}),20)}),na(o,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),na(o,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),na(o,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),na(o,"touchstart",function(){return i.forceCompositionEnd()}),na(o,"input",function(){n.composing||n.readFromDOMSoon()}),na(o,"copy",e),na(o,"cut",e)},el.prototype.prepareSelection=function(){var t=On(this.cm,!1);return t.focus=this.cm.state.focused,t},el.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},el.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},el.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line=e.display.viewFrom&&ss(e,i)||{node:a[0].measure.map[2],offset:0},c=r.linet.firstLine()&&(i=I(i.line-1,M(t.doc,i.line-1).length)),r.ch==M(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var o,s,a;i.line==e.viewFrom||0==(o=Mn(t,i.line))?(s=L(e.view[0].line),a=e.view[0].node):(s=L(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,c,u=Mn(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=L(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(cs(t,a,c,s,l)),d=A(t.doc,I(s,0),I(l,M(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),s++}for(var f=0,p=0,v=h[0],m=d[0],y=Math.min(v.length,m.length);fi.ch&&b.charCodeAt(b.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;h[h.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var C=I(s,f),k=I(l,d.length?g(d).length-p:0);return h.length>1||h[0]||F(C,k)?(Rr(t.doc,h,C,k,"+input"),!0):void 0},el.prototype.ensurePolled=function(){this.forceCompositionEnd()},el.prototype.reset=function(){this.forceCompositionEnd()},el.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},el.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},el.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||pi(this.cm,function(){return yi(t.cm)})},el.prototype.setUneditable=function(t){t.contentEditable="false"},el.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||gi(this.cm,Zo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},el.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},el.prototype.onContextMenu=function(){},el.prototype.resetPosition=function(){},el.prototype.needsContentAttribute=!0;var nl=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Vs,this.hasSelection=!1,this.composing=null};nl.prototype.init=function(t){function e(t){if(!At(r,t)){if(r.somethingSelected())Jo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=es(r);Jo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Us):(i.prevInput="",o.value=e.text.join("\n"),Hs(o))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm;this.createField(t);var o=this.textarea;t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),As&&(o.style.width="0px"),na(o,"input",function(){bs&&xs>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),na(o,"paste",function(t){At(r,t)||Qo(t,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),na(o,"cut",e),na(o,"copy",e),na(t.scroller,"paste",function(e){Fe(t,e)||At(r,e)||(r.state.pasteIncoming=!0,i.focus())}),na(t.lineSpace,"selectstart",function(e){Fe(t,e)||_t(e)}),na(o,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),na(o,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},nl.prototype.createField=function(t){this.wrapper=is(),this.textarea=this.wrapper.firstChild},nl.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=On(t);if(t.options.moveInputWithCursor){var r=un(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),s=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+s.top-o.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+s.left-o.left))}return i},nl.prototype.showSelection=function(t){var e=this.cm,i=e.display;n(i.cursorDiv,t.cursors),n(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},nl.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&Hs(this.textarea),bs&&xs>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",bs&&xs>=9&&(this.hasSelection=null))}},nl.prototype.getField=function(){return this.textarea},nl.prototype.supportsTouch=function(){return!1},nl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Ps||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},nl.prototype.blur=function(){this.textarea.blur()},nl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},nl.prototype.receivedFocus=function(){this.slowPoll()},nl.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},nl.prototype.fastPoll=function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},nl.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||oa(n)&&!i&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=n.value;if(r==i&&!e.somethingSelected())return!1;if(bs&&xs>=9&&this.hasSelection===r||Ls&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||i||(i="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,a=Math.min(i.length,r.length);s1e3||r.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},nl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},nl.prototype.onKeyPress=function(){bs&&xs>=9&&(this.hasSelection=null),this.fastPoll()},nl.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,i.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=u,s.style.cssText=c,bs&&xs<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!bs||bs&&xs<9)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?gi(r,Or)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=En(r,t),l=o.scroller.scrollTop;if(a&&!Ss){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&gi(r,wr)(r.doc,ji(a),Us);var c=s.style.cssText,u=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(bs?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(ws&&(d=window.scrollY),o.input.focus(),ws&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),bs&&xs>=9&&e(),Rs){It(t);var f=function(){Et(window,"mouseup",f),setTimeout(n,20)};na(window,"mouseup",f)}else setTimeout(n,50)}},nl.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},nl.prototype.setUneditable=function(){},nl.prototype.needsContentAttribute=!1,function(t){function e(e,i,r,o){t.defaults[e]=i,r&&(n[e]=o?function(t,e,n){n!=Xa&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Xa,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Ki(t)},!0),e("indentUnit",2,Ki,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){Gi(t),nn(t),yi(t)},!0),e("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var n=[],i=t.doc.first;t.doc.iter(function(t){for(var r=0;;){var o=t.text.indexOf(e,r);if(-1==o)break;r=o+e.length,n.push(I(i,o))}i++});for(var r=n.length-1;r>=0;r--)Rr(t.doc,e,n[r],I(n[r].line,n[r].ch+e.length))}}),e("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Xa&&t.refresh()}),e("specialCharPlaceholder",ue,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Ps?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Ns),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){Wo(t),Uo(t)},!0),e("keyMap","default",function(t,e,n){var i=ho(e),r=n!=Xa&&ho(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ko,!0),e("gutters",[],function(t){Fi(t.options),Uo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?kn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return ii(t)},!0),e("scrollbarStyle","native",function(t){oi(t),ii(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Fi(t.options),Uo(t)},!0),e("firstLineNumber",1,Uo,!0),e("lineNumberFormatter",function(t){return t},Uo,!0),e("showCursorWhenSelecting",!1,An,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(t,e){"nocursor"==e&&(Rn(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,qo),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,An,!0),e("singleCursorHeightPerLine",!0,An,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,Gi,!0),e("addModeClass",!1,Gi,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,Gi,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(Go),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var i=this.options,r=i[t];i[t]==n&&"mode"!=t||(i[t]=n,e.hasOwnProperty(t)&&gi(this,e[t])(this,n,r),Mt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](ho(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;ni&&(Xo(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&Gn(e));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&mr(e.doc,r,new Pa(s,u[r].to()),Us)}}}),getTokenAt:function(t,e){return ee(this,t,e)},getLineTokens:function(t,e){return ee(this,I(t),e,!0)},getTokenTypeAt:function(t){t=$(this.doc,t);var e,n=Xt(this,M(this.doc,t.line)),i=0,r=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var s=i+r>>1;if((s?n[2*s-1]:0)>=o)r=s;else{if(!(n[2*s+1]o&&(t=o,r=!0),i=M(this.doc,t)}else i=t;return an(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-bt(i):0)},defaultTextHeight:function(){return xn(this.display)},defaultCharWidth:function(){return wn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display;t=un(this,$(this.doc,t));var s=t.bottom,a=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),o.sizer.appendChild(e),"over"==i)s=t.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?s=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(s=t.bottom),a+e.offsetWidth>c&&(a=c-e.offsetWidth)}e.style.top=s+"px",e.style.left=e.style.right="","right"==r?(a=o.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(o.sizer.clientWidth-e.offsetWidth)/2),e.style.left=a+"px"),n&&Un(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:vi(Mo),triggerOnKeyPress:vi(Po),triggerOnKeyUp:Oo,triggerOnMouseDown:vi(_o),execCommand:function(t){if(Wa.hasOwnProperty(t))return Wa[t].call(null,this)},triggerElectric:vi(function(t){ts(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=$(this.doc,t),a=0;a0&&a(n.charAt(i-1));)--i;for(;r.5)&&Tn(this),Mt(this,"refresh",this)}),swapDoc:vi(function(t){var e=this.doc;return e.cm=null,Zi(this,t),nn(this),this.display.input.reset(),Yn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,we(this,"swapDoc",this,e),e}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Lt(t),t.registerHelper=function(e,i,r){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][i]=r},t.registerGlobalHelper=function(e,i,r,o){t.registerHelper(e,i,o),n[e]._global.push({pred:r,val:o})}}(Go);var il="iter insert remove copy getEditor constructor".split(" ");for(var rl in Fa.prototype)Fa.prototype.hasOwnProperty(rl)&&d(il,rl)<0&&(Go.prototype[rl]=function(t){return function(){return t.apply(this.doc,arguments)}}(Fa.prototype[rl]));return Lt(Fa),Go.inputStyles={textarea:nl,contenteditable:el},Go.defineMode=function(t){Go.defaults.mode||"null"==t||(Go.defaults.mode=t),jt.apply(this,arguments)},Go.defineMIME=$t,Go.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Go.defineMIME("text/plain","null"),Go.defineExtension=function(t,e){Go.prototype[t]=e},Go.defineDocExtension=function(t,e){Fa.prototype[t]=e},Go.fromTextArea=ds,function(t){t.off=Et,t.on=na,t.wheelEventPixels=zi,t.Doc=Fa,t.splitLines=ra,t.countColumn=h,t.findColumn=f,t.isWordChar=x,t.Pass=Ws,t.signal=Mt,t.Line=ga,t.changeEnd=$i,t.scrollbarModel=Sa,t.Pos=I,t.cmpPos=F,t.modes=la,t.mimeModes=ca,t.resolveMode=Bt,t.getMode=Wt,t.modeExtensions=ua,t.extendMode=Ut,t.copyState=qt,t.startState=Gt,t.innerMode=Kt,t.commands=Wa,t.keyMap=Ba,t.keyName=uo,t.isModifierKey=lo,t.lookupKey=ao,t.normalizeKeyMap=so,t.StringStream=ha,t.SharedTextMarker=Da,t.TextMarker=Na,t.LineWidget=La,t.e_preventDefault=_t,t.e_stopPropagation=Nt,t.e_stop=It,t.addClass=a,t.contains=o,t.rmClass=zs,t.keyNames=Ha}(Go),Go.version="5.38.0",Go})},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var i=n(0),r=i.Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:1,active:!0,private:!1,protected:!1},initialize:function(){var t=this.get("name"),e=this.get("label");t?e||this.set("label",t):this.set("name",e),this.set("name",r.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case 1:t=".";break;case 2:t="#"}return t+this.get("name")}},{TYPE_CLASS:1,TYPE_ID:2,escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=r},function(t,e,n){"use strict";var i=n(1),r=n(0),o=r.$;t.exports=r.View.extend({events:{change:"onChange"},attributes:function(){return this.model.get("attributes")},initialize:function(t){var e=this.model,n=(e.get("name"),e.target);this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=n,this.className=this.pfx+"trait",this.labelClass=this.ppfx+"label",this.fieldClass=this.ppfx+"field "+this.ppfx+"field-"+e.get("type"),this.inputhClass=this.ppfx+"input-holder",e.off("change:value",this.onValueChange),this.listenTo(e,"change:value",this.onValueChange),e.view=this,this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},setInputValue:function(t){this.getInputEl().value=t},onValueChange:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.model;this.target,i.get("name");if(n.fromTarget)this.setInputValue(i.get("value"));else{var r=this.getValueForTarget();i.setTargetValue(r,n)}},renderLabel:function(){var t=this.getLabel();this.$el.html('
'+t+"
")},getLabel:function(){var t=this.model,e=t.get("label")||t.get("name");return e.charAt(0).toUpperCase()+e.slice(1).replace(/-/g," ")},getInputEl:function(){if(!this.$input){var t=this.model,e=t.get("placeholder")||t.get("default")||"",n=t.get("type")||"text",i=t.get("min"),r=t.get("max"),s=this.getModelValue(),a=o('');s&&a.prop("value",s),i&&a.prop("min",i),r&&a.prop("max",r),this.$input=a}return this.$input.get(0)},getModelValue:function(){var t=void 0,e=this.model,n=this.target,r=e.get("name");if(e.get("changeProp"))t=n.get(r);else{var o=n.get("attributes");t=e.get("value")||o[r]}return(0,i.isUndefined)(t)?"":t},renderField:function(){if(!this.$input){this.$el.append(this.tmpl);var t=this.getInputEl(),e=this.el.querySelector("."+this.inputhClass);e.insertBefore(t,e.childNodes[0])}},render:function(){return this.renderLabel(),this.renderField(),this.el.className=this.className,this}})},function(t,e,n){"use strict";var i,r;!function(o,s){i=s,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r)}(0,function(){function t(t,e){return e=e||M,R.test(t)?e.getElementsByClassName(t.slice(1)):H.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function e(t){if(!E){E=M.implementation.createHTMLDocument(null);var e=E.createElement("base");e.href=M.location.href,E.head.appendChild(e)}return E.body.innerHTML=t,E.body.childNodes}function n(t){"loading"!==M.readyState?setTimeout(t):M.addEventListener("DOMContentLoaded",t)}function i(i,r){if(!i)return this;if(i.cash&&i!==A)return i;var o,s=i,a=0;if(I(i))s=F.test(i)?M.getElementById(i.slice(1)):z.test(i)?e(i):t(i,r);else if(D(i))return n(i),this;if(!s)return this;if(s.nodeType||s===A)this[0]=s,this.length=1;else for(o=this.length=s.length;a=0&&s.splice(i,1)):(o(s,function(n){t.removeEventListener(e,n)}),s=[]))}function x(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function w(t){var e=[];return o(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}function C(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}function k(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return C(t);case"select-multiple":return w(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function S(t,e,n){if(n){var i=t.childNodes[0];t.insertBefore(e,i)}else t.appendChild(e)}function T(t,e,n){var i=I(e);if(!i&&e.length)return void o(e,function(e){return T(t,e,n)});o(t,i?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,i){return S(t,0===i?e:e.cloneNode(!0),n)})}var E,M=document,A=window,O=Array.prototype,P=O.slice,L=O.filter,_=O.push,N=function(){},D=function(t){return typeof t==typeof N&&t.call},I=function(t){return"string"==typeof t},F=/^#[\w-]*$/,R=/^\.[\w-]*$/,z=/<.+>/,H=/^\w+$/,V=r.fn=r.prototype=i.prototype={cash:!0,length:0,push:_,splice:O.splice,map:O.map,init:i};Object.defineProperty(V,"constructor",{value:r}),r.parseHTML=e,r.noop=N,r.isFunction=D,r.isString=I,r.extend=V.extend=function(t){t=t||{};var e=P.call(arguments),n=e.length,i=1;for(1===e.length&&(t=this,i=0);i1?this.each(function(n){return n.style[t]=e}):A.getComputedStyle(this[0])[t];for(var n in t)this.css(n,t[n]);return this}}),o(["Width","Height"],function(t){var e=t.toLowerCase();V[e]=function(){return this[0].getBoundingClientRect()[e]},V["inner"+t]=function(){return this[0]["client"+t]},V["outer"+t]=function(e){return this[0]["offset"+t]+(e?m(this,"margin"+("Width"===t?"Left":"Top"))+m(this,"margin"+("Width"===t?"Right":"Bottom")):0)}}),V.extend({off:function(t,e){return this.each(function(n){return b(n,t,e)})},on:function(t,e,i,r){var o;if(!I(t)){for(var a in t)this.on(a,e,t[a]);return this}return D(e)&&(i=e,e=null),"ready"===t?(n(i),this):(e&&(o=i,i=function(t){for(var n=t.target;!s(n,e);){if(n===this)return n=!1;n=n.parentNode}n&&o.call(n,t)}),this.each(function(e){var n=i;r&&(n=function(){i.apply(this,arguments),b(e,t,n)}),y(e,t,n)}))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:n,trigger:function(t,e){var n=M.createEvent("HTMLEvents");return n.data=e,n.initEvent(t,!0,!1),this.each(function(t){return t.dispatchEvent(n)})}}),V.extend({serialize:function(){var t="";return o(this[0].elements||this,function(e){if(!e.disabled&&"FIELDSET"!==e.tagName){var n=e.name;switch(e.type.toLowerCase()){case"file":case"reset":case"submit":case"button":break;case"select-multiple":var i=k(e);null!==i&&o(i,function(e){t+=x(n,e)});break;default:var r=k(e);null!==r&&(t+=x(n,r))}}}),t.substr(1)},val:function(t){return void 0===t?k(this[0]):this.each(function(e){return e.value=t})}}),V.extend({after:function(t){return r(t).insertAfter(this),this},append:function(t){return T(this,t),this},appendTo:function(t){return T(r(t),this),this},before:function(t){return r(t).insertBefore(this),this},clone:function(){return r(this.map(function(t){return t.cloneNode(!0)}))},empty:function(){return this.html(""),this},html:function(t){if(void 0===t)return this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each(function(t){return t.innerHTML=e})},insertAfter:function(t){var e=this;return r(t).each(function(t,n){var i=t.parentNode,r=t.nextSibling;e.each(function(t){i.insertBefore(0===n?t:t.cloneNode(!0),r)})}),this},insertBefore:function(t){var e=this;return r(t).each(function(t,n){var i=t.parentNode;e.each(function(e){i.insertBefore(0===n?e:e.cloneNode(!0),t)})}),this},prepend:function(t){return T(this,t,!0),this},prependTo:function(t){return T(r(t),this,!0),this},remove:function(){return this.each(function(t){return t.parentNode.removeChild(t)})},text:function(t){return void 0===t?this[0].textContent:this.each(function(e){return e.textContent=t})}});var U=M.documentElement;return V.extend({position:function(){var t=this[0];return{left:t.offsetLeft,top:t.offsetTop}},offset:function(){var t=this[0].getBoundingClientRect();return{top:t.top+A.pageYOffset-U.clientTop,left:t.left+A.pageXOffset-U.clientLeft}},offsetParent:function(){return r(this[0].offsetParent)}}),V.extend({children:function(t){var e=[];return this.each(function(t){_.apply(e,t.children)}),e=l(e),t?e.filter(function(e){return s(e,t)}):e},closest:function(t){return!t||this.length<1?r():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=a(t);return this.each(function(i){return!(e=n(i,t))}),e},find:function(e){if(!e||e.nodeType)return r(e&&this.has(e).length?e:null);var n=[];return this.each(function(i){_.apply(n,t(e,i))}),l(n)},has:function(e){var n=I(e)?function(n){return 0!==t(e,n).length}:function(t){return t.contains(e)};return this.filter(n)},next:function(){return r(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=a(t);return this.filter(function(n){return!e(n,t)})},parent:function(){var t=[];return this.each(function(e){e&&e.parentNode&&t.push(e.parentNode)}),l(t)},parents:function(t){var e,n=[];return this.each(function(i){for(e=i;e&&e.parentNode&&e!==M.body.parentNode;)e=e.parentNode,(!t||t&&s(e,t))&&n.push(e)}),l(n)},prev:function(){return r(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter(function(t){return t!==e})}}),r})},function(t,e,n){"use strict";var i=n(1),r=n(8);t.exports=n(0).Collection.extend({model:r,getStyleable:function(){return(0,i.filter)(this.models,function(t){return t.get("active")&&!t.get("private")})},getValid:function(){return(0,i.filter)(this.models,function(t){return!t.get("private")})},getFullString:function(t){var e=[];return(t||this).forEach(function(t){return e.push(t.getFullName())}),e.join("").trim()}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0},t),this},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parseValue(t);this.set(r,i({},n,{avoidStore:1})),e&&(this.set("value","",n),this.set(r,n))},setValueFromInput:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.setValue(t,e,i({},n,{fromInput:1}))},parseValue:function(t){var e={value:t},n="!important";if((0,r.isString)(t)&&-1!==t.indexOf(n)&&(e.value=t.replace(n,"").trim(),e.important=1),!this.get("functionName"))return e;var i=[],o=""+e.value,s=o.indexOf("(")+1,a=o.lastIndexOf(")");return i.push(s),a>=0&&i.push(a),e.value=String.prototype.substring.apply(o,i),e},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=(0,r.isUndefined)(t)?this.get("value"):t;return e&&!(0,r.isUndefined)(n)&&(n=e+"("+n+")"),this.get("important")&&(n+=" !important"),n||""}})},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i);n(5),n(15),n(37),n(38),n(39),n(41),n(17),n(35);t.exports=r.default.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{},this.properties=[];var e=this.collection;this.listenTo(e,"add",this.addTo),this.listenTo(e,"reset",this.render)},addTo:function(t){this.add(t)},add:function(t,e){var n=new t.typeView({model:t,name:t.get("name"),id:this.pfx+t.get("property"),target:this.target,propTarget:this.propTarget,onChange:this.onChange,onInputRender:this.onInputRender,config:this.config});"composite"!=t.get("type")&&(n.customValue=this.customValue),n.render();var i=n.el;this.properties.push(n),e?e.appendChild(i):this.el.appendChild(i)},render:function(){var t=this;this.properties=[];var e=document.createDocumentFragment();return this.collection.each(function(n){return t.add(n,e)}),this.$el.append(e),this.$el.attr("class",this.pfx+"properties"),this}})},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=(n(18),n(5)),s=r.default.$;t.exports=o.extend({templateInput:function(){return""},init:function(){var t=this.model;this.listenTo(t,"change:unit",this.modelValueChanged),this.listenTo(t,"el:change",this.elementUpdated)},setValue:function(t){var e=this.model.parseValue(t);t=""+e.value+e.unit,this.inputInst.setValue(t,{silent:1})},onRender:function(){var t=this.ppfx;if(!this.input){var e=this.model.input;e.ppfx=t,e.render();this.el.querySelector("."+t+"fields").appendChild(e.el),this.$input=e.inputEl,this.unit=e.unitEl,this.$unit=s(this.unit),this.input=this.$input.get(0),this.inputInst=e}}})},function(t,e,n){"use strict";var i=(n(0),n(3));t.exports=i.extend({tagName:"img",events:{dblclick:"openModal",click:"initResize"},initialize:function(t){var e=this.model;i.prototype.initialize.apply(this,arguments),this.listenTo(e,"change:src",this.updateSrc),this.listenTo(e,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image";var n=this.config;n.modal&&(this.modal=n.modal),n.am&&(this.am=n.am),this.fetchFile()},fetchFile:function(){var t=this.model,e=t.get("file");if(e){this.em.get("AssetManager").FileUploader().uploadFile({dataTransfer:{files:[e]}},function(e){var n=e&&e.data&&e.data[0],i=n&&n.src;i&&t.set({src:i})}),t.set("file","")}},updateSrc:function(){var t=this.model,e=this.classEmpty,n=this.$el,i=t.get("src");t.addAttributes({src:i}),n[i?"removeClass":"addClass"](e)},openModal:function(t){var e=this.opts.config.em,n=e?e.get("Editor"):"";n&&this.model.get("editable")&&n.runCommand("open-assets",{target:this.model,types:["image"],accept:"image/*",onSelect:function(){n.Modal.close(),n.AssetManager.setTarget(null)}})},render:function(){this.updateAttributes(),this.updateClasses();var t=this.$el.attr("class")||"";return this.model.get("src")||this.$el.attr("class",(t+" "+this.classEmpty).trim()),this.$el.attr("onmousedown","return false"),this}})},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(5),s=r.default.$;t.exports=o.extend({templateInput:function(){var t=this.pfx;return'\n
\n \n
\n '},inputValueChanged:function(){if(!this.model.get("detached")){for(var t=arguments.length,e=Array(t),n=0;n'),this.input=this.$input.get(0)),this.props||(this.props=t.get("properties")),!this.$props)){this.props.each(function(e,n){e&&"composite"==e.get("type")&&(this.props.remove(e),console.warn("Nested composite types not yet allowed.")),e.parent=t},this);var i=n(14),r=new i(this.getPropsConfig());this.$props=r.render().$el,this.properties=r.properties,this.$el.find("#"+this.pfx+"input-holder").append(this.$props)}},getPropsConfig:function(t){var e=this,n=this.model,i={config:this.config,collection:this.props,target:this.target,propTarget:this.propTarget,onChange:function(t,e,i){n.set("value",n.getFullValue(),i)},customValue:function(t,n){return e.valueOnIndex(n,t)}};return n.get("detached")&&delete i.onChange,i},valueOnIndex:function(t,e){var n=void 0,i=this.getTargetValue({ignoreDefault:1});if(i){n=i.split(" ")[t]}else n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n).value),n}})},function(t,e,n){"use strict";(function(e){var i=n(1),r=n(2),o=n(36),s=n(0);s.$;t.exports=o.extend({events:{"change input":"handleChange","change select":"handleUnitChange","click [data-arrow-up]":"upArrowClick","click [data-arrow-down]":"downArrowClick","mousedown [data-arrows]":"downIncrement"},template:function(){var t=this.ppfx;return'\n \n \n
\n
\n
\n
\n '},inputClass:function(){var t=this.ppfx;return this.opts.contClass||t+"field "+t+"field-integer"},initialize:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];o.prototype.initialize.apply(this,arguments),(0,i.bindAll)(this,"moveIncrement","upIncrement"),this.doc=document,this.listenTo(this.model,"change:unit",this.handleModelChange)},setValue:function(t,e){var n=e||{},i=this.validateInputValue(t,{deepCheck:1}),r={value:i.value};(i.unit||i.force)&&(r.unit=i.unit),this.model.set(r,n),n.silent&&this.handleModelChange()},handleChange:function(t){t.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()},handleUnitChange:function(t){t.stopPropagation();var e=this.getUnitEl().value;this.model.set("unit",e),this.elementUpdated()},elementUpdated:function(){this.model.trigger("el:change")},handleModelChange:function(){var t=this.model;this.getInputEl().value=t.get("value");var e=this.getUnitEl();e&&(e.value=t.get("unit")||"")},getUnitEl:function(){if(!this.unitEl){var t=this.model,e=t.get("units")||[];if(e.length){var n=[];e.forEach(function(e){var i=e==t.get("unit")?"selected":"";n.push("")});var i=document.createElement("div");i.innerHTML='",this.unitEl=i.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=parseInt(t.get("value"),10);n=this.normalizeValue(n+e);var i=this.validateInputValue(n);t.set("value",i.value),this.elementUpdated()},downArrowClick:function(){var t=this.model,e=t.get("step"),n=parseInt(t.get("value"),10),i=this.normalizeValue(n-e),r=this.validateInputValue(i);t.set("value",r.value),this.elementUpdated()},downIncrement:function(t){t.preventDefault(),this.moved=0;var e=this.model.get("value");e=this.normalizeValue(e),this.current={y:t.pageY,val:e},(0,r.on)(this.doc,"mousemove",this.moveIncrement),(0,r.on)(this.doc,"mouseup",this.upIncrement)},moveIncrement:function(t){this.moved=1;var e=this.model,n=e.get("step"),i=this.current,r=this.normalizeValue(i.val+(i.y-t.pageY)*n);return this.prValue=this.validateInputValue(r).value,e.set("value",this.prValue,{avoidStore:1}),!1},upIncrement:function(){var t=this.model,e=t.get("step");if((0,r.off)(this.doc,"mouseup",this.upIncrement),(0,r.off)(this.doc,"mousemove",this.moveIncrement),this.prValue&&this.moved){var n=this.prValue-e;t.set("value",n,{avoidStore:1}).set("value",n+e),this.elementUpdated()}},normalizeValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.model,i=n.get("step"),r=0;if(isNaN(t))return e;if(t=parseFloat(t),Math.floor(t)!==t){var o=i.toString().split(".")[1];r=o?o.length:0}return r?parseFloat(t.toFixed(r)):t},validateInputValue:function(t,n){var r=0,o=n||{},s=this.model,a=(0,i.isUndefined)(t)?"":t,l=s.get("units")||[],c=s.get("unit")||l.length&&l[0]||"",u=s.get("max"),h=s.get("min");if(o.deepCheck){var d=s.get("fixedValues")||[];if(a){var f=new RegExp("^"+d.join("|"),"g");if(d.length&&f.test(a))a=a.match(f)[0],c="",r=1;else{var p=a+"";a+="",a=parseFloat(a.replace(",",".")),a=isNaN(a)?"":a;var g=p.replace(a,"");e.indexOf(l,g)>=0&&(c=g)}}}return(0,i.isUndefined)(u)||""===u||(a=a>u?u:a),(0,i.isUndefined)(h)||""===h||(a=a1&&void 0!==arguments[1]?arguments[1]:{};if(t){var n=e.ctrlKey||e.metaKey,i=e.shiftKey,r=this.editor,s=r.getConfig("multipleSelection"),a=this.em;if(n&&s)r.selectToggle(t);else if(i&&s){a.clearSelection(r.Canvas.getWindow());var l=t.collection,c=l.indexOf(t),u=(r.getSelectedAll(),void 0),h=void 0;if(r.getSelectedAll().forEach(function(t){var e=t.collection,n=e.indexOf(t);e===l&&(nc&&(h=(0,o.isUndefined)(h)?n:Math.min(h,n)))}),!(0,o.isUndefined)(u))for(;u!==c;)r.selectAdd(l.at(u)),u++;if(!(0,o.isUndefined)(h))for(;h!==c;)r.selectAdd(l.at(h)),h--;r.selectAdd(t)}else r.select(t);this.initResize(t)}},updateBadge:function(t,e){var n=c(t),i=this.canvas,r=i.getConfig(),o=r.customBadgeLabel;this.cacheEl=t;var s=n.data("model");if(s&&s.get("badgable")){var a=this.getBadge(),l=s.getIcon()+s.getName();l=o?o(s):l,a.innerHTML=l;var u=a.style;u.display="block";var h=i.getCanvasView().getPosition();if(h){var d=a?a.offsetHeight:0,f=a?a.offsetWidth:0,p=e.top-d1&&void 0!==arguments[1]?arguments[1]:{},i=n.el,r=n.config,o=n.resizer,a=r.keyHeight,l=r.keyWidth,c=r.currentUnit;v("add",0,n),g=e.get("StyleManager").getModelToStyle(h);var d=getComputedStyle(i),f=g.getStyle(),p=f[l]||d[l],m=f[a]||d[a];o.startDim.w=parseFloat(p),o.startDim.h=parseFloat(m),u=0,c&&(r.unitHeight=(0,s.getUnitFromValue)(m),r.unitWidth=(0,s.getUnitFromValue)(p))},onMove:function(){n.trigger("change:canvasOffset")},onEnd:function(t,e){v("remove",0,e),n.trigger("change:canvasOffset"),u=1},updateTarget:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(g){var r=i.store,o=i.selectedHandler,s=i.config,a=s.keyHeight,l=s.keyWidth,c=["tc","bc"].indexOf(o)>=0,u=["cl","cr"].indexOf(o)>=0,h=g.getStyle();c||(h[l]=n.w+s.unitWidth),u||(h[a]=n.h+s.unitHeight),g.setStyle(h,{avoidStore:1});e&&e.trigger("update:component:style:"+a+" update:component:style:"+l),r&&g.trigger("change:style",g,h,{})}}},"object"==(void 0===d?"undefined":r(d))&&(p=i({},p,d)),n.runCommand("resize",{el:f,options:p})):n.stopCommand("resize")},updateToolbar:function(t){var e=this.config.em,n=t==e?e.getSelected():t,i=this.canvas.getToolbarEl(),r=i.style;if(!n)return void(r.opacity=0);var o=n.get("toolbar");this.ppfx;if(e.get("Config").showToolbar&&o&&o.length){if(r.opacity="",r.display="",!this.toolbar){i.innerHTML="",this.toolbar=new l(o);var s=new a({collection:this.toolbar,editor:this.editor});i.appendChild(s.render().el)}this.toolbar.reset(o);var c=n.view;c&&this.updateToolbarPos(c.el)}else r.display="none"},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style,r=i.display;i.display="block";var o=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"});if(o){var s=o.left+o.elementWidth-o.targetWidth;i.top=o.top+"px",i.left=(s<0?0:s)+"px",i.display=r}},getCanvasPosition:function(){return this.canvas.getCanvasView().getPosition()},clean:function(){this.selEl&&this.selEl.removeClass(this.hoverClass)},getBadge:function(){return this.canvas.getBadgeEl()},onFrameScroll:function(t){var e=this.cacheEl;if(e){var n=this.getElementPos(e);this.updateBadge(e,n);var i=this.em.getSelected();i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(t){var e=this.em.getSelected();if(e){var n=e.view;this.updateToolbarPos(n.el),this.showFixedElementOffset(n.el)}},getElementPos:function(t,e){return this.canvas.getCanvasView().getElementPos(t)},hideBadge:function(){this.getBadge().style.display="none"},cleanPrevious:function(t){t&&t.set({status:"",state:""})},getContentWindow:function(){return this.frameEl.contentWindow},run:function(t){this.editor=t&&t.get("Editor"),this.enable(),this.onSelect()},stop:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.em;this.stopSelectComponent(),!n.preserveSelected&&i.setSelected(null),this.clean(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",i.off("component:update",this.updateAttached,this),i.off("change:canvasOffset",this.updateAttached,this)}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(1),o=i(r),s=n(0),a=i(s),l=n(57),c=a.default.$;t.exports=o.default.extend({},l,{init:function(t){o.default.bindAll(this,"startDraw","draw","endDraw","rollback"),this.config=t||{},this.hType=this.config.newFixedH?"height":"min-height",this.allowDraw=1},enable:function(){for(var t=arguments.length,e=Array(t),n=0;n0;for(o in C)(!C[o]&&n(i.mods,+o)>-1||C[o]&&-1==n(i.mods,+o))&&(a=!1);(0!=i.mods.length||C[16]||C[18]||C[17]||C[91])&&!a||!1===i.method(t,i)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function s(t){var e,i=t.keyCode,r=n(M,i);if(r>=0&&M.splice(r,1),93!=i&&224!=i||(i=91),i in C){C[i]=!1;for(e in S)S[e]==i&&(l[e]=!1)}}function a(){for(x in C)C[x]=!1;for(x in S)l[x]=!1}function l(t,e,n){var i,r;i=v(t),void 0===n&&(n=e,e="all");for(var o=0;o1&&(r=m(t),t=[t[t.length-1]]),t=t[0],t=E(t),t in w||(w[t]=[]),w[t].push({shortcut:i[o],scope:e,method:n,key:i[o],mods:r})}function c(t,e){var n,r,o,s,a,l=[];for(n=v(t),s=0;s1&&(l=m(r),t=r[r.length-1]),t=E(t),void 0===e&&(e=p()),!w[t])return;for(o=0;o=0&&o0?0:a-1;return arguments.length<3&&(r=n[s?s[l]:l],l+=t),e(n,i,r,s,l,a)}}function o(t){return function(e,n,i){n=S(n,i);for(var r=O(e),o=t>0?0:r-1;o>=0&&o0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(p.call(i,s,a),C.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=A};C.each=C.forEach=function(t,e,n){e=k(e,n);var i,r;if(P(t))for(i=0,r=t.length;i=0},C.invoke=function(t,e){var n=p.call(arguments,2),i=C.isFunction(e);return C.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t){t=P(t)?t:C.values(t);for(var a=0,l=t.length;ao&&(o=i)}else e=S(e,n),C.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},C.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t){t=P(t)?t:C.values(t);for(var a=0,l=t.length;ai||void 0===n)return 1;if(ne?(s&&(clearTimeout(s),s=null),a=c,o=t.apply(i,r),s||(i=r=null)):s||!1===n.trailing||(s=setTimeout(l,u)),o}},C.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=C.now()-s;c=0?i=setTimeout(l,e-c):(i=null,n||(a=t.apply(o,r),i||(o=r=null)))};return function(){o=this,r=arguments,s=C.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,i=t[e].apply(this,arguments);n--;)i=t[n].call(this,i);return i}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return D&&a(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return D&&a(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},z=C.invert(R),H=function(t){var e=function(e){return t[e]},n="(?:"+C.keys(t).join("|")+")",i=RegExp(n),r=RegExp(n,"g");return function(t){return t=null==t?"":""+t,i.test(t)?t.replace(r,e):t}};C.escape=H(R),C.unescape=H(z),C.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),C.isFunction(i)?i.call(t):i};var V=0;C.uniqueId=function(t){var e=++V+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var j=/(.)^/,$={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},B=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+$[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.templateSettings);var i=RegExp([(e.escape||j).source,(e.interpolate||j).source,(e.evaluate||j).source].join("|")+"|$","g"),r=0,o="__p+='";t.replace(i,function(e,n,i,s,a){return o+=t.slice(r,a).replace(B,W),r=a+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?o+="'+\n((__t=("+i+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var a=function(t){return s.call(this,t,C)};return a.source="function("+(e.variable||"obj")+"){\n"+o+"}",a},C.chain=function(t){var e=C(t);return e._chain=!0,e};var U=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return f.apply(t,arguments),U(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),C.each(["concat","join","slice"],function(t){var e=u[t];C.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},i=[],void 0!==(r=function(){return C}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(77),r=function(t){return t&&t.__esModule?t:{default:t}}(i);window.Promise=window.Promise||r.default,e.default="function"==typeof fetch?fetch.bind():function(t,e){return new r.default(function(n,i){var o=new XMLHttpRequest;o.open(e.method||"get",t),o.withCredentials="include"==e.credentials;for(var s in e.headers||{})o.setRequestHeader(s,e.headers[s]);o.onload=function(t){return n({status:o.status,statusText:o.statusText,text:function(){return r.default.resolve(o.responseText)}})},o.onerror=i,o.upload&&e.onProgress&&(o.upload.onprogress=e.onProgress),e.body?o.send(e.body):o.send()})}},function(t,e,n){"use strict";t.exports=function(t){var e=t;return{compTypes:"",parseStyle:function(t){for(var e={},n=t.split(";"),i=0,r=n.length;i*\/]/.test(n)?i(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):("u"==n||"U"==n)&&t.match(/rl(-prefix)?\(/i)||("d"==n||"D"==n)&&t.match("omain(",!0,!0)||("r"==n||"R"==n)&&t.match("egexp(",!0,!0)?(t.backUp(1),e.tokenize=s,i("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),i("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?i("variable-2","variable-definition"):i("variable-2","variable")):t.match(/^\w+-/)?i("meta","meta"):void 0}function o(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),i("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),i(null,"(")}function a(t,e,n){this.type=t,this.indent=e,this.prev=n}function l(t,e,n,i){return t.context=new a(n,e.indentation()+(!1===i?0:v),t.context),n}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,n){return L[n.context.type](t,e,n)}function h(t,e,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return u(t,e,n)}function d(t){var e=t.current().toLowerCase();g=M.hasOwnProperty(e)?"atom":E.hasOwnProperty(e)?"keyword":"variable"}var f=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var p,g,v=e.indentUnit,m=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},x=n.mediaFeatures||{},w=n.mediaValueKeywords||{},C=n.propertyKeywords||{},k=n.nonStandardPropertyKeywords||{},S=n.fontProperties||{},T=n.counterDescriptors||{},E=n.colorKeywords||{},M=n.valueKeywords||{},A=n.allowNested,O=n.lineComment,P=!0===n.supportsAtComponent,L={};return L.top=function(t,e,n){if("{"==t)return l(n,e,"block");if("}"==t&&n.context.prev)return c(n);if(P&&/@component/i.test(t))return l(n,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return l(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return l(n,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(n,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(n,e,"interpolation");if(":"==t)return"pseudo";if(A&&"("==t)return l(n,e,"parens")}return n.context.type},L.block=function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return C.hasOwnProperty(i)?(g="property","maybeprop"):k.hasOwnProperty(i)?(g="string-2","maybeprop"):A?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":A||"hash"!=t&&"qualifier"!=t?L.top(t,e,n):(g="error","block")},L.maybeprop=function(t,e,n){return":"==t?l(n,e,"prop"):u(t,e,n)},L.prop=function(t,e,n){if(";"==t)return c(n);if("{"==t&&A)return l(n,e,"propBlock");if("}"==t||"{"==t)return h(t,e,n);if("("==t)return l(n,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)d(e);else if("interpolation"==t)return l(n,e,"interpolation")}else g+=" error";return"prop"},L.propBlock=function(t,e,n){return"}"==t?c(n):"word"==t?(g="property","maybeprop"):n.context.type},L.parens=function(t,e,n){return"{"==t||"}"==t?h(t,e,n):")"==t?c(n):"("==t?l(n,e,"parens"):"interpolation"==t?l(n,e,"interpolation"):("word"==t&&d(e),"parens")},L.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(g="variable-3",n.context.type):u(t,e,n)},L.documentTypes=function(t,e,n){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",n.context.type):L.atBlock(t,e,n)},L.atBlock=function(t,e,n){if("("==t)return l(n,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,n);if("{"==t)return c(n)&&l(n,e,A?"block":"top");if("interpolation"==t)return l(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();g="only"==i||"not"==i||"and"==i||"or"==i?"keyword":b.hasOwnProperty(i)?"attribute":x.hasOwnProperty(i)?"property":w.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":k.hasOwnProperty(i)?"string-2":M.hasOwnProperty(i)?"atom":E.hasOwnProperty(i)?"keyword":"error"}return n.context.type},L.atComponentBlock=function(t,e,n){return"}"==t?h(t,e,n):"{"==t?c(n)&&l(n,e,A?"block":"top",!1):("word"==t&&(g="error"),n.context.type)},L.atBlock_parens=function(t,e,n){return")"==t?c(n):"{"==t||"}"==t?h(t,e,n,2):L.atBlock(t,e,n)},L.restricted_atBlock_before=function(t,e,n){return"{"==t?l(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,n)},L.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,c(n)):"word"==t?(g="@font-face"==n.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},L.keyframes=function(t,e,n){return"word"==t?(g="variable","keyframes"):"{"==t?l(n,e,"top"):u(t,e,n)},L.at=function(t,e,n){return";"==t?c(n):"{"==t||"}"==t?h(t,e,n):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},L.interpolation=function(t,e,n){return"}"==t?c(n):"{"==t||";"==t?h(t,e,n):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||r)(t,e);return n&&"object"==typeof n&&(p=n[1],n=n[0]),g=n,"comment"!=p&&(e.state=L[e.state](p,t,e)),g},indent:function(t,e){var n=t.context,i=e&&e.charAt(0),r=n.indent;return"prop"!=n.type||"}"!=i&&")"!=i||(n=n.prev),n.prev&&("}"!=i||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=i||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=i||"at"!=n.type&&"atBlock"!=n.type)||(r=Math.max(0,n.indent-v)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:O,fold:"brace"}});var i=["domain","regexp","url","url-prefix"],r=e(i),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=e(h),f=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],p=e(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],v=e(g),m=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(m),b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],x=e(b),w=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],C=e(w),k=i.concat(o).concat(a).concat(c).concat(h).concat(f).concat(b).concat(w);t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:v,counterDescriptors:y,colorKeywords:x,valueKeywords:C,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:v,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(t,e)):["operator","operator"]},":":function(t){return!!t.match(/\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:v,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:v,counterDescriptors:y,colorKeywords:x,valueKeywords:C,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css",helperType:"gss"})})},function(t,e,n){"use strict";var i=n(0),r=n(30);t.exports=i.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[],attributes:{}},initialize:function(t){this.btn=this.get("buttons")||[],this.buttons=new r(this.btn),this.set("buttons",this.buttons)}})},function(t,e,n){"use strict";var i=n(0),r=n(112);t.exports=i.Collection.extend({model:r,deactivateAllExceptOne:function(t,e){this.forEach(function(n,i){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},deactivateAll:function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&(t.set("active",!1),t.get("buttons").length&&t.get("buttons").deactivateAll(e))})},disableAllButtons:function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&(t.set("disable",!0),t.get("buttons").length&&t.get("buttons").disableAllButtons(e))})},disableAllButtonsExceptOne:function(t,e){this.forEach(function(n,i){n!==t&&(n.set("disable",!0),e&&n.get("buttons").length&&n.get("buttons").disableAllButtonsExceptOne(t,e))})}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n=e.model,r=void 0===n?{}:n,s=e.view,a=void 0===s?{}:s,l=this.getType(t);if(l)return new l.view(i({model:new l.model(r),config:o},a))},render:function(){return e.render().el}}}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var n=t.Model,i=t.View;e.default={types:[],initialize:function(t,e){var n=this;this.model=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=void 0,r=void 0,o=void 0;if(t&&t.type){var s=n.getBaseType();o=n.getType(t.type),i=o?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);o=a.type,i=o.model,r=o.view,t=a.attributes}var l=new i(t,e);return l.typeView=r,l};var i=this.init&&this.init.bind(this);i&&i()},recognizeType:function(t){for(var e=this.getTypes(),n=0;n0&&void 0!==arguments[0]&&arguments[0];return this.get("properties").each(function(t){return t.clearValue()}),r.prototype.clearValue.apply(this,arguments)},updateValues:function(){var t=this.getFullValue().split(this.get("separator"));this.get("properties").each(function(e,n){var i=t.length;t[n]||t[n%i+(1!=i&&i%2?1:0)]})},getDefaultValue:function(t){var e=this.get("defaults");return e&&!t?e:(e="",this.get("properties").each(function(t,n){return e+=t.getDefaultValue()+" "}),e.trim())},getFullValue:function(){return this.get("detached")?"":this.get("properties").getFullValue()}})},function(t,e,n){"use strict";var i=n(17),r=n(127);t.exports=i.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\n \n
\n
\n '},init:function(){var t=this.model;this.pfx;t.set("stackIndex",null),this.events["click [data-add-layer]"]="addLayer",this.listenTo(t,"change:stackIndex",this.indexChanged),this.listenTo(t,"updateValue",this.inputValueChanged),this.delegateEvents()},clear:function(t){t&&t.stopPropagation(),this.model.get("layers").reset(),this.model.clearValue(),this.targetUpdated()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n'},inputClass:function(){return this.ppfx+"field"},holderClass:function(){return this.ppfx+"input-holder"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.opts=t,this.ppfx=e,this.em=t.target||{},this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},setValue:function(t){var e=this.model,n=t||e.get("defaults"),i=this.getInputEl();i&&(i.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},handleChange:function(t){t.stopPropagation();var e=this.getInputEl().value;this.model.set({value:e},{fromInput:1}),this.elementUpdated()},getInputEl:function(){if(!this.inputEl){var t=this.model.get("defaults")||"";this.inputEl=r('')}return this.inputEl.get(0)},render:function(){var t=this.$el;return t.addClass(this.inputClass()),t.html(this.template()),t.find("."+this.holderClass()).append(this.getInputEl()),this}})},function(t,e,n){"use strict";t.exports=n(5).extend({templateInput:function(){var t=(this.pfx,this.ppfx);return'\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.ppfx,n=e+"radio-item-label",i=this.model,r=i.get("property"),o=i.get("list")||i.get("options")||[];if(!this.input&&o&&o.length){var s="";o.forEach(function(i){var o=i.className?i.className+" "+t+"icon "+n:"",a=r+"-"+i.value,l=i.name||i.value,c=i.title?'title="'+i.title+'"':"";s+='\n
\n \n \n
\n "});var a=this.el.querySelector("."+e+"field");a.innerHTML='
'+s+"
",this.input=a.firstChild}},getInputValue:function(){var t=this.getCheckedEl();return t?t.value:""},getCheckedEl:function(){var t=this.getInputEl();return t?t.querySelector("input:checked"):""},setValue:function(t){var e=this.model,n=t||e.get("value")||e.getDefaultValue(),i=this.getInputEl(),r=i?i.querySelector('[value="'+n+'"]'):"";if(r)r.checked=!0;else{var o=this.getCheckedEl();o&&(o.checked=!1)}}})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(0),o=i(r),s=n(5),a=i(s);o.default.$;t.exports=a.default.extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},initialize:function(){for(var t=arguments.length,e=Array(t),n=0;n"+e+""});var i=this.el.querySelector("#"+t+"input-holder");i.innerHTML="",this.input=i.firstChild}}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};e=i({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new r({target:this.target,model:this.model,ppfx:t}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.$color=n.colorEl,this.input=this.$input.get(0),this.inputInst=n}}})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=Object.assign||function(t){for(var e=1;e\n
\n
\n
\n
\n
\n '},inputClass:function(){var t=this.ppfx;return t+"field "+t+"field-color"},holderClass:function(){return this.ppfx+"input-holder"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,i=n.get("defaults"),r=(0,a.isUndefined)(t)?(0,a.isUndefined)(i)?"":i:t,o=this.getInputEl(),s=this.getColorEl(),l="none"!=r?r:"";o.value=r,s.get(0).style.backgroundColor=l,e.fromTarget&&(s.spectrum("set",l),this.noneColor="none"==r)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.ppfx,n=this.model,i=h('
'),o=i.get(0).style,s=this.em&&this.em.config?this.em.config.el:"",a=this.em&&this.em.getConfig&&this.em.getConfig("colorPicker")||{},l=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},c=0,u=void 0;this.$el.find("[data-colorp-c]").append(i),i.spectrum(r({containerClassName:e+"one-bg "+e+"two-color",appendTo:s||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[]},a,{move:function(t){var e=l(t);o.backgroundColor=e,n.setValueFromInput(e,0)},change:function(e){c=1;var i=l(e);o.backgroundColor=i,n.setValueFromInput(i),t.noneColor=0},show:function(t){c=0,u=l(t)},hide:function(e){!c&&u&&(t.noneColor&&(u=""),o.backgroundColor=u,i.spectrum("set",u),n.setValueFromInput(u,0))}})),this.colorEl=i}return this.colorEl},render:function(){return u.prototype.render.call(this),this.getColorEl(),this}})},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(5),s=r.default.$;t.exports=o.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n '},init:function(){var t=this.em;this.modal=t.get("Modal"),this.am=t.get("AssetManager"),this.events["click #"+this.pfx+"close"]="removeFile",this.events["click #"+this.pfx+"images"]="openAssetManager",this.delegateEvents()},onRender:function(){if(!this.$input){var t=this.model.getDefaultValue();this.$input=s('')}this.$preview||(this.$preview=this.$el.find("#"+this.pfx+"preview-file")),this.$previewBox||(this.$previewBox=this.$el.find("#"+this.pfx+"preview-box")),this.setValue(this.componentValue,0)},setValue:function(t,e){o.prototype.setValue.apply(this,arguments),this.setPreviewView(t&&t!=this.model.getDefaultValue()),this.setPreview(t)},setPreviewView:function(t){var e=this.$previewBox;e&&e[t?"addClass":"removeClass"](this.pfx+"show")},spreadUrl:function(t){this.model.set("value",t),this.setPreviewView(1)},setPreview:function(t){var e=this.$preview;t=t&&t.indexOf("url(")<0?"url("+t+")":t,e&&e.css("background-image",t)},cleanValue:function(){this.setPreviewView(0),this.model.set({value:""},{silent:!0})},removeFile:function(){this.model.set("value",this.model.getDefaultValue());for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:[];return this.set("options",t),this},addOption:function(t){if(t){var e=this.getOptions();this.setOptions([].concat(i(e),[t]))}return this}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0,unit:void 0},t),this},parseValue:function(t){var e=o.prototype.parseValue.apply(this,arguments),n=this.input.validateInputValue(e.value,{deepCheck:1}),i=n.value,r=n.unit;return e.value=i,e.unit=r,e},getFullValue:function(){var t=this.get("value"),e=this.get("unit");return t=(0,r.isUndefined)(t)?"":t,e=!(0,r.isUndefined)(e)&&t?e:"",t=""+t+e,o.prototype.getFullValue.apply(this,[t])}})},function(t,e,n){"use strict";t.exports=n(45).extend({events:{"click [data-toggle=asset-remove]":"onRemove",click:"onClick",dblclick:"onDblClick"},getPreview:function(){var t=this.pfx;return'\n
\n
\n '},getInfo:function(){var t=this.pfx,e=this.model,n=e.get("name"),i=e.get("width"),r=e.get("height"),o=e.get("unitDim"),s=i&&r?i+"x"+r+o:"";return n=n||e.getFilename(),'\n
'+n+'
\n
'+s+"
\n "},init:function(t){var e=this.pfx;this.className+=" "+e+"asset-image"},onClick:function(){var t=this.config.onClick,e=this.model;this.collection.trigger("deselectAll"),this.$el.addClass(this.pfx+"highlight"),"function"==typeof t?t(e):this.updateTarget(this.collection.target)},onDblClick:function(){var t=this.em,e=this.config.onDblClick,n=this.model;"function"==typeof e?e(n):(this.updateTarget(this.collection.target),t&&t.get("Modal").close());var i=this.collection.onSelect;"function"==typeof i&&i(this.model)},onRemove:function(t){t.stopImmediatePropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=r.default.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t,this.collection=t.collection;var e=t.config||{};this.config=e,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.em=e.em,this.className=this.pfx+"asset",this.listenTo(this.model,"destroy remove",this.remove),this.model.view=this;var n=this.init&&this.init.bind(this);n&&n(t)},template:function(){var t=this.pfx;return'\n
\n '+this.getPreview()+'\n
\n
\n '+this.getInfo()+'\n
\n
\n ⨯\n
\n '},updateTarget:function(t){t&&t.set&&(t.set("attributes",e.clone(t.get("attributes"))),t.set("src",this.model.get("src")))},getPreview:function(){return""},getInfo:function(){return""},render:function(){var t=this.el;return t.innerHTML=this.template(this,this.model),t.className=this.className,this}})}).call(e,n(1))},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(1),o=i(r),s=n(0),a=i(s),l=n(26),c=i(l);t.exports=a.default.View.extend({template:o.default.template('\n
\n
<%= title %>
\n multiple/>\n
\n
\n '),events:{},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t;var e=t.config||{};this.config=e,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.target=this.options.globalCollection||{},this.uploadId=this.pfx+"uploadFile",this.disabled=void 0!==e.disableUpload?e.disableUpload:!e.upload&&!e.embedAsBase64,this.events["change #"+this.uploadId]="uploadFile";var n=e.uploadFile;n?this.uploadFile=n.bind(this):e.embedAsBase64&&(this.uploadFile=this.constructor.embedAsBase64),this.delegateEvents()},onUploadStart:function(){var t=this.config.em;t&&t.trigger("asset:upload:start")},onUploadEnd:function(t){var e=this.config.em;e&&e.trigger("asset:upload:end",t)},onUploadError:function(t){var e=this.config.em;console.error(t),this.onUploadEnd(t),e&&e.trigger("asset:upload:error",t)},onUploadResponse:function(t,e){var n=this.config.em,i=this.config,r=this.target,o="string"==typeof t?JSON.parse(t):t;n&&n.trigger("asset:upload:response",o),i.autoAdd&&r&&r.add(o.data,{at:0}),this.onUploadEnd(t),e&&e(o)},uploadFile:function(t,e){for(var n=this,i=t.dataTransfer?t.dataTransfer.files:t.target.files,r=new FormData,o=this.config,s=o.params,a=0;a'+i.dropzoneContent+""),h(),"draggable"in o&&[o,a].forEach(function(t){t.ondragover=d,t.ondragleave=f,t.ondrop=p})},render:function(){return this.$el.html(this.template({title:this.config.uploadText,uploadId:this.uploadId,disabled:this.disabled,pfx:this.pfx})),this.initDrop(),this.$el.attr("class",this.pfx+"file-uploader"),this}},{embedAsBase64:function(t,e){var n=this,i=t.dataTransfer?t.dataTransfer.files:t.target.files,r={data:[]};if(!FileReader)return void this.onUploadError(new Error("Unsupported platform, FileReader is not defined"));var o=[],s=/^(.+)\/(.+)$/,a=!0,l=!1,c=void 0;try{for(var u,h=i[Symbol.iterator]();!(a=(u=h.next()).done);a=!0){var d=u.value;!function(t){var e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var o=void 0,a=t.name,l=s.exec(t.type);if("image"===(o=l?l[1]:t.type)){var c={src:i.result,name:a,type:o,height:0,width:0},u=new Image;u.addEventListener("error",function(t){n(t)}),u.addEventListener("load",function(){c.height=u.height,c.width=u.width,e(c)}),u.src=c.src}else e(o?{src:i.result,name:a,type:o}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});o.push(e)}(d)}}catch(t){l=!0,c=t}finally{try{!a&&h.return&&h.return()}finally{if(l)throw c}}Promise.all(o).then(function(t){r.data=t,n.onUploadResponse(r,e)},function(t){n.onUploadError(t)})}})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(1),o=i(r),s=n(0),a=i(s),l=n(48),c=i(l),u=n(11);t.exports=a.default.Model.extend(c.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0,atRuleType:"",singleAtRule:0,important:0},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config=t||{};var n=e.em,i=this.config.selectors||[];if(this.em=n,n){var r=n.get("SelectorManager"),o=[];i.forEach(function(t){o.push(r.add(t))}),i=o}this.set("selectors",new u(i))},getAtRule:function(){var t=this.get("atRuleType"),e=this.get("mediaText"),n=t?"@"+t:e?"@media":"";return n+(e&&n?" "+e:"")},selectorsToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.get("state"),i=this.get("selectorsAdd"),r=this.get("selectors").getFullString(),o=n?":"+n:"";return r&&e.push(""+r+o),i&&!t.skipAdd&&e.push(i),e.join(", ")},getDeclaration:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="",n=this.selectorsToString(),i=this.styleToString(t),r=this.get("singleAtRule");return(n||r)&&i&&(e=r?i:n+"{"+i+"}"),e},toCSS:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="",n=this.getAtRule(),i=this.getDeclaration(t);return i&&(e=i),n&&e&&(e=n+"{"+e+"}"),e},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;n3&&void 0!==arguments[3]?arguments[3]:{},r=e||"",s=n||"",a=i.selectorsAdd||"",l=i.atRuleType||"";t instanceof Array||t.models||(t=[t]);var c=o.default.map(t.models||t,function(t){return t.get("name")}),u=o.default.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.isString)(e)&&(e=l(e));var s=this.getStyle(),a=i({},e);this.set("style",a,n);var c=(0,o.shallowDiff)(s,a);return(0,r.keys)(c).forEach(function(e){var n=t.em;t.trigger("change:style:"+e),n&&(n.trigger("styleable:change",t,e),n.trigger("styleable:change:"+e,t,e))}),a},addStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"string"==typeof t?t={prop:e}:n=e||{},t=this.extendStyle(t),this.setStyle(t,n)},removeStyle:function(t){var e=this.getStyle();delete e[t],this.setStyle(e)},styleToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.getStyle();for(var i in n){var o=t.important,s=(0,r.isArray)(o)?o.indexOf(i)>=0:o,a=n[i]+(s?" !important":"");e.push(i+":"+a+";")}return e.join("")}}},function(t,e,n){"use strict";t.exports=n(0).View.extend({tagName:"style",initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{};var e=this.model;this.listenTo(e,"change:style change:state change:mediaText",this.render),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e.get("selectors"),"change",this.render)},render:function(){var t=this.model,e=t.get("important");return this.el.innerHTML=this.model.toCSS({important:e}),this}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.View.extend({itemView:"",itemsView:"",itemType:"type",initialize:function(t,e){this.config=e||{}},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=this.itemView,r=t.get(this.itemType);this.itemsView&&this.itemsView[r]&&(i=this.itemsView[r]);var o=new i({model:t,config:this.config},this.config),s=o.render().el;n?n.appendChild(s):this.$el.append(s)},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.length&&this.collection.each(function(e){this.add(e,t)},this),this.$el.append(t),this}})},function(t,e,n){"use strict";var i=n(1),r=n(0);t.exports=r.Collection.extend({initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.listenTo(this,"add",this.onAdd),this.config=e.config,this.em=e.em,this.model=function(t,n){var i,r=e.componentTypes;n.em=e.em,n.config=e.config,n.componentTypes=r;for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.em.get("CssComposer"),i=this.em.get("Parser").parseHtml(t);if(t=i.html,i.css&&n){var o=e.avoidUpdateStyle;n.addCollection(i.css,{extend:1,avoidUpdateStyle:o})}}return r.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,e,n){var r=this.em,o=t.getStyle(),s=r&&r.getConfig("avoidInlineStyle");if(!(0,i.isEmpty)(o)&&!s&&r&&r.get&&r.getConfig("forceClass")){var a=t.cid;r.get("CssComposer").setClassRule(a,o);t.setStyle({}),t.addClass(a)}}})},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1);t.exports=r.default.View.extend({initialize:function(t){this.opts=t||{},this.config=t.config||{};var e=this.collection;this.listenTo(e,"add",this.addTo),this.listenTo(e,"reset",this.resetChildren),this.listenTo(e,"remove",this.removeChildren)},removeChildren:function(t){var e=this.config.em,n=t.view;if(n){n.remove.apply(n);var i=n.childrenView;i&&i.stopListening(),e&&e.trigger("component:remove",t)}},addTo:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),n=this.config.em,i=this.collection.indexOf(t);this.addToCollection(t,null,i),n&&!e.temporary&&n.trigger("component:add",t)},addToCollection:function(t,e,i){this.compView||(this.compView=n(3));for(var r=e||null,s=this.compView,a=this.opts.componentTypes,l=t.get("type"),c=0;c0&&void 0!==arguments[0]?arguments[0]:{};return n=r({},s.default,e),n.stylePrefix=e.pStylePrefix,t=n.em,this},getConfig:function(){return n},onLoad:function(){e=new l.default({level:0,config:n,opened:n.opened||{},model:t.get("DomComponents").getWrapper()}),t&&t.on("component:selected",this.componentChanged),this.componentChanged()},postRender:function(){var t=n.appendTo,e=n.root;if(e&&this.setRoot(e),t){((0,c.isElement)(t)?t:document.querySelector(t)).appendChild(this.render())}},setRoot:function(t){return e.setRoot(t),this},getRoot:function(){return e.model},getAll:function(){return e},componentChanged:function(e){if(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).fromLayers){var i=t.get("opened"),r=t.getSelected(),o=n.scrollLayers,s=r&&r.collection?r.collection.parent:null;for(var a in i)i[a].set("open",0);for(;s;)s.set("open",1),i[s.cid]=s,s=s.collection?s.collection.parent:null;if(r&&o){var l=r.viewLayer&&r.viewLayer.el;l&&l.scrollIntoView(o)}}},render:function(){return e.render().el}}}},function(t,e,n){"use strict";var i=n(1),r=n(2),o=n(0),s=function(t){return t&&t.__esModule?t:{default:t}}(o),a=n(3),l=s.default.$,c=void 0;t.exports=s.default.View.extend({events:{"mousedown [data-toggle-move]":"startSort","click [data-toggle-visible]":"toggleVisibility","click [data-toggle-select]":"handleSelect","mouseover [data-toggle-select]":"handleHover","click [data-toggle-open]":"toggleOpening","dblclick [data-name]":"handleEdit","focusout [data-name]":"handleEditEnd"},template:function(t){var e=this.pfx,n=this.ppfx,i=this.config.hidable,r=this.countChildren(t),o=r?"":this.clsNoChild,s=this.clsTitle+" "+o,a=this.clsTitleC+" "+n+"one-bg",l=this.clsCaret+" fa fa-chevron-right",c=this.inputNameCls+" "+n+"no-app",u=this.level+1,h=30+10*u+"px",d=t.getName();return"\n "+(i?'':"")+'\n
\n
\n
\n \n '+t.getIcon()+'\n '+d+'\n
\n
\n
\n
'+(r||"")+'
\n
\n \n
\n
'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t,this.level=t.level,this.config=t.config,this.em=t.config.em,this.ppfx=this.em.get("Config").stylePrefix,this.sorter=t.sorter||"",this.pfx=this.config.stylePrefix;var e=this.pfx,n=this.ppfx,i=this.model,r=i.get("components");i.set("open",!1),this.listenTo(r,"remove add change reset",this.checkChildren),this.listenTo(i,"change:status",this.updateStatus),this.listenTo(i,"change:open",this.updateOpening),this.listenTo(i,"change:style:display",this.updateVisibility),this.className=e+"layer no-select "+n+"two-color",this.inputNameCls=n+"layer-name",this.clsTitleC=e+"layer-title-c",this.clsTitle=e+"layer-title",this.clsCaret=e+"layer-caret",this.clsCount=e+"layer-count",this.clsMove=e+"layer-move",this.clsChildren=e+"layer-children",this.clsNoChild=e+"layer-no-chld",this.$el.data("model",i),this.$el.data("collection",r),i.viewLayer=this},getVisibilityEl:function(){return this.eyeEl||(this.eyeEl=this.$el.children("."+this.pfx+"layer-vis")),this.eyeEl},updateVisibility:function(){var t=this.pfx,e=this.model,n=t+"layer-hidden",i="none"==e.getStyle().display,r=i?"addClass":"removeClass";this.$el[r](n),this.getVisibilityEl()[r]("fa-eye-slash")},toggleVisibility:function(t){t&&t.stopPropagation();var e=this.model,n=e.getStyle();"none"==n.display?delete n.display:n.display="none",e.setStyle(n)},handleEdit:function(t){t&&t.stopPropagation();var e=this.getInputName();e.contentEditable=!0,e.focus()},handleEditEnd:function(t){t&&t.stopPropagation();var e=this.getInputName(),n=e.textContent;e.contentEditable=!1,this.model.set({name:n})},getInputName:function(){return this.inputName||(this.inputName=this.el.querySelector("."+this.inputNameCls)),this.inputName},updateOpening:function(){var t=this.opt.opened||{},e=this.model;e.get("open")?(this.$el.addClass("open"),this.getCaret().addClass("fa-chevron-down"),t[e.cid]=e):(this.$el.removeClass("open"),this.getCaret().removeClass("fa-chevron-down"),delete t[e.cid])},toggleOpening:function(t){t.stopPropagation(),this.model.get("components").length&&this.model.set("open",!this.model.get("open"))},handleSelect:function(t){t.stopPropagation();var e=this.em,n=this.config;if(e){var i=this.model;e.setSelected(i,{fromLayers:1});var r=n.scrollCanvas;r&&e.get("Canvas").scrollTo(i,r)}},handleHover:function(t){t.stopPropagation();var e=this.em,n=this.config,i=this.model;e&&n.showHover&&e.setHovered(i,{fromLayers:1})},startSort:function(t){t.stopPropagation();var e=this.sorter;0===t.button&&e&&e.startSort(t.target)},freeze:function(){this.$el.addClass(this.pfx+"opac50"),this.model.set("open",0)},unfreeze:function(){this.$el.removeClass(this.pfx+"opac50")},updateStatus:function(t){a.prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover}])},isVisible:function(){var t=this.model.get("style"),e=t.display;if(!e||"none"!=e)return 1},checkChildren:function(){var t=this.model,e=this.countChildren(t),n=(this.pfx,this.clsNoChild),i=this.$el.children("."+this.clsTitleC).children("."+this.clsTitle);this.cnt||(this.cnt=this.$el.children("."+this.clsCount)),e?(i.removeClass(n),this.cnt.html(e)):(i.addClass(n),this.cnt.empty(),t.set("open",0))},countChildren:function(t){var e=0;return t.get("components").each(function(t){var n=this.opt.isCountable,i=this.config.hideTextnode;n&&!n(t,i)||e++},this),e},getCaret:function(){if(!this.caret||!this.caret.length){this.pfx;this.caret=this.$el.children("."+this.clsTitleC).find("."+this.clsCaret)}return this.caret},setRoot:function(t){t=(0,i.isString)(t)?this.em.getWrapper().find(t)[0]:t;var e=(0,r.getModel)(t,l);e&&(this.stopListening(),this.model=e,this.initialize(this.opt),this.render())},render:function(){var t=this.model,e=this.pfx,r=this.isVisible(),o=this.$el.empty(),s=this.level+1;(0,i.isUndefined)(c)&&(c=n(182));var a=new c({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:s}).render().$el;return this.config.showWrapper||1!==s?(o.html(this.template(t)),o.find("."+this.clsChildren).append(a)):o.append(a),t.get("draggable")&&this.config.sortable||o.children("."+this.clsMove).remove(),!r&&(this.className+=" "+e+"hide"),o.attr("class",this.className),this.updateOpening(),this.updateStatus(),this.updateVisibility(),this}})},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=r.default.$;t.exports={startSelectPosition:function(t,e){this.isPointed=!1;var n=this.editorModel.get("Utils");n&&!this.sorter&&(this.sorter=new n.Sorter({container:this.getCanvasBody(),placer:this.canvas.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,direction:"a",document:e,wmargin:1,nested:1,em:this.editorModel,canvasRelative:1})),t&&this.sorter.startSort(t)},getOffsetDim:function(){var t=this.offset(this.canvas.getFrameEl()),e=this.offset(this.canvas.getElement());return{top:t.top-e.top,left:t.left-e.left}},stopSelectPosition:function(){this.posTargetCollection=null,this.posIndex="after"==this.posMethod&&0!==this.cDim.length?this.posIndex+1:this.posIndex,this.sorter&&(this.sorter.moved=0,this.sorter.endMove()),this.cDim&&(this.posIsLastEl=0!==this.cDim.length&&"after"==this.posMethod&&this.posIndex==this.cDim.length,this.posTargetEl=0===this.cDim.length?o(this.outsideElem):!this.posIsLastEl&&this.cDim[this.posIndex]?o(this.cDim[this.posIndex][5]).parent():o(this.outsideElem),this.posTargetModel=this.posTargetEl.data("model"),this.posTargetCollection=this.posTargetEl.data("model-comp"))},enable:function(){this.startSelectPosition()},nearFloat:function(t,e,n){var i=t||0,r=e||"before",o=n.length,s=0!==o&&"after"==r&&i==o;return 0!==o&&(!s&&!n[i][4]||n[i-1]&&!n[i-1][4]||s&&!n[i-1][4])?1:0},run:function(){this.enable()},stop:function(){this.stopSelectPosition(),this.$wrapper.css("cursor",""),this.$wrapper.unbind()}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(1),o=i(r),s=n(0),a=(i(s),n(23));t.exports=o.default.extend({},a,{init:function(){for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},o=i.container;if(!o)throw new Error("'container' is required");i=r({},n,i),i.el=(0,c.isElement)(o)?o:document.querySelector(o);var s=new l.default(i).init();return i.plugins.forEach(function(e){var n=t.get(e);n?n(s,i.pluginsOpts[e]||{}):console.warn("Plugin "+e+" not found")}),s.getModel().loadOnStart(),i.autorender&&s.render(),e.push(s),s}}}()},function(t,e,n){"use strict";var i=n(10),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=function(t){var e=t||{},i=n(62),o=n(63),s=n(229);for(var a in i)a in e||(e[a]=i[a]);e.pStylePrefix=e.stylePrefix;var l=new o(e),c=new s({model:l,config:e});return{$:r.default,editor:l,DomComponents:l.get("DomComponents"),LayerManager:l.get("LayerManager"),CssComposer:l.get("CssComposer"),StorageManager:l.get("StorageManager"),AssetManager:l.get("AssetManager"),BlockManager:l.get("BlockManager"),TraitManager:l.get("TraitManager"),SelectorManager:l.get("SelectorManager"),CodeManager:l.get("CodeManager"),Commands:l.get("Commands"),Keymaps:l.get("Keymaps"),Modal:l.get("Modal"),Panels:l.get("Panels"),StyleManager:l.get("StyleManager"),Canvas:l.get("Canvas"),UndoManager:l.get("UndoManager"),DeviceManager:l.get("DeviceManager"),RichTextEditor:l.get("RichTextEditor"),Utils:l.get("Utils"),Config:l.get("Config"),init:function(){return l.init(this),this},getConfig:function(t){return l.getConfig(t)},getHtml:function(t){return l.getHtml(t)},getCss:function(t){return l.getCss(t)},getJs:function(){return l.getJs()},getComponents:function(){return l.get("DomComponents").getComponents()},setComponents:function(t){return l.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return l.get("CssComposer").getAll()},setStyle:function(t){return l.setStyle(t),this},getSelected:function(){return l.getSelected()},getSelectedAll:function(){return l.getSelectedAll()},getSelectedToStyle:function(){var t=l.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return l.setSelected(t),this},selectAdd:function(t){return l.addSelected(t),this},selectRemove:function(t){return l.removeSelected(t),this},selectToggle:function(t){return l.toggleSelected(t),this},setDevice:function(t){return l.set("device",t),this},getDevice:function(){return l.get("device")},runCommand:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0,i=l.get("Commands").get(t);return i&&(n=i.callRun(this,e)),n},stopCommand:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0,i=l.get("Commands").get(t);return i&&(n=i.callStop(this,e)),n},store:function(t){return l.store(t)},load:function(t){return l.load(t)},getContainer:function(){return e.el},getDirtyCount:function(){return l.getDirtyCount()},refresh:function(){l.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return l.on(t,e)},off:function(t,e){return l.off(t,e)},trigger:function(t){return l.trigger.apply(l,arguments)},destroy:function(){return l.destroyAll()},getEl:function(){return c.el},getModel:function(){return l},render:function(){var t=this;return l.on("loaded",function(){t.UndoManager.clear(),l.get("modules").forEach(function(t){t.postRender&&t.postRender(c)})}),c.render(),c.el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",style:"",fromElement:0,noticeOnUnload:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",baseCss:"\n * {\n box-sizing: border-box;\n }\n html, body, #wrapper {\n min-height: 100%;\n }\n body {\n margin: 0;\n height: 100%;\n background-color: #fff\n }\n #wrapper {\n overflow: auto;\n overflow-x: hidden;\n }\n\n * ::-webkit-scrollbar-track {\n background: rgba(0, 0, 0, 0.1)\n }\n\n * ::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2)\n }\n\n * ::-webkit-scrollbar {\n width: 10px\n }\n ",protectedCss:"* { box-sizing: border-box; } body {margin: 0;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",keepEmptyTextNodes:0,jsInHtml:!0,nativeDnD:1,multipleSelection:1,exportWrapper:0,wrappesIsBody:1,avoidInlineStyle:0,avoidDefaults:0,clearStyles:0,el:"",undoManager:{},assetManager:{},canvas:{},layers:{},storageManager:{},rte:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{devices:[{name:"Desktop",width:""},{name:"Tablet",width:"768px",widthMedia:"992px"},{name:"Mobile landscape",width:"568px",widthMedia:"768px"},{name:"Mobile portrait",width:"320px",widthMedia:"480px"}]},styleManager:{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"]}]},blockManager:{},traitManager:{},textViewCode:"Code",keepUnusedStyles:0}},function(t,e,n){"use strict";function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:{};this.config=e,this.set("Config",e),this.set("modules",[]),this.set("toLoad",[]),this.set("storables",[]),e.el&&e.fromElement&&(this.config.components=e.el.innerHTML),this.attrsOrig=e.el?[].concat(i(e.el.attributes)).reduce(function(t,e){return t[e.nodeName]=e.nodeValue,t},{}):"",a.forEach(function(e){return t.loadModule(e)}),this.on("change:componentHovered",this.componentHovered,this),this.on("change:changesCount",this.updateChanges,this),[{from:"change:selectedComponent",to:"component:toggled"}].forEach(function(e){var n=e.from,i=e.to;t.listenTo(t,n,function(){for(var e=arguments.length,r=Array(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.canAutoload()?this.load(i):i()},updateChanges:function(){var t=this.get("StorageManager"),e=this.get("changesCount");this.config.noticeOnUnload&&e?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null,t.isAutosave()&&e>=t.getStepsBeforeSave()&&this.store()},loadModule:function(t){var e=this.config,n=new t,i=n.name.charAt(0).toLowerCase()+n.name.slice(1),o=e[i]||e[n.name]||{};o.pStylePrefix=e.pStylePrefix||"";var s=this.get("StorageManager");if(n.storageKey&&n.store&&n.load&&s){o.stm=s;var a=this.get("storables");a.push(n),this.set("storables",a)}return o.em=this,n.init(r({},o)),!n.private&&this.set(n.name,n),n.onLoad&&this.get("toLoad").push(n),this.get("modules").push(n),this},init:function(t){this.set("Editor",t)},getEditor:function(){return this.get("Editor")},handleUpdates:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.temporary||(u&&clearInterval(u),u=setTimeout(function(){i.avoidStore||n.set("changesCount",n.get("changesCount")+1,i)},0))},componentHovered:function(t,e,n){var i=this.previous("componentHovered");i&&this.trigger("component:unhovered",i,n),e&&this.trigger("component:hovered",e,n)},getSelected:function(){return this.get("selected").last()},getSelectedAll:function(){return this.get("selected").models},setSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,o.isArray)(t),r=i?t:[t],a=this.get("selected");i&&this.removeSelected(a.filter(function(t){return!(0,o.contains)(r,t)})),r.forEach(function(t){var r=(0,s.getModel)(t,h);r&&!r.get("selectable")||(!i&&e.removeSelected(a.filter(function(t){return t!==r})),e.addSelected(r,n))})},addSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,s.getModel)(t,h);((0,o.isArray)(i)?i:[i]).forEach(function(t){t&&!t.get("selectable")||e.get("selected").push(t,n)})},removeSelected:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.get("selected").remove((0,s.getModel)(t,h),e)},toggleSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,s.getModel)(t,h);((0,o.isArray)(i)?i:[i]).forEach(function(t){e.get("selected").contains(t)?e.removeSelected(t,n):e.addSelected(t,n)})},setHovered:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,s.getModel)(t,h);n&&!n.get("hoverable")||(e.forceChange&&this.set("componentHovered",""),this.set("componentHovered",n,e))},setComponents:function(t){return this.get("DomComponents").setComponents(t)},getComponents:function(){var t=this.get("DomComponents"),e=this.get("CodeManager");if(t&&e){var n=t.getComponents();return e.getCode(n,"json")}},setStyle:function(t){for(var e=this.get("CssComposer").getAll(),n=0,i=e.length;n"+i+"<\/script>":""},getCss:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.config,n=e.wrappesIsBody,i=t.avoidProtected,r=(0,o.isUndefined)(t.keepUnusedStyles)?e.keepUnusedStyles:t.keepUnusedStyles,s=this.get("CssComposer"),a=this.get("DomComponents").getComponent();return(i?"":e.protectedCss)+this.get("CodeManager").getCode(a,"css",{cssc:s,wrappesIsBody:n,keepUnusedStyles:r})},getJs:function(){var t=this.get("DomComponents").getWrapper();return this.get("CodeManager").getCode(t,"js").trim()},store:function(t){var e=this,n=this.get("StorageManager"),i={};if(n)return this.get("storables").forEach(function(t){var e=t.store(1);for(var n in e)i[n]=e[n]}),n.store(i,function(n){t&&t(n),e.set("changesCount",0),e.trigger("storage:store",i)}),i},load:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getCacheLoad(1,function(n){t.get("storables").forEach(function(t){return t.load(n)}),e&&e(n)})},getCacheLoad:function(t,e){var n=this,i=t?1:0;if(this.cacheLoad&&!i)return this.cacheLoad;var r=this.get("StorageManager"),o=[];if(!r)return{};this.get("storables").forEach(function(t){var e=t.storageKey;e="function"==typeof e?e():e,(e instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),setTimeout(function(){return n.trigger("storage:load",t)},0)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.get("Commands").get(this.config.defaultCommand);e&&!this.defaultRunning&&(e.stop(this,this,t),e.run(this,this,t),this.defaultRunning=1)},stopDefault:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.get("Commands").get(this.config.defaultCommand);e&&(e.stop(this,this,t),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},getCurrentMedia:function(){var t=this.config,e=this.getDeviceModel(),n=t.mediaCondition,i=t.devicePreviewMode,r=e&&e.get("widthMedia");return e&&r&&!i?"("+n+": "+r+")":""},getWrapper:function(){return this.get("DomComponents").getWrapper()},getDirtyCount:function(){return this.get("changesCount")},destroyAll:function(){var t=this.attributes,e=t.DomComponents,n=t.CssComposer,i=t.UndoManager,r=t.Panels,o=t.Canvas;e.clear(),n.clear(),i.clear().removeAll(),r.getPanels().reset(),o.getCanvasView().remove(),this.view.remove(),this.stopListening(),h(this.config.el).empty().attr(this.attrsOrig)},setEditing:function(t){return this.set("editing",t),this},isEditing:function(){return!!this.get("editing")},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),(0,o.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}})},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";t.exports=function(){var t=n(66),e=n(67),i=n(68);return{name:"Utils",init:function(){return this},Sorter:t,Resizer:e,Dragger:i}}},function(t,e,n){"use strict";(function(e){var i=Object.assign||function(t){for(var e=1;es+c-10||ra+l-10)return 1},getCurrentPos:function(){var t=this.eventMove;return{x:t.pageX||0,y:t.pageY||0}},getDim:function(t){var e,n,i,r;if(this.canvasRelative&&this.em){var o=this.em.get("Canvas").getElementPos(t),s=window.getComputedStyle(t),a=parseFloat(s.marginTop),l=parseFloat(s.marginBottom),c=parseFloat(s.marginRight),u=parseFloat(s.marginLeft);e=o.top-a,n=o.left-u,i=o.height+a+l,r=o.width+u+c}else{var h=this.offset(t);e=this.relative?t.offsetTop:h.top-(this.wmargin?-1:1)*this.elT,n=this.relative?t.offsetLeft:h.left-(this.wmargin?-1:1)*this.elL,i=t.offsetHeight,r=t.offsetWidth}return[e,n,i,r]},getChildrenDim:function(t){var e=[];if(!t)return e;var n=this.getTargetModel(t);n&&n.view&&!this.ignoreViewChildren&&(t=n.view.getChildrenContainer());for(var i=t.children,r=0,o=i.length;rs||s>a+c-r||l+r>o||o>l+u-r)&&(i=1),!!i},findPosition:function(t,e,n){for(var i={index:0,method:"before"},r=0,o=0,s=0,a=0,l=0,c=0,u=0,h=0,d=0,f=t.length;do||a&&c>=a||r&&s0&&void 0!==arguments[0]?arguments[0]:{};return i(this,t),this.setOptions(e),(0,o.bindAll)(this,"handleKeyDown","handleMouseDown","move","stop"),this}return r(t,[{key:"getConfig",value:function(){return this.opts}},{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opts=(0,o.defaults)(t,a),this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=this.container;for(i||(i=document.createElement("div"),i.className=e+"resizer-c",n.appendChild(i),this.container=i);i.firstChild;)i.removeChild(i.firstChild);var r={};["tl","tc","tr","cl","cr","bl","bc","br"].forEach(function(e){return r[e]=t[e]?l(e,t):""});for(var o in r){var s=r[o];s&&i.appendChild(s)}this.handlers=r,this.mousePosFetcher=t.mousePosFetcher,this.updateTarget=t.updateTarget,this.posFetcher=t.posFetcher,this.onStart=t.onStart,this.onMove=t.onMove,this.onEnd=t.onEnd}},{key:"toggleFrames",value:function(t){if(this.opts.silentFrames){var e=document.querySelectorAll("iframe");(0,o.each)(e,function(e){return e.style.pointerEvents=t?"none":""})}}},{key:"isHandler",value:function(t){var e=this.handlers;for(var n in e)if(e[n]===t)return!0;return!1}},{key:"getFocusedEl",value:function(){return this.el}},{key:"getDocumentEl",value:function(){return[this.el.ownerDocument,document]}},{key:"getElementPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.posFetcher||"";return n?n(t,e):c(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.opts,n=this.getElementPos(t,{target:"container"}),i=this.container,r=i.style;e.avoidContainerUpdate||(r.left=n.left+"px",r.top=n.top+"px",r.width=n.width+"px",r.height=n.height+"px",r.display="block"),(0,s.on)(this.getDocumentEl(),"mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){this.container.style.display="none",this.el&&((0,s.off)(this.getDocumentEl(),"mousedown",this.handleMouseDown),this.el=null)}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.el,n=this,i=this.opts||{},r="data-"+i.prefix+"handler",a=this.getElementPos(e,{target:"el"});this.handlerAttr=t.target.getAttribute(r),this.clickedHandler=t.target,this.startDim={t:a.top,l:a.left,w:a.width,h:a.height},this.rectDim={t:a.top,l:a.left,w:a.width,h:a.height},this.startPos={x:t.clientX,y:t.clientY};var l=this.getDocumentEl();(0,s.on)(l,"mousemove",this.move),(0,s.on)(l,"keydown",this.handleKeyDown),(0,s.on)(l,"mouseup",this.stop),(0,o.isFunction)(this.onStart)&&this.onStart(t,{docs:l,config:i,el:e,resizer:n}),this.toggleFrames(1),this.move(t)}}},{key:"move",value:function(t){var e=this.onMove,n=this.mousePosFetcher,i=n?n(t):{x:t.clientX,y:t.clientY};this.currentPos=i,this.delta={x:i.x-this.startPos.x,y:i.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),e&&e(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.opts,n=this.getDocumentEl();(0,s.off)(n,"mousemove",this.move),(0,s.off)(n,"keydown",this.handleKeyDown),(0,s.off)(n,"mouseup",this.stop),this.updateRect(1),this.toggleFrames(),(0,o.isFunction)(this.onEnd)&&this.onEnd(t,{docs:n,config:e})}},{key:"updateRect",value:function(t){var e=this.el,n=this,i=this.opts,r=this.rectDim,s=this.container.style,a=this.updateTarget,l=this.getSelectedHandler(),c=i.unitHeight,u=i.unitWidth,h=i.keyWidth,d=i.keyHeight;if((0,o.isFunction)(a))a(e,r,{store:t,selectedHandler:l,resizer:n,config:i});else{var f=e.style;f[h]=r.w+u,f[d]=r.h+c}var p=this.getElementPos(e,{target:"container"});i.avoidContainerUpdate||(s.left=p.left+"px",s.top=p.top+"px",s.width=p.width+"px",s.height=p.height+"px")}},{key:"getSelectedHandler",value:function(){var t=this.handlers;if(this.selectedHandler)for(var e in t)if(t[e]===this.selectedHandler)return e}},{key:"handleKeyDown",value:function(t){27===t.keyCode&&(this.rectDim=this.startDim,this.stop(t))}},{key:"handleMouseDown",value:function(t){var e=t.target;this.isHandler(e)?(this.selectedHandler=e,this.start(t)):e!==this.el&&(this.selectedHandler="",this.blur())}},{key:"calc",value:function(t){var e=void 0,n=this.opts||{},i=n.step,r=this.startDim,o=n.minDim,a=n.maxDim,l=t.delta.x,c=t.delta.y,u=r.w,h=r.h,d={t:0,l:0,w:u,h:h};if(t){var f=t.handlerAttr;~f.indexOf("r")&&(e=(0,s.normalizeFloat)(u+l*i,i),e=Math.max(o,e),a&&(e=Math.min(a,e)),d.w=e),~f.indexOf("b")&&(e=(0,s.normalizeFloat)(h+c*i,i),e=Math.max(o,e),a&&(e=Math.min(a,e)),d.h=e),~f.indexOf("l")&&(e=(0,s.normalizeFloat)(u-l*i,i),e=Math.max(o,e),a&&(e=Math.min(a,e)),d.w=e),~f.indexOf("t")&&(e=(0,s.normalizeFloat)(h-c*i,i),e=Math.max(o,e),a&&(e=Math.min(a,e)),d.h=e);var p=n.ratioDefault?!t.keys.shift:t.keys.shift;if(f.indexOf("c")<0&&p){var g=r.w/r.h;d.w/d.h>g?d.h=Math.round(d.w/g):d.w=Math.round(d.h*g)}return~f.indexOf("l")&&(d.l=r.w-d.w),~f.indexOf("t")&&(d.t=r.h-d.h),d}}}]),t}();t.exports={init:function(t){return new u(t)}}},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=r.default.$,s=function(t,e){var n=e||window,i=t.getBoundingClientRect();return{left:i.left+n.pageXOffset,top:i.top+n.pageYOffset,width:i.width,height:i.height}};t.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):s(t)},init:function(t){return this.setOptions(t),this.handleMouseDown=this.handleMouseDown.bind(this),this.drag=this.drag.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),this.setKey("up, right, down, left",this.handleKey),this},setOptions:function(t){this.opts=t||{}},focus:function(t){if(!t||t!==this.el){this.getDocumentEl(t),this.blur(),this.el=t,this.handlers=this.opts.dragHandlers||[t];var e=this.getElementRect(t);this.elRect=e,this.startTop=e.top,this.startLeft=e.left,this.getDocumentEl().on("mousedown",this.handleMouseDown)}},blur:function(){this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null},start:function(t){this.startPos=this.getMousePos(t);var e=this.getDocumentEl();e.on("mousemove",this.drag),e.on("mouseup",this.stop);var n=this.opts.onStart;"function"==typeof n&&n(t,{docs:e,el:this.el,start:this.startPos,elRect:this.elRect}),this.drag(t)},stop:function(t){var e=this.getDocumentEl();e.off("mousemove",this.drag),e.off("mouseup",this.stop),this.lockedAxis=null;var n=this.opts.onEnd;"function"==typeof n&&n(t,{docs:e,delta:this.delta,end:{x:this.startLeft+this.delta.x,y:this.startTop+this.delta.y}})},handleMouseDown:function(t){var e=t.target;this.isHandler(e)&&this.start(t)},isHandler:function(t){var e=this.handlers;for(var n in e)if(e[n]===t)return!0;return!1},handleKey:function(t,e){switch(e.shortcut){case"up":this.move(0,-1);break;case"right":this.move(1,0);break;case"down":this.move(0,1);break;case"left":this.move(-1,0)}},getDocumentEl:function(t){var t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=o(e)}return this.$doc},getMousePos:function(t){var e=this.opts.mousePosFetcher;return e?e(t):{x:t.clientX,y:t.clientY}},drag:function(t){var e=this.lockedAxis,n=this.getMousePos(t),i={x:n.x-this.startPos.x,y:n.y-this.startPos.y};if(t.shiftKey){if(!e){var r=i.x,o=i.y,s=Math.abs(r),a=Math.abs(o);o>=s||o<=-s?e="x":(r>a||r<-a)&&(e="y")}}else e=null;"x"===e&&(i.x=this.startPos.x),"y"===e&&(i.y=this.startPos.y),this.lockedAxis=e,this.delta=i,this.move(i.x,i.y);var l=this.opts.onDrag;"function"==typeof l&&l(t,{delta:i,current:{x:this.startLeft+i.x,y:this.startTop+i.y},lockedAxis:e}),0===t.which&&this.stop(t)},move:function(t,e){this.moveX(t),this.moveY(e)},moveX:function(t){var e=this.el,n=(this.opts,this.startLeft+t),i=this.opts.setX;"function"==typeof i?i(n,{el:e,start:this.startLeft,delta:t}):e.style.left=n+"px"},moveY:function(t){var e=this.el,n=(this.opts,this.startTop+t),i=this.opts.setY;"function"==typeof i?i(n,{el:e,start:this.startTop,delta:t}):e.style.top=n+"px"}}},function(t,e,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return e=r({},a,n),t=e.em,this.em=t,this},onLoad:function(){var t=e.defaults;for(var n in t){var i=t[n];this.add(n,i.keys,i.handler)}},add:function(t,e,r){var a=this.em,l=a.get("Commands"),c=a.getEditor(),u={id:t,keys:e,handler:r};return n[t]&&this.remove(t),n[t]=u,s(e,function(e,n){r=(0,o.isString)(r)?l.get(r):r,"object"==(void 0===r?"undefined":i(r))?r.run(c):r(c);var s=[t,n.shortcut,e];a.trigger.apply(a,["keymap:emit"].concat(s)),a.trigger.apply(a,["keymap:emit:"+t].concat(s))}),a.trigger("keymap:add",u),u},get:function(t){return n[t]},getAll:function(){return n},remove:function(t){var e=this.em,i=this.get(t);if(i)return delete n[t],s.unbind(i.keys),e&&e.trigger("keymap:remove",i),i}}}},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};n=i({},a,s),t=n.em,this.em=t,e=new o.default({track:!0,register:[]}),e.changeUndoType("change",{condition:!1}),e.changeUndoType("add",{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.avoidStore)return{object:e,before:void 0,after:t,options:i({},n)}}}),e.changeUndoType("remove",{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.avoidStore)return{object:e,before:t,after:void 0,options:i({},n)}}});var l={on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!r&&(r=t.previousAttributes()),!n.avoidStore){var i={object:t,before:r,after:t.toJSON()};return r=null,i}},undo:function(t,e,n,i){t.set(e)},redo:function(t,e,n,i){t.set(n)}};return["style","attributes","content","src"].forEach(function(t){return e.addUndoType("change:"+t,l)}),e.on("undo redo",function(){return t.trigger("component:toggled change:canvasOffset")}),["undo","redo"].forEach(function(n){return e.on(n,function(){return t.trigger(n)})}),this},getConfig:function(){return n},add:function(t){return e.register(t),this},remove:function(t){return e.unregister(t),this},removeAll:function(){return e.unregisterAll(),this},start:function(){return e.startTracking(),this},stop:function(){return e.stopTracking(),this},undo:function(){return t.get("Canvas").isInputFocused()||e.undo(1),this},undoAll:function(){return e.undoAll(),this},redo:function(){return t.get("Canvas").isInputFocused()||e.redo(1),this},redoAll:function(){return e.redoAll(),this},hasUndo:function(){return e.isAvailable("undo")},hasRedo:function(){return e.isAvailable("redo")},getStack:function(){return e.stack},clear:function(){return e.clear(),this},getInstance:function(){return e}}}},function(t,e,n){var i,r,o;/*! +/*! grapesjs - 0.14.25 */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.grapesjs=e():t.grapesjs=e()}(window,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=235)}([function(t,e,n){(function(i){var r,o;!function(s){var a="object"==typeof self&&self.self===self&&self||"object"==typeof i&&i.global===i&&i;r=[n(1),n(20),e],void 0===(o=function(t,e,n){a.Backbone=function(t,e,n,i){var r=t.Backbone,o=Array.prototype.slice;e.VERSION="1.3.3",e.$=i,e.noConflict=function(){return t.Backbone=r,this},e.emulateHTTP=!1,e.emulateJSON=!1;var s=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=function(t,e,i){switch(t){case 1:return function(){return n[e](this[i])};case 2:return function(t){return n[e](this[i],t)};case 3:return function(t,r){return n[e](this[i],a(t,this),r)};case 4:return function(t,r,o){return n[e](this[i],a(t,this),r,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}}(e,r,i))})},a=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?l(t):n.isString(t)?function(e){return e.get(t)}:t},l=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},c=e.Events={},u=/\s+/,h=function(t,e,i,r,o){var s,a=0;if(i&&"object"==typeof i){void 0!==r&&"context"in o&&void 0===o.context&&(o.context=r);for(s=n.keys(i);athis.length&&(r=this.length),r<0&&(r+=this.length+1);var o,s,a=[],l=[],c=[],u=[],h={},d=e.add,f=e.merge,p=e.remove,g=!1,v=this.comparator&&null==r&&!1!==e.sort,m=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),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(D,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var i=document.body,r=i.insertBefore(this.iframe,i.firstChild).contentWindow;r.document.open(),r.document.close(),r.location.hash="#"+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),L.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!L.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;""!==t&&"?"!==t.charAt(0)||(n=n.slice(0,-1)||"/");var i=n+t;if(t=this.decodeFragment(t.replace(I,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var r=this.iframe.contentWindow;e.replace||(r.document.open(),r.document.close()),this._updateHash(r.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var i=t.href.replace(/(javascript:|#).*$/,"");t.replace(i+"#"+e)}else t.hash="#"+e}}),e.history=new L;y.extend=b.extend=M.extend=k.extend=L.extend=function(t,e){var i,r=this;i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)};return n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};var F=function(){throw new Error('A "url" property or function must be specified')},R=function(t,e){var n=e.error;e.error=function(i){n&&n.call(e.context,t,i,e),t.trigger("error",t,i,e)}};return e}(a,n,t,e)}.apply(e,r))||(t.exports=o)}()}).call(this,n(11))},function(t,e,n){(function(t,n){var i;!function(){var r="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||this||{},o=r._,s=Array.prototype,a=Object.prototype,l="undefined"!=typeof Symbol?Symbol.prototype:null,c=s.push,u=s.slice,h=a.toString,d=a.hasOwnProperty,f=Array.isArray,p=Object.keys,g=Object.create,v=function(){},m=function(t){return t instanceof m?t:this instanceof m?void(this._wrapped=t):new m(t)};void 0===e||e.nodeType?r._=m:(void 0!==n&&!n.nodeType&&n.exports&&(e=n.exports=m),e._=m),m.VERSION="1.9.1";var y,b=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,i,r){return t.call(e,n,i,r)};case 4:return function(n,i,r,o){return t.call(e,n,i,r,o)}}return function(){return t.apply(e,arguments)}},x=function(t,e,n){return m.iteratee!==y?m.iteratee(t,e):null==t?m.identity:m.isFunction(t)?b(t,e,n):m.isObject(t)&&!m.isArray(t)?m.matcher(t):m.property(t)};m.iteratee=y=function(t,e){return x(t,e,1/0)};var w=function(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),i=Array(n),r=0;r=0&&e<=E};m.each=m.forEach=function(t,e,n){var i,r;if(e=b(e,n),A(t))for(i=0,r=t.length;i=3;return function(e,n,i,r){var o=!A(e)&&m.keys(e),s=(o||e).length,a=t>0?0:s-1;for(r||(i=e[o?o[a]:a],a+=t);a>=0&&a=0},m.invoke=w(function(t,e,n){var i,r;return m.isFunction(e)?r=e:m.isArray(e)&&(i=e.slice(0,-1),e=e[e.length-1]),m.map(t,function(t){var o=r;if(!o){if(i&&i.length&&(t=T(t,i)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)})}),m.pluck=function(t,e){return m.map(t,m.property(e))},m.where=function(t,e){return m.filter(t,m.matcher(e))},m.findWhere=function(t,e){return m.find(t,m.matcher(e))},m.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var a=0,l=(t=A(t)?t:m.values(t)).length;ao&&(o=i);else e=x(e,n),m.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},m.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var a=0,l=(t=A(t)?t:m.values(t)).length;ai||void 0===n)return 1;if(n0?0:r-1;o>=0&&o0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return i[o=n(i,r)]===r?o:-1;if(r!=r)return(o=e(u.call(i,s,a),m.isNaN))>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&oe?(i&&(clearTimeout(i),i=null),a=c,s=t.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(l,u)),s};return c.cancel=function(){clearTimeout(i),a=0,i=r=o=null},c},m.debounce=function(t,e,n){var i,r,o=function(e,n){i=null,n&&(r=t.apply(e,n))},s=w(function(s){if(i&&clearTimeout(i),n){var a=!i;i=setTimeout(o,e),a&&(r=t.apply(this,s))}else i=m.delay(o,e,this,s);return r});return s.cancel=function(){clearTimeout(i),i=null},s},m.wrap=function(t,e){return m.partial(e,t)},m.negate=function(t){return function(){return!t.apply(this,arguments)}},m.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,i=t[e].apply(this,arguments);n--;)i=t[n].call(this,i);return i}},m.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},m.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},m.once=m.partial(m.before,2),m.restArguments=w;var F=!{toString:null}.propertyIsEnumerable("toString"),R=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],j=function(t,e){var n=R.length,i=t.constructor,r=m.isFunction(i)&&i.prototype||a,o="constructor";for(S(t,o)&&!m.contains(e,o)&&e.push(o);n--;)(o=R[n])in t&&t[o]!==r[o]&&!m.contains(e,o)&&e.push(o)};m.keys=function(t){if(!m.isObject(t))return[];if(p)return p(t);var e=[];for(var n in t)S(t,n)&&e.push(n);return F&&j(t,e),e},m.allKeys=function(t){if(!m.isObject(t))return[];var e=[];for(var n in t)e.push(n);return F&&j(t,e),e},m.values=function(t){for(var e=m.keys(t),n=e.length,i=Array(n),r=0;r1&&(i=b(i,e[1])),e=m.allKeys(t)):(i=$,e=L(e,!1,!1),t=Object(t));for(var r=0,o=e.length;r1&&(n=e[1])):(e=m.map(L(e,!1,!1),String),i=function(t,n){return!m.contains(e,n)}),m.pick(t,i,n)}),m.defaults=z(m.allKeys,!0),m.create=function(t,e){var n=C(t);return e&&m.extendOwn(n,e),n},m.clone=function(t){return m.isObject(t)?m.isArray(t)?t.slice():m.extend({},t):t},m.tap=function(t,e){return e(t),t},m.isMatch=function(t,e){var n=m.keys(e),i=n.length;if(null==t)return!i;for(var r=Object(t),o=0;o":">",'"':""","'":"'","`":"`"},U=m.invert(W),q=function(t){var e=function(e){return t[e]},n="(?:"+m.keys(t).join("|")+")",i=RegExp(n),r=RegExp(n,"g");return function(t){return t=null==t?"":""+t,i.test(t)?t.replace(r,e):t}};m.escape=q(W),m.unescape=q(U),m.result=function(t,e,n){m.isArray(e)||(e=[e]);var i=e.length;if(!i)return m.isFunction(n)?n.call(t):n;for(var r=0;r/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Y=/(.)^/,G={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},X=/\\|'|\r|\n|\u2028|\u2029/g,J=function(t){return"\\"+G[t]};m.template=function(t,e,n){!e&&n&&(e=n),e=m.defaults({},e,m.templateSettings);var i,r=RegExp([(e.escape||Y).source,(e.interpolate||Y).source,(e.evaluate||Y).source].join("|")+"|$","g"),o=0,s="__p+='";t.replace(r,function(e,n,i,r,a){return s+=t.slice(o,a).replace(X,J),o=a+e.length,n?s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?s+="'+\n((__t=("+i+"))==null?'':__t)+\n'":r&&(s+="';\n"+r+"\n__p+='"),e}),s+="';\n",e.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{i=new Function(e.variable||"obj","_",s)}catch(t){throw t.source=s,t}var a=function(t){return i.call(this,t,m)},l=e.variable||"obj";return a.source="function("+l+"){\n"+s+"}",a},m.chain=function(t){var e=m(t);return e._chain=!0,e};var Z=function(t,e){return t._chain?m(e).chain():e};m.mixin=function(t){return m.each(m.functions(t),function(e){var n=m[e]=t[e];m.prototype[e]=function(){var t=[this._wrapped];return c.apply(t,arguments),Z(this,n.apply(m,t))}}),m},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=s[t];m.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],Z(this,n)}}),m.each(["concat","join","slice"],function(t){var e=s[t];m.prototype[t]=function(){return Z(this,e.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return String(this._wrapped)},void 0===(i=function(){return m}.apply(e,[]))||(n.exports=i)}()}).call(this,n(11),n(231)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUnitFromValue=e.normalizeFloat=e.shallowDiff=e.getElement=e.camelCase=e.getModel=e.matches=e.upFirst=e.hasDnd=e.off=e.on=void 0;var i=n(1),r=window.Element.prototype,o=r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector,s=function(t){return t[0].toUpperCase()+t.toLowerCase().slice(1)};e.on=function(t,e,n){e=e.split(/\s+/),t=t instanceof Array?t:[t];for(var i=function(i){t.forEach(function(t){return t.addEventListener(e[i],n)})},r=0;r=0?s!==a&&(n[o]=a):n[o]=null}for(var l in e)e.hasOwnProperty(l)&&(0,i.isUndefined)(t[l])&&(n[l]=e[l]);return n},e.normalizeFloat=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=0;if(isNaN(t))return n;if(t=parseFloat(t),Math.floor(t)!==t){var r=e.toString().split(".")[1];i=r?r.length:0}return i?parseFloat(t.toFixed(i)):t},e.getUnitFromValue=function(t){return t.replace(parseFloat(t),"")}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),r=n(1);var o=n(57);t.exports=i.default.View.extend({className:function(){return this.getClasses()},tagName:function(){return this.model.get("tagName")},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=t.config||{};this.opts=t,this.config=n,this.em=n.em||"",this.pfx=n.stylePrefix||"",this.ppfx=n.pStylePrefix||"",this.attr=e.get("attributes"),this.classe=this.attr.class||[];var i=this.$el,r=e.get("classes");this.listenTo(e,"change:style",this.updateStyle),this.listenTo(e,"change:attributes",this.updateAttributes),this.listenTo(e,"change:highlightable",this.updateHighlight),this.listenTo(e,"change:status",this.updateStatus),this.listenTo(e,"change:state",this.updateState),this.listenTo(e,"change:script",this.render),this.listenTo(e,"change:content",this.updateContent),this.listenTo(e,"change",this.handleChange),this.listenTo(e,"active",this.onActive),this.listenTo(r,"add remove change",this.updateClasses),i.data("model",e),i.data("collection",e.get("components")),e.view=this,r.length&&this.importClasses(),this.init()},init:function(){},onActive:function(){},handleChange:function(){var t=this.model;for(var e in t.emitUpdate(),t.changed)t.emitUpdate(e)},importClasses:function(){var t=this.config.em.get("SelectorManager");t&&this.model.get("classes").each(function(e){t.add(e.get("name"))})},updateState:function(t){var e="hc-state";this.model.get("state")?this.$el.addClass(e):this.$el.removeClass(e)},updateStatus:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(this.em,this.el),n=this.model.get("status"),i=this.pfx,r=this.ppfx,o=i+"selected",s=o+"-parent",a=r+"freezed",l=r+"hovered",c=[o,s,a,l];this.$el.removeClass(c.join(" "));var u=e.getAttribute("class")||"",h="";switch(n){case"selected":h=u+" "+o;break;case"selected-parent":h=u+" "+s;break;case"freezed":h=u+" "+a;break;case"freezed-selected":h=u+" "+a+" "+o;break;case"hovered":h=t.avoidHover?"":u+" "+l}(h=h.trim())&&e.setAttribute("class",h)},updateHighlight:function(){var t=this.model.get("highlightable");this.setAttribute("data-highlightable",t?1:"")},updateStyle:function(){var t=this.em,e=this.model;if(t&&t.get("avoidInlineStyle")){this.el.id=e.getId();var n=e.getStyle();!(0,r.isEmpty)(n)&&e.setStyle(n)}else this.setAttribute("style",e.styleToString())},updateClasses:function(){var t=this.model.get("classes").pluck("name").join(" ");this.setAttribute("class",t),this.updateStatus()},setAttribute:function(t,e){var n=this.$el;e?n.attr(t,e):n.removeAttr(t)},getClasses:function(){var t=this.model.get("attributes").class||[];return(t=(0,r.isArray)(t)?t:[t]).length?t.join(" "):null},updateAttributes:function(){var t=this.model,e={"data-gjs-type":t.get("type")||"default"},n=t.get("attributes"),i=t.get("src");for(var r in n)e[r]=n[r];i&&(e.src=i),this.$el.attr(e),this.updateHighlight(),this.updateStyle()},updateContent:function(){this.getChildrenContainer().innerHTML=this.model.get("content")},prevDef:function(t){t.preventDefault()},updateScript:function(){if(this.model.get("script")){var t=this.em;if(t)t.get("Canvas").getCanvasView().updateScript(this)}},getChildrenContainer:function(){var t=this.el;return"function"==typeof this.getChildrenSelector?t=this.el.querySelector(this.getChildrenSelector()):this.getTemplate,t},renderChildren:function(){var t=this.getChildrenContainer(),e=new o({collection:this.model.get("components"),config:this.config,componentTypes:this.opts.componentTypes});e.render(t),this.childrenView=e;for(var n=Array.prototype.slice.call(e.el.childNodes),i=0,r=n.length;i0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.em,s=this.parent(),a=s&&s.attributes;if(a&&a.propagate){var l={},c=a.propagate;c.forEach(function(t){return l[t]=s.get(t)}),l.propagate=c,l=i({},l,e),this.set(l)}var u=this.get("propagate");u&&this.set("propagate",(0,r.isArray)(u)?u:[u]),n&&n.config&&n.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),n.em=o,this.opt=n,this.em=o,this.config=n.config||{},this.ccid=g.createId(this),this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.listenTo(this,"change:tagName",this.tagUpdated),this.listenTo(this,"change:attributes",this.attrUpdated),this.initClasses(),this.loadTraits(),this.initComponents(),this.initToolbar(),this.set("status",""),["classes","traits"].forEach(function(e){return t.listenTo(t.get(e),"add remove change",function(){return t.emitUpdate(e)})}),this.init()},is:function(t){return!(this.get("type")!=t)},find:function(t){var e=[];return this.view.$el.find(t).each(function(t,n,i){var r=i.eq(n).data("model");r&&e.push(r)}),e},closest:function(t){var e=this.view.$el.closest(t);return e.length&&e.data("model")},tagUpdated:function(){var t=this.collection,e=t.indexOf(this);t.remove(this),t.add(this,{at:e})},replaceWith:function(t){var e=this.collection,n=e.indexOf(this);return e.remove(this),e.add(t,{at:n})},attrUpdated:function(){var t=this,e=i({},this.previous("attributes")),n=i({},this.get("attributes")),s=(0,o.shallowDiff)(e,n);(0,r.keys)(s).forEach(function(e){return t.trigger("change:attributes:"+e)})},setAttributes:function(t){var e=(t=i({},t)).class;e&&this.setClass(e),delete t.class;var n=t.style;n&&this.setStyle(n),delete t.style,this.set("attributes",t)},addAttributes:function(t){var e=i({},this.getAttributes(),t);this.setAttributes(e)},getStyle:function(){var t=this.em;if(t&&t.getConfig("avoidInlineStyle")){var e=this.get("state"),n=t.get("CssComposer").getIdRule(this.getId(),{state:e});if(this.rule=n,n)return n.getStyle()}return s.default.getStyle.call(this)},setStyle:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=this.em;if(a&&a.getConfig("avoidInlineStyle")){e=(0,r.isString)(e)?this.parseStyle(e):e,e=i({},e,this.get("style"));var l=this.get("state"),c=a.get("CssComposer"),u=this.getStyle();this.rule=c.setIdRule(this.getId(),e,i({},n,{state:l}));var h=(0,o.shallowDiff)(u,e);this.set("style",{},{silent:1}),(0,r.keys)(h).forEach(function(e){return t.trigger("change:style:"+e)})}else e=s.default.setStyle.apply(this,arguments);return e},getAttributes:function(){var t=this.em,e=[],n=i({},this.get("attributes")),o=t&&t.get("SelectorManager"),s=this.getId();if(this.get("classes").each(function(t){return e.push(t.get("name"))}),e.length&&(n.class=e.join(" ")),!(0,r.has)(n,"id")){var a=void 0;!function(t){return t&&t.getConfig("avoidInlineStyle")}(t)?(0,r.isEmpty)(this.getStyle())||(a=1):a=o&&o.get(s,o.Selector.TYPE_ID),a&&(n.id=this.getId())}return n},addClass:function(t){var e=this.em.get("SelectorManager").addClass(t);return this.get("classes").add(e)},setClass:function(t){return this.get("classes").reset(),this.addClass(t)},removeClass:function(t){var e=[];t=(0,r.isArray)(t)?t:[t];var n=this.get("classes"),i=c.TYPE_CLASS;return t.forEach(function(t){t.split(" ").forEach(function(t){var r=n.where({name:t,type:i})[0];r&&e.push(n.remove(r))})}),e},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||[]);return this.set("classes",new u(t)),this},initComponents:function(){var t=new l(null,this.opt);return t.parent=this,!this.opt.avoidChildren&&t.reset(this.get("components")),this.set("components",t),this},init:function(){},append:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.components().add(t,e);return(0,r.isArray)(n)?n:[n]},components:function(t){var e=this.get("components");if((0,r.isUndefined)(t))return e;e.reset(),t&&this.append(t)},parent:function(){var t=this.collection;return t&&t.parent},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=i({},this.get("attributes")),n=this.get("traits");n instanceof h?(n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.get("name"),r=n.getInitValue();i&&r&&(e[i]=r)}}),t&&this.set("attributes",e)):this.loadTraits()},initToolbar:function(){if(!this.get("toolbar")){var t=[];this.collection&&t.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),this.get("draggable")&&t.push({attributes:{class:"fa fa-arrows",draggable:!0},command:"tlb-move"}),this.get("copyable")&&t.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),this.get("removable")&&t.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),this.set("toolbar",t)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new h([],this.opt);return n.setTarget(this),(t=t||this.get("traits")).length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[],n=this.em;if(n){var i=n.get("SelectorManager");if(i)return t.forEach(function(t){var n="";n="string"==typeof t?t:t.name;var r=i.add(n);e.push(r)}),e}},clone:function(){var t=this.em,e=this.getStyle(),n=i({},this.attributes),o=i({},this.opt);return n.attributes=i({},n.attributes),delete n.attributes.id,n.components=[],n.classes=[],n.traits=[],this.get("components").each(function(t,e){n.components[e]=t.clone()}),this.get("traits").each(function(t,e){n.traits[e]=t.clone()}),this.get("classes").each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",o.collection=null,t&&t.getConfig("avoidInlineStyle")&&!(0,r.isEmpty)(e)&&(n.style=e),new this.constructor(n,o)},getName:function(){var t=this.get("name")||this.get("custom-name"),e=this.get("tagName");e="div"==e?"box":e;var n=this.get("type")||e;return n=n.charAt(0).toUpperCase()+n.slice(1),t||n},getIcon:function(){var t=this.get("icon");return t?t+" ":""},toHTML:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.get("tagName"),i=this.get("void"),o=t.attributes,s=this.getAttrToHTML();for(var a in o&&((0,r.isFunction)(o)?s=o(this,s)||{}:(0,r.isObject)(o)&&(s=o)),s){var l=s[a],c=(0,r.isString)(l)?l.replace(/"/g,"""):l;(0,r.isUndefined)(c)||((0,r.isBoolean)(c)?c&&e.push(a):e.push(a+'="'+c+'"'))}var u="<"+n+(e.length?" "+e.join(" "):"")+(i?"/":"")+">"+this.get("content");return this.get("components").each(function(e){return u+=e.toHTML(t)}),!i&&(u+=""),u},getAttrToHTML:function(){var t=this.getAttributes();return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]&&arguments[0];var t=this.em,e=this.getId();if(e){var n=g.createId(this);this.setId(n);var i=t&&t.get("CssComposer").getIdRule(e),r=i&&i.get("selectors").at(0);return r&&r.set("name",n),this}}},{isComponent:function(t){return{tagName:t.tagName?t.tagName.toLowerCase():""}},createId:function(t){var e=(++f).toString().length+2,n="i"+(Math.random()+1.1).toString(36).slice(-e);return d[n]=t,n},getList:function(){return d}});t.exports=g},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),r=n(1),o=n(2);t.exports=i.default.View.extend({template:function(t){return'\n
\n '+this.templateLabel(t)+'\n
\n
\n '+this.templateInput(t)+"\n
\n "},templateLabel:function(t){var e=this.pfx;return'\n \n '+t.get("name")+'\n \n \n '},templateInput:function(t){return'\n
\n \n
\n '},events:function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({change:"inputValueChanged"},"click [data-clear-style]","clear"),initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.bindAll)(this,"targetUpdated"),this.config=t.config||{};var e=this.config.em;this.em=e,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{};var n=this.model;this.property=n.get("property"),this.input=null;var i=this.pfx;this.inputHolderId="#"+i+"input-holder",this.sector=n.collection&&n.collection.sector,n.view=this,n.get("value")||n.set("value",n.getDefaultValue()),e&&e.on("update:component:style:"+this.property,this.targetUpdated),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(n,"destroy remove",this.remove),this.listenTo(n,"change:value",this.modelValueChanged),this.listenTo(n,"targetUpdated",this.targetUpdated),this.listenTo(n,"change:visible",this.updateVisibility),this.listenTo(n,"change:status",this.updateStatus);var o=this.init&&this.init.bind(this);o&&o()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"four-color",o=n+"color-warn",s=this.$el.children("."+e+"label"),a=this.getClearEl().style;switch(s.removeClass(r+" "+o),a.display="none",t){case"updated":s.addClass(r),i.clearProperties&&(a.display="inline");break;case"computed":s.addClass(o)}},clear:function(t){t&&t.stopPropagation(),this.model.clearValue(),this.targetUpdated()},getClearEl:function(){return this.clearEl||(this.clearEl=this.el.querySelector("[data-clear-style]")),this.clearEl},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(t){t&&t.stopPropagation(),this.model.setValue(this.getInputValue(),1,{fromInput:1}),this.elementUpdated()},elementUpdated:function(){this.setStatus("updated")},setStatus:function(t){this.model.set("status",t);var e=this.model.parent;e&&e.set("status",t)},targetUpdated:function(){if(this.checkVisibility()){var t=this.config,e=t.em,n=this.model,i="",r="",o=this.getTargetValue({ignoreDefault:1}),s=n.getDefaultValue(),a=this.getComputedValue();o?(i=o,t.highlightChanged&&(r="updated")):a&&t.showComputed&&a!=s?(i=a,t.highlightComputed&&(r="computed")):(i=s,r=""),n.setValue(i,0,{fromTarget:1}),this.setStatus(r),e&&(e.trigger("styleManager:change",this),e.trigger("styleManager:change:"+n.get("property"),this))}},checkVisibility:function(){var t=1;return this.config.hideNotStylable&&(this.isTargetStylable()&&this.isComponentStylable()?this.show():(this.hide(),t=0),this.sector&&this.sector.trigger("updateVisibility")),t},getTargetValue:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.model,i=this.getTargetModel(),r=this.customValue;if(!i)return t;if((t=i.getStyle()[n.get("property")])||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=r(this,n.collection.indexOf(n));o&&(t=o)}return t},getComputedValue:function(){var t=this.propTarget,e=t.computed||{},n=t.computedDefault||{},i=this.config.avoidComputed||[],r=this.model.get("property"),s=i.indexOf(r)<0,a=e[r],l=n[(0,o.camelCase)(r)];return e&&s&&l!==a&&a},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;n.fromInput||this.setValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(n.fromTarget||(a&&!n.fromParent?a(s,this,n):this.updateTargetStyle(o,null,n)),i&&(i.trigger("component:update",s),i.trigger("component:styleUpdate",s),i.trigger("component:styleUpdate:"+r.get("property"),s)))},updateTargetStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e||this.model.get("property"),r=this.getTarget(),o=r.getStyle();t?o[i]=t:delete o[i],r.setStyle(o,n);var s=this.getHelperModel();s&&s.setStyle(o,n)},isTargetStylable:function(t){var e=t||this.getTarget(),n=this.model,i=n.get("property"),o=n.get("toRequire"),s=e.get("unstylable"),a=e.get("stylable-require"),l=e.get("stylable");return(0,r.isArray)(l)&&(l=l.indexOf(i)>=0),(0,r.isArray)(s)&&(l=s.indexOf(i)<0),o&&(l=a&&a.indexOf(i)>=0||!t),l},isComponentStylable:function(){var t=this.em,e=t&&t.getSelected();return!e||this.isTargetStylable(e)},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=this.model,n=(0,r.isUndefined)(t)?e.getDefaultValue():t,i=this.getInputEl();i&&(i.value=n)},getInputEl:function(){return this.input||(this.input=this.el.querySelector("input")),this.input},updateVisibility:function(){this.el.style.display=this.model.get("visible")?"block":"none"},show:function(){this.model.set("visible",1)},hide:function(){this.model.set("visible",0)},cleanValue:function(){this.setValue("")},render:function(){var t=this.pfx,e=this.model,n=this.el;n.innerHTML=this.template(e),n.className=t+"property "+t+e.get("type"),this.updateStatus();var i=this.onRender&&this.onRender.bind(this);i&&i(),this.setValue(e.get("value"),{targetUpdate:1})}})},function(t,e,n){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),i=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),s=i||r||o,a=s&&(i?document.documentMode||6:+(o||r)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),h=/Opera\//.test(t),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),p=/PhantomJS/.test(t),g=!o&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),v=/Android/.test(t),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=g||/Mac/.test(e),b=/\bCrOS\b/.test(t),x=/win/i.test(e),w=h&&t.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,l=!0);var C=y&&(c||h&&(null==w||w<12.11)),k=n||s&&a>=9;function S(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var T,E=function(t,e){var n=t.className,i=S(e).exec(n);if(i){var r=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(r?i[1]+r:"")}};function M(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function A(t,e){return M(t).appendChild(e)}function O(t,e,n,i){var r=document.createElement(t);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return s+(e-o);s+=a-o,s+=n-s%n,o=a+1}}g?I=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:s&&(I=function(t){try{t.select()}catch(t){}});var z=function(){this.id=null};function V(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,i=o+1,(r+=n-r%n)>=e)return i}}var K=[""];function Y(t){for(;K.length<=t;)K.push(G(K)+" ");return K[t]}function G(t){return t[t.length-1]}function X(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Q.test(t))}function et(t,e){return e?!!(e.source.indexOf("\\w")>-1&&tt(t))||e.test(t):tt(t)}function nt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var it=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function rt(t){return t.charCodeAt(0)>=768&&it.test(t)}function ot(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var r=(e+n)/2,o=i<0?Math.ceil(r):Math.floor(r);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+i}}function at(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(e=t.first&&en?gt(n,at(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?gt(t.line,e):n<0?gt(t.line,0):t}(e,at(t,e.line).text.length)}function kt(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new Et(s,o.from,l?null:o.to))}}return i}(n,r,s),l=function(t,e,n){var i;if(t)for(var r=0;r=e:o.to>e);if(a||o.from==e&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=e:o.from0&&a)for(var x=0;xe)&&(!n||It(n,o.marker)<0)&&(n=o.marker)}return n}function Vt(t,e,n,i,r){var o=at(t,e),s=Tt&&o.markedSpans;if(s)for(var a=0;a=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?vt(c.to,n)>=0:vt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?vt(c.from,i)<=0:vt(c.from,i)<0)))return!0}}}function Ht(t){for(var e;e=Rt(t);)t=e.find(-1,!0).line;return t}function $t(t,e){var n=at(t,e),i=Ht(n);return n==i?e:ht(i)}function Bt(t,e){if(e>t.lastLine())return e;var n,i=at(t,e);if(!Wt(t,i))return e;for(;n=jt(i);)i=n.find(1,!0).line;return ht(i)+1}function Wt(t,e){var n=Tt&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}var Gt=null;function Xt(t,e,n){var i;Gt=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Gt=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Gt=r)}return null!=i?i:Gt}var Jt=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?t.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?e.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,o=/[LRr]/,s=/[Lb1n]/,a=/[1n]/;function l(t,e,n){this.level=t,this.from=e,this.to=n}return function(t,e){var c="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!i.test(t))return!1;for(var u=t.length,h=[],d=0;d-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function ie(t,e){var n=ee(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function ae(t){t.prototype.on=function(t,e){te(this,t,e)},t.prototype.off=function(t,e){ne(this,t,e)}}function le(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function ce(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function ue(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function he(t){le(t),ce(t)}function de(t){return t.target||t.srcElement}function fe(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var pe,ge,ve=function(){if(s&&a<9)return!1;var t=O("div");return"draggable"in t||"dragDrop"in t}();function me(t){if(null==pe){var e=O("span","​");A(t,O("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(pe=e.offsetWidth<=1&&e.offsetHeight>2&&!(s&&a<8))}var n=pe?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function ye(t){if(null!=ge)return ge;var e=A(t,document.createTextNode("AخA")),n=T(e,0,1).getBoundingClientRect(),i=T(e,1,2).getBoundingClientRect();return M(t),!(!n||n.left==n.right)&&(ge=i.right-n.right<3)}var be=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],i=t.length;e<=i;){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var o=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),s=o.indexOf("\r");-1!=s?(n.push(o.slice(0,s)),e+=s+1):(n.push(o),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},xe=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},we=function(){var t=O("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),Ce=null,ke={},Se={};function Te(t){if("string"==typeof t&&Se.hasOwnProperty(t))t=Se[t];else if(t&&"string"==typeof t.name&&Se.hasOwnProperty(t.name)){var e=Se[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Te("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Te("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Ee(t,e){e=Te(e);var n=ke[e.name];if(!n)return Ee(t,"text/plain");var i=n(t,e);if(Me.hasOwnProperty(e.name)){var r=Me[e.name];for(var o in r)r.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=r[o])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)i[s]=e.modeProps[s];return i}var Me={};function Ae(t,e){var n=Me.hasOwnProperty(t)?Me[t]:Me[t]={};R(e,n)}function Oe(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var i in e){var r=e[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n}function Pe(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function _e(t,e,n){return!t.startState||t.startState(e,n)}var Le=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Le.prototype.eol=function(){return this.pos>=this.string.length},Le.prototype.sol=function(){return this.pos==this.lineStart},Le.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Le.prototype.next=function(){if(this.pose},Le.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Le.prototype.skipToEnd=function(){this.pos=this.string.length},Le.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Le.prototype.backUp=function(t){this.pos-=t},Le.prototype.column=function(){return this.lastColumnPos0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}var r=function(t){return n?t.toLowerCase():t},o=this.string.substr(this.pos,t.length);if(r(o)==r(t))return!1!==e&&(this.pos+=t.length),!0},Le.prototype.current=function(){return this.string.slice(this.start,this.pos)},Le.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Le.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Le.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var Ne=function(t,e){this.state=t,this.lookAhead=e},De=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function Ie(t,e,n,i){var r=[t.state.modeGen],o={};We(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=function(i){n.baseTokens=r;var a=t.state.overlays[i],l=1,c=0;n.state=!0,We(t,e.text,a.mode,n,function(t,e){for(var n=l;ct&&r.splice(l,1,t,r[l+1],i),l+=2,c=Math.min(t,i)}if(e)if(a.opaque)r.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&Oe(t.doc.mode,i.state),o=Ie(t,e,i);r&&(i.state=r),e.stateAfter=i.save(!r),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function Re(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new De(i,!0,e);var o=function(t,e,n){for(var i,r,o=t.doc,s=n?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;a>s;--a){if(a<=o.first)return o.first;var l=at(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof Ne?c.lookAhead:0)<=o.modeFrontier))return a;var u=j(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}(t,e,n),s=o>i.first&&at(i,o-1).stateAfter,a=s?De.fromSaved(i,s,o):new De(i,_e(i.mode),o);return i.iter(o,e,function(n){je(t,n.text,a);var i=a.line;n.stateAfter=i==e-1||i%5==0||i>=r.viewFrom&&ie.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}De.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},De.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},De.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},De.fromSaved=function(t,e,n){return e instanceof Ne?new De(t,Oe(t.mode,e.state),n,e.lookAhead):new De(t,Oe(t.mode,e),n)},De.prototype.save=function(t){var e=!1!==t?Oe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ne(e,this.maxLookAhead):e};var He=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function $e(t,e,n,i){var r,o=t.doc,s=o.mode;e=Ct(o,e);var a,l=at(o,e.line),c=Re(t,e.line,n),u=new Le(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&je(t,e,i,h.pos),h.pos=e.length,l=null):l=Be(Ve(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;c1&&!/ /.test(t))return t;for(var n=e,i="",r=0;rc&&h.from<=c);d++);if(h.to>=u)return t(n,i,r,o,s,a,l);t(n,i.slice(0,h.to-c),r,o,null,a,l),o=null,i=i.slice(h.to-c),c=h.to}}}function tn(t,e,n,i){var r=!i&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!i&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function en(t,e,n){var i=t.markedSpans,r=t.text,o=0;if(i)for(var s,a,l,c,u,h,d,f=r.length,p=0,g=1,v="",m=0;;){if(m==p){l=c=u=h=a="",d=null,m=1/0;for(var y=[],b=void 0,x=0;xp||C.collapsed&&w.to==p&&w.from==p)?(null!=w.to&&w.to!=p&&m>w.to&&(m=w.to,c=""),C.className&&(l+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&w.from==p&&(u+=" "+C.startStyle),C.endStyle&&w.to==m&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||It(d.marker,C)<0)&&(d=w)):w.from>p&&m>w.from&&(m=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,m);;){if(v){var E=p+v.length;if(!d){var M=E>T?v.slice(0,T-p):v;e.addToken(e,M,s?s+l:l,u,p+M.length==m?c:"",h,a)}if(E>=T){v=v.slice(T-p),p=T;break}p=E,u=""}v=r.slice(o,o=n[g++]),s=Ge(n[g++],e.cm.options)}}else for(var A=1;An)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function On(t,e,n,i){return Ln(t,_n(t,e),n,i)}function Pn(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&e2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,i){var r,o=In(e.map,n,i),l=o.node,c=o.start,u=o.end,h=o.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&rt(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*i,bottom:e.bottom*i}}(t.display.measure,r))}else{var f;c>0&&(h=i="right"),r=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==i?f.length-1:0]:l.getBoundingClientRect()}if(s&&a<9&&!c&&(!r||!r.left&&!r.right)){var p=l.parentNode.getClientRects()[0];r=p?{left:p.left,right:p.left+ei(t.display),top:p.top,bottom:p.bottom}:Dn}for(var g=r.top-e.rect.top,v=r.bottom-e.rect.top,m=(g+v)/2,y=e.view.measure.heights,b=0;be)&&(r=(o=l-a)-1,e>=l&&(s="right")),null!=r){if(i=t[c+2],a==l&&n==(i.insertLeft?"left":"right")&&(s=n),"left"==n&&0==r)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)i=t[2+(c-=3)],s="left";if("right"==n&&r==l-a)for(;c=0&&(n=t[r]).left==n.right;r--);return n}function Rn(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=i.text.length?(l=i.text.length,c="before"):l<=0&&(l=0,c="after"),!a)return s("before"==c?l-1:l,"before"==c);function u(t,e,n){var i=a[e],r=1==i.level;return s(n?t-1:t,r!=n)}var h=Xt(a,l,c),d=Gt,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function Kn(t,e){var n=0;e=Ct(t.doc,e),t.options.lineWrapping||(n=ei(t.display)*e.ch);var i=at(t.doc,e.line),r=qt(i)+Cn(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function Yn(t,e,n,i,r){var o=gt(t,e,n);return o.xRel=r,i&&(o.outside=!0),o}function Gn(t,e,n){var i=t.doc;if((n+=t.display.viewOffset)<0)return Yn(i.first,0,null,!0,-1);var r=dt(i,n),o=i.first+i.size-1;if(r>o)return Yn(i.first+i.size-1,at(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=at(i,r);;){var a=Qn(t,s,r,e,n),l=zt(s,a.ch+(a.xRel>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==r)return c;s=at(i,r=c.line)}}function Xn(t,e,n,i){i-=$n(e);var r=e.text.length,o=st(function(e){return Ln(t,n,e-1).bottom<=i},r,0);return r=st(function(e){return Ln(t,n,e).top>i},o,r),{begin:o,end:r}}function Jn(t,e,n,i){n||(n=_n(t,e));var r=Bn(t,e,Ln(t,n,i),"line").top;return Xn(t,e,n,r)}function Zn(t,e,n,i){return!(t.bottom<=n)&&(t.top>n||(i?t.left:t.right)>e)}function Qn(t,e,n,i,r){r-=qt(e);var o=_n(t,e),s=$n(e),a=0,l=e.text.length,c=!0,u=Zt(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?function(t,e,n,i,r,o,s){var a=Xn(t,e,i,s),l=a.begin,c=a.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=1!=f.level,g=Ln(t,i,p?Math.min(c,f.to)-1:Math.max(l,f.from)).right,v=gv)&&(u=f,h=v)}}return u||(u=r[r.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}:function(t,e,n,i,r,o,s){var a=st(function(a){var l=r[a],c=1!=l.level;return Zn(qn(t,gt(n,c?l.to:l.from,c?"before":"after"),"line",e,i),o,s,!0)},0,r.length-1),l=r[a];if(a>0){var c=1!=l.level,u=qn(t,gt(n,c?l.from:l.to,c?"after":"before"),"line",e,i);Zn(u,o,s,!0)&&u.top>s&&(l=r[a-1])}return l})(t,e,n,o,u,i,r);c=1!=h.level,a=c?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,g=null,v=st(function(e){var n=Ln(t,o,e);return n.top+=s,n.bottom+=s,!!Zn(n,i,r,!1)&&(n.top<=r&&n.left<=i&&(p=e,g=n),!0)},a,l),m=!1;if(g){var y=i-g.left=x.bottom}return v=ot(e.text,v,1),Yn(n,v,f,m,i-d)}function ti(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Nn){Nn=O("pre");for(var e=0;e<49;++e)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(O("br"));Nn.appendChild(document.createTextNode("x"))}A(t.measure,Nn);var n=Nn.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),M(t.measure),n||1}function ei(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=O("span","xxxxxxxxxx"),n=O("pre",[e]);A(t.measure,n);var i=e.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function ni(t){for(var e=t.display,n={},i={},r=e.gutters.clientLeft,o=e.gutters.firstChild,s=0;o;o=o.nextSibling,++s)n[t.options.gutters[s]]=o.offsetLeft+o.clientLeft+r,i[t.options.gutters[s]]=o.clientWidth;return{fixedPos:ii(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function ii(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function ri(t){var e=ti(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/ei(t.display)-3);return function(r){if(Wt(t.doc,r))return 0;var o=0;if(r.widgets)for(var s=0;s=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,i=0;i=t.display.viewTo||a.to().linee||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr",o),r=!0)}r||i(e,n,"ltr")}(g,n||0,null==i?d:i,function(t,e,r,h){var v="ltr"==r,m=f(t,v?"left":"right"),y=f(e-1,v?"right":"left"),b=null==n&&0==t,x=null==i&&e==d,w=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var k=(c?b:x)&&w,S=(c?x:b)&&C,T=k?a:(v?m:y).left,E=S?l:(v?y:m).right;u(T,m.top,E-T,m.bottom)}else{var M,A,O,P;v?(M=c&&b&&w?a:m.left,A=c?l:p(t,r,"before"),O=c?a:p(e,r,"after"),P=c&&x&&C?l:y.right):(M=c?p(t,r,"before"):a,A=!c&&b&&w?l:m.right,O=!c&&x&&C?a:y.left,P=c?p(e,r,"after"):l),u(M,m.top,A-M,m.bottom),m.bottom0?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function pi(t){t.state.focused||(t.display.input.focus(),vi(t))}function gi(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,mi(t))},100)}function vi(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(ie(t,"focus",t,e),t.state.focused=!0,N(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),fi(t))}function mi(t,e){t.state.delayingBlurEvent||(t.state.focused&&(ie(t,"blur",t,e),t.state.focused=!1,E(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function yi(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||u<-.005)&&(ut(r.line,o),bi(r.line),r.rest))for(var h=0;h=s&&(o=dt(e,qt(at(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function wi(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=ii(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;so&&(e.bottom=e.top+o);var a=t.doc.height+kn(n),l=e.topa-i;if(e.topr+o){var u=Math.min(e.top,(c?a:e.bottom)-o);u!=r&&(s.scrollTop=u)}var h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft,d=En(t)-(t.options.fixedGutter?n.gutters.offsetWidth:0),f=e.right-e.left>d;return f&&(e.right=e.left+d),e.left<10?s.scrollLeft=0:e.leftd+h-3&&(s.scrollLeft=e.right+(f?0:10)-d),s}function Si(t,e){null!=e&&(Mi(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Ti(t){Mi(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Ei(t,e,n){null==e&&null==n||Mi(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Mi(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var n=Kn(t,e.from),i=Kn(t,e.to);Ai(t,n,i,e.margin)}}function Ai(t,e,n,i){var r=ki(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-i,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+i});Ei(t,r.scrollLeft,r.scrollTop)}function Oi(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||ar(t,{top:e}),Pi(t,e,!0),n&&ar(t),nr(t,100))}function Pi(t,e,n){e=Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function _i(t,e,n,i){e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!i||(t.doc.scrollLeft=e,wi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Li(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+kn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Tn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var Ni=function(t,e,n){this.cm=n;var i=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=r.tabIndex=-1,t(i),t(r),te(i,"scroll",function(){i.clientHeight&&e(i.scrollTop,"vertical")}),te(r,"scroll",function(){r.clientWidth&&e(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,s&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ni.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var r=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:e?i:0}},Ni.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ni.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ni.prototype.zeroWidthHack=function(){var t=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new z,this.disableVert=new z},Ni.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,function i(){var r=t.getBoundingClientRect(),o="vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);o!=t?t.style.pointerEvents="none":e.set(1e3,i)})},Ni.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Di=function(){};function Ii(t,e){e||(e=Li(t));var n=t.display.barWidth,i=t.display.barHeight;Fi(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&yi(t),Fi(t,Li(t)),n=t.display.barWidth,i=t.display.barHeight}function Fi(t,e){var n=t.display,i=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Di.prototype.update=function(){return{bottom:0,right:0}},Di.prototype.setScrollLeft=function(){},Di.prototype.setScrollTop=function(){},Di.prototype.clear=function(){};var Ri={native:Ni,null:Di};function ji(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&E(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Ri[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),te(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?_i(t,e):Oi(t,e)},t),t.display.scrollbars.addClass&&N(t.display.wrapper,t.display.scrollbars.addClass)}var zi=0;function Vi(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++zi},function(t){on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}(t.curOp)}function Hi(t){var e=t.curOp;!function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new rr(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Bi(t){t.updatedDisplay=t.mustUpdate&&or(t.cm,t.update)}function Wi(t){var e=t.cm,n=e.display;t.updatedDisplay&&yi(e),t.barMeasure=Li(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=On(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Tn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-En(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft1&&(s=!0)),null!=c.scrollLeft&&(_i(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}(e,Ct(i,t.scrollToPos.from),Ct(i,t.scrollToPos.to),t.scrollToPos.margin);!function(t,e){if(!re(t,"scrollCursorIntoView")){var n=t.display,i=n.sizer.getBoundingClientRect(),r=null;if(e.top+i.top<0?r=!0:e.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!p){var o=O("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Cn(t.display))+"px;\n height: "+(e.bottom-e.top+Tn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(r),t.display.lineSpace.removeChild(o)}}}(e,r)}var o=t.maybeHiddenMarkers,s=t.maybeUnhiddenMarkers;if(o)for(var a=0;ae)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Tt&&$t(t.doc,e)r.viewFrom?Qi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)Qi(t);else if(e<=r.viewFrom){var o=tr(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):Qi(t)}else if(n>=r.viewTo){var s=tr(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):Qi(t)}else{var a=tr(t,e,e,-1),l=tr(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(rn(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):Qi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[ai(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==V(s,n)&&s.push(n)}}}function Qi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function tr(t,e,n,i){var r,o=ai(t,e),s=t.display.view;if(!Tt||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var a=t.display.viewFrom,l=0;l0){if(o==s.length-1)return null;r=a+s[o].size-e,o++}else r=a-e;e+=r,n+=r}for(;$t(t.doc,n)!=n;){if(o==(i<0?0:s.length-1))return null;n+=i*s[o-(i<0?1:0)].size,o+=i}return{index:o,lineN:n}}function er(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=Re(t,e.highlightFrontier),r=[];e.iter(i.line,Math.min(e.first+e.size,t.display.viewTo+500),function(o){if(i.line>=t.display.viewFrom){var s=o.styles,a=o.text.length>t.options.maxHighlightLength?Oe(e.mode,i.state):null,l=Ie(t,o,i,!0);a&&(i.state=a),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&dn)return nr(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&Ki(t,function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==er(t))return!1;Ci(t)&&(Qi(t),e.dims=ni(t));var r=i.first+i.size,o=Math.max(e.visible.from-t.options.viewportMargin,i.first),s=Math.min(r,e.visible.to+t.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(r,n.viewTo)),Tt&&(o=$t(t.doc,o),s=Bt(t.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=rn(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=rn(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,ai(t,n)))),i.viewTo=n}(t,o,s),n.viewOffset=qt(at(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=er(t);if(!a&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=L();if(!e||!_(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&_(t.display.lineDiv,i.anchorNode)&&(n.anchorNode=i.anchorNode,n.anchorOffset=i.anchorOffset,n.focusNode=i.focusNode,n.focusOffset=i.focusOffset)}return n}(t);return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var i=t.display,r=t.options.lineNumbers,o=i.lineDiv,s=o.firstChild;function a(e){var n=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=i.view,u=i.viewFrom,h=0;h-1&&(f=!1),cn(t,d,u,n)),f&&(M(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(pt(t.options,u)))),s=d.node.nextSibling}else{var p=vn(t,d,u,n);o.insertBefore(p,s)}u+=d.size}for(;s;)s=a(s)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=L()&&(t.activeElt.focus(),t.anchorNode&&_(document.body,t.anchorNode)&&_(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,nr(t,400)),n.updateLineNumbers=null,!0}function sr(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=En(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+kn(t.display)-Mn(t),n.top)}),e.visible=xi(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&or(t,e);i=!1){yi(t);var r=Li(t);li(t),Ii(t,r),cr(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function ar(t,e){var n=new rr(t,e);if(or(t,n)){yi(t),sr(t,n);var i=Li(t);li(t),Ii(t,i),cr(t,i),n.finish()}}function lr(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function cr(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Tn(t)+"px"}function ur(t){var e=t.display.gutters,n=t.options.gutters;M(e);for(var i=0;i-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}rr.prototype.signal=function(t,e){se(t,e)&&this.events.push(arguments)},rr.prototype.finish=function(){for(var t=0;ta.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&c||o&&u){if(o&&y&&l)t:for(var d=e.target,f=s.view;d!=a;d=d.parentNode)for(var p=0;p=0&&vt(t,i.to())<=0)return n}return-1};var yr=function(t,e){this.anchor=t,this.head=e};function br(t,e){var n=t[e];t.sort(function(t,e){return vt(t.from(),e.from())}),e=V(t,n);for(var i=1;i=0){var s=xt(o.from(),r.from()),a=bt(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new yr(l?a:s,l?s:a))}}return new mr(t,e)}function xr(t,e){return new mr([new yr(t,e||t)],0)}function wr(t){return t.text?gt(t.from.line+t.text.length-1,G(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Cr(t,e){if(vt(t,e.from)<0)return t;if(vt(t,e.to)<=0)return wr(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=wr(e).ch-e.to.ch),gt(n,i)}function kr(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,m)}an(t,"change",t,e)}function Or(t,e,n){!function t(i,r,o){if(i.linked)for(var s=0;sa-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(Dr(t.done),G(t.done)):t.done.length&&!G(t.done).ranges?G(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),G(t.done)):void 0}(r,r.lastOp==i)))s=G(o.changes),0==vt(e.from,e.to)&&0==vt(e.from,s.to)?s.to=wr(e):o.changes.push(Nr(t,e));else{var l=G(r.done);for(l&&l.ranges||Rr(t.sel,r.done),o={changes:[Nr(t,e)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=e.origin,s||ie(t,"historyAdded")}function Fr(t,e,n,i){var r=t.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||function(t,e,n,i){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,G(r.done),e))?r.done[r.done.length-1]=e:Rr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&Dr(r.undone)}function Rr(t,e){var n=G(e);n&&n.ranges&&n.equals(t)||e.push(t)}function jr(t,e,n,i){var r=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,i),function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[o]=n.markedSpans),++o})}function zr(t){if(!t)return null;for(var e,n=0;n-1&&(G(a)[h]=c[h],delete c[h])}}}return i}function $r(t,e,n,i){if(i){var r=t.anchor;if(n){var o=vt(e,r)<0;o!=vt(n,r)<0?(r=e,e=n):o!=vt(e,n)<0&&(e=n)}return new yr(r,e)}return new yr(n||e,e)}function Br(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Yr(t,new mr([$r(t.sel.primary(),e,n,r)],0),i)}function Wr(t,e,n){for(var i=[],r=t.cm&&(t.cm.display.shift||t.extend),o=0;o=e.ch:a.to>e.ch))){if(r&&(ie(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var c=l.find(i<0?1:-1),u=void 0;if((i<0?l.inclusiveRight:l.inclusiveLeft)&&(c=eo(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=vt(c,n))&&(i<0?u<0:u>0))return Qr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=eo(t,h,i,h.line==e.line?o:null)),h?Qr(t,h,e,i,r):null}}return e}function to(t,e,n,i,r){var o=i||1,s=Qr(t,e,n,o,r)||!r&&Qr(t,e,n,o,!0)||Qr(t,e,n,-o,r)||!r&&Qr(t,e,n,-o,!0);return s||(t.cantEdit=!0,gt(t.first,0))}function eo(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?Ct(t,gt(e.line-1)):null:n>0&&e.ch==(i||at(t,e.line)).text.length?e.line0)){var u=[l,1],h=vt(c.from,a.from),d=vt(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(d>0||!s.inclusiveRight&&!d)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}(t,e.from,e.to);if(i)for(var r=i.length-1;r>=0;--r)oo(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else oo(t,e)}}function oo(t,e){if(1!=e.text.length||""!=e.text[0]||0!=vt(e.from,e.to)){var n=kr(t,e);Ir(t,e,n,t.cm?t.cm.curOp.id:NaN),lo(t,e,n,Ot(t,e));var i=[];Or(t,function(t,n){n||-1!=V(i,t.history)||(fo(t.history,e),i.push(t.history)),lo(t,e,null,Ot(t,e))})}}function so(t,e,n){var i=t.cm&&t.cm.state.suppressEdits;if(!i||n){for(var r,o=t.history,s=t.sel,a="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c=0;--f){var p=d(f);if(p)return p.v}}}}function ao(t,e){if(0!=e&&(t.first+=e,t.sel=new mr(X(t.sel.ranges,function(t){return new yr(gt(t.anchor.line+e,t.anchor.ch),gt(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){Ji(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,i=n.viewFrom;it.lastLine())){if(e.from.lineo&&(e={from:e.from,to:gt(o,at(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=lt(t,e.from,e.to),n||(n=kr(t,e)),t.cm?function(t,e,n){var i=t.doc,r=t.display,o=e.from,s=e.to,a=!1,l=o.line;t.options.lineWrapping||(l=ht(Ht(at(i,o.line))),i.iter(l,s.line+1,function(t){if(t==r.maxLine)return a=!0,!0})),i.sel.contains(e.from,e.to)>-1&&oe(t),Ar(i,e,n,ri(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=Kt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=at(t,i).stateAfter;if(r&&(!(r instanceof Ne)||i+r.lookAhead1||!(this.children[0]instanceof go))){var a=[];this.collapse(a),this.children=[new go(a)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var s=r.lines.length%25+25,a=s;a10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=0;i0||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=P("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Vt(t,e.line,e,n,o)||e.line!=n.line&&Vt(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Tt=!0}o.addToHistory&&Ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var a,l=e.line,c=t.cm;if(t.iter(l,n.line+1,function(t){c&&o.collapsed&&!c.options.lineWrapping&&Ht(t)==c.display.maxLine&&(a=!0),o.collapsed&&l!=e.line&&ut(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new Et(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&t.iter(e.line,n.line+1,function(e){Wt(t,e)&&ut(e,0)}),o.clearOnEnter&&te(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(St=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++bo,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)Ji(c,e.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=e.line;u<=n.line;u++)Zi(c,u,"text");o.atomic&&Jr(c.doc),an(c,"markerAdded",c,o)}return o}xo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Vi(t),se(this,"clear")){var n=this.find();n&&an(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;ot.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&Ji(t,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Jr(t.doc)),t&&an(t,"markerCleared",t,this,i,r),e&&Hi(t),this.parent&&this.parent.clear()}},xo.prototype.find=function(t,e){var n,i;null==t&&"bookmark"==this.type&&(t=1);for(var r=0;r=0;l--)ro(this,i[l]);a?Kr(this,a):this.cm&&Ti(this.cm)}),undo:Xi(function(){so(this,"undo")}),redo:Xi(function(){so(this,"redo")}),undoSelection:Xi(function(){so(this,"undo",!0)}),redoSelection:Xi(function(){so(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,i=0;i=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,n){t=Ct(this,t),e=Ct(this,e);var i=[],r=t.line;return this.iter(t.line,e.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r}),i},getAllMarks:function(){var t=[];return this.iter(function(e){var n=e.markedSpans;if(n)for(var i=0;it)return e=t,!0;t-=o,++n}),Ct(this,gt(n,e))},indexFromPos:function(t){var e=(t=Ct(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var u=t.dataTransfer.getData("Text");if(u){var h;if(e.state.draggingText&&!e.state.draggingText.copy&&(h=e.listSelections()),Gr(e.doc,xr(n,n)),h)for(var d=0;d=0;e--)co(t.doc,"",i[e].from,i[e].to,"+delete");Ti(t)})}function Ko(t,e,n){var i=ot(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Yo(t,e,n){var i=Ko(t,e.ch,n);return null==i?null:new gt(e.line,i,n<0?"after":"before")}function Go(t,e,n,i,r){if(t){var o=Zt(n,e.doc.direction);if(o){var s,a=r<0?G(o):o[0],l=r<0==(1==a.level),c=l?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var u=_n(e,n);s=r<0?n.text.length-1:0;var h=Ln(e,u,s).top;s=st(function(t){return Ln(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=Ko(n,s,1))}else s=r<0?a.to:a.from;return new gt(i,s,c)}}return new gt(i,r<0?n.text.length:0,r<0?"before":"after")}jo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},jo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},jo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},jo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},jo.default=y?jo.macDefault:jo.pcDefault;var Xo={selectAll:no,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),B)},killLine:function(t){return qo(t,function(e){if(e.empty()){var n=at(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)r=new gt(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),gt(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=at(t.doc,r.line-1).text;s&&(r=new gt(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),gt(r.line-1,s.length-1),r,"+transpose"))}n.push(new yr(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return Ki(t,function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var i=0;i-1&&(vt((r=c.ranges[r]).from(),e)<0||e.xRel>0)&&(vt(r.to(),e)>0||e.xRel<0)?function(t,e,n,i){var r=t.display,o=!1,c=Yi(t,function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,ne(r.wrapper.ownerDocument,"mouseup",c),ne(r.wrapper.ownerDocument,"mousemove",u),ne(r.scroller,"dragstart",h),ne(r.scroller,"drop",c),o||(le(e),i.addNew||Br(t.doc,n,null,null,i.extend),l||s&&9==a?setTimeout(function(){r.wrapper.ownerDocument.body.focus(),r.input.focus()},20):r.input.focus())}),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return o=!0};l&&(r.scroller.draggable=!0),t.state.draggingText=c,c.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),te(r.wrapper.ownerDocument,"mouseup",c),te(r.wrapper.ownerDocument,"mousemove",u),te(r.scroller,"dragstart",h),te(r.scroller,"drop",c),gi(t),setTimeout(function(){return r.input.focus()},20)}(t,i,e,o):function(t,e,n,i){var r=t.display,o=t.doc;le(e);var s,a,l=o.sel,c=l.ranges;if(i.addNew&&!i.extend?(a=o.sel.contains(n),s=a>-1?c[a]:new yr(n,n)):(s=o.sel.primary(),a=o.sel.primIndex),"rectangle"==i.unit)i.addNew||(s=new yr(n,n)),n=si(t,e,!0,!0),a=-1;else{var u=ds(t,n,i.unit);s=i.extend?$r(s,u.anchor,u.head,i.extend):u}i.addNew?-1==a?(a=c.length,Yr(o,br(c.concat([s]),a),{scroll:!1,origin:"*mouse"})):c.length>1&&c[a].empty()&&"char"==i.unit&&!i.extend?(Yr(o,br(c.slice(0,a).concat(c.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Ur(o,a,s,W):(a=0,Yr(o,new mr([s],0),W),l=o.sel);var h=n;function d(e){if(0!=vt(h,e))if(h=e,"rectangle"==i.unit){for(var r=[],c=t.options.tabSize,u=j(at(o,n.line).text,n.ch,c),d=j(at(o,e.line).text,e.ch,c),f=Math.min(u,d),p=Math.max(u,d),g=Math.min(n.line,e.line),v=Math.min(t.lastLine(),Math.max(n.line,e.line));g<=v;g++){var m=at(o,g).text,y=q(m,f,c);f==p?r.push(new yr(gt(g,y),gt(g,y))):m.length>y&&r.push(new yr(gt(g,y),gt(g,q(m,p,c))))}r.length||r.push(new yr(n,n)),Yr(o,br(l.ranges.slice(0,a).concat(r),a),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,x=s,w=ds(t,e,i.unit),C=x.anchor;vt(w.anchor,C)>0?(b=w.head,C=xt(x.from(),w.anchor)):(b=w.anchor,C=bt(x.to(),w.head));var k=l.ranges.slice(0);k[a]=function(t,e){var n=e.anchor,i=e.head,r=at(t.doc,n.line);if(0==vt(n,i)&&n.sticky==i.sticky)return e;var o=Zt(r);if(!o)return e;var s=Xt(o,n.ch,n.sticky),a=o[s];if(a.from!=n.ch&&a.to!=n.ch)return e;var l,c=s+(a.from==n.ch==(1!=a.level)?0:1);if(0==c||c==o.length)return e;if(i.line!=n.line)l=(i.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=Xt(o,i.ch,i.sticky),h=u-s||(i.ch-n.ch)*(1==a.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=o[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,g=f?"after":"before";return n.ch==p&&n.sticky==g?e:new yr(new gt(n.line,p,g),i)}(t,new yr(Ct(o,C),b)),Yr(o,br(k,a),W)}}var f=r.wrapper.getBoundingClientRect(),p=0;function g(e){t.state.selectingText=!1,p=1/0,le(e),r.input.focus(),ne(r.wrapper.ownerDocument,"mousemove",v),ne(r.wrapper.ownerDocument,"mouseup",m),o.history.lastSelOrigin=null}var v=Yi(t,function(e){0!==e.buttons&&fe(e)?function e(n){var s=++p,a=si(t,n,!0,"rectangle"==i.unit);if(a)if(0!=vt(a,h)){t.curOp.focus=L(),d(a);var l=xi(r,o);(a.line>=l.to||a.linef.bottom?20:0;c&&setTimeout(Yi(t,function(){p==s&&(r.scroller.scrollTop+=c,e(n))}),50)}}(e):g(e)}),m=Yi(t,g);t.state.selectingText=m,te(r.wrapper.ownerDocument,"mousemove",v),te(r.wrapper.ownerDocument,"mouseup",m)}(t,i,e,o)}(e,i,o,t):de(t)==n.scroller&&le(t):2==r?(i&&Br(e.doc,i),setTimeout(function(){return n.input.focus()},20)):3==r&&(k?gs(e,t):gi(e)))}}function ds(t,e,n){if("char"==n)return new yr(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new yr(gt(e.line,0),Ct(t.doc,gt(e.line+1,0)));var i=n(t,e);return new yr(i.from,i.to)}function fs(t,e,n,i){var r,o;if(e.touches)r=e.touches[0].clientX,o=e.touches[0].clientY;else try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&le(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!se(t,n))return ue(e);o-=a.top-s.viewOffset;for(var l=0;l=r){var u=dt(t.doc,o),h=t.options.gutters[l];return ie(t,n,t,u,h,e),ue(e)}}}function ps(t,e){return fs(t,e,"gutterClick",!0)}function gs(t,e){wn(t.display,e)||function(t,e){return!!se(t,"gutterContextMenu")&&fs(t,e,"gutterContextMenu",!1)}(t,e)||re(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function vs(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),zn(t)}us.prototype.compare=function(t,e,n){return this.time+400>t&&0==vt(e,this.pos)&&n==this.button};var ms={toString:function(){return"CodeMirror.Init"}},ys={},bs={};function xs(t){ur(t),Ji(t),wi(t)}function ws(t,e,n){var i=n&&n!=ms;if(!e!=!i){var r=t.display.dragFunctions,o=e?te:ne;o(t.display.scroller,"dragstart",r.start),o(t.display.scroller,"dragenter",r.enter),o(t.display.scroller,"dragover",r.over),o(t.display.scroller,"dragleave",r.leave),o(t.display.scroller,"drop",r.drop)}}function Cs(t){t.options.lineWrapping?(N(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(E(t.display.wrapper,"CodeMirror-wrap"),Yt(t)),oi(t),Ji(t),zn(t),setTimeout(function(){return Ii(t)},100)}function ks(t,e){var i=this;if(!(this instanceof ks))return new ks(t,e);this.options=e=e?R(e):{},R(ys,e,!1),hr(e);var r=e.value;"string"==typeof r&&(r=new Eo(r,e.mode,null,e.lineSeparator,e.direction)),this.doc=r;var o=new ks.inputStyles[e.inputStyle](this),c=this.display=new function(t,e,i){var r=this;this.input=i,r.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=P("div",null,"CodeMirror-code"),r.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=O("div",null,"CodeMirror-cursors"),r.measure=O("div",null,"CodeMirror-measure"),r.lineMeasure=O("div",null,"CodeMirror-measure"),r.lineSpace=P("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var o=P("div",[r.lineSpace],"CodeMirror-lines");r.mover=O("div",[o],null,"position: relative"),r.sizer=O("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=O("div",null,null,"position: absolute; height: "+H+"px; width: 1px;"),r.gutters=O("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=O("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=O("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),s&&a<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),l||n&&m||(r.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(r.wrapper):t(r.wrapper)),r.viewFrom=r.viewTo=e.first,r.reportedViewFrom=r.reportedViewTo=e.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,i.init(r)}(t,r,o);for(var u in c.wrapper.CodeMirror=this,ur(this),vs(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ji(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 z,keySeq:null,specialChars:null},e.autofocus&&!m&&c.input.focus(),s&&a<11&&setTimeout(function(){return i.display.input.reset(!0)},20),function(t){var e=t.display;te(e.scroller,"mousedown",Yi(t,hs)),te(e.scroller,"dblclick",s&&a<11?Yi(t,function(e){if(!re(t,e)){var n=si(t,e);if(n&&!ps(t,e)&&!wn(t.display,e)){le(e);var i=t.findWordAt(n);Br(t.doc,i.anchor,i.head)}}}):function(e){return re(t,e)||le(e)}),k||te(e.scroller,"contextmenu",function(e){return gs(t,e)});var n,i={end:0};function r(){e.activeTouch&&(n=setTimeout(function(){return e.activeTouch=null},1e3),(i=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,i=e.top-t.top;return n*n+i*i>400}te(e.scroller,"touchstart",function(r){if(!re(t,r)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(r)&&!ps(t,r)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-i.end<=300?i:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}}),te(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),te(e.scroller,"touchend",function(n){var i=e.activeTouch;if(i&&!wn(e,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var s,a=t.coordsChar(e.activeTouch,"page");s=!i.prev||o(i,i.prev)?new yr(a,a):!i.prev.prev||o(i,i.prev.prev)?t.findWordAt(a):new yr(gt(a.line,0),Ct(t.doc,gt(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),le(n)}r()}),te(e.scroller,"touchcancel",r),te(e.scroller,"scroll",function(){e.scroller.clientHeight&&(Oi(t,e.scroller.scrollTop),_i(t,e.scroller.scrollLeft,!0),ie(t,"scroll",t))}),te(e.scroller,"mousewheel",function(e){return vr(t,e)}),te(e.scroller,"DOMMouseScroll",function(e){return vr(t,e)}),te(e.wrapper,"scroll",function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={enter:function(e){re(t,e)||he(e)},over:function(e){re(t,e)||(function(t,e){var n=si(t,e);if(n){var i=document.createDocumentFragment();ui(t,n,i),t.display.dragCursor||(t.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),A(t.display.dragCursor,i)}}(t,e),he(e))},start:function(e){return function(t,e){if(s&&(!t.state.draggingText||+new Date-Mo<100))he(e);else if(!re(t,e)&&!wn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!d)){var n=O("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(t,e)},drop:Yi(t,Ao),leave:function(e){re(t,e)||Oo(t)}};var l=e.input.getField();te(l,"keyup",function(e){return ss.call(t,e)}),te(l,"keydown",Yi(t,os)),te(l,"keypress",Yi(t,as)),te(l,"focus",function(e){return vi(t,e)}),te(l,"blur",function(e){return mi(t,e)})}(this),Lo(),Vi(this),this.curOp.forceUpdate=!0,Pr(this,r),e.autofocus&&!m||this.hasFocus()?setTimeout(F(vi,this),20):mi(this),bs)bs.hasOwnProperty(u)&&bs[u](i,e[u],ms);Ci(this),e.finishInit&&e.finishInit(this);for(var f=0;f150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?j(at(o,e-1).text,null,s):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/s);f;--f)d+=s,h+="\t";if(d1)if(Es&&Es.text.join("\n")==e){if(i.ranges.length%Es.text.length==0){c=[];for(var u=0;u=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=gt(f.line,f.ch-n):t.state.overwrite&&!a?p=gt(p.line,Math.min(at(o,p.line).text.length,p.ch+G(l).length)):Es&&Es.lineWise&&Es.text.join("\n")==e&&(f=p=gt(f.line,0))),s=t.curOp.updateInput;var g={from:f,to:p,text:c?c[h%c.length]:l,origin:r||(a?"paste":t.state.cutIncoming?"cut":"+input")};ro(t.doc,g),an(t,"inputRead",t,g)}e&&!a&&Ps(t,e),Ti(t),t.curOp.updateInput=s,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Os(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Ki(e,function(){return As(e,n,0,null,"paste")}),!0}function Ps(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=t.getModeAt(r.head),s=!1;if(o.electricChars){for(var a=0;a-1){s=Ts(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(at(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Ts(t,r.head.line,"smart"));s&&an(t,"electricInput",t,r.head.line)}}}function _s(t){for(var e=[],n=[],i=0;i=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Xt(r,n.ch,n.sticky),s=r[o];if("ltr"==t.doc.direction&&s.level%2==0&&(i>0?s.to>n.ch:s.from=s.from&&d>=u.begin)){var f=h?"before":"after";return new gt(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new gt(n.line,l(t,1),"before"):new gt(n.line,t,"after")};t>=0&&t0==(1!=s.level),c=a?i.begin:l(i.end,-1);if(s.from<=c&&c0?u.end:l(u.begin,-1);return null==v||i>0&&v==e.text.length||!(g=p(i>0?0:r.length-1,i,c(v)))?null:g}(t.cm,a,e,n):Yo(a,e,n))){if(i||!function(){var i=e.line+n;return!(i=t.first+t.size)&&(e=new gt(i,e.ch,e.sticky),a=at(t,i))}())return!1;e=Go(r,t.cm,a,e.line,n)}else e=o;return!0}if("char"==i)l();else if("column"==i)l(!0);else if("word"==i||"group"==i)for(var c=null,u="group"==i,h=t.cm&&t.cm.getHelper(e,"wordChars"),d=!0;!(n<0)||l(!d);d=!1){var f=a.text.charAt(e.ch)||"\n",p=et(f,h)?"w":u&&"\n"==f?"n":!u||/\s/.test(f)?null:"p";if(!u||d||p||(p="s"),c&&c!=p){n<0&&(n=1,l(),e.sticky="after");break}if(p&&(c=p),n>0&&!l(!d))break}var g=to(t,e,o,s,!0);return mt(o,g)&&(g.hitSide=!0),g}function Is(t,e,n,i){var r,o,s=t.doc,a=e.left;if("page"==i){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*ti(t.display),3);r=(n>0?e.bottom:e.top)+n*c}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(;(o=Gn(t,a,r)).outside;){if(n<0?r<=0:r>=s.height){o.hitSide=!0;break}r+=5*n}return o}var Fs=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Rs(t,e){var n=Pn(t,e.line);if(!n||n.hidden)return null;var i=at(t.doc,e.line),r=An(n,i,e.line),o=Zt(i,t.doc.direction),s="left";if(o){var a=Xt(o,e.ch);s=a%2?"right":"left"}var l=In(r.map,e.ch,s);return l.offset="right"==l.collapse?l.end:l.start,l}function js(t,e){return e&&(t.bad=!0),t}function zs(t,e,n){var i;if(e==t.display.lineDiv){if(!(i=t.display.lineDiv.childNodes[n]))return js(t.clipPos(gt(t.display.viewTo-1)),!0);e=null,n=0}else for(i=e;;i=i.parentNode){if(!i||i==t.display.lineDiv)return null;if(i.parentNode&&i.parentNode==t.display.lineDiv)break}for(var r=0;r=e.display.viewTo||o.line=e.display.viewFrom&&Rs(e,r)||{node:l[0].measure.map[2],offset:0},u=o.linei.firstLine()&&(s=gt(s.line-1,at(i.doc,s.line-1).length)),a.ch==at(i.doc,a.line).text.length&&a.liner.viewTo-1)return!1;s.line==r.viewFrom||0==(t=ai(i,s.line))?(e=ht(r.view[0].line),n=r.view[0].node):(e=ht(r.view[t].line),n=r.view[t-1].node.nextSibling);var l,c,u=ai(i,a.line);if(u==r.view.length-1?(l=r.viewTo-1,c=r.lineDiv.lastChild):(l=ht(r.view[u+1].line)-1,c=r.view[u+1].node.previousSibling),!n)return!1;for(var h=i.doc.splitLines(function(t,e,n,i,r){var o="",s=!1,a=t.doc.lineSeparator(),l=!1;function c(){s&&(o+=a,l&&(o+=a),s=l=!1)}function u(t){t&&(c(),o+=t)}function h(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var o,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(gt(i,0),gt(r+1,0),function(t){return function(e){return e.id==t}}(+d));return void(f.length&&(o=f[0].find(0))&&u(lt(t.doc,o.from,o.to).join(a)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;p&&c();for(var g=0;g1&&d.length>1;)if(G(h)==G(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),e++}for(var f=0,p=0,g=h[0],v=d[0],m=Math.min(g.length,v.length);fs.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var w=gt(e,f),C=gt(l,d.length?G(d).length-p:0);return h.length>1||h[0]||vt(w,C)?(co(i.doc,h,w,C,"+input"),!0):void 0},Fs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fs.prototype.reset=function(){this.forceCompositionEnd()},Fs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Fs.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},Fs.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Ki(this.cm,function(){return Ji(t.cm)})},Fs.prototype.setUneditable=function(t){t.contentEditable="false"},Fs.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Yi(this.cm,As)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Fs.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Fs.prototype.onContextMenu=function(){},Fs.prototype.resetPosition=function(){},Fs.prototype.needsContentAttribute=!0;var Hs=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null};Hs.prototype.init=function(t){var e=this,n=this,i=this.cm;this.createField(t);var r=this.textarea;function o(t){if(!re(i,t)){if(i.somethingSelected())Ms({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var e=_s(i);Ms({lineWise:!0,text:e.text}),"cut"==t.type?i.setSelections(e.ranges,null,B):(n.prevInput="",r.value=e.text.join("\n"),I(r))}"cut"==t.type&&(i.state.cutIncoming=!0)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(r.style.width="0px"),te(r,"input",function(){s&&a>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()}),te(r,"paste",function(t){re(i,t)||Os(t,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),te(r,"cut",o),te(r,"copy",o),te(t.scroller,"paste",function(e){wn(t,e)||re(i,e)||(i.state.pasteIncoming=!0,n.focus())}),te(t.lineSpace,"selectstart",function(e){wn(t,e)||le(e)}),te(r,"compositionstart",function(){var t=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:i.markText(t,i.getCursor("to"),{className:"CodeMirror-composing"})}}),te(r,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Hs.prototype.createField=function(t){this.wrapper=Ns(),this.textarea=this.wrapper.firstChild},Hs.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=ci(t);if(t.options.moveInputWithCursor){var r=qn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),s=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+s.top-o.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+s.left-o.left))}return i},Hs.prototype.showSelection=function(t){var e=this.cm,n=e.display;A(n.cursorDiv,t.cursors),A(n.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Hs.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&I(this.textarea),s&&a>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",s&&a>=9&&(this.hasSelection=null))}},Hs.prototype.getField=function(){return this.textarea},Hs.prototype.supportsTouch=function(){return!1},Hs.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||L()!=this.textarea))try{this.textarea.focus()}catch(t){}},Hs.prototype.blur=function(){this.textarea.blur()},Hs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Hs.prototype.receivedFocus=function(){this.slowPoll()},Hs.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Hs.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,function n(){var i=e.poll();i||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))})},Hs.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||xe(n)&&!i&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=n.value;if(r==i&&!e.somethingSelected())return!1;if(s&&a>=9&&this.hasSelection===r||y&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||i||(i="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(i.length,r.length);l1e3||r.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Hs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Hs.prototype.onKeyPress=function(){s&&a>=9&&(this.hasSelection=null),this.fastPoll()},Hs.prototype.onContextMenu=function(t){var e=this,n=e.cm,i=n.display,r=e.textarea,o=si(n,t),c=i.scroller.scrollTop;if(o&&!h){var u=n.options.resetSelectionOnContextMenu;u&&-1==n.doc.sel.contains(o)&&Yi(n,Yr)(n.doc,xr(o),B);var d=r.style.cssText,f=e.wrapper.style.cssText;e.wrapper.style.cssText="position: absolute";var p,g=e.wrapper.getBoundingClientRect();if(r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-g.top-5)+"px; left: "+(t.clientX-g.left-5)+"px;\n z-index: 1000; background: "+(s?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(p=window.scrollY),i.input.focus(),l&&window.scrollTo(null,p),i.input.reset(),n.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=!0,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),s&&a>=9&&m(),k){he(t);var v=function(){ne(window,"mouseup",v),setTimeout(y,20)};te(window,"mouseup",v)}else setTimeout(y,50)}function m(){if(null!=r.selectionStart){var t=n.somethingSelected(),o="​"+(t?r.value:"");r.value="⇚",r.value=o,e.prevInput=t?"":"​",r.selectionStart=1,r.selectionEnd=o.length,i.selForContextMenu=n.doc.sel}}function y(){if(e.contextMenuPending=!1,e.wrapper.style.cssText=f,r.style.cssText=d,s&&a<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=c),null!=r.selectionStart){(!s||s&&a<9)&&m();var t=0,o=function(){i.selForContextMenu==n.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&"​"==e.prevInput?Yi(n,no)(n):t++<10?i.detectingSelectAll=setTimeout(o,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(o,200)}}},Hs.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Hs.prototype.setUneditable=function(){},Hs.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,i,r,o){t.defaults[n]=i,r&&(e[n]=o?function(t,e,n){n!=ms&&r(t,e,n)}:r)}t.defineOption=n,t.Init=ms,n("value","",function(t,e){return t.setValue(e)},!0),n("mode",null,function(t,e){t.doc.modeOption=e,Tr(t)},!0),n("indentUnit",2,Tr,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(t){Er(t),zn(t),Ji(t)},!0),n("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var n=[],i=t.doc.first;t.doc.iter(function(t){for(var r=0;;){var o=t.text.indexOf(e,r);if(-1==o)break;r=o+e.length,n.push(gt(i,o))}i++});for(var r=n.length-1;r>=0;r--)co(t.doc,e,n[r],gt(n[r].line,n[r].ch+e.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=ms&&t.refresh()}),n("specialCharPlaceholder",Je,function(t){return t.refresh()},!0),n("electricChars",!0),n("inputStyle",m?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",function(t){vs(t),xs(t)},!0),n("keyMap","default",function(t,e,n){var i=Uo(e),r=n!=ms&&Uo(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Cs,!0),n("gutters",[],function(t){hr(t.options),xs(t)},!0),n("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?ii(t.display)+"px":"0",t.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(t){return Ii(t)},!0),n("scrollbarStyle","native",function(t){ji(t),Ii(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),n("lineNumbers",!1,function(t){hr(t.options),xs(t)},!0),n("firstLineNumber",1,xs,!0),n("lineNumberFormatter",function(t){return t},xs,!0),n("showCursorWhenSelecting",!1,li,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("readOnly",!1,function(t,e){"nocursor"==e&&(mi(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),n("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),n("dragDrop",!0,ws),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,li,!0),n("singleCursorHeightPerLine",!0,li,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Er,!0),n("addModeClass",!1,Er,!0),n("pollInterval",100),n("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),n("historyEventDelay",1250),n("viewportMargin",10,function(t){return t.refresh()},!0),n("maxHighlightLength",1e4,Er,!0),n("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),n("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),n("autofocus",null),n("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(ks),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var i=this.options,r=i[t];i[t]==n&&"mode"!=t||(i[t]=n,e.hasOwnProperty(t)&&Yi(this,e[t])(this,n,r),ie(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Uo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;nn&&(Ts(this,r.head.line,t,!0),n=r.head.line,i==this.doc.sel.primIndex&&Ti(this));else{var o=r.from(),s=r.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l0&&Ur(this.doc,i,new yr(o,c[i].to()),B)}}}),getTokenAt:function(t,e){return $e(this,t,e)},getLineTokens:function(t,e){return $e(this,gt(t),e,!0)},getTokenTypeAt:function(t){t=Ct(this.doc,t);var e,n=Fe(this,at(this.doc,t.line)),i=0,r=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var s=i+r>>1;if((s?n[2*s-1]:0)>=o)r=s;else{if(!(n[2*s+1]o&&(t=o,r=!0),i=at(this.doc,t)}else i=t;return Bn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-qt(i):0)},defaultTextHeight:function(){return ti(this.display)},defaultCharWidth:function(){return ei(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display,s=(t=qn(this,Ct(this.doc,t))).bottom,a=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),o.sizer.appendChild(e),"over"==i)s=t.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?s=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(s=t.bottom),a+e.offsetWidth>c&&(a=c-e.offsetWidth)}e.style.top=s+"px",e.style.left=e.style.right="","right"==r?(a=o.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(o.sizer.clientWidth-e.offsetWidth)/2),e.style.left=a+"px"),n&&function(t,e){var n=ki(t,e);null!=n.scrollTop&&Oi(t,n.scrollTop),null!=n.scrollLeft&&_i(t,n.scrollLeft)}(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:Gi(os),triggerOnKeyPress:Gi(as),triggerOnKeyUp:ss,triggerOnMouseDown:Gi(hs),execCommand:function(t){if(Xo.hasOwnProperty(t))return Xo[t].call(null,this)},triggerElectric:Gi(function(t){Ps(this,t)}),findPosH:function(t,e,n,i){var r=1;e<0&&(r=-1,e=-e);for(var o=Ct(this.doc,t),s=0;s0&&a(n.charAt(i-1));)--i;for(;r.5)&&oi(this),ie(this,"refresh",this)}),swapDoc:Gi(function(t){var e=this.doc;return e.cm=null,Pr(this,t),zn(this),this.display.input.reset(),Ei(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,an(this,"swapDoc",this,e),e}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ae(t),t.registerHelper=function(e,i,r){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][i]=r},t.registerGlobalHelper=function(e,i,r,o){t.registerHelper(e,i,o),n[e]._global.push({pred:r,val:o})}}(ks);var $s="iter insert remove copy getEditor constructor".split(" ");for(var Bs in Eo.prototype)Eo.prototype.hasOwnProperty(Bs)&&V($s,Bs)<0&&(ks.prototype[Bs]=function(t){return function(){return t.apply(this.doc,arguments)}}(Eo.prototype[Bs]));return ae(Eo),ks.inputStyles={textarea:Hs,contenteditable:Fs},ks.defineMode=function(t){ks.defaults.mode||"null"==t||(ks.defaults.mode=t),function(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ke[t]=e}.apply(this,arguments)},ks.defineMIME=function(t,e){Se[t]=e},ks.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),ks.defineMIME("text/plain","null"),ks.defineExtension=function(t,e){ks.prototype[t]=e},ks.defineDocExtension=function(t,e){Eo.prototype[t]=e},ks.fromTextArea=function(t,e){if((e=e?R(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=L();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function i(){t.value=a.getValue()}var r;if(t.form&&(te(t.form,"submit",i),!e.leaveSubmitMethodAlone)){var o=t.form;r=o.submit;try{var s=o.submit=function(){i(),o.submit=r,o.submit(),o.submit=s}}catch(t){}}e.finishInit=function(e){e.save=i,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,i(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(ne(t.form,"submit",i),"function"==typeof t.form.submit&&(t.form.submit=r))}},t.style.display="none";var a=ks(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return a},function(t){t.off=ne,t.on=te,t.wheelEventPixels=gr,t.Doc=Eo,t.splitLines=be,t.countColumn=j,t.findColumn=q,t.isWordChar=tt,t.Pass=$,t.signal=ie,t.Line=Ue,t.changeEnd=wr,t.scrollbarModel=Ri,t.Pos=gt,t.cmpPos=vt,t.modes=ke,t.mimeModes=Se,t.resolveMode=Te,t.getMode=Ee,t.modeExtensions=Me,t.extendMode=Ae,t.copyState=Oe,t.startState=_e,t.innerMode=Pe,t.commands=Xo,t.keyMap=jo,t.keyName=Wo,t.isModifierKey=$o,t.lookupKey=Ho,t.normalizeKeyMap=Vo,t.StringStream=Le,t.SharedTextMarker=Co,t.TextMarker=xo,t.LineWidget=mo,t.e_preventDefault=le,t.e_stopPropagation=ce,t.e_stop=he,t.addClass=N,t.contains=_,t.rmClass=E,t.keyNames=Do}(ks),ks.version="5.39.0",ks}()},function(t,e,n){"use strict";var i=o(n(1)),r=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var s=n(13),a=r.default.$;t.exports=i.default.extend({},s,{init:function(t){i.default.bindAll(this,"startDraw","draw","endDraw","rollback"),this.config=t||{},this.hType=this.config.newFixedH?"height":"min-height",this.allowDraw=1},enable:function(){for(var t=arguments.length,e=Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(t){var n=e.ctrlKey||e.metaKey,i=e.shiftKey,r=this.editor,s=r.getConfig("multipleSelection"),a=this.em;if(n&&s)r.selectToggle(t);else if(i&&s){a.clearSelection(r.Canvas.getWindow());var l=t.collection,c=l.indexOf(t),u=(r.getSelectedAll(),void 0),h=void 0;if(r.getSelectedAll().forEach(function(t){var e=t.collection,n=e.indexOf(t);e===l&&(nc&&(h=(0,o.isUndefined)(h)?n:Math.min(h,n)))}),!(0,o.isUndefined)(u))for(;u!==c;)r.selectAdd(l.at(u)),u++;if(!(0,o.isUndefined)(h))for(;h!==c;)r.selectAdd(l.at(h)),h--;r.selectAdd(t)}else r.select(t);this.initResize(t)}},updateBadge:function(t,e){var n=c(t),i=this.canvas,r=i.getConfig().customBadgeLabel;this.cacheEl=t;var o=n.data("model");if(o&&o.get("badgable")){var s=this.getBadge(),a=o.getIcon()+o.getName();a=r?r(o):a,s.innerHTML=a;var l=s.style;l.display="block";var u=i.getCanvasView().getPosition();if(u){var h=s?s.offsetHeight:0,d=s?s.offsetWidth:0,f=e.top-h1&&void 0!==arguments[1]?arguments[1]:{},i=n.el,r=n.config,o=n.resizer,a=r.keyHeight,l=r.keyWidth,h=r.currentUnit;g("add",0,n),p=e.get("StyleManager").getModelToStyle(c);var d=getComputedStyle(i),f=p.getStyle(),v=f[l]||d[l],m=f[a]||d[a];o.startDim.w=parseFloat(v),o.startDim.h=parseFloat(m),u=0,h&&(r.unitHeight=(0,s.getUnitFromValue)(m),r.unitWidth=(0,s.getUnitFromValue)(v))},onMove:function(){n.trigger("change:canvasOffset")},onEnd:function(t,e){g("remove",0,e),n.trigger("change:canvasOffset"),u=1},updateTarget:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(p){var r=i.store,o=i.selectedHandler,s=i.config,a=s.keyHeight,l=s.keyWidth,c=["tc","bc"].indexOf(o)>=0,u=["cl","cr"].indexOf(o)>=0,h=p.getStyle();c||(h[l]=n.w+s.unitWidth),u||(h[a]=n.h+s.unitHeight),p.setStyle(h,{avoidStore:1});e&&e.trigger("update:component:style:"+a+" update:component:style:"+l),r&&p.trigger("change:style",p,h,{})}}},"object"==(void 0===h?"undefined":r(h))&&(f=i({},f,h)),n.runCommand("resize",{el:d,options:f})):n.stopCommand("resize")},updateToolbar:function(t){var e=this,n=this.config.em,i=t==n?n.getSelected():t,r=this.canvas.getToolbarEl(),o=r.style;if(i){var s=i.get("toolbar");this.ppfx;if(n.get("Config").showToolbar&&s&&s.length){if(o.opacity="",o.display="",!this.toolbar){r.innerHTML="",this.toolbar=new l(s);var c=new a({collection:this.toolbar,editor:this.editor});r.appendChild(c.render().el)}this.toolbar.reset(s);var u=i.view;o.top="-100px",o.left=0,setTimeout(function(){return u&&e.updateToolbarPos(u.el)},0)}else o.display="none"}else o.opacity=0},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style;i.opacity=0;var r=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"});if(r){var o=r.left+r.elementWidth-r.targetWidth;i.top=r.top+"px",i.left=(o<0?0:o)+"px",i.opacity=""}},getCanvasPosition:function(){return this.canvas.getCanvasView().getPosition()},clean:function(){this.selEl&&this.selEl.removeClass(this.hoverClass)},getBadge:function(){return this.canvas.getBadgeEl()},onFrameScroll:function(t){var e=this.cacheEl;if(e){var n=this.getElementPos(e);this.updateBadge(e,n);var i=this.em.getSelected();i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(t){var e=this.em.getSelected();if(e){var n=e.view;this.updateToolbarPos(n.el),this.showFixedElementOffset(n.el)}},getElementPos:function(t,e){return this.canvas.getCanvasView().getElementPos(t)},hideBadge:function(){this.getBadge().style.display="none"},cleanPrevious:function(t){t&&t.set({status:"",state:""})},getContentWindow:function(){return this.frameEl.contentWindow},run:function(t){this.editor=t&&t.get("Editor"),this.enable(),this.onSelect()},stop:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.em;this.stopSelectComponent(),!n.preserveSelected&&i.setSelected(null),this.clean(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",i.off("component:update",this.updateAttached,this),i.off("change:canvasOffset",this.updateAttached,this)}}},function(t,e,n){"use strict";var i=n(1),r=n(0),o=r.$;t.exports=r.View.extend({events:{change:"onChange"},attributes:function(){return this.model.get("attributes")},initialize:function(t){var e=this.model,n=(e.get("name"),e.target);this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=n,this.className=this.pfx+"trait",this.labelClass=this.ppfx+"label",this.fieldClass=this.ppfx+"field "+this.ppfx+"field-"+e.get("type"),this.inputhClass=this.ppfx+"input-holder",e.off("change:value",this.onValueChange),this.listenTo(e,"change:value",this.onValueChange),e.view=this,this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},setInputValue:function(t){this.getInputEl().value=t},onValueChange:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.model;this.target,i.get("name");if(n.fromTarget)this.setInputValue(i.get("value"));else{var r=this.getValueForTarget();i.setTargetValue(r,n)}},renderLabel:function(){var t=this.getLabel();this.$el.html('
'+t+"
")},getLabel:function(){var t=this.model,e=t.get("label")||t.get("name");return e.charAt(0).toUpperCase()+e.slice(1).replace(/-/g," ")},getInputEl:function(){if(!this.$input){var t=this.model,e=t.get("placeholder")||t.get("default")||"",n=t.get("type")||"text",i=t.get("min"),r=t.get("max"),s=this.getModelValue(),a=o('');s&&(t.set({value:s},{silent:!0}),a.prop("value",s)),i&&a.prop("min",i),r&&a.prop("max",r),this.$input=a}return this.$input.get(0)},getModelValue:function(){var t=void 0,e=this.model,n=this.target,r=e.get("name");if(e.get("changeProp"))t=n.get(r);else{var o=n.get("attributes");t=e.get("value")||o[r]}return(0,i.isUndefined)(t)?"":t},renderField:function(){if(!this.$input){this.$el.append(this.tmpl);var t=this.getInputEl(),e=this.el.querySelector("."+this.inputhClass);e.insertBefore(t,e.childNodes[0])}},render:function(){return this.renderLabel(),this.renderField(),this.el.className=this.className,this}})},function(t,e,n){"use strict";var i=n(0).Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:1,active:!0,private:!1,protected:!1},initialize:function(){var t=this.get("name"),e=this.get("label");t?e||this.set("label",t):this.set("name",e),this.set("name",i.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case 1:t=".";break;case 2:t="#"}return t+this.get("name")}},{TYPE_CLASS:1,TYPE_ID:2,escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=i},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var i=r(n(1));r(n(0));function r(t){return t&&t.__esModule?t:{default:t}}var o=n(7);t.exports=i.default.extend({},o,{init:function(){for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0},t),this},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parseValue(t);this.set(r,i({},n,{avoidStore:1})),e&&(this.set("value","",n),this.set(r,n))},setValueFromInput:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.setValue(t,e,i({},n,{fromInput:1}))},parseValue:function(t){var e={value:t},n="!important";if((0,r.isString)(t)&&-1!==t.indexOf(n)&&(e.value=t.replace(n,"").trim(),e.important=1),!this.get("functionName"))return e;var i=[],o=""+e.value,s=o.indexOf("(")+1,a=o.lastIndexOf(")");return i.push(s),a>=0&&i.push(a),e.value=String.prototype.substring.apply(o,i),e},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=(0,r.isUndefined)(t)?this.get("value"):t;return e&&!(0,r.isUndefined)(n)&&(n=e+"("+n+")"),this.get("important")&&(n+=" !important"),n||""}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e/,f=/^\w+$/;function p(t,n){n=n||e;var i=h.test(t)?n.getElementsByClassName(t.slice(1)):f.test(t)?n.getElementsByTagName(t):n.querySelectorAll(t);return i}function g(n){if(!t){var i=(t=e.implementation.createHTMLDocument(null)).createElement("base");i.href=e.location.href,t.head.appendChild(i)}return t.body.innerHTML=n,t.body.childNodes}function v(t){"loading"!==e.readyState?setTimeout(t):e.addEventListener("DOMContentLoaded",t)}function m(t,i){if(!t)return this;if(t.cash&&t!==n)return t;var r,o=t,s=0;if(c(t))o=u.test(t)?e.getElementById(t.slice(1)):d.test(t)?g(t):p(t,i);else if(l(t))return v(t),this;if(!o)return this;if(o.nodeType||o===n)this[0]=o,this.length=1;else for(r=this.length=o.length;s=0&&o.splice(i,1)):(x(o,function(n){t.removeEventListener(e,n)}),o=[]))}function R(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function j(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return function(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}(t);case"select-multiple":return function(t){var e=[];return x(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function z(t,e,n){var i=c(e);i||!e.length?x(t,i?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,i){return function(t,e,n){if(n){var i=t.childNodes[0];t.insertBefore(e,i)}else t.appendChild(e)}(t,0===i?e:e.cloneNode(!0),n)}):x(e,function(e){return z(t,e,n)})}y.prefixedProp=D,y.camelCase=N,b.extend({css:function(t,e){if(c(t))return t=D(t),arguments.length>1?this.each(function(n){return n.style[t]=e}):n.getComputedStyle(this[0])[t];for(var i in t)this.css(i,t[i]);return this}}),x(["Width","Height"],function(t){var e=t.toLowerCase();b[e]=function(){return this[0].getBoundingClientRect()[e]},b["inner"+t]=function(){return this[0]["client"+t]},b["outer"+t]=function(e){return this[0]["offset"+t]+(e?I(this,"margin"+("Width"===t?"Left":"Top"))+I(this,"margin"+("Width"===t?"Right":"Bottom")):0)}}),b.extend({off:function(t,e){return this.each(function(n){return F(n,t,e)})},on:function(t,e,n,i){var r;if(!c(t)){for(var o in t)this.on(o,e,t[o]);return this}return l(e)&&(n=e,e=null),"ready"===t?(v(n),this):(e&&(r=n,n=function(t){for(var n=t.target;!w(n,e);){if(n===this)return n=!1;n=n.parentNode}n&&r.call(n,t)}),this.each(function(e){var r=n;i&&(r=function(){n.apply(this,arguments),F(e,t,r)}),function(t,e,n){var i=M(t,"_cashEvents")||E(t,"_cashEvents",{});i[e]=i[e]||[],i[e].push(n),t.addEventListener(e,n)}(e,t,r)}))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:v,trigger:function(t,n){var i=e.createEvent("HTMLEvents");return i.data=n,i.initEvent(t,!0,!1),this.each(function(t){return t.dispatchEvent(i)})}}),b.extend({serialize:function(){var t="";return x(this[0].elements||this,function(e){if(!e.disabled&&"FIELDSET"!==e.tagName){var n=e.name;switch(e.type.toLowerCase()){case"file":case"reset":case"submit":case"button":break;case"select-multiple":var i=j(e);null!==i&&x(i,function(e){t+=R(n,e)});break;default:var r=j(e);null!==r&&(t+=R(n,r))}}}),t.substr(1)},val:function(t){return void 0===t?j(this[0]):this.each(function(e){return e.value=t})}}),b.extend({after:function(t){return y(t).insertAfter(this),this},append:function(t){return z(this,t),this},appendTo:function(t){return z(y(t),this),this},before:function(t){return y(t).insertBefore(this),this},clone:function(){return y(this.map(function(t){return t.cloneNode(!0)}))},empty:function(){return this.html(""),this},html:function(t){if(void 0===t)return this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each(function(t){return t.innerHTML=e})},insertAfter:function(t){var e=this;return y(t).each(function(t,n){var i=t.parentNode,r=t.nextSibling;e.each(function(t){i.insertBefore(0===n?t:t.cloneNode(!0),r)})}),this},insertBefore:function(t){var e=this;return y(t).each(function(t,n){var i=t.parentNode;e.each(function(e){i.insertBefore(0===n?e:e.cloneNode(!0),t)})}),this},prepend:function(t){return z(this,t,!0),this},prependTo:function(t){return z(y(t),this,!0),this},remove:function(){return this.each(function(t){return t.parentNode.removeChild(t)})},text:function(t){return void 0===t?this[0].textContent:this.each(function(e){return e.textContent=t})}});var V=e.documentElement;return b.extend({position:function(){var t=this[0];return{left:t.offsetLeft,top:t.offsetTop}},offset:function(){var t=this[0].getBoundingClientRect();return{top:t.top+n.pageYOffset-V.clientTop,left:t.left+n.pageXOffset-V.clientLeft}},offsetParent:function(){return y(this[0].offsetParent)}}),b.extend({children:function(t){var e=[];return this.each(function(t){s.apply(e,t.children)}),e=k(e),t?e.filter(function(e){return w(e,t)}):e},closest:function(t){return!t||this.length<1?y():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=C(t);return this.each(function(i){return!(e=n(i,t))}),e},find:function(t){if(!t||t.nodeType)return y(t&&this.has(t).length?t:null);var e=[];return this.each(function(n){s.apply(e,p(t,n))}),k(e)},has:function(t){var e=c(t)?function(e){return 0!==p(t,e).length}:function(e){return e.contains(t)};return this.filter(e)},next:function(){return y(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=C(t);return this.filter(function(n){return!e(n,t)})},parent:function(){var t=[];return this.each(function(e){e&&e.parentNode&&t.push(e.parentNode)}),k(t)},parents:function(t){var n,i=[];return this.each(function(r){for(n=r;n&&n.parentNode&&n!==e.body.parentNode;)n=n.parentNode,(!t||t&&w(n,t))&&i.push(n)}),k(i)},prev:function(){return y(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter(function(t){return t!==e})}}),y})?i.call(e,n,e,t):i)||(t.exports=r)},function(t,e,n){"use strict";t.exports={run:function(t,e,n){var i=n&&n.el||"",r=t.Canvas,o=this.dragger,s=n.options||{},a=r.getCanvasView();return s.prefix=t.getConfig().stylePrefix,s.mousePosFetcher=r.getMouseRelativePos,s.posFetcher=a.getElementPos.bind(a),o||(o=t.Utils.Dragger.init(s),this.dragger=o),o.setOptions(s),o.focus(i),s.event&&o.start(s.event),o},stop:function(){this.canvasResizer&&this.canvasResizer.blur()}}},function(t,e,n){"use strict";t.exports={run:function(t,e,n){var i=n||{},r=i.el||"",o=t.Canvas,s=this.canvasResizer,a=i.options||{},l=o.getCanvasView();return a.ratioDefault=1,a.appendTo=o.getResizerEl(),a.prefix=t.getConfig().stylePrefix,a.posFetcher=l.getElementPos.bind(l),a.mousePosFetcher=o.getMouseRelativePos,s&&!i.forceNew||(this.canvasResizer=t.Utils.Resizer.init(a),s=this.canvasResizer),s.setOptions(a),s.blur(),s.focus(r),s},stop:function(){var t=this.canvasResizer;t&&t.blur()}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(1));t.exports={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanelsEl()),this.panels},tglPointers:function(t,e){var n=t.Canvas.getBody().querySelectorAll("."+this.ppfx+"no-pointer");i.default.each(n,function(t){t.style.pointerEvents=e?"":"all"})},run:function(t,e){e&&e.set&&e.set("active",!1),t.stopCommand("sw-visibility"),t.getModel().stopDefault();var n=this.getPanels(t),i=t.Canvas.getElement(),r=t.getEl(),o=t.Config.stylePrefix;this.helper||(this.helper=document.createElement("span"),this.helper.className=o+"off-prv fa fa-eye-slash",r.appendChild(this.helper),this.helper.onclick=function(){t.stopCommand("preview")}),this.helper.style.display="inline-block",this.tglPointers(t),n.style.display="none";var s=i.style;s.width="100%",s.height="100%",s.top="0",s.left="0",s.padding="0",s.margin="0",t.trigger("change:canvasOffset")},stop:function(t,e){var n=this.getPanels(t);t.runCommand("sw-visibility"),t.getModel().runDefault(),n.style.display="block",t.Canvas.getElement().setAttribute("style",""),this.helper&&(this.helper.style.display="none"),t.trigger("change:canvasOffset"),this.tglPointers(t,1)}}},function(t,e,n){"use strict";t.exports={isEnabled:function(){var t=document;return t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement?1:0},enable:function(t){var e="";return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?(e="webkit",t.webkitRequestFullscreen()):t.mozRequestFullScreen?(e="moz",t.mozRequestFullScreen()):t.msRequestFullscreen?t.msRequestFullscreen():console.warn("Fullscreen not supported"),e},disable:function(){var t=document;t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen()},fsChanged:function(t,e){document;var n=(t||"")+"fullscreenchange";this.isEnabled()||(this.stop(null,this.sender),document.removeEventListener(n,this.fsChanged))},run:function(t,e){this.sender=e;var n=this.enable(t.getContainer());this.fsChanged=this.fsChanged.bind(this,n),document.addEventListener(n+"fullscreenchange",this.fsChanged),t&&t.trigger("change:canvasOffset")},stop:function(t,e){e&&e.set&&e.set("active",!1),this.disable(),t&&t.trigger("change:canvasOffset")}}},function(t,e,n){"use strict";t.exports={run:function(t){for(var e=t.getSelected(),n=e&&e.parent();n&&!n.get("selectable");)n=n.parent();n&&t.select(n)}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)).default.$;t.exports={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,n){var r=n||{},o=r.state||"",s=t.getConfig();if(s.showOffsets&&(s.showOffsetsSelected||"Fixed"!=o)){var a=t.Canvas,l=r.el||"",c=r.elPos||a.getElementPos(l),u=window.getComputedStyle(l),h=this.ppfx,d=o+"State",f=a[this.getOffsetMethod(o)]();f.style.display="block";var p=this["marginT"+o],g=this["marginB"+o],v=this["marginL"+o],m=this["marginR"+o],y=this["padT"+o],b=this["padB"+o],x=this["padL"+o],w=this["padR"+o];if(!this[d]){var C=o.toLowerCase(),k=C+"margin-v",S=C+"padding-v",T=i('
').get(0),E=i('
').get(0),M=h+k+"-el"+" "+(h+k),A=h+S+"-el"+" "+(h+S);p=i('
').get(0),g=i('
').get(0),v=i('
').get(0),m=i('
').get(0),y=i('
').get(0),b=i('
').get(0),x=i('
').get(0),w=i('
').get(0),this["marginT"+o]=p,this["marginB"+o]=g,this["marginL"+o]=v,this["marginR"+o]=m,this["padT"+o]=y,this["padB"+o]=b,this["padL"+o]=x,this["padR"+o]=w,T.appendChild(p),T.appendChild(g),T.appendChild(v),T.appendChild(m),E.appendChild(y),E.appendChild(b),E.appendChild(x),E.appendChild(w),f.appendChild(T),f.appendChild(E),this[d]="1"}var O=u.marginLeft.replace("px",""),P=parseInt(u.marginTop.replace("px","")),_=parseInt(u.marginBottom.replace("px","")),L=p.style,N=g.style,D=v.style,I=m.style,F=y.style,R=b.style,j=x.style,z=w.style,V=parseInt(c.left);L.height=u.marginTop,L.width=u.width,L.top=c.top-u.marginTop.replace("px","")+"px",L.left=V+"px",N.height=u.marginBottom,N.width=u.width,N.top=c.top+c.height+"px",N.left=V+"px";var H=c.height+P+_+"px",$=c.top-P+"px";D.height=H,D.width=u.marginLeft,D.top=$,D.left=V-O+"px",I.height=H,I.width=u.marginRight,I.top=$,I.left=V+c.width+"px";var B=parseInt(u.paddingTop.replace("px",""));F.height=u.paddingTop,F.width=u.width,F.top=c.top+"px",F.left=V+"px";var W=parseInt(u.paddingBottom.replace("px",""));R.height=u.paddingBottom,R.width=u.width,R.top=c.top+c.height-W+"px",R.left=V+"px";var U=c.height-W-B+"px",q=c.top+B+"px";j.height=U,j.width=u.paddingLeft,j.top=q,j.left=c.left+"px";var K=parseInt(u.paddingRight.replace("px",""));z.height=U,z.width=u.paddingRight,z.top=q,z.left=c.left+c.width-K+"px"}},stop:function(t,e,n){var i=(n||{}).state||"",r=this.getOffsetMethod(i);t.Canvas[r]().style.display="none"}}},function(t,e,n){"use strict";t.exports={run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.Modal,r=t.AssetManager,o=r.getConfig(),s=r.getContainer(),a=n.modalTitle||o.modalTitle||"",l=n.types,c=n.accept;if(r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),!this.rendered||l){var u=r.getAll();l&&(u=u.filter(function(t){return-1!==l.indexOf(t.get("type"))})),r.render(u),this.rendered=1}if(c){var h=s.querySelector("input#"+o.stylePrefix+"uploadFile");h&&h.setAttribute("accept",c)}i.setTitle(a),i.setContent(s),i.open()}}},function(t,e,n){"use strict";t.exports={run:function(t,e){var n=t.BlockManager,i=t.Panels;if(!this.blocks){n.render();var r="views-container",o=document.createElement("div"),s=i.getPanel(r)||i.addPanel({id:r});o.appendChild(n.getContainer()),s.set("appendContent",o).trigger("change:appendContent"),this.blocks=o}this.blocks.style.display="block"},stop:function(){var t=this.blocks;t&&(t.style.display="none")}}},function(t,e,n){"use strict";var i=n(0).$;t.exports={run:function(t,e){this.sender=e;var n=t.Config.stylePrefix,r=t.TraitManager;if(!this.$cn){var o=r.getTraitsViewer(),s=r.getConfig();this.$cn=i("
"),this.$cn2=i("
"),this.$cn.append(this.$cn2),this.$header=i("
").append('
'+s.textNoElement+"
"),this.$cn.append(this.$header),this.$cn2.append('
'+s.labelContainer+"
"),this.$cn2.append(o.render().el);var a=t.Panels;(a.getPanel("views-container")?a.getPanel("views-container"):a.addPanel({id:"views-container"})).set("appendContent",this.$cn.get(0)).trigger("change:appendContent"),this.target=t.getModel(),this.listenTo(this.target,"component:toggled",this.toggleTm)}this.toggleTm()},toggleTm:function(){var t=this.sender;t&&t.get&&!t.get("active")||(1===this.target.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));n(77);var r=i.default.$;t.exports={run:function(t,e){if(this.sender=e,!this.$cn){var n=t.getConfig(),i=t.Panels;this.$cn=r("
"),this.$cn2=r("
"),this.$cn.append(this.$cn2);var o=t.DeviceManager;if(o&&n.showDevices)i.addPanel({id:"devices-c"}).set("appendContent",o.render()).trigger("change:appendContent");var s=t.SelectorManager;s&&this.$cn2.append(s.render([])),this.$cn2.append(t.StyleManager.render());var a=t.StyleManager.getConfig(),l=a.stylePrefix;this.$header=r('
'+a.textNoElement+"
"),this.$cn.append(this.$header),i.getPanel("views-container")?this.panel=i.getPanel("views-container"):this.panel=i.addPanel({id:"views-container"}),this.panel.set("appendContent",this.$cn).trigger("change:appendContent"),this.target=t.editor,this.listenTo(this.target,"component:toggled",this.toggleSm)}this.toggleSm()},toggleSm:function(){var t=this.target,e=this.sender;e&&e.get&&!e.get("active")||(1===t.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));n(54),i.default.$;t.exports={run:function(t){var e=t.LayerManager,n=t.Panels;if(!this.layers){var i="views-container",r=document.createElement("div"),o=n.getPanel(i)||n.addPanel({id:i});r.appendChild(e.render()),o.set("appendContent",r).trigger("change:appendContent"),this.layers=r}this.layers.style.display="block"},stop:function(){var t=this.layers;t&&(t.style.display="none")}}},function(t,e,n){"use strict";t.exports={run:function(t){t.Canvas.getBody().className=this.ppfx+"dashed"},stop:function(t){t.Canvas.getBody().className=""}}},function(t,e,n){"use strict";var i=r(n(1));r(n(0));function r(t){return t&&t.__esModule?t:{default:t}}var o=n(7);t.exports=i.default.extend({},o,{beforeDraw:function(t){t.type="text",t.style||(t.style={}),t.style.padding="10px"},afterDraw:function(t){t&&t.set&&(t.trigger("focus"),this.sender&&this.sender.set("active",!1))}})},function(t,e,n){"use strict";var i=s(n(1)),r=s(n(0)),o=n(2);function s(t){return t&&t.__esModule?t:{default:t}}var a=n(8),l=n(13),c=r.default.$;t.exports=i.default.extend({},l,a,{init:function(t){a.init.apply(this,arguments),i.default.bindAll(this,"initSorter","rollback","onEndMove"),this.opt=t,this.hoverClass=this.ppfx+"highlighter-warning",this.badgeClass=this.ppfx+"badge-warning",this.noSelClass=this.ppfx+"no-select"},enable:function(){for(var t=arguments.length,e=Array(t),n=0;n2&&void 0!==arguments[2]&&arguments[2];e&&e.set&&e.set("active",0);var n=t.getConfig(),r=t.Modal,o=n.stylePrefix;if(this.cm=t.CodeManager||null,!this.$editors){var s=this.buildEditor("htmlmixed","hopscotch","HTML"),a=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=s.el,this.cssEditor=a.el;var l=i('
');l.append(s.$el).append(a.$el),this.$editors=l}r.setTitle(n.textViewCode),r.setContent(this.$editors),r.open(),this.htmlEditor.setContent(t.getHtml()),this.cssEditor.setContent(t.getCss())},stop:function(t){var e=t.Modal;e&&e.close()},buildEditor:function(t,e,n){var i=document.createElement("textarea");!this.codeMirror&&(this.codeMirror=this.cm.getViewer("CodeMirror"));var r=this.codeMirror.clone().set({label:n,codeName:t,theme:e,input:i}),o=new this.cm.EditorView({model:r,config:this.cm.getConfig()}).render().$el;return r.init(i),{el:r,$el:o}}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=i.default.$;t.exports=i.default.View.extend({initialize:function(t){this.config=t||{},this.editorModel=this.em=this.config.em||{},this.pfx=this.config.stylePrefix,this.ppfx=this.config.pStylePrefix,this.hoverClass=this.pfx+"hover",this.badgeClass=this.pfx+"badge",this.plhClass=this.pfx+"placeholder",this.freezClass=this.ppfx+"freezed",this.canvas=this.em.get&&this.em.get("Canvas"),this.em.get&&this.setElement(this.getCanvas()),this.canvas&&(this.$canvas=this.$el,this.$wrapper=r(this.getCanvasWrapper()),this.frameEl=this.canvas.getFrameEl(),this.canvasTool=this.getCanvasTools(),this.bodyEl=this.getCanvasBody()),this.init(this.config)},onFrameScroll:function(t){},getCanvas:function(){return this.canvas.getElement()},getCanvasBody:function(){return this.canvas.getBody()},getCanvasWrapper:function(){return this.canvas.getWrapperEl()},getCanvasTools:function(){return this.canvas.getToolsEl()},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+t.ownerDocument.body.scrollTop,left:e.left+t.ownerDocument.body.scrollLeft}},init:function(t){},callRun:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id;if(t.trigger("run:"+n+":before",e),!e||!e.abort){var i=e.sender||t,r=this.run(t,i,e);return t.trigger("run:"+n,r,e),r}t.trigger("abort:"+n,e)},callStop:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id,i=e.sender||t;t.trigger("stop:"+n+":before",e);var r=this.stop(t,i,e);return t.trigger("stop:"+n,r,e),r},run:function(t,e){},stop:function(t,e){}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e\n \n
\n
\n
\n
\n '},inputClass:function(){var t=this.ppfx;return this.opts.contClass||t+"field "+t+"field-integer"},initialize:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];o.prototype.initialize.apply(this,arguments),(0,i.bindAll)(this,"moveIncrement","upIncrement"),this.doc=document,this.listenTo(this.model,"change:unit",this.handleModelChange)},setValue:function(t,e){var n=e||{},i=this.validateInputValue(t,{deepCheck:1}),r={value:i.value};(i.unit||i.force)&&(r.unit=i.unit),this.model.set(r,n),n.silent&&this.handleModelChange()},handleChange:function(t){t.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()},handleUnitChange:function(t){t.stopPropagation();var e=this.getUnitEl().value;this.model.set("unit",e),this.elementUpdated()},elementUpdated:function(){this.model.trigger("el:change")},handleModelChange:function(){var t=this.model;this.getInputEl().value=t.get("value");var e=this.getUnitEl();e&&(e.value=t.get("unit")||"")},getUnitEl:function(){if(!this.unitEl){var t=this.model,e=t.get("units")||[];if(e.length){var n=[];e.forEach(function(e){var i=e==t.get("unit")?"selected":"";n.push("")});var i=document.createElement("div");i.innerHTML='",this.unitEl=i.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=parseInt(t.get("value"),10);n=this.normalizeValue(n+e);var i=this.validateInputValue(n);t.set("value",i.value),this.elementUpdated()},downArrowClick:function(){var t=this.model,e=t.get("step"),n=parseInt(t.get("value"),10),i=this.normalizeValue(n-e),r=this.validateInputValue(i);t.set("value",r.value),this.elementUpdated()},downIncrement:function(t){t.preventDefault(),this.moved=0;var e=this.model.get("value");e=this.normalizeValue(e),this.current={y:t.pageY,val:e},(0,r.on)(this.doc,"mousemove",this.moveIncrement),(0,r.on)(this.doc,"mouseup",this.upIncrement)},moveIncrement:function(t){this.moved=1;var e=this.model,n=e.get("step"),i=this.current,r=this.normalizeValue(i.val+(i.y-t.pageY)*n);return this.prValue=this.validateInputValue(r).value,e.set("value",this.prValue,{avoidStore:1}),!1},upIncrement:function(){var t=this.model,e=t.get("step");if((0,r.off)(this.doc,"mouseup",this.upIncrement),(0,r.off)(this.doc,"mousemove",this.moveIncrement),this.prValue&&this.moved){var n=this.prValue-e;t.set("value",n,{avoidStore:1}).set("value",n+e),this.elementUpdated()}},normalizeValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.model.get("step"),i=0;if(isNaN(t))return e;if(t=parseFloat(t),Math.floor(t)!==t){var r=n.toString().split(".")[1];i=r?r.length:0}return i?parseFloat(t.toFixed(i)):t},validateInputValue:function(t,n){var r=0,o=n||{},s=this.model,a=(0,i.isUndefined)(t)?"":t,l=s.get("units")||[],c=s.get("unit")||l.length&&l[0]||"",u=s.get("max"),h=s.get("min");if(o.deepCheck){var d=s.get("fixedValues")||[];if(a){var f=new RegExp("^"+d.join("|"),"g");if(d.length&&f.test(a))a=a.match(f)[0],c="",r=1;else{var p=a+"";a+="",a=parseFloat(a.replace(",",".")),a=isNaN(a)?"":a;var g=p.replace(a,"");e.indexOf(l,g)>=0&&(c=g)}}}return(0,i.isUndefined)(u)||""===u||(a=a>u?u:a),(0,i.isUndefined)(h)||""===h||(a=a\n \n
\n '},inputValueChanged:function(){if(!this.model.get("detached")){for(var t=arguments.length,e=Array(t),n=0;n'),this.input=this.$input.get(0)),this.props||(this.props=t.get("properties")),!this.$props)){this.props.each(function(e,n){e&&"composite"==e.get("type")&&(this.props.remove(e),console.warn("Nested composite types not yet allowed.")),e.parent=t},this);var i=new(n(16))(this.getPropsConfig());this.$props=i.render().$el,this.properties=i.properties,this.$el.find("#"+this.pfx+"input-holder").append(this.$props)}},getPropsConfig:function(t){var e=this,n=this.model,i={config:this.config,collection:this.props,target:this.target,propTarget:this.propTarget,onChange:function(t,e,i){n.set("value",n.getFullValue(),i)},customValue:function(t,n){return e.valueOnIndex(n,t)}};return n.get("detached")&&delete i.onChange,i},valueOnIndex:function(t,e){var n=void 0,i=this.getTargetValue({ignoreDefault:1});i?n=i.split(" ")[t]:n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n).value),n}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";var i=n(1);t.exports={run:function(t){var e=t.getModel(),n=e.get("clipboard"),r=t.getSelected();n&&r&&!e.isEditing()&&(t.getSelectedAll().forEach(function(e){if(e){var r=e.collection,o=r.indexOf(e)+1,s=n.filter(function(t){return t.get("copyable")}),a=void 0;a=(0,i.contains)(n,e)&&e.get("copyable")?r.add(e.clone(),{at:o}):r.add(s.map(function(t){return t.clone()}),{at:o}),(a=(0,i.isArray)(a)?a:[a]).forEach(function(e){return t.trigger("component:clone",e)})}}),r.emitUpdate())}}},function(t,e,n){"use strict";t.exports={run:function(t){var e=t.getModel(),n=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e=0?r:t)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";t.exports={run:function(t){if(t.Canvas.hasFocus()&&!t.getModel().isEditing()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.collection,i=n.indexOf(t),r=n.at(i+1);e.push(r||t)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";t.exports={run:function(t){if(t.Canvas.hasFocus()&&!t.getModel().isEditing()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.parent();n&&e.push(n)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";t.exports={run:function(t){if(t.Canvas.hasFocus()&&!t.getModel().isEditing()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.components(),i=n&&n.at(0);i&&e.push(i)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";var i=n(1);t.exports={run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.getModel().isEditing()){var r=n.component||t.getSelectedAll();return r=(0,i.isArray)(r)?[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e':"")+'\n
\n
\n
\n \n '+t.getIcon()+'\n '+h+'\n
\n
\n
\n
'+(r||"")+'
\n
\n \n
\n
'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t,this.level=t.level,this.config=t.config,this.em=t.config.em,this.ppfx=this.em.get("Config").stylePrefix,this.sorter=t.sorter||"",this.pfx=this.config.stylePrefix;var e=this.pfx,n=this.ppfx,i=this.model,r=i.get("components");i.set("open",!1),this.listenTo(r,"remove add change reset",this.checkChildren),this.listenTo(i,"change:status",this.updateStatus),this.listenTo(i,"change:open",this.updateOpening),this.listenTo(i,"change:style:display",this.updateVisibility),this.className=e+"layer no-select "+n+"two-color",this.inputNameCls=n+"layer-name",this.clsTitleC=e+"layer-title-c",this.clsTitle=e+"layer-title",this.clsCaret=e+"layer-caret",this.clsCount=e+"layer-count",this.clsMove=e+"layer-move",this.clsChildren=e+"layer-children",this.clsNoChild=e+"layer-no-chld",this.$el.data("model",i),this.$el.data("collection",r),i.viewLayer=this},getVisibilityEl:function(){return this.eyeEl||(this.eyeEl=this.$el.children("."+this.pfx+"layer-vis")),this.eyeEl},updateVisibility:function(){var t=this.pfx+"layer-hidden",e="none"==this.model.getStyle().display?"addClass":"removeClass";this.$el[e](t),this.getVisibilityEl()[e]("fa-eye-slash")},toggleVisibility:function(t){t&&t.stopPropagation();var e=this.model,n=e.getStyle();"none"==n.display?delete n.display:n.display="none",e.setStyle(n)},handleEdit:function(t){t&&t.stopPropagation();var e=this.getInputName();e.contentEditable=!0,e.focus()},handleEditEnd:function(t){t&&t.stopPropagation();var e=this.getInputName(),n=e.textContent;e.contentEditable=!1,this.model.set({name:n})},getInputName:function(){return this.inputName||(this.inputName=this.el.querySelector("."+this.inputNameCls)),this.inputName},updateOpening:function(){var t=this.opt.opened||{},e=this.model;e.get("open")?(this.$el.addClass("open"),this.getCaret().addClass("fa-chevron-down"),t[e.cid]=e):(this.$el.removeClass("open"),this.getCaret().removeClass("fa-chevron-down"),delete t[e.cid])},toggleOpening:function(t){t.stopPropagation(),this.model.get("components").length&&this.model.set("open",!this.model.get("open"))},handleSelect:function(t){t.stopPropagation();var e=this.em,n=this.config;if(e){var i=this.model;e.setSelected(i,{fromLayers:1});var r=n.scrollCanvas;r&&e.get("Canvas").scrollTo(i,r)}},handleHover:function(t){t.stopPropagation();var e=this.em,n=this.config,i=this.model;e&&n.showHover&&e.setHovered(i,{fromLayers:1})},startSort:function(t){t.stopPropagation();var e=this.sorter;0===t.button&&e&&e.startSort(t.target)},freeze:function(){this.$el.addClass(this.pfx+"opac50"),this.model.set("open",0)},unfreeze:function(){this.$el.removeClass(this.pfx+"opac50")},updateStatus:function(t){s.prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover}])},isVisible:function(){var t=this.model.get("style").display;if(!t||"none"!=t)return 1},checkChildren:function(){var t=this.model,e=this.countChildren(t),n=(this.pfx,this.clsNoChild),i=this.$el.children("."+this.clsTitleC).children("."+this.clsTitle);this.cnt||(this.cnt=this.$el.children("."+this.clsCount)),e?(i.removeClass(n),this.cnt.html(e)):(i.addClass(n),this.cnt.empty(),t.set("open",0))},countChildren:function(t){var e=0;return t.get("components").each(function(t){var n=this.opt.isCountable,i=this.config.hideTextnode;n&&!n(t,i)||e++},this),e},getCaret:function(){if(!this.caret||!this.caret.length){this.pfx;this.caret=this.$el.children("."+this.clsTitleC).find("."+this.clsCaret)}return this.caret},setRoot:function(t){t=(0,i.isString)(t)?this.em.getWrapper().find(t)[0]:t;var e=(0,r.getModel)(t,a);e&&(this.stopListening(),this.model=e,this.initialize(this.opt),this.render())},render:function(){var t=this.model,e=this.pfx,r=this.isVisible(),o=this.$el.empty(),s=this.level+1;(0,i.isUndefined)(l)&&(l=n(113));var a=new l({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:s}).render().$el;return this.config.showWrapper||1!==s?(o.html(this.template(t)),o.find("."+this.clsChildren).append(a)):o.append(a),t.get("draggable")&&this.config.sortable||o.children("."+this.clsMove).remove(),!r&&(this.className+=" "+e+"hide"),o.attr("class",this.className),this.updateOpening(),this.updateStatus(),this.updateVisibility(),this}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return(n=i({},r.default,e)).stylePrefix=e.pStylePrefix,t=n.em,this},getConfig:function(){return n},onLoad:function(){e=new o.default({level:0,config:n,opened:n.opened||{},model:t.get("DomComponents").getWrapper()}),t&&t.on("component:selected",this.componentChanged),this.componentChanged()},postRender:function(){var t=n.appendTo,e=n.root;(e&&this.setRoot(e),t)&&((0,s.isElement)(t)?t:document.querySelector(t)).appendChild(this.render())},setRoot:function(t){return e.setRoot(t),this},getRoot:function(){return e.model},getAll:function(){return e},componentChanged:function(e){if(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).fromLayers){var i=t.get("opened"),r=t.getSelected(),o=n.scrollLayers,s=r&&r.collection?r.collection.parent:null;for(var a in i)i[a].set("open",0);for(;s;)s.set("open",1),i[s.cid]=s,s=s.collection?s.collection.parent:null;if(r&&o){var l=r.viewLayer&&r.viewLayer.el;l&&l.scrollIntoView(o)}}},render:function(){return e.render().el}}}},function(t,e,n){"use strict";var i=n(2),r=n(3);t.exports=r.extend({events:{dblclick:"enableEditing",input:"onInput"},initialize:function(t){r.prototype.initialize.apply(this,arguments),this.disableEditing=this.disableEditing.bind(this);var e=this.model,n=this.em;this.listenTo(e,"focus active",this.enableEditing),this.listenTo(e,"change:content",this.updateContent),this.rte=n&&n.get("RichTextEditor")},enableEditing:function(t){t&&t.stopPropagation&&t.stopPropagation();var e=this.rte;if(!this.rteEnabled&&this.model.get("editable")){if(e)try{this.activeRte=e.enable(this,this.activeRte)}catch(t){console.error(t)}this.rteEnabled=1,this.toggleEvents(1)}},disableEditing:function(){var t=this.model,e=t.get("editable"),n=this.rte;if(n&&e){try{n.disable(this,this.activeRte)}catch(t){console.error(t)}var i=this.getChildrenContainer().innerHTML,r=t.get("components");if(r.length&&r.reset(),t.set("content",""),n.customRte)t.set("content",i);else{t.trigger("change:content",t),r.add(i),r.each(function(t){return function t(e){e.set({editable:0,highlightable:0,removable:0,draggable:0,copyable:0,toolbar:""}),e.get("components").each(function(e){return t(e)})}(t)}),r.trigger("resetNavigator")}}this.rteEnabled=0,this.toggleEvents()},onInput:function(t){var e=this.em;e&&e.trigger("change:canvasOffset")},disablePropagation:function(t){t.stopPropagation()},toggleEvents:function(t){var e=t?"on":"off",n={on:i.on,off:i.off};this.em.setEditing(t);var r=[this.el.ownerDocument,document];n.off(r,"mousedown",this.disableEditing),n[e](r,"mousedown",this.disableEditing),this.$el.off("mousedown",this.disablePropagation),this.$el[e]("mousedown",this.disablePropagation)}})},function(t,e,n){"use strict";n(0);var i=n(55);t.exports=i.extend({render:function(){for(var t=arguments.length,e=Array(t),n=0;n1&&void 0!==arguments[1]&&arguments[1];var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.config.em,i=this.collection.indexOf(t);this.addToCollection(t,null,i),n&&!e.temporary&&n.trigger("component:add",t)},addToCollection:function(t,e,i){this.compView||(this.compView=n(3));for(var o=e||null,s=this.compView,a=this.opts.componentTypes,l=t.get("type"),c=0;c1&&void 0!==arguments[1]?arguments[1]:{};this.listenTo(this,"add",this.onAdd),this.config=e.config,this.em=e.em,this.model=function(t,n){var i,r=e.componentTypes;n.em=e.em,n.config=e.config,n.componentTypes=r;for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.em.get("CssComposer"),i=this.em.get("Parser").parseHtml(t);if(t=i.html,i.css&&n){var o=e.avoidUpdateStyle;n.addCollection(i.css,{extend:1,avoidUpdateStyle:o})}}return r.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,e,n){var r=this.em,o=t.getStyle(),s=r&&r.getConfig("avoidInlineStyle");if(!(0,i.isEmpty)(o)&&!s&&r&&r.get&&r.getConfig("forceClass")){var a=t.cid;r.get("CssComposer").setClassRule(a,o);t.setStyle({}),t.addClass(a)}}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.View.extend({itemView:"",itemsView:"",itemType:"type",initialize:function(t,e){this.config=e||{}},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=this.itemView,r=t.get(this.itemType);this.itemsView&&this.itemsView[r]&&(i=this.itemsView[r]);var o=new i({model:t,config:this.config},this.config).render().el;n?n.appendChild(o):this.$el.append(o)},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.length&&this.collection.each(function(e){this.add(e,t)},this),this.$el.append(t),this}})},function(t,e,n){"use strict";t.exports=n(0).View.extend({tagName:"style",initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{};var e=this.model;this.listenTo(e,"change:style change:state change:mediaText",this.render),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e.get("selectors"),"change",this.render)},render:function(){var t=this.model.get("important");return this.el.innerHTML=this.model.toCSS({important:t}),this}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.isString)(e)&&(e=s(e));var a=this.getStyle(),l=i({},e);this.set("style",l,n);var c=(0,o.shallowDiff)(a,l);return(0,r.keys)(c).forEach(function(e){var n=t.em;t.trigger("change:style:"+e),n&&(n.trigger("styleable:change",t,e),n.trigger("styleable:change:"+e,t,e))}),l},addStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"string"==typeof t?t={prop:e}:n=e||{},t=this.extendStyle(t),this.setStyle(t,n)},removeStyle:function(t){var e=this.getStyle();delete e[t],this.setStyle(e)},styleToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.getStyle();for(var i in n){var o=t.important,s=(0,r.isArray)(o)?o.indexOf(i)>=0:o,a=n[i]+(s?" !important":"");a&&e.push(i+":"+a+";")}return e.join("")}}},function(t,e,n){"use strict";var i=n(1),r=a(i),o=a(n(0)),s=a(n(61));function a(t){return t&&t.__esModule?t:{default:t}}var l=n(19);t.exports=o.default.Model.extend(s.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0,atRuleType:"",singleAtRule:0,important:0},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config=t||{};var n=e.em,i=this.config.selectors||[];if(this.em=n,n){var r=n.get("SelectorManager"),o=[];i.forEach(function(t){o.push(r.add(t))}),i=o}this.set("selectors",new l(i))},getAtRule:function(){var t=this.get("atRuleType"),e=this.get("mediaText"),n=t?"@"+t:e?"@media":"";return n+(e&&n?" "+e:"")},selectorsToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.get("state"),i=this.get("selectorsAdd"),r=this.get("selectors").getFullString(),o=n?":"+n:"";return r&&e.push(""+r+o),i&&!t.skipAdd&&e.push(i),e.join(", ")},getDeclaration:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="",n=this.selectorsToString(),i=this.styleToString(t),r=this.get("singleAtRule");return(n||r)&&i&&(e=r?i:n+"{"+i+"}"),e},toCSS:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="",n=this.getAtRule(),i=this.getDeclaration(t);return i&&(e=i),n&&e&&(e=n+"{"+e+"}"),e},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;n3&&void 0!==arguments[3]?arguments[3]:{},o=e||"",s=n||"",a=i.selectorsAdd||"",l=i.atRuleType||"";t instanceof Array||t.models||(t=[t]);var c=r.default.map(t.models||t,function(t){return t.get("name")}),u=r.default.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h\n
<%= title %>
\n multiple/>\n
\n \n '),events:{},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t;var e=t.config||{};this.config=e,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.target=this.options.globalCollection||{},this.uploadId=this.pfx+"uploadFile",this.disabled=void 0!==e.disableUpload?e.disableUpload:!e.upload&&!e.embedAsBase64,this.events["change #"+this.uploadId]="uploadFile";var n=e.uploadFile;n?this.uploadFile=n.bind(this):e.embedAsBase64&&(this.uploadFile=this.constructor.embedAsBase64),this.delegateEvents()},onUploadStart:function(){var t=this.config.em;t&&t.trigger("asset:upload:start")},onUploadEnd:function(t){var e=this.config.em;e&&e.trigger("asset:upload:end",t)},onUploadError:function(t){var e=this.config.em;console.error(t),this.onUploadEnd(t),e&&e.trigger("asset:upload:error",t)},onUploadResponse:function(t,e){var n=this.config.em,i=this.config,r=this.target,o="string"==typeof t?JSON.parse(t):t;n&&n.trigger("asset:upload:response",o),i.autoAdd&&r&&r.add(o.data,{at:0}),this.onUploadEnd(t),e&&e(o)},uploadFile:function(t,e){for(var n=this,i=t.dataTransfer?t.dataTransfer.files:t.target.files,r=new FormData,s=this.config,a=s.params,l=0;l'+i.dropzoneContent+"
"),h(),"draggable"in o&&[o,a].forEach(function(t){t.ondragover=d,t.ondragleave=f,t.ondrop=p})},render:function(){return this.$el.html(this.template({title:this.config.uploadText,uploadId:this.uploadId,disabled:this.disabled,pfx:this.pfx})),this.initDrop(),this.$el.attr("class",this.pfx+"file-uploader"),this}},{embedAsBase64:function(t,e){var n=this,i=t.dataTransfer?t.dataTransfer.files:t.target.files,r={data:[]};if(FileReader){var o=[],s=/^(.+)\/(.+)$/,a=function(t){var e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var o=void 0,a=t.name,l=s.exec(t.type);if("image"===(o=l?l[1]:t.type)){var c={src:i.result,name:a,type:o,height:0,width:0},u=new Image;u.addEventListener("error",function(t){n(t)}),u.addEventListener("load",function(){c.height=u.height,c.width=u.width,e(c)}),u.src=c.src}else e(o?{src:i.result,name:a,type:o}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});o.push(e)},l=!0,c=!1,u=void 0;try{for(var h,d=i[Symbol.iterator]();!(l=(h=d.next()).done);l=!0){a(h.value)}}catch(t){c=!0,u=t}finally{try{!l&&d.return&&d.return()}finally{if(c)throw u}}Promise.all(o).then(function(t){r.data=t,n.onUploadResponse(r,e)},function(t){n.onUploadError(t)})}else this.onUploadError(new Error("Unsupported platform, FileReader is not defined"))}})},function(t,e,n){"use strict";(function(e){var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t,this.collection=t.collection;var e=t.config||{};this.config=e,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.em=e.em,this.className=this.pfx+"asset",this.listenTo(this.model,"destroy remove",this.remove),this.model.view=this;var n=this.init&&this.init.bind(this);n&&n(t)},template:function(){var t=this.pfx;return'\n
\n '+this.getPreview()+'\n
\n
\n '+this.getInfo()+'\n
\n
\n ⨯\n
\n '},updateTarget:function(t){t&&t.set&&(t.set("attributes",e.clone(t.get("attributes"))),t.set("src",this.model.get("src")))},getPreview:function(){return""},getInfo:function(){return""},render:function(){var t=this.el;return t.innerHTML=this.template(this,this.model),t.className=this.className,this}})}).call(this,n(1))},function(t,e,n){"use strict";var i=n(1);t.exports=n(64).extend({events:{"click [data-toggle=asset-remove]":"onRemove",click:"onClick",dblclick:"onDblClick"},getPreview:function(){var t=this.pfx;return'\n
\n
\n '},getInfo:function(){var t=this.pfx,e=this.model,n=e.get("name"),i=e.get("width"),r=e.get("height"),o=e.get("unitDim"),s=i&&r?i+"x"+r+o:"";return'\n
'+(n=n||e.getFilename())+'
\n
'+s+"
\n "},init:function(t){var e=this.pfx;this.className+=" "+e+"asset-image"},onClick:function(){var t=this.config.onClick,e=this.model;this.collection.trigger("deselectAll"),this.$el.addClass(this.pfx+"highlight"),(0,i.isFunction)(t)?t(e):this.updateTarget(this.collection.target)},onDblClick:function(){var t=this.em,e=this.model,n=this.config.onDblClick;(0,i.isFunction)(n)?n(e):(this.updateTarget(this.collection.target),t&&t.get("Modal").close());var r=this.collection.onSelect;(0,i.isFunction)(r)&&r(e)},onRemove:function(t){t.stopImmediatePropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0,unit:void 0},t),this},parseValue:function(t){var e=o.prototype.parseValue.apply(this,arguments),n=this.input.validateInputValue(e.value,{deepCheck:1}),i=n.value,r=n.unit;return e.value=i,e.unit=r,e},getFullValue:function(){var t=this.get("value"),e=this.get("unit");return t=""+(t=(0,r.isUndefined)(t)?"":t)+(e=!(0,r.isUndefined)(e)&&t?e:""),o.prototype.getFullValue.apply(this,[t])}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:[];return this.set("options",t),this},addOption:function(t){if(t){var e=this.getOptions();this.setOptions([].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n '},init:function(){var t=this.em;this.modal=t.get("Modal"),this.am=t.get("AssetManager"),this.events["click #"+this.pfx+"close"]="removeFile",this.events["click #"+this.pfx+"images"]="openAssetManager",this.delegateEvents()},onRender:function(){if(!this.$input){var t=this.model.getDefaultValue();this.$input=o('')}this.$preview||(this.$preview=this.$el.find("#"+this.pfx+"preview-file")),this.$previewBox||(this.$previewBox=this.$el.find("#"+this.pfx+"preview-box")),this.setValue(this.componentValue,0)},setValue:function(t,e){r.prototype.setValue.apply(this,arguments),this.setPreviewView(t&&t!=this.model.getDefaultValue()),this.setPreview(t)},setPreviewView:function(t){var e=this.$previewBox;e&&e[t?"addClass":"removeClass"](this.pfx+"show")},spreadUrl:function(t){this.model.set("value",t),this.setPreviewView(1)},setPreview:function(t){var e=this.$preview;t=t&&t.indexOf("url(")<0?"url("+t+")":t,e&&e.css("background-image",t)},cleanValue:function(){this.setPreviewView(0),this.model.set({value:""},{silent:!0})},removeFile:function(){this.model.set("value",this.model.getDefaultValue());for(var t=arguments.length,e=Array(t),n=0;n\n
\n
\n
\n
\n
\n '},inputClass:function(){var t=this.ppfx;return t+"field "+t+"field-color"},holderClass:function(){return this.ppfx+"input-holder"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model.get("defaults"),i=(0,o.isUndefined)(t)?(0,o.isUndefined)(n)?"":n:t,r=this.getInputEl(),s=this.getColorEl(),a="none"!=i?i:"";r.value=i,s.get(0).style.backgroundColor=a,e.fromTarget&&(s.spectrum("set",a),this.noneColor="none"==i)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.ppfx,n=this.model,r=c('
'),o=r.get(0).style,s=this.em&&this.em.config?this.em.config.el:"",a=this.em&&this.em.getConfig&&this.em.getConfig("colorPicker")||{},l=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},u=0,h=void 0;this.$el.find("[data-colorp-c]").append(r),r.spectrum(i({containerClassName:e+"one-bg "+e+"two-color",appendTo:s||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[]},a,{move:function(t){var e=l(t);o.backgroundColor=e,n.setValueFromInput(e,0)},change:function(e){u=1;var i=l(e);o.backgroundColor=i,n.setValueFromInput(i),t.noneColor=0},show:function(t){u=0,h=l(t)},hide:function(e){!u&&h&&(t.noneColor&&(h=""),o.backgroundColor=h,r.spectrum("set",h),n.setValueFromInput(h,0))}})),this.colorEl=r}return this.colorEl},render:function(){return l.prototype.render.call(this),this.getColorEl(),this}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};e=i({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new r({target:this.target,model:this.model,ppfx:t}).render();this.el.querySelector("."+t+"fields").appendChild(e.el),this.$input=e.inputEl,this.$color=e.colorEl,this.input=this.$input.get(0),this.inputInst=e}}})},function(t,e,n){"use strict";var i=o(n(0)),r=o(n(5));function o(t){return t&&t.__esModule?t:{default:t}}i.default.$;t.exports=r.default.extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},initialize:function(){for(var t=arguments.length,e=Array(t),n=0;n"+e+""});var i=this.el.querySelector("#"+t+"input-holder");i.innerHTML="",this.input=i.firstChild}}})},function(t,e,n){"use strict";t.exports=n(5).extend({templateInput:function(){this.pfx;var t=this.ppfx;return'\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.ppfx,n=e+"radio-item-label",i=this.model,r=i.get("property"),o=i.get("list")||i.get("options")||[];if(!this.input&&o&&o.length){var s="";o.forEach(function(i){var o=i.className?i.className+" "+t+"icon "+n:"",a=r+"-"+i.value,l=i.name||i.value,c=i.title?'title="'+i.title+'"':"";s+='\n
\n \n \n
\n "});var a=this.el.querySelector("."+e+"field");a.innerHTML='
'+s+"
",this.input=a.firstChild}},getInputValue:function(){var t=this.getCheckedEl();return t?t.value:""},getCheckedEl:function(){var t=this.getInputEl();return t?t.querySelector("input:checked"):""},setValue:function(t){var e=this.model,n=t||e.get("value")||e.getDefaultValue(),i=this.getInputEl(),r=i?i.querySelector('[value="'+n+'"]'):"";if(r)r.checked=!0;else{var o=this.getCheckedEl();o&&(o.checked=!1)}}})},function(t,e,n){"use strict";var i=n(0),r=i.$;t.exports=i.View.extend({events:{change:"handleChange"},template:function(){return''},inputClass:function(){return this.ppfx+"field"},holderClass:function(){return this.ppfx+"input-holder"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.opts=t,this.ppfx=e,this.em=t.target||{},this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},setValue:function(t){var e=this.model,n=t||e.get("defaults"),i=this.getInputEl();i&&(i.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},handleChange:function(t){t.stopPropagation();var e=this.getInputEl().value;this.model.set({value:e},{fromInput:1}),this.elementUpdated()},getInputEl:function(){if(!this.inputEl){var t=this.model.get("defaults")||"";this.inputEl=r('')}return this.inputEl.get(0)},render:function(){var t=this.$el;return t.addClass(this.inputClass()),t.html(this.template()),t.find("."+this.holderClass()).append(this.getInputEl()),this}})},function(t,e,n){"use strict";var i=n(43),r=n(168);t.exports=i.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\n \n
\n
\n '},init:function(){var t=this.model;this.pfx;t.set("stackIndex",null),this.events["click [data-add-layer]"]="addLayer",this.listenTo(t,"change:stackIndex",this.indexChanged),this.listenTo(t,"updateValue",this.inputValueChanged),this.delegateEvents()},clear:function(t){t&&t.stopPropagation(),this.model.get("layers").reset(),this.model.clearValue(),this.targetUpdated()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]&&arguments[0];return this.get("properties").each(function(t){return t.clearValue()}),r.prototype.clearValue.apply(this,arguments)},updateValues:function(){var t=this.getFullValue().split(this.get("separator"));this.get("properties").each(function(e,n){var i=t.length;t[n]||t[n%i+(1!=i&&i%2?1:0)]})},getDefaultValue:function(t){var e=this.get("defaults");return e&&!t?e:(e="",this.get("properties").each(function(t,n){return e+=t.getDefaultValue()+" "}),e.trim())},getFullValue:function(){return this.get("detached")?"":this.get("properties").getFullValue()}})},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var n=t.Model,i=t.View;e.default={types:[],initialize:function(t,e){var n=this;this.model=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=void 0,r=void 0,o=void 0;if(t&&t.type){var s=n.getBaseType();i=(o=n.getType(t.type))?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);i=(o=a.type).model,r=o.view,t=a.attributes}var l=new i(t,e);return l.typeView=r,l};var i=this.init&&this.init.bind(this);i&&i()},recognizeType:function(t){for(var e=this.getTypes(),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.model,r=void 0===n?{}:n,s=e.view,a=void 0===s?{}:s,l=this.getType(t);if(l)return new l.view(i({model:new l.model(r),config:o},a))},render:function(){return e.render().el}}}},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0;r--)n.context=n.context.prev;return M(t,e,n)}function O(t){var e=t.current().toLowerCase();o=m.hasOwnProperty(e)?"atom":v.hasOwnProperty(e)?"keyword":"variable"}var P={top:function(t,e,n){if("{"==t)return T(n,e,"block");if("}"==t&&n.context.prev)return E(n);if(x&&/@component/i.test(t))return T(n,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return T(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return T(n,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return T(n,e,"at");if("hash"==t)o="builtin";else if("word"==t)o="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return T(n,e,"interpolation");if(":"==t)return"pseudo";if(y&&"("==t)return T(n,e,"parens")}return n.context.type},block:function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return d.hasOwnProperty(i)?(o="property","maybeprop"):f.hasOwnProperty(i)?(o="string-2","maybeprop"):y?(o=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==t?"block":y||"hash"!=t&&"qualifier"!=t?P.top(t,e,n):(o="error","block")},maybeprop:function(t,e,n){return":"==t?T(n,e,"prop"):M(t,e,n)},prop:function(t,e,n){if(";"==t)return E(n);if("{"==t&&y)return T(n,e,"propBlock");if("}"==t||"{"==t)return A(t,e,n);if("("==t)return T(n,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)O(e);else if("interpolation"==t)return T(n,e,"interpolation")}else o+=" error";return"prop"},propBlock:function(t,e,n){return"}"==t?E(n):"word"==t?(o="property","maybeprop"):n.context.type},parens:function(t,e,n){return"{"==t||"}"==t?A(t,e,n):")"==t?E(n):"("==t?T(n,e,"parens"):"interpolation"==t?T(n,e,"interpolation"):("word"==t&&O(e),"parens")},pseudo:function(t,e,n){return"meta"==t?"pseudo":"word"==t?(o="variable-3",n.context.type):M(t,e,n)},documentTypes:function(t,e,n){return"word"==t&&l.hasOwnProperty(e.current())?(o="tag",n.context.type):P.atBlock(t,e,n)},atBlock:function(t,e,n){if("("==t)return T(n,e,"atBlock_parens");if("}"==t||";"==t)return A(t,e,n);if("{"==t)return E(n)&&T(n,e,y?"block":"top");if("interpolation"==t)return T(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();o="only"==i||"not"==i||"and"==i||"or"==i?"keyword":c.hasOwnProperty(i)?"attribute":u.hasOwnProperty(i)?"property":h.hasOwnProperty(i)?"keyword":d.hasOwnProperty(i)?"property":f.hasOwnProperty(i)?"string-2":m.hasOwnProperty(i)?"atom":v.hasOwnProperty(i)?"keyword":"error"}return n.context.type},atComponentBlock:function(t,e,n){return"}"==t?A(t,e,n):"{"==t?E(n)&&T(n,e,y?"block":"top",!1):("word"==t&&(o="error"),n.context.type)},atBlock_parens:function(t,e,n){return")"==t?E(n):"{"==t||"}"==t?A(t,e,n,2):P.atBlock(t,e,n)},restricted_atBlock_before:function(t,e,n){return"{"==t?T(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(o="variable","restricted_atBlock_before"):M(t,e,n)},restricted_atBlock:function(t,e,n){return"}"==t?(n.stateArg=null,E(n)):"word"==t?(o="@font-face"==n.stateArg&&!p.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!g.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(t,e,n){return"word"==t?(o="variable","keyframes"):"{"==t?T(n,e,"top"):M(t,e,n)},at:function(t,e,n){return";"==t?E(n):"{"==t||"}"==t?A(t,e,n):("word"==t?o="tag":"hash"==t&&(o="builtin"),"at")},interpolation:function(t,e,n){return"}"==t?E(n):"{"==t||";"==t?A(t,e,n):("word"==t?o="variable":"variable"!=t&&"("!=t&&")"!=t&&(o="error"),"interpolation")}};return{startState:function(t){return{tokenize:null,state:i?"block":"top",stateArg:null,context:new S(i?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||function(t,e){var n=t.next();if(a[n]){var i=a[n](t,e);if(!1!==i)return i}return"@"==n?(t.eatWhile(/[\w\\\-]/),w("def",t.current())):"="==n||("~"==n||"|"==n)&&t.eat("=")?w(null,"compare"):'"'==n||"'"==n?(e.tokenize=C(n),e.tokenize(t,e)):"#"==n?(t.eatWhile(/[\w\\\-]/),w("atom","hash")):"!"==n?(t.match(/^\s*\w*/),w("keyword","important")):/\d/.test(n)||"."==n&&t.eat(/\d/)?(t.eatWhile(/[\w.%]/),w("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?w(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?w(null,n):("u"==n||"U"==n)&&t.match(/rl(-prefix)?\(/i)||("d"==n||"D"==n)&&t.match("omain(",!0,!0)||("r"==n||"R"==n)&&t.match("egexp(",!0,!0)?(t.backUp(1),e.tokenize=k,w("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),w("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):t.match(/^\w+-/)?w("meta","meta"):void 0})(t,e);return n&&"object"==typeof n&&(r=n[1],n=n[0]),o=n,"comment"!=r&&(e.state=P[e.state](r,t,e)),o},indent:function(t,e){var n=t.context,i=e&&e.charAt(0),r=n.indent;return"prop"!=n.type||"}"!=i&&")"!=i||(n=n.prev),n.prev&&("}"!=i||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=i||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=i||"at"!=n.type&&"atBlock"!=n.type)||(r=Math.max(0,n.indent-s)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}});var n=["domain","regexp","url","url-prefix"],i=e(n),r=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=e(r),s=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],a=e(s),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],c=e(l),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],h=e(u),d=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=e(d),p=e(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],m=e(v),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=e(y),x=n.concat(r).concat(s).concat(l).concat(u).concat(d).concat(v).concat(y);function w(t,e){for(var n,i=!1;null!=(n=t.next());){if(i&&"/"==n){e.tokenize=null;break}i="*"==n}return["comment","comment"]}t.registerHelper("hintWords","css",x),t.defineMIME("text/css",{documentTypes:i,mediaTypes:o,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:b,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=w,w(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:f,colorKeywords:m,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=w,w(t,e)):["operator","operator"]},":":function(t){return!!t.match(/\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:f,colorKeywords:m,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=w,w(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:i,mediaTypes:o,mediaFeatures:a,propertyKeywords:h,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=w,w(t,e))}},name:"css",helperType:"gss"})}(n(6))},function(t,e,n){"use strict";t.exports=function(t){var e=t;return{compTypes:"",parseStyle:function(t){for(var e={},n=t.split(";"),i=0,r=n.length;i=0&&e<=k};function E(t){return function(e,n,i,r){n=y(n,r,4);var o=!T(e)&&m.keys(e),s=(o||e).length,a=t>0?0:s-1;return arguments.length<3&&(i=e[o?o[a]:a],a+=t),function(e,n,i,r,o,s){for(;o>=0&&o=0},m.invoke=function(t,e){var n=c.call(arguments,2),i=m.isFunction(e);return m.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},m.pluck=function(t,e){return m.map(t,m.property(e))},m.where=function(t,e){return m.filter(t,m.matcher(e))},m.findWhere=function(t,e){return m.find(t,m.matcher(e))},m.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t)for(var a=0,l=(t=T(t)?t:m.values(t)).length;ao&&(o=i);else e=b(e,n),m.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},m.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t)for(var a=0,l=(t=T(t)?t:m.values(t)).length;ai||void 0===n)return 1;if(n0?0:r-1;o>=0&&o0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return i[o=n(i,r)]===r?o:-1;if(r!=r)return(o=e(c.call(i,s,a),m.isNaN))>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&oe?(s&&(clearTimeout(s),s=null),a=c,o=t.apply(i,r),s||(i=r=null)):s||!1===n.trailing||(s=setTimeout(l,u)),o}},m.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=m.now()-s;c=0?i=setTimeout(l,e-c):(i=null,n||(a=t.apply(o,r),i||(o=r=null)))};return function(){o=this,r=arguments,s=m.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},m.wrap=function(t,e){return m.partial(e,t)},m.negate=function(t){return function(){return!t.apply(this,arguments)}},m.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,i=t[e].apply(this,arguments);n--;)i=t[n].call(this,i);return i}},m.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},m.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},m.once=m.partial(m.before,2);var L=!{toString:null}.propertyIsEnumerable("toString"),N=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function D(t,e){var n=N.length,i=t.constructor,r=m.isFunction(i)&&i.prototype||s,o="constructor";for(m.has(t,o)&&!m.contains(e,o)&&e.push(o);n--;)(o=N[n])in t&&t[o]!==r[o]&&!m.contains(e,o)&&e.push(o)}m.keys=function(t){if(!m.isObject(t))return[];if(f)return f(t);var e=[];for(var n in t)m.has(t,n)&&e.push(n);return L&&D(t,e),e},m.allKeys=function(t){if(!m.isObject(t))return[];var e=[];for(var n in t)e.push(n);return L&&D(t,e),e},m.values=function(t){for(var e=m.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},R=m.invert(F),j=function(t){var e=function(e){return t[e]},n="(?:"+m.keys(t).join("|")+")",i=RegExp(n),r=RegExp(n,"g");return function(t){return t=null==t?"":""+t,i.test(t)?t.replace(r,e):t}};m.escape=j(F),m.unescape=j(R),m.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),m.isFunction(i)?i.call(t):i};var z=0;m.uniqueId=function(t){var e=++z+"";return t?t+e:e},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,H={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},$=/\\|'|\r|\n|\u2028|\u2029/g,B=function(t){return"\\"+H[t]};m.template=function(t,e,n){!e&&n&&(e=n),e=m.defaults({},e,m.templateSettings);var i=RegExp([(e.escape||V).source,(e.interpolate||V).source,(e.evaluate||V).source].join("|")+"|$","g"),r=0,o="__p+='";t.replace(i,function(e,n,i,s,a){return o+=t.slice(r,a).replace($,B),r=a+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?o+="'+\n((__t=("+i+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var a=function(t){return s.call(this,t,m)},l=e.variable||"obj";return a.source="function("+l+"){\n"+o+"}",a},m.chain=function(t){var e=m(t);return e._chain=!0,e};var W=function(t,e){return t._chain?m(e).chain():e};m.mixin=function(t){m.each(m.functions(t),function(e){var n=m[e]=t[e];m.prototype[e]=function(){var t=[this._wrapped];return l.apply(t,arguments),W(this,n.apply(m,t))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=o[t];m.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],W(this,n)}}),m.each(["concat","join","slice"],function(t){var e=o[t];m.prototype[t]=function(){return W(this,e.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},void 0===(i=function(){return m}.apply(e,[]))||(t.exports=i)}).call(this)},function(t,e,n){!function(e){var n,i={},r={16:!1,18:!1,17:!1,91:!1},o="all",s={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,command:91},a={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220},l=function(t){return a[t]||t.toUpperCase().charCodeAt(0)},c=[];for(n=1;n<20;n++)a["f"+n]=111+n;function u(t,e){for(var n=t.length;n--;)if(t[n]===e)return n;return-1}function h(t,e){if(t.length!=e.length)return!1;for(var n=0;n1&&(o=m(t),t=[t[t.length-1]]),t=t[0],(t=l(t))in i||(i[t]=[]),i[t].push({shortcut:r[s],scope:e,method:n,key:r[s],mods:o})}for(n in s)p[n]=!1;function g(){return o||"all"}function v(t){var e;return""==(e=(t=t.replace(/\s/g,"")).split(","))[e.length-1]&&(e[e.length-2]+=","),e}function m(t){for(var e=t.slice(0,t.length-1),n=0;n0,r)(!r[o]&&u(n.mods,+o)>-1||r[o]&&-1==u(n.mods,+o))&&(l=!1);(0!=n.mods.length||r[16]||r[18]||r[17]||r[91])&&!l||!1===n.method(t,n)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}(t)}),y(document,"keyup",function(t){var e,n=t.keyCode,i=u(c,n);if(i>=0&&c.splice(i,1),93!=n&&224!=n||(n=91),n in r)for(e in r[n]=!1,s)s[e]==n&&(p[e]=!1)}),y(window,"focus",function(){for(n in r)r[n]=!1;for(n in s)p[n]=!1});var b=e.key;e.key=p,e.key.setScope=function(t){o=t||"all"},e.key.getScope=g,e.key.deleteScope=function(t){var e,n,r;for(e in i)for(n=i[e],r=0;r1&&(c=m(r),t=r[r.length-1]),t=l(t),void 0===e&&(e=g()),!i[t])return;for(o=0;o\n \n <%= label %>\n \n
\n '),events:{},initialize:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config=t;var e=this.config.pStylePrefix||"";this.pfx=e,this.caretR="fa fa-caret-right",this.caretD="fa fa-caret-down",this.iconClass=e+"caret-icon",this.activeClass=e+"open",this.className=e+"block-category",this.events["click ."+e+"title"]="toggle",this.listenTo(this.model,"change:open",this.updateVisibility),this.delegateEvents()},updateVisibility:function(){this.model.get("open")?this.open():this.close()},open:function(){this.el.className=this.className+" "+this.activeClass,this.getIconEl().className=this.iconClass+" "+this.caretD,this.getBlocksEl().style.display=""},close:function(){this.el.className=this.className,this.getIconEl().className=this.iconClass+" "+this.caretR,this.getBlocksEl().style.display="none"},toggle:function(){var t=this.model;t.set("open",!t.get("open"))},getIconEl:function(){return this.iconEl||(this.iconEl=this.el.querySelector("."+this.iconClass)),this.iconEl},getBlocksEl:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector("."+this.pfx+"blocks-c")),this.blocksEl},append:function(t){this.getBlocksEl().appendChild(t)},render:function(){return this.el.innerHTML=this.template({pfx:this.pfx,label:this.model.get("label")}),this.el.className=this.className,this.$el.css({order:this.model.get("order")}),this.updateVisibility(),this}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),r=n(1),o=n(2);t.exports=i.default.View.extend({events:{mousedown:"startDrag",dragstart:"handleDragStart",drag:"handleDrag",dragend:"handleDragEnd"},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.em=e.em,this.config=e,this.endDrag=this.endDrag.bind(this),this.ppfx=e.pStylePrefix||"",this.listenTo(this.model,"destroy remove",this.remove)},startDrag:function(t){var e=this.config;if(0===t.button&&e.getSorter&&!this.el.draggable){e.em.refreshCanvas();var n=e.getSorter();n.setDragHelper(this.el,t),n.setDropContent(this.model.get("content")),n.startSort(this.el),(0,o.on)(document,"mouseup",this.endDrag)}},handleDragStart:function(t){var e=this.em,n=this.model,i=n.get("content"),o=(0,r.isObject)(i),s=o?JSON.stringify(i):i;t.dataTransfer.setData("text",s),e.set("dragContent",i),e.trigger("block:drag:start",n,t)},handleDrag:function(t){this.em.trigger("block:drag",this.model,t)},handleDragEnd:function(){var t=this.em,e=this.model,n=t.get("dragResult");if(n){var i=n.get&&n.get("activeOnRender");(e.get("activate")||i)&&(n.trigger("active"),n.set("activeOnRender",0)),e.get("select")&&t.setSelected(n),e.get("resetId")&&n.onAll(function(t){return t.resetId()})}t.set({dragResult:null,dragContent:null}),t.trigger("block:drag:stop",n,e)},endDrag:function(t){(0,o.off)(document,"mouseup",this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.el,e=this.ppfx,n=e+"block",i=this.model.get("label");return t.className+=" "+n+" "+e+"one-bg "+e+"four-color-h",t.innerHTML='
'+i+"
",t.title=t.textContent.trim(),(0,o.hasDnd)(this.em)&&t.setAttribute("draggable",!0),this}})},function(t,e,n){"use strict";var i=n(1),r=n(92),o=n(91);t.exports=n(0).View.extend({initialize:function(t,e){(0,i.bindAll)(this,"getSorter","onDrag","onDrop"),this.config=e||{},this.categories=t.categories||"",this.renderedCategories=[];var n=this.config.pStylePrefix||"";this.ppfx=n,this.noCatClass=n+"blocks-no-cat",this.blockContClass=n+"blocks-c",this.catsClass=n+"block-categories";var r=this.collection;this.listenTo(r,"add",this.addTo),this.listenTo(r,"reset",this.render),this.em=this.config.em,this.tac="test-tac",this.grabbingCls=this.ppfx+"grabbing",this.em&&(this.config.getSorter=this.getSorter,this.canvas=this.em.get("Canvas"))},getSorter:function(){if(this.em){if(!this.sorter){var t=this.em.get("Utils"),e=this.canvas;this.sorter=new t.Sorter({container:e.getBody(),placer:e.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onStart:this.onDrag,onEndMove:this.onDrop,onMove:this.onMove,document:e.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1,em:this.em,canvasRelative:1})}return this.sorter}},onDrag:function(t){this.em.stopDefault(),this.em.trigger("block:drag:start",t)},onMove:function(t){this.em.trigger("block:drag:move",t)},onDrop:function(t){var e=this.em;e.runDefault(),t&&t.get&&(t.get("activeOnRender")&&(t.trigger("active"),t.set("activeOnRender",0)),e.trigger("block:drag:stop",t))},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,s=new r({model:t,attributes:t.get("attributes")},this.config).render().el,a=t.get("category");if(a&&this.categories){(0,i.isString)(a)?a={id:a,label:a}:(0,i.isObject)(a)&&!a.id&&(a.id=a.label);var l=this.categories.add(a),c=l.get("id"),u=this.renderedCategories[c],h=this.getCategoriesEl();return t.set("category",l),!u&&h&&(u=new o({model:l},this.config).render(),this.renderedCategories[c]=u,h.appendChild(u.el)),void(u&&u.append(s))}n?n.appendChild(s):this.append(s)},getCategoriesEl:function(){return this.catsEl||(this.catsEl=this.el.querySelector("."+this.catsClass)),this.catsEl},getBlocksEl:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector("."+this.noCatClass+" ."+this.blockContClass)),this.blocksEl},append:function(t){var e=this.getBlocksEl();e&&e.appendChild(t)},render:function(){var t=this,e=this.ppfx,n=document.createDocumentFragment();this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n ',this.collection.each(function(e){return t.add(e,n)}),this.append(n);var i=this.blockContClass+"s "+e+"one-bg "+e+"two-color";return this.$el.addClass(i),this}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Collection.extend({model:n(44)})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(44);t.exports=i.default.Model.extend({defaults:{activate:0,select:0,resetId:0,label:"",content:"",category:"",attributes:{}},initialize:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t=this.get("category");if(t&&"string"==typeof t)new r({id:t,label:t})}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(95);t.exports=i.default.Collection.extend({model:r})},function(t,e,n){"use strict";t.exports={appendTo:"",blocks:[]}},function(t,e,n){"use strict";var i=n(1);t.exports=function(){var t,e,r,o={},s=n(97),a=n(96),l=n(94),c=n(93),u=[];return{name:"BlockManager",init:function(n){var i=(o=n||{}).em;for(var h in s)h in o||(o[h]=s[h]);return t=new a([]),e=new a([]),u=new l,r=new c({collection:e,categories:u},o),t.listenTo(t,"add",function(t){e.add(t),i&&i.trigger("block:add",t)}),t.listenTo(t,"remove",function(t){e.remove(t),i&&i.trigger("block:remove",t)}),t.listenTo(t,"reset",function(t){e.reset(t.models)}),this},getConfig:function(){return o},onLoad:function(){var t=this.getAll();!t.length&&t.reset(o.blocks)},postRender:function(){var t=this.getConfig().appendTo;t&&((0,i.isElement)(t)?t:document.querySelector(t)).appendChild(this.render())},add:function(e,n){var i=n||{};return i.id=e,t.add(i)},get:function(e){return t.get(e)},getAll:function(){return t},getAllVisible:function(){return e},remove:function(e){return t.remove(e)},getCategories:function(){return u},getContainer:function(){return r.el},render:function(t){var e=t||this.getAll().models;return r.rendered||(r.render(),r.rendered=1),r.collection.reset(e),this.getContainer()}}}},function(t,e,n){var i={"./CanvasClear":52,"./CanvasClear.js":52,"./CommandAbstract":38,"./CommandAbstract.js":38,"./ComponentDelete":51,"./ComponentDelete.js":51,"./ComponentEnter":50,"./ComponentEnter.js":50,"./ComponentExit":49,"./ComponentExit.js":49,"./ComponentNext":48,"./ComponentNext.js":48,"./ComponentPrev":47,"./ComponentPrev.js":47,"./CopyComponent":46,"./CopyComponent.js":46,"./CreateComponent":7,"./CreateComponent.js":7,"./DeleteComponent":36,"./DeleteComponent.js":36,"./Drag":21,"./Drag.js":21,"./ExportTemplate":37,"./ExportTemplate.js":37,"./Fullscreen":24,"./Fullscreen.js":24,"./ImageComponent":35,"./ImageComponent.js":35,"./InsertCustom":12,"./InsertCustom.js":12,"./MoveComponent":34,"./MoveComponent.js":34,"./OpenAssets":27,"./OpenAssets.js":27,"./OpenBlocks":28,"./OpenBlocks.js":28,"./OpenLayers":31,"./OpenLayers.js":31,"./OpenStyleManager":30,"./OpenStyleManager.js":30,"./OpenTraitManager":29,"./OpenTraitManager.js":29,"./PasteComponent":45,"./PasteComponent.js":45,"./Preview":23,"./Preview.js":23,"./Resize":22,"./Resize.js":22,"./SelectComponent":8,"./SelectComponent.js":8,"./SelectParent":25,"./SelectParent.js":25,"./SelectPosition":13,"./SelectPosition.js":13,"./ShowOffset":26,"./ShowOffset.js":26,"./SwitchVisibility":32,"./SwitchVisibility.js":32,"./TextComponent":33,"./TextComponent.js":33};function r(t){var e=o(t);return n(e)}function o(t){var e=i[t];if(!(e+1)){var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}return e}r.keys=function(){return Object.keys(i)},r.resolve=o,t.exports=r,r.id=99},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{command:"",attributes:{}}})},function(t,e,n){"use strict";var i=n(0),r=n(100);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.View.extend({events:function(){return this.model.get("events")||{mousedown:"handleClick"}},attributes:function(){return this.model.get("attributes")},initialize:function(t){this.editor=t.config.editor},handleClick:function(t){t.preventDefault(),t.stopPropagation(),this.execCommand(t)},execCommand:function(t){var e={event:t},n=this.model.get("command"),i=this.editor;"function"==typeof n&&n(i,null,e),"string"==typeof n&&i.runCommand(n,e)},render:function(){var t=this.editor,e=this.$el,n=this.model,i=n.get("id"),r=n.get("label"),o=t.getConfig("stylePrefix");return e.addClass(o+"toolbar-item"),i&&e.addClass(o+"toolbar-item__"+i),r&&e.append(r),this}})},function(t,e,n){"use strict";n(0);var i=n(59),r=n(102);t.exports=i.extend({itemView:r,initialize:function(t){this.config={editor:t.editor||""},this.listenTo(this.collection,"reset",this.render)}})},function(t,e,n){"use strict";t.exports={ESCAPE_KEY:27,stylePrefix:"com-",defaults:[],em:null,firstCentered:!0,newFixedH:!1,minComponentH:50,minComponentW:50}},function(t,e,n){"use strict";var i=n(1);t.exports=function(){var t=void 0,e={},r={},o={},s=n(104),a=n(38);return{CommandAbstract:a,name:"Commands",init:function(i){for(var r in e=i||{},s)r in e||(e[r]=s[r]);t=e.em;var a=e.pStylePrefix;for(var l in a&&(e.stylePrefix=a+e.stylePrefix),e.defaults){var c=e.defaults[l];c.id&&this.add(c.id,c)}var u=n(37);return o["select-comp"]=n(8),o["create-comp"]=n(7),o["delete-comp"]=n(36),o["image-comp"]=n(35),o["move-comp"]=n(34),o["text-comp"]=n(33),o["insert-custom"]=n(12),o["export-template"]=u,o["sw-visibility"]=n(32),o["open-layers"]=n(31),o["open-sm"]=n(30),o["open-tm"]=n(29),o["open-blocks"]=n(28),o["open-assets"]=n(27),o["show-offset"]=n(26),o["select-parent"]=n(25),o.fullscreen=n(24),o.preview=n(23),o.resize=n(22),o.drag=n(21),o["tlb-delete"]={run:function(t){return t.runCommand("core:component-delete")}},o["tlb-clone"]={run:function(t){t.runCommand("core:copy"),t.runCommand("core:paste")}},o["tlb-move"]={run:function(t,e,n){var i=void 0,r=t.getModel(),o=n&&n.event,s=t.getSelected(),a=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e1&&void 0!==arguments[1]?arguments[1]:{},i=void 0,r=this.get(e),o=t.get("Editor");return r&&(i=r.callRun(o,n)),i},stop:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=void 0,r=this.get(e),o=t.get("Editor");return r&&(i=r.callStop(o,n)),i},loadDefaultCommands:function(){for(var t in o)this.add(t,o[t]);return this},create:function(t){return new(a.extend(t))(e)}}}},function(t,e,n){"use strict";var i=n(1),r="transitionend oTransitionEnd transitionend webkitTransitionEnd";t.exports=n(0).View.extend({tagName:"iframe",attributes:{allowfullscreen:"allowfullscreen"},initialize:function(t){(0,i.bindAll)(this,"udpateOffset"),this.config=t.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.listenTo(this.em,"change:device",this.updateDim)},updateDim:function(t){var e=this.em,n=e.getDeviceModel(),i=this.el.style,o=i.width||"",s=i.height||"",a=n?n.get("width"):"",l=n?n.get("height"):"",c=o==a&&s==l;i.width=a,i.height=l,this.udpateOffset(),e.stopDefault({preserveSelected:1}),c?this.udpateOffset():this.$el.on(r,this.udpateOffset)},udpateOffset:function(){var t=this.em,e=t.get("Canvas").getOffset();t.set("canvasOffset",e),t.runDefault({preserveSelected:1}),this.$el.off(r,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}})},function(t,e,n){"use strict";(function(e){var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),r=n(2);var o=n(106),s=i.default.$;t.exports=i.default.View.extend({initialize:function(t){e.bindAll(this,"renderBody","onFrameScroll","clearOff"),(0,r.on)(window,"scroll resize",this.clearOff),this.config=t.config||{},this.em=this.config.em||{},this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"canvas",this.listenTo(this.em,"change:canvasOffset",this.clearOff),this.frame=new o({model:this.model.get("frame"),config:this.config})},isElInViewport:function(t){var e=(0,r.getElement)(t).getBoundingClientRect(),n=this.getFrameOffset(1),i=e.top,o=e.left;return i>=0&&o>=0&&i<=n.height&&o<=n.width},onFrameScroll:function(){var t=this.frame.el.contentDocument.body;this.toolsEl.style.top="-"+t.scrollTop+"px",this.toolsEl.style.left="-"+t.scrollLeft+"px",this.em.trigger("canvasScroll")},renderScripts:function(){var t=this.frame,e=this;t.el.onload=function(){!function n(i){if(i.length>0){var r=document.createElement("script");r.type="text/javascript",r.src=i.shift(),r.onerror=r.onload=n.bind(null,i),t.el.contentDocument.head.appendChild(r)}else e.renderBody()}(e.config.scripts.slice(0))}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=s(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),o=e.get("Config"),a=this.config,l=o.protectedCss,c="";a.styles.forEach(function(t){c+=''});var u="\n "+(e.config.baseCss||"")+"\n\n ."+n+"dashed *[data-highlightable] {\n outline: 1px dashed rgba(170,170,170,0.7);\n outline-offset: -2px;\n }\n\n ."+n+"comp-selected {\n outline: 3px solid #3b97e3 !important;\n outline-offset: -3px;\n }\n\n ."+n+"comp-selected-parent {\n outline: 2px solid #ffca6f !important\n }\n\n ."+n+"no-select {\n user-select: none;\n -webkit-user-select:none;\n -moz-user-select: none;\n }\n\n ."+n+"freezed {\n opacity: 0.5;\n pointer-events: none;\n }\n\n ."+n+"no-pointer {\n pointer-events: none;\n }\n\n ."+n+"plh-image {\n background: #f5f5f5;\n border: none;\n height: 50px;\n width: 50px;\n display: block;\n outline: 3px solid #ffca6f;\n cursor: pointer;\n outline-offset: -2px\n }\n\n ."+n+"grabbing {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n "+(o.canvasCss||"")+"\n "+(l||"")+"\n ";c&&i.append(c),i.append(""),i.append(t.render()).append(r.render()),i.append(this.getJsContainer()),e.trigger("loaded"),this.frame.el.contentWindow.onscroll=this.onFrameScroll,this.frame.udpateOffset();var h=document,d=this.frame.el.contentDocument;[{event:"keydown keyup",class:"KeyboardEvent"}].forEach(function(t){return t.event.split(" ").forEach(function(e){d.addEventListener(e,function(e){return h.dispatchEvent(function(t,e){var n=void 0;try{n=new window[e](t.type,t)}catch(t){(n=document.createEvent(e)).initEvent(t.type,!0,!0)}return n.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(n,t,{get:function(){return this.keyCodeVal}})}),n}(e,t.class))})})})}},offset:function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument.body;return{top:e.top+n.scrollTop,left:e.left+n.scrollLeft,width:e.width,height:e.height}},clearOff:function(){this.frmOff=null,this.cvsOff=null},getFrameOffset:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.frmOff&&!t||(this.frmOff=this.offset(this.frame.el)),this.frmOff},getCanvasOffset:function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},getElementPos:function(t,e){var n=e||{},i=this.getFrameOffset(),r=this.getCanvasOffset(),o=this.offset(t),s=n.avoidFrameOffset?0:i.top,a=n.avoidFrameOffset?0:i.left;return{top:o.top+s-r.top,left:o.left+a-r.left,height:t.offsetHeight||t.clientHeight,width:t.offsetWidth||t.clientWidth}},getPosition:function(){var t=this.frame.el.contentDocument;if(t){var e=t.body,n=this.getFrameOffset(),i=this.getCanvasOffset();return{top:n.top+e.scrollTop-i.top,left:n.left+e.scrollLeft-i.left}}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=s("
"),this.getJsContainer().appendChild(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html("");var i=document.createElement("script");i.innerHTML="\n setTimeout(function() {\n var item = document.getElementById('"+n+"');\n if (!item) return;\n (function(){\n "+e.getScriptString()+";\n }.bind(item))()\n }, 1);",setTimeout(function(){return t.scriptContainer.get(0).appendChild(i)},0)},getJsContainer:function(){return this.jsContainer||(this.jsContainer=s('
').get(0)),this.jsContainer},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 t=this.frame;0===this.config.scripts.length?t.el.onload=this.renderBody:this.renderScripts()}var e=this.ppfx;this.$el.append('\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n ');var n=this.el,i=n.querySelector("#"+e+"tools");return this.hlEl=n.querySelector("."+e+"highlighter"),this.badgeEl=n.querySelector("."+e+"badge"),this.placerEl=n.querySelector("."+e+"placeholder"),this.ghostEl=n.querySelector("."+e+"ghost"),this.toolbarEl=n.querySelector("."+e+"toolbar"),this.resizerEl=n.querySelector("."+e+"resizer"),this.offsetEl=n.querySelector("."+e+"offset-v"),this.fixedOffsetEl=n.querySelector("."+e+"offset-fixed-v"),this.toolsEl=i,this.el.className=this.className,this}})}).call(this,n(1))},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(108);t.exports=i.default.Model.extend({defaults:{frame:"",wrapper:"",rulers:!1},initialize:function(t){var e=this.conf||{};this.set("frame",new r(e.frame))}})},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n";this.sorter.setDropContent(o),this.sorter.startSort(),e.trigger("canvas:dragenter",n,o)}}},{key:"handleDragOver",value:function(t){t.preventDefault(),this.em.trigger("canvas:dragover",t)}},{key:"handleDrop",value:function(t){t.preventDefault();var e=t.dataTransfer,n=this.getContentByData(e).content;t.target.style.border="",n?this.sorter.setDropContent(n):this.sorter.moved=0,this.endDrop(0,t)}},{key:"getContentByData",value:function(t){var e=this.em,n=t.types,i=t.files,r=e.get("dragContent"),s=t.getData("text");if(i.length){s=[];for(var a=0;a=0)s=t.getData("text/html").replace(/<\/?meta[^>]*>/g,"");else if((0,o.indexOf)(n,"text/uri-list")>=0)s={type:"link",attributes:{href:s},content:s};else if((0,o.indexOf)(n,"text/json")>=0){var u=t.getData("text/json");u&&(s=JSON.parse(u))}var h={content:s};return e.trigger("canvas:dragdata",t,h),h}}]),t}();e.default=s},function(t,e,n){"use strict";var i=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(n(111));t.exports=function(){var t,e,o={},s=n(110),a=n(109),l=n(107);return{getCanvasView:function(){return l},name:"Canvas",init:function(e){for(var n in o=e||{},s)n in o||(o[n]=s[n]);var i=o.pStylePrefix;i&&(o.stylePrefix=i+o.stylePrefix),t=new a(e),l=new l({model:t,config:o});var r=o.em.get("DomComponents");return r&&this.setWrapper(r),this.startAutoscroll=this.startAutoscroll.bind(this),this.stopAutoscroll=this.stopAutoscroll.bind(this),this.autoscroll=this.autoscroll.bind(this),this},getConfig:function(){return o},setWrapper:function(e){t.set("wrapper",e)},getElement:function(){return l.el},getFrameEl:function(){return l.frame.el},getDocument:function(){return this.getFrameEl().contentDocument},getWindow:function(){return this.getFrameEl().contentWindow},getBody:function(){return l.frame.el.contentDocument.body},getWrapperEl:function(){return this.getBody().querySelector("#wrapper")},getToolsEl:function(){return l.toolsEl},getHighlighter:function(){return l.hlEl},getBadgeEl:function(){return l.badgeEl},getPlacerEl:function(){return l.placerEl},getGhostEl:function(){return l.ghostEl},getToolbarEl:function(){return l.toolbarEl},getResizerEl:function(){return l.resizerEl},getOffsetViewerEl:function(){return l.offsetEl},getFixedOffsetViewerEl:function(){return l.fixedOffsetEl},render:function(){return l.render().el},getOffset:function(){var t=this.offset(this.getFrameEl()),e=this.offset(this.getElement());return{top:t.top-e.top,left:t.left-e.left}},offset:function(t){return l.offset(t)},setCustomBadgeLabel:function(t){o.customBadgeLabel=t},getElementPos:function(t,e){return l.getElementPos(t,e)},getTargetToElementDim:function(t,e,n){var i=n||{},r=l.getPosition();if(r){var s=i.elPos||l.getElementPos(e),a=n.toRight||0,c=i.targetHeight||t.offsetHeight,u=i.targetWidth||t.offsetWidth,h=i.event||null,d=s.top-c,f=s.left;f+=a?s.width:0;var p=(f=a?f-u:f)s.top+s.height?s.top+s.height:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:r.top,canvasLeft:r.left};return h&&o.em&&o.em.trigger(h,v),v}},getMouseRelativePos:function(t,e){var n=0,i=0,r=(e||{}).subWinOffset,o=t.target.ownerDocument,s=o.defaultView||o.parentWindow,a=s.frameElement,l=r?s.pageYOffset:0,c=r?s.pageXOffset:0;if(a){var u=a.getBoundingClientRect();n=u.top||0,i=u.left||0}return{y:t.clientY+n-l,x:t.clientX+i-c}},getMouseRelativeCanvas:function(t,e){var n=this.getFrameEl(),i=this.getBody(),r=n.offsetTop||0,o=n.offsetLeft||0,s=i.scrollTop||0,a=i.scrollLeft||0;return{y:t.clientY+r+s,x:t.clientX+o+a}},hasFocus:function(){return this.getDocument().hasFocus()},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},scrollTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,i.getElement)(t);this.getCanvasView().isElInViewport(n)&&!e.force||n.scrollIntoView(e)},startAutoscroll:function(){var t=this;this.dragging=1;var n=this.getScrollListeners();e=l.getFrameOffset(1),setTimeout(function(){(0,i.on)(n,"mousemove",t.autoscroll),(0,i.on)(n,"mouseup",t.stopAutoscroll)},0)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=t.clientY,o=e.height-50;r<50&&(i-=50-r),r>o&&(i+=r-o),n.scrollTo(0,i)}},stopAutoscroll:function(){this.dragging=0;var t=this.getScrollListeners();(0,i.off)(t,"mousemove",this.autoscroll),(0,i.off)(t,"mouseup",this.stopAutoscroll)},getScrollListeners:function(){return[this.getFrameEl().contentWindow,this.getElement()]},postRender:function(){(0,i.hasDnd)(o.em)&&(this.droppable=new r.default(o.em))},getFrameWrapperEl:function(){return l.frame.getWrapper()}}}},function(t,e,n){"use strict";var i=n(53);t.exports=n(0).View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent;var n=this.pfx,i=this.ppfx,r=this.parent,o=this.collection;this.listenTo(o,"add",this.addTo),this.listenTo(o,"reset resetNavigator",this.render),this.listenTo(o,"remove",this.removeChildren),this.className=n+"layers";var s=e.em;if(e.sortable&&!this.opt.sorter){var a=s.get("Utils");this.opt.sorter=new a.Sorter({container:e.sortContainer||this.el,containerSel:"."+this.className,itemSel:"."+n+"layer",ignoreViewChildren:1,onEndMove:function(t,e){var n=e.getSourceModel();s.setSelected(n,{forceChange:1})},avoidSelectOnEnd:1,nested:1,ppfx:i,pfx:n})}this.sorter=this.opt.sorter||"",this.$el.data("collection",o),r&&this.$el.data("model",r)},removeChildren:function(t){var e=t.viewLayer;e&&e.remove.apply(e)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var r=this.level,o=e||null,s=i;if(this.isCountable(t,this.config.hideTextnode)){var a=new s({level:r,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}).render().el;if(o)o.appendChild(a);else if(void 0!==n){var l="before";this.$el.children().length==n&&(n--,l="after"),n<0?this.$el.append(a):this.$el.children().eq(n)[l](a)}else this.$el.append(a);return a}},isCountable:function(t,e){var n=t.get("type"),i=t.get("tagName");return!(("textnode"==n||"br"==i)&&e||!t.get("layerable"))},render:function(){var t=this,e=document.createDocumentFragment(),n=this.el;return n.innerHTML="",this.collection.each(function(n){return t.addToCollection(n,e)}),n.appendChild(e),n.className=this.className,this}})},function(t,e,n){"use strict";t.exports={stylePrefix:"",appendTo:"",sortable:1,hidable:1,hideTextnode:1,root:"",showWrapper:1,showHover:1,scrollCanvas:{behavior:"smooth"},scrollLayers:1,highlightHover:1}},function(t,e,n){"use strict";t.exports=n(0).View.extend({})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return{build:function(e){var n=[];"string"==typeof e&&(e=[e]);for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{},n=this.target,o=this.get("name");if(!(0,r.isUndefined)(t))if(this.get("changeProp"))n.set(o,t,e);else{var s=i({},n.get("attributes"));s[o]=t,n.set("attributes",s,e)}},setValueFromInput:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={value:t};this.set(r,i({},n,{avoidStore:1})),e&&(this.set("value","",n),this.set(r,n))},getInitValue:function(){var t=this.target,e=this.get("name"),n=void 0;if(t){var i=t.get("attributes");n=this.get("changeProp")?t.get(e):i[e]}return n||this.get("value")||this.get("default")}})},function(t,e,n){"use strict";var i=n(1),r=n(0),o=n(140),s=n(139);t.exports=r.Collection.extend({model:o,initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.em=e.em||"",this.listenTo(this,"add",this.handleAdd)},handleAdd:function(t){var e=this.target;e&&(t.target=e)},setTarget:function(t){this.target=t},add:function(t,e){var n=this.em;if((0,i.isString)(t)||(0,i.isArray)(t)){var o=n&&n.get&&n.get("TraitManager"),a=o&&o.getConfig(),l=s(a);(0,i.isString)(t)&&(t=[t]);for(var c=0,u=t.length;c2&&void 0!==arguments[2]?arguments[2]:{},r=t.components(),o=s.get("UndoManager"),a=s.handleUpdates.bind(s),l=this.handleChanges.bind(this),c=this.handleRemoves.bind(this);o&&o.add(t),o&&r&&o.add(r);[[t,"change:style change:content change:attributes change:src",a],[r,"add",l],[r,"remove",c],[t.get("classes"),"add remove",a]].forEach(function(t){s.stopListening(t[0],t[1],t[2]),s.listenTo(t[0],t[1],t[2])}),!i.avoidStore&&a("","",i),r.each(function(t){return n.handleChanges(t,e,i)})},handleRemoves:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!n.avoidStore&&s.handleUpdates(t,e,n)},load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&o.stm&&(t=o.em.getCacheLoad()),t.components)try{e=JSON.parse(t.components)}catch(t){}else t.html&&(e=t.html);var n=e&&e.constructor===Object;return(e&&e.length||n)&&(this.clear(),this.getComponents().reset(),n?this.getWrapper().set(e).initComponents().initClasses().loadTraits():this.getComponents().add(e)),e},store:function(t){if(o.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=o.em.getHtml()),n.indexOf("components")>=0){var i=o.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(i)}return t||o.stm.store(e),e}},getComponent:function(){return t},getWrapper:function(){return this.getComponent()},getComponents:function(){return this.getWrapper().get("components")},addComponent:function(t){return this.getComponents().add(t)},render:function(){return e.render().el},clear:function(){return this.getComponents().reset(),this},setComponents:function(t){this.clear().addComponent(t)},addType:function(t,e){var n=this.getType(t);n?(n.model=e.model,n.view=e.view):(e.id=t,d.unshift(e))},getType:function(t){for(var e=d,n=0;n1&&void 0!==arguments[1]?arguments[1]:{};t&&(t.set({status:"selected"}),["component:selected","component:toggled"].forEach(function(i){return e.em.trigger(i,t,n)}))},selectRemove:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){this.em;t.set({status:"",state:""}),["component:deselected","component:toggled"].forEach(function(i){return e.em.trigger(i,t,n)})}},componentHovered:function(){var t=o.em,e=t.get("componentHovered"),n=t.previous("componentHovered");n&&"hovered"==n.get("status")&&n.set({status:"",state:""}),e&&(0,r.isEmpty)(e.get("status"))&&e.set("status","hovered")}}}},function(t,e,n){"use strict";var i=n(9),r=n(69);t.exports=i.extend({getInputEl:function(){if(!this.$input){var t=this.model,e=this.getModelValue(),n=new r({model:t,target:this.config.em,contClass:this.ppfx+"field-color",ppfx:this.ppfx}).render();this.$input=n.colorEl,n.setValue(e,{fromTarget:1}),this.input=n}return this.$input.get(0)},renderField:function(){this.$input||(this.getInputEl(),this.$el.append(this.input.el))}})},function(t,e,n){"use strict";var i=n(9),r=n(42);t.exports=i.extend({getValueForTarget:function(){var t=this.model,e=t.get("value"),n=t.get("unit");return e?e+n:""},getInputEl:function(){if(!this.$input){var t=this.getModelValue(),e=new r({contClass:this.ppfx+"field-int",model:this.model,ppfx:this.ppfx});this.input=e.render(),this.$input=this.input.inputEl,this.$unit=this.input.unitEl,this.model.set("value",t),this.$input.val(t)}return this.$input.get(0)},renderField:function(){this.$input||(this.$el.append(this.tmpl),this.getInputEl(),this.$el.find("."+this.inputhClass).prepend(this.input.el))}})},function(t,e,n){"use strict";var i=n(9);t.exports=i.extend({initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx+"chk-icon";this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().checked)},getInputEl:function(){var t;this.$input||(t=1);for(var e=arguments.length,n=Array(e),r=0;r
'},getInputEl:function(){if(!this.$input){var t=this.model,n=t.get("options")||[],i="",this.input=i,this.$input=r(this.input);var o=this.target,s=t.get("name"),a=t.get("value");if(t.get("changeProp"))a=a||o.get(s);else a=o.get("attributes")[s];a&&this.$input.val(a)}return this.$input.get(0)}})}).call(this,n(1))},function(t,e,n){"use strict";var i=n(59),r=n(9),o=n(147),s=n(146),a=n(145),l=n(144);t.exports=i.extend({itemView:r,itemsView:{text:r,number:a,select:o,checkbox:s,color:l},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.config||{};this.config=e,this.em=t.editor,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.className=this.pfx+"traits";this.listenTo(this.em,"component:toggled",this.updatedCollection),this.updatedCollection()},updatedCollection:function(){var t=this.ppfx,e=this.em.getSelected();this.el.className=this.className+" "+t+"one-bg "+t+"two-color",e&&(this.collection=e.get("traits"),this.render())}})},function(t,e,n){"use strict";t.exports={stylePrefix:"trt-",appendTo:"",labelContainer:"Component settings",labelPlhText:"eg. Text here",labelPlhHref:"eg. https://google.com",optionsTarget:[{value:"",name:"This window"},{value:"_blank",name:"New window"}],textNoElement:"Select an element before using Trait Manager"}},function(t,e,n){"use strict";var i=n(1),r=n(149),o=n(148);t.exports=function(){var t={},e=void 0;return{TraitsView:o,name:"TraitManager",getConfig:function(){return t},init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=n,(0,i.defaults)(t,r);var s=t.pStylePrefix;return s&&(t.stylePrefix=""+s+t.stylePrefix),e=new o({collection:[],editor:t.em,config:t}),this},postRender:function(){var t=this.getConfig().appendTo;t&&((0,i.isElement)(t)?t:document.querySelector(t)).appendChild(this.render())},getTraitsViewer:function(){return e},addType:function(t,n){var i=e.itemView;e.itemsView[t]=i.extend(n)},getType:function(t){return e.itemsView[t]},render:function(){return e.render().el}}}},function(t,e,n){"use strict";t.exports=n(60).extend({_createElement:function(t){return document.createTextNode("")},render:function(){var t=this.model,e=t.get("important");return this.el.textContent=t.getDeclaration({important:e}),this}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(60),o=n(151),s=i.default.$,a=function(t,e){return t+(e?"-"+e.replace("%","pc"):"")};t.exports=i.default.View.extend({initialize:function(t){var e=t.config||{};this.atRules={},this.config=e,this.em=e.em,this.pfx=e.stylePrefix||"",this.className=this.pfx+"rules";var n=this.collection;this.listenTo(n,"add",this.addTo),this.listenTo(n,"reset",this.render)},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){if(this.renderStarted){var n=e||null,i=void 0,s=void 0,l={model:t,config:this.config};if("keyframes"===t.get("atRuleType")){var c=t.getAtRule(),u=this.atRules[c];if(!u){var h=document.createElement("style");u=document.createTextNode(""),h.appendChild(document.createTextNode(c+"{")),h.appendChild(u),h.appendChild(document.createTextNode("}")),this.atRules[c]=u,i=h}s=new o(l),u.appendData(s.render().el.textContent)}else i=(s=new r(l)).render().el;var d=this.className,f=t.get("mediaText"),p=a(d),g=p;if(f&&(g=a(d,this.getMediaWidth(f))),i){var v=n||this.el,m=void 0;try{m=v.querySelector("#"+g)}catch(t){}m||(m=v.querySelector("#"+p)),m.appendChild(i)}return i}},getMediaWidth:function(t){return t&&t.replace("("+this.em.getConfig("mediaCondition")+": ","").replace(")","")},render:function(){var t=this;this.renderStarted=1,this.atRules={};var e=this.$el,n=document.createDocumentFragment(),i=this.className;return e.empty(),this.em.get("DeviceManager").getAll().map(function(t){return t.get("widthMedia")}).sort(function(t,e){return(e&&e.replace("px","")||Number.MAX_VALUE)-(t&&t.replace("px","")||Number.MAX_VALUE)}).forEach(function(t){s('
').appendTo(n)}),this.collection.each(function(e){return t.addToCollection(e,n)}),e.append(n),e.attr("class",i),this}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(62);t.exports=i.default.Collection.extend({initialize:function(t,e){e&&e.em&&(this.editor=e.em),this.model=function(t,n){return!n.em&&e&&e.em&&(n.em=e.em),new r(t,n)}},add:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=this.editor.get("Parser").parseCss(t)),e.em=this.editor,i.default.Collection.prototype.add.apply(this,[t,e])}})},function(t,e,n){"use strict";t.exports={stylePrefix:"css-",staticRules:"",rules:[]}},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n="change:style",i=o.get("UndoManager");i&&i.add(t);var r=o.handleUpdates.bind(o);o.stopListening(t,n,r),o.listenTo(t,n,r),!e.avoidStore&&r("","",e)},load:function(e){var n=e||"";!n&&s.stm&&(n=s.em.getCacheLoad());var i=n.styles||"";if(n.styles)try{i=JSON.parse(n.styles)}catch(t){}else n.css&&(i=s.em.get("Parser").parseCss(n.css));return(0,r.isArray)(i)?i.length&&t.reset(i):i&&t.reset(i),i},store:function(e){if(s.stm){var n={},i=this.storageKey();return i.indexOf("css")>=0&&(n.css=s.em.getCss()),i.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||s.stm.store(n),n}},add:function(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=n||"",c=r||"",u=i({},o),h=this.get(e,a,c,u);return h&&h.config&&!h.config.atRuleType?h:(u.state=a,u.mediaText=c,u.selectors="",(h=new l(u,s)).get("selectors").add(e),t.add(h),h)},get:function(e,n,i,r){var o=null;return t.each(function(t){o||t.compare(e,n,i,r)&&(o=t)}),o},getAll:function(){return t},clear:function(){return this.getAll().reset(),this},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,a=r.length;o1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.state||"",r=n.mediaText||o.getCurrentMedia(),s=o.get("SelectorManager").add({name:t,type:d.TYPE_ID}),a=this.add(s,i,r);return a.setStyle(e,n),a},getIdRule:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.state||"",i=e.mediaText||o.getCurrentMedia(),r=o.get("SelectorManager").get(t,d.TYPE_ID);return r&&this.get(r,n,i)},setClassRule:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.state||"",r=n.mediaText||o.getCurrentMedia(),s=o.get("SelectorManager").add({name:t,type:d.TYPE_CLASS}),a=this.add(s,i,r);return a.setStyle(e,n),a},getClassRule:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.state||"",i=e.mediaText||o.getCurrentMedia(),r=o.get("SelectorManager").get(t,d.TYPE_CLASS);return r&&this.get(r,n,i)},render:function(){return e.render().el}}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));n(64),n(65),n(63);t.exports=i.default.View.extend({events:{submit:"handleSubmit"},template:function(t){var e=t.pfx,n=t.ppfx;return'\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n '},initialize:function(t){this.options=t,this.config=t.config,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"";var e=this.collection;this.listenTo(e,"reset",this.renderAssets),this.listenTo(e,"add",this.addToAsset),this.listenTo(e,"remove",this.removedAsset),this.listenTo(e,"deselectAll",this.deselectAll)},handleSubmit:function(t){t.preventDefault();var e=this.getAddInput(),n=e.value.trim(),i=this.config.handleAdd;n&&(e.value="",this.getAssetsEl().scrollTop=0,i?i.bind(this)(n):this.options.globalCollection.add(n,{at:0}))},getAssetsEl:function(){return this.el.querySelector("."+this.pfx+"assets")},getAddInput:function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector("."+this.pfx+"add-asset input")),this.inputUrl},removedAsset:function(t){this.collection.length||this.toggleNoAssets()},addToAsset:function(t){1==this.collection.length&&this.toggleNoAssets(1),this.addAsset(t)},addAsset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.collection,i=this.config,r=new t.typeView({model:t,collection:n,config:i}).render().el;if(e)e.appendChild(r);else{var o=this.getAssetsEl();o&&o.insertBefore(r,o.firstChild)}return r},toggleNoAssets:function(t){var e=this.$el.find("."+this.pfx+"assets");if(t)e.empty();else{var n=this.config.noAssets;n&&e.append(n)}},deselectAll:function(){var t=this.pfx;this.$el.find("."+t+"highlight").removeClass(t+"highlight")},renderAssets:function(){var t=this,e=document.createDocumentFragment(),n=this.$el.find("."+this.pfx+"assets");n.empty(),this.toggleNoAssets(this.collection.length),this.collection.each(function(n){return t.addAsset(n,e)}),n.append(e)},render:function(){var t=this.options.fu.render().el;return this.$el.empty(),this.$el.append(t).append(this.template(this)),this.el.className=this.ppfx+"asset-manager",this.renderAssets(),this.rendered=1,this}})},function(t,e,n){"use strict";t.exports=n(0).Model.extend({idAttribute:"src",defaults:{type:"",src:""},getFilename:function(){return this.get("src").split("/").pop()},getExtension:function(){return this.getFilename().split(".").pop()}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};return void 0===e.at&&(e.at=0),s.add(t,e)},get:function(t){return s.where({src:t})[0]},getAll:function(){return s},getAllVisible:function(){return a.collection},remove:function(t){var e=this.get(t);return this.getAll().remove(e),this},store:function(e){var n={},i=JSON.stringify(this.getAll().toJSON());return n[this.storageKey]=i,!e&&t.stm&&t.stm.store(n),n},load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.storageKey,n=t[e]||[];if("string"==typeof n)try{n=JSON.parse(t[e])}catch(t){}return n&&n.length&&this.getAll().reset(n),n},getContainer:function(){return a.el},getAssetsEl:function(){return a.el.querySelector("[data-el=assets]")},render:function(t){var e=t||this.getAll().models;return a.rendered||a.render(),a.collection.reset(e),this.getContainer()},addType:function(t,e){this.getAll().addType(t,e)},getType:function(t){return this.getAll().getType(t)},getTypes:function(){return this.getAll().getTypes()},AssetsView:function(){return a},FileUploader:function(){return l},onLoad:function(){this.getAll().reset(t.assets)},postRender:function(e){t.dropzone&&l.initDropzone(e)},setTarget:function(t){a.collection.target=t},onSelect:function(t){a.collection.onSelect=t},onClick:function(e){t.onClick=e},onDblClick:function(e){t.onDblClick=e}}}},function(t,e,n){"use strict";var i=o(n(1)),r=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var s=n(16);t.exports=r.default.View.extend({template:i.default.template('\n
\n \n <%= label %>\n
'),events:{"click [data-sector-title]":"toggle"},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.caretR="fa-caret-right",this.caretD="fa-caret-down";var e=this.model;this.listenTo(e,"change:open",this.updateOpen),this.listenTo(e,"updateVisibility",this.updateVisibility),this.listenTo(e,"destroy remove",this.remove)},updateVisibility:function(){var t;this.model.get("properties").each(function(e){e.get("visible")&&(t=1)}),this.el.style.display=t?"block":"none"},updateOpen:function(){this.model.get("open")?this.show():this.hide()},show:function(){this.$el.addClass(this.pfx+"open"),this.getPropertiesEl().style.display="",this.$caret.removeClass(this.caretR).addClass(this.caretD)},hide:function(){this.$el.removeClass(this.pfx+"open"),this.getPropertiesEl().style.display="none",this.$caret.removeClass(this.caretD).addClass(this.caretR)},getPropertiesEl:function(){return this.$el.find("."+this.pfx+"properties").get(0)},toggle:function(t){var e=this.model.get("open")?0:1;this.model.set("open",e)},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 t=this.model.get("properties");if(t){var e=new s({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=t.config||{};this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.target=t.target||{},this.config=e;var n={};(0,o.extend)(n,r.default.Events);var s=document.body,a=document.createElement("el-"+(new Date).getTime());s.appendChild(a),n.computedDefault=i({},window.getComputedStyle(a)),s.removeChild(a),this.propTarget=n;var l=this.collection;this.listenTo(l,"add",this.addTo),this.listenTo(l,"reset",this.render),this.listenTo(this.target,"component:toggled component:update:classes component:update:state change:device",this.targetUpdated)},addTo:function(t){this.addToCollection(t)},targetUpdated:function(){var t=this.target,e=this.propTarget,n=t.getSelected();if(n){var i=t.get("Config").devicePreviewMode?"":n.get("state"),r=n.getEl();if(e.helper=null,r){var o=i?":"+i:null;e.computed=window.getComputedStyle(r,o)}n=t.get("StyleManager").getModelToStyle(n),i&&function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.get("CssComposer"),r=i.getAll(),o=i.getClassRule("hc-state");o?(r.remove(o),r.add(o)):o=i.setClassRule("hc-state"),o.set("important",1),o.setStyle(n),e.helper=o}(n.getStyle()),e.model=n,e.trigger("update")}},addToCollection:function(t,e){var n=e||null,i=new s({model:t,id:this.pfx+t.get("name").replace(" ","_").toLowerCase(),name:t.get("name"),properties:t.get("properties"),target:this.target,propTarget:this.propTarget,config:this.config}).render().el;return n?n.appendChild(i):this.$el.append(i),i},render:function(){var t=this,e=document.createDocumentFragment(),n=this.$el,i=this.pfx,r=this.ppfx;return n.empty(),this.collection.each(function(n){return t.addToCollection(n,e)}),n.append(e),n.addClass(i+"sectors "+r+"one-bg "+r+"two-color"),this}})},function(t,e,n){"use strict";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0,i=t.length;n\n \n
\n '},getSliderEl:function(){return this.slider||(this.slider=this.el.querySelector("input[type=range]")),this.slider},inputValueChanged:function(){var t=this.model,e=t.get("step");this.getInputEl().value=this.getSliderEl().value;var n=this.getInputValue()-e;t.set("value",n,{avoidStore:1}).set("value",n+e),this.elementUpdated()},inputValueChangedSoft:function(){this.getInputEl().value=this.getSliderEl().value,this.model.set("value",this.getInputValue(),{avoidStore:1}),this.elementUpdated()},setValue:function(t){this.getSliderEl().value=t,this.inputInst.setValue(t,{silent:1})},onRender:function(){r.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e\n \n \n
'+("Layer "+t.get("index"))+'
\n
\n \t
\n
\n
\n ⨯\n
\n
\n
\n '},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model;this.stackModel=t.stackModel||{},this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.sorter=t.sorter||null,this.propsConfig=t.propsConfig||{},this.customPreview=t.onPreview,this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:active",this.updateVisibility),this.listenTo(e.get("properties"),"change",this.updatePreview),e.get("preview")||this.$el.addClass(this.pfx+"no-preview"),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data("model",e)},initSorter:function(t){this.sorter&&this.sorter.startSort(this.el)},remove:function(t){t&&t.stopPropagation&&t.stopPropagation();var e=this.model,n=e.collection,r=this.stackModel;i.default.View.prototype.remove.apply(this,arguments),n.contains(e)&&n.remove(e),r&&r.set&&(r.set({stackIndex:null},{silent:!0}),r.trigger("updateValue"))},onPreview:function(t){var e=t.split(" "),n=[];return this.model.get("properties").each(function(t,i){var r=e[i]||"";if(r&&"integer"==t.get("type")){var o=parseInt(r,10),s=r.replace(o,"");r=(o=(o=(o=isNaN(o)?0:o)>3?3:o)<-3?-3:o)+s}n.push(r)}),n.join(" ")},updatePreview:function(){var t=this.stackModel,e=this.customPreview,n=this.getPreviewEl(),i=this.model.getFullValue(),r=e?e(i):this.onPreview(i);r&&t&&n&&(n.style[t.get("property")]=r)},getPropertiesWrapper:function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector("[data-properties]")),this.propsWrapEl},getPreviewEl:function(){return this.previewEl||(this.previewEl=this.el.querySelector("[data-preview]")),this.previewEl},active:function(){var t=this.model,e=t.collection;e.active(e.indexOf(t))},updateVisibility:function(){var t=this.pfx,e=this.getPropertiesWrapper(),n=this.model.get("active");e.style.display=n?"":"none",this.$el[n?"addClass":"removeClass"](t+"active")},render:function(){var t=n(16),e=this.propsConfig,i=this.pfx+"layer",r=this.model,o=this.el,s=new t({collection:r.get("properties"),config:this.config,target:e.target,customValue:e.customValue,propTarget:e.propTarget,onChange:e.onChange}).render().el;return o.innerHTML=this.template(r),o.className=i,this.getPropertiesWrapper().appendChild(s),this.updateVisibility(),this.updatePreview(),this}})},function(t,e,n){"use strict";var i=n(0),r=n(167);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.stackModel=t.stackModel,this.preview=t.preview,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.propsConfig=t.propsConfig;var e=this.pfx,n=this.ppfx,i=this.collection;this.className=e+"layers "+n+"field",this.listenTo(i,"add",this.addTo),this.listenTo(i,"deselectAll",this.deselectAll),this.listenTo(i,"reset",this.render);var r=this.config.em||"",o=r?r.get("Utils"):"";this.sorter=o?new o.Sorter({container:this.el,ignoreViewChildren:1,containerSel:"."+e+"layers",itemSel:"."+e+"layer",pfx:this.config.pStylePrefix}):"",i.view=this,this.$el.data("model",i),this.$el.data("collection",i)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=e||null,o=this.stackModel,s=this.config,a=this.sorter,l=this.propsConfig;void 0!==this.preview&&t.set("preview",this.preview);var c=new r({model:t,config:s,sorter:a,stackModel:o,propsConfig:l}).render().el;if(i)i.appendChild(c);else if(void 0!==n){var u="before";this.$el.children().length==n&&(n--,u="after"),n<0?this.$el.append(c):this.$el.children().eq(n)[u](c)}else this.$el.append(c);return c},deselectAll:function(){this.$el.find("."+this.pfx+"layer").removeClass(this.pfx+"active")},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.addToCollection(e,t)},this),this.$el.append(t),this.$el.attr("class",this.className),this.sorter&&(this.sorter.plh=null),this}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=function(t,e){var n={beforeShow:h,move:h,change:h,show:h,hide:h,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:!1,className:"",containerClassName:"",replacerClassName:"",showAlpha:!1,theme:"sp-light",palette:[["#ffffff","#000000","#ff0000","#ff8000","#ffff00","#008000","#0000ff","#4b0082","#9400d3"]],selectionPalette:[],disabled:!1,offset:null},r=[],o=!!/msie/i.exec(window.navigator.userAgent),s=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div").style;return e.cssText="background-color:rgba(0,0,0,.5)",t(e.backgroundColor,"rgba")||t(e.backgroundColor,"hsla")}(),a=["
","
","
","
"].join(""),l=function(){var t="";if(o)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();function c(e,n,i,r){for(var o=[],a=0;a')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function u(i,u){var h=function(e,i){var r=t.extend({},n,e);return r.callbacks={move:f(r.move,i),change:f(r.change,i),show:f(r.show,i),hide:f(r.hide,i),beforeShow:f(r.beforeShow,i)},r}(u,i),v=h.flat,m=h.showSelectionPalette,y=h.localStorageKey,b=h.theme,x=h.callbacks,w=function(t,e,n){var i;return function(){var r=this,o=arguments;n&&clearTimeout(i),!n&&i||(i=setTimeout(function(){i=null,t.apply(r,o)},e))}}(Vt,10),C=!1,k=!1,T=0,E=0,M=0,A=0,O=0,P=0,_=0,L=0,N=0,D=0,I=1,F=[],R=[],j={},z=h.selectionPalette.slice(0),V=h.maxSelectionSize,H="sp-dragging",$=null,B=i.ownerDocument,W=(B.body,t(i)),U=!1,q=t(l,B).addClass(b),K=q.find(".sp-picker-container"),Y=q.find(".sp-color"),G=q.find(".sp-dragger"),X=q.find(".sp-hue"),J=q.find(".sp-slider"),Z=q.find(".sp-alpha-inner"),Q=q.find(".sp-alpha"),tt=q.find(".sp-alpha-handle"),et=q.find(".sp-input"),nt=q.find(".sp-palette"),it=q.find(".sp-initial"),rt=q.find(".sp-cancel"),ot=q.find(".sp-clear"),st=q.find(".sp-choose"),at=q.find(".sp-palette-toggle"),lt=W.is("input"),ct=lt&&"color"===W.attr("type")&&g(),ut=lt&&!v,ht=ut?t(a).addClass(b).addClass(h.className).addClass(h.replacerClassName):t([]),dt=ut?ht:W,ft=ht.find(".sp-preview-inner"),pt=h.color||lt&&W.val(),gt=!1,vt=h.preferredFormat,mt=!h.showButtons||h.clickoutFiresChange,yt=!pt,bt=h.allowEmpty&&!ct;function xt(){if(h.showPaletteOnly&&(h.showPalette=!0),at.text(h.showPaletteOnly?h.togglePaletteMoreText:h.togglePaletteLessText),h.palette){F=h.palette.slice(0),R=t.isArray(F[0])?F:[F],j={};for(var e=0;e1&&(delete window.localStorage[y],t.each(e,function(t,e){Ct(e)}))}catch(t){}try{z=window.localStorage[y].split(";")}catch(t){}}}function Ct(e){if(m){var n=S(e).toRgbString();if(!j[n]&&-1===t.inArray(n,z))for(z.push(n);z.length>V;)z.shift();if(y&&window.localStorage)try{window.localStorage[y]=z.join(";")}catch(t){}}}function kt(){var e=It(),n=t.map(R,function(t,n){return c(t,e,"sp-palette-row sp-palette-row-"+n,h)});wt(),z&&n.push(c(function(){var t=[];if(h.showPalette)for(var e=0;ed&&d>i?Math.abs(p.left+i-d):0),p.top-=Math.min(p.top,p.top+r>f&&f>r?Math.abs(r+o-0):0),p}(q,dt))),jt(),h.showPalette&&kt(),W.trigger("reflow.spectrum"))}function Ht(){Lt(),U=!0,W.attr("disabled",!0),dt.addClass("sp-disabled")}!function(){if(o&&q.find("*:not(input)").attr("unselectable","on"),xt(),ut&&W.after(ht).hide(),bt||ot.hide(),v)W.after(q).hide();else{var e="parent"===h.appendTo?W.parent():t(h.appendTo);1!==e.length&&(e=t("body")),e.append(q)}function n(e){return e.data&&e.data.ignore?(Dt(t(e.target).closest(".sp-thumb-el").data("color")),Ft()):(Dt(t(e.target).closest(".sp-thumb-el").data("color")),Ft(),zt(!0),h.hideAfterPaletteSelect&&Lt()),!1}wt(),dt.bind("click.spectrum touchstart.spectrum",function(e){U||At(),e.stopPropagation(),t(e.target).is("input")||e.preventDefault()}),(W.is(":disabled")||!0===h.disabled)&&Ht(),q.click(d),et.change(Mt),et.bind("paste",function(){setTimeout(Mt,1)}),et.keydown(function(t){13==t.keyCode&&Mt()}),rt.text(h.cancelText),rt.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),Nt(),Lt()}),ot.attr("title",h.clearText),ot.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),yt=!0,Ft(),v&&zt(!0)}),st.text(h.chooseText),st.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),o&&et.is(":focus")&&et.trigger("change"),et.hasClass("sp-validation-error")||(zt(!0),Lt())}),at.text(h.showPaletteOnly?h.togglePaletteMoreText:h.togglePaletteLessText),at.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),h.showPaletteOnly=!h.showPaletteOnly,h.showPaletteOnly||v||q.css("left","-="+(K.outerWidth(!0)+5)),xt()}),p(Q,function(t,e,n){I=t/O,yt=!1,n.shiftKey&&(I=Math.round(10*I)/10),Ft()},Tt,Et),p(X,function(t,e){L=parseFloat(e/A),yt=!1,h.showAlpha||(I=1),Ft()},Tt,Et),p(Y,function(t,e,n){if(n.shiftKey){if(!$){var i=N*T,r=E-D*E,o=Math.abs(t-i)>Math.abs(e-r);$=o?"x":"y"}}else $=null;var s=!$||"y"===$;(!$||"x"===$)&&(N=parseFloat(t/T)),s&&(D=parseFloat((E-e)/E)),yt=!1,h.showAlpha||(I=1),Ft()},Tt,Et),pt?(Dt(pt),Rt(),vt=h.preferredFormat||S(pt).format,Ct(pt)):Rt(),v&&Ot();var i=o?"mousedown.spectrum":"click.spectrum touchstart.spectrum";nt.delegate(".sp-thumb-el",i,n),it.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},n)}();var $t={show:Ot,hide:Lt,toggle:At,reflow:Vt,option:function(n,i){return n===e?t.extend({},h):i===e?h[n]:(h[n]=i,"preferredFormat"===n&&(vt=h.preferredFormat),void xt())},enable:function(){U=!1,W.attr("disabled",!1),dt.removeClass("sp-disabled")},disable:Ht,offset:function(t){h.offset=t,Vt()},set:function(t){Dt(t),zt()},get:It,destroy:function(){W.show(),dt.unbind("click.spectrum touchstart.spectrum"),q.remove(),ht.remove(),r[$t.id]=null},container:q};return $t.id=r.push($t)-1,$t}function h(){}function d(t){t.stopPropagation()}function f(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function p(e,n,i,r){n=n||function(){},i=i||function(){},r=r||function(){};var s=document,a=!1,l={},c=0,u=0,h="ontouchstart"in window,d={};function f(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function p(t){if(a){if(o&&s.documentMode<9&&!t.button)return g();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,d=i&&i.pageY||t.pageY,p=Math.max(0,Math.min(r-l.left,u)),v=Math.max(0,Math.min(d-l.top,c));h&&f(t),n.apply(e,[p,v,t])}}function g(){a&&(t(s).unbind(d),t(s.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),a=!1}d.selectstart=f,d.dragstart=f,d["touchmove mousemove"]=p,d["touchend mouseup"]=g,t(e).bind("touchstart mousedown",function(n){(n.which?3==n.which:2==n.button)||a||!1!==i.apply(e,arguments)&&(a=!0,c=t(e).height(),u=t(e).width(),l=t(e).offset(),t(s).bind(d),t(s.body).addClass("sp-dragging"),p(n),f(n))})}function g(){return t.fn.spectrum.inputTypeColorSupport()}t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,o=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=r[t(this).data("spectrum.id")];if(n){var s=n[e];if(!s)throw new Error("Spectrum: no such method: '"+e+"'");"get"==e?i=n.get():"container"==e?i=n.container:"option"==e?i=n.option.apply(n,o):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):s.apply(n,o)}}),i}return this.spectrum("destroy").each(function(){var n=u(this,t.extend({},e,t(this).data()));t(this).data("spectrum.id",n.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=p,t.fn.spectrum.defaults=n,t.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var n=t("")[0];e._cachedResult="color"===n.type&&""!==n.value}return e._cachedResult},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t("input[type=color]");e.length&&!g()&&e.spectrum({preferredFormat:"hex6"})};var v=/^[\s,#]+/,m=/\s+$/,y=0,b=Math,x=b.round,w=b.min,C=b.max,k=b.random,S=function t(e,n){if(e=e||"",n=n||{},e instanceof t)return e;if(!(this instanceof t))return new t(e,n);var r=function(t){var e={r:0,g:0,b:0},n=1,r=!1,o=!1;"string"==typeof t&&(t=function(t){t=t.replace(v,"").replace(m,"").toLowerCase();var e,n=!1;if($[t])t=$[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=X.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=X.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=X.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=X.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=X.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=X.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=X.hex8.exec(t))return{a:function(t){return K(t)/255}(e[1]),r:K(e[2]),g:K(e[3]),b:K(e[4]),format:n?"name":"hex8"};if(e=X.hex6.exec(t))return{r:K(e[1]),g:K(e[2]),b:K(e[3]),format:n?"name":"hex"};if(e=X.hex3.exec(t))return{r:K(e[1]+""+e[1]),g:K(e[2]+""+e[2]),b:K(e[3]+""+e[3]),format:n?"name":"hex"};return!1}(t));"object"==(void 0===t?"undefined":i(t))&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(e=function(t,e,n){return{r:255*U(t,255),g:255*U(e,255),b:255*U(n,255)}}(t.r,t.g,t.b),r=!0,o="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=G(t.s),t.v=G(t.v),e=function(t,e,n){t=6*U(t,360),e=U(e,100),n=U(n,100);var i=b.floor(t),r=t-i,o=n*(1-e),s=n*(1-r*e),a=n*(1-(1-r)*e),l=i%6;return{r:255*[n,s,o,o,a,n][l],g:255*[a,n,n,s,o,o][l],b:255*[o,o,a,n,n,s][l]}}(t.h,t.s,t.v),r=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=G(t.s),t.l=G(t.l),e=function(t,e,n){var i,r,o;function s(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=U(t,360),e=U(e,100),n=U(n,100),0===e)i=r=o=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=s(l,a,t+1/3),r=s(l,a,t),o=s(l,a,t-1/3)}return{r:255*i,g:255*r,b:255*o}}(t.h,t.s,t.l),r=!0,o="hsl"),t.hasOwnProperty("a")&&(n=t.a));return n=W(n),{ok:r,format:t.format||o,r:w(255,C(e.r,0)),g:w(255,C(e.g,0)),b:w(255,C(e.b,0)),a:n}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=x(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=x(this._r)),this._g<1&&(this._g=x(this._g)),this._b<1&&(this._b=x(this._b)),this._ok=r.ok,this._tc_id=y++};function T(t,e,n){t=U(t,255),e=U(e,255),n=U(n,255);var i,r,o=C(t,e,n),s=w(t,e,n),a=(o+s)/2;if(o==s)i=r=0;else{var l=o-s;switch(r=a>.5?l/(2-o-s):l/(o+s),o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(S(i));return o}function H(t,e){e=e||6;for(var n=S(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(S({h:i,s:r,v:o})),o=(o+a)%1;return s}S.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this._a=W(t),this._roundA=x(100*this._a)/100,this},toHsv:function(){var t=E(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=E(this._r,this._g,this._b),e=x(360*t.h),n=x(100*t.s),i=x(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=T(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=T(this._r,this._g,this._b),e=x(360*t.h),n=x(100*t.s),i=x(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return M(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return A(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:x(this._r),g:x(this._g),b:x(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+x(this._r)+", "+x(this._g)+", "+x(this._b)+")":"rgba("+x(this._r)+", "+x(this._g)+", "+x(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:x(100*U(this._r,255))+"%",g:x(100*U(this._g,255))+"%",b:x(100*U(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+x(100*U(this._r,255))+"%, "+x(100*U(this._g,255))+"%, "+x(100*U(this._b,255))+"%)":"rgba("+x(100*U(this._r,255))+"%, "+x(100*U(this._g,255))+"%, "+x(100*U(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(B[M(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+A(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";t&&(n=S(t).toHex8String());return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,i=this._a<1&&this._a>=0;return e||!i||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(N,arguments)},darken:function(){return this._applyModification(D,arguments)},desaturate:function(){return this._applyModification(O,arguments)},saturate:function(){return this._applyModification(P,arguments)},greyscale:function(){return this._applyModification(_,arguments)},spin:function(){return this._applyModification(I,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(V,arguments)},complement:function(){return this._applyCombination(F,arguments)},monochromatic:function(){return this._applyCombination(H,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(R,arguments)},tetrad:function(){return this._applyCombination(j,arguments)}},S.fromRatio=function(t,e){if("object"==(void 0===t?"undefined":i(t))){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]="a"===r?t[r]:G(t[r]));t=n}return S(t,e)},S.equals=function(t,e){return!(!t||!e)&&S(t).toRgbString()==S(e).toRgbString()},S.random=function(){return S.fromRatio({r:k(),g:k(),b:k()})},S.mix=function(t,e,n){n=0===n?0:n||50;var i,r=S(t).toRgb(),o=S(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a,c=1-(i=((i=a*l==-1?a:(a+l)/(1+a*l))+1)/2),u={r:o.r*i+r.r*c,g:o.g*i+r.g*c,b:o.b*i+r.b*c,a:o.a*s+r.a*(1-s)};return S(u)},S.readability=function(t,e){var n=S(t),i=S(e),r=n.toRgb(),o=i.toRgb(),s=n.getBrightness(),a=i.getBrightness(),l=Math.max(r.r,o.r)-Math.min(r.r,o.r)+Math.max(r.g,o.g)-Math.min(r.g,o.g)+Math.max(r.b,o.b)-Math.min(r.b,o.b);return{brightness:Math.abs(s-a),color:l}},S.isReadable=function(t,e){var n=S.readability(t,e);return n.brightness>125&&n.color>500},S.mostReadable=function(t,e){for(var n=null,i=0,r=!1,o=0;o125&&s.color>500,l=s.brightness/125*3+s.color/500;(a&&!r||a&&r&&l>i||!a&&!r&&l>i)&&(r=a,i=l,n=S(e[o]))}return n};var $=S.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},B=S.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}($);function W(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function U(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=w(e,C(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),b.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function q(t){return w(1,C(0,t))}function K(t){return parseInt(t,16)}function Y(t){return 1==t.length?"0"+t:""+t}function G(t){return t<=1&&(t=100*t+"%"),t}var X=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+n),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=S,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Model.extend({defaults:{index:"",value:"",values:{},active:!1,preview:!1,properties:[]},initialize:function(){var t=n(18),e=this.get("properties"),i=this.get("value");if(this.set("properties",e instanceof t?e:new t(e)),!i){var r="",o=this.get("values");for(var s in o)r+=" "+o[s];this.set("value",r.trim())}},getPropertyValue:function(t){var e="";return this.get("properties").each(function(n){n.get("property")==t&&(e=n.getFullValue())}),e},getFullValue:function(){var t=[];return this.get("properties").each(function(e){return t.push(e.getFullValue())}),t.join(" ")}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;eB",attributes:{title:"Bold"},result:function(t){return t.exec("bold")}},italic:{name:"italic",icon:"I",attributes:{title:"Italic"},result:function(t){return t.exec("italic")}},underline:{name:"underline",icon:"U",attributes:{title:"Underline"},result:function(t){return t.exec("underline")}},strikethrough:{name:"strikethrough",icon:"S",attributes:{title:"Strike-through"},result:function(t){return t.exec("strikeThrough")}},link:{icon:'',name:"link",attributes:{style:"font-size:1.4rem;padding:0 4px 2px;",title:"Link"},result:function(t){return t.insertHTML(''+t.selection()+"")}}},l=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=n.el;if(r[s])return r[s];r[s]=this,this.setEl(r),this.updateActiveActions=this.updateActiveActions.bind(this);var o=n.actions||[];o.forEach(function(t,e){"string"==typeof t?t=a[t]:a[t.name]&&(t=i({},a[t.name],t)),o[e]=t});var l=o.length?o:Object.keys(a).map(function(t){return a[t]});n.classes=i({actionbar:"actionbar",button:"action",active:"active"},n.classes);var c=n.classes,u=n.actionbar;if(this.actionbar=u,this.settings=n,this.classes=c,this.actions=l,!u){var h=n.actionbarContainer;(u=document.createElement("div")).className=c.actionbar,h.appendChild(u),this.actionbar=u,l.forEach(function(t){return e.addAction(t)})}return n.styleWithCSS&&this.exec("styleWithCSS"),this.syncActions(),this}return r(t,[{key:"setEl",value:function(t){this.el=t,this.doc=t.ownerDocument}},{key:"updateActiveActions",value:function(){var t=this;this.getActions().forEach(function(e){var n=e.btn,i=e.update,r=t.classes.active,o=e.name,s=t.doc;n.className=n.className.replace(r,"").trim(),s.queryCommandSupported(o)&&s.queryCommandState(o)&&(n.className+=" "+r),i&&i(t,e)})}},{key:"enable",value:function(){return this.enabled?this:(this.actionbarEl().style.display="",this.el.contentEditable=!0,(0,o.on)(this.el,"mouseup keyup",this.updateActiveActions),this.syncActions(),this.updateActiveActions(),this.el.focus(),this.enabled=1,this)}},{key:"disable",value:function(){return this.actionbarEl().style.display="none",this.el.contentEditable=!1,(0,o.off)(this.el,"mouseup keyup",this.updateActiveActions),this.enabled=0,this}},{key:"syncActions",value:function(){var t=this;this.getActions().forEach(function(e){var n=e.event||"click";e.btn["on"+n]=function(n){e.result(t,e),t.updateActiveActions()}})}},{key:"addAction",value:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).sync,n=document.createElement("span"),i=t.icon,r=t.attributes||{};for(var o in n.className=this.classes.button,t.btn=n,r)n.setAttribute(o,r[o]);"string"==typeof i?n.innerHTML=i:n.appendChild(i),this.actionbarEl().appendChild(n),e&&(this.actions.push(t),this.syncActions())}},{key:"getActions",value:function(){return this.actions}},{key:"selection",value:function(){return this.doc.getSelection()}},{key:"exec",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.doc.execCommand(t,!1,e)}},{key:"actionbarEl",value:function(){return this.actionbar}},{key:"insertHTML",value:function(t){var e=this.doc,n=e.getSelection();if(n&&n.rangeCount){var i=e.createElement("div"),r=n.getRangeAt(0);r.deleteContents(),i.innerHTML=t,Array.prototype.slice.call(i.childNodes).forEach(function(t){r.insertNode(t),t}),n.removeAllRanges(),n.addRange(r),this.el.focus()}}}]),t}();e.default=l},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(177)),r=n(2);t.exports=function(){var t={},e=n(176),o=void 0,s=void 0,a=void 0,l=function(){var t=o.style;t.top="-100px",t.left="-100px",t.display="none"};return{customRte:null,name:"RichTextEditor",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var i in t=n,e)i in t||(t[i]=e[i]);var s=t.pStylePrefix;return s&&(t.stylePrefix=s+t.stylePrefix),this.pfx=t.stylePrefix,t.actions||[],(o=document.createElement("div")).className=s+"rte-toolbar "+s+"one-bg",a=this.initRte(document.createElement("div")),(0,r.on)(o,"mousedown",function(t){return t.stopPropagation()}),this},postRender:function(t){var e=t.model.get("Canvas");o.style.pointerEvents="all",l(),e.getToolsEl().appendChild(o)},initRte:function(e){var n=this.pfx,r=o,s=this.actionbar,l=this.actions||t.actions,c={actionbar:n+"actionbar",button:n+"action",active:n+"active"},u=new i.default({el:e,classes:c,actions:l,actionbar:s,actionbarContainer:r});return a&&a.setEl(e),u.actionbar&&(this.actionbar=u.actionbar),u.actions&&(this.actions=u.actions),u},add:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.name=t,a.addAction(e,{sync:1})},get:function(t){var e=void 0;return a.getActions().forEach(function(n){n.name==t&&(e=n)}),e},getAll:function(){return a.getActions()},remove:function(t){var e=this.getAll(),n=this.get(t);if(n){var i=n.btn,r=e.indexOf(n);i.parentNode.removeChild(i),e.splice(r,1)}return n},getToolbarEl:function(){return o},udpatePosition:function(){var e=t.em.get("Canvas").getTargetToElementDim(o,s,{event:"rteToolbarPosUpdate"});if(e){t.adjustToolbar&&e.top<=e.canvasTop&&(e.top=e.elementTop+e.elementHeight);var n=o.style;n.top=e.top+"px",n.left=e.left+"px"}},enable:function(e,n){s=e.el;var i=t.em,r=e.getChildrenContainer(),a=this.customRte;if(o.style.display="",n=a?a.enable(r,n):this.initRte(r).enable(),i){setTimeout(this.udpatePosition.bind(this),0);var l="change:canvasOffset canvasScroll";i.off(l,this.udpatePosition,this),i.on(l,this.udpatePosition,this),i.trigger("rte:enable",e,n)}return n},disable:function(e,n){var i=t.em,r=this.customRte,o=e.getChildrenContainer();r?r.disable(o,n):n&&n.disable(),l(),i&&i.trigger("rte:disable",e,n)}}}},function(t,e,n){"use strict";var i=n(0),r=n(78);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"";var e=this.collection;this.listenTo(e,"add",this.addTo),this.listenTo(e,"reset",this.render),this.listenTo(e,"remove",this.onRemove),this.className=this.pfx+"panels"},onRemove:function(t){var e=t.view;e&&e.remove()},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=this.config,o=t.get("el"),s=new r({el:o,model:t,config:i}),a=s.render().el,l=t.get("appendTo");if(o);else if(l){document.querySelector(l).appendChild(a)}else n?n.appendChild(a):this.$el.append(a);return s.initResize(),a},render:function(){var t=this,e=this.$el,n=document.createDocumentFragment();return e.empty(),this.collection.each(function(e){return t.addToCollection(e,n)}),e.append(n),e.attr("class",this.className),this}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e\n \t
<%= label %>
\n \t
\n
'),initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix},render:function(){var t=this.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"editor-c"),this.$el.find("#"+this.pfx+"code").append(this.model.get("input")),this}})},function(t,e,n){!function(t){t.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e){return/^[;{}]$/.test(e)}}),t.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e,n,i){return this.jsonMode?/^[\[,{]$/.test(e)||/^}/.test(n):(";"!=e||!i.lexical||")"!=i.lexical.type)&&/^[;{}]$/.test(e)&&!/^;/.test(n)}});var e=/^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;t.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",newlineAfterToken:function(t,n,i,r){var o=!1;return"html"==this.configuration&&(o=!!r.context&&e.test(r.context.tagName)),!o&&("tag"==t&&/>$/.test(n)&&r.context||/^-1&&a>-1&&a>s&&(t=t.substr(0,s)+t.substring(s+o.commentStart.length,a)+t.substr(a+o.commentEnd.length)),r.replaceRange(t,n,i)}})}),t.defineExtension("autoIndentRange",function(t,e){var n=this;this.operation(function(){for(var i=t.line;i<=e.line;i++)n.indentLine(i,"smart")})}),t.defineExtension("autoFormatRange",function(e,n){var i=this,r=i.getMode(),o=i.getRange(e,n).split("\n"),s=t.copyState(r,i.getTokenAt(e).state),a=i.getOption("tabSize"),l="",c=0,u=0===e.ch;function h(){l+="\n",u=!0,++c}for(var d=0;d!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(t,e,n){return i=t,r=n,e}function g(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=function(t){return function(e,n){var i,r=!1;if(a&&"@"==e.peek()&&e.match(f))return n.tokenize=g,p("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||r);)r=!r&&"\\"==i;return r||(n.tokenize=g),p("string","string")}}(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return p("number","number");if("."==n&&t.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return p(n);if("="==n&&t.eat(">"))return p("=>","operator");if("0"==n&&t.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return p("number","number");if(/\d/.test(n))return t.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),p("number","number");if("/"==n)return t.eat("*")?(e.tokenize=v,v(t,e)):t.eat("/")?(t.skipToEnd(),p("comment","comment")):qt(t,e,1)?(function(t){for(var e,n=!1,i=!1;null!=(e=t.next());){if(!n){if("/"==e&&!i)return;"["==e?i=!0:i&&"]"==e&&(i=!1)}n=!n&&"\\"==e}}(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),p("regexp","string-2")):(t.eat("="),p("operator","operator",t.current()));if("`"==n)return e.tokenize=m,m(t,e);if("#"==n)return t.skipToEnd(),p("error","error");if(d.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=n&&"="!=n||t.eat("="):/[<>*+\-]/.test(n)&&(t.eat(n),">"==n&&t.eat(n))),p("operator","operator",t.current());if(u.test(n)){t.eatWhile(u);var i=t.current();if("."!=e.lastType){if(h.propertyIsEnumerable(i)){var r=h[i];return p(r.type,r.style,i)}if("async"==i&&t.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return p("async","keyword",i)}return p("variable","variable",i)}}function v(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=g;break}i="*"==n}return p("comment","comment")}function m(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=g;break}i=!i&&"\\"==n}return p("quasi","string-2",t.current())}var y="([{}])";function b(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(c){var i=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));i&&(n=i.index)}for(var r=0,o=!1,s=n-1;s>=0;--s){var a=t.string.charAt(s),l=y.indexOf(a);if(l>=0&&l<3){if(!r){++s;break}if(0==--r){"("==a&&(o=!0);break}}else if(l>=3&&l<6)++r;else if(u.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function w(t,e,n,i,r,o){this.indented=t,this.column=e,this.type=n,this.prev=r,this.info=o,null!=i&&(this.align=i)}function C(t,e){for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var i=t.context;i;i=i.prev)for(var n=i.vars;n;n=n.next)if(n.name==e)return!0}var k={state:null,column:null,marked:null,cc:null};function S(){for(var t=arguments.length-1;t>=0;t--)k.cc.push(arguments[t])}function T(){return S.apply(null,arguments),!0}function E(t,e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}function M(t){var e=k.state;if(k.marked="def",e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var i=function t(e,n){if(n){if(n.block){var i=t(e,n.prev);return i?i==n.prev?n:new O(i,n.vars,!0):null}return E(e,n.vars)?n:new O(n.prev,new P(e,n.vars),!1)}return null}(t,e.context);if(null!=i)return void(e.context=i)}else if(!E(t,e.localVars))return void(e.localVars=new P(t,e.localVars));n.globalVars&&!E(t,e.globalVars)&&(e.globalVars=new P(t,e.globalVars))}function A(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function O(t,e,n){this.prev=t,this.vars=e,this.block=n}function P(t,e){this.name=t,this.next=e}var _=new P("this",new P("arguments",null));function L(){k.state.context=new O(k.state.context,k.state.localVars,!1),k.state.localVars=_}function N(){k.state.context=new O(k.state.context,k.state.localVars,!0),k.state.localVars=null}function D(){k.state.localVars=k.state.context.vars,k.state.context=k.state.context.prev}function I(t,e){var n=function(){var n=k.state,i=n.indented;if("stat"==n.lexical.type)i=n.lexical.indented;else for(var r=n.lexical;r&&")"==r.type&&r.align;r=r.prev)i=r.indented;n.lexical=new w(i,k.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function F(){var t=k.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function R(t){return function e(n){return n==t?T():";"==t||"}"==n||")"==n||"]"==n?S():T(e)}}function j(t,e){return"var"==t?T(I("vardef",e),yt,R(";"),F):"keyword a"==t?T(I("form"),$,j,F):"keyword b"==t?T(I("form"),j,F):"keyword d"==t?k.stream.match(/^\s*$/,!1)?T():T(I("stat"),W,R(";"),F):"debugger"==t?T(R(";")):"{"==t?T(I("}"),N,st,F,D):";"==t?T():"if"==t?("else"==k.state.lexical.info&&k.state.cc[k.state.cc.length-1]==F&&k.state.cc.pop()(),T(I("form"),$,j,F,kt)):"function"==t?T(Ot):"for"==t?T(I("form"),St,j,F):"class"==t||c&&"interface"==e?(k.marked="keyword",T(I("form"),Lt,F)):"variable"==t?c&&"declare"==e?(k.marked="keyword",T(j)):c&&("module"==e||"enum"==e||"type"==e)&&k.stream.match(/^\s*\w/,!1)?(k.marked="keyword","enum"==e?T(Wt):"type"==e?T(ut,R("operator"),ut,R(";")):T(I("form"),bt,R("{"),I("}"),st,F,F)):c&&"namespace"==e?(k.marked="keyword",T(I("form"),V,st,F)):c&&"abstract"==e?(k.marked="keyword",T(j)):T(I("stat"),Q):"switch"==t?T(I("form"),$,R("{"),I("}","switch"),N,st,F,F,D):"case"==t?T(V,R(":")):"default"==t?T(R(":")):"catch"==t?T(I("form"),L,z,j,F,D):"export"==t?T(I("stat"),Ft,F):"import"==t?T(I("stat"),jt,F):"async"==t?T(j):"@"==e?T(V,j):S(I("stat"),V,R(";"),F)}function z(t){if("("==t)return T(Pt,R(")"))}function V(t,e){return B(t,e,!1)}function H(t,e){return B(t,e,!0)}function $(t){return"("!=t?S():T(I(")"),V,R(")"),F)}function B(t,e,n){if(k.state.fatArrowAt==k.stream.start){var i=n?X:G;if("("==t)return T(L,I(")"),rt(Pt,")"),F,R("=>"),i,D);if("variable"==t)return S(L,bt,R("=>"),i,D)}var r=n?q:U;return x.hasOwnProperty(t)?T(r):"function"==t?T(Ot,r):"class"==t||c&&"interface"==e?(k.marked="keyword",T(I("form"),_t,F)):"keyword c"==t||"async"==t?T(n?H:V):"("==t?T(I(")"),W,R(")"),F,r):"operator"==t||"spread"==t?T(n?H:V):"["==t?T(I("]"),Bt,F,r):"{"==t?ot(et,"}",null,r):"quasi"==t?S(K,r):"new"==t?T(function(t){return function(e){return"."==e?T(t?Z:J):"variable"==e&&c?T(gt,t?q:U):S(t?H:V)}}(n)):"import"==t?T(V):T()}function W(t){return t.match(/[;\}\)\],]/)?S():S(V)}function U(t,e){return","==t?T(V):q(t,e,!1)}function q(t,e,n){var i=0==n?U:q,r=0==n?V:H;return"=>"==t?T(L,n?X:G,D):"operator"==t?/\+\+|--/.test(e)||c&&"!"==e?T(i):c&&"<"==e&&k.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?T(I(">"),rt(ut,">"),F,i):"?"==e?T(V,R(":"),r):T(r):"quasi"==t?S(K,i):";"!=t?"("==t?ot(H,")","call",i):"."==t?T(tt,i):"["==t?T(I("]"),W,R("]"),F,i):c&&"as"==e?(k.marked="keyword",T(ut,i)):"regexp"==t?(k.state.lastType=k.marked="operator",k.stream.backUp(k.stream.pos-k.stream.start-1),T(r)):void 0:void 0}function K(t,e){return"quasi"!=t?S():"${"!=e.slice(e.length-2)?T(K):T(V,Y)}function Y(t){if("}"==t)return k.marked="string-2",k.state.tokenize=m,T(K)}function G(t){return b(k.stream,k.state),S("{"==t?j:V)}function X(t){return b(k.stream,k.state),S("{"==t?j:H)}function J(t,e){if("target"==e)return k.marked="keyword",T(U)}function Z(t,e){if("target"==e)return k.marked="keyword",T(q)}function Q(t){return":"==t?T(F,j):S(U,R(";"),F)}function tt(t){if("variable"==t)return k.marked="property",T()}function et(t,e){if("async"==t)return k.marked="property",T(et);if("variable"==t||"keyword"==k.style){return k.marked="property","get"==e||"set"==e?T(nt):(c&&k.state.fatArrowAt==k.stream.start&&(n=k.stream.match(/^\s*:\s*/,!1))&&(k.state.fatArrowAt=k.stream.pos+n[0].length),T(it));var n}else{if("number"==t||"string"==t)return k.marked=a?"property":k.style+" property",T(it);if("jsonld-keyword"==t)return T(it);if(c&&A(e))return k.marked="keyword",T(et);if("["==t)return T(V,at,R("]"),it);if("spread"==t)return T(H,it);if("*"==e)return k.marked="keyword",T(et);if(":"==t)return S(it)}}function nt(t){return"variable"!=t?S(it):(k.marked="property",T(Ot))}function it(t){return":"==t?T(H):"("==t?S(Ot):void 0}function rt(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=k.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),T(function(n,i){return n==e||i==e?S():S(t)},i)}return r==e||o==e?T():T(R(e))}return function(n,r){return n==e||r==e?T():S(t,i)}}function ot(t,e,n){for(var i=3;i"),ut):void 0}function ht(t){if("=>"==t)return T(ut)}function dt(t,e){return"variable"==t||"keyword"==k.style?(k.marked="property",T(dt)):"?"==e?T(dt):":"==t?T(ut):"["==t?T(V,at,R("]"),dt):void 0}function ft(t,e){return"variable"==t&&k.stream.match(/^\s*[?:]/,!1)||"?"==e?T(ft):":"==t?T(ut):S(ut)}function pt(t,e){return"<"==e?T(I(">"),rt(ut,">"),F,pt):"|"==e||"."==t||"&"==e?T(ut):"["==t?T(R("]"),pt):"extends"==e||"implements"==e?(k.marked="keyword",T(ut)):void 0}function gt(t,e){if("<"==e)return T(I(">"),rt(ut,">"),F,pt)}function vt(){return S(ut,mt)}function mt(t,e){if("="==e)return T(ut)}function yt(t,e){return"enum"==e?(k.marked="keyword",T(Wt)):S(bt,at,wt,Ct)}function bt(t,e){return c&&A(e)?(k.marked="keyword",T(bt)):"variable"==t?(M(e),T()):"spread"==t?T(bt):"["==t?ot(bt,"]"):"{"==t?ot(xt,"}"):void 0}function xt(t,e){return"variable"!=t||k.stream.match(/^\s*:/,!1)?("variable"==t&&(k.marked="property"),"spread"==t?T(bt):"}"==t?S():T(R(":"),bt,wt)):(M(e),T(wt))}function wt(t,e){if("="==e)return T(H)}function Ct(t){if(","==t)return T(yt)}function kt(t,e){if("keyword b"==t&&"else"==e)return T(I("form","else"),j,F)}function St(t,e){return"await"==e?T(St):"("==t?T(I(")"),Tt,R(")"),F):void 0}function Tt(t){return"var"==t?T(yt,R(";"),Mt):";"==t?T(Mt):"variable"==t?T(Et):S(V,R(";"),Mt)}function Et(t,e){return"in"==e||"of"==e?(k.marked="keyword",T(V)):T(U,Mt)}function Mt(t,e){return";"==t?T(At):"in"==e||"of"==e?(k.marked="keyword",T(V)):S(V,R(";"),At)}function At(t){")"!=t&&T(V)}function Ot(t,e){return"*"==e?(k.marked="keyword",T(Ot)):"variable"==t?(M(e),T(Ot)):"("==t?T(L,I(")"),rt(Pt,")"),F,lt,j,D):c&&"<"==e?T(I(">"),rt(vt,">"),F,Ot):void 0}function Pt(t,e){return"@"==e&&T(V,Pt),"spread"==t?T(Pt):c&&A(e)?(k.marked="keyword",T(Pt)):S(bt,at,wt)}function _t(t,e){return"variable"==t?Lt(t,e):Nt(t,e)}function Lt(t,e){if("variable"==t)return M(e),T(Nt)}function Nt(t,e){return"<"==e?T(I(">"),rt(vt,">"),F,Nt):"extends"==e||"implements"==e||c&&","==t?("implements"==e&&(k.marked="keyword"),T(c?ut:V,Nt)):"{"==t?T(I("}"),Dt,F):void 0}function Dt(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||c&&A(e))&&k.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(k.marked="keyword",T(Dt)):"variable"==t||"keyword"==k.style?(k.marked="property",T(c?It:Ot,Dt)):"["==t?T(V,at,R("]"),c?It:Ot,Dt):"*"==e?(k.marked="keyword",T(Dt)):";"==t?T(Dt):"}"==t?T():"@"==e?T(V,Dt):void 0}function It(t,e){return"?"==e?T(It):":"==t?T(ut,wt):"="==e?T(H):S(Ot)}function Ft(t,e){return"*"==e?(k.marked="keyword",T($t,R(";"))):"default"==e?(k.marked="keyword",T(V,R(";"))):"{"==t?T(rt(Rt,"}"),$t,R(";")):S(j)}function Rt(t,e){return"as"==e?(k.marked="keyword",T(R("variable"))):"variable"==t?S(H,Rt):void 0}function jt(t){return"string"==t?T():"("==t?S(V):S(zt,Vt,$t)}function zt(t,e){return"{"==t?ot(zt,"}"):("variable"==t&&M(e),"*"==e&&(k.marked="keyword"),T(Ht))}function Vt(t){if(","==t)return T(zt,Vt)}function Ht(t,e){if("as"==e)return k.marked="keyword",T(zt)}function $t(t,e){if("from"==e)return k.marked="keyword",T(V)}function Bt(t){return"]"==t?T():S(rt(H,"]"))}function Wt(){return S(I("form"),bt,R("{"),I("}"),rt(Ut,"}"),F,F)}function Ut(){return S(bt,wt)}function qt(t,e,n){return e.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}return D.lex=!0,F.lex=!0,{startState:function(t){var e={tokenize:g,lastType:"sof",cc:[],lexical:new w((t||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new O(null,null,!1),indented:t||0};return n.globalVars&&"object"==typeof n.globalVars&&(e.globalVars=n.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),b(t,e)),e.tokenize!=v&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==i?n:(e.lastType="operator"!=i||"++"!=r&&"--"!=r?i:"incdec",function(t,e,n,i,r){var o=t.cc;for(k.state=t,k.stream=r,k.marked=null,k.cc=o,k.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){var s=o.length?o.pop():l?V:j;if(s(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return k.marked?k.marked:"variable"==n&&C(t,i)?"variable-2":e}}}(e,n,i,r,t))},indent:function(e,i){if(e.tokenize==v)return t.Pass;if(e.tokenize!=g)return 0;var r,a=i&&i.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(i))for(var c=e.cc.length-1;c>=0;--c){var u=e.cc[c];if(u==F)l=l.prev;else if(u!=kt)break}for(;("stat"==l.type||"form"==l.type)&&("}"==a||(r=e.cc[e.cc.length-1])&&(r==U||r==q)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;s&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,f=a==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==h&&"{"==a?l.indented:"form"==h?l.indented+o:"stat"==h?l.indented+(function(t,e){return"operator"==t.lastType||","==t.lastType||d.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}(e,i)?s||o:0):"switch"!=l.info||f||0==n.doubleIndentSwitch?l.align?l.column+(f?0:1):l.indented+(f?0:o):l.indented+(/^(?:case|default)\b/.test(i)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:a,jsonMode:l,expressionAllowed:qt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=V&&e!=H||t.cc.pop()}}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(6))},function(t,e,n){!function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",function(i,r){var o,s,a=i.indentUnit,l={},c=r.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in r)l[u]=r[u];function h(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();return"<"==i?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(f("atom","]]>")):null:t.match("--")?n(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(function t(e){return function(n,i){for(var r;null!=(r=n.next());){if("<"==r)return i.tokenize=t(e+1),i.tokenize(n,i);if(">"==r){if(1==e){i.tokenize=h;break}return i.tokenize=t(e-1),i.tokenize(n,i)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(o=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==i?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function d(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=h,o=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return o="equals",null;if("<"==n){e.tokenize=h,e.state=v,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=function(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=d;break}return"string"};return e.isInAttribute=!0,e}(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=h;break}n.next()}return t}}function p(t){t.context&&(t.context=t.context.prev)}function g(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(e))return;p(t)}}function v(t,e,n){return"openTag"==t?(n.tagStart=e.column(),m):"closeTag"==t?y:v}function m(t,e,n){return"word"==t?(n.tagName=e.current(),s="tag",w):l.allowMissingTagName&&"endTag"==t?(s="tag bracket",w(t,0,n)):(s="error",m)}function y(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&p(n),n.context&&n.context.tagName==i||!1===l.matchClosing?(s="tag",b):(s="tag error",x)}return l.allowMissingTagName&&"endTag"==t?(s="tag bracket",b(t,0,n)):(s="error",x)}function b(t,e,n){return"endTag"!=t?(s="error",b):(p(n),v)}function x(t,e,n){return s="error",b(t,0,n)}function w(t,e,n){if("word"==t)return s="attribute",C;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(i)?g(n,i):(g(n,i),n.context=new function(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}(n,i,r==n.indented)),v}return s="error",w}function C(t,e,n){return"equals"==t?k:(l.allowMissing||(s="error"),w(t,0,n))}function k(t,e,n){return"string"==t?S:"word"==t&&l.allowUnquoted?(s="string",w):(s="error",w(t,0,n))}function S(t,e,n){return"string"==t?S:w(t,0,n)}return h.isInText=!0,{startState:function(t){var e={tokenize:h,state:v,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;o=null;var n=e.tokenize(t,e);return(n||o)&&"comment"!=n&&(s=null,e.state=e.state(o||n,t,e),s&&(n="error"==s?n+" error":s)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+a;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=h)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==k&&(t.state=w)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(6))},function(t,e,n){!function(t){"use strict";var e={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},n={};function i(t,e){var i=t.match(function(t){var e=n[t];return e||(n[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(e));return i?/^\s*(.*?)\s*$/.exec(i[2])[1]:""}function r(t,e){return new RegExp((e?"^":"")+"","i")}function o(t,e){for(var n in t)for(var i=e[n]||(e[n]=[]),r=t[n],o=r.length-1;o>=0;o--)i.unshift(r[o])}t.defineMode("htmlmixed",function(n,s){var a=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:s.multilineTagIndentFactor,multilineTagIndentPastTag:s.multilineTagIndentPastTag}),l={},c=s&&s.tags,u=s&&s.scriptTypes;if(o(e,l),c&&o(c,l),u)for(var h=u.length-1;h>=0;h--)l.script.unshift(["type",u[h].matches,u[h].mode]);function d(e,o){var s,c=a.token(e,o.htmlState),u=/\btag\b/.test(c);if(u&&!/[<>\s\/]/.test(e.current())&&(s=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(s))o.inTag=s+" ";else if(o.inTag&&u&&/>$/.test(e.current())){var h=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var f=">"==e.current()&&function(t,e){for(var n=0;n-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}(t,v,e.localMode.token(t,e.localState))},o.localMode=p,o.localState=t.startState(p,a.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=e.current(),e.eol()&&(o.inTag+=" "));return c}return{startState:function(){var e=t.startState(a);return{token:d,inTag:null,localMode:null,localState:null,htmlState:e}},copyState:function(e){var n;return e.localState&&(n=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:n,htmlState:t.copyState(a,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?a.indent(e.htmlState,n):e.localMode.indent?e.localMode.indent(e.localState,n,i):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||a}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")}(n(6),n(189),n(188),n(81))},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},i="",r=this.em,o=r&&r.getConfig("avoidInlineStyle"),s=t.styleToString(),a=t.get("classes"),l=n.wrappesIsBody,c=t.get("wrapper");if(this.ids.push("#"+t.getId()),a.each(function(t){return e.compCls.push(t.getFullName())}),(!o||c)&&s){var u="#"+t.getId();i=(u=l&&c?"body":u)+"{"+s+"}"}return t.components().each(function(t){return i+=e.buildFromModel(t,n)}),i},build:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.cssc,o=n.em||"";this.em=o,this.compCls=[],this.ids=[];var s=this.buildFromModel(t,n),a=(0,i.isUndefined)(n.clearStyles)&&o?o.getConfig("clearStyles"):n.clearStyles;return r&&function(){var t=r.getAll(),i={},l=[];for(var c in t.each(function(t){var r=t.getAtRule();if(r){var o=i[r];o?o.push(t):i[r]=[t]}else s+=e.buildFromRule(t,l,n)}),i){var u="";i[c].forEach(function(t){return u+=e.buildFromRule(t,l,n)}),u&&(s+=c+"{"+u+"}")}o&&a&&t.remove(l)}(),s},buildFromRule:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="",o=t.selectorsToString({skipAdd:1}),s=t.get("selectorsAdd"),a=t.get("singleAtRule"),l=void 0;if(t.get("selectors").each(function(t){var e=t.getFullName();(n.compCls.indexOf(e)>=0||n.ids.indexOf(e)>=0||i.keepUnusedStyles)&&(l=1)}),o&&l||s||a){var c=t.getDeclaration();c&&(r+=c)}else e.push(t);return r}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Model.extend({build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.get("components");return e.exportWrapper?e.wrappesIsBody?""+this.buildModels(n)+"":t.toHTML():this.buildModels(n)},buildModels:function(t){var e="";return t.each(function(t){e+=t.toHTML()}),e}})},function(t,e,n){"use strict";t.exports={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(1);t.exports=function(){var t={},e=n(196),r=n(195),o=n(194),s=n(193),a=n(192),l=n(191),c=n(186),u={},h={},d={},f={};return{getConfig:function(){return t},config:t,EditorView:c,name:"CodeManager",init:function(n){for(var i in t=n||{},e)i in t||(t[i]=e[i]);var c=t.pStylePrefix;return c&&(t.stylePrefix=c+t.stylePrefix),h.html=new r,h.css=new o,h.json=new s,h.js=new a,f.CodeMirror=new l,this.loadDefaultGenerators().loadDefaultViewers(),this},addGenerator:function(t,e){return u[t]=e,this},getGenerator:function(t){return u[t]||null},getGenerators:function(){return u},addViewer:function(t,e){return d[t]=e,this},getViewer:function(t){return d[t]||null},getViewers:function(){return d},createViewer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(0,i.isUndefined)(t.type)?"CodeMirror":t.type,n=this.getViewer(e)&&this.getViewer(e).clone(),r=document.createElement("div"),o=document.createElement("textarea");return r.appendChild(o),n.set(t),n.init(o),n.setElement(r),n},updateViewer:function(t,e){t.setContent(e)},getCode:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.em=t.em;var r=this.getGenerator(n);return r?r.build(e,i):""},loadDefaultGenerators:function(){for(var t in h)this.addGenerator(t,h[t]);return this},loadDefaultViewers:function(){for(var t in f)this.addViewer(t,f[t]);return this}}}},function(t,e,n){"use strict";t.exports=n(0).View.extend({template:function(t){var e=t.pfx,n=t.ppfx,i=t.content;return'
\n
\n
'+t.title+'
\n
\n
\n
\n
'+i+'
\n
\n
\n
\n '},events:{click:"onClick","click [data-close-modal]":"hide"},initialize:function(t){var e=this.model,n=t.config||{},i=n.stylePrefix||"";this.config=n,this.pfx=i,this.ppfx=n.pStylePrefix||"",this.listenTo(e,"change:open",this.updateOpen),this.listenTo(e,"change:title",this.updateTitle),this.listenTo(e,"change:content",this.updateContent)},onClick:function(t){this.config.backdrop&&t.target===this.el&&this.hide()},getCollector:function(){return this.$collector||(this.$collector=this.$el.find("."+this.pfx+"collector")),this.$collector},getContent:function(){var t=this.pfx;return this.$content||(this.$content=this.$el.find("."+t+"content #"+t+"c")),this.$content},getTitle:function(){return this.$title||(this.$title=this.$el.find("."+this.pfx+"title")),this.$title.get(0)},updateContent:function(){var t=this.getContent(),e=t.children(),n=this.getCollector(),i=this.model.get("content");e.length&&n.append(e),t.empty().append(i)},updateTitle:function(){var t=this.getTitle();t&&(t.innerHTML=this.model.get("title"))},updateOpen:function(){this.el.style.display=this.model.get("open")?"":"none"},hide:function(){this.model.set("open",0)},show:function(){this.model.set("open",1)},render:function(){var t=this.$el,e=this.pfx,n=(this.ppfx,this.model.toJSON());return n.pfx=this.pfx,n.ppfx=this.ppfx,t.html(this.template(n)),t.attr("class",e+"container"),this.updateOpen(),this}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{title:"",content:"",open:!1}})},function(t,e,n){"use strict";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(200),o=n(199),s=n(198);return{name:"Modal",init:function(n){for(var a in i=n||{},r)a in i||(i[a]=r[a]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new o(i),e=new s({model:t,config:i}),this},postRender:function(t){var e=t.model.getConfig().el||t.el;this.render().appendTo(e)},open:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.title&&this.setTitle(t.title),t.content&&this.setContent(t.content),e.show(),this},close:function(){return e.hide(),this},isOpen:function(){return!!t.get("open")},setTitle:function(e){return t.set("title",e),this},getTitle:function(){return t.get("title")},setContent:function(e){return t.set("content"," "),t.set("content",e),this},getContent:function(){return t.get("content")},getContentEl:function(){return e.getContent().get(0)},getModel:function(){return t},render:function(){return e.render().$el}}}},function(t,e,n){"use strict";var i=n(10);t.exports=n(0).View.extend({template:function(){var t=this.pfx;this.ppfx;return'\n \n '+(this.model.get("label")||"")+'\n \n ⨯\n \n '},events:{"click [data-tag-remove]":"removeTag","click [data-tag-status]":"changeStatus","dblclick [data-tag-name]":"startEditTag","focusout [data-tag-name]":"endEditTag"},initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=this.config.em,this.listenTo(this.model,"change:active",this.updateStatus)},getInputEl:function(){return this.inputEl||(this.inputEl=this.el.querySelector("[data-tag-name]")),this.inputEl},startEditTag:function(){var t=this.getInputEl();t.contentEditable=!0,t.focus()},endEditTag:function(){var t=this.model,e=this.getInputEl(),n=e.textContent,r=i.escapeName(n),o=this.target,s=o&&o.get("SelectorManager");e.contentEditable=!1,s&&(s.get(r)?e.innerText=t.get("label"):t.set({name:r,label:n}))},changeStatus:function(){this.model.set("active",!this.model.get("active"))},removeTag:function(t){var e=this,n=this.target,i=this.model,r=this.coll,o=(this.el,n&&n.getSelected());o&&(o.get,o.get("classes").remove(i)),r&&r.remove(i),setTimeout(function(){return e.remove()},0)},updateStatus:function(){var t="fa-check-square-o";this.$chk||(this.$chk=this.$el.find("#"+this.pfx+"checkbox")),this.model.get("active")?(this.$chk.removeClass("fa-square-o").addClass(t),this.$el.removeClass("opac50")):(this.$chk.removeClass(t).addClass("fa-square-o"),this.$el.addClass("opac50"))},render:function(){var t=this.pfx,e=this.ppfx;return this.$el.html(this.template()),this.$el.attr("class",t+"tag "+e+"three-bg"),this.updateStatus(),this}})},function(t,e,n){"use strict";var i=o(n(1)),r=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var s=n(202);t.exports=r.default.View.extend({template:i.default.template('\n
\n
<%= label %>
\n
\n \n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
<%= selectedLabel %>
\n
\n
\n
'),events:{},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.className=this.pfx+"tags",this.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.em=this.target,this.listenTo(this.target,"component:toggled",this.componentChanged),this.listenTo(this.target,"component:update:classes",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(t){this.updateStateVis()},getStateOptions:function(){for(var t="",e=0;e'+this.states[e].label+"";return t},addNew:function(t){this.addToClasses(t)},startNewTag:function(t){this.$addBtn.get(0).style.display="none",this.$input.show().focus()},endNewTag:function(t){this.$addBtn.get(0).style.display="",this.$input.hide().val("")},onInputKeyUp:function(t){13===t.keyCode?this.addNewTag(this.$input.val()):27===t.keyCode&&this.endNewTag()},componentChanged:function(t){this.compTarget=this.target.getSelected();var e=this.compTarget,n=[];e&&(this.getStates().val(e.get("state")),n=e.get("classes").getValid()),this.collection.reset(n),this.updateStateVis()},updateStateVis:function(){var t=this.em,e=t&&t.getConfig("avoidInlineStyle");this.collection.length||e?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.getSelected();if(this.compTarget=t,t&&t.get){var e=t.get("state"),n=this.collection,i=n.getFullString(n.getStyleable());i=i||"#"+t.getId(),i+=e?":"+e:"";var r=this.el.querySelector("#"+this.pfx+"sel");r&&(r.innerHTML=i)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager").add({label:t});if(n){var r=n.get("classes");r.length;r.add(i);r.length;this.collection.add(i),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new s({model:t,config:this.config,coll:this.collection}).render().el;return n?n.appendChild(i):this.getClasses().append(i),i},renderClasses:function(){var t=document.createDocumentFragment();return this.collection.each(function(e){this.addToClasses(e,t)},this),this.getClasses()&&this.getClasses().empty().append(t),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(){var t=this.ppfx,e=this.config,n=this.$el;return n.html(this.template({selectedLabel:e.selectedLabel,statesLabel:e.statesLabel,label:e.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=n.find("input#"+this.newInputId),this.$addBtn=n.find("#"+this.addBtnId),this.$classes=n.find("#"+this.pfx+"tags-c"),this.$states=n.find("#"+this.stateInputId),this.$statesC=n.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),n.attr("class",this.className+" "+t+"one-bg "+t+"two-color"),this}})},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",appendTo:"",selectors:[],label:"Classes",statesLabel:"- State -",selectedLabel:"Selected",states:[{name:"hover",label:"Hover"},{name:"active",label:"Click"},{name:"nth-of-type(2n)",label:"Even/Odd"}]}},function(t,e,n){"use strict";var i=n(1),r=function(t){return(0,i.isString)(t)&&"#"==t[0]};t.exports=function(t){var e,o,s=t||{},a=n(204),l=n(10),c=n(19),u=n(203);return{Selector:l,Selectors:c,name:"SelectorManager",getConfig:function(){return s},init:function(t){for(var n in s=t||{},a)n in s||(s[n]=a[n]);var i=s.em,r=s.pStylePrefix;return r&&(s.stylePrefix=r+s.stylePrefix),o=new u({collection:new c([],{em:i,config:s}),config:s}),(e=new c(s.selectors)).on("add",function(t){return i.trigger("selector:add",t)}),this},postRender:function(){var t=this.getConfig().appendTo;t&&((0,i.isElement)(t)?t:document.querySelector(t)).appendChild(this.render([]))},add:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.isObject)(t)?n=t:n.name=t,r(n.name)&&(n.name=n.name.substr(1),n.type=l.TYPE_ID),n.label&&!n.name&&(n.name=l.escapeName(n.label));var o=n.name,s=o?this.get(o,n.type):e.where(n)[0];return s||e.add(n)},addClass:function(t){var n=[];return(0,i.isString)(t)&&(t=t.trim().split(" ")),t.forEach(function(t){return n.push(e.add({name:t}))}),n},get:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.TYPE_CLASS;return r(t)&&(t=t.substr(1),n=l.TYPE_ID),e.where({name:t,type:n})[0]},getAll:function(){return e},render:function(t){return t?new u({collection:new c(t),config:s}).render().el:o.render().el}}}},function(t,e,n){"use strict";var i={4:"media",5:"font-face",6:"page",7:"keyframes",11:"counter-style",12:"supports",13:"document",14:"font-feature-values",15:"viewport"},r=(0,n(1).keys)(i),o=["5","6","11","15"];t.exports=function(t){return{parseSelector:function(){for(var t=[],e=[],n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),i=0,r=n.length;i=0;if(p)u=1,h=i[c],d=this.parseCondition(l);else if(r.indexOf(c)>=0){var g=this.parseNode(l);d=this.parseCondition(l);for(var v=0,m=g.length;v<%= deviceLabel %>\n
\n \n \n \n
\n
\n
\n
\n '),events:{change:"updateDevice"},initialize:function(t){this.config=t.config||{},this.em=this.config.em,this.ppfx=this.config.pStylePrefix||"",this.events["click ."+this.ppfx+"add-trasp"]=this.startAdd,this.listenTo(this.em,"change:device",this.updateSelect),this.delegateEvents()},startAdd:function(){},updateDevice:function(){var t=this.em;if(t){var e=this.devicesEl,n=e?e.val():"";t.set("device",n)}},updateSelect:function(){var t=this.em,e=this.devicesEl;if(t&&t.getDeviceModel&&e){var n=t.getDeviceModel(),i=n?n.get("name"):"";e.val(i)}},getOptions:function(){var t="";return this.collection.each(function(e){var n=e.get("name");t+='"}),t},render:function(){var t=this.ppfx;return this.$el.html(this.template({ppfx:t,deviceLabel:this.config.deviceLabel})),this.devicesEl=this.$el.find("."+t+"devices"),this.devicesEl.append(this.getOptions()),this.el.className=t+"devices-c",this}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));t.exports=i.default.Model.extend({idAttribute:"name",defaults:{name:"",width:"",height:"",widthMedia:null},initialize:function(){null==this.get("widthMedia")&&this.set("widthMedia",this.get("width"))}})},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0));var r=n(210);t.exports=i.default.Collection.extend({model:r})},function(t,e,n){"use strict";t.exports={devices:[],deviceLabel:"Device"}},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(212),o=n(211),s=n(209);return{name:"DeviceManager",init:function(n){for(var a in i=n||{},r)a in i||(i[a]=r[a]);return t=new o(i.devices),e=new s({collection:t,config:i}),this},add:function(e,n,i){var r=i||{};return r.name=e,r.width=n,t.add(r)},get:function(e){return t.get(e)},getAll:function(){return t},render:function(){return e.render().el}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){return e.reject(n)})})}},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var l,c=[],u=!1,h=-1;function d(){u&&l&&(u=!1,l.length?c=l.concat(c):h=-1,c.length&&f())}function f(){if(!u){var t=a(d);u=!0;for(var e=c.length;e;){for(l=c,c=[];++h1)for(var n=1;n=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(216),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(11))},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t){return t&&t.__esModule?t:{default:t}}(n(214));var o=setTimeout;function s(){}function a(t){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],d(t,this)}function l(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,a._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var i;try{i=n(t._value)}catch(t){return void u(e.promise,t)}c(e.promise,i)}else(1===t._state?c:u)(e.promise,t._value)})):t._deferreds.push(e)}function c(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===(void 0===e?"undefined":i(e))||"function"==typeof e)){var n=e.then;if(e instanceof a)return t._state=3,t._value=e,void h(t);if("function"==typeof n)return void d(function(t,e){return function(){t.apply(e,arguments)}}(n,e),t)}t._state=1,t._value=e,h(t)}catch(e){u(t,e)}}function u(t,e){t._state=2,t._value=e,h(t)}function h(t){2===t._state&&0===t._deferreds.length&&a._immediateFn(function(){t._handled||a._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e1&&void 0!==arguments[1]?arguments[1]:{},n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.get("contentTypeJson"),a=this.get("headers")||{},l=this.get("params"),c=e.body||{},u=void 0,h=void 0;for(var d in l)c[d]=l[d];if((0,r.isUndefined)(a["X-Requested-With"])&&(a["X-Requested-With"]="XMLHttpRequest"),(0,r.isUndefined)(a["Content-Type"])&&s&&(a["Content-Type"]="application/json; charset=utf-8"),s)h=JSON.stringify(c);else for(var f in h=new FormData,c)h.append(f,c[f]);"post"===(u={method:e.method||"post",credentials:"include",headers:a}).method&&(u.body=h),this.onStart(),this.fetch(t,u).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})}).then(function(t){return n.onResponse(t,i)}).catch(function(t){return n.onError(t,o)})}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{checkLocal:!0},store:function(t,e){for(var n in this.checkStorageEnvironment(),t)localStorage.setItem(n,t[n]);"function"==typeof e&&e()},load:function(t,e){this.checkStorageEnvironment();for(var n={},i=0,r=t.length;it.maximumStackLength&&(t.shift(),t.pointer--)}}}function h(){}function d(e,n,i,o){if("object"==typeof n)return t.each(n,function(t,n){2===e?d(e,t,i,o):d(e,n,t,i)});switch(e){case 0:r(i,"undo","redo","on")&&t.all(t.pick(i,"undo","redo","on"),t.isFunction)&&(o[n]=i);break;case 1:o[n]&&t.isObject(i)&&(o[n]=t.extend({},o[n],i));break;case 2:delete o[n]}return this}var f=Array.prototype.slice,p=function(){function e(){i++,n=!0,t.defer(function(){n=!1})}var n=!1,i=-1;return function(){return n||e(),i}}();o.prototype={isRegistered:function(e){return e&&e.cid?this.registeredObjects[e.cid]:t.contains(this.registeredObjects,e)},register:function(t){return!this.isRegistered(t)&&(t&&t.cid?(this.registeredObjects[t.cid]=t,this.cidIndexes.push(t.cid)):this.registeredObjects.push(t),!0)},unregister:function(e){if(this.isRegistered(e)){if(e&&e.cid)delete this.registeredObjects[e.cid],this.cidIndexes.splice(t.indexOf(this.cidIndexes,e.cid),1);else{var n=t.indexOf(this.registeredObjects,e);this.registeredObjects.splice(n,1)}return!0}return!1},get:function(){return t.map(this.cidIndexes,function(t){return this.registeredObjects[t]},this).concat(this.registeredObjects)}};var g={add:{undo:function(t,e,n,i){t.remove(n,i)},redo:function(t,e,n,i){i.index&&(i.at=i.index),t.add(n,i)},on:function(e,n,i){return{object:n,before:void 0,after:e,options:t.clone(i)}}},remove:{undo:function(t,e,n,i){"index"in i&&(i.at=i.index),t.add(e,i)},redo:function(t,e,n,i){t.remove(e,i)},on:function(e,n,i){return{object:n,before:e,after:void 0,options:t.clone(i)}}},change:{undo:function(e,n,i,r){t.isEmpty(n)?t.each(t.keys(i),e.unset,e):(e.set(n),r&&r.unsetData&&r.unsetData.before&&r.unsetData.before.length&&t.each(r.unsetData.before,e.unset,e))},redo:function(e,n,i,r){t.isEmpty(i)?t.each(t.keys(n),e.unset,e):(e.set(i),r&&r.unsetData&&r.unsetData.after&&r.unsetData.after.length&&t.each(r.unsetData.after,e.unset,e))},on:function(e,n){var i=e.changedAttributes(),r=t.keys(i),o=t.pick(e.previousAttributes(),r),s=t.keys(o),a=(n||(n={})).unsetData={after:[],before:[]};return r.length!=s.length&&(r.length>s.length?t.each(r,function(t){t in o||a.before.push(t)},this):t.each(s,function(t){t in i||a.after.push(t)})),{object:e,before:o,after:i,options:t.clone(n)}}},reset:{undo:function(t,e,n){t.reset(e)},redo:function(t,e,n){t.reset(n)},on:function(e,n){return{object:e,before:n.previousModels,after:t.clone(e.models)}}}};h.prototype=g;var v=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){a("undo",this.attributes)},redo:function(t){a("redo",this.attributes)}}),m=e.Collection.extend({model:v,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(t){this.maximumStackLength=t}}),y=e.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(e){this.stack=new m,this.objectRegistry=new o,this.undoTypes=new h,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",function(t,e){this.stack.setMaxLength(e)},this),e&&e.track&&this.startTracking(),e&&e.register&&(t.isArray(e.register)||t.isArguments(e.register)?n(this.register,this,e.register):this.register(e.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")},_addToStack:function(t){u(this.stack,t,i(arguments,1),this.undoTypes)},register:function(){s("on",arguments,this._addToStack,this)},unregister:function(){s("off",arguments,this._addToStack,this)},unregisterAll:function(){n(this.unregister,this,this.objectRegistry.get())},undo:function(t){l("undo",this,this.stack,t)},undoAll:function(){l("undo",this,this.stack,!1,!0)},redo:function(t){l("redo",this,this.stack,t)},redoAll:function(){l("redo",this,this.stack,!1,!0)},isAvailable:function(t){var e=this.stack,n=e.length;switch(t){case"undo":return n>0&&e.pointer>-1;case"redo":return n>0&&e.pointer1&&void 0!==arguments[1]?arguments[1]:{},n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.get("contentTypeJson"),a=this.get("headers")||{},l=this.get("params"),c=e.body||{},u=void 0,h=void 0;for(var d in l)c[d]=l[d];if((0,o.isUndefined)(a["X-Requested-With"])&&(a["X-Requested-With"]="XMLHttpRequest"),(0,o.isUndefined)(a["Content-Type"])&&s&&(a["Content-Type"]="application/json; charset=utf-8"),s)h=JSON.stringify(c);else{h=new FormData;for(var f in c)h.append(f,c[f])}u={method:e.method||"post",credentials:"include",headers:a},"post"===u.method&&(u.body=h),this.onStart(),this.fetch(t,u).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})}).then(function(t){return n.onResponse(t,i)}).catch(function(t){return n.onError(t,r)})}})},function(t,e,n){"use strict";(function(t){function i(){}function r(t,e){return function(){t.apply(e,arguments)}}function o(t){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:l)(e.promise,t._value);var i;try{i=n(t._value)}catch(t){return void l(e.promise,t)}a(e.promise,i)})}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===(void 0===e?"undefined":d(e))||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(r(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(79),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,n(7))},function(t,e,n){(function(t,e){!function(t,n){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n<%= deviceLabel %>\n
\n \n \n \n
\n
\n
\n
\n '),events:{change:"updateDevice"},initialize:function(t){this.config=t.config||{},this.em=this.config.em,this.ppfx=this.config.pStylePrefix||"",this.events["click ."+this.ppfx+"add-trasp"]=this.startAdd,this.listenTo(this.em,"change:device",this.updateSelect),this.delegateEvents()},startAdd:function(){},updateDevice:function(){var t=this.em;if(t){var e=this.devicesEl,n=e?e.val():"";t.set("device",n)}},updateSelect:function(){var t=this.em,e=this.devicesEl;if(t&&t.getDeviceModel&&e){var n=t.getDeviceModel(),i=n?n.get("name"):"";e.val(i)}},getOptions:function(){var t="";return this.collection.each(function(e){var n=e.get("name");t+='"}),t},render:function(){var t=this.ppfx;return this.$el.html(this.template({ppfx:t,deviceLabel:this.config.deviceLabel})),this.devicesEl=this.$el.find("."+t+"devices"),this.devicesEl.append(this.getOptions()),this.el.className=t+"devices-c",this}})},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(88),o=n(89),s=n(27);return{compTypes:"",name:"Parser",init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);return t=new s(i),e=new o(i),this},parseHtml:function(n){return t.compTypes=this.compTypes,t.parse(n,e)},parseCss:function(t){return e.parse(t)}}}},function(t,e,n){"use strict";t.exports={textTags:["br","b","i","u","a","ul","ol"]}},function(t,e,n){"use strict";var i=n(1),r={4:"media",5:"font-face",6:"page",7:"keyframes",11:"counter-style",12:"supports",13:"document",14:"font-feature-values",15:"viewport"},o=(0,i.keys)(r),s=["5","6","11","15"];t.exports=function(t){return{parseSelector:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=[],n=[],i=t.split(","),r=0,o=i.length;r=0;if(p)u=1,h=r[c],d=this.parseCondition(l);else if(o.indexOf(c)>=0){var g=this.parseNode(l);d=this.parseCondition(l);for(var v=0,m=g.length;v1&&void 0!==arguments[1]?arguments[1]:{};(0,r.isObject)(t)?e=t:e.name=t,o(e.name)&&(e.name=e.name.substr(1),e.type=u.TYPE_ID),e.label&&!e.name&&(e.name=u.escapeName(e.label));var n=e.name,i=n?this.get(n,e.type):s.where(e)[0];return i||s.add(e)}),i(e,"addClass",function(t){var e=[];return(0,r.isString)(t)&&(t=t.trim().split(" ")),t.forEach(function(t){return e.push(s.add({name:t}))}),e}),i(e,"get",function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.TYPE_CLASS;return o(t)&&(t=t.substr(1),e=u.TYPE_ID),s.where({name:t,type:e})[0]}),i(e,"getAll",function(){return s}),i(e,"render",function(t){if(t){return new d({collection:new h(t),config:l}).render().el}return a.render().el}),e}},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",appendTo:"",selectors:[],label:"Classes",statesLabel:"- State -",selectedLabel:"Selected",states:[{name:"hover",label:"Hover"},{name:"active",label:"Click"},{name:"nth-of-type(2n)",label:"Even/Odd"}]}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(1),o=i(r),s=n(0),a=i(s),l=n(93);t.exports=a.default.View.extend({template:o.default.template('\n
\n
<%= label %>
\n
\n \n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
<%= selectedLabel %>
\n
\n
\n
'),events:{},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.className=this.pfx+"tags",this.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.em=this.target,this.listenTo(this.target,"component:toggled",this.componentChanged),this.listenTo(this.target,"component:update:classes",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(t){this.updateStateVis()},getStateOptions:function(){for(var t="",e=0;e'+this.states[e].label+"";return t},addNew:function(t){this.addToClasses(t)},startNewTag:function(t){this.$addBtn.get(0).style.display="none",this.$input.show().focus()},endNewTag:function(t){this.$addBtn.get(0).style.display="",this.$input.hide().val("")},onInputKeyUp:function(t){13===t.keyCode?this.addNewTag(this.$input.val()):27===t.keyCode&&this.endNewTag()},componentChanged:function(t){this.compTarget=this.target.getSelected();var e=this.compTarget,n=[];e&&(this.getStates().val(e.get("state")),n=e.get("classes").getValid()),this.collection.reset(n),this.updateStateVis()},updateStateVis:function(){var t=this.em,e=t&&t.getConfig("avoidInlineStyle");this.collection.length||e?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.getSelected();if(this.compTarget=t,t&&t.get){var e=t.get("state"),n=this.collection,i=n.getFullString(n.getStyleable());i=i||"#"+t.getId(),i+=e?":"+e:"";var r=this.el.querySelector("#"+this.pfx+"sel");r&&(r.innerHTML=i)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager"),r=i.add({label:t});if(n){var o=n.get("classes");o.length;o.add(r);o.length;this.collection.add(r),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new l({model:t,config:this.config,coll:this.collection}),r=i.render().el;return n?n.appendChild(r):this.getClasses().append(r),r},renderClasses:function(){var t=document.createDocumentFragment();return this.collection.each(function(e){this.addToClasses(e,t)},this),this.getClasses()&&this.getClasses().empty().append(t),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(){var t=this.ppfx,e=this.config,n=this.$el;return n.html(this.template({selectedLabel:e.selectedLabel,statesLabel:e.statesLabel,label:e.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=n.find("input#"+this.newInputId),this.$addBtn=n.find("#"+this.addBtnId),this.$classes=n.find("#"+this.pfx+"tags-c"),this.$states=n.find("#"+this.stateInputId),this.$statesC=n.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),n.attr("class",this.className+" "+t+"one-bg "+t+"two-color"),this}})},function(t,e,n){"use strict";var i=n(8);t.exports=n(0).View.extend({template:function(){var t=this.pfx;this.ppfx;return'\n \n '+(this.model.get("label")||"")+'\n \n ⨯\n \n '},events:{"click [data-tag-remove]":"removeTag","click [data-tag-status]":"changeStatus","dblclick [data-tag-name]":"startEditTag","focusout [data-tag-name]":"endEditTag"},initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=this.config.em,this.listenTo(this.model,"change:active",this.updateStatus)},getInputEl:function(){return this.inputEl||(this.inputEl=this.el.querySelector("[data-tag-name]")),this.inputEl},startEditTag:function(){var t=this.getInputEl();t.contentEditable=!0,t.focus()},endEditTag:function(){var t=this.model,e=this.getInputEl(),n=e.textContent,r=i.escapeName(n),o=this.target,s=o&&o.get("SelectorManager");e.contentEditable=!1,s&&(s.get(r)?e.innerText=t.get("label"):t.set({name:r,label:n}))},changeStatus:function(){this.model.set("active",!this.model.get("active"))},removeTag:function(t){var e=this,n=this.target,i=this.model,r=this.coll,o=(this.el,n&&n.getSelected());o&&(o.get,o.get("classes").remove(i)),r&&r.remove(i),setTimeout(function(){return e.remove()},0)},updateStatus:function(){var t="fa-check-square-o";this.$chk||(this.$chk=this.$el.find("#"+this.pfx+"checkbox")),this.model.get("active")?(this.$chk.removeClass("fa-square-o").addClass(t),this.$el.removeClass("opac50")):(this.$chk.removeClass(t).addClass("fa-square-o"),this.$el.addClass("opac50"))},render:function(){var t=this.pfx,e=this.ppfx;return this.$el.html(this.template()),this.$el.attr("class",t+"tag "+e+"three-bg"),this.updateStatus(),this}})},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(95),o=n(96),s=n(97);return{name:"Modal",init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new o(i),e=new s({model:t,config:i}),this},postRender:function(t){var e=t.model.getConfig().el||t.el;this.render().appendTo(e)},open:function(){return e.show(),this},close:function(){return e.hide(),this},isOpen:function(){return!!t.get("open")},setTitle:function(e){return t.set("title",e),this},getTitle:function(){return t.get("title")},setContent:function(e){return t.set("content"," "),t.set("content",e),this},getContent:function(){return t.get("content")},getContentEl:function(){return e.getContent().get(0)},getModel:function(){return t},render:function(){return e.render().$el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{title:"",content:"",open:!1}})},function(t,e,n){"use strict";t.exports=n(0).View.extend({template:function(t){var e=t.pfx,n=t.ppfx,i=t.content;return'
\n
\n
'+t.title+'
\n
\n
\n
\n
'+i+'
\n
\n
\n
\n
\n '},events:{},initialize:function(t){var e=this.model,n=t.config||{},i=n.stylePrefix||"",r=n.backdrop;this.config=n,this.pfx=i,this.ppfx=n.pStylePrefix||"",this.listenTo(e,"change:open",this.updateOpen),this.listenTo(e,"change:title",this.updateTitle),this.listenTo(e,"change:content",this.updateContent),this.events["click ."+i+"btn-close"]="hide",r&&(this.events["click ."+i+"backlayer"]="hide"),this.delegateEvents()},getCollector:function(){return this.$collector||(this.$collector=this.$el.find("."+this.pfx+"collector")),this.$collector},getContent:function(){var t=this.pfx;return this.$content||(this.$content=this.$el.find("."+t+"content #"+t+"c")),this.$content},getTitle:function(){return this.$title||(this.$title=this.$el.find("."+this.pfx+"title")),this.$title.get(0)},updateContent:function(){var t=this.getContent(),e=t.children(),n=this.getCollector(),i=this.model.get("content");e.length&&n.append(e),t.empty().append(i)},updateTitle:function(){var t=this.getTitle();t&&(t.innerHTML=this.model.get("title"))},updateOpen:function(){this.el.style.display=this.model.get("open")?"":"none"},hide:function(){this.model.set("open",0)},show:function(){this.model.set("open",1)},render:function(){var t=this.$el,e=this.pfx,n=(this.ppfx,this.model.toJSON());return n.pfx=this.pfx,n.ppfx=this.ppfx,t.html(this.template(n)),t.attr("class",e+"container"),this.updateOpen(),this}})},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(99),i=n(100),r=n(101),o=n(102),s=n(103),a=n(104),l=n(109),c={},u={},h={},d={};return{getConfig:function(){return t},config:t,EditorView:l,name:"CodeManager",init:function(n){t=n||{};for(var l in e)l in t||(t[l]=e[l]);var c=t.pStylePrefix;return c&&(t.stylePrefix=c+t.stylePrefix),u.html=new i,u.css=new r,u.json=new o,u.js=new s,d.CodeMirror=new a,this.loadDefaultGenerators().loadDefaultViewers(),this},addGenerator:function(t,e){return c[t]=e,this},getGenerator:function(t){return c[t]||null},getGenerators:function(){return c},addViewer:function(t,e){return h[t]=e,this},getViewer:function(t){return h[t]||null},getViewers:function(){return h},updateViewer:function(t,e){t.setContent(e)},getCode:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.em=t.em;var r=this.getGenerator(n);return r?r.build(e,i):""},loadDefaultGenerators:function(){for(var t in u)this.addGenerator(t,u[t]);return this},loadDefaultViewers:function(){for(var t in d)this.addViewer(t,d[t]);return this}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=r.default.Model.extend({build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.get("components");return e.exportWrapper?e.wrappesIsBody?""+this.buildModels(n)+"":t.toHTML():this.buildModels(n)},buildModels:function(t){var e="";return t.each(function(t){e+=t.toHTML()}),e}})},function(t,e,n){"use strict";var i=n(1);t.exports=n(0).Model.extend({initialize:function(){this.compCls=[],this.ids=[]},buildFromModel:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i="",r=this.em,o=r&&r.getConfig("avoidInlineStyle"),s=t.styleToString(),a=t.get("classes"),l=n.wrappesIsBody,c=t.get("wrapper");if(this.ids.push("#"+t.getId()),a.each(function(t){return e.compCls.push(t.getFullName())}),(!o||c)&&s){var u="#"+t.getId();u=l&&c?"body":u,i=u+"{"+s+"}"}return t.components().each(function(t){return i+=e.buildFromModel(t,n)}),i},build:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.cssc,o=n.em||"";this.em=o,this.compCls=[],this.ids=[];var s=this.buildFromModel(t,n),a=(0,i.isUndefined)(n.clearStyles)&&o?o.getConfig("clearStyles"):n.clearStyles;return r&&function(){var t=r.getAll(),i={},l=[];t.each(function(t){var r=t.getAtRule();if(r){var o=i[r];return void(o?o.push(t):i[r]=[t])}s+=e.buildFromRule(t,l,n)});for(var c in i){var u="";i[c].forEach(function(t){return u+=e.buildFromRule(t,l,n)}),u&&(s+=c+"{"+u+"}")}o&&a&&t.remove(l)}(),s},buildFromRule:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="",o=t.selectorsToString({skipAdd:1}),s=t.get("selectorsAdd"),a=t.get("singleAtRule"),l=void 0;if(t.get("selectors").each(function(t){var e=t.getFullName();(n.compCls.indexOf(e)>=0||n.ids.indexOf(e)>=0||i.keepUnusedStyles)&&(l=1)}),o&&l||s||a){var c=t.getDeclaration();c&&(r+=c)}else e.push(t);return r}})},function(t,e,n){"use strict";var i=n(1),r=n(0),o=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=o.default.Model.extend({build:function(t){var e=t.toJSON();return this.beforeEach(e),(0,i.each)(e,function(t,n){var i=e[n];if(i instanceof o.default.Model)e[n]=this.build(i);else if(i instanceof o.default.Collection){var r=i;e[n]=[],r.length&&r.each(function(t,i){e[n][i]=this.build(t)},this)}},this),e},beforeEach:function(t){delete t.status}})},function(t,e,n){"use strict";var i=n(1),r=n(0),o=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=o.default.Model.extend({mapModel:function(t){var e="",n=t.get("script"),r=t.get("type"),o=t.get("components"),s=t.getId();if(n){var a=t.get("attributes");a=(0,i.extend)({},a,{id:s}),t.set("attributes",a);var l=t.getScriptString();if(t.get("scriptUpdated"))this.mapJs[r+"-"+s]={ids:[s],code:l};else{var c=this.mapJs[r];c?c.ids.push(s):this.mapJs[r]={ids:[s],code:l}}}return o.each(function(t){e+=this.mapModel(t)},this),e},build:function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var i=this.mapJs[n];e+="\n var items = document.querySelectorAll('"+("#"+i.ids.join(", #"))+"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){"+i.code+"}.bind(items[i]))();\n }"}return e}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}function n(t){var e=l[t];return e||(l[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var i=t.match(n(e));return i?/^\s*(.*?)\s*$/.exec(i[2])[1]:""}function r(t,e){return new RegExp((e?"^":"")+"","i")}function o(t,e){for(var n in t)for(var i=e[n]||(e[n]=[]),r=t[n],o=r.length-1;o>=0;o--)i.unshift(r[o])}function s(t,e){for(var n=0;n\s\/]/.test(i.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&d&&/>$/.test(i.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==i.current()&&s(u[f[1]],f[2]),g=t.getMode(n,p),v=r(f[1],!0),m=r(f[1],!1);o.token=function(t,n){return t.match(v,!1)?(n.token=l,n.localState=n.localMode=null,null):e(t,m,n.localMode.token(t,n.localState))},o.localMode=g,o.localState=t.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=i.current(),i.eol()&&(o.inTag+=" "));return h}var c=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag}),u={},h=i&&i.tags,d=i&&i.scriptTypes;if(o(a,u),h&&o(h,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:t.startState(c)}},copyState:function(e){var n;return e.localState&&(n=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:n,htmlState:t.copyState(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?c.indent(e.htmlState,n):e.localMode.indent?e.localMode.indent(e.localState,n,i):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(6))}(function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(c(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(E=t.eat("/")?"closeTag":"openTag",e.tokenize=s,"tag bracket");if("&"==i){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function s(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,E=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return E="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=s;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function c(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=c(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=c(t-1),n.tokenize(e,n)}}return"meta"}}function u(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?g:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),M="tag",y):k.allowMissingTagName&&"endTag"==t?(M="tag bracket",y(t,e,n)):(M="error",p)}function g(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===k.matchClosing?(M="tag",v):(M="tag error",m)}return k.allowMissingTagName&&"endTag"==t?(M="tag bracket",v(t,e,n)):(M="error",m)}function v(t,e,n){return"endTag"!=t?(M="error",v):(h(n),f)}function m(t,e,n){return M="error",v(t,e,n)}function y(t,e,n){if("word"==t)return M="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||k.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new u(n,i,r==n.indented)),f}return M="error",y}function b(t,e,n){return"equals"==t?x:(k.allowMissing||(M="error"),y(t,e,n))}function x(t,e,n){return"string"==t?w:"word"==t&&k.allowUnquoted?(M="string",y):(M="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var C=i.indentUnit,k={},S=r.htmlMode?e:n;for(var T in S)k[T]=S[T];for(var T in r)k[T]=r[T];var E,M;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;E=null;var n=e.tokenize(t,e);return(n||E)&&"comment"!=n&&(M=null,e.state=e.state(E||n,t,e),M&&(n="error"==M?n+" error":M)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+C;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=s&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==k.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+C*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(t){t.state==x&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(t,e,n){!function(t){t(n(6))}(function(t){"use strict";t.defineMode("javascript",function(e,n){function i(t){for(var e,n=!1,i=!1;null!=(e=t.next());){if(!n){if("/"==e&&!i)return;"["==e?i=!0:i&&"]"==e&&(i=!1)}n=!n&&"\\"==e}}function r(t,e,n){return zt=t,Ht=n,e}function o(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=s(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&t.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&t.eat(">"))return r("=>","operator");if("0"==n&&t.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return r("number","number");if(/\d/.test(n))return t.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),r("number","number");if("/"==n)return t.eat("*")?(e.tokenize=a,a(t,e)):t.eat("/")?(t.skipToEnd(),r("comment","comment")):Rt(t,e,1)?(i(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),r("regexp","string-2")):(t.eat("="),r("operator","operator",t.current()));if("`"==n)return e.tokenize=l,l(t,e);if("#"==n)return t.skipToEnd(),r("error","error");if(Kt.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=n&&"="!=n||t.eat("="):/[<>*+\-]/.test(n)&&(t.eat(n),">"==n&&t.eat(n))),r("operator","operator",t.current());if(Ut.test(n)){t.eatWhile(Ut);var o=t.current();if("."!=e.lastType){if(qt.propertyIsEnumerable(o)){var c=qt[o];return r(c.type,c.style,o)}if("async"==o&&t.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return r("async","keyword",o)}return r("variable","variable",o)}}function s(t){return function(e,n){var i,s=!1;if($t&&"@"==e.peek()&&e.match(Gt))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||s);)s=!s&&"\\"==i;return s||(n.tokenize=o),r("string","string")}}function a(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",t.current())}function c(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(Wt){var i=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));i&&(n=i.index)}for(var r=0,o=!1,s=n-1;s>=0;--s){var a=t.string.charAt(s),l=Yt.indexOf(a);if(l>=0&&l<3){if(!r){++s;break}if(0==--r){"("==a&&(o=!0);break}}else if(l>=3&&l<6)++r;else if(Ut.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}function u(t,e,n,i,r,o){this.indented=t,this.column=e,this.type=n,this.prev=r,this.info=o,null!=i&&(this.align=i)}function h(t,e){for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var i=t.context;i;i=i.prev)for(var n=i.vars;n;n=n.next)if(n.name==e)return!0}function d(t,e,n,i,r){var o=t.cc;for(Jt.state=t,Jt.stream=r,Jt.marked=null,Jt.cc=o,Jt.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():Bt?O:M)(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Jt.marked?Jt.marked:"variable"==n&&h(t,i)?"variable-2":e}}}function f(){for(var t=arguments.length-1;t>=0;t--)Jt.cc.push(arguments[t])}function p(){return f.apply(null,arguments),!0}function g(t,e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}function v(t){var e=Jt.state;if(Jt.marked="def",e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var i=m(t,e.context);if(null!=i)return void(e.context=i)}else if(!g(t,e.localVars))return void(e.localVars=new x(t,e.localVars));n.globalVars&&!g(t,e.globalVars)&&(e.globalVars=new x(t,e.globalVars))}function m(t,e){if(e){if(e.block){var n=m(t,e.prev);return n?n==e.prev?e:new b(n,e.vars,!0):null}return g(t,e.vars)?e:new b(e.prev,new x(t,e.vars),!1)}return null}function y(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function b(t,e,n){this.prev=t,this.vars=e,this.block=n}function x(t,e){this.name=t,this.next=e}function w(){Jt.state.context=new b(Jt.state.context,Jt.state.localVars,!1),Jt.state.localVars=Zt}function C(){Jt.state.context=new b(Jt.state.context,Jt.state.localVars,!0),Jt.state.localVars=null}function k(){Jt.state.localVars=Jt.state.context.vars,Jt.state.context=Jt.state.context.prev}function S(t,e){var n=function(){var n=Jt.state,i=n.indented;if("stat"==n.lexical.type)i=n.lexical.indented;else for(var r=n.lexical;r&&")"==r.type&&r.align;r=r.prev)i=r.indented;n.lexical=new u(i,Jt.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function T(){var t=Jt.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function E(t){function e(n){return n==t?p():";"==t?f():p(e)}return e}function M(t,e){return"var"==t?p(S("vardef",e),lt,E(";"),T):"keyword a"==t?p(S("form"),L,M,T):"keyword b"==t?p(S("form"),M,T):"keyword d"==t?Jt.stream.match(/^\s*$/,!1)?p():p(S("stat"),N,E(";"),T):"debugger"==t?p(E(";")):"{"==t?p(S("}"),C,X,T,k):";"==t?p():"if"==t?("else"==Jt.state.lexical.info&&Jt.state.cc[Jt.state.cc.length-1]==T&&Jt.state.cc.pop()(),p(S("form"),L,M,T,ft)):"function"==t?p(bt):"for"==t?p(S("form"),pt,M,T):"class"==t||Wt&&"interface"==e?(Jt.marked="keyword",p(S("form"),Ct,T)):"variable"==t?Wt&&"declare"==e?(Jt.marked="keyword",p(M)):Wt&&("module"==e||"enum"==e||"type"==e)&&Jt.stream.match(/^\s*\w/,!1)?(Jt.marked="keyword","enum"==e?p(Dt):"type"==e?p(tt,E("operator"),tt,E(";")):p(S("form"),ct,E("{"),S("}"),X,T,T)):Wt&&"namespace"==e?(Jt.marked="keyword",p(S("form"),O,X,T)):Wt&&"abstract"==e?(Jt.marked="keyword",p(M)):p(S("stat"),B):"switch"==t?p(S("form"),L,E("{"),S("}","switch"),C,X,T,T,k):"case"==t?p(O,E(":")):"default"==t?p(E(":")):"catch"==t?p(S("form"),w,A,M,T,k):"export"==t?p(S("stat"),Et,T):"import"==t?p(S("stat"),At,T):"async"==t?p(M):"@"==e?p(O,M):f(S("stat"),O,E(";"),T)}function A(t){if("("==t)return p(xt,E(")"))}function O(t,e){return _(t,e,!1)}function P(t,e){return _(t,e,!0)}function L(t){return"("!=t?f():p(S(")"),O,E(")"),T)}function _(t,e,n){if(Jt.state.fatArrowAt==Jt.stream.start){var i=n?H:z;if("("==t)return p(w,S(")"),G(xt,")"),T,E("=>"),i,k);if("variable"==t)return f(w,ct,E("=>"),i,k)}var r=n?I:D;return Xt.hasOwnProperty(t)?p(r):"function"==t?p(bt,r):"class"==t||Wt&&"interface"==e?(Jt.marked="keyword",p(S("form"),wt,T)):"keyword c"==t||"async"==t?p(n?P:O):"("==t?p(S(")"),N,E(")"),T,r):"operator"==t||"spread"==t?p(n?P:O):"["==t?p(S("]"),Nt,T,r):"{"==t?Y(U,"}",null,r):"quasi"==t?f(F,r):"new"==t?p(V(n)):"import"==t?p(O):p()}function N(t){return t.match(/[;\}\)\],]/)?f():f(O)}function D(t,e){return","==t?p(O):I(t,e,!1)}function I(t,e,n){var i=0==n?D:I,r=0==n?O:P;return"=>"==t?p(w,n?H:z,k):"operator"==t?/\+\+|--/.test(e)||Wt&&"!"==e?p(i):Wt&&"<"==e&&Jt.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?p(S(">"),G(tt,">"),T,i):"?"==e?p(O,E(":"),r):p(r):"quasi"==t?f(F,i):";"!=t?"("==t?Y(P,")","call",i):"."==t?p(W,i):"["==t?p(S("]"),N,E("]"),T,i):Wt&&"as"==e?(Jt.marked="keyword",p(tt,i)):"regexp"==t?(Jt.state.lastType=Jt.marked="operator",Jt.stream.backUp(Jt.stream.pos-Jt.stream.start-1),p(r)):void 0:void 0}function F(t,e){return"quasi"!=t?f():"${"!=e.slice(e.length-2)?p(F):p(O,R)}function R(t){if("}"==t)return Jt.marked="string-2",Jt.state.tokenize=l,p(F)}function z(t){return c(Jt.stream,Jt.state),f("{"==t?M:O)}function H(t){return c(Jt.stream,Jt.state),f("{"==t?M:P)}function V(t){return function(e){return"."==e?p(t?$:j):"variable"==e&&Wt?p(ot,t?I:D):f(t?P:O)}}function j(t,e){if("target"==e)return Jt.marked="keyword",p(D)}function $(t,e){if("target"==e)return Jt.marked="keyword",p(I)}function B(t){return":"==t?p(T,M):f(D,E(";"),T)}function W(t){if("variable"==t)return Jt.marked="property",p()}function U(t,e){if("async"==t)return Jt.marked="property",p(U);if("variable"==t||"keyword"==Jt.style){if(Jt.marked="property","get"==e||"set"==e)return p(q);var n;return Wt&&Jt.state.fatArrowAt==Jt.stream.start&&(n=Jt.stream.match(/^\s*:\s*/,!1))&&(Jt.state.fatArrowAt=Jt.stream.pos+n[0].length),p(K)}return"number"==t||"string"==t?(Jt.marked=$t?"property":Jt.style+" property",p(K)):"jsonld-keyword"==t?p(K):Wt&&y(e)?(Jt.marked="keyword",p(U)):"["==t?p(O,J,E("]"),K):"spread"==t?p(P,K):"*"==e?(Jt.marked="keyword",p(U)):":"==t?f(K):void 0}function q(t){return"variable"!=t?f(K):(Jt.marked="property",p(bt))}function K(t){return":"==t?p(P):"("==t?f(bt):void 0}function G(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=Jt.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),p(function(n,i){return n==e||i==e?f():f(t)},i)}return r==e||o==e?p():p(E(e))}return function(n,r){return n==e||r==e?p():f(t,i)}}function Y(t,e,n){for(var i=3;i"),tt):void 0}function et(t){if("=>"==t)return p(tt)}function nt(t,e){return"variable"==t||"keyword"==Jt.style?(Jt.marked="property",p(nt)):"?"==e?p(nt):":"==t?p(tt):"["==t?p(O,J,E("]"),nt):void 0}function it(t,e){return"variable"==t&&Jt.stream.match(/^\s*[?:]/,!1)||"?"==e?p(it):":"==t?p(tt):f(tt)}function rt(t,e){return"<"==e?p(S(">"),G(tt,">"),T,rt):"|"==e||"."==t||"&"==e?p(tt):"["==t?p(E("]"),rt):"extends"==e||"implements"==e?(Jt.marked="keyword",p(tt)):void 0}function ot(t,e){if("<"==e)return p(S(">"),G(tt,">"),T,rt)}function st(){return f(tt,at)}function at(t,e){if("="==e)return p(tt)}function lt(t,e){return"enum"==e?(Jt.marked="keyword",p(Dt)):f(ct,J,ht,dt)}function ct(t,e){return Wt&&y(e)?(Jt.marked="keyword",p(ct)):"variable"==t?(v(e),p()):"spread"==t?p(ct):"["==t?Y(ct,"]"):"{"==t?Y(ut,"}"):void 0}function ut(t,e){return"variable"!=t||Jt.stream.match(/^\s*:/,!1)?("variable"==t&&(Jt.marked="property"),"spread"==t?p(ct):"}"==t?f():p(E(":"),ct,ht)):(v(e),p(ht))}function ht(t,e){if("="==e)return p(P)}function dt(t){if(","==t)return p(lt)}function ft(t,e){if("keyword b"==t&&"else"==e)return p(S("form","else"),M,T)}function pt(t,e){return"await"==e?p(pt):"("==t?p(S(")"),gt,E(")"),T):void 0}function gt(t){return"var"==t?p(lt,E(";"),mt):";"==t?p(mt):"variable"==t?p(vt):f(O,E(";"),mt)}function vt(t,e){return"in"==e||"of"==e?(Jt.marked="keyword",p(O)):p(D,mt)}function mt(t,e){return";"==t?p(yt):"in"==e||"of"==e?(Jt.marked="keyword",p(O)):f(O,E(";"),yt)}function yt(t){")"!=t&&p(O)}function bt(t,e){return"*"==e?(Jt.marked="keyword",p(bt)):"variable"==t?(v(e),p(bt)):"("==t?p(w,S(")"),G(xt,")"),T,Z,M,k):Wt&&"<"==e?p(S(">"),G(st,">"),T,bt):void 0}function xt(t,e){return"@"==e&&p(O,xt),"spread"==t?p(xt):Wt&&y(e)?(Jt.marked="keyword",p(xt)):f(ct,J,ht)}function wt(t,e){return"variable"==t?Ct(t,e):kt(t,e)}function Ct(t,e){if("variable"==t)return v(e),p(kt)}function kt(t,e){return"<"==e?p(S(">"),G(st,">"),T,kt):"extends"==e||"implements"==e||Wt&&","==t?("implements"==e&&(Jt.marked="keyword"),p(Wt?tt:O,kt)):"{"==t?p(S("}"),St,T):void 0}function St(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||Wt&&y(e))&&Jt.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Jt.marked="keyword",p(St)):"variable"==t||"keyword"==Jt.style?(Jt.marked="property",p(Wt?Tt:bt,St)):"["==t?p(O,J,E("]"),Wt?Tt:bt,St):"*"==e?(Jt.marked="keyword",p(St)):";"==t?p(St):"}"==t?p():"@"==e?p(O,St):void 0}function Tt(t,e){return"?"==e?p(Tt):":"==t?p(tt,ht):"="==e?p(P):f(bt)}function Et(t,e){return"*"==e?(Jt.marked="keyword",p(_t,E(";"))):"default"==e?(Jt.marked="keyword",p(O,E(";"))):"{"==t?p(G(Mt,"}"),_t,E(";")):f(M)}function Mt(t,e){return"as"==e?(Jt.marked="keyword",p(E("variable"))):"variable"==t?f(P,Mt):void 0}function At(t){return"string"==t?p():"("==t?f(O):f(Ot,Pt,_t)}function Ot(t,e){return"{"==t?Y(Ot,"}"):("variable"==t&&v(e),"*"==e&&(Jt.marked="keyword"),p(Lt))}function Pt(t){if(","==t)return p(Ot,Pt)}function Lt(t,e){if("as"==e)return Jt.marked="keyword",p(Ot)}function _t(t,e){if("from"==e)return Jt.marked="keyword",p(O)}function Nt(t){return"]"==t?p():f(G(P,"]"))}function Dt(){return f(S("form"),ct,E("{"),S("}"),G(It,"}"),T,T)}function It(){return f(ct,ht)}function Ft(t,e){return"operator"==t.lastType||","==t.lastType||Kt.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function Rt(t,e,n){return e.tokenize==o&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}var zt,Ht,Vt=e.indentUnit,jt=n.statementIndent,$t=n.jsonld,Bt=n.json||$t,Wt=n.typescript,Ut=n.wordCharacters||/[\w$\xa1-\uffff]/,qt=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("keyword d"),o=t("operator"),s={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:r,break:r,continue:r,new:t("new"),delete:i,void:i,throw:i,debugger:t("debugger"),var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:o,typeof:o,instanceof:o,true:s,false:s,null:s,undefined:s,NaN:s,Infinity:s,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i}}(),Kt=/[+\-*&%=<>!?|~^@]/,Gt=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Yt="([{}])",Xt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Jt={state:null,column:null,marked:null,cc:null},Zt=new x("this",new x("arguments",null));return k.lex=!0,T.lex=!0,{startState:function(t){var e={tokenize:o,lastType:"sof",cc:[],lexical:new u((t||0)-Vt,0,"block",!1),localVars:n.localVars,context:n.localVars&&new b(null,null,!1),indented:t||0};return n.globalVars&&"object"==typeof n.globalVars&&(e.globalVars=n.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),c(t,e)),e.tokenize!=a&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==zt?n:(e.lastType="operator"!=zt||"++"!=Ht&&"--"!=Ht?zt:"incdec",d(e,n,zt,Ht,t))},indent:function(e,i){if(e.tokenize==a)return t.Pass;if(e.tokenize!=o)return 0;var r,s=i&&i.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(i))for(var c=e.cc.length-1;c>=0;--c){var u=e.cc[c];if(u==T)l=l.prev;else if(u!=ft)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==D||r==I)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;jt&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,d=s==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==h&&"{"==s?l.indented:"form"==h?l.indented+Vt:"stat"==h?l.indented+(Ft(e,i)?jt||Vt:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:Vt):l.indented+(/^(?:case|default)\b/.test(i)?Vt:2*Vt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Bt?null:"/*",blockCommentEnd:Bt?null:"*/",blockCommentContinue:Bt?null:" * ",lineComment:Bt?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Bt?"json":"javascript",jsonldMode:$t,jsonMode:Bt,expressionAllowed:Rt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=O&&e!=P||t.cc.pop()}}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},function(t,e,n){!function(t){t(n(6))}(function(t){t.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e){return/^[;{}]$/.test(e)}}),t.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e,n,i){return this.jsonMode?/^[\[,{]$/.test(e)||/^}/.test(n):(";"!=e||!i.lexical||")"!=i.lexical.type)&&(/^[;{}]$/.test(e)&&!/^;/.test(n))}});var e=/^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;t.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",newlineAfterToken:function(t,n,i,r){var o=!1;return"html"==this.configuration&&(o=!!r.context&&e.test(r.context.tagName)),!o&&("tag"==t&&/>$/.test(n)&&r.context||/^-1&&a>-1&&a>s&&(t=t.substr(0,s)+t.substring(s+o.commentStart.length,a)+t.substr(a+o.commentEnd.length)),r.replaceRange(t,n,i)}})}),t.defineExtension("autoIndentRange",function(t,e){var n=this;this.operation(function(){for(var i=t.line;i<=e.line;i++)n.indentLine(i,"smart")})}),t.defineExtension("autoFormatRange",function(e,n){function i(){c+="\n",h=!0,++u}for(var r=this,o=r.getMode(),s=r.getRange(e,n).split("\n"),a=t.copyState(o,r.getTokenAt(e).state),l=r.getOption("tabSize"),c="",u=0,h=0===e.ch,d=0;d\n \t
<%= label %>
\n \t
\n '),initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix},render:function(){var t=this.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"editor-c"),this.$el.find("#"+this.pfx+"code").append(this.model.get("input")),this}})},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(111),o=n(29),s=n(113),a=(n(31),n(116));return{name:"Panels",init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new s(i.defaults),e=new a({collection:t,config:i}),this},getPanels:function(){return t},getPanelsEl:function(){return e.el},addPanel:function(e){return t.add(e)},removePanel:function(e){return t.remove(e)},getPanel:function(e){var n=t.where({id:e});return n.length?n[0]:null},addButton:function(t,e){var n=this.getPanel(t);return n?n.get("buttons").add(e):null},removeButton:function(t,e){var n=this.getPanel(t);return n&&n.get("buttons").remove(e)},getButton:function(t,e){var n=this.getPanel(t);if(n){var i=n.get("buttons").where({id:e});return i.length?i[0]:null}return null},render:function(){return e.render().el},active:function(){this.getPanels().each(function(t){t.get("buttons").each(function(t){t.get("active")&&t.trigger("updateActive")})})},disableButtons:function(){this.getPanels().each(function(t){t.get("buttons").each(function(t){t.get("disable")&&t.trigger("change:disable")})})},Panel:o}}},function(t,e,n){"use strict";var i="sw-visibility",r="export-template",o="open-layers",s="open-blocks",a="fullscreen",l="preview";t.exports={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:i,className:"fa fa-square-o",command:i,context:i,attributes:{title:"View components"}},{id:l,className:"fa fa-eye",command:l,context:l,attributes:{title:"Preview"}},{id:a,className:"fa fa-arrows-alt",command:a,context:a,attributes:{title:"Fullscreen"}},{id:r,className:"fa fa-code",command:r,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:"open-sm",className:"fa fa-paint-brush",command:"open-sm",active:!0,attributes:{title:"Open Style Manager"}},{id:"open-tm",className:"fa fa-cog",command:"open-tm",attributes:{title:"Settings"}},{id:o,className:"fa fa-bars",command:o,attributes:{title:"Open Layer Manager"}},{id:s,className:"fa fa-th-large",command:s,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",label:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1,disable:!1},initialize:function(t){if(this.get("buttons").length){var e=n(30);this.set("buttons",new e(this.get("buttons")))}}})},function(t,e,n){"use strict";var i=n(0),r=n(29);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(115);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset remove",this.render),this.className=this.pfx+"buttons"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=r,o=new i({model:t,config:this.config,parentM:this.parentM}),s=o.render().el;return n?n.appendChild(s):this.$el.append(s),s},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.addToCollection(e,t)},this),this.$el.append(t),this.$el.attr("class",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1);r.default.$;t.exports=r.default.View.extend({tagName:"span",events:{click:"clicked"},initialize:function(t){var e=this.model.get("className");this.config=t.config||{},this.em=this.config.em||{};var n=this.config.stylePrefix||"",i=this.config.pStylePrefix||"";this.pfx=n,this.ppfx=this.config.pStylePrefix||"",this.id=n+this.model.get("id"),this.activeCls=n+"active "+i+"four-color",this.disableCls=n+"active",this.btnsVisCls=n+"visible",this.className=n+"btn"+(e?" "+e:""),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.listenTo(this.model,"change:disable",this.updateDisable),this.em&&this.em.get&&(this.commands=this.em.get("Commands"))},updateClassName:function(){var t=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(t?" "+t:""))},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))},updateActive:function(){var t=this.model,e=t.get("context"),n={},i=this.em&&this.em.get?this.em.get("Editor"):null,r=t.get("command");this.commands&&(0,o.isString)(r)?n=this.commands.get(r)||{}:(0,o.isFunction)(r)?n={run:r}:null!==r&&(0,o.isObject)(r)&&(n=r),t.get("active")?(t.collection.deactivateAll(e),t.set("active",!0,{silent:!0}).trigger("checkActive"),n.run&&(n.run(i,t,t.get("options")),i.trigger("run:"+r)),!n.stop&&t.set("active",!1)):(this.$el.removeClass(this.activeCls),t.collection.deactivateAll(e),n.stop&&(n.stop(i,t,t.get("options")),i.trigger("stop:"+r)))},updateDisable:function(){this.model.get("disable")?this.$el.addClass(this.disableCls):this.$el.removeClass(this.disableCls)},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(t){this.model.get("bntsVis")||this.model.get("disable")||this.toogleActive()},toogleActive:function(){var t=this.model.get("active");this.model.set("active",!t);this.em.get("Commands").get("select-comp");t?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()},render:function(){var t=this.model.get("label"),e=this.$el;return this.updateAttributes(),e.attr("class",this.className),t&&e.append(t),this}})},function(t,e,n){"use strict";var i=n(0),r=n(31);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"";var e=this.collection;this.listenTo(e,"add",this.addTo),this.listenTo(e,"reset",this.render),this.listenTo(e,"remove",this.onRemove),this.className=this.pfx+"panels"},onRemove:function(t){var e=t.view;e&&e.remove()},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=this.config,o=t.get("el"),s=new r({el:o,model:t,config:i}),a=s.render().el,l=t.get("appendTo");if(o);else if(l){var c=document.querySelector(l);c.appendChild(a)}else n?n.appendChild(a):this.$el.append(a);return s.initResize(),a},render:function(){var t=this,e=this.$el,n=document.createDocumentFragment();return e.empty(),this.collection.each(function(e){return t.addToCollection(e,n)}),e.append(n),e.attr("class",this.className),this}})},function(t,e,n){"use strict";var i=n(118),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(2);t.exports=function(){var t={},e=n(119),i=void 0,s=void 0,a=void 0,l=void 0,c=function(){var t=i.style;t.top="-100px",t.left="-100px",t.display="none"};return{customRte:null,name:"RichTextEditor",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=n;for(var r in e)r in t||(t[r]=e[r]);var a=t.pStylePrefix;return a&&(t.stylePrefix=a+t.stylePrefix),this.pfx=t.stylePrefix,s=t.actions||[],i=document.createElement("div"),i.className=a+"rte-toolbar "+a+"one-bg",l=this.initRte(document.createElement("div")),(0,o.on)(i,"mousedown",function(t){return t.stopPropagation()}),this},postRender:function(t){var e=t.model.get("Canvas");i.style.pointerEvents="all",c(),e.getToolsEl().appendChild(i)},initRte:function(e){var n=this.pfx,o=i,s=this.actionbar,a=this.actions||t.actions,c={actionbar:n+"actionbar",button:n+"action",active:n+"active"},u=new r.default({el:e,classes:c,actions:a,actionbar:s,actionbarContainer:o});return l&&l.setEl(e),u.actionbar&&(this.actionbar=u.actionbar),u.actions&&(this.actions=u.actions),u},add:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.name=t,l.addAction(e,{sync:1})},get:function(t){var e=void 0;return l.getActions().forEach(function(n){n.name==t&&(e=n)}),e},getAll:function(){return l.getActions()},remove:function(t){var e=this.getAll(),n=this.get(t);if(n){var i=n.btn,r=e.indexOf(n);i.parentNode.removeChild(i),e.splice(r,1)}return n},getToolbarEl:function(){return i},udpatePosition:function(){var e=t.em.get("Canvas"),n=e.getTargetToElementDim(i,a,{event:"rteToolbarPosUpdate"});if(n){t.adjustToolbar&&n.top<=n.canvasTop&&(n.top=n.elementTop+n.elementHeight);var r=i.style;r.top=n.top+"px",r.left=n.left+"px"}},enable:function(e,n){a=e.el;var r=t.em,o=e.getChildrenContainer(),s=this.customRte;if(i.style.display="",n=s?s.enable(o,n):this.initRte(o).enable(),r){setTimeout(this.udpatePosition.bind(this),0);var l="change:canvasOffset canvasScroll";r.off(l,this.udpatePosition,this),r.on(l,this.udpatePosition,this),r.trigger("rte:enable",e,n)}return n},disable:function(e,n){var i=t.em,r=this.customRte,o=e.getChildrenContainer();r?r.disable(o,n):n&&n.disable(),c(),i&&i.trigger("rte:disable",e,n)}}}},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;eB",attributes:{title:"Bold"},result:function(t){return t.exec("bold")}},italic:{name:"italic",icon:"I",attributes:{title:"Italic"},result:function(t){return t.exec("italic")}},underline:{name:"underline",icon:"U",attributes:{title:"Underline"},result:function(t){return t.exec("underline")}},strikethrough:{name:"strikethrough",icon:"S",attributes:{title:"Strike-through"},result:function(t){return t.exec("strikeThrough")}},link:{icon:'',name:"link",attributes:{style:"font-size:1.4rem;padding:0 4px 2px;",title:"Link"},result:function(t){return t.insertHTML(''+t.selection()+"")}}},c=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var o=n.el;if(o[a])return o[a];o[a]=this,this.setEl(o),this.updateActiveActions=this.updateActiveActions.bind(this);var s=n.actions||[];s.forEach(function(t,e){"string"==typeof t?t=l[t]:l[t.name]&&(t=r({},l[t.name],t)),s[e]=t});var c=s.length?s:Object.keys(l).map(function(t){return l[t]});n.classes=r({actionbar:"actionbar",button:"action",active:"active"},n.classes);var u=n.classes,h=n.actionbar;if(this.actionbar=h,this.settings=n,this.classes=u,this.actions=c,!h){var d=n.actionbarContainer;h=document.createElement("div"),h.className=u.actionbar,d.appendChild(h),this.actionbar=h,c.forEach(function(t){return e.addAction(t)})}return n.styleWithCSS&&this.exec("styleWithCSS"),this.syncActions(),this}return o(t,[{key:"setEl",value:function(t){this.el=t,this.doc=t.ownerDocument}},{key:"updateActiveActions",value:function(){var t=this;this.getActions().forEach(function(e){var n=e.btn,i=e.update,r=t.classes.active,o=e.name,s=t.doc;n.className=n.className.replace(r,"").trim(),s.queryCommandSupported(o)&&s.queryCommandState(o)&&(n.className+=" "+r),i&&i(t,e)})}},{key:"enable",value:function(){return this.enabled?this:(this.actionbarEl().style.display="",this.el.contentEditable=!0,(0,s.on)(this.el,"mouseup keyup",this.updateActiveActions),this.syncActions(),this.updateActiveActions(),this.el.focus(),this.enabled=1,this)}},{key:"disable",value:function(){return this.actionbarEl().style.display="none",this.el.contentEditable=!1,(0,s.off)(this.el,"mouseup keyup",this.updateActiveActions),this.enabled=0,this}},{key:"syncActions",value:function(){var t=this;this.getActions().forEach(function(e){var n=e.event||"click";e.btn["on"+n]=function(n){e.result(t,e),t.updateActiveActions()}})}},{key:"addAction",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sync,i=document.createElement("span"),r=t.icon,o=t.attributes||{};i.className=this.classes.button,t.btn=i;for(var s in o)i.setAttribute(s,o[s]);"string"==typeof r?i.innerHTML=r:i.appendChild(r),this.actionbarEl().appendChild(i),n&&(this.actions.push(t),this.syncActions())}},{key:"getActions",value:function(){return this.actions}},{key:"selection",value:function(){return this.doc.getSelection()}},{key:"exec",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.doc.execCommand(t,!1,e)}},{key:"actionbarEl",value:function(){return this.actionbar}},{key:"insertHTML",value:function(t){var e=void 0,n=this.doc,i=n.getSelection();if(i&&i.rangeCount){var r=n.createElement("div"),o=i.getRangeAt(0);o.deleteContents(),r.innerHTML=t,Array.prototype.slice.call(r.childNodes).forEach(function(t){o.insertNode(t),e=t}),i.removeAllRanges(),i.addRange(o),this.el.focus()}}}]),t}();e.default=c},function(t,e,n){"use strict";t.exports={stylePrefix:"rte-",adjustToolbar:1,actions:["bold","italic","underline","strikethrough","link"]}},function(t,e,n){"use strict";t.exports={stylePrefix:"sm-",sectors:[],appendTo:"",textNoElement:"Select an element before using Style Manager",hideNotStylable:!0,highlightChanged:!0,highlightComputed:!0,showComputed:!0,clearProperties:0,avoidComputed:["width","height"]}},function(t,e,n){"use strict";var i=n(122);t.exports=n(0).Collection.extend({model:i})},function(t,e,n){"use strict";var i=n(1),r=n(0),o=n(12),s=n(131);t.exports=r.Model.extend({defaults:{id:"",name:"",open:!0,buildProps:"",extendBuilded:1,properties:[]},initialize:function(t){var e=t||{},n=[],i=this.buildProperties(e.buildProps);!this.get("id")&&this.set("id",this.get("name")),n=i?this.extendProperties(i):this.get("properties");var r=new o(n);r.sector=this,this.set("properties",r)},extendProperties:function(t,e,n){for(var r=t.length,o=e||this.get("properties"),s=this.get("extendBuilded"),a=[],l=0,c=o.length;l')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function r(){for(var t=0;t1&&(delete window.localStorage[B],t.each(e,function(t,e){p(e)}))}catch(t){}try{vt=window.localStorage[B].split(";")}catch(t){}}}function p(e){if($){var n=st(e).toRgbString();if(!gt[n]&&-1===t.inArray(n,vt))for(vt.push(n);vt.length>mt;)vt.shift();if(B&&window.localStorage)try{window.localStorage[B]=vt.join(";")}catch(t){}}}function g(){var t=[];if(V.showPalette)for(var e=0;eMath.abs(e-r);bt=o?"x":"y"}}else bt=null;var s=!bt||"x"===bt,a=!bt||"y"===bt;s&&(ut=parseFloat(t/tt)),a&&(ht=parseFloat((et-e)/et)),Yt=!1,V.showAlpha||(dt=1),P()},y,b),Ut?(M(Ut),L(),Kt=V.preferredFormat||st(Ut).format,p(Ut)):L(),j&&C();var i=G?"mousedown.spectrum":"click.spectrum touchstart.spectrum";Nt.delegate(".sp-thumb-el",i,e),Dt.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},e)}();var Jt={show:C,hide:T,toggle:w,reflow:D,option:F,enable:R,disable:z,offset:H,set:function(t){M(t),N()},get:A,destroy:I,container:kt};return Jt.id=K.push(Jt)-1,Jt}function a(e,n){var i=e.outerWidth(),r=e.outerHeight(),o=n.outerHeight(),s=e[0].ownerDocument,a=s.documentElement,l=a.clientWidth,c=a.clientHeight,u=t(s).scrollLeft(),h=t(s).scrollTop(),d=l+u,f=c+h,p=n.offset();return p.top+=o,p.left-=Math.min(p.left,p.left+i>d&&d>i?Math.abs(p.left+i-d):0),p.top-=Math.min(p.top,p.top+r>f&&f>r?Math.abs(r+o-0):0),p}function l(){}function c(t){t.stopPropagation()}function u(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function h(e,n,i,r){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function s(t){if(u){if(G&&c.documentMode<9&&!t.button)return l();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,s=i&&i.pageY||t.pageY,a=Math.max(0,Math.min(r-h.left,f)),g=Math.max(0,Math.min(s-h.top,d));p&&o(t),n.apply(e,[a,g,t])}}function a(n){(n.which?3==n.which:2==n.button)||u||!1!==i.apply(e,arguments)&&(u=!0,d=t(e).height(),f=t(e).width(),h=t(e).offset(),t(c).bind(g),t(c.body).addClass("sp-dragging"),s(n),o(n))}function l(){u&&(t(c).unbind(g),t(c.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),u=!1}n=n||function(){},i=i||function(){},r=r||function(){};var c=document,u=!1,h={},d=0,f=0,p="ontouchstart"in window,g={};g.selectstart=o,g.dragstart=o,g["touchmove mousemove"]=s,g["touchend mouseup"]=l,t(e).bind("touchstart mousedown",a)}function d(t,e,n){var i;return function(){var r=this,o=arguments,s=function(){i=null,t.apply(r,o)};n&&clearTimeout(i),!n&&i||(i=setTimeout(s,e))}}function f(){return t.fn.spectrum.inputTypeColorSupport()}function p(t){var e={r:0,g:0,b:0},n=1,r=!1,o=!1;return"string"==typeof t&&(t=U(t)),"object"==(void 0===t?"undefined":i(t))&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(e=g(t.r,t.g,t.b),r=!0,o="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=$(t.s),t.v=$(t.v),e=b(t.h,t.s,t.v),r=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=$(t.s),t.l=$(t.l),e=m(t.h,t.s,t.l),r=!0,o="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=I(n),{ok:r,format:t.format||o,r:it(255,rt(e.r,0)),g:it(255,rt(e.g,0)),b:it(255,rt(e.b,0)),a:n}}function g(t,e,n){return{r:255*F(t,255),g:255*F(e,255),b:255*F(n,255)}}function v(t,e,n){t=F(t,255),e=F(e,255),n=F(n,255);var i,r,o=rt(t,e,n),s=it(t,e,n),a=(o+s)/2;if(o==s)i=r=0;else{var l=o-s;switch(r=a>.5?l/(2-o-s):l/(o+s),o){case t:i=(e-n)/l+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var r,o,s;if(t=F(t,360),e=F(e,100),n=F(n,100),0===e)r=o=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=i(l,a,t+1/3),o=i(l,a,t),s=i(l,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function y(t,e,n){t=F(t,255),e=F(e,255),n=F(n,255);var i,r,o=rt(t,e,n),s=it(t,e,n),a=o,l=o-s;if(r=0===o?0:l/o,o==s)i=0;else{switch(o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(st(i));return o}function D(t,e){e=e||6;for(var n=st(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(st({h:i,s:r,v:o})),o=(o+a)%1;return s}function I(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function F(t,e){H(t)&&(t="100%");var n=V(t);return t=it(e,rt(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),et.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function R(t){return it(1,rt(0,t))}function z(t){return parseInt(t,16)}function H(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function V(t){return"string"==typeof t&&-1!=t.indexOf("%")}function j(t){return 1==t.length?"0"+t:""+t}function $(t){return t<=1&&(t=100*t+"%"),t}function B(t){return Math.round(255*parseFloat(t)).toString(16)}function W(t){return z(t)/255}function U(t){t=t.replace(Z,"").replace(Q,"").toLowerCase();var e=!1;if(at[t])t=at[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=ct.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=ct.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ct.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=ct.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ct.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=ct.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ct.hex8.exec(t))?{a:W(n[1]),r:z(n[2]),g:z(n[3]),b:z(n[4]),format:e?"name":"hex8"}:(n=ct.hex6.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),format:e?"name":"hex"}:!!(n=ct.hex3.exec(t))&&{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),format:e?"name":"hex"}}var q={beforeShow:l,move:l,change:l,show:l,hide:l,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},K=[],G=!!/msie/i.exec(window.navigator.userAgent),Y=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),X=["
","
","
","
"].join(""),J=function(){var t="";if(G)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=K[t(this).data("spectrum.id")];if(n){var o=n[e];if(!o)throw new Error("Spectrum: no such method: '"+e+"'");"get"==e?i=n.get():"container"==e?i=n.container:"option"==e?i=n.option.apply(n,r):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):o.apply(n,r)}}),i}return this.spectrum("destroy").each(function(){var n=t.extend({},e,t(this).data()),i=s(this,n);t(this).data("spectrum.id",i.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=h,t.fn.spectrum.defaults=q,t.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var n=t("")[0];e._cachedResult="color"===n.type&&""!==n.value}return e._cachedResult},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t("input[type=color]");e.length&&!f()&&e.spectrum({preferredFormat:"hex6"})};var Z=/^[\s,#]+/,Q=/\s+$/,tt=0,et=Math,nt=et.round,it=et.min,rt=et.max,ot=et.random,st=function t(e,n){if(e=e||"",n=n||{},e instanceof t)return e;if(!(this instanceof t))return new t(e,n);var i=p(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=nt(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=nt(this._r)),this._g<1&&(this._g=nt(this._g)),this._b<1&&(this._b=nt(this._b)),this._ok=i.ok,this._tc_id=tt++};st.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this._a=I(t),this._roundA=nt(100*this._a)/100,this},toHsv:function(){var t=y(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=y(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=v(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=v(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return x(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return w(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:nt(this._r),g:nt(this._g),b:nt(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+")":"rgba("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:nt(100*F(this._r,255))+"%",g:nt(100*F(this._g,255))+"%",b:nt(100*F(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+nt(100*F(this._r,255))+"%, "+nt(100*F(this._g,255))+"%, "+nt(100*F(this._b,255))+"%)":"rgba("+nt(100*F(this._r,255))+"%, "+nt(100*F(this._g,255))+"%, "+nt(100*F(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(lt[x(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+w(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){n=st(t).toHex8String()}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,i=this._a<1&&this._a>=0;return e||!i||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(T,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(M,arguments)},desaturate:function(){return this._applyModification(C,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(A,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(N,arguments)},complement:function(){return this._applyCombination(O,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(_,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(L,arguments)}},st.fromRatio=function(t,e){if("object"==(void 0===t?"undefined":i(t))){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]="a"===r?t[r]:$(t[r]));t=n}return st(t,e)},st.equals=function(t,e){return!(!t||!e)&&st(t).toRgbString()==st(e).toRgbString()},st.random=function(){return st.fromRatio({r:ot(),g:ot(),b:ot()})},st.mix=function(t,e,n){n=0===n?0:n||50;var i,r=st(t).toRgb(),o=st(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a;i=a*l==-1?a:(a+l)/(1+a*l),i=(i+1)/2;var c=1-i,u={r:o.r*i+r.r*c,g:o.g*i+r.g*c,b:o.b*i+r.b*c,a:o.a*s+r.a*(1-s)};return st(u)},st.readability=function(t,e){var n=st(t),i=st(e),r=n.toRgb(),o=i.toRgb(),s=n.getBrightness(),a=i.getBrightness(),l=Math.max(r.r,o.r)-Math.min(r.r,o.r)+Math.max(r.g,o.g)-Math.min(r.g,o.g)+Math.max(r.b,o.b)-Math.min(r.b,o.b);return{brightness:Math.abs(s-a),color:l}},st.isReadable=function(t,e){var n=st.readability(t,e);return n.brightness>125&&n.color>500},st.mostReadable=function(t,e){for(var n=null,i=0,r=!1,o=0;o125&&s.color>500,l=s.brightness/125*3+s.color/500;(a&&!r||a&&r&&l>i||!a&&!r&&l>i)&&(r=a,i=l,n=st(e[o]))}return n};var at=st.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"},lt=st.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(at),ct=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+n),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=st,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}},function(t,e,n){"use strict";var i=n(0),r=n(128);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.stackModel=t.stackModel,this.preview=t.preview,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.propsConfig=t.propsConfig;var e=this.pfx,n=this.ppfx,i=this.collection;this.className=e+"layers "+n+"field",this.listenTo(i,"add",this.addTo),this.listenTo(i,"deselectAll",this.deselectAll),this.listenTo(i,"reset",this.render);var r=this.config.em||"",o=r?r.get("Utils"):"";this.sorter=o?new o.Sorter({container:this.el,ignoreViewChildren:1,containerSel:"."+e+"layers",itemSel:"."+e+"layer",pfx:this.config.pStylePrefix}):"",i.view=this,this.$el.data("model",i),this.$el.data("collection",i)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=e||null,o=this.stackModel,s=this.config,a=this.sorter,l=this.propsConfig;void 0!==this.preview&&t.set("preview",this.preview);var c=new r({model:t,config:s,sorter:a,stackModel:o,propsConfig:l}),u=c.render().el;if(i)i.appendChild(u);else if(void 0!==n){var h="before";this.$el.children().length==n&&(n--,h="after"),n<0?this.$el.append(u):this.$el.children().eq(n)[h](u)}else this.$el.append(u);return u},deselectAll:function(){this.$el.find("."+this.pfx+"layer").removeClass(this.pfx+"active")},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.addToCollection(e,t)},this),this.$el.append(t),this.$el.attr("class",this.className),this.sorter&&(this.sorter.plh=null),this}})},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=r.default.View.extend({events:{click:"active","click [data-close-layer]":"remove","mousedown [data-move-layer]":"initSorter"},template:function(t){var e=this.pfx;return'\n
\n \n
\n
Layer '+t.get("index")+'
\n
\n \t
\n
\n
\n ⨯\n
\n
\n
\n '},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model;this.stackModel=t.stackModel||{},this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.sorter=t.sorter||null,this.propsConfig=t.propsConfig||{},this.customPreview=t.onPreview,this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:active",this.updateVisibility),this.listenTo(e.get("properties"),"change",this.updatePreview),e.get("preview")||this.$el.addClass(this.pfx+"no-preview"),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data("model",e)},initSorter:function(t){this.sorter&&this.sorter.startSort(this.el)},remove:function(t){t&&t.stopPropagation&&t.stopPropagation();var e=this.model,n=e.collection,i=this.stackModel;r.default.View.prototype.remove.apply(this,arguments),n.contains(e)&&n.remove(e),i&&i.set&&(i.set({stackIndex:null},{silent:!0}),i.trigger("updateValue"))},onPreview:function(t){var e=t.split(" "),n=[];return this.model.get("properties").each(function(t,i){var r=e[i]||"";if(r&&"integer"==t.get("type")){var o=parseInt(r,10),s=r.replace(o,"");o=isNaN(o)?0:o,o=o>3?3:o,o=o<-3?-3:o,r=o+s}n.push(r)}),n.join(" ")},updatePreview:function(){var t=this.stackModel,e=this.customPreview,n=this.getPreviewEl(),i=this.model.getFullValue(),r=e?e(i):this.onPreview(i);r&&t&&n&&(n.style[t.get("property")]=r)},getPropertiesWrapper:function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector("[data-properties]")),this.propsWrapEl},getPreviewEl:function(){return this.previewEl||(this.previewEl=this.el.querySelector("[data-preview]")),this.previewEl},active:function(){var t=this.model,e=t.collection;e.active(e.indexOf(t))},updateVisibility:function(){var t=this.pfx,e=this.getPropertiesWrapper(),n=this.model.get("active");e.style.display=n?"":"none",this.$el[n?"addClass":"removeClass"](t+"active")},render:function(){var t=n(14),e=this.propsConfig,i=this.pfx+"layer",r=this.model,o=this.el,s=new t({collection:r.get("properties"),config:this.config,target:e.target,customValue:e.customValue,propTarget:e.propTarget,onChange:e.onChange}).render().el;return o.innerHTML=this.template(r),o.className=i,this.getPropertiesWrapper().appendChild(s),this.updateVisibility(),this.updatePreview(),this}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e\n \n
\n '},getSliderEl:function(){return this.slider||(this.slider=this.el.querySelector("input[type=range]")),this.slider},inputValueChanged:function(){var t=this.model,e=t.get("step");this.getInputEl().value=this.getSliderEl().value;var n=this.getInputValue()-e;t.set("value",n,{avoidStore:1}).set("value",n+e),this.elementUpdated()},inputValueChangedSoft:function(){this.getInputEl().value=this.getSliderEl().value,this.model.set("value",this.getInputValue(),{avoidStore:1}),this.elementUpdated()},setValue:function(t){this.getSliderEl().value=t,this.inputInst.setValue(t,{silent:1})},onRender:function(){r.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},function(t,e,n){"use strict";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0,i=t.length;n0&&void 0!==arguments[0]?arguments[0]:{},e=t.config||{};this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.target=t.target||{},this.config=e;var n={};(0,s.extend)(n,o.default.Events);var r=document.body,a=document.createElement("el-"+(new Date).getTime());r.appendChild(a),n.computedDefault=i({},window.getComputedStyle(a)),r.removeChild(a),this.propTarget=n;var l=this.collection;this.listenTo(l,"add",this.addTo),this.listenTo(l,"reset",this.render),this.listenTo(this.target,"component:toggled component:update:classes component:update:state change:device",this.targetUpdated)},addTo:function(t){this.addToCollection(t)},targetUpdated:function(){var t=this.target,e=this.propTarget,n=t.getSelected();if(n){var i=t.get("Config"),r=i.devicePreviewMode?"":n.get("state"),o=n.getEl();if(e.helper=null,o){var s=r?":"+r:null;e.computed=window.getComputedStyle(o,s)}n=t.get("StyleManager").getModelToStyle(n),r&&function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.get("CssComposer"),r=i.getAll(),o=i.getClassRule("hc-state");o?(r.remove(o),r.add(o)):o=i.setClassRule("hc-state"),o.set("important",1),o.setStyle(n),e.helper=o}(n.getStyle()),e.model=n,e.trigger("update")}},addToCollection:function(t,e){var n=e||null,i=new a({model:t,id:this.pfx+t.get("name").replace(" ","_").toLowerCase(),name:t.get("name"),properties:t.get("properties"),target:this.target,propTarget:this.propTarget,config:this.config}),r=i.render().el;return n?n.appendChild(r):this.$el.append(r),r},render:function(){var t=this,e=document.createDocumentFragment(),n=this.$el,i=this.pfx,r=this.ppfx;return n.empty(),this.collection.each(function(n){return t.addToCollection(n,e)}),n.append(e),n.addClass(i+"sectors "+r+"one-bg "+r+"two-color"),this}})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(1),o=i(r),s=n(0),a=i(s),l=n(14);t.exports=a.default.View.extend({template:o.default.template('\n
\n \n <%= label %>\n
'),events:{"click [data-sector-title]":"toggle"},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.caretR="fa-caret-right",this.caretD="fa-caret-down";var e=this.model;this.listenTo(e,"change:open",this.updateOpen),this.listenTo(e,"updateVisibility",this.updateVisibility),this.listenTo(e,"destroy remove",this.remove)},updateVisibility:function(){var t;this.model.get("properties").each(function(e){e.get("visible")&&(t=1)}),this.el.style.display=t?"block":"none"},updateOpen:function(){this.model.get("open")?this.show():this.hide()},show:function(){this.$el.addClass(this.pfx+"open"),this.getPropertiesEl().style.display="",this.$caret.removeClass(this.caretR).addClass(this.caretD)},hide:function(){this.$el.removeClass(this.pfx+"open"),this.getPropertiesEl().style.display="none",this.$caret.removeClass(this.caretD).addClass(this.caretR)},getPropertiesEl:function(){return this.$el.find("."+this.pfx+"properties").get(0)},toggle:function(t){var e=this.model.get("open")?0:1;this.model.set("open",e)},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 t=this.model.get("properties");if(t){var e=new l({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(135),i=n(136),r=n(139),o=n(46),s=void 0,a=void 0,l=void 0;return{name:"AssetManager",storageKey:"assets",getConfig:function(){return t},init:function(n){var c=this;t=n||{};for(var u in e)u in t||(t[u]=e[u]);var h=t.pStylePrefix,d=t.em;h&&(t.stylePrefix=h+t.stylePrefix),s=new i([]);var f={collection:new i([]),globalCollection:s,config:t};return l=new o(f),f.fu=l,a=new r(f),s.listenTo(s,"add",function(t){c.getAllVisible().add(t),d&&d.trigger("asset:add",t)}),s.listenTo(s,"remove",function(t){c.getAllVisible().remove(t),d&&d.trigger("asset:remove",t)}),this},add:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return void 0===e.at&&(e.at=0),s.add(t,e)},get:function(t){return s.where({src:t})[0]},getAll:function(){return s},getAllVisible:function(){return a.collection},remove:function(t){var e=this.get(t);return this.getAll().remove(e),this},store:function(e){var n={},i=JSON.stringify(this.getAll().toJSON());return n[this.storageKey]=i,!e&&t.stm&&t.stm.store(n),n},load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.storageKey,n=t[e]||[];if("string"==typeof n)try{n=JSON.parse(t[e])}catch(t){}return n&&n.length&&this.getAll().reset(n),n},getContainer:function(){return a.el},getAssetsEl:function(){return a.el.querySelector("[data-el=assets]")},render:function(t){var e=t||this.getAll().models;return a.rendered||a.render(),a.collection.reset(e),this.getContainer()},addType:function(t,e){this.getAll().addType(t,e)},getType:function(t){return this.getAll().getType(t)},getTypes:function(){return this.getAll().getTypes()},AssetsView:function(){return a},FileUploader:function(){return l},onLoad:function(){this.getAll().reset(t.assets)},postRender:function(e){t.dropzone&&l.initDropzone(e)},setTarget:function(t){a.collection.target=t},onSelect:function(t){a.collection.onSelect=t},onClick:function(e){t.onClick=e},onDblClick:function(e){t.onDblClick=e}}}},function(t,e,n){"use strict";t.exports={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},autoAdd:1,uploadText:"Drop files here or click to upload",addBtnText:"Add image",uploadFile:"",handleAdd:"",dropzone:0,openAssetsOnDrop:1,dropzoneContent:"",modalTitle:"Select Image",inputPlaceholder:"http://path/to/the/image.jpg"}},function(t,e,n){"use strict";var i=n(33),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"image",model:n(137),view:n(44),isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}]})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n \n '},initialize:function(t){this.options=t,this.config=t.config,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"";var e=this.collection;this.listenTo(e,"reset",this.renderAssets),this.listenTo(e,"add",this.addToAsset),this.listenTo(e,"remove",this.removedAsset),this.listenTo(e,"deselectAll",this.deselectAll)},handleSubmit:function(t){t.preventDefault();var e=this.getAddInput(),n=e.value.trim(),i=this.config.handleAdd;n&&(e.value="",this.getAssetsEl().scrollTop=0,i?i.bind(this)(n):this.options.globalCollection.add(n,{at:0}))},getAssetsEl:function(){return this.el.querySelector("."+this.pfx+"assets")},getAddInput:function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector("."+this.pfx+"add-asset input")),this.inputUrl},removedAsset:function(t){this.collection.length||this.toggleNoAssets()},addToAsset:function(t){1==this.collection.length&&this.toggleNoAssets(1),this.addAsset(t)},addAsset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e,i=this.collection,r=this.config,o=new t.typeView({model:t,collection:i,config:r}).render().el;if(n)n.appendChild(o);else{var s=this.getAssetsEl();s&&s.insertBefore(o,s.firstChild)}return o},toggleNoAssets:function(t){var e=this.$el.find("."+this.pfx+"assets");if(t)e.empty();else{var n=this.config.noAssets;n&&e.append(n)}},deselectAll:function(){var t=this.pfx;this.$el.find("."+t+"highlight").removeClass(t+"highlight")},renderAssets:function(){var t=this,e=document.createDocumentFragment(),n=this.$el.find("."+this.pfx+"assets");n.empty(),this.toggleNoAssets(this.collection.length),this.collection.each(function(n){return t.addAsset(n,e)}),n.append(e)},render:function(){var t=this.options.fu.render().el;return this.$el.empty(),this.$el.append(t).append(this.template(this)),this.el.className=this.ppfx+"asset-manager",this.renderAssets(),this.rendered=1,this}})},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n="change:style",i=o.get("UndoManager");i&&i.add(t);var r=o.handleUpdates.bind(o);o.stopListening(t,n,r),o.listenTo(t,n,r),!e.avoidStore&&r("","",e)},load:function(e){var n=e||"";!n&&s.stm&&(n=s.em.getCacheLoad());var i=n.styles||"";if(n.styles)try{i=JSON.parse(n.styles)}catch(t){}else n.css&&(i=s.em.get("Parser").parseCss(n.css));return(0,r.isArray)(i)?i.length&&t.reset(i):i&&t.reset(i),i},store:function(e){if(s.stm){var n={},i=this.storageKey();return i.indexOf("css")>=0&&(n.css=s.em.getCss()),i.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||s.stm.store(n),n}},add:function(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=n||"",c=r||"",u=i({},o),h=this.get(e,a,c,u);return h&&h.config&&!h.config.atRuleType?h:(u.state=a,u.mediaText=c,u.selectors="",h=new l(u,s),h.get("selectors").add(e),t.add(h),h)},get:function(e,n,i,r){var o=null;return t.each(function(t){o||t.compare(e,n,i,r)&&(o=t)}),o},getAll:function(){return t},clear:function(){return this.getAll().reset(),this},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,a=r.length;o1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.state||"",r=n.mediaText||o.getCurrentMedia(),s=o.get("SelectorManager"),a=s.add({name:t,type:d.TYPE_ID}),l=this.add(a,i,r);return l.setStyle(e,n),l},getIdRule:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.state||"",i=e.mediaText||o.getCurrentMedia(),r=o.get("SelectorManager").get(t,d.TYPE_ID);return r&&this.get(r,n,i)},setClassRule:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.state||"",r=n.mediaText||o.getCurrentMedia(),s=o.get("SelectorManager"),a=s.add({name:t,type:d.TYPE_CLASS}),l=this.add(a,i,r);return l.setStyle(e,n),l},getClassRule:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.state||"",i=e.mediaText||o.getCurrentMedia(),r=o.get("SelectorManager").get(t,d.TYPE_CLASS);return r&&this.get(r,n,i)},render:function(){return e.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"css-",staticRules:"",rules:[]}},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(47);t.exports=r.default.Collection.extend({initialize:function(t,e){e&&e.em&&(this.editor=e.em),this.model=function(t,n){return!n.em&&e&&e.em&&(n.em=e.em),new o(t,n)}},add:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=this.editor.get("Parser").parseCss(t)),e.em=this.editor,r.default.Collection.prototype.add.apply(this,[t,e])}})},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(49),s=n(144),a=r.default.$,l=function(t,e){return t+(e?"-"+e.replace("%","pc"):"")};t.exports=r.default.View.extend({initialize:function(t){var e=t.config||{};this.atRules={},this.config=e,this.em=e.em,this.pfx=e.stylePrefix||"",this.className=this.pfx+"rules";var n=this.collection;this.listenTo(n,"add",this.addTo),this.listenTo(n,"reset",this.render)},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){if(this.renderStarted){var n=e||null,i=this.config,r=void 0,a=void 0,c={model:t,config:i};if("keyframes"===t.get("atRuleType")){var u=t.getAtRule(),h=this.atRules[u];if(!h){var d=document.createElement("style");h=document.createTextNode(""),d.appendChild(document.createTextNode(u+"{")),d.appendChild(h),d.appendChild(document.createTextNode("}")),this.atRules[u]=h,r=d}a=new s(c),h.appendData(a.render().el.textContent)}else a=new o(c),r=a.render().el;var f=this.className,p=t.get("mediaText"),g=l(f),v=g;if(p&&(v=l(f,this.getMediaWidth(p))),r){var m=n||this.el,y=void 0;try{y=m.querySelector("#"+v)}catch(t){}y||(y=m.querySelector("#"+g)),y.appendChild(r)}return r}},getMediaWidth:function(t){return t&&t.replace("("+this.em.getConfig("mediaCondition")+": ","").replace(")","")},render:function(){var t=this;this.renderStarted=1,this.atRules={};var e=this.$el,n=document.createDocumentFragment(),i=this.className;return e.empty(),this.em.get("DeviceManager").getAll().map(function(t){return t.get("widthMedia")}).sort(function(t,e){return(e&&e.replace("px","")||Number.MAX_VALUE)-(t&&t.replace("px","")||Number.MAX_VALUE)}).forEach(function(t){a('
').appendTo(n)}),this.collection.each(function(e){return t.addToCollection(e,n)}),e.append(n),e.attr("class",i),this}})},function(t,e,n){"use strict";t.exports=n(49).extend({_createElement:function(t){return document.createTextNode("")},render:function(){var t=this.model,e=t.get("important");return this.el.textContent=t.getDeclaration({important:e}),this}})},function(t,e,n){"use strict";var i=n(1),r=n(146),o=n(147);t.exports=function(){var t={},e=void 0;return{TraitsView:o,name:"TraitManager",getConfig:function(){return t},init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=n,(0,i.defaults)(t,r);var s=t.pStylePrefix;return s&&(t.stylePrefix=""+s+t.stylePrefix),e=new o({collection:[],editor:t.em,config:t}),this},postRender:function(){var t=this.getConfig().appendTo;if(t){((0,i.isElement)(t)?t:document.querySelector(t)).appendChild(this.render())}},getTraitsViewer:function(){return e},addType:function(t,n){var i=e.itemView;e.itemsView[t]=i.extend(n)},getType:function(t){return e.itemsView[t]},render:function(){return e.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"trt-",appendTo:"",labelContainer:"Component settings",labelPlhText:"eg. Text here",labelPlhHref:"eg. https://google.com",optionsTarget:[{value:"",name:"This window"},{value:"_blank",name:"New window"}],textNoElement:"Select an element before using Trait Manager"}},function(t,e,n){"use strict";var i=n(50),r=n(9),o=n(148),s=n(149),a=n(150),l=n(151);t.exports=i.extend({itemView:r,itemsView:{text:r,number:a,select:o,checkbox:s,color:l},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.config||{};this.config=e,this.em=t.editor,this.pfx=e.stylePrefix||"",this.ppfx=e.pStylePrefix||"",this.className=this.pfx+"traits";this.listenTo(this.em,"component:toggled",this.updatedCollection),this.updatedCollection()},updatedCollection:function(){var t=this.ppfx,e=this.em.getSelected();this.el.className=this.className+" "+t+"one-bg "+t+"two-color",e&&(this.collection=e.get("traits"),this.render())}})},function(t,e,n){"use strict";(function(e){var i=n(9),r=n(0).$;t.exports=i.extend({initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.tmpl='
'},getInputEl:function(){if(!this.$input){var t=this.model,n=t.get("options")||[],i="",this.input=i,this.$input=r(this.input);var o=this.target,s=t.get("name"),a=t.get("value");if(t.get("changeProp"))a=a||o.get(s);else{a=o.get("attributes")[s]}a&&this.$input.val(a)}return this.$input.get(0)}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(9);t.exports=i.extend({initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx+"chk-icon";this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().checked)},getInputEl:function(){var t;this.$input||(t=1);for(var e=arguments.length,n=Array(e),r=0;r2&&void 0!==arguments[2]?arguments[2]:{},r=t.components(),o=s.get("UndoManager"),a=s.handleUpdates.bind(s),l=this.handleChanges.bind(this),c=this.handleRemoves.bind(this);o&&o.add(t),o&&r&&o.add(r);[[t,"change:style change:content change:attributes change:src",a],[r,"add",l],[r,"remove",c],[t.get("classes"),"add remove",a]].forEach(function(t){s.stopListening(t[0],t[1],t[2]),s.listenTo(t[0],t[1],t[2])}),!i.avoidStore&&a("","",i),r.each(function(t){return n.handleChanges(t,e,i)})},handleRemoves:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!n.avoidStore&&s.handleUpdates(t,e,n)},load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&o.stm&&(t=o.em.getCacheLoad()),t.components)try{e=JSON.parse(t.components)}catch(t){}else t.html&&(e=t.html);var n=e&&e.constructor===Object;return(e&&e.length||n)&&(this.clear(),this.getComponents().reset(),n?this.getWrapper().set(e).initComponents().initClasses().loadTraits():this.getComponents().add(e)),e},store:function(t){if(o.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=o.em.getHtml()),n.indexOf("components")>=0){var i=o.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(i)}return t||o.stm.store(e),e}},getComponent:function(){return t},getWrapper:function(){return this.getComponent()},getComponents:function(){return this.getWrapper().get("components")},addComponent:function(t){return this.getComponents().add(t)},render:function(){return e.render().el},clear:function(){return this.getComponents().reset(),this},setComponents:function(t){this.clear().addComponent(t)},addType:function(t,e){var n=this.getType(t);n?(n.model=e.model,n.view=e.view):(e.id=t,d.unshift(e))},getType:function(t){for(var e=d,n=0;n1&&void 0!==arguments[1]?arguments[1]:{};t&&(t.set({status:"selected"}),["component:selected","component:toggled"].forEach(function(i){return e.em.trigger(i,t,n)}))},selectRemove:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){this.em;t.set({status:"",state:""}),["component:deselected","component:toggled"].forEach(function(i){return e.em.trigger(i,t,n)})}},componentHovered:function(){var t=o.em,e=t.get("componentHovered"),n=t.previous("componentHovered");n&&"hovered"==n.get("status")&&n.set({status:"",state:""}),e&&(0,r.isEmpty)(e.get("status"))&&e.set("status","hovered")}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"comp-",wrapperId:"wrapper",wrapperName:"Body",wrapper:{removable:!1,copyable:!1,draggable:!1,components:[],traits:[],stylable:["background","background-color","background-image","background-repeat","background-attachment","background-position","background-size"]},components:[],imageCompClass:"fa fa-picture-o",oAssetsOnCreate:!0,storeWrapper:0,voidElements:["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]}},function(t,e,n){"use strict";var i=n(1),r=n(0),o=n(155),s=n(156);t.exports=r.Collection.extend({model:o,initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.em=e.em||"",this.listenTo(this,"add",this.handleAdd)},handleAdd:function(t){var e=this.target;e&&(t.target=e)},setTarget:function(t){this.target=t},add:function(t,e){var n=this.em;if((0,i.isString)(t)||(0,i.isArray)(t)){var o=n&&n.get&&n.get("TraitManager"),a=o&&o.getConfig(),l=s(a);(0,i.isString)(t)&&(t=[t]);for(var c=0,u=t.length;c1&&void 0!==arguments[1]?arguments[1]:{},n=this.target,o=this.get("name");if(!(0,r.isUndefined)(t))if(this.get("changeProp"))n.set(o,t,e);else{var s=i({},n.get("attributes"));s[o]=t,n.set("attributes",s,e)}},setValueFromInput:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={value:t};this.set(r,i({},n,{avoidStore:1})),e&&(this.set("value","",n),this.set(r,n))},getInitValue:function(){var t=this.target,e=this.get("name"),n=void 0;if(t){var i=t.get("attributes");n=this.get("changeProp")?t.get(e):i[e]}return n||this.get("value")||this.get("default")}})},function(t,e,n){"use strict";t.exports=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{build:function(e){var n=[];"string"==typeof e&&(e=[e]);for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent;var n=this.pfx,i=this.ppfx,r=this.parent,o=this.collection;this.listenTo(o,"add",this.addTo),this.listenTo(o,"reset resetNavigator",this.render),this.listenTo(o,"remove",this.removeChildren),this.className=n+"layers";var s=e.em;if(e.sortable&&!this.opt.sorter){var a=s.get("Utils");this.opt.sorter=new a.Sorter({container:e.sortContainer||this.el,containerSel:"."+this.className,itemSel:"."+n+"layer",ignoreViewChildren:1,onEndMove:function(t,e){var n=e.getSourceModel();s.setSelected(n,{forceChange:1})},avoidSelectOnEnd:1,nested:1,ppfx:i,pfx:n})}this.sorter=this.opt.sorter||"",this.$el.data("collection",o),r&&this.$el.data("model",r)},removeChildren:function(t){var e=t.viewLayer;e&&e.remove.apply(e)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var r=this.level,o=e||null,s=i;if(this.isCountable(t,this.config.hideTextnode)){var a=new s({level:r,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),l=a.render().el;if(o)o.appendChild(l);else if(void 0!==n){var c="before";this.$el.children().length==n&&(n--,c="after"),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return l}},isCountable:function(t,e){var n=t.get("type"),i=t.get("tagName");return!(("textnode"==n||"br"==i)&&e||!t.get("layerable"))},render:function(){var t=this,e=document.createDocumentFragment(),n=this.el;return n.innerHTML="",this.collection.each(function(n){return t.addToCollection(n,e)}),n.appendChild(e),n.className=this.className,this}})},function(t,e,n){"use strict";var i=n(2),r=n(184),o=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=function(){var t,e,r={},s=n(185),a=n(186),l=n(188);return{getCanvasView:function(){return l},name:"Canvas",init:function(e){r=e||{};for(var n in s)n in r||(r[n]=s[n]);var i=r.pStylePrefix;i&&(r.stylePrefix=i+r.stylePrefix),t=new a(e),l=new l({model:t,config:r});var o=r.em.get("DomComponents");return o&&this.setWrapper(o),this.startAutoscroll=this.startAutoscroll.bind(this),this.stopAutoscroll=this.stopAutoscroll.bind(this),this.autoscroll=this.autoscroll.bind(this),this},getConfig:function(){return r},setWrapper:function(e){t.set("wrapper",e)},getElement:function(){return l.el},getFrameEl:function(){return l.frame.el},getDocument:function(){return this.getFrameEl().contentDocument},getWindow:function(){return this.getFrameEl().contentWindow},getBody:function(){return l.frame.el.contentDocument.body},getWrapperEl:function(){return this.getBody().querySelector("#wrapper")},getToolsEl:function(){return l.toolsEl},getHighlighter:function(){return l.hlEl},getBadgeEl:function(){return l.badgeEl},getPlacerEl:function(){return l.placerEl},getGhostEl:function(){return l.ghostEl},getToolbarEl:function(){return l.toolbarEl},getResizerEl:function(){return l.resizerEl},getOffsetViewerEl:function(){return l.offsetEl},getFixedOffsetViewerEl:function(){return l.fixedOffsetEl},render:function(){return l.render().el},getOffset:function(){var t=this.offset(this.getFrameEl()),e=this.offset(this.getElement());return{top:t.top-e.top,left:t.left-e.left}},offset:function(t){return l.offset(t)},setCustomBadgeLabel:function(t){r.customBadgeLabel=t},getElementPos:function(t,e){return l.getElementPos(t,e)},getTargetToElementDim:function(t,e,n){var i=n||{},o=l.getPosition();if(o){var s=i.elPos||l.getElementPos(e),a=n.toRight||0,c=i.targetHeight||t.offsetHeight,u=i.targetWidth||t.offsetWidth,h=i.event||null,d=s.top-c,f=s.left;f+=a?s.width:0,f=a?f-u:f;var p=fs.top+s.height?s.top+s.height:g;var v={top:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:o.top,canvasLeft:o.left};return h&&r.em&&r.em.trigger(h,v),v}},getMouseRelativePos:function(t,e){var n=e||{},i=0,r=0,o=n.subWinOffset,s=t.target.ownerDocument,a=s.defaultView||s.parentWindow,l=a.frameElement,c=o?a.pageYOffset:0,u=o?a.pageXOffset:0;if(l){var h=l.getBoundingClientRect();i=h.top||0,r=h.left||0}return{y:t.clientY+i-c,x:t.clientX+r-u}},getMouseRelativeCanvas:function(t,e){var n=this.getFrameEl(),i=this.getBody(),r=n.offsetTop||0,o=n.offsetLeft||0,s=i.scrollTop||0,a=i.scrollLeft||0;return{y:t.clientY+r+s,x:t.clientX+o+a}},hasFocus:function(){return this.getDocument().hasFocus()},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},scrollTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,i.getElement)(t);this.getCanvasView().isElInViewport(n)&&!e.force||n.scrollIntoView(e)},startAutoscroll:function(){var t=this;this.dragging=1;var n=this.getScrollListeners();e=l.getFrameOffset(1),setTimeout(function(){(0,i.on)(n,"mousemove",t.autoscroll),(0,i.on)(n,"mouseup",t.stopAutoscroll)},0)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=i,o=t.clientY,s=e.height-50;o<50&&(r-=50-o),o>s&&(r+=o-s),n.scrollTo(0,r)}},stopAutoscroll:function(){this.dragging=0;var t=this.getScrollListeners();(0,i.off)(t,"mousemove",this.autoscroll),(0,i.off)(t,"mouseup",this.stopAutoscroll)},getScrollListeners:function(){return[this.getFrameEl().contentWindow,this.getElement()]},postRender:function(){(0,i.hasDnd)(r.em)&&(this.droppable=new o.default(r.em))},getFrameWrapperEl:function(){return l.frame.getWrapper()}}}},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n";this.sorter.setDropContent(o),this.sorter.startSort(),e.trigger("canvas:dragenter",n,o)}}},{key:"handleDragOver",value:function(t){t.preventDefault(),this.em.trigger("canvas:dragover",t)}},{key:"handleDrop",value:function(t){t.preventDefault();var e=t.dataTransfer,n=this.getContentByData(e).content;t.target.style.border="",n?this.sorter.setDropContent(n):this.sorter.moved=0,this.endDrop(0,t)}},{key:"getContentByData",value:function(t){var e=this.em,n=t.types,i=t.files,r=e.get("dragContent"),o=t.getData("text");if(i.length){o=[];for(var a=0;a=0)o=t.getData("text/html").replace(/<\/?meta[^>]*>/g,"");else if((0,s.indexOf)(n,"text/uri-list")>=0)o={type:"link",attributes:{href:o},content:o};else if((0,s.indexOf)(n,"text/json")>=0){var u=t.getData("text/json");u&&(o=JSON.parse(u))}var h={content:o};return e.trigger("canvas:dragdata",t,h),h}}]),t}();e.default=a},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(187);t.exports=r.default.Model.extend({defaults:{frame:"",wrapper:"",rulers:!1},initialize:function(t){var e=this.conf||{};this.set("frame",new o(e.frame))}})},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=r.default.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(2),s=n(189),a=r.default.$;t.exports=r.default.View.extend({initialize:function(t){e.bindAll(this,"renderBody","onFrameScroll","clearOff"),(0,o.on)(window,"scroll resize",this.clearOff),this.config=t.config||{},this.em=this.config.em||{},this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"canvas",this.listenTo(this.em,"change:canvasOffset",this.clearOff),this.frame=new s({model:this.model.get("frame"),config:this.config})},isElInViewport:function(t){var e=(0,o.getElement)(t).getBoundingClientRect(),n=this.getFrameOffset(1),i=e.top,r=e.left;return i>=0&&r>=0&&i<=n.height&&r<=n.width},onFrameScroll:function(){var t=this.frame.el.contentDocument.body;this.toolsEl.style.top="-"+t.scrollTop+"px",this.toolsEl.style.left="-"+t.scrollLeft+"px",this.em.trigger("canvasScroll")},renderScripts:function(){var t=this.frame,e=this;t.el.onload=function(){function n(i){if(i.length>0){var r=document.createElement("script");r.type="text/javascript",r.src=i.shift(),r.onerror=r.onload=n.bind(null,i),t.el.contentDocument.head.appendChild(r)}else e.renderBody()}var i=e.config.scripts.slice(0);n(i)}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=a(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),o=e.get("Config"),s=this.config,l=o.protectedCss,c="";s.styles.forEach(function(t){c+=''});var u="\n "+(e.config.baseCss||"")+"\n\n ."+n+"dashed *[data-highlightable] {\n outline: 1px dashed rgba(170,170,170,0.7);\n outline-offset: -2px;\n }\n\n ."+n+"comp-selected {\n outline: 3px solid #3b97e3 !important;\n outline-offset: -3px;\n }\n\n ."+n+"comp-selected-parent {\n outline: 2px solid #ffca6f !important\n }\n\n ."+n+"no-select {\n user-select: none;\n -webkit-user-select:none;\n -moz-user-select: none;\n }\n\n ."+n+"freezed {\n opacity: 0.5;\n pointer-events: none;\n }\n\n ."+n+"no-pointer {\n pointer-events: none;\n }\n\n ."+n+"plh-image {\n background: #f5f5f5;\n border: none;\n height: 50px;\n width: 50px;\n display: block;\n outline: 3px solid #ffca6f;\n cursor: pointer;\n outline-offset: -2px\n }\n\n ."+n+"grabbing {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n "+(o.canvasCss||"")+"\n "+(l||"")+"\n ";c&&i.append(c),i.append(""),i.append(t.render()).append(r.render()),i.append(this.getJsContainer()),e.trigger("loaded"),this.frame.el.contentWindow.onscroll=this.onFrameScroll,this.frame.udpateOffset();var h=document,d=this.frame.el.contentDocument,f=function(t,e){var n=void 0;try{n=new window[e](t.type,t)}catch(t){n=document.createEvent(e),n.initEvent(t.type,!0,!0)}return n.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(n,t,{get:function(){return this.keyCodeVal}})}),n};[{event:"keydown keyup",class:"KeyboardEvent"}].forEach(function(t){return t.event.split(" ").forEach(function(e){d.addEventListener(e,function(e){return h.dispatchEvent(f(e,t.class))})})})}},offset:function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument.body;return{top:e.top+n.scrollTop,left:e.left+n.scrollLeft,width:e.width,height:e.height}},clearOff:function(){this.frmOff=null,this.cvsOff=null},getFrameOffset:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.frmOff&&!t||(this.frmOff=this.offset(this.frame.el)),this.frmOff},getCanvasOffset:function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},getElementPos:function(t,e){var n=e||{},i=this.getFrameOffset(),r=this.getCanvasOffset(),o=this.offset(t),s=n.avoidFrameOffset?0:i.top,a=n.avoidFrameOffset?0:i.left;return{top:o.top+s-r.top,left:o.left+a-r.left,height:t.offsetHeight||t.clientHeight,width:t.offsetWidth||t.clientWidth}},getPosition:function(){var t=this.frame.el.contentDocument;if(t){var e=t.body,n=this.getFrameOffset(),i=this.getCanvasOffset();return{top:n.top+e.scrollTop-i.top,left:n.left+e.scrollLeft-i.left}}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=a("
"),this.getJsContainer().appendChild(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html("");var i=document.createElement("script");i.innerHTML="\n setTimeout(function() {\n var item = document.getElementById('"+n+"');\n if (!item) return;\n (function(){\n "+e.getScriptString()+";\n }.bind(item))()\n }, 1);",setTimeout(function(){return t.scriptContainer.get(0).appendChild(i)},0)},getJsContainer:function(){return this.jsContainer||(this.jsContainer=a('
').get(0)),this.jsContainer},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 t=this.frame;0===this.config.scripts.length?t.el.onload=this.renderBody:this.renderScripts()}var e=this.ppfx;this.$el.append('\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n ');var n=this.el,i=n.querySelector("#"+e+"tools");return this.hlEl=n.querySelector("."+e+"highlighter"),this.badgeEl=n.querySelector("."+e+"badge"),this.placerEl=n.querySelector("."+e+"placeholder"),this.ghostEl=n.querySelector("."+e+"ghost"),this.toolbarEl=n.querySelector("."+e+"toolbar"),this.resizerEl=n.querySelector("."+e+"resizer"),this.offsetEl=n.querySelector("."+e+"offset-v"),this.fixedOffsetEl=n.querySelector("."+e+"offset-fixed-v"),this.toolsEl=i,this.el.className=this.className,this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(1),r="transitionend oTransitionEnd transitionend webkitTransitionEnd";t.exports=n(0).View.extend({tagName:"iframe",attributes:{allowfullscreen:"allowfullscreen"},initialize:function(t){(0,i.bindAll)(this,"udpateOffset"),this.config=t.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.listenTo(this.em,"change:device",this.updateDim)},updateDim:function(t){var e=this.em,n=e.getDeviceModel(),i=this.el.style,o=i.width||"",s=i.height||"",a=n?n.get("width"):"",l=n?n.get("height"):"",c=o==a&&s==l;i.width=a,i.height=l,this.udpateOffset(),e.stopDefault({preserveSelected:1}),c?this.udpateOffset():this.$el.on(r,this.udpateOffset)},udpateOffset:function(){var t=this.em,e=t.get("Canvas").getOffset();t.set("canvasOffset",e),t.runDefault({preserveSelected:1}),this.$el.off(r,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}})},function(t,e,n){"use strict";function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e2&&void 0!==arguments[2]?arguments[2]:{},o=n.component||t.getSelectedAll();return o=(0,r.isArray)(o)?[].concat(i(o)):[o],t.select(null),o.forEach(function(t){if(!t||!t.get("removable"))return void console.warn("The element is not removable",t);if(t){var e=t.collection;e&&e.remove(t)}}),o},e.em&&(e.model=e.em.get("Canvas")),this.loadDefaultCommands(),this},add:c,get:function(t){var n=o[t];return"function"==typeof n&&(n=new n(e),o[t]=n),n},has:function(t){return!!o[t]},loadDefaultCommands:function(){for(var t in s)this.add(t,s[t]);return this}}}},function(t,e,n){"use strict";t.exports={ESCAPE_KEY:27,stylePrefix:"com-",defaults:[],em:null,firstCentered:!0,newFixedH:!1,minComponentH:50,minComponentW:50}},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=r.default.$;t.exports=r.default.View.extend({initialize:function(t){this.config=t||{},this.editorModel=this.em=this.config.em||{},this.pfx=this.config.stylePrefix,this.ppfx=this.config.pStylePrefix,this.hoverClass=this.pfx+"hover",this.badgeClass=this.pfx+"badge",this.plhClass=this.pfx+"placeholder",this.freezClass=this.ppfx+"freezed",this.canvas=this.em.get&&this.em.get("Canvas"),this.em.get&&this.setElement(this.getCanvas()),this.canvas&&(this.$canvas=this.$el,this.$wrapper=o(this.getCanvasWrapper()),this.frameEl=this.canvas.getFrameEl(),this.canvasTool=this.getCanvasTools(),this.bodyEl=this.getCanvasBody()),this.init(this.config)},onFrameScroll:function(t){},getCanvas:function(){return this.canvas.getElement()},getCanvasBody:function(){return this.canvas.getBody()},getCanvasWrapper:function(){return this.canvas.getWrapperEl()},getCanvasTools:function(){return this.canvas.getToolsEl()},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+t.ownerDocument.body.scrollTop,left:e.left+t.ownerDocument.body.scrollLeft}},init:function(t){},callRun:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id;if(t.trigger("run:"+n+":before",e),e&&e.abort)return void t.trigger("abort:"+n,e);var i=this.run(t,t,e);return t.trigger("run:"+n,i,e),i},callStop:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id;t.trigger("stop:"+n+":before",e);var i=this.stop(t,t,e);return t.trigger("stop:"+n,i,e),i},run:function(t,e){},stop:function(t,e){}})},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=r.default.$;t.exports={run:function(t,e){arguments.length>2&&void 0!==arguments[2]&&arguments[2];e&&e.set&&e.set("active",0);var n=t.getConfig(),i=t.Modal,r=n.stylePrefix;if(this.cm=t.CodeManager||null,!this.$editors){var s=this.buildEditor("htmlmixed","hopscotch","HTML"),a=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=s.el,this.cssEditor=a.el;var l=o('
');l.append(s.$el).append(a.$el),this.$editors=l}i.setTitle(n.textViewCode),i.setContent(this.$editors),i.open(),this.htmlEditor.setContent(t.getHtml()),this.cssEditor.setContent(t.getCss())},stop:function(t){var e=t.Modal;e&&e.close()},buildEditor:function(t,e,n){var i=document.createElement("textarea");!this.codeMirror&&(this.codeMirror=this.cm.getViewer("CodeMirror"));var r=this.codeMirror.clone().set({label:n,codeName:t,theme:e,input:i}),o=new this.cm.EditorView({model:r,config:this.cm.getConfig()}).render().$el;return r.init(i),{el:r,$el:o}}}},function(t,e,n){"use strict";var i=(n(0),n(50)),r=n(195);t.exports=i.extend({itemView:r,initialize:function(t){this.config={editor:t.editor||""},this.listenTo(this.collection,"reset",this.render)}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.View.extend({events:function(){return this.model.get("events")||{mousedown:"handleClick"}},attributes:function(){return this.model.get("attributes")},initialize:function(t){this.editor=t.config.editor},handleClick:function(t){t.preventDefault(),t.stopPropagation(),this.execCommand(t)},execCommand:function(t){var e={event:t},n=this.model.get("command"),i=this.editor;"function"==typeof n&&n(i,null,e),"string"==typeof n&&i.runCommand(n,e)},render:function(){var t=this.editor.getConfig();return this.el.className+=" "+t.stylePrefix+"toolbar-item",this}})},function(t,e,n){"use strict";var i=n(0),r=n(197);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{command:"",attributes:{}}})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(1),o=i(r),s=n(0),a=i(s),l=n(22),c=a.default.$;t.exports=o.default.extend({},l,{init:function(t){o.default.bindAll(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=c(t.target);e.data("model").get("removable")&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),c(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=c(t.target);e.data("model").get("removable")&&(e.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html("Remove "+t.getName())}})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(1),o=i(r),s=n(0),a=(i(s),n(58));t.exports=o.default.extend({},a,{beforeInsert:function(t){t.type="image",t.style={},t.attributes={},t.attributes.onmousedown="return false",this.config.firstCentered&&this.getCanvasWrapper()==this.sorter.target&&(t.style.margin="0 auto")},afterInsert:function(t){t.trigger("dblclick"),this.sender&&this.sender.set("active",!1)}})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(1),o=i(r),s=n(0),a=i(s),l=n(2),c=n(22),u=n(57),h=a.default.$;t.exports=o.default.extend({},u,c,{init:function(t){c.init.apply(this,arguments),o.default.bindAll(this,"initSorter","rollback","onEndMove"),this.opt=t,this.hoverClass=this.ppfx+"highlighter-warning",this.badgeClass=this.ppfx+"badge-warning",this.noSelClass=this.ppfx+"no-select"},enable:function(){for(var t=arguments.length,e=Array(t),n=0;n
"),this.$cn2=o("
"),this.$cn.append(this.$cn2);var r=t.DeviceManager;if(r&&n.showDevices){i.addPanel({id:"devices-c"}).set("appendContent",r.render()).trigger("change:appendContent")}var s=t.SelectorManager;s&&this.$cn2.append(s.render([])),this.$cn2.append(t.StyleManager.render());var a=t.StyleManager.getConfig(),l=a.stylePrefix;this.$header=o('
'+a.textNoElement+"
"),this.$cn.append(this.$header),i.getPanel("views-container")?this.panel=i.getPanel("views-container"):this.panel=i.addPanel({id:"views-container"}),this.panel.set("appendContent",this.$cn).trigger("change:appendContent"),this.target=t.editor,this.listenTo(this.target,"component:toggled",this.toggleSm)}this.toggleSm()},toggleSm:function(){var t=this.target,e=this.sender;e&&e.get&&!e.get("active")||(1===t.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";var i=n(0).$;t.exports={run:function(t,e){this.sender=e;var n,r=t.Config,o=r.stylePrefix,s=t.TraitManager;if(!this.$cn){var a=s.getTraitsViewer(),l=s.getConfig();this.$cn=i("
"),this.$cn2=i("
"),this.$cn.append(this.$cn2),this.$header=i("
").append('
'+l.textNoElement+"
"),this.$cn.append(this.$header),this.$cn2.append('
'+l.labelContainer+"
"),this.$cn2.append(a.render().el);var c=t.Panels;n=c.getPanel("views-container")?c.getPanel("views-container"):c.addPanel({id:"views-container"}),n.set("appendContent",this.$cn.get(0)).trigger("change:appendContent"),this.target=t.getModel(),this.listenTo(this.target,"component:toggled",this.toggleTm)}this.toggleTm()},toggleTm:function(){var t=this.sender;t&&t.get&&!t.get("active")||(1===this.target.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";t.exports={run:function(t,e){var n=t.BlockManager,i=t.Panels;if(!this.blocks){n.render();var r="views-container",o=document.createElement("div"),s=i.getPanel(r)||i.addPanel({id:r});o.appendChild(n.getContainer()),s.set("appendContent",o).trigger("change:appendContent"),this.blocks=o}this.blocks.style.display="block"},stop:function(){var t=this.blocks;t&&(t.style.display="none")}}},function(t,e,n){"use strict";t.exports={run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.Modal,r=t.AssetManager,o=r.getConfig(),s=r.getContainer(),a=n.modalTitle||o.modalTitle||"",l=n.types,c=n.accept;if(r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),!this.rendered||l){var u=r.getAll();l&&(u=u.filter(function(t){return-1!==l.indexOf(t.get("type"))})),r.render(u),this.rendered=1}if(c){var h=s.querySelector("input#"+o.stylePrefix+"uploadFile");h&&h.setAttribute("accept",c)}i.setTitle(a),i.setContent(s),i.open()}}},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=r.default.$;t.exports={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,n){var i=n||{},r=i.state||"",s=t.getConfig();if(s.showOffsets&&(s.showOffsetsSelected||"Fixed"!=r)){var a=t.Canvas,l=i.el||"",c=i.elPos||a.getElementPos(l),u=window.getComputedStyle(l),h=this.ppfx,d=r+"State",f=this.getOffsetMethod(r),p=a[f]();p.style.display="block";var g=this["marginT"+r],v=this["marginB"+r],m=this["marginL"+r],y=this["marginR"+r],b=this["padT"+r],x=this["padB"+r],w=this["padL"+r],C=this["padR"+r];if(!this[d]){var k=r.toLowerCase(),S=k+"margin-v",T=k+"padding-v",E=o('
').get(0),M=o('
').get(0),A=h+S+"-el",O=h+T+"-el",P=A+" "+(h+S),L=O+" "+(h+T);g=o('
').get(0),v=o('
').get(0),m=o('
').get(0),y=o('
').get(0),b=o('
').get(0),x=o('
').get(0),w=o('
').get(0),C=o('
').get(0),this["marginT"+r]=g,this["marginB"+r]=v,this["marginL"+r]=m,this["marginR"+r]=y,this["padT"+r]=b,this["padB"+r]=x,this["padL"+r]=w,this["padR"+r]=C,E.appendChild(g),E.appendChild(v),E.appendChild(m),E.appendChild(y),M.appendChild(b),M.appendChild(x),M.appendChild(w),M.appendChild(C),p.appendChild(E),p.appendChild(M),this[d]="1"}var _=u.marginLeft.replace("px",""),N=parseInt(u.marginTop.replace("px","")),D=parseInt(u.marginBottom.replace("px","")),I=g.style,F=v.style,R=m.style,z=y.style,H=b.style,V=x.style,j=w.style,$=C.style,B=parseInt(c.left);I.height=u.marginTop,I.width=u.width,I.top=c.top-u.marginTop.replace("px","")+"px",I.left=B+"px",F.height=u.marginBottom,F.width=u.width,F.top=c.top+c.height+"px",F.left=B+"px";var W=c.height+N+D+"px",U=c.top-N+"px";R.height=W,R.width=u.marginLeft,R.top=U,R.left=B-_+"px",z.height=W,z.width=u.marginRight,z.top=U,z.left=B+c.width+"px";var q=parseInt(u.paddingTop.replace("px",""));H.height=u.paddingTop,H.width=u.width,H.top=c.top+"px",H.left=B+"px";var K=parseInt(u.paddingBottom.replace("px",""));V.height=u.paddingBottom,V.width=u.width,V.top=c.top+c.height-K+"px",V.left=B+"px";var G=c.height-K-q+"px",Y=c.top+q+"px";j.height=G,j.width=u.paddingLeft,j.top=Y,j.left=c.left+"px";var X=parseInt(u.paddingRight.replace("px",""));$.height=G,$.width=u.paddingRight,$.top=Y,$.left=c.left+c.width-X+"px"}},stop:function(t,e,n){var i=n||{},r=i.state||"",o=this.getOffsetMethod(r);t.Canvas[o]().style.display="none"}}},function(t,e,n){"use strict";t.exports={run:function(t){for(var e=t.getSelected(),n=e&&e.parent();n&&!n.get("selectable");)n=n.parent();n&&t.select(n)}}},function(t,e,n){"use strict";t.exports={isEnabled:function(){var t=document;return t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement?1:0},enable:function(t){var e="";return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?(e="webkit",t.webkitRequestFullscreen()):t.mozRequestFullScreen?(e="moz",t.mozRequestFullScreen()):t.msRequestFullscreen?t.msRequestFullscreen():console.warn("Fullscreen not supported"),e},disable:function(){var t=document;t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen()},fsChanged:function(t,e){var n=(document,(t||"")+"fullscreenchange");this.isEnabled()||(this.stop(null,this.sender),document.removeEventListener(n,this.fsChanged))},run:function(t,e){this.sender=e;var n=this.enable(t.getContainer());this.fsChanged=this.fsChanged.bind(this,n),document.addEventListener(n+"fullscreenchange",this.fsChanged),t&&t.trigger("change:canvasOffset")},stop:function(t,e){e&&e.set&&e.set("active",!1),this.disable(),t&&t.trigger("change:canvasOffset")}}},function(t,e,n){"use strict";var i=n(1),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanelsEl()),this.panels},tglPointers:function(t,e){var n=t.Canvas.getBody().querySelectorAll("."+this.ppfx+"no-pointer");r.default.each(n,function(t){t.style.pointerEvents=e?"":"all"})},run:function(t,e){e&&e.set&&e.set("active",!1),t.stopCommand("sw-visibility"),t.getModel().stopDefault();var n=this.getPanels(t),i=t.Canvas.getElement(),r=t.getEl(),o=t.Config.stylePrefix;this.helper||(this.helper=document.createElement("span"),this.helper.className=o+"off-prv fa fa-eye-slash",r.appendChild(this.helper),this.helper.onclick=function(){t.stopCommand("preview")}),this.helper.style.display="inline-block",this.tglPointers(t),n.style.display="none";var s=i.style;s.width="100%",s.height="100%",s.top="0",s.left="0",s.padding="0",s.margin="0",t.trigger("change:canvasOffset")},stop:function(t,e){var n=this.getPanels(t);t.runCommand("sw-visibility"),t.getModel().runDefault(),n.style.display="block",t.Canvas.getElement().setAttribute("style",""),this.helper&&(this.helper.style.display="none"),t.trigger("change:canvasOffset"),this.tglPointers(t,1)}}},function(t,e,n){"use strict";t.exports={run:function(t,e,n){var i=n||{},r=i.el||"",o=t.Canvas,s=this.canvasResizer,a=i.options||{},l=o.getCanvasView();return a.ratioDefault=1,a.appendTo=o.getResizerEl(),a.prefix=t.getConfig().stylePrefix,a.posFetcher=l.getElementPos.bind(l),a.mousePosFetcher=o.getMouseRelativePos,s&&!i.forceNew||(this.canvasResizer=t.Utils.Resizer.init(a),s=this.canvasResizer),s.setOptions(a),s.blur(),s.focus(r),s},stop:function(){var t=this.canvasResizer;t&&t.blur()}}},function(t,e,n){"use strict";t.exports={run:function(t,e,n){var i=n&&n.el||"",r=t.Canvas,o=this.dragger,s=n.options||{},a=r.getCanvasView();return s.prefix=t.getConfig().stylePrefix,s.mousePosFetcher=r.getMouseRelativePos,s.posFetcher=a.getElementPos.bind(a),o||(o=t.Utils.Dragger.init(s),this.dragger=o),o.setOptions(s),o.focus(i),s.event&&o.start(s.event),o},stop:function(){this.canvasResizer&&this.canvasResizer.blur()}}},function(t,e,n){"use strict";function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e=0?r:t)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";t.exports={run:function(t){if(t.Canvas.hasFocus()&&!t.getModel().isEditing()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.components(),i=n&&n.at(0);i&&e.push(i)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";t.exports={run:function(t){if(t.Canvas.hasFocus()&&!t.getModel().isEditing()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.parent();n&&e.push(n)}),e.length&&t.select(e)}}}},function(t,e,n){"use strict";var i=n(1);t.exports=function(){var t,e,r,o={},s=n(221),a=n(222),l=n(224),c=n(225),u=[];return{name:"BlockManager",init:function(n){o=n||{};var i=o.em;for(var h in s)h in o||(o[h]=s[h]);return t=new a([]),e=new a([]),u=new l,r=new c({collection:e,categories:u},o),t.listenTo(t,"add",function(t){e.add(t),i&&i.trigger("block:add",t)}),t.listenTo(t,"remove",function(t){e.remove(t),i&&i.trigger("block:remove",t)}),t.listenTo(t,"reset",function(t){e.reset(t.models)}),this},getConfig:function(){return o},onLoad:function(){var t=this.getAll();!t.length&&t.reset(o.blocks)},postRender:function(){var t=this.getConfig().appendTo;if(t){((0,i.isElement)(t)?t:document.querySelector(t)).appendChild(this.render())}},add:function(e,n){var i=n||{};return i.id=e,t.add(i)},get:function(e){return t.get(e)},getAll:function(){return t},getAllVisible:function(){return e},remove:function(e){return t.remove(e)},getCategories:function(){return u},getContainer:function(){return r.el},render:function(t){var e=t||this.getAll().models;return r.rendered||(r.render(),r.rendered=1),r.collection.reset(e),this.getContainer()}}}},function(t,e,n){"use strict";t.exports={appendTo:"",blocks:[]}},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(223);t.exports=r.default.Collection.extend({model:o})},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(59);t.exports=r.default.Model.extend({defaults:{activate:0,select:0,resetId:0,label:"",content:"",category:"",attributes:{}},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("category"));if(t&&"string"==typeof t){new o({id:t,label:t})}}})},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=r.default.Collection.extend({model:n(59)})},function(t,e,n){"use strict";var i=n(1),r=n(226),o=n(227);t.exports=n(0).View.extend({initialize:function(t,e){(0,i.bindAll)(this,"getSorter","onDrag","onDrop"),this.config=e||{},this.categories=t.categories||"",this.renderedCategories=[];var n=this.config.pStylePrefix||"";this.ppfx=n,this.noCatClass=n+"blocks-no-cat",this.blockContClass=n+"blocks-c",this.catsClass=n+"block-categories";var r=this.collection;this.listenTo(r,"add",this.addTo),this.listenTo(r,"reset",this.render),this.em=this.config.em,this.tac="test-tac",this.grabbingCls=this.ppfx+"grabbing",this.em&&(this.config.getSorter=this.getSorter,this.canvas=this.em.get("Canvas"))},getSorter:function(){if(this.em){if(!this.sorter){var t=this.em.get("Utils"),e=this.canvas;this.sorter=new t.Sorter({container:e.getBody(),placer:e.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onStart:this.onDrag,onEndMove:this.onDrop,onMove:this.onMove,document:e.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1,em:this.em,canvasRelative:1})}return this.sorter}},onDrag:function(t){this.em.stopDefault(),this.em.trigger("block:drag:start",t)},onMove:function(t){this.em.trigger("block:drag:move",t)},onDrop:function(t){var e=this.em;e.runDefault(),t&&t.get&&(t.get("activeOnRender")&&(t.trigger("active"),t.set("activeOnRender",0)),e.trigger("block:drag:stop",t))},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,s=new r({model:t,attributes:t.get("attributes")},this.config),a=s.render().el,l=t.get("category");if(l&&this.categories){(0,i.isString)(l)?l={id:l,label:l}:(0,i.isObject)(l)&&!l.id&&(l.id=l.label);var c=this.categories.add(l),u=c.get("id"),h=this.renderedCategories[u],d=this.getCategoriesEl();return t.set("category",c),!h&&d&&(h=new o({model:c},this.config).render(),this.renderedCategories[u]=h,d.appendChild(h.el)),void(h&&h.append(a))}n?n.appendChild(a):this.append(a)},getCategoriesEl:function(){return this.catsEl||(this.catsEl=this.el.querySelector("."+this.catsClass)),this.catsEl},getBlocksEl:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector("."+this.noCatClass+" ."+this.blockContClass)),this.blocksEl},append:function(t){var e=this.getBlocksEl();e&&e.appendChild(t)},render:function(){var t=this,e=this.ppfx,n=document.createDocumentFragment();this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n ',this.collection.each(function(e){return t.add(e,n)}),this.append(n);var i=this.blockContClass+"s "+e+"one-bg "+e+"two-color";return this.$el.addClass(i),this}})},function(t,e,n){"use strict";var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1),s=n(2);t.exports=r.default.View.extend({events:{mousedown:"startDrag",dragstart:"handleDragStart",drag:"handleDrag",dragend:"handleDragEnd"},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.em=e.em,this.config=e,this.endDrag=this.endDrag.bind(this),this.ppfx=e.pStylePrefix||"",this.listenTo(this.model,"destroy remove",this.remove)},startDrag:function(t){var e=this.config;if(0===t.button&&e.getSorter&&!this.el.draggable){e.em.refreshCanvas();var n=e.getSorter();n.setDragHelper(this.el,t),n.setDropContent(this.model.get("content")),n.startSort(this.el),(0,s.on)(document,"mouseup",this.endDrag)}},handleDragStart:function(t){var e=this.em,n=this.model,i=n.get("content"),r=(0,o.isObject)(i),s=r?JSON.stringify(i):i;t.dataTransfer.setData("text",s),e.set("dragContent",i),e.trigger("block:drag:start",n,t)},handleDrag:function(t){this.em.trigger("block:drag",this.model,t)},handleDragEnd:function(){var t=this.em,e=this.model,n=t.get("dragResult");if(n){var i=n.get&&n.get("activeOnRender");(e.get("activate")||i)&&(n.trigger("active"),n.set("activeOnRender",0)),e.get("select")&&t.setSelected(n),e.get("resetId")&&n.onAll(function(t){return t.resetId()})}t.set({dragResult:null,dragContent:null}),t.trigger("block:drag:stop",n,e)},endDrag:function(t){(0,s.off)(document,"mouseup",this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.el,e=this.ppfx,n=e+"block",i=this.model.get("label");return t.className+=" "+n+" "+e+"one-bg "+e+"four-color-h",t.innerHTML='
'+i+"
",t.title=t.textContent.trim(),(0,s.hasDnd)(this.em)&&t.setAttribute("draggable",!0),this}})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(1),o=i(r),s=n(0),a=i(s);t.exports=a.default.View.extend({template:o.default.template('\n
\n \n <%= label %>\n
\n
\n '),events:{},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});this.config=t;var e=this.config.pStylePrefix||"";this.pfx=e,this.caretR="fa fa-caret-right",this.caretD="fa fa-caret-down",this.iconClass=e+"caret-icon",this.activeClass=e+"open",this.className=e+"block-category",this.events["click ."+e+"title"]="toggle",this.listenTo(this.model,"change:open",this.updateVisibility),this.delegateEvents()},updateVisibility:function(){this.model.get("open")?this.open():this.close()},open:function(){this.el.className=this.className+" "+this.activeClass,this.getIconEl().className=this.iconClass+" "+this.caretD,this.getBlocksEl().style.display=""},close:function(){this.el.className=this.className,this.getIconEl().className=this.iconClass+" "+this.caretR,this.getBlocksEl().style.display="none"},toggle:function(){var t=this.model;t.set("open",!t.get("open"))},getIconEl:function(){return this.iconEl||(this.iconEl=this.el.querySelector("."+this.iconClass)),this.iconEl},getBlocksEl:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector("."+this.pfx+"blocks-c")),this.blocksEl},append:function(t){this.getBlocksEl().appendChild(t)},render:function(){return this.el.innerHTML=this.template({pfx:this.pfx,label:this.model.get("label")}),this.el.className=this.className,this.$el.css({order:this.model.get("order")}),this.updateVisibility(),this}})},function(t,e,n){"use strict";var i=n(1);t.exports=function(t){var e=t.$,n=t.Backbone;if(n){var r=n.View.prototype,o={};r.eventNsMap=o,r.delegate=function(t,e,n){var i=".delegateEvents"+this.cid;this.$el.on(t,e,n);var r=o[i];return r||(r=[],o[i]=r),r.push({eventName:t,selector:e,listener:n}),this},r.undelegateEvents=function(){var t=this,e=".delegateEvents"+this.cid;if(this.$el){var n=o[e];n&&n.forEach(function(e){var n=e.eventName;e.selector,e.listener;t.$el.off(n)})}return this},r.undelegate=function(t,e,n){var i=this,r=".delegateEvents"+this.cid,s=o[r];return s&&s.forEach(function(n){var r=n.eventName,o=n.selector;n.listener;r==t&&o==e&&i.$el.off(r)}),this}}if(e&&"jQuery"!==e.prototype.constructor.name){var s=e.fn,a=e.prototype.on,l=e.prototype.off,c=e.prototype.trigger,u=e.prototype.offset,h=function(t){return t.split(/[,\s]+/g)},d=function(t){return t.split(".")};s.on=function(t,e,n,i){var r=this;if("string"==typeof t){var o=h(t);if(1==o.length){t=o[0];var s=d(t);if(0!==t.indexOf(".")&&(t=s[0]),s=s.slice(1),s.length){this.data("_cashNs");this.data("_cashNs",s)}return a.call(this,t,e,n,i)}return o.forEach(function(t){return r.on(t,e,n,i)}),this}return a.call(this,t,e,n,i)},s.off=function(t,e){var n=this;if("string"==typeof t){var i=h(t);if(1==i.length){t=i[0];var r=d(t);return 0!==t.indexOf(".")&&(t=r[0]),r=r.slice(1),r.length,l.call(this,t,e)}return i.forEach(function(t){return n.off(t,e)}),this}return l.call(this,t,e)},s.trigger=function(t,n){var i=this;if(t instanceof e.Event)return this.trigger(t.type,n);if("string"==typeof t){var r=h(t);if(1==r.length){t=r[0];var o=d(t);return 0!==t.indexOf(".")&&(t=o[0]),o=o.slice(1),o.length,c.call(this,t,n)}return r.forEach(function(t){return i.trigger(t,n)}),this}return c.call(this,t,n)},s.hide=function(){return this.css("display","none")},s.show=function(){return this.css("display","block")},s.focus=function(){var t=this.get(0);return t&&t.focus(),this},s.removeClass=function(t){if(!arguments.length)return this.attr("class","");var e=(0,i.isString)(t)&&t.match(/\S+/g);return e?this.each(function(t){(0,i.each)(e,function(e){if(t.classList)t.classList.remove(e);else{var n=t.className,r=t.className.baseVal;(0,i.isUndefined)(r)?t.className=n.replace(e,""):n.baseVal=r.replace(e,"")}})}):this},s.remove=function(){return this.each(function(t){return t.parentNode&&t.parentNode.removeChild(t)})},s.bind=function(t,e){return this.on(t,e)},s.unbind=function(t,e){if((0,i.isObject)(t)){for(var n in t)t.hasOwnProperty(n)&&this.off(n,t[n]);return this}return this.off(t,e)},s.click=function(t){return t?this.on("click",t):this.trigger("click")},s.change=function(t){return t?this.on("change",t):this.trigger("change")},s.keydown=function(t){return t?this.on("keydown",t):this.trigger("keydown")},s.delegate=function(t,e,n,i){return i||(i=n),this.on(e,t,function(t){t.data=n,i(t)})},s.scrollLeft=function(){var t=this.get(0);t=9==t.nodeType?t.defaultView:t;var e=t instanceof Window?t:null;return e?e.pageXOffset:t.scrollLeft||0},s.scrollTop=function(){var t=this.get(0);t=9==t.nodeType?t.defaultView:t;var e=t instanceof Window?t:null;return e?e.pageYOffset:t.scrollTop||0},s.offset=function(t){var e=void 0,n=void 0;return t&&(e=t.top,n=t.left),void 0!==e&&this.css("top",e+"px"),void 0!==n&&this.css("left",n+"px"),u.call(this)},e.map=function(t,e){for(var n=[],i=0;it.maximumStackLength&&(t.shift(),t.pointer--)}}}a.prototype={isRegistered:function(e){return e&&e.cid?this.registeredObjects[e.cid]:t.contains(this.registeredObjects,e)},register:function(t){return!this.isRegistered(t)&&(t&&t.cid?(this.registeredObjects[t.cid]=t,this.cidIndexes.push(t.cid)):this.registeredObjects.push(t),!0)},unregister:function(e){if(this.isRegistered(e)){if(e&&e.cid)delete this.registeredObjects[e.cid],this.cidIndexes.splice(t.indexOf(this.cidIndexes,e.cid),1);else{var n=t.indexOf(this.registeredObjects,e);this.registeredObjects.splice(n,1)}return!0}return!1},get:function(){return t.map(this.cidIndexes,function(t){return this.registeredObjects[t]},this).concat(this.registeredObjects)}};var d={add:{undo:function(t,e,n,i){t.remove(n,i)},redo:function(t,e,n,i){i.index&&(i.at=i.index),t.add(n,i)},on:function(e,n,i){return{object:n,before:void 0,after:e,options:t.clone(i)}}},remove:{undo:function(t,e,n,i){"index"in i&&(i.at=i.index),t.add(e,i)},redo:function(t,e,n,i){t.remove(e,i)},on:function(e,n,i){return{object:n,before:e,after:void 0,options:t.clone(i)}}},change:{undo:function(e,n,i,r){t.isEmpty(n)?t.each(t.keys(i),e.unset,e):(e.set(n),r&&r.unsetData&&r.unsetData.before&&r.unsetData.before.length&&t.each(r.unsetData.before,e.unset,e))},redo:function(e,n,i,r){t.isEmpty(i)?t.each(t.keys(n),e.unset,e):(e.set(i),r&&r.unsetData&&r.unsetData.after&&r.unsetData.after.length&&t.each(r.unsetData.after,e.unset,e))},on:function(e,n){var i=e.changedAttributes(),r=t.keys(i),o=t.pick(e.previousAttributes(),r),s=t.keys(o),a=(n||(n={})).unsetData={after:[],before:[]};return r.length!=s.length&&(r.length>s.length?t.each(r,function(t){t in o||a.before.push(t)},this):t.each(s,function(t){t in i||a.after.push(t)})),{object:e,before:o,after:i,options:t.clone(n)}}},reset:{undo:function(t,e,n){t.reset(e)},redo:function(t,e,n){t.reset(n)},on:function(e,n){return{object:e,before:n.previousModels,after:t.clone(e.models)}}}};function f(){}function p(e,n,i,r){if("object"==typeof n)return t.each(n,function(t,n){2===e?p(e,t,i,r):p(e,n,t,i)});switch(e){case 0:o(i,"undo","redo","on")&&t.all(t.pick(i,"undo","redo","on"),t.isFunction)&&(r[n]=i);break;case 1:r[n]&&t.isObject(i)&&(r[n]=t.extend({},r[n],i));break;case 2:delete r[n]}return this}f.prototype=d;var g=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){c("undo",this.attributes)},redo:function(t){c("redo",this.attributes)}}),v=e.Collection.extend({model:g,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(t){this.maximumStackLength=t}}),m=e.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(e){this.stack=new v,this.objectRegistry=new a,this.undoTypes=new f,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",function(t,e){this.stack.setMaxLength(e)},this),e&&e.track&&this.startTracking(),e&&e.register&&(t.isArray(e.register)||t.isArguments(e.register)?i(this.register,this,e.register):this.register(e.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")},_addToStack:function(t){h(this.stack,t,r(arguments,1),this.undoTypes)},register:function(){l("on",arguments,this._addToStack,this)},unregister:function(){l("off",arguments,this._addToStack,this)},unregisterAll:function(){i(this.unregister,this,this.objectRegistry.get())},undo:function(t){u("undo",this,this.stack,t)},undoAll:function(){u("undo",this,this.stack,!1,!0)},redo:function(t){u("redo",this,this.stack,t)},redoAll:function(){u("redo",this,this.stack,!1,!0)},isAvailable:function(t){var e=this.stack,n=e.length;switch(t){case"undo":return n>0&&e.pointer>-1;case"redo":return n>0&&e.pointer0&&void 0!==arguments[0]?arguments[0]:{};n=i({},a,s),t=n.em,this.em=t,(e=new r.default({track:!0,register:[]})).changeUndoType("change",{condition:!1}),e.changeUndoType("add",{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.avoidStore)return{object:e,before:void 0,after:t,options:i({},n)}}}),e.changeUndoType("remove",{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.avoidStore)return{object:e,before:t,after:void 0,options:i({},n)}}});var l={on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!o&&(o=t.previousAttributes()),!n.avoidStore){var i={object:t,before:o,after:t.toJSON()};return o=null,i}},undo:function(t,e,n,i){t.set(e)},redo:function(t,e,n,i){t.set(n)}};return["style","attributes","content","src"].forEach(function(t){return e.addUndoType("change:"+t,l)}),e.on("undo redo",function(){return t.trigger("component:toggled change:canvasOffset")}),["undo","redo"].forEach(function(n){return e.on(n,function(){return t.trigger(n)})}),this},getConfig:function(){return n},add:function(t){return e.register(t),this},remove:function(t){return e.unregister(t),this},removeAll:function(){return e.unregisterAll(),this},start:function(){return e.startTracking(),this},stop:function(){return e.stopTracking(),this},undo:function(){return t.get("Canvas").isInputFocused()||e.undo(1),this},undoAll:function(){return e.undoAll(),this},redo:function(){return t.get("Canvas").isInputFocused()||e.redo(1),this},redoAll:function(){return e.redoAll(),this},hasUndo:function(){return e.isAvailable("undo")},hasRedo:function(){return e.isAvailable("redo")},getStack:function(){return e.stack},clear:function(){return e.clear(),this},getInstance:function(){return e}}}},function(t,e,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return e=r({},a,n),t=e.em,this.em=t,this},onLoad:function(){var t=e.defaults;for(var n in t){var i=t[n];this.add(n,i.keys,i.handler)}},add:function(t,e,r){var a=this.em,l=a.get("Commands"),c=a.getEditor(),u={id:t,keys:e,handler:r};return n[t]&&this.remove(t),n[t]=u,s(e,function(e,n){"object"==(void 0===(r=(0,o.isString)(r)?l.get(r):r)?"undefined":i(r))?r.run(c):r(c);var s=[t,n.shortcut,e];a.trigger.apply(a,["keymap:emit"].concat(s)),a.trigger.apply(a,["keymap:emit:"+t].concat(s))}),a.trigger("keymap:add",u),u},get:function(t){return n[t]},getAll:function(){return n},remove:function(t){var e=this.em,i=this.get(t);if(i)return delete n[t],s.unbind(i.keys),e&&e.trigger("keymap:remove",i),i}}}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(0)).default.$;t.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):function(t,e){var n=e||window,i=t.getBoundingClientRect();return{left:i.left+n.pageXOffset,top:i.top+n.pageYOffset,width:i.width,height:i.height}}(t)},init:function(t){return this.setOptions(t),this.handleMouseDown=this.handleMouseDown.bind(this),this.drag=this.drag.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),this.setKey("up, right, down, left",this.handleKey),this},setOptions:function(t){this.opts=t||{}},focus:function(t){if(!t||t!==this.el){this.getDocumentEl(t),this.blur(),this.el=t,this.handlers=this.opts.dragHandlers||[t];var e=this.getElementRect(t);this.elRect=e,this.startTop=e.top,this.startLeft=e.left,this.getDocumentEl().on("mousedown",this.handleMouseDown)}},blur:function(){this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null},start:function(t){this.startPos=this.getMousePos(t);var e=this.getDocumentEl();e.on("mousemove",this.drag),e.on("mouseup",this.stop);var n=this.opts.onStart;"function"==typeof n&&n(t,{docs:e,el:this.el,start:this.startPos,elRect:this.elRect}),this.drag(t)},stop:function(t){var e=this.getDocumentEl();e.off("mousemove",this.drag),e.off("mouseup",this.stop),this.lockedAxis=null;var n=this.opts.onEnd;"function"==typeof n&&n(t,{docs:e,delta:this.delta,end:{x:this.startLeft+this.delta.x,y:this.startTop+this.delta.y}})},handleMouseDown:function(t){var e=t.target;this.isHandler(e)&&this.start(t)},isHandler:function(t){var e=this.handlers;for(var n in e)if(e[n]===t)return!0;return!1},handleKey:function(t,e){switch(e.shortcut){case"up":this.move(0,-1);break;case"right":this.move(1,0);break;case"down":this.move(0,1);break;case"left":this.move(-1,0)}},getDocumentEl:function(t){t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=i(e)}return this.$doc},getMousePos:function(t){var e=this.opts.mousePosFetcher;return e?e(t):{x:t.clientX,y:t.clientY}},drag:function(t){var e=this.lockedAxis,n=this.getMousePos(t),i={x:n.x-this.startPos.x,y:n.y-this.startPos.y};if(t.shiftKey){if(!e){var r=i.x,o=i.y,s=Math.abs(r),a=Math.abs(o);o>=s||o<=-s?e="x":(r>a||r<-a)&&(e="y")}}else e=null;"x"===e&&(i.x=this.startPos.x),"y"===e&&(i.y=this.startPos.y),this.lockedAxis=e,this.delta=i,this.move(i.x,i.y);var l=this.opts.onDrag;"function"==typeof l&&l(t,{delta:i,current:{x:this.startLeft+i.x,y:this.startTop+i.y},lockedAxis:e}),0===t.which&&this.stop(t)},move:function(t,e){this.moveX(t),this.moveY(e)},moveX:function(t){var e=this.el,n=(this.opts,this.startLeft+t),i=this.opts.setX;"function"==typeof i?i(n,{el:e,start:this.startLeft,delta:t}):e.style.left=n+"px"},moveY:function(t){var e=this.el,n=(this.opts,this.startTop+t),i=this.opts.setY;"function"==typeof i?i(n,{el:e,start:this.startTop,delta:t}):e.style.top=n+"px"}}},function(t,e,n){"use strict";var i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.setOptions(e),(0,r.bindAll)(this,"handleKeyDown","handleMouseDown","move","stop"),this}return i(t,[{key:"getConfig",value:function(){return this.opts}},{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opts=(0,r.defaults)(t,s),this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=this.container;for(i||((i=document.createElement("div")).className=e+"resizer-c",n.appendChild(i),this.container=i);i.firstChild;)i.removeChild(i.firstChild);var r={};for(var o in["tl","tc","tr","cl","cr","bl","bc","br"].forEach(function(e){return r[e]=t[e]?function(t,e){var n=e.prefix||"",i=document.createElement("i");return i.className=n+"resizer-h "+n+"resizer-h-"+t,i.setAttribute("data-"+n+"handler",t),i}(e,t):""}),r){var s=r[o];s&&i.appendChild(s)}this.handlers=r,this.mousePosFetcher=t.mousePosFetcher,this.updateTarget=t.updateTarget,this.posFetcher=t.posFetcher,this.onStart=t.onStart,this.onMove=t.onMove,this.onEnd=t.onEnd}},{key:"toggleFrames",value:function(t){if(this.opts.silentFrames){var e=document.querySelectorAll("iframe");(0,r.each)(e,function(e){return e.style.pointerEvents=t?"none":""})}}},{key:"isHandler",value:function(t){var e=this.handlers;for(var n in e)if(e[n]===t)return!0;return!1}},{key:"getFocusedEl",value:function(){return this.el}},{key:"getDocumentEl",value:function(){return[this.el.ownerDocument,document]}},{key:"getElementPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.posFetcher||"";return n?n(t,e):function(t,e){var n=e||window,i=t.getBoundingClientRect();return{left:i.left+n.pageXOffset,top:i.top+n.pageYOffset,width:i.width,height:i.height}}(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.opts,n=this.getElementPos(t,{target:"container"}),i=this.container.style;e.avoidContainerUpdate||(i.left=n.left+"px",i.top=n.top+"px",i.width=n.width+"px",i.height=n.height+"px",i.display="block"),(0,o.on)(this.getDocumentEl(),"mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){this.container.style.display="none",this.el&&((0,o.off)(this.getDocumentEl(),"mousedown",this.handleMouseDown),this.el=null)}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.el,n=this.opts||{},i="data-"+n.prefix+"handler",s=this.getElementPos(e,{target:"el"});this.handlerAttr=t.target.getAttribute(i),this.clickedHandler=t.target,this.startDim={t:s.top,l:s.left,w:s.width,h:s.height},this.rectDim={t:s.top,l:s.left,w:s.width,h:s.height},this.startPos={x:t.clientX,y:t.clientY};var a=this.getDocumentEl();(0,o.on)(a,"mousemove",this.move),(0,o.on)(a,"keydown",this.handleKeyDown),(0,o.on)(a,"mouseup",this.stop),(0,r.isFunction)(this.onStart)&&this.onStart(t,{docs:a,config:n,el:e,resizer:this}),this.toggleFrames(1),this.move(t)}}},{key:"move",value:function(t){var e=this.onMove,n=this.mousePosFetcher,i=n?n(t):{x:t.clientX,y:t.clientY};this.currentPos=i,this.delta={x:i.x-this.startPos.x,y:i.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),e&&e(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.opts,n=this.getDocumentEl();(0,o.off)(n,"mousemove",this.move),(0,o.off)(n,"keydown",this.handleKeyDown),(0,o.off)(n,"mouseup",this.stop),this.updateRect(1),this.toggleFrames(),(0,r.isFunction)(this.onEnd)&&this.onEnd(t,{docs:n,config:e})}},{key:"updateRect",value:function(t){var e=this.el,n=this.opts,i=this.rectDim,o=this.container.style,s=this.updateTarget,a=this.getSelectedHandler(),l=n.unitHeight,c=n.unitWidth,u=n.keyWidth,h=n.keyHeight;if((0,r.isFunction)(s))s(e,i,{store:t,selectedHandler:a,resizer:this,config:n});else{var d=e.style;d[u]=i.w+c,d[h]=i.h+l}var f=this.getElementPos(e,{target:"container"});n.avoidContainerUpdate||(o.left=f.left+"px",o.top=f.top+"px",o.width=f.width+"px",o.height=f.height+"px")}},{key:"getSelectedHandler",value:function(){var t=this.handlers;if(this.selectedHandler)for(var e in t)if(t[e]===this.selectedHandler)return e}},{key:"handleKeyDown",value:function(t){27===t.keyCode&&(this.rectDim=this.startDim,this.stop(t))}},{key:"handleMouseDown",value:function(t){var e=t.target;this.isHandler(e)?(this.selectedHandler=e,this.start(t)):e!==this.el&&(this.selectedHandler="",this.blur())}},{key:"calc",value:function(t){var e=void 0,n=this.opts||{},i=n.step,r=this.startDim,s=n.minDim,a=n.maxDim,l=t.delta.x,c=t.delta.y,u=r.w,h=r.h,d={t:0,l:0,w:u,h:h};if(t){var f=t.handlerAttr;~f.indexOf("r")&&(e=(0,o.normalizeFloat)(u+l*i,i),e=Math.max(s,e),a&&(e=Math.min(a,e)),d.w=e),~f.indexOf("b")&&(e=(0,o.normalizeFloat)(h+c*i,i),e=Math.max(s,e),a&&(e=Math.min(a,e)),d.h=e),~f.indexOf("l")&&(e=(0,o.normalizeFloat)(u-l*i,i),e=Math.max(s,e),a&&(e=Math.min(a,e)),d.w=e),~f.indexOf("t")&&(e=(0,o.normalizeFloat)(h-c*i,i),e=Math.max(s,e),a&&(e=Math.min(a,e)),d.h=e);var p=n.ratioDefault?!t.keys.shift:t.keys.shift;if(f.indexOf("c")<0&&p){var g=r.w/r.h;d.w/d.h>g?d.h=Math.round(d.w/g):d.w=Math.round(d.h*g)}return~f.indexOf("l")&&(d.l=r.w-d.w),~f.indexOf("t")&&(d.t=r.h-d.h),d}}}]),t}();t.exports={init:function(t){return new a(t)}}},function(t,e,n){"use strict";(function(e){var i=Object.assign||function(t){for(var e=1;es+c-10||ra+l-10)return 1},getCurrentPos:function(){var t=this.eventMove;return{x:t.pageX||0,y:t.pageY||0}},getDim:function(t){var e,n,i,r;if(this.canvasRelative&&this.em){var o=this.em.get("Canvas").getElementPos(t),s=window.getComputedStyle(t),a=parseFloat(s.marginTop),l=parseFloat(s.marginBottom),c=parseFloat(s.marginRight),u=parseFloat(s.marginLeft);e=o.top-a,n=o.left-u,i=o.height+a+l,r=o.width+u+c}else{var h=this.offset(t);e=this.relative?t.offsetTop:h.top-(this.wmargin?-1:1)*this.elT,n=this.relative?t.offsetLeft:h.left-(this.wmargin?-1:1)*this.elL,i=t.offsetHeight,r=t.offsetWidth}return[e,n,i,r]},getChildrenDim:function(t){var e=[];if(!t)return e;var n=this.getTargetModel(t);n&&n.view&&!this.ignoreViewChildren&&(t=n.view.getChildrenContainer());for(var i=t.children,r=0,o=i.length;rs||s>a+c-r||l+r>o||o>l+u-r)&&(i=1),!!i},findPosition:function(t,e,n){for(var i={index:0,method:"before"},r=0,o=0,s=0,a=0,l=0,c=0,u=0,h=0,d=0,f=t.length;do||a&&c>=a||r&&s0&&void 0!==arguments[0]?arguments[0]:{};this.config=e,this.set("Config",e),this.set("modules",[]),this.set("toLoad",[]),this.set("storables",[]);var n=e.el;n&&e.fromElement&&(this.config.components=n.innerHTML),this.attrsOrig=n?(0,r.toArray)(n.attributes).reduce(function(t,e){return t[e.nodeName]=e.nodeValue,t},{}):"",s.forEach(function(e){return t.loadModule(e)}),this.on("change:componentHovered",this.componentHovered,this),this.on("change:changesCount",this.updateChanges,this),[{from:"change:selectedComponent",to:"component:toggled"}].forEach(function(e){var n=e.from,i=e.to;t.listenTo(t,n,function(){for(var e=arguments.length,r=Array(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.canAutoload()?this.load(i):i()},updateChanges:function(){var t=this.get("StorageManager"),e=this.get("changesCount");this.config.noticeOnUnload&&e?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null,t.isAutosave()&&e>=t.getStepsBeforeSave()&&this.store()},loadModule:function(t){var e=this.config,n=new t,r=e[n.name.charAt(0).toLowerCase()+n.name.slice(1)]||e[n.name]||{};r.pStylePrefix=e.pStylePrefix||"";var o=this.get("StorageManager");if(n.storageKey&&n.store&&n.load&&o){r.stm=o;var s=this.get("storables");s.push(n),this.set("storables",s)}return r.em=this,n.init(i({},r)),!n.private&&this.set(n.name,n),n.onLoad&&this.get("toLoad").push(n),this.get("modules").push(n),this},init:function(t){this.set("Editor",t)},getEditor:function(){return this.get("Editor")},handleUpdates:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.temporary||(c&&clearInterval(c),c=setTimeout(function(){i.avoidStore||n.set("changesCount",n.get("changesCount")+1,i)},0))},componentHovered:function(t,e,n){var i=this.previous("componentHovered");i&&this.trigger("component:unhovered",i,n),e&&this.trigger("component:hovered",e,n)},getSelected:function(){return this.get("selected").last()},getSelectedAll:function(){return this.get("selected").models},setSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,r.isArray)(t),s=i?t:[t],a=this.get("selected");i&&this.removeSelected(a.filter(function(t){return!(0,r.contains)(s,t)})),s.forEach(function(t){var r=(0,o.getModel)(t,u);r&&!r.get("selectable")||(!i&&e.removeSelected(a.filter(function(t){return t!==r})),e.addSelected(r,n))})},addSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,o.getModel)(t,u);((0,r.isArray)(i)?i:[i]).forEach(function(t){if(!t||t.get("selectable")){var i=e.get("selected");n.forceChange&&i.remove(t,n),i.push(t,n)}})},removeSelected:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.get("selected").remove((0,o.getModel)(t,u),e)},toggleSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,o.getModel)(t,u);((0,r.isArray)(i)?i:[i]).forEach(function(t){e.get("selected").contains(t)?e.removeSelected(t,n):e.addSelected(t,n)})},setHovered:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,o.getModel)(t,u);n&&!n.get("hoverable")||(e.forceChange&&this.set("componentHovered",""),this.set("componentHovered",n,e))},setComponents:function(t){return this.get("DomComponents").setComponents(t)},getComponents:function(){var t=this.get("DomComponents"),e=this.get("CodeManager");if(t&&e){var n=t.getComponents();return e.getCode(n,"json")}},setStyle:function(t){for(var e=this.get("CssComposer").getAll(),n=0,i=e.length;n"+i+"<\/script>":""},getCss:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.config,n=e.wrappesIsBody,i=t.avoidProtected,o=(0,r.isUndefined)(t.keepUnusedStyles)?e.keepUnusedStyles:t.keepUnusedStyles,s=this.get("CssComposer"),a=this.get("DomComponents").getComponent();return(i?"":e.protectedCss)+this.get("CodeManager").getCode(a,"css",{cssc:s,wrappesIsBody:n,keepUnusedStyles:o})},getJs:function(){var t=this.get("DomComponents").getWrapper();return this.get("CodeManager").getCode(t,"js").trim()},store:function(t){var e=this,n=this.get("StorageManager"),i={};if(n)return this.get("storables").forEach(function(t){var e=t.store(1);for(var n in e)i[n]=e[n]}),n.store(i,function(n){t&&t(n),e.set("changesCount",0),e.trigger("storage:store",i)}),i},load:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getCacheLoad(1,function(n){t.get("storables").forEach(function(t){return t.load(n)}),e&&e(n)})},getCacheLoad:function(t,e){var n=this,i=t?1:0;if(this.cacheLoad&&!i)return this.cacheLoad;var r=this.get("StorageManager"),o=[];if(!r)return{};this.get("storables").forEach(function(t){var e=t.storageKey;((e="function"==typeof e?e():e)instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),setTimeout(function(){return n.trigger("storage:load",t)},0)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.get("Commands").get(this.config.defaultCommand);e&&!this.defaultRunning&&(e.stop(this,this,t),e.run(this,this,t),this.defaultRunning=1)},stopDefault:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.get("Commands").get(this.config.defaultCommand);e&&(e.stop(this,this,t),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},getCurrentMedia:function(){var t=this.config,e=this.getDeviceModel(),n=t.mediaCondition,i=t.devicePreviewMode,r=e&&e.get("widthMedia");return e&&r&&!i?"("+n+": "+r+")":""},getWrapper:function(){return this.get("DomComponents").getWrapper()},getDirtyCount:function(){return this.get("changesCount")},destroyAll:function(){var t=this.attributes,e=t.DomComponents,n=t.CssComposer,i=t.UndoManager,r=t.Panels,o=t.Canvas;e.clear(),n.clear(),i.clear().removeAll(),r.getPanels().reset(),o.getCanvasView().remove(),this.view.remove(),this.stopListening(),u(this.config.el).empty().attr(this.attrsOrig)},setEditing:function(t){return this.set("editing",t),this},isEditing:function(){return!!this.get("editing")},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),(0,r.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}})},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",style:"",fromElement:0,noticeOnUnload:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",baseCss:"\n * {\n box-sizing: border-box;\n }\n html, body, #wrapper {\n min-height: 100%;\n }\n body {\n margin: 0;\n height: 100%;\n background-color: #fff\n }\n #wrapper {\n overflow: auto;\n overflow-x: hidden;\n }\n\n * ::-webkit-scrollbar-track {\n background: rgba(0, 0, 0, 0.1)\n }\n\n * ::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2)\n }\n\n * ::-webkit-scrollbar {\n width: 10px\n }\n ",protectedCss:"* { box-sizing: border-box; } body {margin: 0;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",keepEmptyTextNodes:0,jsInHtml:!0,nativeDnD:1,multipleSelection:1,exportWrapper:0,wrappesIsBody:1,avoidInlineStyle:0,avoidDefaults:0,clearStyles:0,el:"",undoManager:{},assetManager:{},canvas:{},layers:{},storageManager:{},rte:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{devices:[{name:"Desktop",width:""},{name:"Tablet",width:"768px",widthMedia:"992px"},{name:"Mobile landscape",width:"568px",widthMedia:"768px"},{name:"Mobile portrait",width:"320px",widthMedia:"480px"}]},styleManager:{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"]}]},blockManager:{},traitManager:{},textViewCode:"Code",keepUnusedStyles:0}},function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(n(20));t.exports=function(t){var e=t||{},r=n(233),o=n(232),s=n(89);for(var a in r)a in e||(e[a]=r[a]);e.pStylePrefix=e.stylePrefix;var l=new o(e),c=new s({model:l,config:e});return{$:i.default,editor:l,DomComponents:l.get("DomComponents"),LayerManager:l.get("LayerManager"),CssComposer:l.get("CssComposer"),StorageManager:l.get("StorageManager"),AssetManager:l.get("AssetManager"),BlockManager:l.get("BlockManager"),TraitManager:l.get("TraitManager"),SelectorManager:l.get("SelectorManager"),CodeManager:l.get("CodeManager"),Commands:l.get("Commands"),Keymaps:l.get("Keymaps"),Modal:l.get("Modal"),Panels:l.get("Panels"),StyleManager:l.get("StyleManager"),Canvas:l.get("Canvas"),UndoManager:l.get("UndoManager"),DeviceManager:l.get("DeviceManager"),RichTextEditor:l.get("RichTextEditor"),Utils:l.get("Utils"),Config:l.get("Config"),init:function(){return l.init(this),this},getConfig:function(t){return l.getConfig(t)},getHtml:function(t){return l.getHtml(t)},getCss:function(t){return l.getCss(t)},getJs:function(){return l.getJs()},getComponents:function(){return l.get("DomComponents").getComponents()},setComponents:function(t){return l.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return l.get("CssComposer").getAll()},setStyle:function(t){return l.setStyle(t),this},getSelected:function(){return l.getSelected()},getSelectedAll:function(){return l.getSelectedAll()},getSelectedToStyle:function(){var t=l.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return l.setSelected(t),this},selectAdd:function(t){return l.addSelected(t),this},selectRemove:function(t){return l.removeSelected(t),this},selectToggle:function(t){return l.toggleSelected(t),this},setDevice:function(t){return l.set("device",t),this},getDevice:function(){return l.get("device")},runCommand:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0,i=l.get("Commands").get(t);return i&&(n=i.callRun(this,e)),n},stopCommand:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0,i=l.get("Commands").get(t);return i&&(n=i.callStop(this,e)),n},store:function(t){return l.store(t)},load:function(t){return l.load(t)},getContainer:function(){return e.el},getDirtyCount:function(){return l.getDirtyCount()},refresh:function(){l.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return l.on(t,e)},off:function(t,e){return l.off(t,e)},trigger:function(t){return l.trigger.apply(l,arguments)},destroy:function(){return l.destroyAll()},getEl:function(){return c.el},getModel:function(){return l},render:function(){var t=this;return l.on("loaded",function(){t.UndoManager.clear(),l.get("modules").forEach(function(t){t.postRender&&t.postRender(c)})}),c.render(),c.el}}}},function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},a=r.container;if(!a)throw new Error("'container' is required");(r=i({},n,r)).el=(0,s.isElement)(a)?a:document.querySelector(a);var l=new o.default(r).init();return r.plugins.forEach(function(e){var n=t.get(e);n?n(l,r.pluginsOpts[e]||{}):console.warn("Plugin "+e+" not found")}),l.getModel().loadOnStart(),r.autorender&&l.render(),e.push(l),l}}}()}])}); +//# sourceMappingURL=grapes.min.js.map \ No newline at end of file diff --git a/views/grapejs/editor.hbs b/views/grapejs/editor.hbs index 25c0cbca..6fa12ac9 100644 --- a/views/grapejs/editor.hbs +++ b/views/grapejs/editor.hbs @@ -131,6 +131,9 @@ assets: [], upload: '/editorapi/upload?type={{type}}&id={{resource.id}}&editor={{editor.name}}', uploadText: 'Drop images here or click to upload', + headers: { + 'X-CSRF-TOKEN': '{{csrfToken}}', + }, }, styleManager: { clearProperties: true, @@ -347,7 +350,6 @@ // TODO: Show a spinner getPreparedHtml(function(html) { sender.set('active', 0); - var modalContent = md.getContentEl(); var mdlDialog = document.querySelector('.gjs-mdl-dialog'); testContentEl.value = html; mdlDialog.className += ' ' + mdlClass; diff --git a/views/grapejs/layout-editor.hbs b/views/grapejs/layout-editor.hbs index d2545db8..592ab1e4 100644 --- a/views/grapejs/layout-editor.hbs +++ b/views/grapejs/layout-editor.hbs @@ -4,13 +4,13 @@ GrapesJS Newsletter Editor - + - +