Version Description
Download this release
Release Info
Developer | nko |
Plugin | Visual Portfolio, Photo Gallery & Post Grid |
Version | 2.7.0 |
Comparing to | |
See all releases |
Code changes from version 2.6.2 to 2.7.0
- assets/admin/js/elementor.js +3 -2
- assets/admin/js/elementor.min.js +1 -1
- assets/admin/js/mce-dropdown.js +1 -1
- assets/admin/js/mce-dropdown.min.js +1 -1
- assets/admin/js/mce-localize.min.js +1 -1
- assets/admin/js/script.js +3 -2
- assets/admin/js/script.min.js +1 -1
- assets/admin/js/vc-frontend.js +1 -1
- assets/admin/js/vc-frontend.min.js +1 -1
- assets/css/layout-slider-rtl.min.css +1 -1
- assets/css/layout-slider.min.css +1 -1
- assets/css/main-rtl.min.css +1 -1
- assets/css/main.min.css +1 -1
- assets/js/custom-scrollbar.min.js +1 -1
- assets/js/images-lazy-loading.js +93 -0
- assets/js/images-lazy-loading.min.js +1 -0
- assets/js/items-style-fly.min.js +1 -1
- assets/js/layout-grid.min.js +1 -1
- assets/js/layout-justified.min.js +1 -1
- assets/js/layout-masonry.min.js +1 -1
- assets/js/layout-slider.min.js +1 -1
- assets/js/layout-tiles.min.js +1 -1
- assets/js/lazysizes-object-fit-cover.min.js +1 -1
- assets/js/main.js +4 -80
- assets/js/main.min.js +1 -1
- assets/js/pagination-minimal-paged.min.js +1 -1
- assets/js/plugin-fancybox.min.js +1 -1
- assets/js/plugin-fj-gallery.min.js +1 -1
- assets/js/plugin-isotope.js +45 -4
- assets/js/plugin-isotope.min.js +1 -1
- assets/js/plugin-photoswipe.min.js +1 -1
- assets/js/plugin-swiper.min.js +1 -1
- assets/js/popup-gallery.min.js +1 -1
- assets/js/preview.js +1 -1
- assets/js/preview.min.js +1 -1
- assets/vendor/flickr-justified-gallery/dist/fjGallery.min.js +5 -5
- assets/vendor/flickr-justified-gallery/dist/fjGallery.min.js.map +1 -1
- class-visual-portfolio.php +1 -1
- classes/class-admin.php +4 -4
- classes/class-assets.php +19 -9
- classes/class-custom-post-type.php +2 -2
- classes/class-elementor-widget.php +2 -2
- classes/class-get-portfolio.php +3 -3
- classes/class-gutenberg.php +3 -3
- classes/class-images.php +12 -12
- classes/class-migration.php +1 -1
- classes/class-preview.php +9 -38
- classes/class-supported-themes.php +1 -1
- classes/class-tinymce.php +1 -1
- classes/class-vc.php +1 -1
- gutenberg/components/classes-tree/index.js +4 -1
- gutenberg/components/iframe-preview/index.js +29 -90
- gutenberg/components/iframe-preview/live-reload-conditions.js +84 -0
- gutenberg/components/select-control/index.js +2 -1
- gutenberg/custom-post-meta.min.js +1 -1
- gutenberg/custom-post-meta/video.js +2 -1
- gutenberg/index.min.js +2 -2
assets/admin/js/elementor.js
CHANGED
@@ -2,10 +2,11 @@
|
|
2 |
Â
* Additional js for Elementor
|
3 |
Â
*
|
4 |
Â
* Name : Visual Portfolio
|
5 |
-
* Version : 2.
|
6 |
Â
* Author : nK https://nkdev.info
|
7 |
Â
*/
|
8 |
Â
import { throttle } from 'throttle-debounce';
|
Â
|
|
9 |
Â
|
10 |
Â
const {
|
11 |
Â
elementorFrontend,
|
@@ -47,7 +48,7 @@ $( window ).on( 'elementor/frontend/init', ( $data ) => {
|
|
47 |
Â
}
|
48 |
Â
|
49 |
Â
// window resize.
|
50 |
-
$wnd.on( 'resize', throttle( 300, maybeResizePreviews ) );
|
51 |
Â
|
52 |
Â
// added/changed widget.
|
53 |
Â
elementorFrontend.hooks.addAction( 'frontend/element_ready/visual-portfolio.default', ( $scope ) => {
|
2 |
Â
* Additional js for Elementor
|
3 |
Â
*
|
4 |
Â
* Name : Visual Portfolio
|
5 |
+
* Version : 2.7.0
|
6 |
Â
* Author : nK https://nkdev.info
|
7 |
Â
*/
|
8 |
Â
import { throttle } from 'throttle-debounce';
|
9 |
+
import rafSchd from 'raf-schd';
|
10 |
Â
|
11 |
Â
const {
|
12 |
Â
elementorFrontend,
|
48 |
Â
}
|
49 |
Â
|
50 |
Â
// window resize.
|
51 |
+
$wnd.on( 'resize', throttle( 300, rafSchd( maybeResizePreviews ) ) );
|
52 |
Â
|
53 |
Â
// added/changed widget.
|
54 |
Â
elementorFrontend.hooks.addAction( 'frontend/element_ready/visual-portfolio.default', ( $scope ) => {
|
assets/admin/js/elementor.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=255)}({255:function(e,t,n){e.exports=n(256)},256:function(e,t,n){"use strict";n.r(t);var r=n(3),o=n(4),i=window,u=i.elementorFrontend,a=i.VPAdminElementorVariables,f=window.jQuery,c=f(window);f(window).on("elementor/frontend/init",(function(e){if(a){var t=e.target;c.on("resize",Object(r.throttle)(300,Object(o.a)(n))),u.hooks.addAction("frontend/element_ready/visual-portfolio.default",(function(e){var t=f(e).find(".visual-portfolio-elementor-preview"),r=t.find("iframe"),o=t.attr("data-id"),i="".concat(a.preview_url+(a.preview_url.split("?")[1]?"&":"?"),"vp_preview_frame=true&vp_preview_type=elementor&vp_preview_frame_id=").concat(o);r.attr("src",i),f.fn.iFrameResize&&r.iFrameResize({onInit:function(){n()}})}))}function n(){var e=t.jQuery(t.document).width();t.jQuery.find(".visual-portfolio-elementor-preview iframe").forEach((function(t){var n=f(t),r=n.parent().width();n.css({width:e}),t.iFrameResizer&&(t.iFrameResizer.sendMessage({name:"resize",width:r}),t.iFrameResizer.resize())}))}}))},3:function(e,t,n){var r,o,i,u;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}u=function(e){"use strict";function t(e,t,n,r){var o,i=!1,u=0;function a(){o&&clearTimeout(o)}function f(){for(var f=arguments.length,c=new Array(f),l=0;l<f;l++)c[l]=arguments[l];var d=this,p=Date.now()-u;function s(){u=Date.now(),n.apply(d,c)}function v(){o=void 0}i||(r&&!o&&s(),a(),void 0===r&&p>e?s():!0!==t&&(o=setTimeout(r?v:s,void 0===r?e-p:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),f.cancel=function(){a(),i=!0},f}e.debounce=function(e,n,r){return void 0===r?t(e,n,!1):t(e,r,!1!==n)},e.throttle=t,Object.defineProperty(e,"__esModule",{value:!0})},"object"===a(t)&&void 0!==e?u(t):(o=[t],void 0===(i="function"==typeof(r=u)?r.apply(t,o):r)||(e.exports=i))},4:function(e,t,n){"use strict";t.a=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t=o,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r}}});
|
assets/admin/js/mce-dropdown.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
Â
/*!
|
2 |
Â
* Name : Visual Portfolio
|
3 |
-
* Version : 2.
|
4 |
Â
* Author : nK https://nkdev.info
|
5 |
Â
*/
|
6 |
Â
const {
|
1 |
Â
/*!
|
2 |
Â
* Name : Visual Portfolio
|
3 |
+
* Version : 2.7.0
|
4 |
Â
* Author : nK https://nkdev.info
|
5 |
Â
*/
|
6 |
Â
const {
|
assets/admin/js/mce-dropdown.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},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=
|
2 |
Â
/*!
|
3 |
Â
* Name : Visual Portfolio
|
4 |
Â
* Version : @@plugin_version
|
1 |
+
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},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=257)}({257:function(t,e,n){t.exports=n(258)},258:function(t,e){
|
2 |
Â
/*!
|
3 |
Â
* Name : Visual Portfolio
|
4 |
Â
* Version : @@plugin_version
|
assets/admin/js/mce-localize.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=259)}({259:function(e,t,n){e.exports=n(260)},260:function(e,t){}});
|
assets/admin/js/script.js
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
Â
/*!
|
2 |
Â
* Name : Visual Portfolio
|
3 |
-
* Version : 2.
|
4 |
Â
* Author : nK https://nkdev.info
|
5 |
Â
*/
|
6 |
Â
import { debounce } from 'throttle-debounce';
|
Â
|
|
7 |
Â
|
8 |
Â
const {
|
9 |
Â
jQuery: $,
|
@@ -69,7 +70,7 @@ let runAjaxVideoOembed = function( $this ) {
|
|
69 |
Â
},
|
70 |
Â
} );
|
71 |
Â
};
|
72 |
-
runAjaxVideoOembed = debounce( 300, runAjaxVideoOembed );
|
73 |
Â
|
74 |
Â
$body.on( 'change input', '.vp-input[name="_vp_format_video_url"]', function() {
|
75 |
Â
if ( null !== oembedAjax ) {
|
1 |
Â
/*!
|
2 |
Â
* Name : Visual Portfolio
|
3 |
+
* Version : 2.7.0
|
4 |
Â
* Author : nK https://nkdev.info
|
5 |
Â
*/
|
6 |
Â
import { debounce } from 'throttle-debounce';
|
7 |
+
import rafSchd from 'raf-schd';
|
8 |
Â
|
9 |
Â
const {
|
10 |
Â
jQuery: $,
|
70 |
Â
},
|
71 |
Â
} );
|
72 |
Â
};
|
73 |
+
runAjaxVideoOembed = debounce( 300, rafSchd( runAjaxVideoOembed ) );
|
74 |
Â
|
75 |
Â
$body.on( 'change input', '.vp-input[name="_vp_format_video_url"]', function() {
|
76 |
Â
if ( null !== oembedAjax ) {
|
assets/admin/js/script.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(
|
1 |
+
!function(n){var e={};function t(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return n[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=n,t.c=e,t.d=function(n,e,o){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:o})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var r in n)t.d(o,r,function(e){return n[e]}.bind(null,r));return o},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=261)}({261:function(n,e,t){n.exports=t(262)},262:function(n,e,t){"use strict";t.r(e);var o=t(3),r=t(4),i=window,c=i.jQuery,u=i.ajaxurl,l=i.VPAdminVariables,a=c("body");a.on("focus",'[name="vp_list_shortcode"], [name="vp_filter_shortcode"], [name="vp_sort_shortcode"]',(function(){this.select()})),a.on("click",".vp-onclick-selection",(function(){window.getSelection().selectAllChildren(this)})),a.on("copy cut",".vp-onclick-selection",(function(n){var e=window.getSelection().toString().replace(/[\n\r]+/g,"");n.originalEvent.clipboardData.setData("text/plain",e),n.originalEvent.preventDefault()}));var f=c("#vp_format_video"),p=c("#post-format-video"),d=null;function v(n){null!==d&&d===n||(d=n,f[n?"show":"hide"]())}f.length&&p.length&&(v(p.is(":checked")),a.on("change","[name=post_format]",(function(){v(p.is(":checked"))})));var s=null,m=function(n){s=c.ajax({url:u,method:"POST",dataType:"json",data:{action:"vp_find_oembed",q:n.val(),nonce:l.nonce},complete:function(e){var t=e.responseJSON;t&&void 0!==t.html&&n.next(".vp-oembed-preview").html(t.html)}})};m=Object(o.debounce)(300,Object(r.a)(m)),a.on("change input",'.vp-input[name="_vp_format_video_url"]',(function(){null!==s&&s.abort();var n=c(this);n.next(".vp-oembed-preview").html(""),m(n)}))},3:function(n,e,t){var o,r,i,c;function u(n){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}c=function(n){"use strict";function e(n,e,t,o){var r,i=!1,c=0;function u(){r&&clearTimeout(r)}function l(){for(var l=arguments.length,a=new Array(l),f=0;f<l;f++)a[f]=arguments[f];var p=this,d=Date.now()-c;function v(){c=Date.now(),t.apply(p,a)}function s(){r=void 0}i||(o&&!r&&v(),u(),void 0===o&&d>n?v():!0!==e&&(r=setTimeout(o?s:v,void 0===o?n-d:n)))}return"boolean"!=typeof e&&(o=t,t=e,e=void 0),l.cancel=function(){u(),i=!0},l}n.debounce=function(n,t,o){return void 0===o?e(n,t,!1):e(n,o,!1!==t)},n.throttle=e,Object.defineProperty(n,"__esModule",{value:!0})},"object"===u(e)&&void 0!==n?c(e):(r=[e],void 0===(i="function"==typeof(o=c)?o.apply(e,r):o)||(n.exports=i))},4:function(n,e,t){"use strict";e.a=function(n){var e=[],t=null,o=function(){for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];e=r,t||(t=requestAnimationFrame((function(){t=null,n.apply(void 0,e)})))};return o.cancel=function(){t&&(cancelAnimationFrame(t),t=null)},o}}});
|
assets/admin/js/vc-frontend.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Â
* Additional js for frontend VC
|
3 |
Â
*
|
4 |
Â
* Name : Visual Portfolio
|
5 |
-
* Version : 2.
|
6 |
Â
* Author : nK https://nkdev.info
|
7 |
Â
*/
|
8 |
Â
const {
|
2 |
Â
* Additional js for frontend VC
|
3 |
Â
*
|
4 |
Â
* Name : Visual Portfolio
|
5 |
+
* Version : 2.7.0
|
6 |
Â
* Author : nK https://nkdev.info
|
7 |
Â
*/
|
8 |
Â
const {
|
assets/admin/js/vc-frontend.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=
|
2 |
Â
/*!
|
3 |
Â
* Additional js for frontend VC
|
4 |
Â
*
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=263)}({263:function(e,t,n){e.exports=n(264)},264:function(e,t){
|
2 |
Â
/*!
|
3 |
Â
* Additional js for frontend VC
|
4 |
Â
*
|
assets/css/layout-slider-rtl.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.vp-portfolio{--vp-layout-slider--arrows__width: 2em;--vp-layout-slider--arrows__height: 2em;--vp-layout-slider--arrows__offset: 10px;--vp-layout-slider--arrows__compensation: 10px;--vp-layout-slider--arrows__color: var(--vp-color-gray);--vp-layout-slider--arrows__background-color: #fff;--vp-layout-slider--arrows__border-radius: 50%;--vp-layout-slider--arrows__box-shadow: 0 0 7px 2px rgba(0, 0, 0, .04);--vp-layout-slider--arrows__opacity: .5;--vp-layout-slider--arrows-hover__box-shadow: 0 2px 15px 2px rgba(0, 0, 0, .04);--vp-layout-slider--arrows-hover__opacity: 1;--vp-layout-slider--bullets__margin-top: 2em;--vp-layout-slider--bullets__width: .4em;--vp-layout-slider--bullets__height: .4em;--vp-layout-slider--bullets__gap: .4em;--vp-layout-slider--bullets__compensation: 4px;--vp-layout-slider--bullets__background-color: currentColor;--vp-layout-slider--bullets__border-radius: 50%;--vp-layout-slider--bullets__opacity: .2;--vp-layout-slider--bullets-hover__opacity: .5;--vp-layout-slider--bullets-active__opacity: 1;--vp-layout-slider--thumbnails__opacity: .5;--vp-layout-slider--thumbnails-hover__opacity: 1;--vp-layout-slider--thumbnails-active__opacity: 1;--vp-layout-slider__transition-duration: var(--vp-interactive__transition-duration);--vp-layout-slider__transition-easing: var(--vp-interactive__transition-easing)}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap::before,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img-wrap::before{content:"";display:block}[data-vp-layout="slider"] .vp-portfolio__item-img img,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img img{-o-object-fit:var(--vp-images__object-fit);object-fit:var(--vp-images__object-fit);-o-object-position:var(--vp-images__object-position);object-position:var(--vp-images__object-position);font-family:"object-fit: cover; object-position: 50% 50%;"}[data-vp-layout="slider"] .vp-portfolio__items-arrow{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;top:50%;width:var(--vp-layout-slider--arrows__width);height:var(--vp-layout-slider--arrows__height);margin-top:calc(-1 * var(--vp-layout-slider--arrows__height) / 2);color:var(--vp-layout-slider--
|
1 |
+
.vp-portfolio{--vp-layout-slider--arrows__width: 2em;--vp-layout-slider--arrows__height: 2em;--vp-layout-slider--arrows__offset: 10px;--vp-layout-slider--arrows__compensation: 10px;--vp-layout-slider--arrows__color: var(--vp-color-gray);--vp-layout-slider--arrows__background-color: #fff;--vp-layout-slider--arrows__border-radius: 50%;--vp-layout-slider--arrows__box-shadow: 0 0 7px 2px rgba(0, 0, 0, .04);--vp-layout-slider--arrows__opacity: .5;--vp-layout-slider--arrows-hover__box-shadow: 0 2px 15px 2px rgba(0, 0, 0, .04);--vp-layout-slider--arrows-hover__opacity: 1;--vp-layout-slider--bullets__margin-top: 2em;--vp-layout-slider--bullets__width: .4em;--vp-layout-slider--bullets__height: .4em;--vp-layout-slider--bullets__gap: .4em;--vp-layout-slider--bullets__compensation: 4px;--vp-layout-slider--bullets__background-color: currentColor;--vp-layout-slider--bullets__border-radius: 50%;--vp-layout-slider--bullets__opacity: .2;--vp-layout-slider--bullets-hover__opacity: .5;--vp-layout-slider--bullets-active__opacity: 1;--vp-layout-slider--thumbnails__opacity: .5;--vp-layout-slider--thumbnails-hover__opacity: 1;--vp-layout-slider--thumbnails-active__opacity: 1;--vp-layout-slider__transition-duration: var(--vp-interactive__transition-duration);--vp-layout-slider__transition-easing: var(--vp-interactive__transition-easing)}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap::before,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img-wrap::before{content:"";display:block}[data-vp-layout="slider"] .vp-portfolio__item-img img,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img img{-o-object-fit:var(--vp-images__object-fit);object-fit:var(--vp-images__object-fit);-o-object-position:var(--vp-images__object-position);object-position:var(--vp-images__object-position);font-family:"object-fit: cover; object-position: 50% 50%;"}[data-vp-layout="slider"] .vp-portfolio__items-arrow{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;top:50%;width:var(--vp-layout-slider--arrows__width);height:var(--vp-layout-slider--arrows__height);margin-top:calc(-1 * var(--vp-layout-slider--arrows__height) / 2);color:var(--vp-layout-slider--arrows__color);cursor:pointer;background-color:var(--vp-layout-slider--arrows__background-color);border-radius:var(--vp-layout-slider--arrows__border-radius);-webkit-box-shadow:var(--vp-layout-slider--arrows__box-shadow);box-shadow:var(--vp-layout-slider--arrows__box-shadow);opacity:var(--vp-layout-slider--arrows__opacity);-webkit-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing),var(--vp-layout-slider__transition-duration) box-shadow var(--vp-layout-slider__transition-easing);-o-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing),var(--vp-layout-slider__transition-duration) box-shadow var(--vp-layout-slider__transition-easing);transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing),var(--vp-layout-slider__transition-duration) box-shadow var(--vp-layout-slider__transition-easing);will-change:opacity, box-shadow;z-index:1}[data-vp-layout="slider"] .vp-portfolio__items-arrow::after{content:"";position:absolute;display:block;top:calc(-1 * var(--vp-layout-slider--arrows__compensation));left:calc(-1 * var(--vp-layout-slider--arrows__compensation));bottom:calc(-1 * var(--vp-layout-slider--arrows__compensation));right:calc(-1 * var(--vp-layout-slider--arrows__compensation))}[data-vp-layout="slider"] .vp-portfolio__items-arrow:hover{-webkit-box-shadow:var(--vp-layout-slider--arrows-hover__box-shadow);box-shadow:var(--vp-layout-slider--arrows-hover__box-shadow);opacity:var(--vp-layout-slider--arrows-hover__opacity)}[data-vp-layout="slider"] .vp-portfolio__items-arrow svg{-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}[data-vp-layout="slider"] .vp-portfolio__items-arrow-prev{right:var(--vp-layout-slider--arrows__offset)}[data-vp-layout="slider"] .vp-portfolio__items-arrow-next{left:var(--vp-layout-slider--arrows__offset)}[data-vp-layout="slider"][data-vp-slider-bullets="true"] .vp-portfolio__items-wrap{padding-bottom:var(--vp-layout-slider--bullets__margin-top)}[data-vp-layout="slider"][data-vp-slider-bullets="true"] .vp-portfolio__items-wrap .vp-portfolio__items-arrow{-webkit-transform:translateY(calc(var(--vp-layout-slider--bullets__margin-top) / -2));-ms-transform:translateY(calc(var(--vp-layout-slider--bullets__margin-top) / -2));transform:translateY(calc(var(--vp-layout-slider--bullets__margin-top) / -2))}[data-vp-layout="slider"] .vp-portfolio__items-bullets{position:absolute;bottom:0;text-align:center;z-index:1}[data-vp-layout="slider"] .vp-portfolio__items-bullets.swiper-pagination-bullets-dynamic{font-size:1em}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet{position:relative;width:var(--vp-layout-slider--bullets__width);height:var(--vp-layout-slider--bullets__height);margin:0 calc(var(--vp-layout-slider--bullets__gap) / 2);cursor:pointer;background-color:var(--vp-layout-slider--bullets__background-color);border-radius:var(--vp-layout-slider--bullets__border-radius);opacity:var(--vp-layout-slider--bullets__opacity);-webkit-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing);-o-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing);transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing);will-change:opacity}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet:hover,[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet:focus{opacity:var(--vp-layout-slider--bullets-hover__opacity)}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet.swiper-pagination-bullet-active{opacity:var(--vp-layout-slider--bullets-active__opacity)}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet::after{content:"";position:absolute;display:block;top:calc(-1 * var(--vp-layout-slider--bullets__compensation));left:calc(-1 * var(--vp-layout-slider--bullets__compensation));bottom:calc(-1 * var(--vp-layout-slider--bullets__compensation));right:calc(-1 * var(--vp-layout-slider--bullets__compensation))}[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap{cursor:pointer;opacity:var(--vp-layout-slider--thumbnails__opacity);-webkit-transition:var(--vp-layout-slider__transition-duration) opacity;-o-transition:var(--vp-layout-slider__transition-duration) opacity;transition:var(--vp-layout-slider__transition-duration) opacity}[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap:hover,[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap:focus{opacity:var(--vp-layout-slider--thumbnails-hover__opacity)}[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap.swiper-slide-thumb-active{opacity:var(--vp-layout-slider--thumbnails-active__opacity)}
|
assets/css/layout-slider.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.vp-portfolio{--vp-layout-slider--arrows__width: 2em;--vp-layout-slider--arrows__height: 2em;--vp-layout-slider--arrows__offset: 10px;--vp-layout-slider--arrows__compensation: 10px;--vp-layout-slider--arrows__color: var(--vp-color-gray);--vp-layout-slider--arrows__background-color: #fff;--vp-layout-slider--arrows__border-radius: 50%;--vp-layout-slider--arrows__box-shadow: 0 0 7px 2px rgba(0, 0, 0, .04);--vp-layout-slider--arrows__opacity: .5;--vp-layout-slider--arrows-hover__box-shadow: 0 2px 15px 2px rgba(0, 0, 0, .04);--vp-layout-slider--arrows-hover__opacity: 1;--vp-layout-slider--bullets__margin-top: 2em;--vp-layout-slider--bullets__width: .4em;--vp-layout-slider--bullets__height: .4em;--vp-layout-slider--bullets__gap: .4em;--vp-layout-slider--bullets__compensation: 4px;--vp-layout-slider--bullets__background-color: currentColor;--vp-layout-slider--bullets__border-radius: 50%;--vp-layout-slider--bullets__opacity: .2;--vp-layout-slider--bullets-hover__opacity: .5;--vp-layout-slider--bullets-active__opacity: 1;--vp-layout-slider--thumbnails__opacity: .5;--vp-layout-slider--thumbnails-hover__opacity: 1;--vp-layout-slider--thumbnails-active__opacity: 1;--vp-layout-slider__transition-duration: var(--vp-interactive__transition-duration);--vp-layout-slider__transition-easing: var(--vp-interactive__transition-easing)}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap::before,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img-wrap::before{content:"";display:block}[data-vp-layout="slider"] .vp-portfolio__item-img img,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img img{-o-object-fit:var(--vp-images__object-fit);object-fit:var(--vp-images__object-fit);-o-object-position:var(--vp-images__object-position);object-position:var(--vp-images__object-position);font-family:"object-fit: cover; object-position: 50% 50%;"}[data-vp-layout="slider"] .vp-portfolio__items-arrow{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;top:50%;width:var(--vp-layout-slider--arrows__width);height:var(--vp-layout-slider--arrows__height);margin-top:calc(-1 * var(--vp-layout-slider--arrows__height) / 2);color:var(--vp-layout-slider--
|
1 |
+
.vp-portfolio{--vp-layout-slider--arrows__width: 2em;--vp-layout-slider--arrows__height: 2em;--vp-layout-slider--arrows__offset: 10px;--vp-layout-slider--arrows__compensation: 10px;--vp-layout-slider--arrows__color: var(--vp-color-gray);--vp-layout-slider--arrows__background-color: #fff;--vp-layout-slider--arrows__border-radius: 50%;--vp-layout-slider--arrows__box-shadow: 0 0 7px 2px rgba(0, 0, 0, .04);--vp-layout-slider--arrows__opacity: .5;--vp-layout-slider--arrows-hover__box-shadow: 0 2px 15px 2px rgba(0, 0, 0, .04);--vp-layout-slider--arrows-hover__opacity: 1;--vp-layout-slider--bullets__margin-top: 2em;--vp-layout-slider--bullets__width: .4em;--vp-layout-slider--bullets__height: .4em;--vp-layout-slider--bullets__gap: .4em;--vp-layout-slider--bullets__compensation: 4px;--vp-layout-slider--bullets__background-color: currentColor;--vp-layout-slider--bullets__border-radius: 50%;--vp-layout-slider--bullets__opacity: .2;--vp-layout-slider--bullets-hover__opacity: .5;--vp-layout-slider--bullets-active__opacity: 1;--vp-layout-slider--thumbnails__opacity: .5;--vp-layout-slider--thumbnails-hover__opacity: 1;--vp-layout-slider--thumbnails-active__opacity: 1;--vp-layout-slider__transition-duration: var(--vp-interactive__transition-duration);--vp-layout-slider__transition-easing: var(--vp-interactive__transition-easing)}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap::before,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img-wrap::before{content:"";display:block}[data-vp-layout="slider"] .vp-portfolio__item-img img,[data-vp-layout="slider"] .vp-portfolio__thumbnail-img img{-o-object-fit:var(--vp-images__object-fit);object-fit:var(--vp-images__object-fit);-o-object-position:var(--vp-images__object-position);object-position:var(--vp-images__object-position);font-family:"object-fit: cover; object-position: 50% 50%;"}[data-vp-layout="slider"] .vp-portfolio__items-arrow{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;top:50%;width:var(--vp-layout-slider--arrows__width);height:var(--vp-layout-slider--arrows__height);margin-top:calc(-1 * var(--vp-layout-slider--arrows__height) / 2);color:var(--vp-layout-slider--arrows__color);cursor:pointer;background-color:var(--vp-layout-slider--arrows__background-color);border-radius:var(--vp-layout-slider--arrows__border-radius);-webkit-box-shadow:var(--vp-layout-slider--arrows__box-shadow);box-shadow:var(--vp-layout-slider--arrows__box-shadow);opacity:var(--vp-layout-slider--arrows__opacity);-webkit-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing),var(--vp-layout-slider__transition-duration) box-shadow var(--vp-layout-slider__transition-easing);-o-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing),var(--vp-layout-slider__transition-duration) box-shadow var(--vp-layout-slider__transition-easing);transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing),var(--vp-layout-slider__transition-duration) box-shadow var(--vp-layout-slider__transition-easing);will-change:opacity, box-shadow;z-index:1}[data-vp-layout="slider"] .vp-portfolio__items-arrow::after{content:"";position:absolute;display:block;top:calc(-1 * var(--vp-layout-slider--arrows__compensation));right:calc(-1 * var(--vp-layout-slider--arrows__compensation));bottom:calc(-1 * var(--vp-layout-slider--arrows__compensation));left:calc(-1 * var(--vp-layout-slider--arrows__compensation))}[data-vp-layout="slider"] .vp-portfolio__items-arrow:hover{-webkit-box-shadow:var(--vp-layout-slider--arrows-hover__box-shadow);box-shadow:var(--vp-layout-slider--arrows-hover__box-shadow);opacity:var(--vp-layout-slider--arrows-hover__opacity)}[data-vp-layout="slider"] .vp-portfolio__items-arrow-prev{left:var(--vp-layout-slider--arrows__offset)}[data-vp-layout="slider"] .vp-portfolio__items-arrow-next{right:var(--vp-layout-slider--arrows__offset)}[data-vp-layout="slider"][data-vp-slider-bullets="true"] .vp-portfolio__items-wrap{padding-bottom:var(--vp-layout-slider--bullets__margin-top)}[data-vp-layout="slider"][data-vp-slider-bullets="true"] .vp-portfolio__items-wrap .vp-portfolio__items-arrow{-webkit-transform:translateY(calc(var(--vp-layout-slider--bullets__margin-top) / -2));-ms-transform:translateY(calc(var(--vp-layout-slider--bullets__margin-top) / -2));transform:translateY(calc(var(--vp-layout-slider--bullets__margin-top) / -2))}[data-vp-layout="slider"] .vp-portfolio__items-bullets{position:absolute;bottom:0;text-align:center;z-index:1}[data-vp-layout="slider"] .vp-portfolio__items-bullets.swiper-pagination-bullets-dynamic{font-size:1em}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet{position:relative;width:var(--vp-layout-slider--bullets__width);height:var(--vp-layout-slider--bullets__height);margin:0 calc(var(--vp-layout-slider--bullets__gap) / 2);cursor:pointer;background-color:var(--vp-layout-slider--bullets__background-color);border-radius:var(--vp-layout-slider--bullets__border-radius);opacity:var(--vp-layout-slider--bullets__opacity);-webkit-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing);-o-transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing);transition:var(--vp-layout-slider__transition-duration) opacity var(--vp-layout-slider__transition-easing);will-change:opacity}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet:hover,[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet:focus{opacity:var(--vp-layout-slider--bullets-hover__opacity)}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet.swiper-pagination-bullet-active{opacity:var(--vp-layout-slider--bullets-active__opacity)}[data-vp-layout="slider"] .vp-portfolio__items-bullets>.swiper-pagination-bullet::after{content:"";position:absolute;display:block;top:calc(-1 * var(--vp-layout-slider--bullets__compensation));right:calc(-1 * var(--vp-layout-slider--bullets__compensation));bottom:calc(-1 * var(--vp-layout-slider--bullets__compensation));left:calc(-1 * var(--vp-layout-slider--bullets__compensation))}[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap{cursor:pointer;opacity:var(--vp-layout-slider--thumbnails__opacity);-webkit-transition:var(--vp-layout-slider__transition-duration) opacity;-o-transition:var(--vp-layout-slider__transition-duration) opacity;transition:var(--vp-layout-slider__transition-duration) opacity}[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap:hover,[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap:focus{opacity:var(--vp-layout-slider--thumbnails-hover__opacity)}[data-vp-layout="slider"] .vp-portfolio__thumbnails-wrap .vp-portfolio__thumbnail-wrap.swiper-slide-thumb-active{opacity:var(--vp-layout-slider--thumbnails-active__opacity)}
|
assets/css/main-rtl.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
:root{--vp-color-brand: #2540cc;--vp-color-gray: #6c7781;--vp-color-gray-darken: #4b4b4b;--vp-color-gray-light: #e8e8e8;--vp-color-gray-lighten: #f7f7f7;--vp-border-radius: 5px;--vp-items__gap: 0;--vp-transition-duration: .3s;--vp-transition-easing: ease-in-out;--vp-interactive__transition-duration: .2s;--vp-interactive__transition-easing: ease-in-out}.vp-portfolio{--vp-wrap__min-height: 114px;--vp-elements__gap: 20px;--vp-images__object-fit: cover;--vp-images__object-position: 50% 50%;--vp-images-lazy__background: linear-gradient(-70deg, rgba(140, 140, 140, 0) 42%, rgba(140, 140, 140, .05) 50%, rgba(140, 140, 140, 0) 58%);--vp-images-lazy__background-color: rgba(140, 140, 140, .05);--vp-images-lazy__animation-duration: 3s}.vp-spinner{--vp-spinner__color: currentColor;--vp-spinner__size: 20px;--vp-spinner__border-size: 2px;--vp-spinner__speed: .3s;--vp-spinner--background__color: var(--vp-spinner__color);--vp-spinner--background__opacity: .3}.vp-portfolio{position:relative;min-height:var(--vp-wrap__min-height)}.vp-portfolio,.vp-portfolio *{-webkit-box-sizing:border-box;box-sizing:border-box}.vp-portfolio__items{-webkit-transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);-o-transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);will-change:height, transform}.vp-portfolio::after,.vp-portfolio__items::after{content:"";display:block;clear:both}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__sort-wrap,.vp-portfolio__pagination-wrap,.vp-portfolio__item{position:relative;overflow:hidden}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__layout-elements{margin-bottom:var(--vp-elements__gap);visibility:hidden;opacity:0;-webkit-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;will-change:opacity, visibility}.vp-portfolio>:last-child{margin-bottom:0}.vp-portfolio__item-wrap{position:relative;float:right;width:33.333%}.vp-svg-icon{display:inline-block;width:1em;height:1em;overflow:visible;font-size:inherit;vertical-align:-.125em}.vp-screen-reader-text{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);word-break:normal;word-wrap:normal !important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%)}.vp-screen-reader-text:focus{display:block;top:5px;left:5px;width:auto;height:auto;padding:15px 23px 14px;clip:auto !important;font-size:14px;font-size:.875rem;font-weight:700;line-height:normal;color:var(--vp-color-brand);text-decoration:none;background-color:#f1f1f1;border-radius:3px;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,0.6);box-shadow:0 0 2px 2px rgba(0,0,0,0.6);-webkit-clip-path:none;clip-path:none;z-index:100000}[data-vp-layout]:not([data-vp-layout="slider"]) .vp-portfolio__item-wrap{padding:0 !important;margin:0 !important}[data-vp-layout="slider"] .vp-portfolio__item-wrap{float:none;padding:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important}.vp-portfolio__item .vp-portfolio__item-img img,.vp-portfolio__item .vp-portfolio__item-img a,.vp-portfolio__item .vp-portfolio__thumbnail-img img{display:block;width:100%;height:auto}.vp-portfolio__item-img,.vp-portfolio__thumbnail-img{position:relative}.vp-portfolio__layout-elements{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:calc(100% + var(--vp-elements__gap));margin-top:calc(-1 * var(--vp-elements__gap));margin-right:calc(-1 * var(--vp-elements__gap))}.vp-portfolio__layout-elements>*{margin-top:var(--vp-elements__gap);margin-right:var(--vp-elements__gap)}.vp-portfolio__layout-elements-align-left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.vp-portfolio__layout-elements-align-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.vp-portfolio__layout-elements-align-right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.vp-portfolio__layout-elements-align-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.vp-portfolio figure.vp-portfolio__item{margin:0}[class^="wp-block-"]:not(.wp-block-gallery) figcaption.vp-portfolio__item-meta,.vp-portfolio figcaption.vp-portfolio__item-meta{margin-bottom:0;font-style:inherit}.vp-portfolio__preloader-wrap{visibility:visible;opacity:1;-webkit-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;will-change:opacity, visibility}.vp-portfolio__preloader{position:absolute;right:50%;width:23px;height:24px;margin-top:45px;margin-right:-11px;-webkit-animation:vp-preloader 2s linear infinite;animation:vp-preloader 2s linear infinite}.vp-portfolio__preloader span{position:absolute;display:block;top:0;right:0;width:10px;height:7px;background-color:#8a8a8a}.vp-portfolio__preloader span:nth-of-type(1){height:14px}.vp-portfolio__preloader span:nth-of-type(2){right:12px}.vp-portfolio__preloader span:nth-of-type(3){top:16px}.vp-portfolio__preloader span:nth-of-type(4){top:9px;right:12px;height:14px}@-webkit-keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}@keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}.vp-portfolio.vp-portfolio__ready{min-height:initial}.vp-portfolio.vp-portfolio__ready .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__layout-elements{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap{visibility:hidden;opacity:0}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap .vp-portfolio__preloader{-webkit-animation:none;animation:none}.vp-single-filter.vp-single-filter__ready .vp-portfolio__filter-wrap{visibility:visible;opacity:1}.vp-single-sort.vp-single-sort__ready .vp-portfolio__sort-wrap{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__loading::before{content:"";position:absolute;display:block;top:0;left:0;bottom:0;right:0;z-index:1}.vp-portfolio.vp-portfolio__loading .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__layout-elements{opacity:.5}.vp-portfolio__item-popup{display:none}img.
|
1 |
+
:root{--vp-color-brand: #2540cc;--vp-color-gray: #6c7781;--vp-color-gray-darken: #4b4b4b;--vp-color-gray-light: #e8e8e8;--vp-color-gray-lighten: #f7f7f7;--vp-border-radius: 5px;--vp-items__gap: 0;--vp-transition-duration: .3s;--vp-transition-easing: ease-in-out;--vp-interactive__transition-duration: .2s;--vp-interactive__transition-easing: ease-in-out}.vp-portfolio{--vp-wrap__min-height: 114px;--vp-elements__gap: 20px;--vp-images__object-fit: cover;--vp-images__object-position: 50% 50%;--vp-images-lazy__background: linear-gradient(-70deg, rgba(140, 140, 140, 0) 42%, rgba(140, 140, 140, .05) 50%, rgba(140, 140, 140, 0) 58%);--vp-images-lazy__background-color: rgba(140, 140, 140, .05);--vp-images-lazy__animation-duration: 3s}.vp-spinner{--vp-spinner__color: currentColor;--vp-spinner__size: 20px;--vp-spinner__border-size: 2px;--vp-spinner__speed: .3s;--vp-spinner--background__color: var(--vp-spinner__color);--vp-spinner--background__opacity: .3}.vp-portfolio{position:relative;min-height:var(--vp-wrap__min-height)}.vp-portfolio,.vp-portfolio *{-webkit-box-sizing:border-box;box-sizing:border-box}.vp-portfolio__items{-webkit-transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);-o-transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);will-change:height, transform}.vp-portfolio::after,.vp-portfolio__items::after{content:"";display:block;clear:both}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__sort-wrap,.vp-portfolio__pagination-wrap,.vp-portfolio__item{position:relative;overflow:hidden}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__layout-elements{margin-bottom:var(--vp-elements__gap);visibility:hidden;opacity:0;-webkit-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;will-change:opacity, visibility}.vp-portfolio>:last-child{margin-bottom:0}.vp-portfolio__item-wrap{position:relative;float:right;width:33.333%}.vp-svg-icon{display:inline-block;width:1em;height:1em;overflow:visible;font-size:inherit;vertical-align:-.125em}.vp-screen-reader-text{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);word-break:normal;word-wrap:normal !important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%)}.vp-screen-reader-text:focus{display:block;top:5px;left:5px;width:auto;height:auto;padding:15px 23px 14px;clip:auto !important;font-size:14px;font-size:.875rem;font-weight:700;line-height:normal;color:var(--vp-color-brand);text-decoration:none;background-color:#f1f1f1;border-radius:3px;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,0.6);box-shadow:0 0 2px 2px rgba(0,0,0,0.6);-webkit-clip-path:none;clip-path:none;z-index:100000}[data-vp-layout]:not([data-vp-layout="slider"]) .vp-portfolio__item-wrap{padding:0 !important;margin:0 !important}[data-vp-layout="slider"] .vp-portfolio__item-wrap{float:none;padding:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important}.vp-portfolio__item .vp-portfolio__item-img img,.vp-portfolio__item .vp-portfolio__item-img a,.vp-portfolio__item .vp-portfolio__thumbnail-img img{display:block;width:100%;height:auto}.vp-portfolio__item-img,.vp-portfolio__thumbnail-img{position:relative}.vp-portfolio__layout-elements{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:calc(100% + var(--vp-elements__gap));margin-top:calc(-1 * var(--vp-elements__gap));margin-right:calc(-1 * var(--vp-elements__gap))}.vp-portfolio__layout-elements>*{margin-top:var(--vp-elements__gap);margin-right:var(--vp-elements__gap)}.vp-portfolio__layout-elements-align-left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.vp-portfolio__layout-elements-align-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.vp-portfolio__layout-elements-align-right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.vp-portfolio__layout-elements-align-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.vp-portfolio figure.vp-portfolio__item{margin:0}[class^="wp-block-"]:not(.wp-block-gallery) figcaption.vp-portfolio__item-meta,.vp-portfolio figcaption.vp-portfolio__item-meta{margin-bottom:0;font-style:inherit}.vp-portfolio__preloader-wrap{visibility:visible;opacity:1;-webkit-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;will-change:opacity, visibility}.vp-portfolio__preloader{position:absolute;right:50%;width:23px;height:24px;margin-top:45px;margin-right:-11px;-webkit-animation:vp-preloader 2s linear infinite;animation:vp-preloader 2s linear infinite}.vp-portfolio__preloader span{position:absolute;display:block;top:0;right:0;width:10px;height:7px;background-color:#8a8a8a}.vp-portfolio__preloader span:nth-of-type(1){height:14px}.vp-portfolio__preloader span:nth-of-type(2){right:12px}.vp-portfolio__preloader span:nth-of-type(3){top:16px}.vp-portfolio__preloader span:nth-of-type(4){top:9px;right:12px;height:14px}@-webkit-keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}@keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}.vp-portfolio.vp-portfolio__ready{min-height:initial}.vp-portfolio.vp-portfolio__ready .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__layout-elements{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap{visibility:hidden;opacity:0}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap .vp-portfolio__preloader{-webkit-animation:none;animation:none}.vp-single-filter.vp-single-filter__ready .vp-portfolio__filter-wrap{visibility:visible;opacity:1}.vp-single-sort.vp-single-sort__ready .vp-portfolio__sort-wrap{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__loading::before{content:"";position:absolute;display:block;top:0;left:0;bottom:0;right:0;z-index:1}.vp-portfolio.vp-portfolio__loading .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__layout-elements{opacity:.5}.vp-portfolio__item-popup{display:none}img.vp-lazyload{opacity:1;-webkit-transition:var(--vp-transition-duration) opacity;-o-transition:var(--vp-transition-duration) opacity;transition:var(--vp-transition-duration) opacity;will-change:opacity}.vp-portfolio__item-img::before,.vp-portfolio__thumbnail-img::before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background:var(--vp-images-lazy__background);background-color:var(--vp-images-lazy__background-color);background-position:100% 50%;background-size:500% 100%;-webkit-transition:var(--vp-transition-duration) var(--vp-transition-duration) opacity,var(--vp-transition-duration) var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) var(--vp-transition-duration) opacity,var(--vp-transition-duration) var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) var(--vp-transition-duration) opacity,var(--vp-transition-duration) var(--vp-transition-duration) visibility}.vp-portfolio__item-img-lazyloading::before,.vp-portfolio__thumbnail-img-lazyloading::before{visibility:visible;opacity:1;-webkit-transition:none;-o-transition:none;transition:none;-webkit-animation:vp-lazyload-placeholder var(--vp-images-lazy__animation-duration) linear infinite;animation:vp-lazyload-placeholder var(--vp-images-lazy__animation-duration) linear infinite}.vp-portfolio__item-img-lazyloading img.vp-lazyload,.vp-portfolio__thumbnail-img-lazyloading img.vp-lazyload{opacity:0}@-webkit-keyframes vp-lazyload-placeholder{0%,80%{background-position:0% 50%}100%{background-position:100% 50%}}@keyframes vp-lazyload-placeholder{0%,80%{background-position:0% 50%}100%{background-position:100% 50%}}.vp-spinner{position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:var(--vp-spinner__size);height:var(--vp-spinner__size);text-indent:-9999em;border:var(--vp-spinner__border-size) solid transparent;border-right:var(--vp-spinner__border-size) solid var(--vp-spinner__color);border-radius:50%;-webkit-animation:vp-spinner var(--vp-spinner__speed) infinite linear;animation:vp-spinner var(--vp-spinner__speed) infinite linear}.vp-spinner::after{content:"";position:absolute;display:block;top:calc(-1 * var(--vp-spinner__border-size));left:calc(-1 * var(--vp-spinner__border-size));bottom:calc(-1 * var(--vp-spinner__border-size));right:calc(-1 * var(--vp-spinner__border-size));border:var(--vp-spinner__border-size) solid var(--vp-spinner--background__color);border-radius:50%;opacity:var(--vp-spinner--background__opacity)}@-webkit-keyframes vp-spinner{100%{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}}@keyframes vp-spinner{100%{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}}
|
assets/css/main.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
:root{--vp-color-brand: #2540cc;--vp-color-gray: #6c7781;--vp-color-gray-darken: #4b4b4b;--vp-color-gray-light: #e8e8e8;--vp-color-gray-lighten: #f7f7f7;--vp-border-radius: 5px;--vp-items__gap: 0;--vp-transition-duration: .3s;--vp-transition-easing: ease-in-out;--vp-interactive__transition-duration: .2s;--vp-interactive__transition-easing: ease-in-out}.vp-portfolio{--vp-wrap__min-height: 114px;--vp-elements__gap: 20px;--vp-images__object-fit: cover;--vp-images__object-position: 50% 50%;--vp-images-lazy__background: linear-gradient(-70deg, rgba(140, 140, 140, 0) 42%, rgba(140, 140, 140, .05) 50%, rgba(140, 140, 140, 0) 58%);--vp-images-lazy__background-color: rgba(140, 140, 140, .05);--vp-images-lazy__animation-duration: 3s}.vp-spinner{--vp-spinner__color: currentColor;--vp-spinner__size: 20px;--vp-spinner__border-size: 2px;--vp-spinner__speed: .3s;--vp-spinner--background__color: var(--vp-spinner__color);--vp-spinner--background__opacity: .3}.vp-portfolio{position:relative;min-height:var(--vp-wrap__min-height)}.vp-portfolio,.vp-portfolio *{-webkit-box-sizing:border-box;box-sizing:border-box}.vp-portfolio__items{-webkit-transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);-o-transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);will-change:height, transform}.vp-portfolio::after,.vp-portfolio__items::after{content:"";display:block;clear:both}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__sort-wrap,.vp-portfolio__pagination-wrap,.vp-portfolio__item{position:relative;overflow:hidden}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__layout-elements{margin-bottom:var(--vp-elements__gap);visibility:hidden;opacity:0;-webkit-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;will-change:opacity, visibility}.vp-portfolio>:last-child{margin-bottom:0}.vp-portfolio__item-wrap{position:relative;float:left;width:33.333%}.vp-svg-icon{display:inline-block;width:1em;height:1em;overflow:visible;font-size:inherit;vertical-align:-.125em}.vp-screen-reader-text{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);word-break:normal;word-wrap:normal !important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%)}.vp-screen-reader-text:focus{display:block;top:5px;right:5px;width:auto;height:auto;padding:15px 23px 14px;clip:auto !important;font-size:14px;font-size:.875rem;font-weight:700;line-height:normal;color:var(--vp-color-brand);text-decoration:none;background-color:#f1f1f1;border-radius:3px;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,0.6);box-shadow:0 0 2px 2px rgba(0,0,0,0.6);-webkit-clip-path:none;clip-path:none;z-index:100000}[data-vp-layout]:not([data-vp-layout="slider"]) .vp-portfolio__item-wrap{padding:0 !important;margin:0 !important}[data-vp-layout="slider"] .vp-portfolio__item-wrap{float:none;padding:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-left:0 !important}.vp-portfolio__item .vp-portfolio__item-img img,.vp-portfolio__item .vp-portfolio__item-img a,.vp-portfolio__item .vp-portfolio__thumbnail-img img{display:block;width:100%;height:auto}.vp-portfolio__item-img,.vp-portfolio__thumbnail-img{position:relative}.vp-portfolio__layout-elements{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:calc(100% + var(--vp-elements__gap));margin-top:calc(-1 * var(--vp-elements__gap));margin-left:calc(-1 * var(--vp-elements__gap))}.vp-portfolio__layout-elements>*{margin-top:var(--vp-elements__gap);margin-left:var(--vp-elements__gap)}.vp-portfolio__layout-elements-align-left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.vp-portfolio__layout-elements-align-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.vp-portfolio__layout-elements-align-right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.vp-portfolio__layout-elements-align-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.vp-portfolio figure.vp-portfolio__item{margin:0}[class^="wp-block-"]:not(.wp-block-gallery) figcaption.vp-portfolio__item-meta,.vp-portfolio figcaption.vp-portfolio__item-meta{margin-bottom:0;font-style:inherit}.vp-portfolio__preloader-wrap{visibility:visible;opacity:1;-webkit-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;will-change:opacity, visibility}.vp-portfolio__preloader{position:absolute;left:50%;width:23px;height:24px;margin-top:45px;margin-left:-11px;-webkit-animation:vp-preloader 2s linear infinite;animation:vp-preloader 2s linear infinite}.vp-portfolio__preloader span{position:absolute;display:block;top:0;left:0;width:10px;height:7px;background-color:#8a8a8a}.vp-portfolio__preloader span:nth-of-type(1){height:14px}.vp-portfolio__preloader span:nth-of-type(2){left:12px}.vp-portfolio__preloader span:nth-of-type(3){top:16px}.vp-portfolio__preloader span:nth-of-type(4){top:9px;left:12px;height:14px}@-webkit-keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}@keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}.vp-portfolio.vp-portfolio__ready{min-height:initial}.vp-portfolio.vp-portfolio__ready .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__layout-elements{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap{visibility:hidden;opacity:0}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap .vp-portfolio__preloader{-webkit-animation:none;animation:none}.vp-single-filter.vp-single-filter__ready .vp-portfolio__filter-wrap{visibility:visible;opacity:1}.vp-single-sort.vp-single-sort__ready .vp-portfolio__sort-wrap{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__loading::before{content:"";position:absolute;display:block;top:0;right:0;bottom:0;left:0;z-index:1}.vp-portfolio.vp-portfolio__loading .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__layout-elements{opacity:.5}.vp-portfolio__item-popup{display:none}img.
|
1 |
+
:root{--vp-color-brand: #2540cc;--vp-color-gray: #6c7781;--vp-color-gray-darken: #4b4b4b;--vp-color-gray-light: #e8e8e8;--vp-color-gray-lighten: #f7f7f7;--vp-border-radius: 5px;--vp-items__gap: 0;--vp-transition-duration: .3s;--vp-transition-easing: ease-in-out;--vp-interactive__transition-duration: .2s;--vp-interactive__transition-easing: ease-in-out}.vp-portfolio{--vp-wrap__min-height: 114px;--vp-elements__gap: 20px;--vp-images__object-fit: cover;--vp-images__object-position: 50% 50%;--vp-images-lazy__background: linear-gradient(-70deg, rgba(140, 140, 140, 0) 42%, rgba(140, 140, 140, .05) 50%, rgba(140, 140, 140, 0) 58%);--vp-images-lazy__background-color: rgba(140, 140, 140, .05);--vp-images-lazy__animation-duration: 3s}.vp-spinner{--vp-spinner__color: currentColor;--vp-spinner__size: 20px;--vp-spinner__border-size: 2px;--vp-spinner__speed: .3s;--vp-spinner--background__color: var(--vp-spinner__color);--vp-spinner--background__opacity: .3}.vp-portfolio{position:relative;min-height:var(--vp-wrap__min-height)}.vp-portfolio,.vp-portfolio *{-webkit-box-sizing:border-box;box-sizing:border-box}.vp-portfolio__items{-webkit-transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);-o-transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);transition:var(--vp-transition-duration) height var(--vp-transition-easing),var(--vp-transition-duration) transform var(--vp-transition-easing);will-change:height, transform}.vp-portfolio::after,.vp-portfolio__items::after{content:"";display:block;clear:both}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__sort-wrap,.vp-portfolio__pagination-wrap,.vp-portfolio__item{position:relative;overflow:hidden}.vp-portfolio__items-wrap,.vp-portfolio__thumbnails-wrap,.vp-portfolio__layout-elements{margin-bottom:var(--vp-elements__gap);visibility:hidden;opacity:0;-webkit-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;will-change:opacity, visibility}.vp-portfolio>:last-child{margin-bottom:0}.vp-portfolio__item-wrap{position:relative;float:left;width:33.333%}.vp-svg-icon{display:inline-block;width:1em;height:1em;overflow:visible;font-size:inherit;vertical-align:-.125em}.vp-screen-reader-text{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);word-break:normal;word-wrap:normal !important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%)}.vp-screen-reader-text:focus{display:block;top:5px;right:5px;width:auto;height:auto;padding:15px 23px 14px;clip:auto !important;font-size:14px;font-size:.875rem;font-weight:700;line-height:normal;color:var(--vp-color-brand);text-decoration:none;background-color:#f1f1f1;border-radius:3px;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,0.6);box-shadow:0 0 2px 2px rgba(0,0,0,0.6);-webkit-clip-path:none;clip-path:none;z-index:100000}[data-vp-layout]:not([data-vp-layout="slider"]) .vp-portfolio__item-wrap{padding:0 !important;margin:0 !important}[data-vp-layout="slider"] .vp-portfolio__item-wrap{float:none;padding:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-left:0 !important}.vp-portfolio__item .vp-portfolio__item-img img,.vp-portfolio__item .vp-portfolio__item-img a,.vp-portfolio__item .vp-portfolio__thumbnail-img img{display:block;width:100%;height:auto}.vp-portfolio__item-img,.vp-portfolio__thumbnail-img{position:relative}.vp-portfolio__layout-elements{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:calc(100% + var(--vp-elements__gap));margin-top:calc(-1 * var(--vp-elements__gap));margin-left:calc(-1 * var(--vp-elements__gap))}.vp-portfolio__layout-elements>*{margin-top:var(--vp-elements__gap);margin-left:var(--vp-elements__gap)}.vp-portfolio__layout-elements-align-left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.vp-portfolio__layout-elements-align-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.vp-portfolio__layout-elements-align-right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.vp-portfolio__layout-elements-align-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.vp-portfolio figure.vp-portfolio__item{margin:0}[class^="wp-block-"]:not(.wp-block-gallery) figcaption.vp-portfolio__item-meta,.vp-portfolio figcaption.vp-portfolio__item-meta{margin-bottom:0;font-style:inherit}.vp-portfolio__preloader-wrap{visibility:visible;opacity:1;-webkit-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) opacity,var(--vp-transition-duration) visibility;will-change:opacity, visibility}.vp-portfolio__preloader{position:absolute;left:50%;width:23px;height:24px;margin-top:45px;margin-left:-11px;-webkit-animation:vp-preloader 2s linear infinite;animation:vp-preloader 2s linear infinite}.vp-portfolio__preloader span{position:absolute;display:block;top:0;left:0;width:10px;height:7px;background-color:#8a8a8a}.vp-portfolio__preloader span:nth-of-type(1){height:14px}.vp-portfolio__preloader span:nth-of-type(2){left:12px}.vp-portfolio__preloader span:nth-of-type(3){top:16px}.vp-portfolio__preloader span:nth-of-type(4){top:9px;left:12px;height:14px}@-webkit-keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}@keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}.vp-portfolio.vp-portfolio__ready{min-height:initial}.vp-portfolio.vp-portfolio__ready .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__layout-elements{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap{visibility:hidden;opacity:0}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap .vp-portfolio__preloader{-webkit-animation:none;animation:none}.vp-single-filter.vp-single-filter__ready .vp-portfolio__filter-wrap{visibility:visible;opacity:1}.vp-single-sort.vp-single-sort__ready .vp-portfolio__sort-wrap{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__loading::before{content:"";position:absolute;display:block;top:0;right:0;bottom:0;left:0;z-index:1}.vp-portfolio.vp-portfolio__loading .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__thumbnails-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__layout-elements{opacity:.5}.vp-portfolio__item-popup{display:none}img.vp-lazyload{opacity:1;-webkit-transition:var(--vp-transition-duration) opacity;-o-transition:var(--vp-transition-duration) opacity;transition:var(--vp-transition-duration) opacity;will-change:opacity}.vp-portfolio__item-img::before,.vp-portfolio__thumbnail-img::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:var(--vp-images-lazy__background);background-color:var(--vp-images-lazy__background-color);background-position:0% 50%;background-size:500% 100%;-webkit-transition:var(--vp-transition-duration) var(--vp-transition-duration) opacity,var(--vp-transition-duration) var(--vp-transition-duration) visibility;-o-transition:var(--vp-transition-duration) var(--vp-transition-duration) opacity,var(--vp-transition-duration) var(--vp-transition-duration) visibility;transition:var(--vp-transition-duration) var(--vp-transition-duration) opacity,var(--vp-transition-duration) var(--vp-transition-duration) visibility}.vp-portfolio__item-img-lazyloading::before,.vp-portfolio__thumbnail-img-lazyloading::before{visibility:visible;opacity:1;-webkit-transition:none;-o-transition:none;transition:none;-webkit-animation:vp-lazyload-placeholder var(--vp-images-lazy__animation-duration) linear infinite;animation:vp-lazyload-placeholder var(--vp-images-lazy__animation-duration) linear infinite}.vp-portfolio__item-img-lazyloading img.vp-lazyload,.vp-portfolio__thumbnail-img-lazyloading img.vp-lazyload{opacity:0}@-webkit-keyframes vp-lazyload-placeholder{0%,80%{background-position:100% 50%}100%{background-position:0% 50%}}@keyframes vp-lazyload-placeholder{0%,80%{background-position:100% 50%}100%{background-position:0% 50%}}.vp-spinner{position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:var(--vp-spinner__size);height:var(--vp-spinner__size);text-indent:-9999em;border:var(--vp-spinner__border-size) solid transparent;border-left:var(--vp-spinner__border-size) solid var(--vp-spinner__color);border-radius:50%;-webkit-animation:vp-spinner var(--vp-spinner__speed) infinite linear;animation:vp-spinner var(--vp-spinner__speed) infinite linear}.vp-spinner::after{content:"";position:absolute;display:block;top:calc(-1 * var(--vp-spinner__border-size));right:calc(-1 * var(--vp-spinner__border-size));bottom:calc(-1 * var(--vp-spinner__border-size));left:calc(-1 * var(--vp-spinner__border-size));border:var(--vp-spinner__border-size) solid var(--vp-spinner--background__color);border-radius:50%;opacity:var(--vp-spinner--background__opacity)}@-webkit-keyframes vp-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes vp-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}
|
assets/js/custom-scrollbar.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},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=
|
1 |
+
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},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=219)}({219:function(t,e,n){t.exports=n(220)},220:function(t,e){var n=window,o=n.jQuery,r=n.SimpleBar;!/Mac|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&void 0!==r&&(o(document).on("extendClass.vpf",(function(t,e){"vpf"===t.namespace&&(e.prototype.initCustomScrollbar=function(){this.emitEvent("beforeInitCustomScrollbar"),this.$items_wrap.find(".vp-portfolio__custom-scrollbar").each((function(){new r(this)})),this.emitEvent("initCustomScrollbar")},e.prototype.destroyCustomScrollbar=function(){this.$items_wrap.find('[data-simplebar="init"].vp-portfolio__custom-scrollbar').each((function(){var t=r.instances.get(this);t&&t.unMount()})),this.emitEvent("destroyCustomScrollbar")})})),o(document).on("addItems.vpf",(function(t,e,n,o){"vpf"===t.namespace&&(o&&e.destroyCustomScrollbar(),e.initCustomScrollbar())})),o(document).on("init.vpf",(function(t,e){"vpf"===t.namespace&&e.initCustomScrollbar()})),o(document).on("destroy.vpf",(function(t,e){"vpf"===t.namespace&&e.destroyCustomScrollbar()})))}});
|
assets/js/images-lazy-loading.js
ADDED
@@ -0,0 +1,93 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* Visual Portfolio images lazy load.
|
3 |
+
*/
|
4 |
+
const {
|
5 |
+
jQuery: $,
|
6 |
+
objectFitImages,
|
7 |
+
} = window;
|
8 |
+
|
9 |
+
const $doc = $( document );
|
10 |
+
|
11 |
+
// enable object-fit
|
12 |
+
if ( 'undefined' !== typeof objectFitImages ) {
|
13 |
+
// ofi and lazysizes conflicted, so we need to run lazysizes
|
14 |
+
// first and then run ofi polyfill.
|
15 |
+
objectFitImages( '.vp-portfolio img:not(.vp-lazyload)' );
|
16 |
+
|
17 |
+
$doc.on( 'lazybeforeunveil', ( e ) => {
|
18 |
+
const $img = $( e.target );
|
19 |
+
|
20 |
+
if ( $img.hasClass( 'vp-lazyload' ) ) {
|
21 |
+
$img.one( 'load', () => {
|
22 |
+
objectFitImages( $img[ 0 ] );
|
23 |
+
} );
|
24 |
+
}
|
25 |
+
} );
|
26 |
+
}
|
27 |
+
|
28 |
+
// Lazyloaded - remove preloader images placeholder effect.
|
29 |
+
$doc.on( 'lazybeforeunveil', ( e ) => {
|
30 |
+
const $img = $( e.target );
|
31 |
+
|
32 |
+
if ( $img.hasClass( 'vp-lazyload' ) ) {
|
33 |
+
$img.closest( '.vp-portfolio__item-img' ).addClass( 'vp-portfolio__item-img-lazyloading' );
|
34 |
+
$img.closest( '.vp-portfolio__thumbnail-img' ).addClass( 'vp-portfolio__thumbnail-img-lazyloading' );
|
35 |
+
}
|
36 |
+
} );
|
37 |
+
$doc.on( 'lazyloaded', ( e ) => {
|
38 |
+
const $img = $( e.target );
|
39 |
+
|
40 |
+
if ( $img.hasClass( 'vp-lazyload' ) ) {
|
41 |
+
$img.closest( '.vp-portfolio__item-img-lazyloading' ).removeClass( 'vp-portfolio__item-img-lazyloading' );
|
42 |
+
$img.closest( '.vp-portfolio__thumbnail-img-lazyloading' ).removeClass( 'vp-portfolio__thumbnail-img-lazyloading' );
|
43 |
+
}
|
44 |
+
} );
|
45 |
+
|
46 |
+
// Extend VP class.
|
47 |
+
$doc.on( 'extendClass.vpf', ( event, VP ) => {
|
48 |
+
if ( 'vpf' !== event.namespace ) {
|
49 |
+
return;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Prepare image for Lazyload
|
54 |
+
*
|
55 |
+
* We need to add lazyload class and attributes from global config of lazysizes.
|
56 |
+
* This need because some 3rd-party themes/plugins may change it and it will be conflicted with our config.
|
57 |
+
* Related topic: https://wordpress.org/support/topic/since-the-last-update-i-cant-see-image-featured-of-posts/#post-10519096.
|
58 |
+
*/
|
59 |
+
VP.prototype.prepareLazyLoad = function() {
|
60 |
+
const self = this;
|
61 |
+
const config = window.lazySizes && window.lazySizes.cfg ? window.lazySizes.cfg : window.lazySizesConfig;
|
62 |
+
|
63 |
+
if ( config ) {
|
64 |
+
const attrsToReplace = {
|
65 |
+
'data-src': config.srcAttr,
|
66 |
+
'data-sizes': config.sizesAttr,
|
67 |
+
'data-srcset': config.srcsetAttr,
|
68 |
+
};
|
69 |
+
|
70 |
+
self.$items_wrap.add( self.$slider_thumbnails_wrap ).find( `.vp-lazyload:not(.${ config.lazyClass })` ).each( function() {
|
71 |
+
const $item = $( this );
|
72 |
+
|
73 |
+
Object.keys( attrsToReplace ).forEach( ( attr ) => {
|
74 |
+
if ( attrsToReplace[ attr ] && attr !== attrsToReplace[ attr ] && $item.attr( attr ) ) {
|
75 |
+
$item.attr( attrsToReplace[ attr ], $item.attr( attr ) );
|
76 |
+
$item.removeAttr( attr );
|
77 |
+
}
|
78 |
+
} );
|
79 |
+
|
80 |
+
$item.addClass( config.lazyClass );
|
81 |
+
} );
|
82 |
+
}
|
83 |
+
};
|
84 |
+
} );
|
85 |
+
|
86 |
+
// Init lazy loading on start and after new items loaded.
|
87 |
+
$doc.on( 'init.vpf endLoadingNewItems.vpf', ( event, self ) => {
|
88 |
+
if ( 'vpf' !== event.namespace ) {
|
89 |
+
return;
|
90 |
+
}
|
91 |
+
|
92 |
+
self.prepareLazyLoad();
|
93 |
+
} );
|
assets/js/images-lazy-loading.min.js
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
!function(t){var o={};function e(a){if(o[a])return o[a].exports;var n=o[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,e),n.l=!0,n.exports}e.m=t,e.c=o,e.d=function(t,o,a){e.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:a})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,o){if(1&o&&(t=e(t)),8&o)return t;if(4&o&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(e.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&o&&"string"!=typeof t)for(var n in t)e.d(a,n,function(o){return t[o]}.bind(null,n));return a},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},e.p="",e(e.s=221)}({221:function(t,o,e){t.exports=e(222)},222:function(t,o){var e=window,a=e.jQuery,n=e.objectFitImages,r=a(document);void 0!==n&&(n(".vp-portfolio img:not(.vp-lazyload)"),r.on("lazybeforeunveil",(function(t){var o=a(t.target);o.hasClass("vp-lazyload")&&o.one("load",(function(){n(o[0])}))}))),r.on("lazybeforeunveil",(function(t){var o=a(t.target);o.hasClass("vp-lazyload")&&(o.closest(".vp-portfolio__item-img").addClass("vp-portfolio__item-img-lazyloading"),o.closest(".vp-portfolio__thumbnail-img").addClass("vp-portfolio__thumbnail-img-lazyloading"))})),r.on("lazyloaded",(function(t){var o=a(t.target);o.hasClass("vp-lazyload")&&(o.closest(".vp-portfolio__item-img-lazyloading").removeClass("vp-portfolio__item-img-lazyloading"),o.closest(".vp-portfolio__thumbnail-img-lazyloading").removeClass("vp-portfolio__thumbnail-img-lazyloading"))})),r.on("extendClass.vpf",(function(t,o){"vpf"===t.namespace&&(o.prototype.prepareLazyLoad=function(){var t=window.lazySizes&&window.lazySizes.cfg?window.lazySizes.cfg:window.lazySizesConfig;if(t){var o={"data-src":t.srcAttr,"data-sizes":t.sizesAttr,"data-srcset":t.srcsetAttr};this.$items_wrap.add(this.$slider_thumbnails_wrap).find(".vp-lazyload:not(.".concat(t.lazyClass,")")).each((function(){var e=a(this);Object.keys(o).forEach((function(t){o[t]&&t!==o[t]&&e.attr(t)&&(e.attr(o[t],e.attr(t)),e.removeAttr(t))})),e.addClass(t.lazyClass)}))}})})),r.on("init.vpf endLoadingNewItems.vpf",(function(t,o){"vpf"===t.namespace&&o.prepareLazyLoad()}))}});
|
assets/js/items-style-fly.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},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=
|
1 |
+
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},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=223)}({223:function(t,e,n){t.exports=n(224)},224:function(t,e){var n=window.jQuery,o=n(window);function r(t,e,n,o){var r=(o.x-n.x)*(t.y-n.y)-(o.y-n.y)*(t.x-n.x),i=(o.x-n.x)*(e.y-n.y)-(o.y-n.y)*(e.x-n.x),a=(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x),f=(e.x-t.x)*(o.y-t.y)-(e.y-t.y)*(o.x-t.x);return 0>=r*i&&0>=a*f}n(document).on("initEvents.vpf",(function(t,e){if("vpf"===t.namespace&&"fly"===e.options.itemsStyle){var i=".vpf-uid-".concat(e.uid),a={};o.on("mousemove".concat(i),(function(t){a={x:t.clientX,y:t.clientY}})),e.$item.on("mouseenter".concat(i," mouseleave").concat(i),".vp-portfolio__item",(function(t){var e=n(this),o=e[0].getBoundingClientRect(),i=e.find(".vp-portfolio__item-overlay"),f="mouseenter"===t.type,c="0%",u="0%",l={x:t.clientX,y:t.clientY},s=r({x:o.left,y:o.top},{x:o.left+o.width,y:o.top},l,a),y=r({x:o.left,y:o.top+o.height},{x:o.left+o.width,y:o.top+o.height},l,a),p=r({x:o.left,y:o.top},{x:o.left,y:o.top+o.height},l,a),d=r({x:o.left+o.width,y:o.top},{x:o.left+o.width,y:o.top+o.height},l,a);if(!(s||y||p||d)){var x=(o.width/2-l.x+o.left)/(o.width/2),v=(o.height/2-l.y+o.top)/(o.height/2);Math.abs(x)>Math.abs(v)?0<x?p=!0:d=!0:0<v?s=!0:y=!0}s?u="-100.1%":y?u="100.1%":p?c="-100.1%":d&&(c="100.1%"),f&&(i.css({transition:"none",transform:"translateX(".concat(c,") translateY(").concat(u,") translateZ(0)")}),i[0].offsetHeight),i.css({transition:".2s transform ease-in-out",transform:"translateX(".concat(f?"0%":c,") translateY(").concat(f?"0%":u,") translateZ(0)")})}))}})),n(document).on("destroyEvents.vpf",(function(t,e){if("vpf"===t.namespace&&"fly"===e.options.itemsStyle){var n=".vpf-uid-".concat(e.uid);o.off("mousemove".concat(n)),e.$item.off("mouseenter".concat(n," mouseleave").concat(n))}}))}});
|
assets/js/layout-grid.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){var i={};function e(o){if(i[o])return i[o].exports;var n=i[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,e),n.l=!0,n.exports}e.m=t,e.c=i,e.d=function(t,i,o){e.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,i){if(1&i&&(t=e(t)),8&i)return t;if(4&i&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&i&&"string"!=typeof t)for(var n in t)e.d(o,n,function(i){return t[i]}.bind(null,n));return o},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=
|
1 |
+
!function(t){var i={};function e(o){if(i[o])return i[o].exports;var n=i[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,e),n.l=!0,n.exports}e.m=t,e.c=i,e.d=function(t,i,o){e.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,i){if(1&i&&(t=e(t)),8&i)return t;if(4&i&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&i&&"string"!=typeof t)for(var n in t)e.d(o,n,function(i){return t[i]}.bind(null,n));return o},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=225)}({225:function(t,i,e){t.exports=e(226)},226:function(t,i){var e=window.jQuery,o=window.VPData.screenSizes;if(void 0!==window.Isotope&&void 0!==window.Isotope.LayoutMode){var n=window.Isotope.LayoutMode.create("vpRows").prototype;n.measureColumns=function(){if(this.items=this.isotope.filteredItems,this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&window.getSize(i).outerWidth||this.containerWidth}this.columnWidth+=this.gutter;var e=this.containerWidth+this.gutter,o=e/this.columnWidth,n=this.columnWidth-e%this.columnWidth;o=Math[n&&1>n?"round":"floor"](o),this.cols=Math.max(o,1)},n.getContainerWidth=function(){var t=!!this._getOption&&this._getOption("fitWidth")?this.element.parentNode:this.element,i=window.getSize(t);this.containerWidth=i&&i.innerWidth},n._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this.horizontalColIndex=0,this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns()},n._getItemLayoutPosition=function(t){t.getSize();var i=t.size.outerWidth%this.columnWidth,e=Math[i&&1>i?"round":"ceil"](t.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);var o=this.horizontalColIndex%this.cols;o=1<e&&o+e>this.cols?0:o;var n=t.size.outerWidth&&t.size.outerHeight;this.horizontalColIndex=n?o+e:this.horizontalColIndex;var r=t.size.outerWidth+this.gutter;0!==this.x&&1===this.horizontalColIndex&&(this.x=0,this.y=this.maxY);var s={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=r,s},n._getContainerSize=function(){return{height:this.maxY}}}e(document).on("initOptions.vpf",(function(t,i){"vpf"===t.namespace&&(i.defaults.gridColumns=3,i.options.gridColumns||(i.options.gridColumns=i.defaults.gridColumns),i.options.gridImagesAspectRatio||(i.options.gridImagesAspectRatio=i.defaults.gridImagesAspectRatio))})),e(document).on("initLayout.vpf",(function(t,i){if("vpf"===t.namespace&&"grid"===i.options.layout){var e=function(t){var i="",e="";if(t&&/:/g.test(t)){var o=t.split(":");i=o[0],e=o[1]}return[i,e]}(i.options.gridImagesAspectRatio);e&&e[0]&&e[1]&&i.addStyle(".vp-portfolio__item-wrap .vp-portfolio__item-img-wrap::before",{"padding-top":"".concat(e[1]/e[0]*100,"%")}),i.addStyle(".vp-portfolio__item-wrap",{width:"".concat(100/i.options.gridColumns,"%")});for(var n=i.options.gridColumns-1,r=Math.min(o.length-1,n);0<=r;r-=1)0<n&&void 0!==o[r]&&i.addStyle(".vp-portfolio__item-wrap",{width:"".concat(100/n,"%")},"screen and (max-width: ".concat(o[r],"px)")),n-=1}})),e(document).on("beforeInitIsotope.vpf",(function(t,i,e){"vpf"===t.namespace&&"grid"===i.options.layout&&(e.layoutMode="vpRows")}))}});
|
assets/js/layout-justified.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=
|
1 |
+
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=227)}({227:function(e,t,n){e.exports=n(228)},228:function(e,t){(0,window.jQuery)(document).on("initOptions.vpf",(function(e,t){"vpf"===e.namespace&&(t.defaults.justifiedRowHeight=250,t.defaults.justifiedRowHeightTolerance=.25,t.options.justifiedRowHeight||(t.options.justifiedRowHeight=t.defaults.justifiedRowHeight),t.options.justifiedRowHeightTolerance||(t.options.justifiedRowHeightTolerance=t.defaults.justifiedRowHeightTolerance))}))}});
|
assets/js/layout-masonry.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(o){var t={};function n(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return o[e].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=o,n.c=t,n.d=function(o,t,e){n.o(o,t)||Object.defineProperty(o,t,{enumerable:!0,get:e})},n.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},n.t=function(o,t){if(1&t&&(o=n(o)),8&t)return o;if(4&t&&"object"==typeof o&&o&&o.__esModule)return o;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:o}),2&t&&"string"!=typeof o)for(var r in o)n.d(e,r,function(t){return o[t]}.bind(null,r));return e},n.n=function(o){var t=o&&o.__esModule?function(){return o.default}:function(){return o};return n.d(t,"a",t),t},n.o=function(o,t){return Object.prototype.hasOwnProperty.call(o,t)},n.p="",n(n.s=
|
1 |
+
!function(o){var t={};function n(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return o[e].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=o,n.c=t,n.d=function(o,t,e){n.o(o,t)||Object.defineProperty(o,t,{enumerable:!0,get:e})},n.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},n.t=function(o,t){if(1&t&&(o=n(o)),8&t)return o;if(4&t&&"object"==typeof o&&o&&o.__esModule)return o;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:o}),2&t&&"string"!=typeof o)for(var r in o)n.d(e,r,function(t){return o[t]}.bind(null,r));return e},n.n=function(o){var t=o&&o.__esModule?function(){return o.default}:function(){return o};return n.d(t,"a",t),t},n.o=function(o,t){return Object.prototype.hasOwnProperty.call(o,t)},n.p="",n(n.s=229)}({229:function(o,t,n){o.exports=n(230)},230:function(o,t){var n=window.jQuery,e=window.VPData.screenSizes;n(document).on("initOptions.vpf",(function(o,t){"vpf"===o.namespace&&(t.defaults.masonryColumns=3,t.options.masonryColumns||(t.options.masonryColumns=t.defaults.masonryColumns),t.options.masonryImagesAspectRatio||(t.options.masonryImagesAspectRatio=t.defaults.masonryImagesAspectRatio))})),n(document).on("initLayout.vpf",(function(o,t){if("vpf"===o.namespace&&"masonry"===t.options.layout){var n=function(o){var t="",n="";if(o&&/:/g.test(o)){var e=o.split(":");t=e[0],n=e[1]}return[t,n]}(t.options.masonryImagesAspectRatio);n&&n[0]&&n[1]&&t.addStyle(".vp-portfolio__item-wrap .vp-portfolio__item-img-wrap::before",{"padding-top":"".concat(n[1]/n[0]*100,"%")}),t.addStyle(".vp-portfolio__item-wrap",{width:"".concat(100/t.options.masonryColumns,"%")});for(var r=t.options.masonryColumns-1,a=Math.min(e.length-1,r);0<=a;a-=1)0<r&&void 0!==e[a]&&t.addStyle(".vp-portfolio__item-wrap",{width:"".concat(100/r,"%")},"screen and (max-width: ".concat(e[a],"px)")),r-=1}}))}});
|
assets/js/layout-slider.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
!function(t){var o={};function i(e){if(o[e])return o[e].exports;var n=o[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=o,i.d=function(t,o,e){i.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:e})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,o){if(1&o&&(t=i(t)),8&o)return t;if(4&o&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(i.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&o&&"string"!=typeof t)for(var n in t)i.d(e,n,function(o){return t[o]}.bind(null,n));return e},i.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(o,"a",o),o},i.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},i.p="",i(i.s=
|
2 |
Â
/*!
|
3 |
Â
* is-number <https://github.com/jonschlinkert/is-number>
|
4 |
Â
*
|
1 |
+
!function(t){var o={};function i(e){if(o[e])return o[e].exports;var n=o[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=o,i.d=function(t,o,e){i.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:e})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,o){if(1&o&&(t=i(t)),8&o)return t;if(4&o&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(i.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&o&&"string"!=typeof t)for(var n in t)i.d(e,n,function(o){return t[o]}.bind(null,n));return e},i.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(o,"a",o),o},i.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},i.p="",i(i.s=231)}({231:function(t,o,i){t.exports=i(232)},232:function(t,o,i){"use strict";i.r(o);var e=i(28),n=i.n(e);(0,window.jQuery)(document).on("initLayout.vpf",(function(t,o){"vpf"===t.namespace&&"slider"===o.options.layout&&(["items","thumbnails"].forEach((function(t){var i="items"===t?o.options.sliderItemsHeight:o.options.sliderThumbnailsHeight,e="items"===t?o.options.sliderItemsMinHeight:0,r=t.replace(/s$/g,"");if("auto"!==i)if(i=n()(i)?"".concat(i,"px"):i,e&&o.isPreview()&&/vh/.test(e)&&(e=0),"auto"===("items"===t?o.options.sliderSlidesPerView:o.options.sliderThumbnailsPerView)){var p="auto";"items"===t&&"fade"===o.options.sliderEffect&&(p="100%"),i.indexOf("%")===i.length-1?(o.addStyle(".vp-portfolio__".concat(t,"-wrap::before"),{content:'""',display:"block",width:"100%","margin-top":i}),o.addStyle(".vp-portfolio__".concat(t),{position:"absolute",top:0,left:0,right:0,bottom:0}),o.addStyle(".vp-portfolio__".concat(r,"-wrap"),{width:"auto",height:"true"===o.options.sliderBullets?"calc( 100% - 25px )":"100%"}),o.addStyle(".vp-portfolio__".concat(r,", .vp-portfolio__").concat(r,"-img-wrap, .vp-portfolio__").concat(r,"-img, .vp-portfolio__").concat(r,"-wrap .vp-portfolio__").concat(r," .vp-portfolio__").concat(r,"-img a, .vp-portfolio__").concat(r,"-wrap .vp-portfolio__").concat(r," .vp-portfolio__").concat(r,"-img img"),{width:p,height:"100%"}),e&&o.addStyle(".vp-portfolio__".concat(t,"-wrap"),{"min-height":e})):(o.addStyle(".vp-portfolio__".concat(r,"-wrap"),{width:"auto"}),o.addStyle(".vp-portfolio__".concat(r," .vp-portfolio__").concat(r,"-img img"),{width:p,height:i}),e&&o.addStyle(".vp-portfolio__".concat(r," .vp-portfolio__").concat(r,"-img img"),{"min-height":e}))}else o.addStyle(".vp-portfolio__".concat(r,"-img-wrap::before"),{"margin-top":i}),o.addStyle(".vp-portfolio__".concat(r,"-img img"),{position:"absolute",top:0,right:0,bottom:0,left:0}),o.addStyle(".vp-portfolio__".concat(r,"-img"),{position:"absolute",top:0,right:0,bottom:0,left:0}),o.addStyle(".vp-portfolio__".concat(r," .vp-portfolio__").concat(r,"-img img"),{width:"100%",height:"100%"}),e&&o.addStyle(".vp-portfolio__".concat(r,"-img-wrap"),{"min-height":e})})),o.options.sliderThumbnailsGap&&o.addStyle(".vp-portfolio__thumbnails-wrap",{"margin-top":"".concat(o.options.sliderThumbnailsGap,"px")}))}))},28:function(t,o,i){"use strict";
|
2 |
Â
/*!
|
3 |
Â
* is-number <https://github.com/jonschlinkert/is-number>
|
4 |
Â
*
|
assets/js/layout-tiles.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=
|
1 |
+
!function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=233)}({233:function(t,e,o){t.exports=o(234)},234:function(t,e){var o=window.jQuery,n=window.VPData.screenSizes;if(void 0!==window.Isotope&&void 0!==window.Isotope.LayoutMode){var i=window.Isotope.LayoutMode.modes.masonry;if(i){var r=i.prototype.measureColumns;i.prototype.measureColumns=function(){var t=!0;if(!this.columnWidth){var e=o(this.element).closest('.vp-portfolio[data-vp-layout="tiles"]');if(e.length&&e[0].vpf){for(var i=e[0].vpf.getTilesSettings(),a=parseInt(i[0],10)||1,p=a-1,l=Math.min(n.length-1,p);0<=l;l-=1)0<p&&void 0!==n[l]&&window.innerWidth<=n[l]&&(a=p),p-=1;a&&(this.columnWidth=this.containerWidth/a,this.columnWidth+=this.gutter,this.cols=a,t=!1)}}t&&r.call(this)}}}o(document).on("extendClass.vpf",(function(t,e){"vpf"===t.namespace&&(e.prototype.getTilesSettings=function(){var t=this.options.tilesType.split(/[:|]/);return void 0===t[t.length-1]||t[t.length-1]||t.pop(),t})})),o(document).on("initOptions.vpf",(function(t,e){"vpf"===t.namespace&&(e.defaults.tilesType="3|1,1|",e.options.tilesType||(e.options.tilesType=e.defaults.tilesType))})),o(document).on("initLayout.vpf",(function(t,e){if("vpf"===t.namespace&&"tiles"===e.options.layout){var o=e.getTilesSettings(),i=parseInt(o[0],10)||1;if(o.shift(),e.addStyle(".vp-portfolio__item-wrap",{width:"".concat(100/i,"%")}),o&&o.length)for(var r=0;r<o.length;r+=1){var a=o[r].split(","),p=parseFloat(a[0])||1,l=parseFloat(a[1])||1,s=".vp-portfolio__item-wrap";1<o.length&&(s+=":nth-of-type(".concat(o.length,"n+").concat(r+1,")")),p&&1!==p&&e.addStyle(s,{width:"".concat(100*p/i,"%")}),e.addStyle("".concat(s," .vp-portfolio__item-img-wrap::before"),{"padding-top":"".concat(100*l,"%")})}for(var c=i-1,d=Math.min(n.length-1,c);0<=d;d-=1)0<c&&void 0!==n[d]&&(e.addStyle(".vp-portfolio__item-wrap",{width:"".concat(100/c,"%")},"screen and (max-width: ".concat(n[d],"px)")),e.addStyle(".vp-portfolio__item-wrap:nth-of-type(n)",{width:"".concat(100/c,"%")},"screen and (max-width: ".concat(n[d],"px)"))),c-=1}}))}});
|
assets/js/lazysizes-object-fit-cover.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=235)}({235:function(e,t,n){e.exports=n(236)},236:function(e,t){!function(e,t){var n=function n(){t(e.lazySizes),e.removeEventListener("lazyunveilread",n,!0)};t=t.bind(null,e,e.document),e.lazySizes?n():e.addEventListener("lazyunveilread",n,!0)}(window,(function(e,t,n){if(e.addEventListener){var r={calculateSize:function(t,n){var r,i=(r=t,e.getComputedStyle(r,null)||{});if(i&&i.objectFit&&"cover"===i.objectFit){var o=parseInt(t.getAttribute("height"),10),u=parseInt(t.getAttribute("width"),10);o&&u/o>t.clientWidth/t.clientHeight&&(n=parseInt(t.clientHeight*u/o,10))}return n}};n.objectFitCover=r,t.addEventListener("lazybeforesizes",(function(e){if(!e.defaultPrevented&&e.detail.instance===n){var t=e.target;e.detail.width=r.calculateSize(t,e.detail.width)}}))}}))}});
|
assets/js/main.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Â
* Visual Portfolio main script.
|
3 |
Â
*/
|
4 |
Â
import { throttle } from 'throttle-debounce';
|
5 |
-
import
|
6 |
Â
|
7 |
Â
/**
|
8 |
Â
* Global Variables
|
@@ -10,7 +10,6 @@ import rafl from 'rafl';
|
|
10 |
Â
const {
|
11 |
Â
jQuery: $,
|
12 |
Â
VPData,
|
13 |
-
objectFitImages,
|
14 |
Â
} = window;
|
15 |
Â
|
16 |
Â
const {
|
@@ -19,23 +18,6 @@ const {
|
|
19 |
Â
|
20 |
Â
const $wnd = $( window );
|
21 |
Â
|
22 |
-
// enable object-fit
|
23 |
-
if ( 'undefined' !== typeof objectFitImages ) {
|
24 |
-
// ofi and lazysizes conflicted, so we need to run lazysizes
|
25 |
-
// first and then run ofi polyfill.
|
26 |
-
objectFitImages( '.vp-portfolio img:not(.visual-portfolio-lazyload)' );
|
27 |
-
|
28 |
-
$( document ).on( 'lazybeforeunveil', ( e ) => {
|
29 |
-
const $img = $( e.target );
|
30 |
-
|
31 |
-
if ( $img.hasClass( 'visual-portfolio-lazyload' ) ) {
|
32 |
-
$img.one( 'load', () => {
|
33 |
-
objectFitImages( $img[ 0 ] );
|
34 |
-
} );
|
35 |
-
}
|
36 |
-
} );
|
37 |
-
}
|
38 |
-
|
39 |
Â
/**
|
40 |
Â
* Emit Resize Event.
|
41 |
Â
*/
|
@@ -196,9 +178,6 @@ class VP {
|
|
196 |
Â
// init events
|
197 |
Â
self.initEvents();
|
198 |
Â
|
199 |
-
// prepare lazyload images
|
200 |
-
self.prepareLazyLoad();
|
201 |
-
|
202 |
Â
// init layout
|
203 |
Â
self.initLayout();
|
204 |
Â
|
@@ -604,39 +583,6 @@ class VP {
|
|
604 |
Â
self.emitEvent( 'destroyEvents' );
|
605 |
Â
}
|
606 |
Â
|
607 |
-
/**
|
608 |
-
* Prepare image for Lazyload
|
609 |
-
*
|
610 |
-
* We need to add lazyload class and attributes from global config of lazysizes.
|
611 |
-
* This need because some 3rd-party themes/plugins may change it and it will be conflicted with our config.
|
612 |
-
* Related topic: https://wordpress.org/support/topic/since-the-last-update-i-cant-see-image-featured-of-posts/#post-10519096.
|
613 |
-
*/
|
614 |
-
prepareLazyLoad() {
|
615 |
-
const self = this;
|
616 |
-
const config = window.lazySizes && window.lazySizes.cfg ? window.lazySizes.cfg : window.lazySizesConfig;
|
617 |
-
|
618 |
-
if ( config ) {
|
619 |
-
const attrsToReplace = {
|
620 |
-
'data-vpf-src': config.srcAttr,
|
621 |
-
'data-vpf-sizes': config.sizesAttr,
|
622 |
-
'data-vpf-srcset': config.srcsetAttr,
|
623 |
-
};
|
624 |
-
|
625 |
-
self.$items_wrap.add( self.$slider_thumbnails_wrap ).find( `.visual-portfolio-lazyload:not(.${ config.lazyClass })` ).each( function() {
|
626 |
-
const $item = $( this );
|
627 |
-
|
628 |
-
Object.keys( attrsToReplace ).forEach( ( attr ) => {
|
629 |
-
if ( attrsToReplace[ attr ] && attr !== attrsToReplace[ attr ] && $item.attr( attr ) ) {
|
630 |
-
$item.attr( attrsToReplace[ attr ], $item.attr( attr ) );
|
631 |
-
$item.removeAttr( attr );
|
632 |
-
}
|
633 |
-
} );
|
634 |
-
|
635 |
-
$item.addClass( config.lazyClass );
|
636 |
-
} );
|
637 |
-
}
|
638 |
-
}
|
639 |
-
|
640 |
Â
/**
|
641 |
Â
* Remove <noscript> tags.
|
642 |
Â
* Some optimization plugin make something, that killed our styles with noscript tag.
|
@@ -836,8 +782,6 @@ class VP {
|
|
836 |
Â
|
837 |
Â
self.emitEvent( 'endLoadingNewItems' );
|
838 |
Â
|
839 |
-
self.prepareLazyLoad();
|
840 |
-
|
841 |
Â
// images loaded
|
842 |
Â
self.imagesLoaded();
|
843 |
Â
|
@@ -846,24 +790,6 @@ class VP {
|
|
846 |
Â
}
|
847 |
Â
}
|
848 |
Â
|
849 |
-
// Lazyloaded - remove preloader images placeholder effect.
|
850 |
-
$( document ).on( 'lazybeforeunveil', ( e ) => {
|
851 |
-
const $img = $( e.target );
|
852 |
-
|
853 |
-
if ( $img.hasClass( 'visual-portfolio-lazyload' ) ) {
|
854 |
-
$img.closest( '.vp-portfolio__item-img' ).addClass( 'vp-portfolio__item-img-lazyloading' );
|
855 |
-
$img.closest( '.vp-portfolio__thumbnail-img' ).addClass( 'vp-portfolio__thumbnail-img-lazyloading' );
|
856 |
-
}
|
857 |
-
} );
|
858 |
-
$( document ).on( 'lazyloaded', ( e ) => {
|
859 |
-
const $img = $( e.target );
|
860 |
-
|
861 |
-
if ( $img.hasClass( 'visual-portfolio-lazyload' ) ) {
|
862 |
-
$img.closest( '.vp-portfolio__item-img-lazyloading' ).removeClass( 'vp-portfolio__item-img-lazyloading' );
|
863 |
-
$img.closest( '.vp-portfolio__thumbnail-img-lazyloading' ).removeClass( 'vp-portfolio__thumbnail-img-lazyloading' );
|
864 |
-
}
|
865 |
-
} );
|
866 |
-
|
867 |
Â
// fix for Elementor popup gallery.
|
868 |
Â
// https://github.com/nk-o/visual-portfolio/issues/103
|
869 |
Â
if ( $( '.elementor' ).length ) {
|
@@ -919,11 +845,9 @@ $( () => {
|
|
919 |
Â
$( '.vp-portfolio' ).vpf();
|
920 |
Â
} );
|
921 |
Â
|
922 |
-
const throttledInit = throttle( 200, () => {
|
923 |
-
|
924 |
-
|
925 |
-
} );
|
926 |
-
} );
|
927 |
Â
if ( window.MutationObserver ) {
|
928 |
Â
new window.MutationObserver( throttledInit )
|
929 |
Â
.observe( document.documentElement, {
|
2 |
Â
* Visual Portfolio main script.
|
3 |
Â
*/
|
4 |
Â
import { throttle } from 'throttle-debounce';
|
5 |
+
import rafSchd from 'raf-schd';
|
6 |
Â
|
7 |
Â
/**
|
8 |
Â
* Global Variables
|
10 |
Â
const {
|
11 |
Â
jQuery: $,
|
12 |
Â
VPData,
|
Â
|
|
13 |
Â
} = window;
|
14 |
Â
|
15 |
Â
const {
|
18 |
Â
|
19 |
Â
const $wnd = $( window );
|
20 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
21 |
Â
/**
|
22 |
Â
* Emit Resize Event.
|
23 |
Â
*/
|
178 |
Â
// init events
|
179 |
Â
self.initEvents();
|
180 |
Â
|
Â
|
|
Â
|
|
Â
|
|
181 |
Â
// init layout
|
182 |
Â
self.initLayout();
|
183 |
Â
|
583 |
Â
self.emitEvent( 'destroyEvents' );
|
584 |
Â
}
|
585 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
586 |
Â
/**
|
587 |
Â
* Remove <noscript> tags.
|
588 |
Â
* Some optimization plugin make something, that killed our styles with noscript tag.
|
782 |
Â
|
783 |
Â
self.emitEvent( 'endLoadingNewItems' );
|
784 |
Â
|
Â
|
|
Â
|
|
785 |
Â
// images loaded
|
786 |
Â
self.imagesLoaded();
|
787 |
Â
|
790 |
Â
}
|
791 |
Â
}
|
792 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
793 |
Â
// fix for Elementor popup gallery.
|
794 |
Â
// https://github.com/nk-o/visual-portfolio/issues/103
|
795 |
Â
if ( $( '.elementor' ).length ) {
|
845 |
Â
$( '.vp-portfolio' ).vpf();
|
846 |
Â
} );
|
847 |
Â
|
848 |
+
const throttledInit = throttle( 200, rafSchd( () => {
|
849 |
+
$( '.vp-portfolio:not(.vp-portfolio__ready)' ).vpf();
|
850 |
+
} ) );
|
Â
|
|
Â
|
|
851 |
Â
if ( window.MutationObserver ) {
|
852 |
Â
new window.MutationObserver( throttledInit )
|
853 |
Â
.observe( document.documentElement, {
|
assets/js/main.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){var i={};function e(o){if(i[o])return i[o].exports;var n=i[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,e),n.l=!0,n.exports}e.m=t,e.c=i,e.d=function(t,i,o){e.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,i){if(1&i&&(t=e(t)),8&i)return t;if(4&i&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&i&&"string"!=typeof t)for(var n in t)e.d(o,n,function(i){return t[i]}.bind(null,n));return o},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=234)}({14:function(t,i){function e(t){return(e="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})(t)}var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":e(window))&&(o=window)}t.exports=o},216:function(t,i,e){var o=e(236),n=o.requestAnimationFrame||o.webkitRequestAnimationFrame||o.mozRequestAnimationFrame||function(t){var i=+new Date,e=Math.max(0,16-(i-s)),o=setTimeout(t,e);return s=i,o},s=+new Date;var a=o.cancelAnimationFrame||o.webkitCancelAnimationFrame||o.mozCancelAnimationFrame||clearTimeout;Function.prototype.bind&&(n=n.bind(o),a=a.bind(o)),(t.exports=n).cancel=a},234:function(t,i,e){t.exports=e(235)},235:function(t,i,e){"use strict";e.r(i);var o=e(3),n=e(216),s=e.n(n);function a(t){return(a="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})(t)}function r(t,i){for(var e=0;e<i.length;e++){var o=i[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var l=window,c=l.jQuery,f=l.VPData,p=l.objectFitImages,d=f.__,v=c(window);function u(){if("function"==typeof window.Event)window.dispatchEvent(new window.Event("resize"));else{var t=window.document.createEvent("UIEvents");t.initUIEvent("resize",!0,!1,window,0),window.dispatchEvent(t)}}void 0!==p&&(p(".vp-portfolio img:not(.visual-portfolio-lazyload)"),c(document).on("lazybeforeunveil",(function(t){var i=c(t.target);i.hasClass("visual-portfolio-lazyload")&&i.one("load",(function(){p(i[0])}))})));var m={},h=!1,y=!1;function g(){if(clearTimeout(y),h){var t=c(".vp-portfolio__ready");if(t.length){var i=!1;t.each((function(){var t=this.vpf;if(t){var e=m[t.uid]||"none";m[t.uid]=null===this.offsetParent?"hidden":"visible","hidden"===e&&"visible"===m[t.uid]&&(i=!0)}})),i&&u()}else h=!1;y=setTimeout(g,500)}}c(document).on("inited.vpf",(function(t){"vpf"===t.namespace&&(h=!0,g())}));var _=function(){function t(i,e){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t);this.$item=i;for(var o=i[0].className.split(/\s+/),n=0;n<o.length;n+=1)o[n]&&/^vp-uid-/.test(o[n])&&(this.uid=o[n].replace(/^vp-uid-/,"")),o[n]&&/^vp-id-/.test(o[n])&&(this.id=o[n].replace(/^vp-id-/,""));this.uid?(this.href=window.location.href,this.$items_wrap=i.find(".vp-portfolio__items"),this.$slider_thumbnails_wrap=i.find(".vp-portfolio__thumbnails"),this.$pagination=i.find(".vp-portfolio__pagination-wrap"),this.$filter=i.find(".vp-portfolio__filter-wrap"),this.$sort=i.find(".vp-portfolio__sort-wrap"),this.id&&(this.$filter=this.$filter.add(".vp-single-filter.vp-id-".concat(this.id," .vp-portfolio__filter-wrap"))),this.id&&(this.$sort=this.$sort.add(".vp-single-sort.vp-id-".concat(this.id," .vp-portfolio__sort-wrap"))),this.userOptions=e,this.firstRun=!0,this.init()):console.error(d.couldnt_retrieve_vp)}var i,e,o;return i=t,(e=[{key:"emitEvent",value:function(t,i){i=i?[this].concat(i):[this],this.$item.trigger("".concat(t,".vpf"),i),this.$item.trigger("".concat(t,".vpf-uid-").concat(this.uid),i)}},{key:"init",value:function(){this.firstRun||this.destroy(),this.destroyed=!1,this.removeNoscriptTags(this.$items_wrap),this.initOptions(),this.initEvents(),this.prepareLazyLoad(),this.initLayout(),this.initCustomColors(),this.emitEvent("init"),this.$item.addClass("vp-portfolio__ready"),this.id&&(c(".vp-single-filter.vp-id-".concat(this.id)).addClass("vp-single-filter__ready"),c(".vp-single-sort.vp-id-".concat(this.id)).addClass("vp-single-sort__ready")),this.resized(),this.imagesLoaded(),this.emitEvent("inited"),this.firstRun=!1}},{key:"isPreview",value:function(){return!!this.$item.closest("#vp_preview").length}},{key:"resized",value:function(){u(),this.emitEvent("resized")}},{key:"imagesLoaded",value:function(){var t=this;this.$items_wrap.imagesLoaded&&this.$items_wrap.imagesLoaded((function(){t.emitEvent("imagesLoaded")}))}},{key:"destroy",value:function(){this.$item.removeClass("vp-portfolio__ready"),this.id&&(c(".vp-single-filter.vp-id-".concat(this.id)).removeClass("vp-single-filter__ready"),c(".vp-single-sort.vp-id-".concat(this.id)).removeClass("vp-single-sort__ready")),this.destroyEvents(),this.removeStyle(),this.renderStyle(),this.emitEvent("destroy"),this.destroyed=!0}},{key:"addStyle",value:function(t,i,e){e=e||"";var o=this.uid;this.stylesList||(this.stylesList={}),void 0===this.stylesList[o]&&(this.stylesList[o]={}),void 0===this.stylesList[o][e]&&(this.stylesList[o][e]={}),void 0===this.stylesList[o][e][t]&&(this.stylesList[o][e][t]={}),this.stylesList[o][e][t]=c.extend(this.stylesList[o][e][t],i),this.emitEvent("addStyle",[t,i,e,this.stylesList])}},{key:"removeStyle",value:function(t,i,e){e=e||"";var o=this.uid;this.stylesList||(this.stylesList={}),void 0===this.stylesList[o]||t||(this.stylesList[o]={}),void 0!==this.stylesList[o]&&void 0!==this.stylesList[o][e]&&void 0!==this.stylesList[o][e][t]&&t&&delete this.stylesList[o][e][t],this.emitEvent("removeStyle",[t,i,this.stylesList])}},{key:"renderStyle",value:function(){var t=this,i=t.uid,e="";t.stylesList||(t.stylesList={}),void 0!==t.stylesList[i]&&Object.keys(t.stylesList[i]).forEach((function(o){o&&(e+="@media ".concat(o," {")),Object.keys(t.stylesList[i][o]).forEach((function(n){e+=".vp-uid-".concat(i," ").concat(n," {"),Object.keys(t.stylesList[i][o][n]).forEach((function(s){e+="".concat(s,":").concat(t.stylesList[i][o][n][s],";")})),e+="}"})),o&&(e+="}")}));var o=c("#vp-style-".concat(i));o.length||(o=c("<style>").attr("id","vp-style-".concat(i)).appendTo("head")),o.html(e),t.emitEvent("renderStyle",[e,t.stylesList,o])}},{key:"firstToLowerCase",value:function(t){return t.substr(0,1).toLowerCase()+t.substr(1)}},{key:"initOptions",value:function(t){var i=this;i.defaults={layout:"tile",itemsGap:0,pagination:"load-more"},t&&(i.userOptions=t);var e=i.$item[0].dataset,o={};Object.keys(e).forEach((function(t){t&&"vp"===t.substring(0,2)&&(o[i.firstToLowerCase(t.substring(2))]=e[t])})),i.options=c.extend({},i.defaults,o,i.userOptions),i.emitEvent("initOptions")}},{key:"initEvents",value:function(){var t,i=this,e=".vpf-uid-".concat(i.uid);function o(){var t=i.$item[0].getBoundingClientRect(),e=t.left,o=window.innerWidth-t.right,n=parseFloat(i.$item.css("margin-left")||0),s=parseFloat(i.$item.css("margin-right")||0);i.$item.css({"margin-left":n-e,"margin-right":s-o})}function n(){var e=i.$item[0].getBoundingClientRect();0<e.bottom&&e.bottom-250<=window.innerHeight&&i.loadNewItems(i.options.nextPageUrl,!1,(function(){clearTimeout(t),t=setTimeout((function(){n()}),300)}))}i.$item.hasClass("vp-portfolio__stretch")&&!i.isPreview()&&(v.on("load".concat(e," resize").concat(e," orientationchange").concat(e),(function(){o()})),o()),i.$item.on("focus".concat(e),".vp-portfolio__item a",(function(){c(this).closest(".vp-portfolio__item").addClass("vp-portfolio__item-focus")})),i.$item.on("blur".concat(e),".vp-portfolio__item a",(function(){c(this).closest(".vp-portfolio__item").removeClass("vp-portfolio__item-focus")})),i.$filter.on("click".concat(e),".vp-filter .vp-filter__item a",(function(t){t.preventDefault();var e=c(this);i.loading||e.closest(".vp-filter__item").addClass("vp-filter__item-active").siblings().removeClass("vp-filter__item-active"),i.loadNewItems(e.attr("href"),!0)})),i.$sort.on("click".concat(e),".vp-sort .vp-sort__item a",(function(t){t.preventDefault();var e=c(this);i.loading||e.closest(".vp-sort__item").addClass("vp-sort__item-active").siblings().removeClass("vp-sort__item-active"),i.loadNewItems(e.attr("href"),!0)})),i.$filter.add(i.$sort).on("change".concat(e),".vp-filter select, .vp-sort select",(function(){var t=c(this),e=t.val(),o=t.find('[value="'.concat(e,'"]'));o.length&&i.loadNewItems(o.attr("data-vp-url"),!0)})),i.$item.on("click".concat(e),".vp-pagination .vp-pagination__item a",(function(t){t.preventDefault();var e=c(this),o=e.closest(".vp-pagination");if((!o.hasClass("vp-pagination__no-more")||"paged"===i.options.pagination)&&(i.loadNewItems(e.attr("href"),"paged"===i.options.pagination),"paged"===i.options.pagination&&o.hasClass("vp-pagination__scroll-top"))){var n=c("#wpadminbar"),s=window.pageYOffset||document.documentElement.scrollTop,a=i.$item.offset().top;o.attr("data-vp-pagination-scroll-top")&&(a-=parseInt(o.attr("data-vp-pagination-scroll-top"),10)||0),n.length&&"fixed"===n.css("position")&&(a-=n.outerHeight()),s>(a=Math.max(0,a))&&window.scrollTo({top:a,behavior:"smooth"})}})),i.$item.on("click".concat(e),".vp-portfolio__items .vp-portfolio__item-meta-category a",(function(t){t.preventDefault(),t.stopPropagation(),i.loadNewItems(c(this).attr("href"),!0)})),"infinite"===i.options.pagination&&(v.on("load".concat(e," scroll").concat(e," resize").concat(e," orientationchange").concat(e),(function(){clearTimeout(t),t=setTimeout((function(){n()}),60)})),n()),i.$item.on("transitionend".concat(e),".vp-portfolio__items",(function(t){t.currentTarget===t.target&&i.resized()})),i.emitEvent("initEvents")}},{key:"destroyEvents",value:function(){var t=".vpf-uid-".concat(this.uid);this.$item.off(t),this.$filter.off(t),this.$sort.off(t),v.off(t),this.emitEvent("destroyEvents")}},{key:"prepareLazyLoad",value:function(){var t=window.lazySizes&&window.lazySizes.cfg?window.lazySizes.cfg:window.lazySizesConfig;if(t){var i={"data-vpf-src":t.srcAttr,"data-vpf-sizes":t.sizesAttr,"data-vpf-srcset":t.srcsetAttr};this.$items_wrap.add(this.$slider_thumbnails_wrap).find(".visual-portfolio-lazyload:not(.".concat(t.lazyClass,")")).each((function(){var e=c(this);Object.keys(i).forEach((function(t){i[t]&&t!==i[t]&&e.attr(t)&&(e.attr(i[t],e.attr(t)),e.removeAttr(t))})),e.addClass(t.lazyClass)}))}}},{key:"removeNoscriptTags",value:function(t){t.find("noscript").remove()}},{key:"initLayout",value:function(){this.emitEvent("initLayout"),this.renderStyle()}},{key:"initCustomColors",value:function(){var t=this;t.$item.find("[data-vp-bg-color]").each((function(){var i=c(this).attr("data-vp-bg-color");t.addStyle('[data-vp-bg-color="'.concat(i,'"]'),{"background-color":"".concat(i," !important")})})),t.$item.find("[data-vp-text-color]").each((function(){var i=c(this).attr("data-vp-text-color");t.addStyle('[data-vp-text-color="'.concat(i,'"]'),{color:"".concat(i," !important")})})),t.renderStyle(),t.emitEvent("initCustomColors")}},{key:"addItems",value:function(t,i,e){this.removeNoscriptTags(t),this.emitEvent("addItems",[t,i,e])}},{key:"removeItems",value:function(t){this.emitEvent("removeItems",[t])}},{key:"loadNewItems",value:function(t,i,e){var o=this;if(!o.loading&&t&&o.href!==t){var n={method:"POST",url:t,complete:function(n){var s=n.responseText;o.href=t,o.replaceItems(s,i,e)}};o.loading=!0,o.$item.addClass("vp-portfolio__loading"),o.emitEvent("startLoadingNewItems",[t,n]),c.ajax(n)}}},{key:"replaceItems",value:function(t,i,e){if(t){t=t.replace("<body",'<body><div id="vp-infinite-load-body"').replace("</body>","</div></body>");var o=c(t).filter("#vp-infinite-load-body"),n=o.find(".vp-portfolio.vp-uid-".concat(this.uid));if(n.length){var s=n.find(".vp-portfolio__items").html();n.hasClass("vp-portfolio-not-found")?(this.$item.find(".vp-portfolio__items-wrap").before(n.find(".vp-notice").clone()),this.$item.addClass("vp-portfolio-not-found")):(this.$item.find(".vp-notice").remove(),this.$item.removeClass("vp-portfolio-not-found")),this.$filter.length&&this.$filter.each((function(){var t=c(this),i="";i=t.parent().hasClass("vp-single-filter")?o.find('[class="'.concat(t.parent().attr("class").replace(" vp-single-filter__ready",""),'"] .vp-portfolio__filter-wrap')).html():n.find(".vp-portfolio__filter-wrap").html(),t.html(i)})),this.$sort.length&&this.$sort.each((function(){var t=c(this),i="";i=t.parent().hasClass("vp-single-sort")?o.find('[class="'.concat(t.parent().attr("class").replace(" vp-single-sort__ready",""),'"] .vp-portfolio__sort-wrap')).html():n.find(".vp-portfolio__sort-wrap").html(),t.html(i)})),this.$pagination.length&&this.$pagination.html(n.find(".vp-portfolio__pagination-wrap").html()),this.addItems(c(s),i,n),this.emitEvent("loadedNewItems",[n,i,t]),e&&e()}var a=n.attr("data-vp-next-page-url");this.options.nextPageUrl=a,this.$item.attr("data-vp-next-page-url",a),this.$item.removeClass("vp-portfolio__loading"),this.loading=!1,this.emitEvent("endLoadingNewItems"),this.prepareLazyLoad(),this.imagesLoaded(),this.initCustomColors()}}}])&&r(i.prototype,e),o&&r(i,o),t}();c(document).on("lazybeforeunveil",(function(t){var i=c(t.target);i.hasClass("visual-portfolio-lazyload")&&(i.closest(".vp-portfolio__item-img").addClass("vp-portfolio__item-img-lazyloading"),i.closest(".vp-portfolio__thumbnail-img").addClass("vp-portfolio__thumbnail-img-lazyloading"))})),c(document).on("lazyloaded",(function(t){var i=c(t.target);i.hasClass("visual-portfolio-lazyload")&&(i.closest(".vp-portfolio__item-img-lazyloading").removeClass("vp-portfolio__item-img-lazyloading"),i.closest(".vp-portfolio__thumbnail-img-lazyloading").removeClass("vp-portfolio__thumbnail-img-lazyloading"))})),c(".elementor").length&&c(document).on("init.vpf addItems.vpf",(function(t,i){"vpf"===t.namespace&&i.$item.find(".vp-portfolio__item a").each((function(){/\.(png|jpe?g|gif|svg)(\?.*)?$/i.test(this.href)&&c(this).attr("data-elementor-open-lightbox","no")}))})),c(document).trigger("extendClass.vpf",[_]);var w=function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),o=1;o<i;o++)e[o-1]=arguments[o];var n;return this.each((function(){if(void 0===n)if("object"===a(t)||void 0===t)this.vpf||(this.vpf=new _(c(this),t));else if(this.vpf){var i;n=(i=this.vpf)[t].apply(i,e)}})),void 0!==n?n:this};w.constructor=_;var b=c.fn.vpf;c.fn.vpf=w,c.fn.vpf.noConflict=function(){return c.fn.vpf=b,this},c(".vp-portfolio").vpf(),c((function(){c(".vp-portfolio").vpf()}));var $=Object(o.throttle)(200,(function(){s()((function(){c(".vp-portfolio:not(.vp-portfolio__ready)").vpf()}))}));window.MutationObserver?new window.MutationObserver($).observe(document.documentElement,{childList:!0,subtree:!0}):c(document).on("DOMContentLoaded DOMNodeInserted load",(function(){$()}))},236:function(t,i,e){(function(i){var e;e="undefined"!=typeof window?window:void 0!==i?i:"undefined"!=typeof self?self:{},t.exports=e}).call(this,e(14))},3:function(t,i,e){var o,n,s,a;function r(t){return(r="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})(t)}a=function(t){"use strict";function i(t,i,e,o){var n,s=!1,a=0;function r(){n&&clearTimeout(n)}function l(){for(var l=arguments.length,c=new Array(l),f=0;f<l;f++)c[f]=arguments[f];var p=this,d=Date.now()-a;function v(){a=Date.now(),e.apply(p,c)}function u(){n=void 0}s||(o&&!n&&v(),r(),void 0===o&&d>t?v():!0!==i&&(n=setTimeout(o?u:v,void 0===o?t-d:t)))}return"boolean"!=typeof i&&(o=e,e=i,i=void 0),l.cancel=function(){r(),s=!0},l}t.debounce=function(t,e,o){return void 0===o?i(t,e,!1):i(t,o,!1!==e)},t.throttle=i,Object.defineProperty(t,"__esModule",{value:!0})},"object"===r(i)&&void 0!==t?a(i):(n=[i],void 0===(s="function"==typeof(o=a)?o.apply(i,n):o)||(t.exports=s))}});
|
1 |
+
!function(t){var i={};function e(o){if(i[o])return i[o].exports;var n=i[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,e),n.l=!0,n.exports}e.m=t,e.c=i,e.d=function(t,i,o){e.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,i){if(1&i&&(t=e(t)),8&i)return t;if(4&i&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&i&&"string"!=typeof t)for(var n in t)e.d(o,n,function(i){return t[i]}.bind(null,n));return o},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=237)}({237:function(t,i,e){t.exports=e(238)},238:function(t,i,e){"use strict";e.r(i);var o=e(3),n=e(4);function s(t){return(s="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})(t)}function r(t,i){for(var e=0;e<i.length;e++){var o=i[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var a=window,l=a.jQuery,c=a.VPData.__,f=l(window);function p(){if("function"==typeof window.Event)window.dispatchEvent(new window.Event("resize"));else{var t=window.document.createEvent("UIEvents");t.initUIEvent("resize",!0,!1,window,0),window.dispatchEvent(t)}}var v={},d=!1,u=!1;function h(){if(clearTimeout(u),d){var t=l(".vp-portfolio__ready");if(t.length){var i=!1;t.each((function(){var t=this.vpf;if(t){var e=v[t.uid]||"none";v[t.uid]=null===this.offsetParent?"hidden":"visible","hidden"===e&&"visible"===v[t.uid]&&(i=!0)}})),i&&p()}else d=!1;u=setTimeout(h,500)}}l(document).on("inited.vpf",(function(t){"vpf"===t.namespace&&(d=!0,h())}));var m=function(){function t(i,e){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t);this.$item=i;for(var o=i[0].className.split(/\s+/),n=0;n<o.length;n+=1)o[n]&&/^vp-uid-/.test(o[n])&&(this.uid=o[n].replace(/^vp-uid-/,"")),o[n]&&/^vp-id-/.test(o[n])&&(this.id=o[n].replace(/^vp-id-/,""));this.uid?(this.href=window.location.href,this.$items_wrap=i.find(".vp-portfolio__items"),this.$slider_thumbnails_wrap=i.find(".vp-portfolio__thumbnails"),this.$pagination=i.find(".vp-portfolio__pagination-wrap"),this.$filter=i.find(".vp-portfolio__filter-wrap"),this.$sort=i.find(".vp-portfolio__sort-wrap"),this.id&&(this.$filter=this.$filter.add(".vp-single-filter.vp-id-".concat(this.id," .vp-portfolio__filter-wrap"))),this.id&&(this.$sort=this.$sort.add(".vp-single-sort.vp-id-".concat(this.id," .vp-portfolio__sort-wrap"))),this.userOptions=e,this.firstRun=!0,this.init()):console.error(c.couldnt_retrieve_vp)}var i,e,o;return i=t,(e=[{key:"emitEvent",value:function(t,i){i=i?[this].concat(i):[this],this.$item.trigger("".concat(t,".vpf"),i),this.$item.trigger("".concat(t,".vpf-uid-").concat(this.uid),i)}},{key:"init",value:function(){this.firstRun||this.destroy(),this.destroyed=!1,this.removeNoscriptTags(this.$items_wrap),this.initOptions(),this.initEvents(),this.initLayout(),this.initCustomColors(),this.emitEvent("init"),this.$item.addClass("vp-portfolio__ready"),this.id&&(l(".vp-single-filter.vp-id-".concat(this.id)).addClass("vp-single-filter__ready"),l(".vp-single-sort.vp-id-".concat(this.id)).addClass("vp-single-sort__ready")),this.resized(),this.imagesLoaded(),this.emitEvent("inited"),this.firstRun=!1}},{key:"isPreview",value:function(){return!!this.$item.closest("#vp_preview").length}},{key:"resized",value:function(){p(),this.emitEvent("resized")}},{key:"imagesLoaded",value:function(){var t=this;this.$items_wrap.imagesLoaded&&this.$items_wrap.imagesLoaded((function(){t.emitEvent("imagesLoaded")}))}},{key:"destroy",value:function(){this.$item.removeClass("vp-portfolio__ready"),this.id&&(l(".vp-single-filter.vp-id-".concat(this.id)).removeClass("vp-single-filter__ready"),l(".vp-single-sort.vp-id-".concat(this.id)).removeClass("vp-single-sort__ready")),this.destroyEvents(),this.removeStyle(),this.renderStyle(),this.emitEvent("destroy"),this.destroyed=!0}},{key:"addStyle",value:function(t,i,e){e=e||"";var o=this.uid;this.stylesList||(this.stylesList={}),void 0===this.stylesList[o]&&(this.stylesList[o]={}),void 0===this.stylesList[o][e]&&(this.stylesList[o][e]={}),void 0===this.stylesList[o][e][t]&&(this.stylesList[o][e][t]={}),this.stylesList[o][e][t]=l.extend(this.stylesList[o][e][t],i),this.emitEvent("addStyle",[t,i,e,this.stylesList])}},{key:"removeStyle",value:function(t,i,e){e=e||"";var o=this.uid;this.stylesList||(this.stylesList={}),void 0===this.stylesList[o]||t||(this.stylesList[o]={}),void 0!==this.stylesList[o]&&void 0!==this.stylesList[o][e]&&void 0!==this.stylesList[o][e][t]&&t&&delete this.stylesList[o][e][t],this.emitEvent("removeStyle",[t,i,this.stylesList])}},{key:"renderStyle",value:function(){var t=this,i=t.uid,e="";t.stylesList||(t.stylesList={}),void 0!==t.stylesList[i]&&Object.keys(t.stylesList[i]).forEach((function(o){o&&(e+="@media ".concat(o," {")),Object.keys(t.stylesList[i][o]).forEach((function(n){e+=".vp-uid-".concat(i," ").concat(n," {"),Object.keys(t.stylesList[i][o][n]).forEach((function(s){e+="".concat(s,":").concat(t.stylesList[i][o][n][s],";")})),e+="}"})),o&&(e+="}")}));var o=l("#vp-style-".concat(i));o.length||(o=l("<style>").attr("id","vp-style-".concat(i)).appendTo("head")),o.html(e),t.emitEvent("renderStyle",[e,t.stylesList,o])}},{key:"firstToLowerCase",value:function(t){return t.substr(0,1).toLowerCase()+t.substr(1)}},{key:"initOptions",value:function(t){var i=this;i.defaults={layout:"tile",itemsGap:0,pagination:"load-more"},t&&(i.userOptions=t);var e=i.$item[0].dataset,o={};Object.keys(e).forEach((function(t){t&&"vp"===t.substring(0,2)&&(o[i.firstToLowerCase(t.substring(2))]=e[t])})),i.options=l.extend({},i.defaults,o,i.userOptions),i.emitEvent("initOptions")}},{key:"initEvents",value:function(){var t,i=this,e=".vpf-uid-".concat(i.uid);function o(){var t=i.$item[0].getBoundingClientRect(),e=t.left,o=window.innerWidth-t.right,n=parseFloat(i.$item.css("margin-left")||0),s=parseFloat(i.$item.css("margin-right")||0);i.$item.css({"margin-left":n-e,"margin-right":s-o})}function n(){var e=i.$item[0].getBoundingClientRect();0<e.bottom&&e.bottom-250<=window.innerHeight&&i.loadNewItems(i.options.nextPageUrl,!1,(function(){clearTimeout(t),t=setTimeout((function(){n()}),300)}))}i.$item.hasClass("vp-portfolio__stretch")&&!i.isPreview()&&(f.on("load".concat(e," resize").concat(e," orientationchange").concat(e),(function(){o()})),o()),i.$item.on("focus".concat(e),".vp-portfolio__item a",(function(){l(this).closest(".vp-portfolio__item").addClass("vp-portfolio__item-focus")})),i.$item.on("blur".concat(e),".vp-portfolio__item a",(function(){l(this).closest(".vp-portfolio__item").removeClass("vp-portfolio__item-focus")})),i.$filter.on("click".concat(e),".vp-filter .vp-filter__item a",(function(t){t.preventDefault();var e=l(this);i.loading||e.closest(".vp-filter__item").addClass("vp-filter__item-active").siblings().removeClass("vp-filter__item-active"),i.loadNewItems(e.attr("href"),!0)})),i.$sort.on("click".concat(e),".vp-sort .vp-sort__item a",(function(t){t.preventDefault();var e=l(this);i.loading||e.closest(".vp-sort__item").addClass("vp-sort__item-active").siblings().removeClass("vp-sort__item-active"),i.loadNewItems(e.attr("href"),!0)})),i.$filter.add(i.$sort).on("change".concat(e),".vp-filter select, .vp-sort select",(function(){var t=l(this),e=t.val(),o=t.find('[value="'.concat(e,'"]'));o.length&&i.loadNewItems(o.attr("data-vp-url"),!0)})),i.$item.on("click".concat(e),".vp-pagination .vp-pagination__item a",(function(t){t.preventDefault();var e=l(this),o=e.closest(".vp-pagination");if((!o.hasClass("vp-pagination__no-more")||"paged"===i.options.pagination)&&(i.loadNewItems(e.attr("href"),"paged"===i.options.pagination),"paged"===i.options.pagination&&o.hasClass("vp-pagination__scroll-top"))){var n=l("#wpadminbar"),s=window.pageYOffset||document.documentElement.scrollTop,r=i.$item.offset().top;o.attr("data-vp-pagination-scroll-top")&&(r-=parseInt(o.attr("data-vp-pagination-scroll-top"),10)||0),n.length&&"fixed"===n.css("position")&&(r-=n.outerHeight()),s>(r=Math.max(0,r))&&window.scrollTo({top:r,behavior:"smooth"})}})),i.$item.on("click".concat(e),".vp-portfolio__items .vp-portfolio__item-meta-category a",(function(t){t.preventDefault(),t.stopPropagation(),i.loadNewItems(l(this).attr("href"),!0)})),"infinite"===i.options.pagination&&(f.on("load".concat(e," scroll").concat(e," resize").concat(e," orientationchange").concat(e),(function(){clearTimeout(t),t=setTimeout((function(){n()}),60)})),n()),i.$item.on("transitionend".concat(e),".vp-portfolio__items",(function(t){t.currentTarget===t.target&&i.resized()})),i.emitEvent("initEvents")}},{key:"destroyEvents",value:function(){var t=".vpf-uid-".concat(this.uid);this.$item.off(t),this.$filter.off(t),this.$sort.off(t),f.off(t),this.emitEvent("destroyEvents")}},{key:"removeNoscriptTags",value:function(t){t.find("noscript").remove()}},{key:"initLayout",value:function(){this.emitEvent("initLayout"),this.renderStyle()}},{key:"initCustomColors",value:function(){var t=this;t.$item.find("[data-vp-bg-color]").each((function(){var i=l(this).attr("data-vp-bg-color");t.addStyle('[data-vp-bg-color="'.concat(i,'"]'),{"background-color":"".concat(i," !important")})})),t.$item.find("[data-vp-text-color]").each((function(){var i=l(this).attr("data-vp-text-color");t.addStyle('[data-vp-text-color="'.concat(i,'"]'),{color:"".concat(i," !important")})})),t.renderStyle(),t.emitEvent("initCustomColors")}},{key:"addItems",value:function(t,i,e){this.removeNoscriptTags(t),this.emitEvent("addItems",[t,i,e])}},{key:"removeItems",value:function(t){this.emitEvent("removeItems",[t])}},{key:"loadNewItems",value:function(t,i,e){var o=this;if(!o.loading&&t&&o.href!==t){var n={method:"POST",url:t,complete:function(n){var s=n.responseText;o.href=t,o.replaceItems(s,i,e)}};o.loading=!0,o.$item.addClass("vp-portfolio__loading"),o.emitEvent("startLoadingNewItems",[t,n]),l.ajax(n)}}},{key:"replaceItems",value:function(t,i,e){if(t){t=t.replace("<body",'<body><div id="vp-infinite-load-body"').replace("</body>","</div></body>");var o=l(t).filter("#vp-infinite-load-body"),n=o.find(".vp-portfolio.vp-uid-".concat(this.uid));if(n.length){var s=n.find(".vp-portfolio__items").html();n.hasClass("vp-portfolio-not-found")?(this.$item.find(".vp-portfolio__items-wrap").before(n.find(".vp-notice").clone()),this.$item.addClass("vp-portfolio-not-found")):(this.$item.find(".vp-notice").remove(),this.$item.removeClass("vp-portfolio-not-found")),this.$filter.length&&this.$filter.each((function(){var t=l(this),i="";i=t.parent().hasClass("vp-single-filter")?o.find('[class="'.concat(t.parent().attr("class").replace(" vp-single-filter__ready",""),'"] .vp-portfolio__filter-wrap')).html():n.find(".vp-portfolio__filter-wrap").html(),t.html(i)})),this.$sort.length&&this.$sort.each((function(){var t=l(this),i="";i=t.parent().hasClass("vp-single-sort")?o.find('[class="'.concat(t.parent().attr("class").replace(" vp-single-sort__ready",""),'"] .vp-portfolio__sort-wrap')).html():n.find(".vp-portfolio__sort-wrap").html(),t.html(i)})),this.$pagination.length&&this.$pagination.html(n.find(".vp-portfolio__pagination-wrap").html()),this.addItems(l(s),i,n),this.emitEvent("loadedNewItems",[n,i,t]),e&&e()}var r=n.attr("data-vp-next-page-url");this.options.nextPageUrl=r,this.$item.attr("data-vp-next-page-url",r),this.$item.removeClass("vp-portfolio__loading"),this.loading=!1,this.emitEvent("endLoadingNewItems"),this.imagesLoaded(),this.initCustomColors()}}}])&&r(i.prototype,e),o&&r(i,o),t}();l(".elementor").length&&l(document).on("init.vpf addItems.vpf",(function(t,i){"vpf"===t.namespace&&i.$item.find(".vp-portfolio__item a").each((function(){/\.(png|jpe?g|gif|svg)(\?.*)?$/i.test(this.href)&&l(this).attr("data-elementor-open-lightbox","no")}))})),l(document).trigger("extendClass.vpf",[m]);var y=function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),o=1;o<i;o++)e[o-1]=arguments[o];var n;return this.each((function(){if(void 0===n)if("object"===s(t)||void 0===t)this.vpf||(this.vpf=new m(l(this),t));else if(this.vpf){var i;n=(i=this.vpf)[t].apply(i,e)}})),void 0!==n?n:this};y.constructor=m;var g=l.fn.vpf;l.fn.vpf=y,l.fn.vpf.noConflict=function(){return l.fn.vpf=g,this},l(".vp-portfolio").vpf(),l((function(){l(".vp-portfolio").vpf()}));var _=Object(o.throttle)(200,Object(n.a)((function(){l(".vp-portfolio:not(.vp-portfolio__ready)").vpf()})));window.MutationObserver?new window.MutationObserver(_).observe(document.documentElement,{childList:!0,subtree:!0}):l(document).on("DOMContentLoaded DOMNodeInserted load",(function(){_()}))},3:function(t,i,e){var o,n,s,r;function a(t){return(a="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})(t)}r=function(t){"use strict";function i(t,i,e,o){var n,s=!1,r=0;function a(){n&&clearTimeout(n)}function l(){for(var l=arguments.length,c=new Array(l),f=0;f<l;f++)c[f]=arguments[f];var p=this,v=Date.now()-r;function d(){r=Date.now(),e.apply(p,c)}function u(){n=void 0}s||(o&&!n&&d(),a(),void 0===o&&v>t?d():!0!==i&&(n=setTimeout(o?u:d,void 0===o?t-v:t)))}return"boolean"!=typeof i&&(o=e,e=i,i=void 0),l.cancel=function(){a(),s=!0},l}t.debounce=function(t,e,o){return void 0===o?i(t,e,!1):i(t,o,!1!==e)},t.throttle=i,Object.defineProperty(t,"__esModule",{value:!0})},"object"===a(i)&&void 0!==t?r(i):(n=[i],void 0===(s="function"==typeof(o=r)?o.apply(i,n):o)||(t.exports=s))},4:function(t,i,e){"use strict";i.a=function(t){var i=[],e=null,o=function(){for(var o=arguments.length,n=new Array(o),s=0;s<o;s++)n[s]=arguments[s];i=n,e||(e=requestAnimationFrame((function(){e=null,t.apply(void 0,i)})))};return o.cancel=function(){e&&(cancelAnimationFrame(e),e=null)},o}}});
|
assets/js/pagination-minimal-paged.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(n){return e[n]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=
|
1 |
+
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(n){return e[n]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=239)}({239:function(e,n,t){e.exports=t(240)},240:function(e,n){var t=window.jQuery;t(document).on("init.vpf loadedNewItems.vpf",(function(e,n){if("vpf"===e.namespace&&"paged"===n.options.pagination&&n.$pagination.children(".vp-pagination__style-minimal").length){var r=n.$pagination.find(".vp-pagination__item-active"),i=r.find("img");i.length||(i=t('<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="">'),r.prepend(i)),i.css({width:i.height()})}}))}});
|
assets/js/plugin-fancybox.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var o={};function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,o){if(1&o&&(e=t(e)),8&o)return e;if(4&o&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&o&&"string"!=typeof e)for(var r in e)t.d(n,r,function(o){return e[o]}.bind(null,r));return n},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},t.p="",t(t.s=
|
1 |
+
!function(e){var o={};function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,o){if(1&o&&(e=t(e)),8&o)return e;if(4&o&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&o&&"string"!=typeof e)for(var r in e)t.d(n,r,function(o){return e[o]}.bind(null,r));return n},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},t.p="",t(t.s=241)}({241:function(e,o,t){e.exports=t(242)},242:function(e,o){var t,n=window.jQuery,r=window,s=r.VPData,a=r.VPPopupAPI,u=s.__,c=s.settingsPopupGallery;void 0!==n.fancybox&&a&&(a.vendor="fancybox",a.open=function(e,o,r){var s=[];e.forEach((function(e){"embed"===e.type&&e.src?s.push({type:"iframe",src:e.src,opts:{width:e.width,height:e.height}}):"embed"===e.type&&e.embed?s.push({type:"html",src:e.embed,opts:{width:e.width,height:e.height}}):s.push({type:"image",src:e.src,el:e.el,opts:{width:e.width,height:e.height,srcset:e.srcset,caption:e.caption,thumb:e.srcSmall}})}));var a=[];c.show_zoom_button&&a.push("zoom"),c.show_fullscreen_button&&a.push("fullScreen"),c.show_slideshow&&a.push("slideShow"),c.show_thumbs&&a.push("thumbs"),c.show_share_button&&a.push("share"),c.show_download_button&&a.push("download"),c.show_close_button&&a.push("close");var i={closeExisting:!0,loop:!0,arrows:c.show_arrows,infobar:c.show_counter,smallBtn:!1,toolbar:"auto",buttons:a,baseClass:"vp-fancybox",hideScrollbar:!0,wheel:!1,lang:"wordpress",i18n:{wordpress:{CLOSE:u.fancybox_close,NEXT:u.fancybox_next,PREV:u.fancybox_prev,ERROR:u.fancybox_error,PLAY_START:u.fancybox_play_start,PLAY_STOP:u.fancybox_play_stop,FULL_SCREEN:u.fancybox_full_screen,THUMBS:u.fancybox_thumbs,DOWNLOAD:u.fancybox_download,SHARE:u.fancybox_share,ZOOM:u.fancybox_zoom}},beforeClose:function(){t=!1}};r&&r.emitEvent("beforeInitFancybox",[i,s,o]),t=n.fancybox.open(s,i,o),r&&r.emitEvent("initFancybox",[i,s,o,t])},a.close=function(){t&&(t.close(),t=!1)})}});
|
assets/js/plugin-fj-gallery.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=243)}({243:function(e,t,n){e.exports=n(244)},244:function(e,t){var n=window.jQuery;n(document).on("extendClass.vpf",(function(e,t){"vpf"===e.namespace&&(t.prototype.initFjGallery=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this;if(n.$items_wrap.fjGallery&&"justified"===n.options.layout){var r=!1!==e?e:{gutter:parseFloat(n.options.itemsGap)||0,rowHeight:parseFloat(n.options.justifiedRowHeight)||200,rowHeightTolerance:parseFloat(n.options.justifiedRowHeightTolerance)||0,itemSelector:".vp-portfolio__item-wrap",imageSelector:".vp-portfolio__item-img img"};n.emitEvent("beforeInitFjGallery",[r,t]),n.$items_wrap.fjGallery(r,t),n.emitEvent("initFjGallery",[r,t])}},t.prototype.destroyFjGallery=function(){this.$items_wrap.data("fjGallery")&&(this.$items_wrap.fjGallery("destroy"),this.emitEvent("destroyFjGallery"))})})),n(document).on("addItems.vpf",(function(e,t,n,r){"vpf"===e.namespace&&(t.$items_wrap.data("fjGallery")&&(r?(t.destroyFjGallery(),t.$items_wrap.find(".vp-portfolio__item-wrap").remove(),t.$items_wrap.prepend(n),t.initFjGallery()):(t.$items_wrap.append(n),t.initFjGallery("appendImages",n))))})),n(document).on("init.vpf",(function(e,t){"vpf"===e.namespace&&t.initFjGallery()})),n(document).on("imagesLoaded.vpf",(function(e,t){"vpf"===e.namespace&&t.initFjGallery()})),n(document).on("destroy.vpf",(function(e,t){"vpf"===e.namespace&&t.destroyFjGallery()}))}});
|
assets/js/plugin-isotope.js
CHANGED
@@ -1,11 +1,18 @@
|
|
1 |
Â
/*
|
2 |
Â
* Visual Portfolio plugin Isotope extension.
|
3 |
Â
*/
|
4 |
-
import {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
5 |
Â
|
6 |
Â
const $ = window.jQuery;
|
Â
|
|
7 |
Â
const $doc = $( document );
|
8 |
Â
|
Â
|
|
Â
|
|
9 |
Â
// Extend VP class.
|
10 |
Â
$doc.on( 'extendClass.vpf', ( event, VP ) => {
|
11 |
Â
if ( 'vpf' !== event.namespace ) {
|
@@ -21,7 +28,7 @@ $doc.on( 'extendClass.vpf', ( event, VP ) => {
|
|
21 |
Â
VP.prototype.initIsotope = function( options ) {
|
22 |
Â
const self = this;
|
23 |
Â
|
24 |
-
if ( self.$items_wrap.isotope &&
|
25 |
Â
const isRtl = 'rtl' === getComputedStyle( self.$items_wrap[ 0 ] ).direction;
|
26 |
Â
|
27 |
Â
const initOptions = options || {
|
@@ -33,6 +40,9 @@ $doc.on( 'extendClass.vpf', ( event, VP ) => {
|
|
33 |
Â
transitionDuration: '0.3s',
|
34 |
Â
percentPosition: true,
|
35 |
Â
originLeft: ! isRtl,
|
Â
|
|
Â
|
|
Â
|
|
36 |
Â
};
|
37 |
Â
|
38 |
Â
self.emitEvent( 'beforeInitIsotope', [ initOptions ] );
|
@@ -132,8 +142,39 @@ $doc.on( 'destroy.vpf', ( event, self ) => {
|
|
132 |
Â
self.destroyIsotope();
|
133 |
Â
} );
|
134 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
135 |
Â
// WPBakery Page Builder fullwidth row fix.
|
136 |
-
$doc.on( 'vc-full-width-row', debounce( 150, ( event, el ) => {
|
137 |
Â
$( el ).find( '.vp-portfolio' ).each( function() {
|
138 |
Â
if ( ! this.vpf || ! this.vpf.initIsotope ) {
|
139 |
Â
return;
|
@@ -145,4 +186,4 @@ $doc.on( 'vc-full-width-row', debounce( 150, ( event, el ) => {
|
|
145 |
Â
this.vpf.initIsotope( 'layout' );
|
146 |
Â
}
|
147 |
Â
} );
|
148 |
-
} ) );
|
1 |
Â
/*
|
2 |
Â
* Visual Portfolio plugin Isotope extension.
|
3 |
Â
*/
|
4 |
+
import {
|
5 |
+
throttle,
|
6 |
+
debounce,
|
7 |
+
} from 'throttle-debounce';
|
8 |
+
import rafSchd from 'raf-schd';
|
9 |
Â
|
10 |
Â
const $ = window.jQuery;
|
11 |
+
const $wnd = $( window );
|
12 |
Â
const $doc = $( document );
|
13 |
Â
|
14 |
+
const SUPPORTED_LAYOUTS = [ 'tiles', 'masonry', 'grid' ];
|
15 |
+
|
16 |
Â
// Extend VP class.
|
17 |
Â
$doc.on( 'extendClass.vpf', ( event, VP ) => {
|
18 |
Â
if ( 'vpf' !== event.namespace ) {
|
28 |
Â
VP.prototype.initIsotope = function( options ) {
|
29 |
Â
const self = this;
|
30 |
Â
|
31 |
+
if ( self.$items_wrap.isotope && SUPPORTED_LAYOUTS.includes( self.options.layout ) ) {
|
32 |
Â
const isRtl = 'rtl' === getComputedStyle( self.$items_wrap[ 0 ] ).direction;
|
33 |
Â
|
34 |
Â
const initOptions = options || {
|
40 |
Â
transitionDuration: '0.3s',
|
41 |
Â
percentPosition: true,
|
42 |
Â
originLeft: ! isRtl,
|
43 |
+
|
44 |
+
// See `initEvents.vpf` event why we need this option disabled.
|
45 |
+
resize: false,
|
46 |
Â
};
|
47 |
Â
|
48 |
Â
self.emitEvent( 'beforeInitIsotope', [ initOptions ] );
|
142 |
Â
self.destroyIsotope();
|
143 |
Â
} );
|
144 |
Â
|
145 |
+
// Init events.
|
146 |
+
$doc.on( 'initEvents.vpf', ( event, self ) => {
|
147 |
+
if ( 'vpf' !== event.namespace ) {
|
148 |
+
return;
|
149 |
+
}
|
150 |
+
|
151 |
+
// We need to resize isotope manually, since the native relayout
|
152 |
+
// is not working properly, when container size is not changed
|
153 |
+
// but items sizes are changed in CSS. For some reason Isotope don't relayout it.
|
154 |
+
if ( self.$items_wrap.isotope && SUPPORTED_LAYOUTS.includes( self.options.layout ) ) {
|
155 |
+
const evp = `.vpf-uid-${ self.uid }`;
|
156 |
+
|
157 |
+
$wnd.on( `resize${ evp }`, throttle( 100, rafSchd( () => {
|
158 |
+
self.$items_wrap.isotope( 'layout' );
|
159 |
+
} ) ) );
|
160 |
+
}
|
161 |
+
} );
|
162 |
+
|
163 |
+
// Destroy events.
|
164 |
+
$doc.on( 'destroyEvents.vpf', ( event, self ) => {
|
165 |
+
if ( 'vpf' !== event.namespace ) {
|
166 |
+
return;
|
167 |
+
}
|
168 |
+
|
169 |
+
if ( SUPPORTED_LAYOUTS.includes( self.options.layout ) ) {
|
170 |
+
const evp = `.vpf-uid-${ self.uid }`;
|
171 |
+
|
172 |
+
$wnd.off( `resize${ evp }` );
|
173 |
+
}
|
174 |
+
} );
|
175 |
+
|
176 |
Â
// WPBakery Page Builder fullwidth row fix.
|
177 |
+
$doc.on( 'vc-full-width-row', debounce( 150, rafSchd( ( event, el ) => {
|
178 |
Â
$( el ).find( '.vp-portfolio' ).each( function() {
|
179 |
Â
if ( ! this.vpf || ! this.vpf.initIsotope ) {
|
180 |
Â
return;
|
186 |
Â
this.vpf.initIsotope( 'layout' );
|
187 |
Â
}
|
188 |
Â
} );
|
189 |
+
} ) ) );
|
assets/js/plugin-isotope.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=
|
1 |
+
!function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=245)}({245:function(t,e,o){t.exports=o(246)},246:function(t,e,o){"use strict";o.r(e);var n=o(3),i=o(4),r=window.jQuery,p=r(window),s=r(document),a=["tiles","masonry","grid"];s.on("extendClass.vpf",(function(t,e){"vpf"===t.namespace&&(e.prototype.initIsotope=function(t){if(this.$items_wrap.isotope&&a.includes(this.options.layout)){var e="rtl"===getComputedStyle(this.$items_wrap[0]).direction,o=t||{itemSelector:".vp-portfolio__item-wrap",layoutMode:"masonry",transitionDuration:"0.3s",percentPosition:!0,originLeft:!e,resize:!1};this.emitEvent("beforeInitIsotope",[o]),this.$items_wrap.isotope(o),this.emitEvent("initIsotope",[o])}},e.prototype.destroyIsotope=function(){this.$items_wrap.data("isotope")&&(this.$items_wrap.isotope("destroy"),this.emitEvent("destroyIsotope"))})})),s.on("addItems.vpf",(function(t,e,o,n){if("vpf"===t.namespace&&e.$items_wrap.data("isotope")){if(n){var i=e.$items_wrap.find(".vp-portfolio__item-wrap");e.$items_wrap.isotope("remove",i),e.$items_wrap.prepend(o).isotope("prepended",o)}else e.$items_wrap.append(o).isotope("appended",o);setTimeout((function(){e.initIsotope("layout")}),0)}})),s.on("removeItems.vpf",(function(t,e,o){"vpf"===t.namespace&&(e.$items_wrap.data("isotope")&&e.$items_wrap.isotope("remove",o))})),s.on("init.vpf",(function(t,e){"vpf"===t.namespace&&e.initIsotope()})),s.on("imagesLoaded.vpf",(function(t,e){"vpf"===t.namespace&&e.initIsotope("layout")})),s.on("destroy.vpf",(function(t,e){"vpf"===t.namespace&&e.destroyIsotope()})),s.on("initEvents.vpf",(function(t,e){if("vpf"===t.namespace&&e.$items_wrap.isotope&&a.includes(e.options.layout)){var o=".vpf-uid-".concat(e.uid);p.on("resize".concat(o),Object(n.throttle)(100,Object(i.a)((function(){e.$items_wrap.isotope("layout")}))))}})),s.on("destroyEvents.vpf",(function(t,e){if("vpf"===t.namespace&&a.includes(e.options.layout)){var o=".vpf-uid-".concat(e.uid);p.off("resize".concat(o))}})),s.on("vc-full-width-row",Object(n.debounce)(150,Object(i.a)((function(t,e){r(e).find(".vp-portfolio").each((function(){this.vpf&&this.vpf.initIsotope&&(this.vpf.$items_wrap.data("isotope")&&this.vpf.initIsotope("layout"))}))}))))},3:function(t,e,o){var n,i,r,p;function s(t){return(s="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})(t)}p=function(t){"use strict";function e(t,e,o,n){var i,r=!1,p=0;function s(){i&&clearTimeout(i)}function a(){for(var a=arguments.length,u=new Array(a),f=0;f<a;f++)u[f]=arguments[f];var c=this,l=Date.now()-p;function d(){p=Date.now(),o.apply(c,u)}function v(){i=void 0}r||(n&&!i&&d(),s(),void 0===n&&l>t?d():!0!==e&&(i=setTimeout(n?v:d,void 0===n?t-l:t)))}return"boolean"!=typeof e&&(n=o,o=e,e=void 0),a.cancel=function(){s(),r=!0},a}t.debounce=function(t,o,n){return void 0===n?e(t,o,!1):e(t,n,!1!==o)},t.throttle=e,Object.defineProperty(t,"__esModule",{value:!0})},"object"===s(e)&&void 0!==t?p(e):(i=[e],void 0===(r="function"==typeof(n=p)?n.apply(e,i):n)||(t.exports=r))},4:function(t,e,o){"use strict";e.a=function(t){var e=[],o=null,n=function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];e=i,o||(o=requestAnimationFrame((function(){o=null,t.apply(void 0,e)})))};return n.cancel=function(){o&&(cancelAnimationFrame(o),o=null)},n}}});
|
assets/js/plugin-photoswipe.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},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=
|
2 |
Â
/*!
|
3 |
Â
* is-number <https://github.com/jonschlinkert/is-number>
|
4 |
Â
*
|
1 |
+
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},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=247)}({247:function(t,e,n){t.exports=n(248)},248:function(t,e,n){"use strict";n.r(e);var o=n(28),i=n.n(o);function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var p=window.jQuery,c=window,a=c.VPData,l=c.VPPopupAPI,u=c.PhotoSwipe,d=c.PhotoSwipeUI_Default,w=a.__,_=a.settingsPopupGallery;function h(t,e){if(void 0!==e){var n,o=t.viewportSize.x,i=t.viewportSize.y,r=e.vw/e.vh,s=p(e.container),c=t.options.barsSize,a=0,l=0;c&&(a=c.top&&"auto"!==c.top?c.top:0,l=c.bottom&&"auto"!==c.bottom?c.bottom:0),n=r>o/(i-=a+l)?o:i*r;var u=s.find(".vp-pswp-video");u.css("max-width",n),u.children().css({paddingBottom:"".concat(e.vh/e.vw*100,"%")}),s.css({top:a,bottom:l})}else t&&t.itemHolders.length&&t.itemHolders.forEach((function(e){e.item&&e.item.html&&h(t,e.item)}))}if(u&&l){var v;if(!p(".vp-pswp").length){var f='\n <div class="pswp vp-pswp" tabindex="-1" role="dialog" aria-hidden="true">\n <div class="pswp__bg"></div>\n <div class="pswp__scroll-wrap">\n <div class="pswp__container">\n <div class="pswp__item"></div>\n <div class="pswp__item"></div>\n <div class="pswp__item"></div>\n </div>\n <div class="pswp__ui pswp__ui--hidden">\n <div class="pswp__top-bar">\n <div class="pswp__counter"></div>\n <button class="pswp__button pswp__button--close" title="'.concat(w.pswp_close,'"></button>\n <button class="pswp__button pswp__button--share" title="').concat(w.pswp_share,'"></button>\n <button class="pswp__button pswp__button--fs" title="').concat(w.pswp_fs,'"></button>\n <button class="pswp__button pswp__button--zoom" title="').concat(w.pswp_zoom,'"></button>\n </div>\n <div class="pswp__preloader">\n <div class="pswp__preloader__icn">\n <div class="pswp__preloader__cut">\n <div class="pswp__preloader__donut"></div>\n </div>\n </div>\n </div>\n <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">\n <div class="pswp__share-tooltip"></div>\n </div>\n <button class="pswp__button pswp__button--arrow--left" title="').concat(w.pswp_prev,'"></button>\n <button class="pswp__button pswp__button--arrow--right" title="').concat(w.pswp_next,'"></button>\n <div class="pswp__caption">\n <div class="pswp__caption__center"></div>\n </div>\n </div>\n </div>\n </div>\n ');p("body").append(f)}l.vendor="photoswipe",l.open=function(t,e,n){var o=[];t.forEach((function(t){"embed"===t.type?o.push({html:'<div class="vp-pswp-video"><div>'.concat(t.embed,"</div></div>"),vw:t.width||0,vh:t.height||0}):o.push(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({src:t.src,el:t.el,w:t.width||0,h:t.height||0,title:t.caption,o:{src:t.src,w:t.width||0,h:t.height||0}},t.srcMedium?{m:{src:t.srcMedium,w:t.srcMediumWidth||0,h:t.srcMediumHeight||0},msrc:t.srcMedium}:{}))}));var c=p(".vp-pswp"),a=c[0],l={captionAndToolbarShowEmptyCaptions:!1,closeEl:_.show_close_button,captionEl:!0,fullscreenEl:_.show_fullscreen_button,zoomEl:_.show_zoom_button,shareEl:_.show_share_button,counterEl:_.show_counter,arrowEl:_.show_arrows,shareButtons:[{id:"facebook",label:w.pswp_share_fb,url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:w.pswp_share_tw,url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:w.pswp_share_pin,url:"https://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"}],bgOpacity:1,tapToClose:!1,tapToToggleControls:!0,showHideOpacity:!0,history:!1,getThumbBoundsFn:function(t){if(!o[t]||!o[t].el)return!1;var e=p(o[t].el).find("img")[0];if(!e)return!1;var n=e.getBoundingClientRect(),i=window.pageYOffset||document.documentElement.scrollTop,r=parseFloat(c.css("top"))||0;return{x:n.left,y:n.top+i-r,w:n.width,h:n.height}}};if(l.index=parseInt(e,10),i()(l.index)){var f;n&&n.emitEvent("beforeInitPhotoSwipe",[l,o,e]),v=new u(a,d,o,l);var b,m=!1,g=!0;v.listen("beforeResize",(function(){f=v.viewportSize.x*window.devicePixelRatio,m&&1e3>f?(m=!1,b=!0):!m&&1e3<=f&&(m=!0,b=!0),b&&!g&&v.invalidateCurrItems(),g&&(g=!1),b=!1})),v.listen("gettingData",(function(t,e){e.html||(m&&e.o?(e.o.src&&(e.src=e.o.src),e.o.w&&(e.w=e.o.w),e.o.h&&(e.h=e.o.h)):e.m&&(e.m.src&&(e.src=e.m.src),e.m.w&&(e.w=e.m.w),e.m.h&&(e.h=e.m.h)))})),v.listen("imageLoadComplete",(function(t,e){if(1>e.h||1>e.w){var n=new Image;n.onload=function(){e.w=n.width,e.h=n.height,v.invalidateCurrItems(),v.updateSize(!0)},n.src=e.src}})),v.listen("resize",(function(){h(this)})),v.listen("afterChange",(function(){h(this)})),v.listen("beforeChange",(function(){if(this&&this.itemHolders.length){var t=this.getCurrentIndex();this.itemHolders.forEach((function(e){if(e.el&&e.index!==t){var n=p(e.el).find(".vp-pswp-video iframe");n.length&&n.attr("src",n.attr("src"))}}))}})),v.listen("destroy",(function(){this&&this.itemHolders.length&&this.itemHolders.forEach((function(t){t.el&&p(t.el).find(".vp-pswp-video").remove()})),v=!1})),v.init(),n&&n.emitEvent("initPhotoSwipe",[l,o,e,v])}},l.close=function(){v&&(v.close(),v=!1)}}},28:function(t,e,n){"use strict";
|
2 |
Â
/*!
|
3 |
Â
* is-number <https://github.com/jonschlinkert/is-number>
|
4 |
Â
*
|
assets/js/plugin-swiper.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
!function(e){var i={};function t(r){if(i[r])return i[r].exports;var s=i[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,t),s.l=!0,s.exports}t.m=e,t.c=i,t.d=function(e,i,r){t.o(e,i)||Object.defineProperty(e,i,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,i){if(1&i&&(e=t(e)),8&i)return e;if(4&i&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&i&&"string"!=typeof e)for(var s in e)t.d(r,s,function(i){return e[i]}.bind(null,s));return r},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,i){return Object.prototype.hasOwnProperty.call(e,i)},t.p="",t(t.s=
|
2 |
Â
/*!
|
3 |
Â
* is-number <https://github.com/jonschlinkert/is-number>
|
4 |
Â
*
|
1 |
+
!function(e){var i={};function t(r){if(i[r])return i[r].exports;var s=i[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,t),s.l=!0,s.exports}t.m=e,t.c=i,t.d=function(e,i,r){t.o(e,i)||Object.defineProperty(e,i,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,i){if(1&i&&(e=t(e)),8&i)return e;if(4&i&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&i&&"string"!=typeof e)for(var s in e)t.d(r,s,function(i){return e[i]}.bind(null,s));return r},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,i){return Object.prototype.hasOwnProperty.call(e,i)},t.p="",t(t.s=249)}({249:function(e,i,t){e.exports=t(250)},250:function(e,i,t){"use strict";t.r(i);var r=t(28),s=t.n(r),n=window.jQuery,o=window.VPData.screenSizes;n(document).on("extendClass.vpf",(function(e,i){"vpf"===e.namespace&&(i.prototype.initSwiper=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this;if("slider"===i.options.layout&&void 0!==window.Swiper){var t=i.$items_wrap.parent();t.addClass("swiper-container"),i.$items_wrap.addClass("swiper-wrapper"),i.$items_wrap.children().addClass("swiper-slide");var r=i.options.sliderSlidesPerView||3,n={};if("fade"===i.options.sliderEffect&&(r=1),s()(r)){for(var a=r,l=Math.min(o.length-1,a-1);0<=l;l-=1)0<a&&void 0!==o[l]&&(n[o[l]+1]={slidesPerView:a}),a-=1;r=a||1}"fade"===(e=e||{speed:1e3*(parseFloat(i.options.sliderSpeed)||0),autoHeight:"auto"===i.options.sliderItemsHeight,effect:i.options.sliderEffect||"slide",spaceBetween:parseFloat(i.options.itemsGap)||0,centeredSlides:"true"===i.options.sliderCenteredSlides,freeMode:"true"===i.options.sliderFreeMode,freeModeSticky:"true"===i.options.sliderFreeModeSticky,loop:"true"===i.options.sliderLoop,autoplay:0<parseFloat(i.options.sliderAutoplay)&&{delay:1e3*parseFloat(i.options.sliderAutoplay),disableOnInteraction:!1},navigation:"true"===i.options.sliderArrows&&{nextEl:".vp-portfolio__items-arrow-next",prevEl:".vp-portfolio__items-arrow-prev"},pagination:"true"===i.options.sliderBullets&&{el:".vp-portfolio__items-bullets",clickable:!0,dynamicBullets:"true"===i.options.sliderBulletsDynamic,renderBullet:function(e,i){return'<span class="'.concat(i,'" data-bullet-index="').concat(e,'" data-bullet-number="').concat(e+1,'"></span>')}},mousewheel:"true"===i.options.sliderMousewheel,slidesPerView:r,breakpoints:n,breakpointsInverse:!0,keyboard:!0,grabCursor:!0}).effect&&(e.fadeEffect={crossFade:!0}),0===e.speed&&(e.speed=1);var p=0;if(e.on={transitionEnd:function(){0===p?(p=1,this.setTransition(1),this.setTranslate(this.translate+.1)):1===p&&(p=2,this.slideReset())}},i.emitEvent("beforeInitSwiper",[e]),i.$slider_thumbnails_wrap.length){var d=i.$slider_thumbnails_wrap.parent();d.addClass("swiper-container"),i.$slider_thumbnails_wrap.addClass("swiper-wrapper"),i.$slider_thumbnails_wrap.children().addClass("swiper-slide");var u=i.options.sliderThumbnailsPerView||8,c={};if(s()(u)){for(var f=u,w=Math.min(o.length-1,f-1);0<=w;w-=1)0<f&&void 0!==o[w]&&(c[o[w]+1]={slidesPerView:f}),f-=1;u=f||1}var m=new window.Swiper(d[0],{autoHeight:"auto"===i.options.sliderThumbnailsHeight,effect:"slide",spaceBetween:parseFloat(i.options.sliderThumbnailsGap)||0,loop:!1,freeMode:!0,freeModeSticky:!0,loopedSlides:5,slidesPerView:u,breakpoints:c,breakpointsInverse:!0,keyboard:!0,grabCursor:!0,watchSlidesVisibility:!0,watchSlidesProgress:!0});e.thumbs={swiper:m}}new window.Swiper(t[0],e),"true"===i.options.sliderAutoplayHoverPause&&0<parseFloat(i.options.sliderAutoplay)&&(i.$item.on("mouseenter.vpf-uid-".concat(i.uid),".swiper-container",(function(){t[0].swiper.autoplay.stop()})),i.$item.on("mouseleave.vpf-uid-".concat(i.uid),".swiper-container",(function(){t[0].swiper.autoplay.start()}))),i.emitEvent("initSwiper",[e])}},i.prototype.destroySwiper=function(){var e=this.$items_wrap.parent(),i=!!this.$slider_thumbnails_wrap.length&&this.$slider_thumbnails_wrap.parent(),t=e[0].swiper,r=!!i&&i[0].swiper,s=!1;r&&(r.destroy(),i.removeClass("swiper-container"),this.$slider_thumbnails_wrap.removeClass("swiper-wrapper"),this.$slider_thumbnails_wrap.children().removeClass("swiper-slide"),s=!0),t&&(t.destroy(),e.removeClass("swiper-container"),this.$items_wrap.removeClass("swiper-wrapper"),this.$items_wrap.children().removeClass("swiper-slide"),e.find(".vp-portfolio__items-bullets").removeClass("swiper-pagination-clickable swiper-pagination-bullets-dynamic").removeAttr("style").html(""),s=!0),s&&this.emitEvent("destroySwiper")})})),n(document).on("addItems.vpf",(function(e,i,t,r,s){if("vpf"===e.namespace){var n=i.$items_wrap.parent()[0].swiper;if(n){r&&n.removeAllSlides();var o=[];t.addClass("swiper-slide").each((function(){o.push(this)})),n.appendSlide(o);var a=!!i.$slider_thumbnails_wrap.length&&i.$slider_thumbnails_wrap.parent()[0].swiper;if(a){r&&a.removeAllSlides();var l=[];s.find(".vp-portfolio__thumbnails > .vp-portfolio__thumbnail-wrap").clone().addClass("swiper-slide").each((function(){l.push(this)})),a.appendSlide(l)}}}})),n(document).on("init.vpf",(function(e,i){"vpf"===e.namespace&&i.initSwiper()})),n(document).on("destroy.vpf",(function(e,i){"vpf"===e.namespace&&i.destroySwiper()}))},28:function(e,i,t){"use strict";
|
2 |
Â
/*!
|
3 |
Â
* is-number <https://github.com/jonschlinkert/is-number>
|
4 |
Â
*
|
assets/js/popup-gallery.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function i(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=
|
1 |
+
!function(e){var t={};function i(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=251)}({251:function(e,t,i){e.exports=i(252)},252:function(e,t){var i=window.jQuery,o=window.VPData.settingsPopupGallery,r={vendor:!1,vendors:[{vendor:"youtube",embedUrl:"https://www.youtube.com/embed/{{video_id}}",pattern:/(https?:\/\/)?(www.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(?:embed\/|v\/|watch\?v=|watch\?list=(.*)&v=|watch\?(.*[^&]&)v=)?((\w|-){11})(&list=(\w+)&?)?/,patternIndex:6},{vendor:"vimeo",embedUrl:"https://player.vimeo.com/video/{{video_id}}",pattern:/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,patternIndex:3}],init:function(){},open:function(){},close:function(){},parseVideo:function(e){var t=!1;return r.vendors.forEach((function(i){if(!t){var o=e.match(i.pattern),r=!(!o||!o[i.patternIndex])&&o[i.patternIndex];if(r)if(i.embedCallback)t=i.embedCallback(e,o);else{var n=i.embedUrl;n=(n=(n=n.replace(/{{video_id}}/g,r)).replace(/{{video_url}}/g,e)).replace(/{{video_url_encoded}}/g,encodeURIComponent(e));var p=i.width||1920,a=i.height||1080;t={vendor:i.vendor,id:r,embed:'<iframe width="'.concat(p,'" height="').concat(a,'" src="').concat(n,'" scrolling="no" frameborder="0" allowTransparency="true" allow="autoplay; fullscreen; encrypted-media" allowfullscreen></iframe>'),embedUrl:n,url:e,width:p,height:a}}}})),t||{vendor:"unknown",id:e,url:e,embedUrl:e,embed:'<iframe width="1920" height="1080" src="'.concat(e,'" scrolling="no" frameborder="0" allowTransparency="true" allow="autoplay; fullscreen; encrypted-media" allowfullscreen></iframe>')}},parseGallery:function(e){var t,o,n,p,a,l=[];return e.find(".vp-portfolio__item-wrap").each((function(){if((t=i(this).find(".vp-portfolio__item-popup"))&&t.length){if(o=(t.attr("data-vp-popup-img-size")||"1920x1080").split("x"),p=t.attr("data-vp-popup-video"),a=!1,p&&(a=r.parseVideo(p)),a)n={type:"embed",el:this,src:a.embedUrl,embed:a.embed,width:a.width||1920,height:a.height||1080};else{n={type:"image",el:this,src:t.attr("data-vp-popup-img"),srcset:t.attr("data-vp-popup-img-srcset"),width:parseInt(o[0],10),height:parseInt(o[1],10)};var e=t.attr("data-vp-popup-sm-img")||n.src;if(e){var c=(t.attr("data-vp-popup-sm-img-size")||t.attr("data-vp-popup-img-size")||"1920x1080").split("x");n.srcSmall=e,n.srcSmallWidth=parseInt(c[0],10),n.srcSmallHeight=parseInt(c[1],10)}var s=t.attr("data-vp-popup-md-img")||n.src;if(s){var d=(t.attr("data-vp-popup-md-img-size")||t.attr("data-vp-popup-img-size")||"1920x1080").split("x");n.srcMedium=s,n.srcMediumWidth=parseInt(d[0],10),n.srcMediumHeight=parseInt(d[1],10)}var u=t.children(".vp-portfolio__item-popup-title").get(0),f=t.children(".vp-portfolio__item-popup-description").get(0);(u||f)&&(n.caption=(u?u.outerHTML:"")+(f?f.outerHTML:""))}l.push(n)}})),l}};function n(e){return/(.png|.jpg|.jpeg|.gif|.tiff|.bmp|.webp)$/.test(e.href.toLowerCase().split("?")[0].split("#")[0])}function p(e){var t=e.childNodes[0],o=i(e),r=o.next("figcaption");return!r.length&&o.parent(".gallery-icon").length&&(r=o.parent(".gallery-icon").next("figcaption")),(r=r.html())&&(r='<div class="vp-portfolio__item-popup-description">'.concat(r,"</div>")),{type:"image",el:t,linkEl:e,src:e.href,caption:r}}window.VPPopupAPI=r,i(document).on("extendClass.vpf",(function(e,t){"vpf"===e.namespace&&(t.prototype.initPopupGallery=function(){var e=this;e.options.itemsClickAction&&"popup_gallery"===e.options.itemsClickAction&&(e.isPreview()||e.$item.on("click.vpf-uid-".concat(e.uid),".vp-portfolio__item a.vp-portfolio__item-meta, .vp-portfolio__item .vp-portfolio__item-img > a, .vp-portfolio__item .vp-portfolio__item-meta-title > a",(function(t){var o=i(this);if(o.closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item-popup").length){t.preventDefault();var n=-1,p=o.closest(".vp-portfolio__item")[0];e.$item.find(".vp-portfolio__item-wrap .vp-portfolio__item-popup").each((function(e){-1===n&&i(this).closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item")[0]===p&&(n=e)})),0>n&&(n=0);var a=r.parseGallery(e.$item);r.open(a,n,e)}})))},t.prototype.destroyPopupGallery=function(){this.options.itemsClickAction&&"popup_gallery"===this.options.itemsClickAction&&(this.$item.off("click.vpf-uid-".concat(this.uid)),this.emitEvent("destroyPopupGallery"))})})),i(document).on("init.vpf",(function(e,t){"vpf"===e.namespace&&t.initPopupGallery()})),i(document).on("destroy.vpf",(function(e,t){"vpf"===e.namespace&&t.destroyPopupGallery()})),o.enable_on_wordpress_images&&i(document).on("click","\n .wp-block-image > a,\n .wp-block-image > figure > a,\n .wp-block-gallery .blocks-gallery-item > figure > a,\n .wp-block-media-text > figure > a,\n .gallery .gallery-icon > a,\n figure.wp-caption > a,\n figure.tiled-gallery__item > a,\n p > a\n ",(function(e){if(1===this.childNodes.length&&("IMG"===this.childNodes[0].nodeName||"PICTURE"===this.childNodes[0].nodeName)&&n(this)){e.preventDefault();var t=i(this),o=[],a=p(this),l=t.closest(".wp-block-gallery, .gallery, .tiled-gallery__gallery"),c=0;if(l.length){var s=l.find(".blocks-gallery-item > figure > a, .gallery-icon > a, figure.tiled-gallery__item > a"),d=0;s.each((function(){n(this)&&(this===a.linkEl&&(c=d),o.push(p(this)),d+=1)}))}else o.push(a);r.open(o,c)}}))}});
|
assets/js/preview.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
Â
/*!
|
2 |
Â
* Name : Visual Portfolio
|
3 |
-
* Version : 2.
|
4 |
Â
* Author : nK https://nkdev.info
|
5 |
Â
*/
|
6 |
Â
const $ = window.jQuery;
|
1 |
Â
/*!
|
2 |
Â
* Name : Visual Portfolio
|
3 |
+
* Version : 2.7.0
|
4 |
Â
* Author : nK https://nkdev.info
|
5 |
Â
*/
|
6 |
Â
const $ = window.jQuery;
|
assets/js/preview.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=
|
2 |
Â
/*!
|
3 |
Â
* Name : Visual Portfolio
|
4 |
Â
* Version : @@plugin_version
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=253)}({253:function(e,t,n){e.exports=n(254)},254:function(e,t){
|
2 |
Â
/*!
|
3 |
Â
* Name : Visual Portfolio
|
4 |
Â
* Version : @@plugin_version
|
assets/vendor/flickr-justified-gallery/dist/fjGallery.min.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
Â
/*!
|
2 |
Â
* Name : Flickr's Justified Gallery [fjGallery]
|
3 |
-
* Version : 1.0.
|
4 |
Â
* Author : nK <https://nkdev.info>
|
5 |
Â
* GitHub : https://github.com/nk-o/flickr-justified-gallery
|
6 |
-
*/!function(o){var n={};function i(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}i.m=o,i.c=n,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,o){t.exports=o(1)},function(t,e,o){"use strict";o.r(e);var n=o(2),i=o.n(n),r=o(3),a=o(5);function
|
7 |
Â
/*!
|
8 |
Â
* @name JavaScript/NodeJS Merge v1.2.1
|
9 |
Â
* @author yeikos
|
@@ -11,16 +11,16 @@
|
|
11 |
Â
|
12 |
Â
* Copyright 2014 yeikos - MIT license
|
13 |
Â
* https://raw.github.com/yeikos/js.merge/master/LICENSE
|
14 |
-
*/function o(t,e,o){var n=o[0],i=o.length;!t&&"object"===
|
15 |
Â
/*!
|
16 |
Â
* Copyright 2019 SmugMug, Inc.
|
17 |
Â
* Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.
|
18 |
Â
* @license
|
19 |
-
*/var p=o(
|
20 |
Â
/*!
|
21 |
Â
* Copyright 2019 SmugMug, Inc.
|
22 |
Â
* Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.
|
23 |
Â
* @license
|
24 |
Â
*/
|
25 |
-
var
|
26 |
Â
//# sourceMappingURL=fjGallery.min.js.map
|
1 |
Â
/*!
|
2 |
Â
* Name : Flickr's Justified Gallery [fjGallery]
|
3 |
+
* Version : 1.0.4
|
4 |
Â
* Author : nK <https://nkdev.info>
|
5 |
Â
* GitHub : https://github.com/nk-o/flickr-justified-gallery
|
6 |
+
*/!function(o){var n={};function i(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}i.m=o,i.c=n,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,o){t.exports=o(1)},function(t,e,o){"use strict";o.r(e);var n=o(2),i=o.n(n),r=o(3),a=o(5);function c(t){return(c="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})(t)}var s,u,l,f,h=r.window.fjGallery;r.window.fjGallery=a.default,r.window.fjGallery.noConflict=function(){return r.window.fjGallery=h,this},void 0!==r.jQuery&&(s=r.window.fjGallery.constructor.prototype.init,r.window.fjGallery.constructor.prototype.init=function(){this.jQcontainer=Object(r.jQuery)(this.$container),this.jQcontainer.data("fjGallery",this),s&&s.call(this)},u=r.window.fjGallery.constructor.prototype.destroy,r.window.fjGallery.constructor.prototype.destroy=function(){this.jQcontainer&&this.jQcontainer.removeData("fjGallery"),u&&u.call(this)},(l=function(){var t=arguments||[];Array.prototype.unshift.call(t,this);var e=a.default.apply(r.window,t);return"object"!==c(e)?e:this}).constructor=a.default.constructor,f=r.jQuery.fn.fjGallery,r.jQuery.fn.fjGallery=l,r.jQuery.fn.fjGallery.noConflict=function(){return r.jQuery.fn.fjGallery=f,this}),i()(function(){Object(a.default)(document.querySelectorAll(".fj-gallery"))})},function(t,e){t.exports=function(t){"complete"===document.readyState||"interactive"===document.readyState?t.call():document.attachEvent?document.attachEvent("onreadystatechange",function(){"interactive"===document.readyState&&t.call()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}},function(o,t,e){(function(t){var e="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};o.exports=e}).call(this,e(4))},function(t,e){function o(t){return(o="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})(t)}var n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":o(window))&&(n=window)}t.exports=n},function(t,e,o){"use strict";o.r(e);var a=o(6),c=o(7),n=o(8),s=o.n(n),i=o(2),r=o.n(i),u=o(10),l=o.n(u),f=o(3);function h(t){return(h="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})(t)}function d(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var p=[];function g(){f.window.requestAnimationFrame(function(){p.forEach(function(t){t.resize()})})}f.window.addEventListener("resize",g),f.window.addEventListener("orientationchange",g),f.window.addEventListener("load",g),r()(function(){g()});function y(t,e){("object"===("undefined"==typeof HTMLElement?"undefined":h(HTMLElement))?t instanceof HTMLElement:t&&"object"===h(t)&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName)&&(t=[t]);for(var o,n=e,i=Array.prototype.slice.call(arguments,2),r=t.length,a=0;a<r;a++)if("object"===h(n)||void 0===n?t[a].fjGallery||(t[a].fjGallery=new m(t[a],n)):t[a].fjGallery&&(o=t[a].fjGallery[n].apply(t[a].fjGallery,i)),void 0!==o)return o;return t}var w=0,m=function(){function r(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r);var o=this;o.instanceID=w++,o.$container=t,o.images=[],o.defaults={itemSelector:".fj-gallery-item",imageSelector:"img",gutter:10,rowHeight:320,rowHeightTolerance:.25,resizeThrottle:200,isRtl:"rtl"===o.css(o.$container,"direction"),onInit:null,onDestroy:null,onAppendImages:null,onBeforeJustify:null,onJustify:null};var n=o.$container.dataset||{},i={};Object.keys(n).forEach(function(t){var e=t.substr(0,1).toLowerCase()+t.substr(1);e&&void 0!==o.defaults[e]&&(i[e]=n[t])}),o.options=s()({},o.defaults,i,e),o.pureOptions=s()({},o.options),o.resize=Object(a.throttle)(o.options.resizeThrottle,o.resize),o.justify=Object(c.default)(o.justify),o.init()}var t,e,o;return t=r,(e=[{key:"css",value:function(e,o){return"string"==typeof o?f.window.getComputedStyle(e).getPropertyValue(o):(o.transform&&(o["-webkit-transform"]=o.transform),Object.keys(o).forEach(function(t){e.style[t]=o[t]}),e)}},{key:"addToFjGalleryList",value:function(){p.push(this),g()}},{key:"removeFromFjGalleryList",value:function(){var o=this;p.forEach(function(t,e){t.instanceID===o.instanceID&&p.splice(e,1)})}},{key:"init",value:function(){var t=this;t.appendImages(t.$container.querySelectorAll(t.options.itemSelector)),t.addToFjGalleryList(),t.options.onInit&&t.options.onInit.call(t)}},{key:"appendImages",value:function(t){var h=this;f.window.jQuery&&t instanceof f.window.jQuery&&(t=t.get()),t&&t.length&&(t.forEach(function(t){var f,e;!t||t.fjGalleryImage||!t.querySelector||(f=t.querySelector(h.options.imageSelector))&&(t.fjGalleryImage=h,(e={$item:t,$image:f,width:parseFloat(f.getAttribute("width"))||!1,height:parseFloat(f.getAttribute("height"))||!1,loadSizes:function(){var t,e,o,n,i,r,a=this;function c(){n?e(n):(n={width:t.naturalWidth,height:t.naturalHeight},e(n),clearInterval(o),i&&r())}function s(){c()}function u(){c()}function l(){0<t.naturalWidth&&c()}t=f,i=n=!(e=function(t){a.width===t.width&&a.height===t.height||(a.width=t.width,a.height=t.height,h.resize())}),r=function(){i=!1,t.removeEventListener("load",s),t.removeEventListener("error",u)},l(),n||(i=!0,t.addEventListener("load",s),t.addEventListener("error",u),o=setInterval(l,100))}}).loadSizes(),h.images.push(e))}),h.options.onAppendImages&&h.options.onAppendImages.call(h,[t]),h.justify())}},{key:"justify",value:function(){var e=this,o=[];e.options.onBeforeJustify&&e.options.onBeforeJustify.call(e),e.images.forEach(function(t){t.width&&t.height&&o.push(t.width/t.height)});var n=l()(o,{containerWidth:e.$container.getBoundingClientRect().width,containerPadding:{top:parseFloat(e.css(e.$container,"padding-top"))||0,right:parseFloat(e.css(e.$container,"padding-right"))||0,bottom:parseFloat(e.css(e.$container,"padding-bottom"))||0,left:parseFloat(e.css(e.$container,"padding-left"))||0},boxSpacing:e.options.gutter,targetRowHeight:e.options.rowHeight,targetRowHeightTolerance:e.options.rowHeightTolerance});e.css(e.$container,{height:"".concat(n.containerHeight,"px")});var i=0;e.images.forEach(function(t){t.width&&t.height&&(e.css(t.$item,{position:"absolute",transform:"translateX(".concat((e.options.isRtl?-1:1)*n.boxes[i].left,"px) translateY(").concat(n.boxes[i].top,"px) translateZ(0)"),width:"".concat(n.boxes[i].width,"px"),height:"".concat(n.boxes[i].height,"px")}),i++)}),e.options.onJustify&&e.options.onJustify.call(e)}},{key:"updateOptions",value:function(t){this.options=s()({},this.options,t),this.justify()}},{key:"destroy",value:function(){var e=this;e.removeFromFjGalleryList(),e.options.onDestroy&&e.options.onDestroy.call(e),e.css(e.$container,{height:""}),e.images.forEach(function(t){e.css(t.$item,{position:"",transform:"",width:"",height:""})}),e.images.forEach(function(t){delete t.$item.fjGalleryImage}),delete e.$container.fjGallery}},{key:"resize",value:function(){this.justify()}}])&&d(t.prototype,e),o&&d(t,o),r}();y.constructor=m,e.default=y},function(t,e,o){var n,i,r,a;function c(t){return(c="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})(t)}a=function(t){"use strict";function n(a,c,s,u){var l,f=!1,h=0;function d(){l&&clearTimeout(l)}function t(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];var n=this,i=Date.now()-h;function r(){h=Date.now(),s.apply(n,e)}f||(u&&!l&&r(),d(),void 0===u&&a<i?r():!0!==c&&(l=setTimeout(u?function(){l=void 0}:r,void 0===u?a-i:a)))}return"boolean"!=typeof c&&(u=s,s=c,c=void 0),t.cancel=function(){d(),f=!0},t}t.debounce=function(t,e,o){return void 0===o?n(t,e,!1):n(t,o,!1!==e)},t.throttle=n,Object.defineProperty(t,"__esModule",{value:!0})},"object"===c(e)&&void 0!==t?a(e):(i=[e],void 0===(r="function"==typeof(n=a)?n.apply(e,i):n)||(t.exports=r))},function(t,e,o){"use strict";o.r(e);e.default=function(n){function t(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];i=e,r=r||requestAnimationFrame(function(){r=null,n.apply(void 0,i)})}var i,r=null;return t.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},t}},function(t,e,o){(function(t){function e(t){return(e="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})(t)}
|
7 |
Â
/*!
|
8 |
Â
* @name JavaScript/NodeJS Merge v1.2.1
|
9 |
Â
* @author yeikos
|
11 |
Â
|
12 |
Â
* Copyright 2014 yeikos - MIT license
|
13 |
Â
* https://raw.github.com/yeikos/js.merge/master/LICENSE
|
14 |
+
*/function o(t,e,o){var n=o[0],i=o.length;!t&&"object"===u(n)||(n={});for(var r=0;r<i;++r){var a,c=o[r];if("object"===u(c))for(var s in c){"__proto__"!==s&&(a=t?l.clone(c[s]):c[s],n[s]=e?function t(e,o){if("object"!==u(e))return o;for(var n in o)"object"===u(e[n])&&"object"===u(o[n])?e[n]=t(e[n],o[n]):e[n]=o[n];return e}(n[s],a):a)}}return n}function u(t){return{}.toString.call(t).slice(8,-1).toLowerCase()}var n,l;n="object"===e(t)&&t&&"object"===e(t.exports)&&t.exports,(l=function(t){return o(!0===t,!1,arguments)}).recursive=function(t){return o(!0===t,!0,arguments)},l.clone=function(t){var e,o,n=t,i=u(t);if("array"===i)for(n=[],o=t.length,e=0;e<o;++e)n[e]=l.clone(t[e]);else if("object"===i)for(e in n={},t)n[e]=l.clone(t[e]);return n},n?t.exports=l:window.merge=l}).call(this,o(9)(t))},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,o){"use strict";
|
15 |
Â
/*!
|
16 |
Â
* Copyright 2019 SmugMug, Inc.
|
17 |
Â
* Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.
|
18 |
Â
* @license
|
19 |
+
*/var p=o(8),n=o(11);function g(t,e){var o;return!1!==t.fullWidthBreakoutRowCadence&&(e._rows.length+1)%t.fullWidthBreakoutRowCadence==0&&(o=!0),new n({top:e._containerHeight,left:t.containerPadding.left,width:t.containerWidth-t.containerPadding.left-t.containerPadding.right,spacing:t.boxSpacing.horizontal,targetRowHeight:t.targetRowHeight,targetRowHeightTolerance:t.targetRowHeightTolerance,edgeCaseMinRowHeight:.5*t.targetRowHeight,edgeCaseMaxRowHeight:2*t.targetRowHeight,rightToLeft:!1,isBreakoutRow:o,widowLayoutStyle:t.widowLayoutStyle})}function y(t,e,o){return e._rows.push(o),e._layoutItems=e._layoutItems.concat(o.getItems()),e._containerHeight+=o.height+t.boxSpacing.vertical,o.items}t.exports=function(t,e){var o,n,i,r,a,c,s,u={},l={},f={containerWidth:1060,containerPadding:10,boxSpacing:10,targetRowHeight:320,targetRowHeightTolerance:.25,maxNumRows:Number.POSITIVE_INFINITY,forceAspectRatio:!1,showWidows:!0,fullWidthBreakoutRowCadence:!1,widowLayoutStyle:"left"},h={},d={},u=p(f,e=e||{});return h.top=isNaN(parseFloat(u.containerPadding.top))?u.containerPadding:u.containerPadding.top,h.right=isNaN(parseFloat(u.containerPadding.right))?u.containerPadding:u.containerPadding.right,h.bottom=isNaN(parseFloat(u.containerPadding.bottom))?u.containerPadding:u.containerPadding.bottom,h.left=isNaN(parseFloat(u.containerPadding.left))?u.containerPadding:u.containerPadding.left,d.horizontal=isNaN(parseFloat(u.boxSpacing.horizontal))?u.boxSpacing:u.boxSpacing.horizontal,d.vertical=isNaN(parseFloat(u.boxSpacing.vertical))?u.boxSpacing:u.boxSpacing.vertical,u.containerPadding=h,u.boxSpacing=d,l._layoutItems=[],l._awakeItems=[],l._inViewportItems=[],l._leadingOrphans=[],l._trailingOrphans=[],l._containerHeight=u.containerPadding.top,l._rows=[],l._orphans=[],u._widowCount=0,o=u,n=l,i=t.map(function(t){return t.width&&t.height?{aspectRatio:t.width/t.height}:{aspectRatio:t}}),s=[],o.forceAspectRatio&&i.forEach(function(t){t.forcedAspectRatio=!0,t.aspectRatio=o.forceAspectRatio}),i.some(function(t,e){if(isNaN(t.aspectRatio))throw new Error("Item "+e+" has an invalid aspect ratio");if(a=a||g(o,n),r=a.addItem(t),a.isLayoutComplete()){if(s=s.concat(y(o,n,a)),n._rows.length>=o.maxNumRows)return!(a=null);if(a=g(o,n),!r&&(r=a.addItem(t),a.isLayoutComplete())){if(s=s.concat(y(o,n,a)),n._rows.length>=o.maxNumRows)return!(a=null);a=g(o,n)}}}),a&&a.getItems().length&&o.showWidows&&(n._rows.length?(c=n._rows[n._rows.length-1].isBreakoutRow?n._rows[n._rows.length-1].targetRowHeight:n._rows[n._rows.length-1].height,a.forceComplete(!1,c)):a.forceComplete(!1),s=s.concat(y(o,n,a)),o._widowCount=a.getItems().length),n._containerHeight=n._containerHeight-o.boxSpacing.vertical,n._containerHeight=n._containerHeight+o.containerPadding.bottom,{containerHeight:n._containerHeight,widowCount:o._widowCount,boxes:n._layoutItems}}},function(t,e,o){
|
20 |
Â
/*!
|
21 |
Â
* Copyright 2019 SmugMug, Inc.
|
22 |
Â
* Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.
|
23 |
Â
* @license
|
24 |
Â
*/
|
25 |
+
var s=o(8);(t.exports=function(t){this.top=t.top,this.left=t.left,this.width=t.width,this.spacing=t.spacing,this.targetRowHeight=t.targetRowHeight,this.targetRowHeightTolerance=t.targetRowHeightTolerance,this.minAspectRatio=this.width/t.targetRowHeight*(1-t.targetRowHeightTolerance),this.maxAspectRatio=this.width/t.targetRowHeight*(1+t.targetRowHeightTolerance),this.edgeCaseMinRowHeight=t.edgeCaseMinRowHeight,this.edgeCaseMaxRowHeight=t.edgeCaseMaxRowHeight,this.widowLayoutStyle=t.widowLayoutStyle,this.isBreakoutRow=t.isBreakoutRow,this.items=[],this.height=0}).prototype={addItem:function(t){var e,o,n,i=this.items.concat(t),r=this.width-(i.length-1)*this.spacing,a=i.reduce(function(t,e){return t+e.aspectRatio},0),c=r/this.targetRowHeight;return this.isBreakoutRow&&0===this.items.length&&1<=t.aspectRatio?(this.items.push(t),this.completeLayout(r/t.aspectRatio,"justify"),!0):a<this.minAspectRatio?(this.items.push(s(t)),!0):!(a>this.maxAspectRatio)||0===this.items.length?(this.items.push(s(t)),this.completeLayout(r/a,"justify"),!0):(e=this.width-(this.items.length-1)*this.spacing,o=this.items.reduce(function(t,e){return t+e.aspectRatio},0),n=e/this.targetRowHeight,Math.abs(a-c)>Math.abs(o-n)?(this.completeLayout(e/o,"justify"),!1):(this.items.push(s(t)),this.completeLayout(r/a,"justify"),!0))},isLayoutComplete:function(){return 0<this.height},completeLayout:function(t,e){var o,n,i,r,a,c=this.left,s=this.width-(this.items.length-1)*this.spacing;(void 0===e||["justify","center","left"].indexOf(e)<0)&&(e="left"),n=Math.max(this.edgeCaseMinRowHeight,Math.min(t,this.edgeCaseMaxRowHeight)),o=t!==n?s/(this.height=n)/(s/t):(this.height=t,1),this.items.forEach(function(t){t.top=this.top,t.width=t.aspectRatio*this.height*o,t.height=this.height,t.left=c,c+=t.width+this.spacing},this),"justify"===e?(c-=this.spacing+this.left,i=(c-this.width)/this.items.length,r=this.items.map(function(t,e){return Math.round((e+1)*i)}),1===this.items.length?this.items[0].width-=Math.round(i):this.items.forEach(function(t,e){0<e?(t.left-=r[e-1],t.width-=r[e]-r[e-1]):t.width-=r[e]})):"center"===e&&(a=(this.width-c)/2,this.items.forEach(function(t){t.left+=a+this.spacing},this))},forceComplete:function(t,e){"number"==typeof e?this.completeLayout(e,this.widowLayoutStyle):this.completeLayout(this.targetRowHeight,this.widowLayoutStyle)},getItems:function(){return this.items}}}]);
|
26 |
Â
//# sourceMappingURL=fjGallery.min.js.map
|
assets/vendor/flickr-justified-gallery/dist/fjGallery.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["fjGallery.js"],"names":["modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__webpack_exports__","lite_ready__WEBPACK_IMPORTED_MODULE_0__","lite_ready__WEBPACK_IMPORTED_MODULE_0___default","global__WEBPACK_IMPORTED_MODULE_1__","_fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__","_typeof","obj","iterator","constructor","oldInit","oldDestroy","jQueryPlugin","oldJqPlugin","oldPlugin","fjGallery","noConflict","this","init","jQcontainer","$container","data","destroy","removeData","args","arguments","Array","unshift","res","apply","fn","document","querySelectorAll","callback","readyState","attachEvent","addEventListener","global","win","window","self","g","Function","e","throttle_debounce__WEBPACK_IMPORTED_MODULE_0__","merge__WEBPACK_IMPORTED_MODULE_1__","merge__WEBPACK_IMPORTED_MODULE_1___default","lite_ready__WEBPACK_IMPORTED_MODULE_2__","lite_ready__WEBPACK_IMPORTED_MODULE_2___default","justified_layout__WEBPACK_IMPORTED_MODULE_3__","justified_layout__WEBPACK_IMPORTED_MODULE_3___default","global__WEBPACK_IMPORTED_MODULE_4__","_defineProperties","target","props","length","descriptor","configurable","writable","fjGalleryList","updateFjGallery","requestAnimationFrame","forEach","item","resize","plugin","items","HTMLElement","nodeType","nodeName","ret","options","slice","len","k","instanceID","container","userOptions","instance","Constructor","TypeError","_classCallCheck","images","defaults","itemSelector","imageSelector","gutter","rowHeight","rowHeightTolerance","resizeThrottle","isRtl","css","onInit","onDestroy","onAppendImages","onBeforeJustify","onJustify","dataOptions","dataset","pureDataOptions","keys","loweCaseOption","substr","toLowerCase","pureOptions","protoProps","staticProps","el","styles","getComputedStyle","getPropertyValue","transform","style","push","splice","appendImages","addToFjGalleryList","$images","jQuery","$item","$image","fjGalleryImage","querySelector","width","parseFloat","getAttribute","height","loadSizes","img","cb","interval","hasSize","addedListeners","removeListeners","itemData","onHasSize","naturalWidth","naturalHeight","clearInterval","onLoaded","onError","checkSize","dimensions","removeEventListener","setInterval","justify","justifyArray","justifiedData","containerWidth","getBoundingClientRect","containerPadding","top","right","bottom","left","boxSpacing","targetRowHeight","targetRowHeightTolerance","concat","containerHeight","position","boxes","removeFromFjGalleryList","val","throttle","delay","noTrailing","debounceMode","timeoutID","cancelled","lastExec","clearExistingTimeout","clearTimeout","wrapper","_len","arguments_","_key","elapsed","Date","now","exec","undefined","setTimeout","cancel","debounce","atBegin","merge","clone","recursive","argv","result","size","typeOf","index","sitem","Public","merge_recursive","base","extend","input","toString","isNode","output","type","webpackPolyfill","deprecate","paths","children","Row","createNewRow","layoutConfig","layoutData","isBreakoutRow","fullWidthBreakoutRowCadence","_rows","_containerHeight","spacing","horizontal","edgeCaseMinRowHeight","edgeCaseMaxRowHeight","rightToLeft","widowLayoutStyle","addRow","row","_layoutItems","getItems","vertical","config","itemLayoutData","itemAdded","currentRow","nextToLastRowHeight","laidOutItems","maxNumRows","Number","POSITIVE_INFINITY","forceAspectRatio","showWidows","isNaN","_awakeItems","_inViewportItems","_leadingOrphans","_trailingOrphans","_orphans","_widowCount","map","aspectRatio","forcedAspectRatio","some","Error","addItem","isLayoutComplete","forceComplete","widowCount","params","minAspectRatio","maxAspectRatio","previousRowWidthWithoutSpacing","previousAspectRatio","previousTargetAspectRatio","newItems","rowWidthWithoutSpacing","newAspectRatio","reduce","sum","targetAspectRatio","completeLayout","Math","abs","newHeight","clampedToNativeRatio","clampedHeight","errorWidthPerItem","roundedCumulativeErrors","centerOffset","itemWidthSum","indexOf","max","min","round","fitToWidth"],"mappings":";;;;;IAAA,SAAAA,GAEA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAJ,EAAAG,GAAAK,KAAAH,EAAAD,QAAAC,EAAAA,EAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAT,EAGAC,EAAAS,EAAA,SAAAP,EAAAQ,EAAAC,GACAX,EAAAY,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,EAAA,CAAAK,YAAA,EAAAC,IAAAL,KAKAX,EAAAiB,EAAA,SAAAf,GACA,oBAAAgB,QAAAA,OAAAC,aACAN,OAAAC,eAAAZ,EAAAgB,OAAAC,YAAA,CAAAC,MAAA,WAEAP,OAAAC,eAAAZ,EAAA,aAAA,CAAAkB,OAAA,KAQApB,EAAAqB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAApB,EAAAoB,IACA,EAAAE,EAAA,OAAAF,EACA,GAAA,EAAAE,GAAA,iBAAAF,GAAAA,GAAAA,EAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFAzB,EAAAiB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,UAAA,CAAAT,YAAA,EAAAK,MAAAA,IACA,EAAAE,GAAA,iBAAAF,EAAA,IAAA,IAAAM,KAAAN,EAAApB,EAAAS,EAAAe,EAAAE,EAAA,SAAAA,GAAA,OAAAN,EAAAM,IAAAC,KAAA,KAAAD,IACA,OAAAF,GAIAxB,EAAA4B,EAAA,SAAAzB,GACA,IAAAQ,EAAAR,GAAAA,EAAAoB,WACA,WAAA,OAAApB,EAAA,SACA,WAAA,OAAAA,GAEA,OADAH,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAiB,EAAAC,GAAA,OAAAjB,OAAAkB,UAAAC,eAAA1B,KAAAuB,EAAAC,IAGA9B,EAAAiC,EAAA,GAIAjC,EAAAA,EAAAkC,EAAA,GAnFA,CAsFA,CAEA,SAAA/B,EAAAD,EAAAF,GAEAG,EAAAD,QAAAF,EAAA,IAKA,SAAAG,EAAAgC,EAAAnC,gBAGAA,EAAAiB,EAAAkB,GACA,IAAAC,EAAApC,EAAA,GACAqC,EAAArC,EAAA4B,EAAAQ,GACAE,EAAAtC,EAAA,GAEAuC,EAAAvC,EAAA,GACA,SAAAwC,EAAAC,GAAA,OAAAD,EAAA,mBAAAtB,QAAA,iBAAAA,OAAAwB,SAAA,SAAAD,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAvB,QAAAuB,EAAAE,cAAAzB,QAAAuB,IAAAvB,OAAAa,UAAA,gBAAAU,IAAAA,GAMA,IAWAG,EAYAC,EAYAC,EASAC,EA5CAC,EAAAV,EAAA,OAAAW,UACAX,EAAA,OAAAW,UAAAV,EAAA,QAEAD,EAAA,OAAAW,UAAAC,WAAA,WAEA,OADAZ,EAAA,OAAAW,UAAAD,EACAG,WAIA,IAAAb,EAAA,SAEAM,EAAAN,EAAA,OAAAW,UAAAN,YAAAZ,UAAAqB,KAEAd,EAAA,OAAAW,UAAAN,YAAAZ,UAAAqB,KAAA,WACAD,KAAAE,YAAAxC,OAAAyB,EAAA,OAAAzB,CAAAsC,KAAAG,YACAH,KAAAE,YAAAE,KAAA,YAAAJ,MAEAP,GACAA,EAAAtC,KAAA6C,OAKAN,EAAAP,EAAA,OAAAW,UAAAN,YAAAZ,UAAAyB,QAEAlB,EAAA,OAAAW,UAAAN,YAAAZ,UAAAyB,QAAA,WACAL,KAAAE,aACAF,KAAAE,YAAAI,WAAA,aAGAZ,GACAA,EAAAvC,KAAA6C,QAIAL,EAAA,WACA,IAAAY,EAAAC,WAAA,GACAC,MAAA7B,UAAA8B,QAAAvD,KAAAoD,EAAAP,MACA,IAAAW,EAAAvB,EAAA,QAAAwB,MAAAzB,EAAA,OAAAoB,GACA,MAAA,WAAAlB,EAAAsB,GAAAA,EAAAX,OAGAR,YAAAJ,EAAA,QAAAI,YAEAI,EAAAT,EAAA,OAAA0B,GAAAf,UACAX,EAAA,OAAA0B,GAAAf,UAAAH,EAEAR,EAAA,OAAA0B,GAAAf,UAAAC,WAAA,WAEA,OADAZ,EAAA,OAAA0B,GAAAf,UAAAF,EACAI,OAKAd,GAAAA,CAAA,WACAxB,OAAA0B,EAAA,QAAA1B,CAAAoD,SAAAC,iBAAA,mBAKA,SAAA/D,EAAAD,GAEAC,EAAAD,QAAA,SAAAiE,GACA,aAAAF,SAAAG,YAAA,gBAAAH,SAAAG,WAEAD,EAAA7D,OACA2D,SAAAI,YAEAJ,SAAAI,YAAA,qBAAA,WACA,gBAAAJ,SAAAG,YAAAD,EAAA7D,SAEA2D,SAAAK,kBAEAL,SAAAK,iBAAA,mBAAAH,KAMA,SAAAhE,EAAAD,EAAAF,IAEA,SAAAuE,GAAA,IAGAC,EADA,oBAAAC,OACAA,YACA,IAAAF,EACAA,EACA,oBAAAG,KACAA,KAEA,GAGAvE,EAAAD,QAAAsE,IACAlE,KAAA6C,KAAAnD,EAAA,KAIA,SAAAG,EAAAD,GAEA,SAAAsC,EAAAC,GAAA,OAAAD,EAAA,mBAAAtB,QAAA,iBAAAA,OAAAwB,SAAA,SAAAD,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAvB,QAAAuB,EAAAE,cAAAzB,QAAAuB,IAAAvB,OAAAa,UAAA,gBAAAU,IAAAA,GAEA,IAEAkC,EAAA,WACA,OAAAxB,KADA,GAIA,IAEAwB,EAAAA,GAAA,IAAAC,SAAA,cAAA,GACA,MAAAC,GAEA,YAAA,oBAAAJ,OAAA,YAAAjC,EAAAiC,WAAAE,EAAAF,QAMAtE,EAAAD,QAAAyE,GAIA,SAAAxE,EAAAgC,EAAAnC,gBAGAA,EAAAiB,EAAAkB,GACA,IAAA2C,EAAA9E,EAAA,GACA+E,EAAA/E,EAAA,GACAgF,EAAAhF,EAAA4B,EAAAmD,GACAE,EAAAjF,EAAA,GACAkF,EAAAlF,EAAA4B,EAAAqD,GACAE,EAAAnF,EAAA,GACAoF,EAAApF,EAAA4B,EAAAuD,GACAE,EAAArF,EAAA,GAEA,SAAAwC,EAAAC,GAAA,OAAAD,EAAA,mBAAAtB,QAAA,iBAAAA,OAAAwB,SAAA,SAAAD,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAvB,QAAAuB,EAAAE,cAAAzB,QAAAuB,IAAAvB,OAAAa,UAAA,gBAAAU,IAAAA,GAIA,SAAA6C,EAAAC,EAAAC,GAAA,IAAA,IAAApF,EAAA,EAAAA,EAAAoF,EAAAC,OAAArF,IAAA,CAAA,IAAAsF,EAAAF,EAAApF,GAAAsF,EAAA3E,WAAA2E,EAAA3E,aAAA,EAAA2E,EAAAC,cAAA,EAAA,UAAAD,IAAAA,EAAAE,UAAA,GAAA/E,OAAAC,eAAAyE,EAAAG,EAAAhE,IAAAgE,IAWA,IAAAG,EAAA,GAEA,SAAAC,IACAT,EAAA,OAAAU,sBAAA,WACAF,EAAAG,QAAA,SAAAC,GACAA,EAAAC,aAKAb,EAAA,OAAAf,iBAAA,SAAAwB,GACAT,EAAA,OAAAf,iBAAA,oBAAAwB,GACAT,EAAA,OAAAf,iBAAA,OAAAwB,GACAZ,GAAAA,CAAA,WACAY,MAiTA,SAAAK,EAAAC,EAAA,IAGA,YAAA,oBAAAC,YAAA,YAAA7D,EAAA6D,cAAAD,aAAAC,YAAAD,GAAA,WAAA5D,EAAA4D,IAAA,OAAAA,GAAA,IAAAA,EAAAE,UAAA,iBAAAF,EAAAG,YACAH,EAAA,CAAAA,IASA,IANA,IAIAI,EAJAC,EAPA,EAQA/C,EAAAE,MAAA7B,UAAA2E,MAAApG,KAAAqD,UAAA,GACAgD,EAAAP,EAAAX,OACAmB,EAAA,EAGAA,EAAAD,EAAAC,IAWA,GAVA,WAAApE,EAAAiE,SAAA,IAAAA,EACAL,EAAAQ,GAAA3D,YAEAmD,EAAAQ,GAAA3D,UAAA,IAAAA,EAAAmD,EAAAQ,GAAAH,IAEAL,EAAAQ,GAAA3D,YAEAuD,EAAAJ,EAAAQ,GAAA3D,UAAAwD,GAAA1C,MAAAqC,EAAAQ,GAAA3D,UAAAS,SAGA,IAAA8C,EACA,OAAAA,EAIA,OAAAJ,EAhRA,IAAAS,EAAA,EAEA5D,EAAA,WACA,SAAAA,EAAA6D,EAAAC,IA5FA,SAAAC,EAAAC,GAAA,KAAAD,aAAAC,GAAA,MAAA,IAAAC,UAAA,qCA6FAC,CAAAhE,KAAAF,GAEA,IAAAyB,EAAAvB,KACAuB,EAAAmC,WAAAA,IACAnC,EAAApB,WAAAwD,EACApC,EAAA0C,OAAA,GACA1C,EAAA2C,SAAA,CACAC,aAAA,mBACAC,cAAA,MACAC,OAAA,GAEAC,UAAA,IACAC,mBAAA,IAEAC,eAAA,IACAC,MAAA,QAAAlD,EAAAmD,IAAAnD,EAAApB,WAAA,aAEAwE,OAAA,KAEAC,UAAA,KAEAC,eAAA,KAEAC,gBAAA,KAEAC,UAAA,MAIA,IAAAC,EAAAzD,EAAApB,WAAA8E,SAAA,GACAC,EAAA,GACAxH,OAAAyH,KAAAH,GAAAnC,QAAA,SAAAtE,GACA,IAAA6G,EAAA7G,EAAA8G,OAAA,EAAA,GAAAC,cAAA/G,EAAA8G,OAAA,GAEAD,QAAA,IAAA7D,EAAA2C,SAAAkB,KACAF,EAAAE,GAAAJ,EAAAzG,MAGAgD,EAAA+B,QAAAzB,GAAAA,CAAA,GAAAN,EAAA2C,SAAAgB,EAAAtB,GACArC,EAAAgE,YAAA1D,GAAAA,CAAA,GAAAN,EAAA+B,SAEA/B,EAAAwB,OAAArF,OAAAiE,EAAA,SAAAjE,CAAA6D,EAAA+B,QAAAkB,eAAAjD,EAAAwB,QACAxB,EAAAtB,OAnIA,IAAA6D,EAAA0B,EAAAC,EAoUA,OApUA3B,EAuIAhE,GAvIA0F,EAuIA,CAAA,CACAjH,IAAA,MACAN,MAAA,SAAAyH,EAAAC,GACA,MAAA,iBAAAA,EACAzD,EAAA,OAAA0D,iBAAAF,GAAAG,iBAAAF,IAIAA,EAAAG,YACAH,EAAA,qBAAAA,EAAAG,WAGApI,OAAAyH,KAAAQ,GAAA9C,QAAA,SAAAtE,GACAmH,EAAAK,MAAAxH,GAAAoH,EAAApH,KAEAmH,KAGA,CACAnH,IAAA,qBACAN,MAAA,WACAyE,EAAAsD,KAAAhG,MACA2C,MAGA,CACApE,IAAA,0BACAN,MAAA,WACA,IAAAsD,EAAAvB,KACA0C,EAAAG,QAAA,SAAAC,EAAAvE,GACAuE,EAAAY,aAAAnC,EAAAmC,YACAhB,EAAAuD,OAAA1H,EAAA,OAIA,CACAA,IAAA,OACAN,MAAA,WACA,IAAAsD,EAAAvB,KACAuB,EAAA2E,aAAA3E,EAAApB,WAAAY,iBAAAQ,EAAA+B,QAAAa,eACA5C,EAAA4E,qBAEA5E,EAAA+B,QAAAqB,QACApD,EAAA+B,QAAAqB,OAAAxH,KAAAoE,KAIA,CACAhD,IAAA,eACAN,MAAA,SAAAmI,GACA,IAAA7E,EAAAvB,KAEAkC,EAAA,OAAAmE,QAAAD,aAAAlE,EAAA,OAAAmE,SACAD,EAAAA,EAAAvI,OAGAuI,GAAAA,EAAA9D,SAIA8D,EAAAvD,QAAA,SAAAyD,GAGA,IACAC,EAIAnG,GALAkG,GAAAA,EAAAE,iBAAAF,EAAAG,gBACAF,EAAAD,EAAAG,cAAAlF,EAAA+B,QAAAc,kBAGAkC,EAAAE,eAAAjF,GACAnB,EAAA,CACAkG,MAAAA,EACAC,OAAAA,EACAG,MAAAC,WAAAJ,EAAAK,aAAA,YAAA,EACAC,OAAAF,WAAAJ,EAAAK,aAAA,aAAA,EACAE,UAAA,WACA,IAtLAC,EAAAC,EACAC,EACAC,EACAC,EAyCAC,EA0IAC,EAAArH,KAjLA,SAAAsH,IACAJ,EACAF,EAAAE,IAIAA,EAAA,CACAR,MAAAK,EAAAQ,aACAV,OAAAE,EAAAS,eAEAR,EAAAE,GACAO,cAAAR,GAEAE,GAEAC,KAIA,SAAAM,IACAJ,IAGA,SAAAK,IACAL,IAGA,SAAAM,IACA,EAAAb,EAAAQ,cACAD,IAlCAP,EAuLAR,EApLAY,EADAD,IAFAF,EAuLA,SAAAa,GACAR,EAAAX,QAAAmB,EAAAnB,OAAAW,EAAAR,SAAAgB,EAAAhB,SACAQ,EAAAX,MAAAmB,EAAAnB,MACAW,EAAAR,OAAAgB,EAAAhB,OACAtF,EAAAwB,YA/IAqE,EAAA,WACAD,GAAA,EACAJ,EAAAe,oBAAA,OAAAJ,GACAX,EAAAe,oBAAA,QAAAH,IAGAC,IAEAV,IAbAC,GAAA,EACAJ,EAAA5F,iBAAA,OAAAuG,GACAX,EAAA5F,iBAAA,QAAAwG,GAaAV,EAAAc,YAAAH,EAAA,SA0IAd,YACAvF,EAAA0C,OAAA+B,KAAA5F,MAKAmB,EAAA+B,QAAAuB,gBACAtD,EAAA+B,QAAAuB,eAAA1H,KAAAoE,EAAA,CAAA6E,IAGA7E,EAAAyG,aAGA,CACAzJ,IAAA,UACAN,MAAA,WACA,IAAAsD,EAAAvB,KACAiI,EAAA,GAEA1G,EAAA+B,QAAAwB,iBACAvD,EAAA+B,QAAAwB,gBAAA3H,KAAAoE,GAGAA,EAAA0C,OAAApB,QAAA,SAAAzC,GACAA,EAAAsG,OAAAtG,EAAAyG,QACAoB,EAAAjC,KAAA5F,EAAAsG,MAAAtG,EAAAyG,UAGA,IAAAqB,EAAAjG,GAAAA,CAAAgG,EAAA,CACAE,eAAA5G,EAAApB,WAAAiI,wBAAA1B,MACA2B,iBAAA,CACAC,IAAA3B,WAAApF,EAAAmD,IAAAnD,EAAApB,WAAA,iBAAA,EACAoI,MAAA5B,WAAApF,EAAAmD,IAAAnD,EAAApB,WAAA,mBAAA,EACAqI,OAAA7B,WAAApF,EAAAmD,IAAAnD,EAAApB,WAAA,oBAAA,EACAsI,KAAA9B,WAAApF,EAAAmD,IAAAnD,EAAApB,WAAA,kBAAA,GAEAuI,WAAAnH,EAAA+B,QAAAe,OACAsE,gBAAApH,EAAA+B,QAAAgB,UACAsE,yBAAArH,EAAA+B,QAAAiB,qBAEAhD,EAAAmD,IAAAnD,EAAApB,WAAA,CACA0G,OAAA,GAAAgC,OAAAX,EAAAY,gBAAA,QAEA,IAAA7L,EAAA,EACAsE,EAAA0C,OAAApB,QAAA,SAAAzC,GACAA,EAAAsG,OAAAtG,EAAAyG,SACAtF,EAAAmD,IAAAtE,EAAAkG,MAAA,CACAyC,SAAA,WACAjD,UAAA,cAAA+C,QAAAtH,EAAA+B,QAAAmB,OAAA,EAAA,GAAAyD,EAAAc,MAAA/L,GAAAwL,KAAA,mBAAAI,OAAAX,EAAAc,MAAA/L,GAAAqL,IAAA,qBACA5B,MAAA,GAAAmC,OAAAX,EAAAc,MAAA/L,GAAAyJ,MAAA,MACAG,OAAA,GAAAgC,OAAAX,EAAAc,MAAA/L,GAAA4J,OAAA,QAEA5J,OAIAsE,EAAA+B,QAAAyB,WACAxD,EAAA+B,QAAAyB,UAAA5H,KAAAoE,KAIA,CACAhD,IAAA,gBACAN,MAAA,SAAAqF,GACAtD,KACAsD,QAAAzB,GAAAA,CAAA,GADA7B,KACAsD,QAAAA,GADAtD,KAEAgI,YAEA,CACAzJ,IAAA,UACAN,MAAA,WACA,IAAAsD,EAAAvB,KACAuB,EAAA0H,0BAEA1H,EAAA+B,QAAAsB,WACArD,EAAA+B,QAAAsB,UAAAzH,KAAAoE,GAIAA,EAAAmD,IAAAnD,EAAApB,WAAA,CACA0G,OAAA,KAEAtF,EAAA0C,OAAApB,QAAA,SAAAzC,GACAmB,EAAAmD,IAAAtE,EAAAkG,MAAA,CACAyC,SAAA,GACAjD,UAAA,GACAY,MAAA,GACAG,OAAA,OAIAtF,EAAA0C,OAAApB,QAAA,SAAAqG,UACAA,EAAA5C,MAAAE,wBAGAjF,EAAApB,WAAAL,YAEA,CACAvB,IAAA,SACAN,MAAA,WACA+B,KACAgI,eAhUA7F,EAAA2B,EAAAlF,UAAA4G,GAAAC,GAAAtD,EAAA2B,EAAA2B,GAoUA3F,EA7OA,GAiRAkD,EAAAxD,YAAAM,EACAd,EAAA,QAAA,GAIA,SAAAhC,EAAAgC,EAAAnC,gBAwBA,SAAAsM,EAAAC,EAAAC,EAAArI,EAAAsI,GAMA,IAAAC,EACAC,GAAA,EAEAC,EAAA,EAEA,SAAAC,IACAH,GACAI,aAAAJ,GAuBA,SAAAK,IACA,IAAA,IAAAC,EAAArJ,UAAA8B,OAAAwH,EAAA,IAAArJ,MAAAoJ,GAAAE,EAAA,EAAAA,EAAAF,EAAAE,IACAD,EAAAC,GAAAvJ,UAAAuJ,GAGA,IAAAxI,EAAAvB,KACAgK,EAAAC,KAAAC,MAAAT,EAOA,SAAAU,IACAV,EAAAQ,KAAAC,MACAlJ,EAAAJ,MAAAW,EAAAuI,GAPAN,IAmBAF,IAAAC,GAKAY,IAGAT,SAEAU,IAAAd,GAAAF,EAAAY,EAKAG,KACA,IAAAd,IAYAE,EAAAc,WAAAf,EAhCA,WACAC,OAAAa,GA+BAD,OAAAC,IAAAd,EAAAF,EAAAY,EAAAZ,KAMA,MAzEA,kBAAAC,IACAC,EAAAtI,EACAA,EAAAqI,EACAA,OAAAe,GAoEAR,EAAAU,OA7EA,WACAZ,IACAF,GAAA,GA6EAI,EAoBA,SAAAW,EAAAnB,EAAAoB,EAAAxJ,GACA,YAAAoJ,IAAApJ,EAAAmI,EAAAC,EAAAoB,GAAA,GAAArB,EAAAC,EAAApI,GAAA,IAAAwJ,GA3IA3N,EAAAiB,EAAAkB,GACAnC,EAAAS,EAAA0B,EAAA,WAAA,WAAA,OAAAuL,IACA1N,EAAAS,EAAA0B,EAAA,WAAA,WAAA,OAAAmK,KAgJA,SAAAnM,EAAAD,EAAAF,IAEA,SAAAG,GAAA,SAAAqC,EAAAC,GAAA,OAAAD,EAAA,mBAAAtB,QAAA,iBAAAA,OAAAwB,SAAA,SAAAD,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAvB,QAAAuB,EAAAE,cAAAzB,QAAAuB,IAAAvB,OAAAa,UAAA,gBAAAU,IAAAA;;;;;;;;GA8FA,SAAAmL,EAAAC,EAAAC,EAAAC,GACA,IAAAC,EAAAD,EAAA,GACAE,EAAAF,EAAAtI,QACAoI,GAAA,WAAAK,EAAAF,KAAAA,EAAA,IAEA,IAAA,IAAAG,EAAA,EAAAA,EAAAF,IAAAE,EAAA,CACA,IAMAC,EANAnI,EAAA8H,EAAAI,GAEA,GAAA,WADAD,EAAAjI,GAGA,IAAA,IAAAvE,KAAAuE,EAAA,CACA,cAAAvE,IACA0M,EAAAP,EAAAQ,EAAAR,MAAA5H,EAAAvE,IAAAuE,EAAAvE,GAGAsM,EAAAtM,GADAoM,EApCA,SAAAQ,EAAAC,EAAAC,GACA,GAAA,WAAAN,EAAAK,GAAA,OAAAC,EAEA,IAAA,IAAA9M,KAAA8M,EACA,WAAAN,EAAAK,EAAA7M,KAAA,WAAAwM,EAAAM,EAAA9M,IACA6M,EAAA7M,GAAA4M,EAAAC,EAAA7M,GAAA8M,EAAA9M,IAEA6M,EAAA7M,GAAA8M,EAAA9M,GAIA,OAAA6M,EA0BAD,CAAAN,EAAAtM,GAAA0M,GAEAA,IAKA,OAAAJ,EAWA,SAAAE,EAAAO,GACA,MAAA,GAAAC,SAAApO,KAAAmO,GAAA/H,MAAA,GAAA,GAAA+B,cApHA,IAAAkG,EAOAN,EAPAM,EA4HA,WAAAnM,EAAArC,IAAAA,GAAA,WAAAqC,EAAArC,EAAAD,UAAAC,EAAAD,SArHAmO,EAAA,SAAAR,GACA,OAAAD,GAAA,IAAAC,GAAA,EAAAlK,aAWAmK,UAAA,SAAAD,GACA,OAAAD,GAAA,IAAAC,GAAA,EAAAlK,YASA0K,EAAAR,MAAA,SAAAY,GACA,IAEAN,EACAF,EAHAW,EAAAH,EACAI,EAAAX,EAAAO,GAIA,GAAA,UAAAI,EAIA,IAHAD,EAAA,GACAX,EAAAQ,EAAAhJ,OAEA0I,EAAA,EAAAA,EAAAF,IAAAE,EACAS,EAAAT,GAAAE,EAAAR,MAAAY,EAAAN,SAEA,GAAA,WAAAU,EAGA,IAAAV,KAFAS,EAAA,GAEAH,EACAG,EAAAT,GAAAE,EAAAR,MAAAY,EAAAN,IAIA,OAAAS,GAqEAD,EACAxO,EAAAD,QAAAmO,EAEA5J,OAAA,MAAA4J,IAGA/N,KAAA6C,KAAAnD,EAAA,EAAAA,CAAAG,KAIA,SAAAA,EAAAD,GAEAC,EAAAD,QAAA,SAAAC,GAsBA,OArBAA,EAAA2O,kBACA3O,EAAA4O,UAAA,aAEA5O,EAAA6O,MAAA,GAEA7O,EAAA8O,WAAA9O,EAAA8O,SAAA,IACApO,OAAAC,eAAAX,EAAA,SAAA,CACAY,YAAA,EACAC,IAAA,WACA,OAAAb,EAAAE,KAGAQ,OAAAC,eAAAX,EAAA,KAAA,CACAY,YAAA,EACAC,IAAA,WACA,OAAAb,EAAAC,KAGAD,EAAA2O,gBAAA,GAGA3O,IAKA,SAAAA,EAAAD,EAAAF;;;;;GAUA,IAAA4N,EAAA5N,EAAA,GACAkP,EAAAlP,EAAA,IAWA,SAAAmP,EAAAC,EAAAC,GACA,IAAAC,EAQA,OANA,IAAAF,EAAAG,8BACAF,EAAAG,MAAA/J,OAAA,GAAA2J,EAAAG,6BAAA,IACAD,GAAA,GAIA,IAAAJ,EAAA,CACAzD,IAAA4D,EAAAI,iBACA7D,KAAAwD,EAAA5D,iBAAAI,KACA/B,MAAAuF,EAAA9D,eAAA8D,EAAA5D,iBAAAI,KAAAwD,EAAA5D,iBAAAE,MACAgE,QAAAN,EAAAvD,WAAA8D,WACA7D,gBAAAsD,EAAAtD,gBACAC,yBAAAqD,EAAArD,yBACA6D,qBAAA,GAAAR,EAAAtD,gBACA+D,qBAAA,EAAAT,EAAAtD,gBACAgE,aAAA,EACAR,cAAAA,EACAS,iBAAAX,EAAAW,mBAeA,SAAAC,EAAAZ,EAAAC,EAAAY,GAMA,OALAZ,EAAAG,MAAArG,KAAA8G,GAEAZ,EAAAa,aAAAb,EAAAa,aAAAlE,OAAAiE,EAAAE,YAEAd,EAAAI,kBAAAQ,EAAAjG,OAAAoF,EAAAvD,WAAAuE,SACAH,EAAA7J,MAgHAjG,EAAAD,QAAA,SAAAuO,EAAA4B,GACA,IAnGAjB,EAAAC,EAAAiB,EAEAC,EACAC,EACAC,EAHAC,EAkGAtB,EAAA,GACAC,EAAA,GAEAhI,EAAA,CACAiE,eAAA,KACAE,iBAAA,GACAK,WAAA,GACAC,gBAAA,IACAC,yBAAA,IACA4E,WAAAC,OAAAC,kBACAC,kBAAA,EACAC,YAAA,EACAxB,6BAAA,EACAQ,iBAAA,QAEAvE,EAAA,GACAK,EAAA,GAGAuD,EAAAxB,EAAAvG,EAFAgJ,EAAAA,GAAA,IAuBA,OAnBA7E,EAAAC,IAAAuF,MAAAlH,WAAAsF,EAAA5D,iBAAAC,MAAA2D,EAAA5D,iBAAA4D,EAAA5D,iBAAAC,IACAD,EAAAE,MAAAsF,MAAAlH,WAAAsF,EAAA5D,iBAAAE,QAAA0D,EAAA5D,iBAAA4D,EAAA5D,iBAAAE,MACAF,EAAAG,OAAAqF,MAAAlH,WAAAsF,EAAA5D,iBAAAG,SAAAyD,EAAA5D,iBAAA4D,EAAA5D,iBAAAG,OACAH,EAAAI,KAAAoF,MAAAlH,WAAAsF,EAAA5D,iBAAAI,OAAAwD,EAAA5D,iBAAA4D,EAAA5D,iBAAAI,KACAC,EAAA8D,WAAAqB,MAAAlH,WAAAsF,EAAAvD,WAAA8D,aAAAP,EAAAvD,WAAAuD,EAAAvD,WAAA8D,WACA9D,EAAAuE,SAAAY,MAAAlH,WAAAsF,EAAAvD,WAAAuE,WAAAhB,EAAAvD,WAAAuD,EAAAvD,WAAAuE,SACAhB,EAAA5D,iBAAAA,EACA4D,EAAAvD,WAAAA,EAEAwD,EAAAa,aAAA,GACAb,EAAA4B,YAAA,GACA5B,EAAA6B,iBAAA,GACA7B,EAAA8B,gBAAA,GACA9B,EAAA+B,iBAAA,GACA/B,EAAAI,iBAAAL,EAAA5D,iBAAAC,IACA4D,EAAAG,MAAA,GACAH,EAAAgC,SAAA,GACAjC,EAAAkC,YAAA,EAzIAlC,EA2IAA,EA3IAC,EA2IAA,EA3IAiB,EA2IA7B,EAAA8C,IAAA,SAAAtL,GACA,OAAAA,EAAA4D,OAAA5D,EAAA+D,OACA,CACAwH,YAAAvL,EAAA4D,MAAA5D,EAAA+D,QAGA,CACAwH,YAAAvL,KAjJAyK,EAAA,GAKAtB,EAAA0B,kBACAR,EAAAtK,QAAA,SAAAwE,GACAA,EAAAiH,mBAAA,EACAjH,EAAAgH,YAAApC,EAAA0B,mBAKAR,EAAAoB,KAAA,SAAAlH,EAAApK,GACA,GAAA4Q,MAAAxG,EAAAgH,aACA,MAAA,IAAAG,MAAA,QAAAvR,EAAA,gCAWA,GANAoQ,EADAA,GACArB,EAAAC,EAAAC,GAIAkB,EAAAC,EAAAoB,QAAApH,GAEAgG,EAAAqB,mBAAA,CAIA,GAFAnB,EAAAA,EAAA1E,OAAAgE,EAAAZ,EAAAC,EAAAmB,IAEAnB,EAAAG,MAAA/J,QAAA2J,EAAAuB,WAEA,QADAH,EAAA,MAMA,GAFAA,EAAArB,EAAAC,EAAAC,IAEAkB,IACAA,EAAAC,EAAAoB,QAAApH,GAEAgG,EAAAqB,oBAAA,CAIA,GAFAnB,EAAAA,EAAA1E,OAAAgE,EAAAZ,EAAAC,EAAAmB,IAEAnB,EAAAG,MAAA/J,QAAA2J,EAAAuB,WAEA,QADAH,EAAA,MAIAA,EAAArB,EAAAC,EAAAC,OAOAmB,GAAAA,EAAAL,WAAA1K,QAAA2J,EAAA2B,aAEA1B,EAAAG,MAAA/J,QAGAgL,EADApB,EAAAG,MAAAH,EAAAG,MAAA/J,OAAA,GAAA6J,cACAD,EAAAG,MAAAH,EAAAG,MAAA/J,OAAA,GAAAqG,gBAEAuD,EAAAG,MAAAH,EAAAG,MAAA/J,OAAA,GAAAuE,OAGAwG,EAAAsB,eAAA,EAAArB,IAGAD,EAAAsB,eAAA,GAGApB,EAAAA,EAAA1E,OAAAgE,EAAAZ,EAAAC,EAAAmB,IACApB,EAAAkC,YAAAd,EAAAL,WAAA1K,QAKA4J,EAAAI,iBAAAJ,EAAAI,iBAAAL,EAAAvD,WAAAuE,SAEAf,EAAAI,iBAAAJ,EAAAI,iBAAAL,EAAA5D,iBAAAG,OACA,CACAM,gBAAAoD,EAAAI,iBACAsC,WAAA3C,EAAAkC,YACAnF,MAAAkD,EAAAa,gBAqEA,SAAA/P,EAAAD,EAAAF;;;;;;AAOA,IAAA4N,EAAA5N,EAAA,IAsBAG,EAAAD,QAAA,SAAA8R,GAEA7O,KAAAsI,IAAAuG,EAAAvG,IAEAtI,KAAAyI,KAAAoG,EAAApG,KAEAzI,KAAA0G,MAAAmI,EAAAnI,MAEA1G,KAAAuM,QAAAsC,EAAAtC,QAEAvM,KAAA2I,gBAAAkG,EAAAlG,gBACA3I,KAAA4I,yBAAAiG,EAAAjG,yBACA5I,KAAA8O,eAAA9O,KAAA0G,MAAAmI,EAAAlG,iBAAA,EAAAkG,EAAAjG,0BACA5I,KAAA+O,eAAA/O,KAAA0G,MAAAmI,EAAAlG,iBAAA,EAAAkG,EAAAjG,0BAEA5I,KAAAyM,qBAAAoC,EAAApC,qBACAzM,KAAA0M,qBAAAmC,EAAAnC,qBAEA1M,KAAA4M,iBAAAiC,EAAAjC,iBAEA5M,KAAAmM,cAAA0C,EAAA1C,cAEAnM,KAAAiD,MAAA,GAEAjD,KAAA6G,OAAA,IAGAjI,UAAA,CAqBA6P,QAAA,SAAApH,GACA,IAOA2H,EACAC,EACAC,EATAC,EAAAnP,KAAAiD,MAAA4F,OAAAxB,GAEA+H,EAAApP,KAAA0G,OAAAyI,EAAA7M,OAAA,GAAAtC,KAAAuM,QACA8C,EAAAF,EAAAG,OAAA,SAAAC,EAAAzM,GACA,OAAAyM,EAAAzM,EAAAuL,aACA,GACAmB,EAAAJ,EAAApP,KAAA2I,gBAKA,OAAA3I,KAAAmM,eAEA,IAAAnM,KAAAiD,MAAAX,QAEA,GAAA+E,EAAAgH,aAEArO,KAAAiD,MAAA+C,KAAAqB,GACArH,KAAAyP,eAAAL,EAAA/H,EAAAgH,YAAA,YACA,GAKAgB,EAAArP,KAAA8O,gBAGA9O,KAAAiD,MAAA+C,KAAAyE,EAAApD,KACA,KACAgI,EAAArP,KAAA+O,iBAIA,IAAA/O,KAAAiD,MAAAX,QA6BAtC,KAAAiD,MAAA+C,KAAAyE,EAAApD,IACArH,KAAAyP,eAAAL,EAAAC,EAAA,YACA,IAtBAL,EAAAhP,KAAA0G,OAAA1G,KAAAiD,MAAAX,OAAA,GAAAtC,KAAAuM,QACA0C,EAAAjP,KAAAiD,MAAAqM,OAAA,SAAAC,EAAAzM,GACA,OAAAyM,EAAAzM,EAAAuL,aACA,GACAa,EAAAF,EAAAhP,KAAA2I,gBAEA+G,KAAAC,IAAAN,EAAAG,GAAAE,KAAAC,IAAAV,EAAAC,IAEAlP,KAAAyP,eAAAT,EAAAC,EAAA,YACA,IAIAjP,KAAAiD,MAAA+C,KAAAyE,EAAApD,IACArH,KAAAyP,eAAAL,EAAAC,EAAA,YACA,KAiBAX,iBAAA,WACA,OAAA,EAAA1O,KAAA6G,QAWA4I,eAAA,SAAAG,EAAAhD,GACA,IAEAiD,EACAC,EACAC,EACAC,EAEAC,EAPAC,EAAAlQ,KAAAyI,KACA2G,EAAApP,KAAA0G,OAAA1G,KAAAiD,MAAAX,OAAA,GAAAtC,KAAAuM,cAQA,IAAAK,GAAA,CAAA,UAAA,SAAA,QAAAuD,QAAAvD,GAAA,KACAA,EAAA,QAIAkD,EAAAJ,KAAAU,IAAApQ,KAAAyM,qBAAAiD,KAAAW,IAAAT,EAAA5P,KAAA0M,uBAOAmD,EALAD,IAAAE,EAKAV,GADApP,KAAA6G,OAAAiJ,IACAV,EAAAQ,IAGA5P,KAAA6G,OAAA+I,EACA,GAIA5P,KAAAiD,MAAAJ,QAAA,SAAAC,GACAA,EAAAwF,IAAAtI,KAAAsI,IACAxF,EAAA4D,MAAA5D,EAAAuL,YAAArO,KAAA6G,OAAAgJ,EACA/M,EAAA+D,OAAA7G,KAAA6G,OAIA/D,EAAA2F,KAAAyH,EAEAA,GAAApN,EAAA4D,MAAA1G,KAAAuM,SACAvM,MAGA,YAAA4M,GACAsD,GAAAlQ,KAAAuM,QAAAvM,KAAAyI,KACAsH,GAAAG,EAAAlQ,KAAA0G,OAAA1G,KAAAiD,MAAAX,OACA0N,EAAAhQ,KAAAiD,MAAAmL,IAAA,SAAAtL,EAAA7F,GACA,OAAAyS,KAAAY,OAAArT,EAAA,GAAA8S,KAGA,IAAA/P,KAAAiD,MAAAX,OAEAtC,KAAAiD,MAAA,GACAyD,OAAAgJ,KAAAY,MAAAP,GAIA/P,KAAAiD,MAAAJ,QAAA,SAAAC,EAAA7F,GACA,EAAAA,GACA6F,EAAA2F,MAAAuH,EAAA/S,EAAA,GACA6F,EAAA4D,OAAAsJ,EAAA/S,GAAA+S,EAAA/S,EAAA,IAEA6F,EAAA4D,OAAAsJ,EAAA/S,MAIA,WAAA2P,IAEAqD,GAAAjQ,KAAA0G,MAAAwJ,GAAA,EACAlQ,KAAAiD,MAAAJ,QAAA,SAAAC,GACAA,EAAA2F,MAAAwH,EAAAjQ,KAAAuM,SACAvM,QAYA2O,cAAA,SAAA4B,EAAAjM,GAMA,iBAAAA,EACAtE,KAAAyP,eAAAnL,EAAAtE,KAAA4M,kBAGA5M,KAAAyP,eAAAzP,KAAA2I,gBAAA3I,KAAA4M,mBAWAI,SAAA,WACA,OAAAhN,KAAAiD","file":"fjGallery.min.js","sourcesContent":["/*!\n * Name : Flickr's Justified Gallery [fjGallery]\n * Version : 1.0.3\n * Author : nK <https://nkdev.info>\n * GitHub : https://github.com/nk-o/flickr-justified-gallery\n */\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(1);\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lite_ready__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\n // no conflict\n\nvar oldPlugin = global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery;\nglobal__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n\nglobal__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.noConflict = function () {\n global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery = oldPlugin;\n return this;\n}; // jQuery support\n\n\nif (typeof global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"] !== 'undefined') {\n // add data to jQuery .data('fjGallery')\n var oldInit = global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.init;\n\n global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.init = function () {\n this.jQcontainer = Object(global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"])(this.$container);\n this.jQcontainer.data('fjGallery', this);\n\n if (oldInit) {\n oldInit.call(this);\n }\n }; // remove data from jQuery .data('fjGallery')\n\n\n var oldDestroy = global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.destroy;\n\n global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.destroy = function () {\n if (this.jQcontainer) {\n this.jQcontainer.removeData('fjGallery');\n }\n\n if (oldDestroy) {\n oldDestroy.call(this);\n }\n };\n\n var jQueryPlugin = function jQueryPlugin() {\n var args = arguments || [];\n Array.prototype.unshift.call(args, this);\n var res = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"].apply(global__WEBPACK_IMPORTED_MODULE_1__[\"window\"], args);\n return _typeof(res) !== 'object' ? res : this;\n };\n\n jQueryPlugin.constructor = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructor; // no conflict\n\n var oldJqPlugin = global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery;\n global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery = jQueryPlugin;\n\n global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery.noConflict = function () {\n global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery = oldJqPlugin;\n return this;\n };\n} // .fj-gallery initialization\n\n\nlite_ready__WEBPACK_IMPORTED_MODULE_0___default()(function () {\n Object(_fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(document.querySelectorAll('.fj-gallery'));\n});\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (callback) {\n if (document.readyState === 'complete' || document.readyState === 'interactive') {\n // Already ready or interactive, execute callback\n callback.call();\n } else if (document.attachEvent) {\n // Old browsers\n document.attachEvent('onreadystatechange', function () {\n if (document.readyState === 'interactive') callback.call();\n });\n } else if (document.addEventListener) {\n // Modern browsers\n document.addEventListener('DOMContentLoaded', callback);\n }\n};\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global) {var win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\") {\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar g; // This works in non-strict mode\n\ng = function () {\n return this;\n}();\n\ntry {\n // This works if eval is allowed (see CSP)\n g = g || new Function(\"return this\")();\n} catch (e) {\n // This works if the window reference is available\n if ((typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\") g = window;\n} // g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\n\nmodule.exports = g;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var throttle_debounce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);\n/* harmony import */ var merge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);\n/* harmony import */ var merge__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(merge__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lite_ready__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var justified_layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);\n/* harmony import */ var justified_layout__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(justified_layout__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_4__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\n // list with all fjGallery instances\n// need to render all in one scroll/resize event\n\nvar fjGalleryList = [];\n\nfunction updateFjGallery() {\n global__WEBPACK_IMPORTED_MODULE_4__[\"window\"].requestAnimationFrame(function () {\n fjGalleryList.forEach(function (item) {\n item.resize();\n });\n });\n}\n\nglobal__WEBPACK_IMPORTED_MODULE_4__[\"window\"].addEventListener('resize', updateFjGallery);\nglobal__WEBPACK_IMPORTED_MODULE_4__[\"window\"].addEventListener('orientationchange', updateFjGallery);\nglobal__WEBPACK_IMPORTED_MODULE_4__[\"window\"].addEventListener('load', updateFjGallery);\nlite_ready__WEBPACK_IMPORTED_MODULE_2___default()(function () {\n updateFjGallery();\n}); // get image dimensions\n// thanks https://gist.github.com/dimsemenov/5382856\n\nfunction getImgDimensions(img, cb) {\n var interval;\n var hasSize = false;\n var addedListeners = false;\n\n var onHasSize = function onHasSize() {\n if (hasSize) {\n cb(hasSize);\n return;\n }\n\n hasSize = {\n width: img.naturalWidth,\n height: img.naturalHeight\n };\n cb(hasSize);\n clearInterval(interval);\n\n if (addedListeners) {\n // eslint-disable-next-line no-use-before-define\n removeListeners();\n }\n };\n\n var onLoaded = function onLoaded() {\n onHasSize();\n };\n\n var onError = function onError() {\n onHasSize();\n };\n\n var checkSize = function checkSize() {\n if (img.naturalWidth > 0) {\n onHasSize();\n }\n };\n\n var addListeners = function addListeners() {\n addedListeners = true;\n img.addEventListener('load', onLoaded);\n img.addEventListener('error', onError);\n };\n\n var removeListeners = function removeListeners() {\n addedListeners = false;\n img.removeEventListener('load', onLoaded);\n img.removeEventListener('error', onError);\n };\n\n checkSize();\n\n if (!hasSize) {\n addListeners();\n interval = setInterval(checkSize, 100);\n }\n}\n\nvar instanceID = 0; // fjGallery class\n\nvar fjGallery = /*#__PURE__*/function () {\n function fjGallery(container, userOptions) {\n _classCallCheck(this, fjGallery);\n\n var self = this;\n self.instanceID = instanceID++;\n self.$container = container;\n self.images = [];\n self.defaults = {\n itemSelector: '.fj-gallery-item',\n imageSelector: 'img',\n gutter: 10,\n // supports object like `{ horizontal: 10, vertical: 10 }`.\n rowHeight: 320,\n rowHeightTolerance: 0.25,\n // [0, 1]\n resizeThrottle: 200,\n isRtl: self.css(self.$container, 'direction') === 'rtl',\n // events\n onInit: null,\n // function() {}\n onDestroy: null,\n // function() {}\n onAppendImages: null,\n // function() {}\n onBeforeJustify: null,\n // function() {}\n onJustify: null // function() {}\n\n }; // prepare data-options\n\n var dataOptions = self.$container.dataset || {};\n var pureDataOptions = {};\n Object.keys(dataOptions).forEach(function (key) {\n var loweCaseOption = key.substr(0, 1).toLowerCase() + key.substr(1);\n\n if (loweCaseOption && typeof self.defaults[loweCaseOption] !== 'undefined') {\n pureDataOptions[loweCaseOption] = dataOptions[key];\n }\n });\n self.options = merge__WEBPACK_IMPORTED_MODULE_1___default()({}, self.defaults, pureDataOptions, userOptions);\n self.pureOptions = merge__WEBPACK_IMPORTED_MODULE_1___default()({}, self.options); // throttle for resize\n\n self.resize = Object(throttle_debounce__WEBPACK_IMPORTED_MODULE_0__[\"throttle\"])(self.options.resizeThrottle, self.resize);\n self.init();\n } // add styles to element\n\n\n _createClass(fjGallery, [{\n key: \"css\",\n value: function css(el, styles) {\n if (typeof styles === 'string') {\n return global__WEBPACK_IMPORTED_MODULE_4__[\"window\"].getComputedStyle(el).getPropertyValue(styles);\n } // add transform property with vendor prefix\n\n\n if (styles.transform) {\n styles['-webkit-transform'] = styles.transform;\n }\n\n Object.keys(styles).forEach(function (key) {\n el.style[key] = styles[key];\n });\n return el;\n } // add to fjGallery instances list\n\n }, {\n key: \"addToFjGalleryList\",\n value: function addToFjGalleryList() {\n fjGalleryList.push(this);\n updateFjGallery();\n } // remove from fjGallery instances list\n\n }, {\n key: \"removeFromFjGalleryList\",\n value: function removeFromFjGalleryList() {\n var self = this;\n fjGalleryList.forEach(function (item, key) {\n if (item.instanceID === self.instanceID) {\n fjGalleryList.splice(key, 1);\n }\n });\n }\n }, {\n key: \"init\",\n value: function init() {\n var self = this;\n self.appendImages(self.$container.querySelectorAll(self.options.itemSelector));\n self.addToFjGalleryList(); // call onInit event\n\n if (self.options.onInit) {\n self.options.onInit.call(self);\n }\n } // append images\n\n }, {\n key: \"appendImages\",\n value: function appendImages($images) {\n var self = this; // check if jQuery\n\n if (global__WEBPACK_IMPORTED_MODULE_4__[\"window\"].jQuery && $images instanceof global__WEBPACK_IMPORTED_MODULE_4__[\"window\"].jQuery) {\n $images = $images.get();\n }\n\n if (!$images || !$images.length) {\n return;\n }\n\n $images.forEach(function ($item) {\n // if $images is jQuery, for some reason in this array there is undefined item, that not a DOM,\n // so we need to check for $item.querySelector.\n if ($item && !$item.fjGalleryImage && $item.querySelector) {\n var $image = $item.querySelector(self.options.imageSelector);\n\n if ($image) {\n $item.fjGalleryImage = self;\n var data = {\n $item: $item,\n $image: $image,\n width: parseFloat($image.getAttribute('width')) || false,\n height: parseFloat($image.getAttribute('height')) || false,\n loadSizes: function loadSizes() {\n var itemData = this;\n getImgDimensions($image, function (dimensions) {\n if (itemData.width !== dimensions.width || itemData.height !== dimensions.height) {\n itemData.width = dimensions.width;\n itemData.height = dimensions.height;\n self.resize();\n }\n });\n }\n };\n data.loadSizes();\n self.images.push(data);\n }\n }\n }); // call onAppendImages event\n\n if (self.options.onAppendImages) {\n self.options.onAppendImages.call(self, [$images]);\n }\n\n self.justify();\n } // justify images\n\n }, {\n key: \"justify\",\n value: function justify() {\n var self = this;\n var justifyArray = []; // call onBeforeJustify event\n\n if (self.options.onBeforeJustify) {\n self.options.onBeforeJustify.call(self);\n }\n\n self.images.forEach(function (data) {\n if (data.width && data.height) {\n justifyArray.push(data.width / data.height);\n }\n });\n var justifiedData = justified_layout__WEBPACK_IMPORTED_MODULE_3___default()(justifyArray, {\n containerWidth: self.$container.getBoundingClientRect().width,\n containerPadding: {\n top: parseFloat(self.css(self.$container, 'padding-top')) || 0,\n right: parseFloat(self.css(self.$container, 'padding-right')) || 0,\n bottom: parseFloat(self.css(self.$container, 'padding-bottom')) || 0,\n left: parseFloat(self.css(self.$container, 'padding-left')) || 0\n },\n boxSpacing: self.options.gutter,\n targetRowHeight: self.options.rowHeight,\n targetRowHeightTolerance: self.options.rowHeightTolerance\n });\n self.css(self.$container, {\n height: \"\".concat(justifiedData.containerHeight, \"px\")\n });\n var i = 0;\n self.images.forEach(function (data) {\n if (data.width && data.height) {\n self.css(data.$item, {\n position: 'absolute',\n transform: \"translateX(\".concat((self.options.isRtl ? -1 : 1) * justifiedData.boxes[i].left, \"px) translateY(\").concat(justifiedData.boxes[i].top, \"px) translateZ(0)\"),\n width: \"\".concat(justifiedData.boxes[i].width, \"px\"),\n height: \"\".concat(justifiedData.boxes[i].height, \"px\")\n });\n i++;\n }\n }); // call onJustify event\n\n if (self.options.onJustify) {\n self.options.onJustify.call(self);\n }\n } // update options and resize gallery items\n\n }, {\n key: \"updateOptions\",\n value: function updateOptions(options) {\n var self = this;\n self.options = merge__WEBPACK_IMPORTED_MODULE_1___default()({}, self.options, options);\n self.justify();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var self = this;\n self.removeFromFjGalleryList(); // call onDestroy event\n\n if (self.options.onDestroy) {\n self.options.onDestroy.call(self);\n } // remove styles.\n\n\n self.css(self.$container, {\n height: ''\n });\n self.images.forEach(function (data) {\n self.css(data.$item, {\n position: '',\n transform: '',\n width: '',\n height: ''\n });\n }); // delete fjGalleryImage instance from images\n\n self.images.forEach(function (val) {\n delete val.$item.fjGalleryImage;\n }); // delete fjGallery instance from container\n\n delete self.$container.fjGallery;\n }\n }, {\n key: \"resize\",\n value: function resize() {\n var self = this;\n self.justify();\n }\n }]);\n\n return fjGallery;\n}(); // global definition\n\n\nvar plugin = function plugin(items) {\n // check for dom element\n // thanks: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n if ((typeof HTMLElement === \"undefined\" ? \"undefined\" : _typeof(HTMLElement)) === 'object' ? items instanceof HTMLElement : items && _typeof(items) === 'object' && items !== null && items.nodeType === 1 && typeof items.nodeName === 'string') {\n items = [items];\n }\n\n var options = arguments[1];\n var args = Array.prototype.slice.call(arguments, 2);\n var len = items.length;\n var k = 0;\n var ret;\n\n for (k; k < len; k++) {\n if (_typeof(options) === 'object' || typeof options === 'undefined') {\n if (!items[k].fjGallery) {\n // eslint-disable-next-line new-cap\n items[k].fjGallery = new fjGallery(items[k], options);\n }\n } else if (items[k].fjGallery) {\n // eslint-disable-next-line prefer-spread\n ret = items[k].fjGallery[options].apply(items[k].fjGallery, args);\n }\n\n if (typeof ret !== 'undefined') {\n return ret;\n }\n }\n\n return items;\n};\n\nplugin.constructor = fjGallery;\n/* harmony default export */ __webpack_exports__[\"default\"] = (plugin);\n\n/***/ }),\n/* 6 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"debounce\", function() { return debounce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"throttle\", function() { return throttle; });\n/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {boolean} [noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n * the internal counter is reset).\n * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the throttled-function is executed.\n * @param {boolean} [debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n * schedule `callback` to execute after `delay` ms.\n *\n * @returns {Function} A new, throttled, function.\n */\nfunction throttle(delay, noTrailing, callback, debounceMode) {\n /*\n * After wrapper has stopped being called, this timeout ensures that\n * `callback` is executed at the proper times in `throttle` and `end`\n * debounce modes.\n */\n var timeoutID;\n var cancelled = false; // Keep track of the last time `callback` was executed.\n\n var lastExec = 0; // Function to clear existing timeout\n\n function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec\n\n\n function cancel() {\n clearExistingTimeout();\n cancelled = true;\n } // `noTrailing` defaults to falsy.\n\n\n if (typeof noTrailing !== 'boolean') {\n debounceMode = callback;\n callback = noTrailing;\n noTrailing = undefined;\n }\n /*\n * The `wrapper` function encapsulates all of the throttling / debouncing\n * functionality and when executed will limit the rate at which `callback`\n * is executed.\n */\n\n\n function wrapper() {\n for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n arguments_[_key] = arguments[_key];\n }\n\n var self = this;\n var elapsed = Date.now() - lastExec;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, arguments_);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }\n\n wrapper.cancel = cancel; // Return the wrapper function.\n\n return wrapper;\n}\n/* eslint-disable no-undefined */\n\n/**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {boolean} [atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the debounced-function is executed.\n *\n * @returns {Function} A new, debounced function.\n */\n\n\nfunction debounce(delay, atBegin, callback) {\n return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);\n}\n\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module) {function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*!\r\n * @name JavaScript/NodeJS Merge v1.2.1\r\n * @author yeikos\r\n * @repository https://github.com/yeikos/js.merge\r\n\r\n * Copyright 2014 yeikos - MIT license\r\n * https://raw.github.com/yeikos/js.merge/master/LICENSE\r\n */\n;\n\n(function (isNode) {\n /**\r\n * Merge one or more objects \r\n * @param bool? clone\r\n * @param mixed,... arguments\r\n * @return object\r\n */\n var Public = function Public(clone) {\n return merge(clone === true, false, arguments);\n },\n publicName = 'merge';\n /**\r\n * Merge two or more objects recursively \r\n * @param bool? clone\r\n * @param mixed,... arguments\r\n * @return object\r\n */\n\n\n Public.recursive = function (clone) {\n return merge(clone === true, true, arguments);\n };\n /**\r\n * Clone the input removing any reference\r\n * @param mixed input\r\n * @return mixed\r\n */\n\n\n Public.clone = function (input) {\n var output = input,\n type = typeOf(input),\n index,\n size;\n\n if (type === 'array') {\n output = [];\n size = input.length;\n\n for (index = 0; index < size; ++index) {\n output[index] = Public.clone(input[index]);\n }\n } else if (type === 'object') {\n output = {};\n\n for (index in input) {\n output[index] = Public.clone(input[index]);\n }\n }\n\n return output;\n };\n /**\r\n * Merge two objects recursively\r\n * @param mixed input\r\n * @param mixed extend\r\n * @return mixed\r\n */\n\n\n function merge_recursive(base, extend) {\n if (typeOf(base) !== 'object') return extend;\n\n for (var key in extend) {\n if (typeOf(base[key]) === 'object' && typeOf(extend[key]) === 'object') {\n base[key] = merge_recursive(base[key], extend[key]);\n } else {\n base[key] = extend[key];\n }\n }\n\n return base;\n }\n /**\r\n * Merge two or more objects\r\n * @param bool clone\r\n * @param bool recursive\r\n * @param array argv\r\n * @return object\r\n */\n\n\n function merge(clone, recursive, argv) {\n var result = argv[0],\n size = argv.length;\n if (clone || typeOf(result) !== 'object') result = {};\n\n for (var index = 0; index < size; ++index) {\n var item = argv[index],\n type = typeOf(item);\n if (type !== 'object') continue;\n\n for (var key in item) {\n if (key === '__proto__') continue;\n var sitem = clone ? Public.clone(item[key]) : item[key];\n\n if (recursive) {\n result[key] = merge_recursive(result[key], sitem);\n } else {\n result[key] = sitem;\n }\n }\n }\n\n return result;\n }\n /**\r\n * Get type of variable\r\n * @param mixed input\r\n * @return string\r\n *\r\n * @see http://jsperf.com/typeofvar\r\n */\n\n\n function typeOf(input) {\n return {}.toString.call(input).slice(8, -1).toLowerCase();\n }\n\n if (isNode) {\n module.exports = Public;\n } else {\n window[publicName] = Public;\n }\n})(( false ? undefined : _typeof(module)) === 'object' && module && _typeof(module.exports) === 'object' && module.exports);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(8)(module)))\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*!\n * Copyright 2019 SmugMug, Inc.\n * Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.\n * @license\n */\n\n\nvar merge = __webpack_require__(7),\n Row = __webpack_require__(10);\n/**\n * Create a new, empty row.\n *\n * @method createNewRow\n * @param layoutConfig {Object} The layout configuration\n * @param layoutData {Object} The current state of the layout\n * @return A new, empty row of the type specified by this layout.\n */\n\n\nfunction createNewRow(layoutConfig, layoutData) {\n var isBreakoutRow; // Work out if this is a full width breakout row\n\n if (layoutConfig.fullWidthBreakoutRowCadence !== false) {\n if ((layoutData._rows.length + 1) % layoutConfig.fullWidthBreakoutRowCadence === 0) {\n isBreakoutRow = true;\n }\n }\n\n return new Row({\n top: layoutData._containerHeight,\n left: layoutConfig.containerPadding.left,\n width: layoutConfig.containerWidth - layoutConfig.containerPadding.left - layoutConfig.containerPadding.right,\n spacing: layoutConfig.boxSpacing.horizontal,\n targetRowHeight: layoutConfig.targetRowHeight,\n targetRowHeightTolerance: layoutConfig.targetRowHeightTolerance,\n edgeCaseMinRowHeight: 0.5 * layoutConfig.targetRowHeight,\n edgeCaseMaxRowHeight: 2 * layoutConfig.targetRowHeight,\n rightToLeft: false,\n isBreakoutRow: isBreakoutRow,\n widowLayoutStyle: layoutConfig.widowLayoutStyle\n });\n}\n/**\n * Add a completed row to the layout.\n * Note: the row must have already been completed.\n *\n * @method addRow\n * @param layoutConfig {Object} The layout configuration\n * @param layoutData {Object} The current state of the layout\n * @param row {Row} The row to add.\n * @return {Array} Each item added to the row.\n */\n\n\nfunction addRow(layoutConfig, layoutData, row) {\n layoutData._rows.push(row);\n\n layoutData._layoutItems = layoutData._layoutItems.concat(row.getItems()); // Increment the container height\n\n layoutData._containerHeight += row.height + layoutConfig.boxSpacing.vertical;\n return row.items;\n}\n/**\n * Calculate the current layout for all items in the list that require layout.\n * \"Layout\" means geometry: position within container and size\n *\n * @method computeLayout\n * @param layoutConfig {Object} The layout configuration\n * @param layoutData {Object} The current state of the layout\n * @param itemLayoutData {Array} Array of items to lay out, with data required to lay out each item\n * @return {Object} The newly-calculated layout, containing the new container height, and lists of layout items\n */\n\n\nfunction computeLayout(layoutConfig, layoutData, itemLayoutData) {\n var laidOutItems = [],\n itemAdded,\n currentRow,\n nextToLastRowHeight; // Apply forced aspect ratio if specified, and set a flag.\n\n if (layoutConfig.forceAspectRatio) {\n itemLayoutData.forEach(function (itemData) {\n itemData.forcedAspectRatio = true;\n itemData.aspectRatio = layoutConfig.forceAspectRatio;\n });\n } // Loop through the items\n\n\n itemLayoutData.some(function (itemData, i) {\n if (isNaN(itemData.aspectRatio)) {\n throw new Error(\"Item \" + i + \" has an invalid aspect ratio\");\n } // If not currently building up a row, make a new one.\n\n\n if (!currentRow) {\n currentRow = createNewRow(layoutConfig, layoutData);\n } // Attempt to add item to the current row.\n\n\n itemAdded = currentRow.addItem(itemData);\n\n if (currentRow.isLayoutComplete()) {\n // Row is filled; add it and start a new one\n laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));\n\n if (layoutData._rows.length >= layoutConfig.maxNumRows) {\n currentRow = null;\n return true;\n }\n\n currentRow = createNewRow(layoutConfig, layoutData); // Item was rejected; add it to its own row\n\n if (!itemAdded) {\n itemAdded = currentRow.addItem(itemData);\n\n if (currentRow.isLayoutComplete()) {\n // If the rejected item fills a row on its own, add the row and start another new one\n laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));\n\n if (layoutData._rows.length >= layoutConfig.maxNumRows) {\n currentRow = null;\n return true;\n }\n\n currentRow = createNewRow(layoutConfig, layoutData);\n }\n }\n }\n }); // Handle any leftover content (orphans) depending on where they lie\n // in this layout update, and in the total content set.\n\n if (currentRow && currentRow.getItems().length && layoutConfig.showWidows) {\n // Last page of all content or orphan suppression is suppressed; lay out orphans.\n if (layoutData._rows.length) {\n // Only Match previous row's height if it exists and it isn't a breakout row\n if (layoutData._rows[layoutData._rows.length - 1].isBreakoutRow) {\n nextToLastRowHeight = layoutData._rows[layoutData._rows.length - 1].targetRowHeight;\n } else {\n nextToLastRowHeight = layoutData._rows[layoutData._rows.length - 1].height;\n }\n\n currentRow.forceComplete(false, nextToLastRowHeight);\n } else {\n // ...else use target height if there is no other row height to reference.\n currentRow.forceComplete(false);\n }\n\n laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));\n layoutConfig._widowCount = currentRow.getItems().length;\n } // We need to clean up the bottom container padding\n // First remove the height added for box spacing\n\n\n layoutData._containerHeight = layoutData._containerHeight - layoutConfig.boxSpacing.vertical; // Then add our bottom container padding\n\n layoutData._containerHeight = layoutData._containerHeight + layoutConfig.containerPadding.bottom;\n return {\n containerHeight: layoutData._containerHeight,\n widowCount: layoutConfig._widowCount,\n boxes: layoutData._layoutItems\n };\n}\n/**\n * Takes in a bunch of box data and config. Returns\n * geometry to lay them out in a justified view.\n *\n * @method covertSizesToAspectRatios\n * @param sizes {Array} Array of objects with widths and heights\n * @return {Array} A list of aspect ratios\n */\n\n\nmodule.exports = function (input, config) {\n var layoutConfig = {};\n var layoutData = {}; // Defaults\n\n var defaults = {\n containerWidth: 1060,\n containerPadding: 10,\n boxSpacing: 10,\n targetRowHeight: 320,\n targetRowHeightTolerance: 0.25,\n maxNumRows: Number.POSITIVE_INFINITY,\n forceAspectRatio: false,\n showWidows: true,\n fullWidthBreakoutRowCadence: false,\n widowLayoutStyle: 'left'\n };\n var containerPadding = {};\n var boxSpacing = {};\n config = config || {}; // Merge defaults and config passed in\n\n layoutConfig = merge(defaults, config); // Sort out padding and spacing values\n\n containerPadding.top = !isNaN(parseFloat(layoutConfig.containerPadding.top)) ? layoutConfig.containerPadding.top : layoutConfig.containerPadding;\n containerPadding.right = !isNaN(parseFloat(layoutConfig.containerPadding.right)) ? layoutConfig.containerPadding.right : layoutConfig.containerPadding;\n containerPadding.bottom = !isNaN(parseFloat(layoutConfig.containerPadding.bottom)) ? layoutConfig.containerPadding.bottom : layoutConfig.containerPadding;\n containerPadding.left = !isNaN(parseFloat(layoutConfig.containerPadding.left)) ? layoutConfig.containerPadding.left : layoutConfig.containerPadding;\n boxSpacing.horizontal = !isNaN(parseFloat(layoutConfig.boxSpacing.horizontal)) ? layoutConfig.boxSpacing.horizontal : layoutConfig.boxSpacing;\n boxSpacing.vertical = !isNaN(parseFloat(layoutConfig.boxSpacing.vertical)) ? layoutConfig.boxSpacing.vertical : layoutConfig.boxSpacing;\n layoutConfig.containerPadding = containerPadding;\n layoutConfig.boxSpacing = boxSpacing; // Local\n\n layoutData._layoutItems = [];\n layoutData._awakeItems = [];\n layoutData._inViewportItems = [];\n layoutData._leadingOrphans = [];\n layoutData._trailingOrphans = [];\n layoutData._containerHeight = layoutConfig.containerPadding.top;\n layoutData._rows = [];\n layoutData._orphans = [];\n layoutConfig._widowCount = 0; // Convert widths and heights to aspect ratios if we need to\n\n return computeLayout(layoutConfig, layoutData, input.map(function (item) {\n if (item.width && item.height) {\n return {\n aspectRatio: item.width / item.height\n };\n } else {\n return {\n aspectRatio: item\n };\n }\n }));\n};\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*!\n * Copyright 2019 SmugMug, Inc.\n * Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.\n * @license\n */\nvar merge = __webpack_require__(7);\n/**\n * Row\n * Wrapper for each row in a justified layout.\n * Stores relevant values and provides methods for calculating layout of individual rows.\n *\n * @param {Object} layoutConfig - The same as that passed\n * @param {Object} Initialization parameters. The following are all required:\n * @param params.top {Number} Top of row, relative to container\n * @param params.left {Number} Left side of row relative to container (equal to container left padding)\n * @param params.width {Number} Width of row, not including container padding\n * @param params.spacing {Number} Horizontal spacing between items\n * @param params.targetRowHeight {Number} Layout algorithm will aim for this row height\n * @param params.targetRowHeightTolerance {Number} Row heights may vary +/- (`targetRowHeight` x `targetRowHeightTolerance`)\n * @param params.edgeCaseMinRowHeight {Number} Absolute minimum row height for edge cases that cannot be resolved within tolerance.\n * @param params.edgeCaseMaxRowHeight {Number} Absolute maximum row height for edge cases that cannot be resolved within tolerance.\n * @param params.isBreakoutRow {Boolean} Is this row in particular one of those breakout rows? Always false if it's not that kind of photo list\n * @param params.widowLayoutStyle {String} If widows are visible, how should they be laid out?\n * @constructor\n */\n\n\nvar Row = module.exports = function (params) {\n // Top of row, relative to container\n this.top = params.top; // Left side of row relative to container (equal to container left padding)\n\n this.left = params.left; // Width of row, not including container padding\n\n this.width = params.width; // Horizontal spacing between items\n\n this.spacing = params.spacing; // Row height calculation values\n\n this.targetRowHeight = params.targetRowHeight;\n this.targetRowHeightTolerance = params.targetRowHeightTolerance;\n this.minAspectRatio = this.width / params.targetRowHeight * (1 - params.targetRowHeightTolerance);\n this.maxAspectRatio = this.width / params.targetRowHeight * (1 + params.targetRowHeightTolerance); // Edge case row height minimum/maximum\n\n this.edgeCaseMinRowHeight = params.edgeCaseMinRowHeight;\n this.edgeCaseMaxRowHeight = params.edgeCaseMaxRowHeight; // Widow layout direction\n\n this.widowLayoutStyle = params.widowLayoutStyle; // Full width breakout rows\n\n this.isBreakoutRow = params.isBreakoutRow; // Store layout data for each item in row\n\n this.items = []; // Height remains at 0 until it's been calculated\n\n this.height = 0;\n};\n\nRow.prototype = {\n /**\n * Attempt to add a single item to the row.\n * This is the heart of the justified algorithm.\n * This method is direction-agnostic; it deals only with sizes, not positions.\n *\n * If the item fits in the row, without pushing row height beyond min/max tolerance,\n * the item is added and the method returns true.\n *\n * If the item leaves row height too high, there may be room to scale it down and add another item.\n * In this case, the item is added and the method returns true, but the row is incomplete.\n *\n * If the item leaves row height too short, there are too many items to fit within tolerance.\n * The method will either accept or reject the new item, favoring the resulting row height closest to within tolerance.\n * If the item is rejected, left/right padding will be required to fit the row height within tolerance;\n * if the item is accepted, top/bottom cropping will be required to fit the row height within tolerance.\n *\n * @method addItem\n * @param itemData {Object} Item layout data, containing item aspect ratio.\n * @return {Boolean} True if successfully added; false if rejected.\n */\n addItem: function addItem(itemData) {\n var newItems = this.items.concat(itemData),\n // Calculate aspect ratios for items only; exclude spacing\n rowWidthWithoutSpacing = this.width - (newItems.length - 1) * this.spacing,\n newAspectRatio = newItems.reduce(function (sum, item) {\n return sum + item.aspectRatio;\n }, 0),\n targetAspectRatio = rowWidthWithoutSpacing / this.targetRowHeight,\n previousRowWidthWithoutSpacing,\n previousAspectRatio,\n previousTargetAspectRatio; // Handle big full-width breakout photos if we're doing them\n\n if (this.isBreakoutRow) {\n // Only do it if there's no other items in this row\n if (this.items.length === 0) {\n // Only go full width if this photo is a square or landscape\n if (itemData.aspectRatio >= 1) {\n // Close out the row with a full width photo\n this.items.push(itemData);\n this.completeLayout(rowWidthWithoutSpacing / itemData.aspectRatio, 'justify');\n return true;\n }\n }\n }\n\n if (newAspectRatio < this.minAspectRatio) {\n // New aspect ratio is too narrow / scaled row height is too tall.\n // Accept this item and leave row open for more items.\n this.items.push(merge(itemData));\n return true;\n } else if (newAspectRatio > this.maxAspectRatio) {\n // New aspect ratio is too wide / scaled row height will be too short.\n // Accept item if the resulting aspect ratio is closer to target than it would be without the item.\n // NOTE: Any row that falls into this block will require cropping/padding on individual items.\n if (this.items.length === 0) {\n // When there are no existing items, force acceptance of the new item and complete the layout.\n // This is the pano special case.\n this.items.push(merge(itemData));\n this.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');\n return true;\n } // Calculate width/aspect ratio for row before adding new item\n\n\n previousRowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing;\n previousAspectRatio = this.items.reduce(function (sum, item) {\n return sum + item.aspectRatio;\n }, 0);\n previousTargetAspectRatio = previousRowWidthWithoutSpacing / this.targetRowHeight;\n\n if (Math.abs(newAspectRatio - targetAspectRatio) > Math.abs(previousAspectRatio - previousTargetAspectRatio)) {\n // Row with new item is us farther away from target than row without; complete layout and reject item.\n this.completeLayout(previousRowWidthWithoutSpacing / previousAspectRatio, 'justify');\n return false;\n } else {\n // Row with new item is us closer to target than row without;\n // accept the new item and complete the row layout.\n this.items.push(merge(itemData));\n this.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');\n return true;\n }\n } else {\n // New aspect ratio / scaled row height is within tolerance;\n // accept the new item and complete the row layout.\n this.items.push(merge(itemData));\n this.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');\n return true;\n }\n },\n\n /**\n * Check if a row has completed its layout.\n *\n * @method isLayoutComplete\n * @return {Boolean} True if complete; false if not.\n */\n isLayoutComplete: function isLayoutComplete() {\n return this.height > 0;\n },\n\n /**\n * Set row height and compute item geometry from that height.\n * Will justify items within the row unless instructed not to.\n *\n * @method completeLayout\n * @param newHeight {Number} Set row height to this value.\n * @param widowLayoutStyle {String} How should widows display? Supported: left | justify | center\n */\n completeLayout: function completeLayout(newHeight, widowLayoutStyle) {\n var itemWidthSum = this.left,\n rowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing,\n clampedToNativeRatio,\n clampedHeight,\n errorWidthPerItem,\n roundedCumulativeErrors,\n singleItemGeometry,\n centerOffset; // Justify unless explicitly specified otherwise.\n\n if (typeof widowLayoutStyle === 'undefined' || ['justify', 'center', 'left'].indexOf(widowLayoutStyle) < 0) {\n widowLayoutStyle = 'left';\n } // Clamp row height to edge case minimum/maximum.\n\n\n clampedHeight = Math.max(this.edgeCaseMinRowHeight, Math.min(newHeight, this.edgeCaseMaxRowHeight));\n\n if (newHeight !== clampedHeight) {\n // If row height was clamped, the resulting row/item aspect ratio will be off,\n // so force it to fit the width (recalculate aspectRatio to match clamped height).\n // NOTE: this will result in cropping/padding commensurate to the amount of clamping.\n this.height = clampedHeight;\n clampedToNativeRatio = rowWidthWithoutSpacing / clampedHeight / (rowWidthWithoutSpacing / newHeight);\n } else {\n // If not clamped, leave ratio at 1.0.\n this.height = newHeight;\n clampedToNativeRatio = 1.0;\n } // Compute item geometry based on newHeight.\n\n\n this.items.forEach(function (item) {\n item.top = this.top;\n item.width = item.aspectRatio * this.height * clampedToNativeRatio;\n item.height = this.height; // Left-to-right.\n // TODO right to left\n // item.left = this.width - itemWidthSum - item.width;\n\n item.left = itemWidthSum; // Increment width.\n\n itemWidthSum += item.width + this.spacing;\n }, this); // If specified, ensure items fill row and distribute error\n // caused by rounding width and height across all items.\n\n if (widowLayoutStyle === 'justify') {\n itemWidthSum -= this.spacing + this.left;\n errorWidthPerItem = (itemWidthSum - this.width) / this.items.length;\n roundedCumulativeErrors = this.items.map(function (item, i) {\n return Math.round((i + 1) * errorWidthPerItem);\n });\n\n if (this.items.length === 1) {\n // For rows with only one item, adjust item width to fill row.\n singleItemGeometry = this.items[0];\n singleItemGeometry.width -= Math.round(errorWidthPerItem);\n } else {\n // For rows with multiple items, adjust item width and shift items to fill the row,\n // while maintaining equal spacing between items in the row.\n this.items.forEach(function (item, i) {\n if (i > 0) {\n item.left -= roundedCumulativeErrors[i - 1];\n item.width -= roundedCumulativeErrors[i] - roundedCumulativeErrors[i - 1];\n } else {\n item.width -= roundedCumulativeErrors[i];\n }\n });\n }\n } else if (widowLayoutStyle === 'center') {\n // Center widows\n centerOffset = (this.width - itemWidthSum) / 2;\n this.items.forEach(function (item) {\n item.left += centerOffset + this.spacing;\n }, this);\n }\n },\n\n /**\n * Force completion of row layout with current items.\n *\n * @method forceComplete\n * @param fitToWidth {Boolean} Stretch current items to fill the row width.\n * This will likely result in padding.\n * @param fitToWidth {Number}\n */\n forceComplete: function forceComplete(fitToWidth, rowHeight) {\n // TODO Handle fitting to width\n // var rowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing,\n // \tcurrentAspectRatio = this.items.reduce(function (sum, item) {\n // \t\treturn sum + item.aspectRatio;\n // \t}, 0);\n if (typeof rowHeight === 'number') {\n this.completeLayout(rowHeight, this.widowLayoutStyle);\n } else {\n // Complete using target row height.\n this.completeLayout(this.targetRowHeight, this.widowLayoutStyle);\n }\n },\n\n /**\n * Return layout data for items within row.\n * Note: returns actual list, not a copy.\n *\n * @method getItems\n * @return Layout data for items within row.\n */\n getItems: function getItems() {\n return this.items;\n }\n};\n\n/***/ })\n/******/ ]);"]}
|
1 |
+
{"version":3,"sources":["fjGallery.js"],"names":["modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__webpack_exports__","lite_ready__WEBPACK_IMPORTED_MODULE_0__","lite_ready__WEBPACK_IMPORTED_MODULE_0___default","global__WEBPACK_IMPORTED_MODULE_1__","_fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__","_typeof","obj","iterator","constructor","oldInit","oldDestroy","jQueryPlugin","oldJqPlugin","oldPlugin","fjGallery","noConflict","this","init","jQcontainer","$container","data","destroy","removeData","args","arguments","Array","unshift","res","apply","fn","document","querySelectorAll","callback","readyState","attachEvent","addEventListener","global","win","window","self","g","Function","e","throttle_debounce__WEBPACK_IMPORTED_MODULE_0__","raf_schd__WEBPACK_IMPORTED_MODULE_1__","merge__WEBPACK_IMPORTED_MODULE_2__","merge__WEBPACK_IMPORTED_MODULE_2___default","lite_ready__WEBPACK_IMPORTED_MODULE_3__","lite_ready__WEBPACK_IMPORTED_MODULE_3___default","justified_layout__WEBPACK_IMPORTED_MODULE_4__","justified_layout__WEBPACK_IMPORTED_MODULE_4___default","global__WEBPACK_IMPORTED_MODULE_5__","_defineProperties","target","props","length","descriptor","configurable","writable","fjGalleryList","updateFjGallery","requestAnimationFrame","forEach","item","resize","plugin","items","HTMLElement","nodeType","nodeName","ret","options","slice","len","k","instanceID","container","userOptions","instance","Constructor","TypeError","_classCallCheck","images","defaults","itemSelector","imageSelector","gutter","rowHeight","rowHeightTolerance","resizeThrottle","isRtl","css","onInit","onDestroy","onAppendImages","onBeforeJustify","onJustify","dataOptions","dataset","pureDataOptions","keys","loweCaseOption","substr","toLowerCase","pureOptions","justify","protoProps","staticProps","el","styles","getComputedStyle","getPropertyValue","transform","style","push","splice","appendImages","addToFjGalleryList","$images","jQuery","$item","$image","fjGalleryImage","querySelector","width","parseFloat","getAttribute","height","loadSizes","img","cb","interval","hasSize","addedListeners","removeListeners","itemData","onHasSize","naturalWidth","naturalHeight","clearInterval","onLoaded","onError","checkSize","dimensions","removeEventListener","setInterval","justifyArray","justifiedData","containerWidth","getBoundingClientRect","containerPadding","top","right","bottom","left","boxSpacing","targetRowHeight","targetRowHeightTolerance","concat","containerHeight","position","boxes","removeFromFjGalleryList","val","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","factory","throttle","delay","noTrailing","debounceMode","timeoutID","cancelled","lastExec","clearExistingTimeout","clearTimeout","wrapper","_len","arguments_","_key","elapsed","Date","now","exec","undefined","setTimeout","cancel","debounce","atBegin","wrapperFn","lastArgs","frameId","cancelAnimationFrame","merge","clone","recursive","argv","result","size","typeOf","index","sitem","Public","merge_recursive","base","extend","input","toString","isNode","output","type","webpackPolyfill","deprecate","paths","children","Row","createNewRow","layoutConfig","layoutData","isBreakoutRow","fullWidthBreakoutRowCadence","_rows","_containerHeight","spacing","horizontal","edgeCaseMinRowHeight","edgeCaseMaxRowHeight","rightToLeft","widowLayoutStyle","addRow","row","_layoutItems","getItems","vertical","config","itemLayoutData","itemAdded","currentRow","nextToLastRowHeight","laidOutItems","maxNumRows","Number","POSITIVE_INFINITY","forceAspectRatio","showWidows","isNaN","_awakeItems","_inViewportItems","_leadingOrphans","_trailingOrphans","_orphans","_widowCount","map","aspectRatio","forcedAspectRatio","some","Error","addItem","isLayoutComplete","forceComplete","widowCount","params","minAspectRatio","maxAspectRatio","previousRowWidthWithoutSpacing","previousAspectRatio","previousTargetAspectRatio","newItems","rowWidthWithoutSpacing","newAspectRatio","reduce","sum","targetAspectRatio","completeLayout","Math","abs","newHeight","clampedToNativeRatio","clampedHeight","errorWidthPerItem","roundedCumulativeErrors","centerOffset","itemWidthSum","indexOf","max","min","round","fitToWidth"],"mappings":";;;;;IAAA,SAAAA,GAEA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAJ,EAAAG,GAAAK,KAAAH,EAAAD,QAAAC,EAAAA,EAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAT,EAGAC,EAAAS,EAAA,SAAAP,EAAAQ,EAAAC,GACAX,EAAAY,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,EAAA,CAAAK,YAAA,EAAAC,IAAAL,KAKAX,EAAAiB,EAAA,SAAAf,GACA,oBAAAgB,QAAAA,OAAAC,aACAN,OAAAC,eAAAZ,EAAAgB,OAAAC,YAAA,CAAAC,MAAA,WAEAP,OAAAC,eAAAZ,EAAA,aAAA,CAAAkB,OAAA,KAQApB,EAAAqB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAApB,EAAAoB,IACA,EAAAE,EAAA,OAAAF,EACA,GAAA,EAAAE,GAAA,iBAAAF,GAAAA,GAAAA,EAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFAzB,EAAAiB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,UAAA,CAAAT,YAAA,EAAAK,MAAAA,IACA,EAAAE,GAAA,iBAAAF,EAAA,IAAA,IAAAM,KAAAN,EAAApB,EAAAS,EAAAe,EAAAE,EAAA,SAAAA,GAAA,OAAAN,EAAAM,IAAAC,KAAA,KAAAD,IACA,OAAAF,GAIAxB,EAAA4B,EAAA,SAAAzB,GACA,IAAAQ,EAAAR,GAAAA,EAAAoB,WACA,WAAA,OAAApB,EAAA,SACA,WAAA,OAAAA,GAEA,OADAH,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAiB,EAAAC,GAAA,OAAAjB,OAAAkB,UAAAC,eAAA1B,KAAAuB,EAAAC,IAGA9B,EAAAiC,EAAA,GAIAjC,EAAAA,EAAAkC,EAAA,GAnFA,CAsFA,CAEA,SAAA/B,EAAAD,EAAAF,GAEAG,EAAAD,QAAAF,EAAA,IAKA,SAAAG,EAAAgC,EAAAnC,gBAGAA,EAAAiB,EAAAkB,GACA,IAAAC,EAAApC,EAAA,GACAqC,EAAArC,EAAA4B,EAAAQ,GACAE,EAAAtC,EAAA,GAEAuC,EAAAvC,EAAA,GACA,SAAAwC,EAAAC,GAAA,OAAAD,EAAA,mBAAAtB,QAAA,iBAAAA,OAAAwB,SAAA,SAAAD,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAvB,QAAAuB,EAAAE,cAAAzB,QAAAuB,IAAAvB,OAAAa,UAAA,gBAAAU,IAAAA,GAMA,IAWAG,EAYAC,EAYAC,EASAC,EA5CAC,EAAAV,EAAA,OAAAW,UACAX,EAAA,OAAAW,UAAAV,EAAA,QAEAD,EAAA,OAAAW,UAAAC,WAAA,WAEA,OADAZ,EAAA,OAAAW,UAAAD,EACAG,WAIA,IAAAb,EAAA,SAEAM,EAAAN,EAAA,OAAAW,UAAAN,YAAAZ,UAAAqB,KAEAd,EAAA,OAAAW,UAAAN,YAAAZ,UAAAqB,KAAA,WACAD,KAAAE,YAAAxC,OAAAyB,EAAA,OAAAzB,CAAAsC,KAAAG,YACAH,KAAAE,YAAAE,KAAA,YAAAJ,MAEAP,GACAA,EAAAtC,KAAA6C,OAKAN,EAAAP,EAAA,OAAAW,UAAAN,YAAAZ,UAAAyB,QAEAlB,EAAA,OAAAW,UAAAN,YAAAZ,UAAAyB,QAAA,WACAL,KAAAE,aACAF,KAAAE,YAAAI,WAAA,aAGAZ,GACAA,EAAAvC,KAAA6C,QAIAL,EAAA,WACA,IAAAY,EAAAC,WAAA,GACAC,MAAA7B,UAAA8B,QAAAvD,KAAAoD,EAAAP,MACA,IAAAW,EAAAvB,EAAA,QAAAwB,MAAAzB,EAAA,OAAAoB,GACA,MAAA,WAAAlB,EAAAsB,GAAAA,EAAAX,OAGAR,YAAAJ,EAAA,QAAAI,YAEAI,EAAAT,EAAA,OAAA0B,GAAAf,UACAX,EAAA,OAAA0B,GAAAf,UAAAH,EAEAR,EAAA,OAAA0B,GAAAf,UAAAC,WAAA,WAEA,OADAZ,EAAA,OAAA0B,GAAAf,UAAAF,EACAI,OAKAd,GAAAA,CAAA,WACAxB,OAAA0B,EAAA,QAAA1B,CAAAoD,SAAAC,iBAAA,mBAKA,SAAA/D,EAAAD,GAEAC,EAAAD,QAAA,SAAAiE,GACA,aAAAF,SAAAG,YAAA,gBAAAH,SAAAG,WAEAD,EAAA7D,OACA2D,SAAAI,YAEAJ,SAAAI,YAAA,qBAAA,WACA,gBAAAJ,SAAAG,YAAAD,EAAA7D,SAEA2D,SAAAK,kBAEAL,SAAAK,iBAAA,mBAAAH,KAMA,SAAAhE,EAAAD,EAAAF,IAEA,SAAAuE,GAAA,IAGAC,EADA,oBAAAC,OACAA,YACA,IAAAF,EACAA,EACA,oBAAAG,KACAA,KAEA,GAGAvE,EAAAD,QAAAsE,IACAlE,KAAA6C,KAAAnD,EAAA,KAIA,SAAAG,EAAAD,GAEA,SAAAsC,EAAAC,GAAA,OAAAD,EAAA,mBAAAtB,QAAA,iBAAAA,OAAAwB,SAAA,SAAAD,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAvB,QAAAuB,EAAAE,cAAAzB,QAAAuB,IAAAvB,OAAAa,UAAA,gBAAAU,IAAAA,GAEA,IAEAkC,EAAA,WACA,OAAAxB,KADA,GAIA,IAEAwB,EAAAA,GAAA,IAAAC,SAAA,cAAA,GACA,MAAAC,GAEA,YAAA,oBAAAJ,OAAA,YAAAjC,EAAAiC,WAAAE,EAAAF,QAMAtE,EAAAD,QAAAyE,GAIA,SAAAxE,EAAAgC,EAAAnC,gBAGAA,EAAAiB,EAAAkB,GACA,IAAA2C,EAAA9E,EAAA,GAEA+E,EAAA/E,EAAA,GACAgF,EAAAhF,EAAA,GACAiF,EAAAjF,EAAA4B,EAAAoD,GACAE,EAAAlF,EAAA,GACAmF,EAAAnF,EAAA4B,EAAAsD,GACAE,EAAApF,EAAA,IACAqF,EAAArF,EAAA4B,EAAAwD,GACAE,EAAAtF,EAAA,GAEA,SAAAwC,EAAAC,GAAA,OAAAD,EAAA,mBAAAtB,QAAA,iBAAAA,OAAAwB,SAAA,SAAAD,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAvB,QAAAuB,EAAAE,cAAAzB,QAAAuB,IAAAvB,OAAAa,UAAA,gBAAAU,IAAAA,GAIA,SAAA8C,EAAAC,EAAAC,GAAA,IAAA,IAAArF,EAAA,EAAAA,EAAAqF,EAAAC,OAAAtF,IAAA,CAAA,IAAAuF,EAAAF,EAAArF,GAAAuF,EAAA5E,WAAA4E,EAAA5E,aAAA,EAAA4E,EAAAC,cAAA,EAAA,UAAAD,IAAAA,EAAAE,UAAA,GAAAhF,OAAAC,eAAA0E,EAAAG,EAAAjE,IAAAiE,IAYA,IAAAG,EAAA,GAEA,SAAAC,IACAT,EAAA,OAAAU,sBAAA,WACAF,EAAAG,QAAA,SAAAC,GACAA,EAAAC,aAKAb,EAAA,OAAAhB,iBAAA,SAAAyB,GACAT,EAAA,OAAAhB,iBAAA,oBAAAyB,GACAT,EAAA,OAAAhB,iBAAA,OAAAyB,GACAZ,GAAAA,CAAA,WACAY,MAkTA,SAAAK,EAAAC,EAAA,IAGA,YAAA,oBAAAC,YAAA,YAAA9D,EAAA8D,cAAAD,aAAAC,YAAAD,GAAA,WAAA7D,EAAA6D,IAAA,OAAAA,GAAA,IAAAA,EAAAE,UAAA,iBAAAF,EAAAG,YACAH,EAAA,CAAAA,IASA,IANA,IAIAI,EAJAC,EAPA,EAQAhD,EAAAE,MAAA7B,UAAA4E,MAAArG,KAAAqD,UAAA,GACAiD,EAAAP,EAAAX,OACAmB,EAAA,EAGAA,EAAAD,EAAAC,IAWA,GAVA,WAAArE,EAAAkE,SAAA,IAAAA,EACAL,EAAAQ,GAAA5D,YAEAoD,EAAAQ,GAAA5D,UAAA,IAAAA,EAAAoD,EAAAQ,GAAAH,IAEAL,EAAAQ,GAAA5D,YAEAwD,EAAAJ,EAAAQ,GAAA5D,UAAAyD,GAAA3C,MAAAsC,EAAAQ,GAAA5D,UAAAS,SAGA,IAAA+C,EACA,OAAAA,EAIA,OAAAJ,EAjRA,IAAAS,EAAA,EAEA7D,EAAA,WACA,SAAAA,EAAA8D,EAAAC,IA7FA,SAAAC,EAAAC,GAAA,KAAAD,aAAAC,GAAA,MAAA,IAAAC,UAAA,qCA8FAC,CAAAjE,KAAAF,GAEA,IAAAyB,EAAAvB,KACAuB,EAAAoC,WAAAA,IACApC,EAAApB,WAAAyD,EACArC,EAAA2C,OAAA,GACA3C,EAAA4C,SAAA,CACAC,aAAA,mBACAC,cAAA,MACAC,OAAA,GAEAC,UAAA,IACAC,mBAAA,IAEAC,eAAA,IACAC,MAAA,QAAAnD,EAAAoD,IAAApD,EAAApB,WAAA,aAEAyE,OAAA,KAEAC,UAAA,KAEAC,eAAA,KAEAC,gBAAA,KAEAC,UAAA,MAIA,IAAAC,EAAA1D,EAAApB,WAAA+E,SAAA,GACAC,EAAA,GACAzH,OAAA0H,KAAAH,GAAAnC,QAAA,SAAAvE,GACA,IAAA8G,EAAA9G,EAAA+G,OAAA,EAAA,GAAAC,cAAAhH,EAAA+G,OAAA,GAEAD,QAAA,IAAA9D,EAAA4C,SAAAkB,KACAF,EAAAE,GAAAJ,EAAA1G,MAGAgD,EAAAgC,QAAAzB,GAAAA,CAAA,GAAAP,EAAA4C,SAAAgB,EAAAtB,GACAtC,EAAAiE,YAAA1D,GAAAA,CAAA,GAAAP,EAAAgC,SAEAhC,EAAAyB,OAAAtF,OAAAiE,EAAA,SAAAjE,CAAA6D,EAAAgC,QAAAkB,eAAAlD,EAAAyB,QACAzB,EAAAkE,QAAA/H,OAAAkE,EAAA,QAAAlE,CAAA6D,EAAAkE,SACAlE,EAAAtB,OArIA,IAAA8D,EAAA2B,EAAAC,EAsUA,OAtUA5B,EAyIAjE,GAzIA4F,EAyIA,CAAA,CACAnH,IAAA,MACAN,MAAA,SAAA2H,EAAAC,GACA,MAAA,iBAAAA,EACA1D,EAAA,OAAA2D,iBAAAF,GAAAG,iBAAAF,IAIAA,EAAAG,YACAH,EAAA,qBAAAA,EAAAG,WAGAtI,OAAA0H,KAAAS,GAAA/C,QAAA,SAAAvE,GACAqH,EAAAK,MAAA1H,GAAAsH,EAAAtH,KAEAqH,KAGA,CACArH,IAAA,qBACAN,MAAA,WACA0E,EAAAuD,KAAAlG,MACA4C,MAGA,CACArE,IAAA,0BACAN,MAAA,WACA,IAAAsD,EAAAvB,KACA2C,EAAAG,QAAA,SAAAC,EAAAxE,GACAwE,EAAAY,aAAApC,EAAAoC,YACAhB,EAAAwD,OAAA5H,EAAA,OAIA,CACAA,IAAA,OACAN,MAAA,WACA,IAAAsD,EAAAvB,KACAuB,EAAA6E,aAAA7E,EAAApB,WAAAY,iBAAAQ,EAAAgC,QAAAa,eACA7C,EAAA8E,qBAEA9E,EAAAgC,QAAAqB,QACArD,EAAAgC,QAAAqB,OAAAzH,KAAAoE,KAIA,CACAhD,IAAA,eACAN,MAAA,SAAAqI,GACA,IAAA/E,EAAAvB,KAEAmC,EAAA,OAAAoE,QAAAD,aAAAnE,EAAA,OAAAoE,SACAD,EAAAA,EAAAzI,OAGAyI,GAAAA,EAAA/D,SAIA+D,EAAAxD,QAAA,SAAA0D,GAGA,IACAC,EAIArG,GALAoG,GAAAA,EAAAE,iBAAAF,EAAAG,gBACAF,EAAAD,EAAAG,cAAApF,EAAAgC,QAAAc,kBAGAmC,EAAAE,eAAAnF,GACAnB,EAAA,CACAoG,MAAAA,EACAC,OAAAA,EACAG,MAAAC,WAAAJ,EAAAK,aAAA,YAAA,EACAC,OAAAF,WAAAJ,EAAAK,aAAA,aAAA,EACAE,UAAA,WACA,IAvLAC,EAAAC,EACAC,EACAC,EACAC,EAyCAC,EA2IAC,EAAAvH,KAlLA,SAAAwH,IACAJ,EACAF,EAAAE,IAIAA,EAAA,CACAR,MAAAK,EAAAQ,aACAV,OAAAE,EAAAS,eAEAR,EAAAE,GACAO,cAAAR,GAEAE,GAEAC,KAIA,SAAAM,IACAJ,IAGA,SAAAK,IACAL,IAGA,SAAAM,IACA,EAAAb,EAAAQ,cACAD,IAlCAP,EAwLAR,EArLAY,EADAD,IAFAF,EAwLA,SAAAa,GACAR,EAAAX,QAAAmB,EAAAnB,OAAAW,EAAAR,SAAAgB,EAAAhB,SACAQ,EAAAX,MAAAmB,EAAAnB,MACAW,EAAAR,OAAAgB,EAAAhB,OACAxF,EAAAyB,YAhJAsE,EAAA,WACAD,GAAA,EACAJ,EAAAe,oBAAA,OAAAJ,GACAX,EAAAe,oBAAA,QAAAH,IAGAC,IAEAV,IAbAC,GAAA,EACAJ,EAAA9F,iBAAA,OAAAyG,GACAX,EAAA9F,iBAAA,QAAA0G,GAaAV,EAAAc,YAAAH,EAAA,SA2IAd,YACAzF,EAAA2C,OAAAgC,KAAA9F,MAKAmB,EAAAgC,QAAAuB,gBACAvD,EAAAgC,QAAAuB,eAAA3H,KAAAoE,EAAA,CAAA+E,IAGA/E,EAAAkE,aAGA,CACAlH,IAAA,UACAN,MAAA,WACA,IAAAsD,EAAAvB,KACAkI,EAAA,GAEA3G,EAAAgC,QAAAwB,iBACAxD,EAAAgC,QAAAwB,gBAAA5H,KAAAoE,GAGAA,EAAA2C,OAAApB,QAAA,SAAA1C,GACAA,EAAAwG,OAAAxG,EAAA2G,QACAmB,EAAAhC,KAAA9F,EAAAwG,MAAAxG,EAAA2G,UAGA,IAAAoB,EAAAjG,GAAAA,CAAAgG,EAAA,CACAE,eAAA7G,EAAApB,WAAAkI,wBAAAzB,MACA0B,iBAAA,CACAC,IAAA1B,WAAAtF,EAAAoD,IAAApD,EAAApB,WAAA,iBAAA,EACAqI,MAAA3B,WAAAtF,EAAAoD,IAAApD,EAAApB,WAAA,mBAAA,EACAsI,OAAA5B,WAAAtF,EAAAoD,IAAApD,EAAApB,WAAA,oBAAA,EACAuI,KAAA7B,WAAAtF,EAAAoD,IAAApD,EAAApB,WAAA,kBAAA,GAEAwI,WAAApH,EAAAgC,QAAAe,OACAsE,gBAAArH,EAAAgC,QAAAgB,UACAsE,yBAAAtH,EAAAgC,QAAAiB,qBAEAjD,EAAAoD,IAAApD,EAAApB,WAAA,CACA4G,OAAA,GAAA+B,OAAAX,EAAAY,gBAAA,QAEA,IAAA9L,EAAA,EACAsE,EAAA2C,OAAApB,QAAA,SAAA1C,GACAA,EAAAwG,OAAAxG,EAAA2G,SACAxF,EAAAoD,IAAAvE,EAAAoG,MAAA,CACAwC,SAAA,WACAhD,UAAA,cAAA8C,QAAAvH,EAAAgC,QAAAmB,OAAA,EAAA,GAAAyD,EAAAc,MAAAhM,GAAAyL,KAAA,mBAAAI,OAAAX,EAAAc,MAAAhM,GAAAsL,IAAA,qBACA3B,MAAA,GAAAkC,OAAAX,EAAAc,MAAAhM,GAAA2J,MAAA,MACAG,OAAA,GAAA+B,OAAAX,EAAAc,MAAAhM,GAAA8J,OAAA,QAEA9J,OAIAsE,EAAAgC,QAAAyB,WACAzD,EAAAgC,QAAAyB,UAAA7H,KAAAoE,KAIA,CACAhD,IAAA,gBACAN,MAAA,SAAAsF,GACAvD,KACAuD,QAAAzB,GAAAA,CAAA,GADA9B,KACAuD,QAAAA,GADAvD,KAEAyF,YAEA,CACAlH,IAAA,UACAN,MAAA,WACA,IAAAsD,EAAAvB,KACAuB,EAAA2H,0BAEA3H,EAAAgC,QAAAsB,WACAtD,EAAAgC,QAAAsB,UAAA1H,KAAAoE,GAIAA,EAAAoD,IAAApD,EAAApB,WAAA,CACA4G,OAAA,KAEAxF,EAAA2C,OAAApB,QAAA,SAAA1C,GACAmB,EAAAoD,IAAAvE,EAAAoG,MAAA,CACAwC,SAAA,GACAhD,UAAA,GACAY,MAAA,GACAG,OAAA,OAIAxF,EAAA2C,OAAApB,QAAA,SAAAqG,UACAA,EAAA3C,MAAAE,wBAGAnF,EAAApB,WAAAL,YAEA,CACAvB,IAAA,SACAN,MAAA,WACA+B,KACAyF,eAlUArD,EAAA2B,EAAAnF,UAAA8G,GAAAC,GAAAvD,EAAA2B,EAAA4B,GAsUA7F,EA9OA,GAkRAmD,EAAAzD,YAAAM,EACAd,EAAA,QAAA,GAIA,SAAAhC,EAAAD,EAAAF,GAEA,IAAAuM,EAAAC,EAAAC,EAEAC,EAFA,SAAAlK,EAAAC,GAAA,OAAAD,EAAA,mBAAAtB,QAAA,iBAAAA,OAAAwB,SAAA,SAAAD,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAvB,QAAAuB,EAAAE,cAAAzB,QAAAuB,IAAAvB,OAAAa,UAAA,gBAAAU,IAAAA,GAEAiK,EAKA,SAAAxM,gBAqBA,SAAAyM,EAAAC,EAAAC,EAAA1I,EAAA2I,GAMA,IAAAC,EACAC,GAAA,EAEAC,EAAA,EAEA,SAAAC,IACAH,GACAI,aAAAJ,GAuBA,SAAAK,IACA,IAAA,IAAAC,EAAA1J,UAAA+B,OAAA4H,EAAA,IAAA1J,MAAAyJ,GAAAE,EAAA,EAAAA,EAAAF,EAAAE,IACAD,EAAAC,GAAA5J,UAAA4J,GAGA,IAAA7I,EAAAvB,KACAqK,EAAAC,KAAAC,MAAAT,EAOA,SAAAU,IACAV,EAAAQ,KAAAC,MACAvJ,EAAAJ,MAAAW,EAAA4I,GAPAN,IAmBAF,IAAAC,GAKAY,IAGAT,SAEAU,IAAAd,GAAAF,EAAAY,EAKAG,KACA,IAAAd,IAYAE,EAAAc,WAAAf,EAhCA,WACAC,OAAAa,GA+BAD,OAAAC,IAAAd,EAAAF,EAAAY,EAAAZ,KAMA,MAzEA,kBAAAC,IACAC,EAAA3I,EACAA,EAAA0I,EACAA,OAAAe,GAoEAR,EAAAU,OA7EA,WACAZ,IACAF,GAAA,GA6EAI,EAwBAlN,EAAA6N,SAJA,SAAAnB,EAAAoB,EAAA7J,GACA,YAAAyJ,IAAAzJ,EAAAwI,EAAAC,EAAAoB,GAAA,GAAArB,EAAAC,EAAAzI,GAAA,IAAA6J,IAIA9N,EAAAyM,SAAAA,EACA9L,OAAAC,eAAAZ,EAAA,aAAA,CACAkB,OAAA,KArJA,WAAAoB,EAAAtC,SAAA,IAAAC,EAAAuM,EAAAxM,IAAAsM,EAAA,CAAAtM,QAGA0N,KAFAnB,EAAA,mBADAF,EAAA,GAEAA,EAAAxI,MAAA7D,EAAAsM,GAAAD,KACApM,EAAAD,QAAAuM,KAwJA,SAAAtM,EAAAgC,EAAAnC,gBAGAA,EAAAiB,EAAAkB,GAkCAA,EAAA,QAjCA,SAAA6B,GAIA,SAAAiK,IACA,IAAA,IAAAZ,EAAA1J,UAAA+B,OAAAhC,EAAA,IAAAE,MAAAyJ,GAAAE,EAAA,EAAAA,EAAAF,EAAAE,IACA7J,EAAA6J,GAAA5J,UAAA4J,GAGAW,EAAAxK,EAMAyK,EAJAA,GAIAnI,sBAAA,WACAmI,EAAA,KACAnK,EAAAD,WAAA,EAAAmK,KAhBA,IAAAA,EACAC,EAAA,KA4BA,OATAF,EAAAH,OAAA,WACAK,IAIAC,qBAAAD,GACAA,EAAA,OAGAF,IAOA,SAAA9N,EAAAD,EAAAF,IAEA,SAAAG,GAAA,SAAAqC,EAAAC,GAAA,OAAAD,EAAA,mBAAAtB,QAAA,iBAAAA,OAAAwB,SAAA,SAAAD,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAAvB,QAAAuB,EAAAE,cAAAzB,QAAAuB,IAAAvB,OAAAa,UAAA,gBAAAU,IAAAA;;;;;;;;GA8FA,SAAA4L,EAAAC,EAAAC,EAAAC,GACA,IAAAC,EAAAD,EAAA,GACAE,EAAAF,EAAA9I,QACA4I,GAAA,WAAAK,EAAAF,KAAAA,EAAA,IAEA,IAAA,IAAAG,EAAA,EAAAA,EAAAF,IAAAE,EAAA,CACA,IAMAC,EANA3I,EAAAsI,EAAAI,GAEA,GAAA,WADAD,EAAAzI,GAGA,IAAA,IAAAxE,KAAAwE,EAAA,CACA,cAAAxE,IACAmN,EAAAP,EAAAQ,EAAAR,MAAApI,EAAAxE,IAAAwE,EAAAxE,GAGA+M,EAAA/M,GADA6M,EApCA,SAAAQ,EAAAC,EAAAC,GACA,GAAA,WAAAN,EAAAK,GAAA,OAAAC,EAEA,IAAA,IAAAvN,KAAAuN,EACA,WAAAN,EAAAK,EAAAtN,KAAA,WAAAiN,EAAAM,EAAAvN,IACAsN,EAAAtN,GAAAqN,EAAAC,EAAAtN,GAAAuN,EAAAvN,IAEAsN,EAAAtN,GAAAuN,EAAAvN,GAIA,OAAAsN,EA0BAD,CAAAN,EAAA/M,GAAAmN,GAEAA,IAKA,OAAAJ,EAWA,SAAAE,EAAAO,GACA,MAAA,GAAAC,SAAA7O,KAAA4O,GAAAvI,MAAA,GAAA,GAAA+B,cApHA,IAAA0G,EAOAN,EAPAM,EA4HA,WAAA5M,EAAArC,IAAAA,GAAA,WAAAqC,EAAArC,EAAAD,UAAAC,EAAAD,SArHA4O,EAAA,SAAAR,GACA,OAAAD,GAAA,IAAAC,GAAA,EAAA3K,aAWA4K,UAAA,SAAAD,GACA,OAAAD,GAAA,IAAAC,GAAA,EAAA3K,YASAmL,EAAAR,MAAA,SAAAY,GACA,IAEAN,EACAF,EAHAW,EAAAH,EACAI,EAAAX,EAAAO,GAIA,GAAA,UAAAI,EAIA,IAHAD,EAAA,GACAX,EAAAQ,EAAAxJ,OAEAkJ,EAAA,EAAAA,EAAAF,IAAAE,EACAS,EAAAT,GAAAE,EAAAR,MAAAY,EAAAN,SAEA,GAAA,WAAAU,EAGA,IAAAV,KAFAS,EAAA,GAEAH,EACAG,EAAAT,GAAAE,EAAAR,MAAAY,EAAAN,IAIA,OAAAS,GAqEAD,EACAjP,EAAAD,QAAA4O,EAEArK,OAAA,MAAAqK,IAGAxO,KAAA6C,KAAAnD,EAAA,EAAAA,CAAAG,KAIA,SAAAA,EAAAD,GAEAC,EAAAD,QAAA,SAAAC,GAsBA,OArBAA,EAAAoP,kBACApP,EAAAqP,UAAA,aAEArP,EAAAsP,MAAA,GAEAtP,EAAAuP,WAAAvP,EAAAuP,SAAA,IACA7O,OAAAC,eAAAX,EAAA,SAAA,CACAY,YAAA,EACAC,IAAA,WACA,OAAAb,EAAAE,KAGAQ,OAAAC,eAAAX,EAAA,KAAA,CACAY,YAAA,EACAC,IAAA,WACA,OAAAb,EAAAC,KAGAD,EAAAoP,gBAAA,GAGApP,IAKA,SAAAA,EAAAD,EAAAF;;;;;GAUA,IAAAqO,EAAArO,EAAA,GACA2P,EAAA3P,EAAA,IAWA,SAAA4P,EAAAC,EAAAC,GACA,IAAAC,EAQA,OANA,IAAAF,EAAAG,8BACAF,EAAAG,MAAAvK,OAAA,GAAAmK,EAAAG,6BAAA,IACAD,GAAA,GAIA,IAAAJ,EAAA,CACAjE,IAAAoE,EAAAI,iBACArE,KAAAgE,EAAApE,iBAAAI,KACA9B,MAAA8F,EAAAtE,eAAAsE,EAAApE,iBAAAI,KAAAgE,EAAApE,iBAAAE,MACAwE,QAAAN,EAAA/D,WAAAsE,WACArE,gBAAA8D,EAAA9D,gBACAC,yBAAA6D,EAAA7D,yBACAqE,qBAAA,GAAAR,EAAA9D,gBACAuE,qBAAA,EAAAT,EAAA9D,gBACAwE,aAAA,EACAR,cAAAA,EACAS,iBAAAX,EAAAW,mBAeA,SAAAC,EAAAZ,EAAAC,EAAAY,GAMA,OALAZ,EAAAG,MAAA5G,KAAAqH,GAEAZ,EAAAa,aAAAb,EAAAa,aAAA1E,OAAAyE,EAAAE,YAEAd,EAAAI,kBAAAQ,EAAAxG,OAAA2F,EAAA/D,WAAA+E,SACAH,EAAArK,MAgHAlG,EAAAD,QAAA,SAAAgP,EAAA4B,GACA,IAnGAjB,EAAAC,EAAAiB,EAEAC,EACAC,EACAC,EAHAC,EAkGAtB,EAAA,GACAC,EAAA,GAEAxI,EAAA,CACAiE,eAAA,KACAE,iBAAA,GACAK,WAAA,GACAC,gBAAA,IACAC,yBAAA,IACAoF,WAAAC,OAAAC,kBACAC,kBAAA,EACAC,YAAA,EACAxB,6BAAA,EACAQ,iBAAA,QAEA/E,EAAA,GACAK,EAAA,GAGA+D,EAAAxB,EAAA/G,EAFAwJ,EAAAA,GAAA,IAuBA,OAnBArF,EAAAC,IAAA+F,MAAAzH,WAAA6F,EAAApE,iBAAAC,MAAAmE,EAAApE,iBAAAoE,EAAApE,iBAAAC,IACAD,EAAAE,MAAA8F,MAAAzH,WAAA6F,EAAApE,iBAAAE,QAAAkE,EAAApE,iBAAAoE,EAAApE,iBAAAE,MACAF,EAAAG,OAAA6F,MAAAzH,WAAA6F,EAAApE,iBAAAG,SAAAiE,EAAApE,iBAAAoE,EAAApE,iBAAAG,OACAH,EAAAI,KAAA4F,MAAAzH,WAAA6F,EAAApE,iBAAAI,OAAAgE,EAAApE,iBAAAoE,EAAApE,iBAAAI,KACAC,EAAAsE,WAAAqB,MAAAzH,WAAA6F,EAAA/D,WAAAsE,aAAAP,EAAA/D,WAAA+D,EAAA/D,WAAAsE,WACAtE,EAAA+E,SAAAY,MAAAzH,WAAA6F,EAAA/D,WAAA+E,WAAAhB,EAAA/D,WAAA+D,EAAA/D,WAAA+E,SACAhB,EAAApE,iBAAAA,EACAoE,EAAA/D,WAAAA,EAEAgE,EAAAa,aAAA,GACAb,EAAA4B,YAAA,GACA5B,EAAA6B,iBAAA,GACA7B,EAAA8B,gBAAA,GACA9B,EAAA+B,iBAAA,GACA/B,EAAAI,iBAAAL,EAAApE,iBAAAC,IACAoE,EAAAG,MAAA,GACAH,EAAAgC,SAAA,GACAjC,EAAAkC,YAAA,EAzIAlC,EA2IAA,EA3IAC,EA2IAA,EA3IAiB,EA2IA7B,EAAA8C,IAAA,SAAA9L,GACA,OAAAA,EAAA6D,OAAA7D,EAAAgE,OACA,CACA+H,YAAA/L,EAAA6D,MAAA7D,EAAAgE,QAGA,CACA+H,YAAA/L,KAjJAiL,EAAA,GAKAtB,EAAA0B,kBACAR,EAAA9K,QAAA,SAAAyE,GACAA,EAAAwH,mBAAA,EACAxH,EAAAuH,YAAApC,EAAA0B,mBAKAR,EAAAoB,KAAA,SAAAzH,EAAAtK,GACA,GAAAqR,MAAA/G,EAAAuH,aACA,MAAA,IAAAG,MAAA,QAAAhS,EAAA,gCAWA,GANA6Q,EADAA,GACArB,EAAAC,EAAAC,GAIAkB,EAAAC,EAAAoB,QAAA3H,GAEAuG,EAAAqB,mBAAA,CAIA,GAFAnB,EAAAA,EAAAlF,OAAAwE,EAAAZ,EAAAC,EAAAmB,IAEAnB,EAAAG,MAAAvK,QAAAmK,EAAAuB,WAEA,QADAH,EAAA,MAMA,GAFAA,EAAArB,EAAAC,EAAAC,IAEAkB,IACAA,EAAAC,EAAAoB,QAAA3H,GAEAuG,EAAAqB,oBAAA,CAIA,GAFAnB,EAAAA,EAAAlF,OAAAwE,EAAAZ,EAAAC,EAAAmB,IAEAnB,EAAAG,MAAAvK,QAAAmK,EAAAuB,WAEA,QADAH,EAAA,MAIAA,EAAArB,EAAAC,EAAAC,OAOAmB,GAAAA,EAAAL,WAAAlL,QAAAmK,EAAA2B,aAEA1B,EAAAG,MAAAvK,QAGAwL,EADApB,EAAAG,MAAAH,EAAAG,MAAAvK,OAAA,GAAAqK,cACAD,EAAAG,MAAAH,EAAAG,MAAAvK,OAAA,GAAAqG,gBAEA+D,EAAAG,MAAAH,EAAAG,MAAAvK,OAAA,GAAAwE,OAGA+G,EAAAsB,eAAA,EAAArB,IAGAD,EAAAsB,eAAA,GAGApB,EAAAA,EAAAlF,OAAAwE,EAAAZ,EAAAC,EAAAmB,IACApB,EAAAkC,YAAAd,EAAAL,WAAAlL,QAKAoK,EAAAI,iBAAAJ,EAAAI,iBAAAL,EAAA/D,WAAA+E,SAEAf,EAAAI,iBAAAJ,EAAAI,iBAAAL,EAAApE,iBAAAG,OACA,CACAM,gBAAA4D,EAAAI,iBACAsC,WAAA3C,EAAAkC,YACA3F,MAAA0D,EAAAa,gBAqEA,SAAAxQ,EAAAD,EAAAF;;;;;;AAOA,IAAAqO,EAAArO,EAAA,IAsBAG,EAAAD,QAAA,SAAAuS,GAEAtP,KAAAuI,IAAA+G,EAAA/G,IAEAvI,KAAA0I,KAAA4G,EAAA5G,KAEA1I,KAAA4G,MAAA0I,EAAA1I,MAEA5G,KAAAgN,QAAAsC,EAAAtC,QAEAhN,KAAA4I,gBAAA0G,EAAA1G,gBACA5I,KAAA6I,yBAAAyG,EAAAzG,yBACA7I,KAAAuP,eAAAvP,KAAA4G,MAAA0I,EAAA1G,iBAAA,EAAA0G,EAAAzG,0BACA7I,KAAAwP,eAAAxP,KAAA4G,MAAA0I,EAAA1G,iBAAA,EAAA0G,EAAAzG,0BAEA7I,KAAAkN,qBAAAoC,EAAApC,qBACAlN,KAAAmN,qBAAAmC,EAAAnC,qBAEAnN,KAAAqN,iBAAAiC,EAAAjC,iBAEArN,KAAA4M,cAAA0C,EAAA1C,cAEA5M,KAAAkD,MAAA,GAEAlD,KAAA+G,OAAA,IAGAnI,UAAA,CAqBAsQ,QAAA,SAAA3H,GACA,IAOAkI,EACAC,EACAC,EATAC,EAAA5P,KAAAkD,MAAA4F,OAAAvB,GAEAsI,EAAA7P,KAAA4G,OAAAgJ,EAAArN,OAAA,GAAAvC,KAAAgN,QACA8C,EAAAF,EAAAG,OAAA,SAAAC,EAAAjN,GACA,OAAAiN,EAAAjN,EAAA+L,aACA,GACAmB,EAAAJ,EAAA7P,KAAA4I,gBAKA,OAAA5I,KAAA4M,eAEA,IAAA5M,KAAAkD,MAAAX,QAEA,GAAAgF,EAAAuH,aAEA9O,KAAAkD,MAAAgD,KAAAqB,GACAvH,KAAAkQ,eAAAL,EAAAtI,EAAAuH,YAAA,YACA,GAKAgB,EAAA9P,KAAAuP,gBAGAvP,KAAAkD,MAAAgD,KAAAgF,EAAA3D,KACA,KACAuI,EAAA9P,KAAAwP,iBAIA,IAAAxP,KAAAkD,MAAAX,QA6BAvC,KAAAkD,MAAAgD,KAAAgF,EAAA3D,IACAvH,KAAAkQ,eAAAL,EAAAC,EAAA,YACA,IAtBAL,EAAAzP,KAAA4G,OAAA5G,KAAAkD,MAAAX,OAAA,GAAAvC,KAAAgN,QACA0C,EAAA1P,KAAAkD,MAAA6M,OAAA,SAAAC,EAAAjN,GACA,OAAAiN,EAAAjN,EAAA+L,aACA,GACAa,EAAAF,EAAAzP,KAAA4I,gBAEAuH,KAAAC,IAAAN,EAAAG,GAAAE,KAAAC,IAAAV,EAAAC,IAEA3P,KAAAkQ,eAAAT,EAAAC,EAAA,YACA,IAIA1P,KAAAkD,MAAAgD,KAAAgF,EAAA3D,IACAvH,KAAAkQ,eAAAL,EAAAC,EAAA,YACA,KAiBAX,iBAAA,WACA,OAAA,EAAAnP,KAAA+G,QAWAmJ,eAAA,SAAAG,EAAAhD,GACA,IAEAiD,EACAC,EACAC,EACAC,EAEAC,EAPAC,EAAA3Q,KAAA0I,KACAmH,EAAA7P,KAAA4G,OAAA5G,KAAAkD,MAAAX,OAAA,GAAAvC,KAAAgN,cAQA,IAAAK,GAAA,CAAA,UAAA,SAAA,QAAAuD,QAAAvD,GAAA,KACAA,EAAA,QAIAkD,EAAAJ,KAAAU,IAAA7Q,KAAAkN,qBAAAiD,KAAAW,IAAAT,EAAArQ,KAAAmN,uBAOAmD,EALAD,IAAAE,EAKAV,GADA7P,KAAA+G,OAAAwJ,IACAV,EAAAQ,IAGArQ,KAAA+G,OAAAsJ,EACA,GAIArQ,KAAAkD,MAAAJ,QAAA,SAAAC,GACAA,EAAAwF,IAAAvI,KAAAuI,IACAxF,EAAA6D,MAAA7D,EAAA+L,YAAA9O,KAAA+G,OAAAuJ,EACAvN,EAAAgE,OAAA/G,KAAA+G,OAIAhE,EAAA2F,KAAAiI,EAEAA,GAAA5N,EAAA6D,MAAA5G,KAAAgN,SACAhN,MAGA,YAAAqN,GACAsD,GAAA3Q,KAAAgN,QAAAhN,KAAA0I,KACA8H,GAAAG,EAAA3Q,KAAA4G,OAAA5G,KAAAkD,MAAAX,OACAkO,EAAAzQ,KAAAkD,MAAA2L,IAAA,SAAA9L,EAAA9F,GACA,OAAAkT,KAAAY,OAAA9T,EAAA,GAAAuT,KAGA,IAAAxQ,KAAAkD,MAAAX,OAEAvC,KAAAkD,MAAA,GACA0D,OAAAuJ,KAAAY,MAAAP,GAIAxQ,KAAAkD,MAAAJ,QAAA,SAAAC,EAAA9F,GACA,EAAAA,GACA8F,EAAA2F,MAAA+H,EAAAxT,EAAA,GACA8F,EAAA6D,OAAA6J,EAAAxT,GAAAwT,EAAAxT,EAAA,IAEA8F,EAAA6D,OAAA6J,EAAAxT,MAIA,WAAAoQ,IAEAqD,GAAA1Q,KAAA4G,MAAA+J,GAAA,EACA3Q,KAAAkD,MAAAJ,QAAA,SAAAC,GACAA,EAAA2F,MAAAgI,EAAA1Q,KAAAgN,SACAhN,QAYAoP,cAAA,SAAA4B,EAAAzM,GAMA,iBAAAA,EACAvE,KAAAkQ,eAAA3L,EAAAvE,KAAAqN,kBAGArN,KAAAkQ,eAAAlQ,KAAA4I,gBAAA5I,KAAAqN,mBAWAI,SAAA,WACA,OAAAzN,KAAAkD","file":"fjGallery.min.js","sourcesContent":["/*!\n * Name : Flickr's Justified Gallery [fjGallery]\n * Version : 1.0.4\n * Author : nK <https://nkdev.info>\n * GitHub : https://github.com/nk-o/flickr-justified-gallery\n */\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(1);\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lite_ready__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\n // no conflict\n\nvar oldPlugin = global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery;\nglobal__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n\nglobal__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.noConflict = function () {\n global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery = oldPlugin;\n return this;\n}; // jQuery support\n\n\nif (typeof global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"] !== 'undefined') {\n // add data to jQuery .data('fjGallery')\n var oldInit = global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.init;\n\n global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.init = function () {\n this.jQcontainer = Object(global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"])(this.$container);\n this.jQcontainer.data('fjGallery', this);\n\n if (oldInit) {\n oldInit.call(this);\n }\n }; // remove data from jQuery .data('fjGallery')\n\n\n var oldDestroy = global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.destroy;\n\n global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.destroy = function () {\n if (this.jQcontainer) {\n this.jQcontainer.removeData('fjGallery');\n }\n\n if (oldDestroy) {\n oldDestroy.call(this);\n }\n };\n\n var jQueryPlugin = function jQueryPlugin() {\n var args = arguments || [];\n Array.prototype.unshift.call(args, this);\n var res = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"].apply(global__WEBPACK_IMPORTED_MODULE_1__[\"window\"], args);\n return _typeof(res) !== 'object' ? res : this;\n };\n\n jQueryPlugin.constructor = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructor; // no conflict\n\n var oldJqPlugin = global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery;\n global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery = jQueryPlugin;\n\n global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery.noConflict = function () {\n global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery = oldJqPlugin;\n return this;\n };\n} // .fj-gallery initialization\n\n\nlite_ready__WEBPACK_IMPORTED_MODULE_0___default()(function () {\n Object(_fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(document.querySelectorAll('.fj-gallery'));\n});\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (callback) {\n if (document.readyState === 'complete' || document.readyState === 'interactive') {\n // Already ready or interactive, execute callback\n callback.call();\n } else if (document.attachEvent) {\n // Old browsers\n document.attachEvent('onreadystatechange', function () {\n if (document.readyState === 'interactive') callback.call();\n });\n } else if (document.addEventListener) {\n // Modern browsers\n document.addEventListener('DOMContentLoaded', callback);\n }\n};\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global) {var win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\") {\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar g; // This works in non-strict mode\n\ng = function () {\n return this;\n}();\n\ntry {\n // This works if eval is allowed (see CSP)\n g = g || new Function(\"return this\")();\n} catch (e) {\n // This works if the window reference is available\n if ((typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\") g = window;\n} // g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\n\nmodule.exports = g;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var throttle_debounce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);\n/* harmony import */ var throttle_debounce__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(throttle_debounce__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var raf_schd__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);\n/* harmony import */ var merge__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8);\n/* harmony import */ var merge__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(merge__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lite_ready__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var justified_layout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10);\n/* harmony import */ var justified_layout__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(justified_layout__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_5__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\n\n // list with all fjGallery instances\n// need to render all in one scroll/resize event\n\nvar fjGalleryList = [];\n\nfunction updateFjGallery() {\n global__WEBPACK_IMPORTED_MODULE_5__[\"window\"].requestAnimationFrame(function () {\n fjGalleryList.forEach(function (item) {\n item.resize();\n });\n });\n}\n\nglobal__WEBPACK_IMPORTED_MODULE_5__[\"window\"].addEventListener('resize', updateFjGallery);\nglobal__WEBPACK_IMPORTED_MODULE_5__[\"window\"].addEventListener('orientationchange', updateFjGallery);\nglobal__WEBPACK_IMPORTED_MODULE_5__[\"window\"].addEventListener('load', updateFjGallery);\nlite_ready__WEBPACK_IMPORTED_MODULE_3___default()(function () {\n updateFjGallery();\n}); // get image dimensions\n// thanks https://gist.github.com/dimsemenov/5382856\n\nfunction getImgDimensions(img, cb) {\n var interval;\n var hasSize = false;\n var addedListeners = false;\n\n var onHasSize = function onHasSize() {\n if (hasSize) {\n cb(hasSize);\n return;\n }\n\n hasSize = {\n width: img.naturalWidth,\n height: img.naturalHeight\n };\n cb(hasSize);\n clearInterval(interval);\n\n if (addedListeners) {\n // eslint-disable-next-line no-use-before-define\n removeListeners();\n }\n };\n\n var onLoaded = function onLoaded() {\n onHasSize();\n };\n\n var onError = function onError() {\n onHasSize();\n };\n\n var checkSize = function checkSize() {\n if (img.naturalWidth > 0) {\n onHasSize();\n }\n };\n\n var addListeners = function addListeners() {\n addedListeners = true;\n img.addEventListener('load', onLoaded);\n img.addEventListener('error', onError);\n };\n\n var removeListeners = function removeListeners() {\n addedListeners = false;\n img.removeEventListener('load', onLoaded);\n img.removeEventListener('error', onError);\n };\n\n checkSize();\n\n if (!hasSize) {\n addListeners();\n interval = setInterval(checkSize, 100);\n }\n}\n\nvar instanceID = 0; // fjGallery class\n\nvar fjGallery = /*#__PURE__*/function () {\n function fjGallery(container, userOptions) {\n _classCallCheck(this, fjGallery);\n\n var self = this;\n self.instanceID = instanceID++;\n self.$container = container;\n self.images = [];\n self.defaults = {\n itemSelector: '.fj-gallery-item',\n imageSelector: 'img',\n gutter: 10,\n // supports object like `{ horizontal: 10, vertical: 10 }`.\n rowHeight: 320,\n rowHeightTolerance: 0.25,\n // [0, 1]\n resizeThrottle: 200,\n isRtl: self.css(self.$container, 'direction') === 'rtl',\n // events\n onInit: null,\n // function() {}\n onDestroy: null,\n // function() {}\n onAppendImages: null,\n // function() {}\n onBeforeJustify: null,\n // function() {}\n onJustify: null // function() {}\n\n }; // prepare data-options\n\n var dataOptions = self.$container.dataset || {};\n var pureDataOptions = {};\n Object.keys(dataOptions).forEach(function (key) {\n var loweCaseOption = key.substr(0, 1).toLowerCase() + key.substr(1);\n\n if (loweCaseOption && typeof self.defaults[loweCaseOption] !== 'undefined') {\n pureDataOptions[loweCaseOption] = dataOptions[key];\n }\n });\n self.options = merge__WEBPACK_IMPORTED_MODULE_2___default()({}, self.defaults, pureDataOptions, userOptions);\n self.pureOptions = merge__WEBPACK_IMPORTED_MODULE_2___default()({}, self.options); // throttle for resize\n\n self.resize = Object(throttle_debounce__WEBPACK_IMPORTED_MODULE_0__[\"throttle\"])(self.options.resizeThrottle, self.resize);\n self.justify = Object(raf_schd__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(self.justify);\n self.init();\n } // add styles to element\n\n\n _createClass(fjGallery, [{\n key: \"css\",\n value: function css(el, styles) {\n if (typeof styles === 'string') {\n return global__WEBPACK_IMPORTED_MODULE_5__[\"window\"].getComputedStyle(el).getPropertyValue(styles);\n } // add transform property with vendor prefix\n\n\n if (styles.transform) {\n styles['-webkit-transform'] = styles.transform;\n }\n\n Object.keys(styles).forEach(function (key) {\n el.style[key] = styles[key];\n });\n return el;\n } // add to fjGallery instances list\n\n }, {\n key: \"addToFjGalleryList\",\n value: function addToFjGalleryList() {\n fjGalleryList.push(this);\n updateFjGallery();\n } // remove from fjGallery instances list\n\n }, {\n key: \"removeFromFjGalleryList\",\n value: function removeFromFjGalleryList() {\n var self = this;\n fjGalleryList.forEach(function (item, key) {\n if (item.instanceID === self.instanceID) {\n fjGalleryList.splice(key, 1);\n }\n });\n }\n }, {\n key: \"init\",\n value: function init() {\n var self = this;\n self.appendImages(self.$container.querySelectorAll(self.options.itemSelector));\n self.addToFjGalleryList(); // call onInit event\n\n if (self.options.onInit) {\n self.options.onInit.call(self);\n }\n } // append images\n\n }, {\n key: \"appendImages\",\n value: function appendImages($images) {\n var self = this; // check if jQuery\n\n if (global__WEBPACK_IMPORTED_MODULE_5__[\"window\"].jQuery && $images instanceof global__WEBPACK_IMPORTED_MODULE_5__[\"window\"].jQuery) {\n $images = $images.get();\n }\n\n if (!$images || !$images.length) {\n return;\n }\n\n $images.forEach(function ($item) {\n // if $images is jQuery, for some reason in this array there is undefined item, that not a DOM,\n // so we need to check for $item.querySelector.\n if ($item && !$item.fjGalleryImage && $item.querySelector) {\n var $image = $item.querySelector(self.options.imageSelector);\n\n if ($image) {\n $item.fjGalleryImage = self;\n var data = {\n $item: $item,\n $image: $image,\n width: parseFloat($image.getAttribute('width')) || false,\n height: parseFloat($image.getAttribute('height')) || false,\n loadSizes: function loadSizes() {\n var itemData = this;\n getImgDimensions($image, function (dimensions) {\n if (itemData.width !== dimensions.width || itemData.height !== dimensions.height) {\n itemData.width = dimensions.width;\n itemData.height = dimensions.height;\n self.resize();\n }\n });\n }\n };\n data.loadSizes();\n self.images.push(data);\n }\n }\n }); // call onAppendImages event\n\n if (self.options.onAppendImages) {\n self.options.onAppendImages.call(self, [$images]);\n }\n\n self.justify();\n } // justify images\n\n }, {\n key: \"justify\",\n value: function justify() {\n var self = this;\n var justifyArray = []; // call onBeforeJustify event\n\n if (self.options.onBeforeJustify) {\n self.options.onBeforeJustify.call(self);\n }\n\n self.images.forEach(function (data) {\n if (data.width && data.height) {\n justifyArray.push(data.width / data.height);\n }\n });\n var justifiedData = justified_layout__WEBPACK_IMPORTED_MODULE_4___default()(justifyArray, {\n containerWidth: self.$container.getBoundingClientRect().width,\n containerPadding: {\n top: parseFloat(self.css(self.$container, 'padding-top')) || 0,\n right: parseFloat(self.css(self.$container, 'padding-right')) || 0,\n bottom: parseFloat(self.css(self.$container, 'padding-bottom')) || 0,\n left: parseFloat(self.css(self.$container, 'padding-left')) || 0\n },\n boxSpacing: self.options.gutter,\n targetRowHeight: self.options.rowHeight,\n targetRowHeightTolerance: self.options.rowHeightTolerance\n });\n self.css(self.$container, {\n height: \"\".concat(justifiedData.containerHeight, \"px\")\n });\n var i = 0;\n self.images.forEach(function (data) {\n if (data.width && data.height) {\n self.css(data.$item, {\n position: 'absolute',\n transform: \"translateX(\".concat((self.options.isRtl ? -1 : 1) * justifiedData.boxes[i].left, \"px) translateY(\").concat(justifiedData.boxes[i].top, \"px) translateZ(0)\"),\n width: \"\".concat(justifiedData.boxes[i].width, \"px\"),\n height: \"\".concat(justifiedData.boxes[i].height, \"px\")\n });\n i++;\n }\n }); // call onJustify event\n\n if (self.options.onJustify) {\n self.options.onJustify.call(self);\n }\n } // update options and resize gallery items\n\n }, {\n key: \"updateOptions\",\n value: function updateOptions(options) {\n var self = this;\n self.options = merge__WEBPACK_IMPORTED_MODULE_2___default()({}, self.options, options);\n self.justify();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var self = this;\n self.removeFromFjGalleryList(); // call onDestroy event\n\n if (self.options.onDestroy) {\n self.options.onDestroy.call(self);\n } // remove styles.\n\n\n self.css(self.$container, {\n height: ''\n });\n self.images.forEach(function (data) {\n self.css(data.$item, {\n position: '',\n transform: '',\n width: '',\n height: ''\n });\n }); // delete fjGalleryImage instance from images\n\n self.images.forEach(function (val) {\n delete val.$item.fjGalleryImage;\n }); // delete fjGallery instance from container\n\n delete self.$container.fjGallery;\n }\n }, {\n key: \"resize\",\n value: function resize() {\n var self = this;\n self.justify();\n }\n }]);\n\n return fjGallery;\n}(); // global definition\n\n\nvar plugin = function plugin(items) {\n // check for dom element\n // thanks: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n if ((typeof HTMLElement === \"undefined\" ? \"undefined\" : _typeof(HTMLElement)) === 'object' ? items instanceof HTMLElement : items && _typeof(items) === 'object' && items !== null && items.nodeType === 1 && typeof items.nodeName === 'string') {\n items = [items];\n }\n\n var options = arguments[1];\n var args = Array.prototype.slice.call(arguments, 2);\n var len = items.length;\n var k = 0;\n var ret;\n\n for (k; k < len; k++) {\n if (_typeof(options) === 'object' || typeof options === 'undefined') {\n if (!items[k].fjGallery) {\n // eslint-disable-next-line new-cap\n items[k].fjGallery = new fjGallery(items[k], options);\n }\n } else if (items[k].fjGallery) {\n // eslint-disable-next-line prefer-spread\n ret = items[k].fjGallery[options].apply(items[k].fjGallery, args);\n }\n\n if (typeof ret !== 'undefined') {\n return ret;\n }\n }\n\n return items;\n};\n\nplugin.constructor = fjGallery;\n/* harmony default export */ __webpack_exports__[\"default\"] = (plugin);\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n(function (global, factory) {\n ( false ? undefined : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? factory(exports) : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : (undefined);\n})(this, function (exports) {\n 'use strict';\n /* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n /**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {boolean} [noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n * the internal counter is reset).\n * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the throttled-function is executed.\n * @param {boolean} [debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n * schedule `callback` to execute after `delay` ms.\n *\n * @returns {Function} A new, throttled, function.\n */\n\n function throttle(delay, noTrailing, callback, debounceMode) {\n /*\n * After wrapper has stopped being called, this timeout ensures that\n * `callback` is executed at the proper times in `throttle` and `end`\n * debounce modes.\n */\n var timeoutID;\n var cancelled = false; // Keep track of the last time `callback` was executed.\n\n var lastExec = 0; // Function to clear existing timeout\n\n function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec\n\n\n function cancel() {\n clearExistingTimeout();\n cancelled = true;\n } // `noTrailing` defaults to falsy.\n\n\n if (typeof noTrailing !== 'boolean') {\n debounceMode = callback;\n callback = noTrailing;\n noTrailing = undefined;\n }\n /*\n * The `wrapper` function encapsulates all of the throttling / debouncing\n * functionality and when executed will limit the rate at which `callback`\n * is executed.\n */\n\n\n function wrapper() {\n for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n arguments_[_key] = arguments[_key];\n }\n\n var self = this;\n var elapsed = Date.now() - lastExec;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, arguments_);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }\n\n wrapper.cancel = cancel; // Return the wrapper function.\n\n return wrapper;\n }\n /* eslint-disable no-undefined */\n\n /**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {boolean} [atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the debounced-function is executed.\n *\n * @returns {Function} A new, debounced function.\n */\n\n\n function debounce(delay, atBegin, callback) {\n return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);\n }\n\n exports.debounce = debounce;\n exports.throttle = throttle;\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n});\n\n/***/ }),\n/* 7 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar rafSchd = function rafSchd(fn) {\n var lastArgs = [];\n var frameId = null;\n\n var wrapperFn = function wrapperFn() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n lastArgs = args;\n\n if (frameId) {\n return;\n }\n\n frameId = requestAnimationFrame(function () {\n frameId = null;\n fn.apply(void 0, lastArgs);\n });\n };\n\n wrapperFn.cancel = function () {\n if (!frameId) {\n return;\n }\n\n cancelAnimationFrame(frameId);\n frameId = null;\n };\n\n return wrapperFn;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (rafSchd);\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module) {function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*!\r\n * @name JavaScript/NodeJS Merge v1.2.1\r\n * @author yeikos\r\n * @repository https://github.com/yeikos/js.merge\r\n\r\n * Copyright 2014 yeikos - MIT license\r\n * https://raw.github.com/yeikos/js.merge/master/LICENSE\r\n */\n;\n\n(function (isNode) {\n /**\r\n * Merge one or more objects \r\n * @param bool? clone\r\n * @param mixed,... arguments\r\n * @return object\r\n */\n var Public = function Public(clone) {\n return merge(clone === true, false, arguments);\n },\n publicName = 'merge';\n /**\r\n * Merge two or more objects recursively \r\n * @param bool? clone\r\n * @param mixed,... arguments\r\n * @return object\r\n */\n\n\n Public.recursive = function (clone) {\n return merge(clone === true, true, arguments);\n };\n /**\r\n * Clone the input removing any reference\r\n * @param mixed input\r\n * @return mixed\r\n */\n\n\n Public.clone = function (input) {\n var output = input,\n type = typeOf(input),\n index,\n size;\n\n if (type === 'array') {\n output = [];\n size = input.length;\n\n for (index = 0; index < size; ++index) {\n output[index] = Public.clone(input[index]);\n }\n } else if (type === 'object') {\n output = {};\n\n for (index in input) {\n output[index] = Public.clone(input[index]);\n }\n }\n\n return output;\n };\n /**\r\n * Merge two objects recursively\r\n * @param mixed input\r\n * @param mixed extend\r\n * @return mixed\r\n */\n\n\n function merge_recursive(base, extend) {\n if (typeOf(base) !== 'object') return extend;\n\n for (var key in extend) {\n if (typeOf(base[key]) === 'object' && typeOf(extend[key]) === 'object') {\n base[key] = merge_recursive(base[key], extend[key]);\n } else {\n base[key] = extend[key];\n }\n }\n\n return base;\n }\n /**\r\n * Merge two or more objects\r\n * @param bool clone\r\n * @param bool recursive\r\n * @param array argv\r\n * @return object\r\n */\n\n\n function merge(clone, recursive, argv) {\n var result = argv[0],\n size = argv.length;\n if (clone || typeOf(result) !== 'object') result = {};\n\n for (var index = 0; index < size; ++index) {\n var item = argv[index],\n type = typeOf(item);\n if (type !== 'object') continue;\n\n for (var key in item) {\n if (key === '__proto__') continue;\n var sitem = clone ? Public.clone(item[key]) : item[key];\n\n if (recursive) {\n result[key] = merge_recursive(result[key], sitem);\n } else {\n result[key] = sitem;\n }\n }\n }\n\n return result;\n }\n /**\r\n * Get type of variable\r\n * @param mixed input\r\n * @return string\r\n *\r\n * @see http://jsperf.com/typeofvar\r\n */\n\n\n function typeOf(input) {\n return {}.toString.call(input).slice(8, -1).toLowerCase();\n }\n\n if (isNode) {\n module.exports = Public;\n } else {\n window[publicName] = Public;\n }\n})(( false ? undefined : _typeof(module)) === 'object' && module && _typeof(module.exports) === 'object' && module.exports);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(9)(module)))\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*!\n * Copyright 2019 SmugMug, Inc.\n * Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.\n * @license\n */\n\n\nvar merge = __webpack_require__(8),\n Row = __webpack_require__(11);\n/**\n * Create a new, empty row.\n *\n * @method createNewRow\n * @param layoutConfig {Object} The layout configuration\n * @param layoutData {Object} The current state of the layout\n * @return A new, empty row of the type specified by this layout.\n */\n\n\nfunction createNewRow(layoutConfig, layoutData) {\n var isBreakoutRow; // Work out if this is a full width breakout row\n\n if (layoutConfig.fullWidthBreakoutRowCadence !== false) {\n if ((layoutData._rows.length + 1) % layoutConfig.fullWidthBreakoutRowCadence === 0) {\n isBreakoutRow = true;\n }\n }\n\n return new Row({\n top: layoutData._containerHeight,\n left: layoutConfig.containerPadding.left,\n width: layoutConfig.containerWidth - layoutConfig.containerPadding.left - layoutConfig.containerPadding.right,\n spacing: layoutConfig.boxSpacing.horizontal,\n targetRowHeight: layoutConfig.targetRowHeight,\n targetRowHeightTolerance: layoutConfig.targetRowHeightTolerance,\n edgeCaseMinRowHeight: 0.5 * layoutConfig.targetRowHeight,\n edgeCaseMaxRowHeight: 2 * layoutConfig.targetRowHeight,\n rightToLeft: false,\n isBreakoutRow: isBreakoutRow,\n widowLayoutStyle: layoutConfig.widowLayoutStyle\n });\n}\n/**\n * Add a completed row to the layout.\n * Note: the row must have already been completed.\n *\n * @method addRow\n * @param layoutConfig {Object} The layout configuration\n * @param layoutData {Object} The current state of the layout\n * @param row {Row} The row to add.\n * @return {Array} Each item added to the row.\n */\n\n\nfunction addRow(layoutConfig, layoutData, row) {\n layoutData._rows.push(row);\n\n layoutData._layoutItems = layoutData._layoutItems.concat(row.getItems()); // Increment the container height\n\n layoutData._containerHeight += row.height + layoutConfig.boxSpacing.vertical;\n return row.items;\n}\n/**\n * Calculate the current layout for all items in the list that require layout.\n * \"Layout\" means geometry: position within container and size\n *\n * @method computeLayout\n * @param layoutConfig {Object} The layout configuration\n * @param layoutData {Object} The current state of the layout\n * @param itemLayoutData {Array} Array of items to lay out, with data required to lay out each item\n * @return {Object} The newly-calculated layout, containing the new container height, and lists of layout items\n */\n\n\nfunction computeLayout(layoutConfig, layoutData, itemLayoutData) {\n var laidOutItems = [],\n itemAdded,\n currentRow,\n nextToLastRowHeight; // Apply forced aspect ratio if specified, and set a flag.\n\n if (layoutConfig.forceAspectRatio) {\n itemLayoutData.forEach(function (itemData) {\n itemData.forcedAspectRatio = true;\n itemData.aspectRatio = layoutConfig.forceAspectRatio;\n });\n } // Loop through the items\n\n\n itemLayoutData.some(function (itemData, i) {\n if (isNaN(itemData.aspectRatio)) {\n throw new Error(\"Item \" + i + \" has an invalid aspect ratio\");\n } // If not currently building up a row, make a new one.\n\n\n if (!currentRow) {\n currentRow = createNewRow(layoutConfig, layoutData);\n } // Attempt to add item to the current row.\n\n\n itemAdded = currentRow.addItem(itemData);\n\n if (currentRow.isLayoutComplete()) {\n // Row is filled; add it and start a new one\n laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));\n\n if (layoutData._rows.length >= layoutConfig.maxNumRows) {\n currentRow = null;\n return true;\n }\n\n currentRow = createNewRow(layoutConfig, layoutData); // Item was rejected; add it to its own row\n\n if (!itemAdded) {\n itemAdded = currentRow.addItem(itemData);\n\n if (currentRow.isLayoutComplete()) {\n // If the rejected item fills a row on its own, add the row and start another new one\n laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));\n\n if (layoutData._rows.length >= layoutConfig.maxNumRows) {\n currentRow = null;\n return true;\n }\n\n currentRow = createNewRow(layoutConfig, layoutData);\n }\n }\n }\n }); // Handle any leftover content (orphans) depending on where they lie\n // in this layout update, and in the total content set.\n\n if (currentRow && currentRow.getItems().length && layoutConfig.showWidows) {\n // Last page of all content or orphan suppression is suppressed; lay out orphans.\n if (layoutData._rows.length) {\n // Only Match previous row's height if it exists and it isn't a breakout row\n if (layoutData._rows[layoutData._rows.length - 1].isBreakoutRow) {\n nextToLastRowHeight = layoutData._rows[layoutData._rows.length - 1].targetRowHeight;\n } else {\n nextToLastRowHeight = layoutData._rows[layoutData._rows.length - 1].height;\n }\n\n currentRow.forceComplete(false, nextToLastRowHeight);\n } else {\n // ...else use target height if there is no other row height to reference.\n currentRow.forceComplete(false);\n }\n\n laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));\n layoutConfig._widowCount = currentRow.getItems().length;\n } // We need to clean up the bottom container padding\n // First remove the height added for box spacing\n\n\n layoutData._containerHeight = layoutData._containerHeight - layoutConfig.boxSpacing.vertical; // Then add our bottom container padding\n\n layoutData._containerHeight = layoutData._containerHeight + layoutConfig.containerPadding.bottom;\n return {\n containerHeight: layoutData._containerHeight,\n widowCount: layoutConfig._widowCount,\n boxes: layoutData._layoutItems\n };\n}\n/**\n * Takes in a bunch of box data and config. Returns\n * geometry to lay them out in a justified view.\n *\n * @method covertSizesToAspectRatios\n * @param sizes {Array} Array of objects with widths and heights\n * @return {Array} A list of aspect ratios\n */\n\n\nmodule.exports = function (input, config) {\n var layoutConfig = {};\n var layoutData = {}; // Defaults\n\n var defaults = {\n containerWidth: 1060,\n containerPadding: 10,\n boxSpacing: 10,\n targetRowHeight: 320,\n targetRowHeightTolerance: 0.25,\n maxNumRows: Number.POSITIVE_INFINITY,\n forceAspectRatio: false,\n showWidows: true,\n fullWidthBreakoutRowCadence: false,\n widowLayoutStyle: 'left'\n };\n var containerPadding = {};\n var boxSpacing = {};\n config = config || {}; // Merge defaults and config passed in\n\n layoutConfig = merge(defaults, config); // Sort out padding and spacing values\n\n containerPadding.top = !isNaN(parseFloat(layoutConfig.containerPadding.top)) ? layoutConfig.containerPadding.top : layoutConfig.containerPadding;\n containerPadding.right = !isNaN(parseFloat(layoutConfig.containerPadding.right)) ? layoutConfig.containerPadding.right : layoutConfig.containerPadding;\n containerPadding.bottom = !isNaN(parseFloat(layoutConfig.containerPadding.bottom)) ? layoutConfig.containerPadding.bottom : layoutConfig.containerPadding;\n containerPadding.left = !isNaN(parseFloat(layoutConfig.containerPadding.left)) ? layoutConfig.containerPadding.left : layoutConfig.containerPadding;\n boxSpacing.horizontal = !isNaN(parseFloat(layoutConfig.boxSpacing.horizontal)) ? layoutConfig.boxSpacing.horizontal : layoutConfig.boxSpacing;\n boxSpacing.vertical = !isNaN(parseFloat(layoutConfig.boxSpacing.vertical)) ? layoutConfig.boxSpacing.vertical : layoutConfig.boxSpacing;\n layoutConfig.containerPadding = containerPadding;\n layoutConfig.boxSpacing = boxSpacing; // Local\n\n layoutData._layoutItems = [];\n layoutData._awakeItems = [];\n layoutData._inViewportItems = [];\n layoutData._leadingOrphans = [];\n layoutData._trailingOrphans = [];\n layoutData._containerHeight = layoutConfig.containerPadding.top;\n layoutData._rows = [];\n layoutData._orphans = [];\n layoutConfig._widowCount = 0; // Convert widths and heights to aspect ratios if we need to\n\n return computeLayout(layoutConfig, layoutData, input.map(function (item) {\n if (item.width && item.height) {\n return {\n aspectRatio: item.width / item.height\n };\n } else {\n return {\n aspectRatio: item\n };\n }\n }));\n};\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*!\n * Copyright 2019 SmugMug, Inc.\n * Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.\n * @license\n */\nvar merge = __webpack_require__(8);\n/**\n * Row\n * Wrapper for each row in a justified layout.\n * Stores relevant values and provides methods for calculating layout of individual rows.\n *\n * @param {Object} layoutConfig - The same as that passed\n * @param {Object} Initialization parameters. The following are all required:\n * @param params.top {Number} Top of row, relative to container\n * @param params.left {Number} Left side of row relative to container (equal to container left padding)\n * @param params.width {Number} Width of row, not including container padding\n * @param params.spacing {Number} Horizontal spacing between items\n * @param params.targetRowHeight {Number} Layout algorithm will aim for this row height\n * @param params.targetRowHeightTolerance {Number} Row heights may vary +/- (`targetRowHeight` x `targetRowHeightTolerance`)\n * @param params.edgeCaseMinRowHeight {Number} Absolute minimum row height for edge cases that cannot be resolved within tolerance.\n * @param params.edgeCaseMaxRowHeight {Number} Absolute maximum row height for edge cases that cannot be resolved within tolerance.\n * @param params.isBreakoutRow {Boolean} Is this row in particular one of those breakout rows? Always false if it's not that kind of photo list\n * @param params.widowLayoutStyle {String} If widows are visible, how should they be laid out?\n * @constructor\n */\n\n\nvar Row = module.exports = function (params) {\n // Top of row, relative to container\n this.top = params.top; // Left side of row relative to container (equal to container left padding)\n\n this.left = params.left; // Width of row, not including container padding\n\n this.width = params.width; // Horizontal spacing between items\n\n this.spacing = params.spacing; // Row height calculation values\n\n this.targetRowHeight = params.targetRowHeight;\n this.targetRowHeightTolerance = params.targetRowHeightTolerance;\n this.minAspectRatio = this.width / params.targetRowHeight * (1 - params.targetRowHeightTolerance);\n this.maxAspectRatio = this.width / params.targetRowHeight * (1 + params.targetRowHeightTolerance); // Edge case row height minimum/maximum\n\n this.edgeCaseMinRowHeight = params.edgeCaseMinRowHeight;\n this.edgeCaseMaxRowHeight = params.edgeCaseMaxRowHeight; // Widow layout direction\n\n this.widowLayoutStyle = params.widowLayoutStyle; // Full width breakout rows\n\n this.isBreakoutRow = params.isBreakoutRow; // Store layout data for each item in row\n\n this.items = []; // Height remains at 0 until it's been calculated\n\n this.height = 0;\n};\n\nRow.prototype = {\n /**\n * Attempt to add a single item to the row.\n * This is the heart of the justified algorithm.\n * This method is direction-agnostic; it deals only with sizes, not positions.\n *\n * If the item fits in the row, without pushing row height beyond min/max tolerance,\n * the item is added and the method returns true.\n *\n * If the item leaves row height too high, there may be room to scale it down and add another item.\n * In this case, the item is added and the method returns true, but the row is incomplete.\n *\n * If the item leaves row height too short, there are too many items to fit within tolerance.\n * The method will either accept or reject the new item, favoring the resulting row height closest to within tolerance.\n * If the item is rejected, left/right padding will be required to fit the row height within tolerance;\n * if the item is accepted, top/bottom cropping will be required to fit the row height within tolerance.\n *\n * @method addItem\n * @param itemData {Object} Item layout data, containing item aspect ratio.\n * @return {Boolean} True if successfully added; false if rejected.\n */\n addItem: function addItem(itemData) {\n var newItems = this.items.concat(itemData),\n // Calculate aspect ratios for items only; exclude spacing\n rowWidthWithoutSpacing = this.width - (newItems.length - 1) * this.spacing,\n newAspectRatio = newItems.reduce(function (sum, item) {\n return sum + item.aspectRatio;\n }, 0),\n targetAspectRatio = rowWidthWithoutSpacing / this.targetRowHeight,\n previousRowWidthWithoutSpacing,\n previousAspectRatio,\n previousTargetAspectRatio; // Handle big full-width breakout photos if we're doing them\n\n if (this.isBreakoutRow) {\n // Only do it if there's no other items in this row\n if (this.items.length === 0) {\n // Only go full width if this photo is a square or landscape\n if (itemData.aspectRatio >= 1) {\n // Close out the row with a full width photo\n this.items.push(itemData);\n this.completeLayout(rowWidthWithoutSpacing / itemData.aspectRatio, 'justify');\n return true;\n }\n }\n }\n\n if (newAspectRatio < this.minAspectRatio) {\n // New aspect ratio is too narrow / scaled row height is too tall.\n // Accept this item and leave row open for more items.\n this.items.push(merge(itemData));\n return true;\n } else if (newAspectRatio > this.maxAspectRatio) {\n // New aspect ratio is too wide / scaled row height will be too short.\n // Accept item if the resulting aspect ratio is closer to target than it would be without the item.\n // NOTE: Any row that falls into this block will require cropping/padding on individual items.\n if (this.items.length === 0) {\n // When there are no existing items, force acceptance of the new item and complete the layout.\n // This is the pano special case.\n this.items.push(merge(itemData));\n this.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');\n return true;\n } // Calculate width/aspect ratio for row before adding new item\n\n\n previousRowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing;\n previousAspectRatio = this.items.reduce(function (sum, item) {\n return sum + item.aspectRatio;\n }, 0);\n previousTargetAspectRatio = previousRowWidthWithoutSpacing / this.targetRowHeight;\n\n if (Math.abs(newAspectRatio - targetAspectRatio) > Math.abs(previousAspectRatio - previousTargetAspectRatio)) {\n // Row with new item is us farther away from target than row without; complete layout and reject item.\n this.completeLayout(previousRowWidthWithoutSpacing / previousAspectRatio, 'justify');\n return false;\n } else {\n // Row with new item is us closer to target than row without;\n // accept the new item and complete the row layout.\n this.items.push(merge(itemData));\n this.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');\n return true;\n }\n } else {\n // New aspect ratio / scaled row height is within tolerance;\n // accept the new item and complete the row layout.\n this.items.push(merge(itemData));\n this.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');\n return true;\n }\n },\n\n /**\n * Check if a row has completed its layout.\n *\n * @method isLayoutComplete\n * @return {Boolean} True if complete; false if not.\n */\n isLayoutComplete: function isLayoutComplete() {\n return this.height > 0;\n },\n\n /**\n * Set row height and compute item geometry from that height.\n * Will justify items within the row unless instructed not to.\n *\n * @method completeLayout\n * @param newHeight {Number} Set row height to this value.\n * @param widowLayoutStyle {String} How should widows display? Supported: left | justify | center\n */\n completeLayout: function completeLayout(newHeight, widowLayoutStyle) {\n var itemWidthSum = this.left,\n rowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing,\n clampedToNativeRatio,\n clampedHeight,\n errorWidthPerItem,\n roundedCumulativeErrors,\n singleItemGeometry,\n centerOffset; // Justify unless explicitly specified otherwise.\n\n if (typeof widowLayoutStyle === 'undefined' || ['justify', 'center', 'left'].indexOf(widowLayoutStyle) < 0) {\n widowLayoutStyle = 'left';\n } // Clamp row height to edge case minimum/maximum.\n\n\n clampedHeight = Math.max(this.edgeCaseMinRowHeight, Math.min(newHeight, this.edgeCaseMaxRowHeight));\n\n if (newHeight !== clampedHeight) {\n // If row height was clamped, the resulting row/item aspect ratio will be off,\n // so force it to fit the width (recalculate aspectRatio to match clamped height).\n // NOTE: this will result in cropping/padding commensurate to the amount of clamping.\n this.height = clampedHeight;\n clampedToNativeRatio = rowWidthWithoutSpacing / clampedHeight / (rowWidthWithoutSpacing / newHeight);\n } else {\n // If not clamped, leave ratio at 1.0.\n this.height = newHeight;\n clampedToNativeRatio = 1.0;\n } // Compute item geometry based on newHeight.\n\n\n this.items.forEach(function (item) {\n item.top = this.top;\n item.width = item.aspectRatio * this.height * clampedToNativeRatio;\n item.height = this.height; // Left-to-right.\n // TODO right to left\n // item.left = this.width - itemWidthSum - item.width;\n\n item.left = itemWidthSum; // Increment width.\n\n itemWidthSum += item.width + this.spacing;\n }, this); // If specified, ensure items fill row and distribute error\n // caused by rounding width and height across all items.\n\n if (widowLayoutStyle === 'justify') {\n itemWidthSum -= this.spacing + this.left;\n errorWidthPerItem = (itemWidthSum - this.width) / this.items.length;\n roundedCumulativeErrors = this.items.map(function (item, i) {\n return Math.round((i + 1) * errorWidthPerItem);\n });\n\n if (this.items.length === 1) {\n // For rows with only one item, adjust item width to fill row.\n singleItemGeometry = this.items[0];\n singleItemGeometry.width -= Math.round(errorWidthPerItem);\n } else {\n // For rows with multiple items, adjust item width and shift items to fill the row,\n // while maintaining equal spacing between items in the row.\n this.items.forEach(function (item, i) {\n if (i > 0) {\n item.left -= roundedCumulativeErrors[i - 1];\n item.width -= roundedCumulativeErrors[i] - roundedCumulativeErrors[i - 1];\n } else {\n item.width -= roundedCumulativeErrors[i];\n }\n });\n }\n } else if (widowLayoutStyle === 'center') {\n // Center widows\n centerOffset = (this.width - itemWidthSum) / 2;\n this.items.forEach(function (item) {\n item.left += centerOffset + this.spacing;\n }, this);\n }\n },\n\n /**\n * Force completion of row layout with current items.\n *\n * @method forceComplete\n * @param fitToWidth {Boolean} Stretch current items to fill the row width.\n * This will likely result in padding.\n * @param fitToWidth {Number}\n */\n forceComplete: function forceComplete(fitToWidth, rowHeight) {\n // TODO Handle fitting to width\n // var rowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing,\n // \tcurrentAspectRatio = this.items.reduce(function (sum, item) {\n // \t\treturn sum + item.aspectRatio;\n // \t}, 0);\n if (typeof rowHeight === 'number') {\n this.completeLayout(rowHeight, this.widowLayoutStyle);\n } else {\n // Complete using target row height.\n this.completeLayout(this.targetRowHeight, this.widowLayoutStyle);\n }\n },\n\n /**\n * Return layout data for items within row.\n * Note: returns actual list, not a copy.\n *\n * @method getItems\n * @return Layout data for items within row.\n */\n getItems: function getItems() {\n return this.items;\n }\n};\n\n/***/ })\n/******/ ]);"]}
|
class-visual-portfolio.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Â
/**
|
3 |
Â
* Plugin Name: Visual Portfolio
|
4 |
Â
* Description: Portfolio post type with visual editor
|
5 |
-
* Version: 2.
|
6 |
Â
* Author: nK
|
7 |
Â
* Author URI: https://nkdev.info
|
8 |
Â
* License: GPLv2 or later
|
2 |
Â
/**
|
3 |
Â
* Plugin Name: Visual Portfolio
|
4 |
Â
* Description: Portfolio post type with visual editor
|
5 |
+
* Version: 2.7.0
|
6 |
Â
* Author: nK
|
7 |
Â
* Author URI: https://nkdev.info
|
8 |
Â
* License: GPLv2 or later
|
classes/class-admin.php
CHANGED
@@ -42,9 +42,9 @@ class Visual_Portfolio_Admin {
|
|
42 |
Â
'nonce' => wp_create_nonce( 'vp-ajax-nonce' ),
|
43 |
Â
);
|
44 |
Â
|
45 |
-
wp_enqueue_script( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/js/script.min.js', array( 'jquery', 'wp-data' ), '2.
|
46 |
Â
wp_localize_script( 'visual-portfolio-admin', 'VPAdminVariables', $data_init );
|
47 |
-
wp_enqueue_style( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/css/style.min.css', array(), '2.
|
48 |
Â
wp_style_add_data( 'visual-portfolio-admin', 'rtl', 'replace' );
|
49 |
Â
wp_style_add_data( 'visual-portfolio-admin', 'suffix', '.min' );
|
50 |
Â
}
|
@@ -58,8 +58,8 @@ class Visual_Portfolio_Admin {
|
|
58 |
Â
);
|
59 |
Â
|
60 |
Â
if ( 'vp_lists' === get_post_type() ) {
|
61 |
-
wp_enqueue_script( 'visual-portfolio-saved-layouts', visual_portfolio()->plugin_url . 'gutenberg/layouts-editor.min.js', array( 'jquery' ), '2.
|
62 |
-
wp_enqueue_style( 'visual-portfolio-saved-layouts', visual_portfolio()->plugin_url . 'gutenberg/layouts-editor.min.css', array(), '2.
|
63 |
Â
wp_style_add_data( 'visual-portfolio-saved-layouts', 'rtl', 'replace' );
|
64 |
Â
wp_style_add_data( 'visual-portfolio-saved-layouts', 'suffix', '.min' );
|
65 |
Â
|
42 |
Â
'nonce' => wp_create_nonce( 'vp-ajax-nonce' ),
|
43 |
Â
);
|
44 |
Â
|
45 |
+
wp_enqueue_script( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/js/script.min.js', array( 'jquery', 'wp-data' ), '2.7.0', true );
|
46 |
Â
wp_localize_script( 'visual-portfolio-admin', 'VPAdminVariables', $data_init );
|
47 |
+
wp_enqueue_style( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/css/style.min.css', array(), '2.7.0' );
|
48 |
Â
wp_style_add_data( 'visual-portfolio-admin', 'rtl', 'replace' );
|
49 |
Â
wp_style_add_data( 'visual-portfolio-admin', 'suffix', '.min' );
|
50 |
Â
}
|
58 |
Â
);
|
59 |
Â
|
60 |
Â
if ( 'vp_lists' === get_post_type() ) {
|
61 |
+
wp_enqueue_script( 'visual-portfolio-saved-layouts', visual_portfolio()->plugin_url . 'gutenberg/layouts-editor.min.js', array( 'jquery' ), '2.7.0', true );
|
62 |
+
wp_enqueue_style( 'visual-portfolio-saved-layouts', visual_portfolio()->plugin_url . 'gutenberg/layouts-editor.min.css', array(), '2.7.0' );
|
63 |
Â
wp_style_add_data( 'visual-portfolio-saved-layouts', 'rtl', 'replace' );
|
64 |
Â
wp_style_add_data( 'visual-portfolio-saved-layouts', 'suffix', '.min' );
|
65 |
Â
|
classes/class-assets.php
CHANGED
@@ -98,11 +98,11 @@ class Visual_Portfolio_Assets {
|
|
98 |
Â
foreach ( self::$stored_assets[ $type ] as $name => $data ) {
|
99 |
Â
if ( isset( $data['value'] ) && $data['value'] ) {
|
100 |
Â
if ( 'script' === $type ) {
|
101 |
-
wp_enqueue_script( $name, '', array(), '2.
|
102 |
Â
} elseif ( is_string( $data['value'] ) ) {
|
103 |
-
visual_portfolio()->include_template_style( $name, $data['value'], array(), '2.
|
104 |
Â
} else {
|
105 |
-
wp_enqueue_style( $name, '', array(), '2.
|
106 |
Â
}
|
107 |
Â
|
108 |
Â
self::$stored_assets[ $type ]['value'] = false;
|
@@ -164,6 +164,11 @@ class Visual_Portfolio_Assets {
|
|
164 |
Â
self::store_used_assets( 'visual-portfolio-custom-scrollbar', true, 'script' );
|
165 |
Â
self::store_used_assets( 'visual-portfolio-custom-scrollbar', true, 'style' );
|
166 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
167 |
Â
// Items Style.
|
168 |
Â
if ( $options['items_style'] ) {
|
169 |
Â
$items_style_pref = '';
|
@@ -254,7 +259,7 @@ class Visual_Portfolio_Assets {
|
|
254 |
Â
$dynamic_styles = Visual_Portfolio_Controls_Dynamic_CSS::get( $options );
|
255 |
Â
$controls_css_handle = 'vp-dynamic-styles-' . $options['id'];
|
256 |
Â
|
257 |
-
wp_register_style( $controls_css_handle, false, array(), '2.
|
258 |
Â
wp_enqueue_style( $controls_css_handle );
|
259 |
Â
wp_add_inline_style( $controls_css_handle, $dynamic_styles ? $dynamic_styles : ' ' );
|
260 |
Â
|
@@ -338,9 +343,6 @@ class Visual_Portfolio_Assets {
|
|
338 |
Â
if ( apply_filters( 'vpf_enqueue_plugin_lazysizes', true ) ) {
|
339 |
Â
wp_register_script( 'lazysizes-object-fit-cover', visual_portfolio()->plugin_url . 'assets/js/lazysizes-object-fit-cover.min.js', array(), '4.1.0', true );
|
340 |
Â
wp_register_script( 'lazysizes', visual_portfolio()->plugin_url . 'assets/vendor/lazysizes/lazysizes.min.js', array(), '5.2.2', true );
|
341 |
-
|
342 |
-
$vp_deps[] = 'lazysizes-object-fit-cover';
|
343 |
-
$vp_deps[] = 'lazysizes';
|
344 |
Â
}
|
345 |
Â
|
346 |
Â
// CSS Vars Polyfill.
|
@@ -386,7 +388,7 @@ class Visual_Portfolio_Assets {
|
|
386 |
Â
);
|
387 |
Â
|
388 |
Â
foreach ( $vp_styles as $name => $data ) {
|
389 |
-
wp_register_style( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.
|
390 |
Â
wp_style_add_data( $name, 'rtl', 'replace' );
|
391 |
Â
wp_style_add_data( $name, 'suffix', '.min' );
|
392 |
Â
}
|
@@ -425,6 +427,14 @@ class Visual_Portfolio_Assets {
|
|
425 |
Â
'simplebar',
|
426 |
Â
),
|
427 |
Â
),
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
428 |
Â
'visual-portfolio-popup-gallery' => array(
|
429 |
Â
'assets/js/popup-gallery.min.js',
|
430 |
Â
array(
|
@@ -497,7 +507,7 @@ class Visual_Portfolio_Assets {
|
|
497 |
Â
);
|
498 |
Â
|
499 |
Â
foreach ( $vp_scripts as $name => $data ) {
|
500 |
-
wp_register_script( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.
|
501 |
Â
}
|
502 |
Â
|
503 |
Â
do_action( 'vpf_after_assets_register' );
|
98 |
Â
foreach ( self::$stored_assets[ $type ] as $name => $data ) {
|
99 |
Â
if ( isset( $data['value'] ) && $data['value'] ) {
|
100 |
Â
if ( 'script' === $type ) {
|
101 |
+
wp_enqueue_script( $name, '', array(), '2.7.0', true );
|
102 |
Â
} elseif ( is_string( $data['value'] ) ) {
|
103 |
+
visual_portfolio()->include_template_style( $name, $data['value'], array(), '2.7.0' );
|
104 |
Â
} else {
|
105 |
+
wp_enqueue_style( $name, '', array(), '2.7.0' );
|
106 |
Â
}
|
107 |
Â
|
108 |
Â
self::$stored_assets[ $type ]['value'] = false;
|
164 |
Â
self::store_used_assets( 'visual-portfolio-custom-scrollbar', true, 'script' );
|
165 |
Â
self::store_used_assets( 'visual-portfolio-custom-scrollbar', true, 'style' );
|
166 |
Â
|
167 |
+
// Images Lazy Loading.
|
168 |
+
if ( Visual_Portfolio_Settings::get_option( 'lazy_loading', 'vp_images' ) ) {
|
169 |
+
self::store_used_assets( 'visual-portfolio-images-lazy-loading', true, 'script' );
|
170 |
+
}
|
171 |
+
|
172 |
Â
// Items Style.
|
173 |
Â
if ( $options['items_style'] ) {
|
174 |
Â
$items_style_pref = '';
|
259 |
Â
$dynamic_styles = Visual_Portfolio_Controls_Dynamic_CSS::get( $options );
|
260 |
Â
$controls_css_handle = 'vp-dynamic-styles-' . $options['id'];
|
261 |
Â
|
262 |
+
wp_register_style( $controls_css_handle, false, array(), '2.7.0' );
|
263 |
Â
wp_enqueue_style( $controls_css_handle );
|
264 |
Â
wp_add_inline_style( $controls_css_handle, $dynamic_styles ? $dynamic_styles : ' ' );
|
265 |
Â
|
343 |
Â
if ( apply_filters( 'vpf_enqueue_plugin_lazysizes', true ) ) {
|
344 |
Â
wp_register_script( 'lazysizes-object-fit-cover', visual_portfolio()->plugin_url . 'assets/js/lazysizes-object-fit-cover.min.js', array(), '4.1.0', true );
|
345 |
Â
wp_register_script( 'lazysizes', visual_portfolio()->plugin_url . 'assets/vendor/lazysizes/lazysizes.min.js', array(), '5.2.2', true );
|
Â
|
|
Â
|
|
Â
|
|
346 |
Â
}
|
347 |
Â
|
348 |
Â
// CSS Vars Polyfill.
|
388 |
Â
);
|
389 |
Â
|
390 |
Â
foreach ( $vp_styles as $name => $data ) {
|
391 |
+
wp_register_style( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.7.0' );
|
392 |
Â
wp_style_add_data( $name, 'rtl', 'replace' );
|
393 |
Â
wp_style_add_data( $name, 'suffix', '.min' );
|
394 |
Â
}
|
427 |
Â
'simplebar',
|
428 |
Â
),
|
429 |
Â
),
|
430 |
+
'visual-portfolio-images-lazy-loading' => array(
|
431 |
+
'assets/js/images-lazy-loading.min.js',
|
432 |
+
array(
|
433 |
+
'jquery',
|
434 |
+
'lazysizes-object-fit-cover',
|
435 |
+
'lazysizes',
|
436 |
+
),
|
437 |
+
),
|
438 |
Â
'visual-portfolio-popup-gallery' => array(
|
439 |
Â
'assets/js/popup-gallery.min.js',
|
440 |
Â
array(
|
507 |
Â
);
|
508 |
Â
|
509 |
Â
foreach ( $vp_scripts as $name => $data ) {
|
510 |
+
wp_register_script( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.7.0', true );
|
511 |
Â
}
|
512 |
Â
|
513 |
Â
do_action( 'vpf_after_assets_register' );
|
classes/class-custom-post-type.php
CHANGED
@@ -248,7 +248,7 @@ class Visual_Portfolio_Custom_Post_Type {
|
|
248 |
Â
if ( ! is_blog_installed() ) {
|
249 |
Â
return;
|
250 |
Â
}
|
251 |
-
if ( get_option( 'visual_portfolio_updated_caps' ) === '2.
|
252 |
Â
return;
|
253 |
Â
}
|
254 |
Â
|
@@ -325,7 +325,7 @@ class Visual_Portfolio_Custom_Post_Type {
|
|
325 |
Â
$wp_roles->add_cap( 'administrator', $cap );
|
326 |
Â
}
|
327 |
Â
|
328 |
-
update_option( 'visual_portfolio_updated_caps', '2.
|
329 |
Â
}
|
330 |
Â
|
331 |
Â
/**
|
248 |
Â
if ( ! is_blog_installed() ) {
|
249 |
Â
return;
|
250 |
Â
}
|
251 |
+
if ( get_option( 'visual_portfolio_updated_caps' ) === '2.7.0' ) {
|
252 |
Â
return;
|
253 |
Â
}
|
254 |
Â
|
325 |
Â
$wp_roles->add_cap( 'administrator', $cap );
|
326 |
Â
}
|
327 |
Â
|
328 |
+
update_option( 'visual_portfolio_updated_caps', '2.7.0' );
|
329 |
Â
}
|
330 |
Â
|
331 |
Â
/**
|
classes/class-elementor-widget.php
CHANGED
@@ -33,9 +33,9 @@ class Visual_Portfolio_Elementor_Widget extends \Elementor\Widget_Base {
|
|
33 |
Â
|
34 |
Â
if ( $this->is_preview_mode() ) {
|
35 |
Â
wp_register_script( 'iframe-resizer', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/js/iframeResizer.min.js', '', '4.2.11', true );
|
36 |
-
wp_register_script( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/js/elementor.min.js', array( 'elementor-frontend', 'iframe-resizer', 'jquery' ), '2.
|
37 |
Â
|
38 |
-
wp_register_style( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/css/elementor.min.css', array(), '2.
|
39 |
Â
wp_style_add_data( 'visual-portfolio-elementor', 'rtl', 'replace' );
|
40 |
Â
wp_style_add_data( 'visual-portfolio-elementor', 'suffix', '.min' );
|
41 |
Â
}
|
33 |
Â
|
34 |
Â
if ( $this->is_preview_mode() ) {
|
35 |
Â
wp_register_script( 'iframe-resizer', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/js/iframeResizer.min.js', '', '4.2.11', true );
|
36 |
+
wp_register_script( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/js/elementor.min.js', array( 'elementor-frontend', 'iframe-resizer', 'jquery' ), '2.7.0', true );
|
37 |
Â
|
38 |
+
wp_register_style( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/css/elementor.min.css', array(), '2.7.0' );
|
39 |
Â
wp_style_add_data( 'visual-portfolio-elementor', 'rtl', 'replace' );
|
40 |
Â
wp_style_add_data( 'visual-portfolio-elementor', 'suffix', '.min' );
|
41 |
Â
}
|
classes/class-get-portfolio.php
CHANGED
@@ -568,9 +568,9 @@ class Visual_Portfolio_Get {
|
|
568 |
Â
|
569 |
Â
// Lazyload support.
|
570 |
Â
'loading' => array(),
|
571 |
-
'data-
|
572 |
-
'data-
|
573 |
-
'data-
|
574 |
Â
'data-no-lazy' => array(),
|
575 |
Â
),
|
576 |
Â
),
|
568 |
Â
|
569 |
Â
// Lazyload support.
|
570 |
Â
'loading' => array(),
|
571 |
+
'data-src' => array(),
|
572 |
+
'data-sizes' => array(),
|
573 |
+
'data-srcset' => array(),
|
574 |
Â
'data-no-lazy' => array(),
|
575 |
Â
),
|
576 |
Â
),
|
classes/class-gutenberg.php
CHANGED
@@ -166,14 +166,14 @@ class Visual_Portfolio_Gutenberg_Block {
|
|
166 |
Â
'visual-portfolio-gutenberg',
|
167 |
Â
plugins_url( '../gutenberg/index.min.js', __FILE__ ),
|
168 |
Â
array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'jquery' ),
|
169 |
-
'2.
|
170 |
Â
true
|
171 |
Â
);
|
172 |
Â
wp_enqueue_style(
|
173 |
Â
'visual-portfolio-gutenberg',
|
174 |
Â
plugins_url( '../gutenberg/style.min.css', __FILE__ ),
|
175 |
Â
array(),
|
176 |
-
'2.
|
177 |
Â
);
|
178 |
Â
wp_style_add_data( 'visual-portfolio-gutenberg', 'rtl', 'replace' );
|
179 |
Â
wp_style_add_data( 'visual-portfolio-gutenberg', 'suffix', '.min' );
|
@@ -193,7 +193,7 @@ class Visual_Portfolio_Gutenberg_Block {
|
|
193 |
Â
'visual-portfolio-gutenberg-custom-post-meta',
|
194 |
Â
plugins_url( '../gutenberg/custom-post-meta.min.js', __FILE__ ),
|
195 |
Â
array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'wp-plugins', 'jquery' ),
|
196 |
-
'2.
|
197 |
Â
true
|
198 |
Â
);
|
199 |
Â
|
166 |
Â
'visual-portfolio-gutenberg',
|
167 |
Â
plugins_url( '../gutenberg/index.min.js', __FILE__ ),
|
168 |
Â
array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'jquery' ),
|
169 |
+
'2.7.0',
|
170 |
Â
true
|
171 |
Â
);
|
172 |
Â
wp_enqueue_style(
|
173 |
Â
'visual-portfolio-gutenberg',
|
174 |
Â
plugins_url( '../gutenberg/style.min.css', __FILE__ ),
|
175 |
Â
array(),
|
176 |
+
'2.7.0'
|
177 |
Â
);
|
178 |
Â
wp_style_add_data( 'visual-portfolio-gutenberg', 'rtl', 'replace' );
|
179 |
Â
wp_style_add_data( 'visual-portfolio-gutenberg', 'suffix', '.min' );
|
193 |
Â
'visual-portfolio-gutenberg-custom-post-meta',
|
194 |
Â
plugins_url( '../gutenberg/custom-post-meta.min.js', __FILE__ ),
|
195 |
Â
array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'wp-plugins', 'jquery' ),
|
196 |
+
'2.7.0',
|
197 |
Â
true
|
198 |
Â
);
|
199 |
Â
|
classes/class-images.php
CHANGED
@@ -85,11 +85,11 @@ class Visual_Portfolio_Images {
|
|
85 |
Â
if ( $allowedposttags ) {
|
86 |
Â
foreach ( $allowedposttags as $key => & $tags ) {
|
87 |
Â
if ( 'img' === $key ) {
|
88 |
-
$tags['data-
|
89 |
-
$tags['data-
|
90 |
-
$tags['data-
|
91 |
-
$tags['data-no-lazy']
|
92 |
-
$tags['loading']
|
93 |
Â
}
|
94 |
Â
}
|
95 |
Â
}
|
@@ -243,7 +243,7 @@ class Visual_Portfolio_Images {
|
|
243 |
Â
}
|
244 |
Â
|
245 |
Â
// Lazyload already added.
|
246 |
-
if ( strpos( $attr['class'], 'lazyload' ) !== false || isset( $attr['data-
|
247 |
Â
return $attr;
|
248 |
Â
}
|
249 |
Â
|
@@ -294,19 +294,19 @@ class Visual_Portfolio_Images {
|
|
294 |
Â
|
295 |
Â
// lazy placeholder.
|
296 |
Â
if ( $placeholder ) {
|
297 |
-
$attr['data-
|
298 |
-
$attr['src']
|
299 |
Â
}
|
300 |
Â
|
301 |
-
$attr['class'] .= '
|
302 |
Â
|
303 |
Â
// Src Set and Sizes.
|
304 |
Â
if ( isset( $attr['sizes'] ) ) {
|
305 |
-
$attr['data-
|
306 |
Â
unset( $attr['sizes'] );
|
307 |
Â
}
|
308 |
Â
if ( isset( $attr['srcset'] ) ) {
|
309 |
-
$attr['data-
|
310 |
Â
unset( $attr['srcset'] );
|
311 |
Â
}
|
312 |
Â
|
@@ -322,7 +322,7 @@ class Visual_Portfolio_Images {
|
|
322 |
Â
* @return boolean
|
323 |
Â
*/
|
324 |
Â
public static function jetpack_lazy_images_skip_image_with_attributes( $return, $attributes ) {
|
325 |
-
return isset( $attributes['data-
|
326 |
Â
}
|
327 |
Â
}
|
328 |
Â
Visual_Portfolio_Images::construct();
|
85 |
Â
if ( $allowedposttags ) {
|
86 |
Â
foreach ( $allowedposttags as $key => & $tags ) {
|
87 |
Â
if ( 'img' === $key ) {
|
88 |
+
$tags['data-src'] = true;
|
89 |
+
$tags['data-sizes'] = true;
|
90 |
+
$tags['data-srcset'] = true;
|
91 |
+
$tags['data-no-lazy'] = true;
|
92 |
+
$tags['loading'] = true;
|
93 |
Â
}
|
94 |
Â
}
|
95 |
Â
}
|
243 |
Â
}
|
244 |
Â
|
245 |
Â
// Lazyload already added.
|
246 |
+
if ( strpos( $attr['class'], 'lazyload' ) !== false || isset( $attr['data-src'] ) ) {
|
247 |
Â
return $attr;
|
248 |
Â
}
|
249 |
Â
|
294 |
Â
|
295 |
Â
// lazy placeholder.
|
296 |
Â
if ( $placeholder ) {
|
297 |
+
$attr['data-src'] = $attr['src'];
|
298 |
+
$attr['src'] = $placeholder;
|
299 |
Â
}
|
300 |
Â
|
301 |
+
$attr['class'] .= ' vp-lazyload';
|
302 |
Â
|
303 |
Â
// Src Set and Sizes.
|
304 |
Â
if ( isset( $attr['sizes'] ) ) {
|
305 |
+
$attr['data-sizes'] = 'auto';
|
306 |
Â
unset( $attr['sizes'] );
|
307 |
Â
}
|
308 |
Â
if ( isset( $attr['srcset'] ) ) {
|
309 |
+
$attr['data-srcset'] = $attr['srcset'];
|
310 |
Â
unset( $attr['srcset'] );
|
311 |
Â
}
|
312 |
Â
|
322 |
Â
* @return boolean
|
323 |
Â
*/
|
324 |
Â
public static function jetpack_lazy_images_skip_image_with_attributes( $return, $attributes ) {
|
325 |
+
return isset( $attributes['data-src'] );
|
326 |
Â
}
|
327 |
Â
}
|
328 |
Â
Visual_Portfolio_Images::construct();
|
classes/class-migration.php
CHANGED
@@ -18,7 +18,7 @@ class Visual_Portfolio_Migrations {
|
|
18 |
Â
*
|
19 |
Â
* @var string
|
20 |
Â
*/
|
21 |
-
protected $version = '2.
|
22 |
Â
|
23 |
Â
/**
|
24 |
Â
* Initial version.
|
18 |
Â
*
|
19 |
Â
* @var string
|
20 |
Â
*/
|
21 |
+
protected $version = '2.7.0';
|
22 |
Â
|
23 |
Â
/**
|
24 |
Â
* Initial version.
|
classes/class-preview.php
CHANGED
@@ -35,7 +35,6 @@ class Visual_Portfolio_Preview {
|
|
35 |
Â
add_action( 'init', array( $this, 'is_preview_check' ) );
|
36 |
Â
add_filter( 'pre_handle_404', array( $this, 'pre_handle_404' ) );
|
37 |
Â
add_filter( 'vpf_get_options', array( $this, 'filter_preview_option' ) );
|
38 |
-
add_action( 'init', array( $this, 'flush_rules_preview_frame' ) );
|
39 |
Â
add_action( 'template_redirect', array( $this, 'template_redirect' ) );
|
40 |
Â
add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ), 11 );
|
41 |
Â
|
@@ -46,21 +45,12 @@ class Visual_Portfolio_Preview {
|
|
46 |
Â
* Localize scripts with preview URL.
|
47 |
Â
*/
|
48 |
Â
public function localize_scripts() {
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
$url = add_query_arg(
|
56 |
-
array(
|
57 |
-
'vp_preview' => 'vp_preview',
|
58 |
-
),
|
59 |
-
$url
|
60 |
-
);
|
61 |
-
} else {
|
62 |
-
$url .= '/vp_preview';
|
63 |
-
}
|
64 |
Â
|
65 |
Â
wp_localize_script(
|
66 |
Â
'visual-portfolio-gutenberg',
|
@@ -133,29 +123,10 @@ class Visual_Portfolio_Preview {
|
|
133 |
Â
return $options;
|
134 |
Â
}
|
135 |
Â
|
136 |
-
/**
|
137 |
-
* Register preview 'vp_preview' page tag.
|
138 |
-
*/
|
139 |
-
public function flush_rules_preview_frame() {
|
140 |
-
global $wp_rewrite;
|
141 |
-
|
142 |
-
// add rewrite rule that matches /vp_preview .
|
143 |
-
add_rewrite_rule( 'vp_preview/?$', 'index.php?vp_preview=vp_preview', 'top' );
|
144 |
-
|
145 |
-
// add rewrite rule that matches /vp_preview/page/2 .
|
146 |
-
add_rewrite_rule( "vp_preview/{$wp_rewrite->pagination_base}/([0-9]{1,})/?$", 'index.php?vp_preview=vp_preview&paged=$matches[1]', 'top' );
|
147 |
-
|
148 |
-
// add endpoint, in this case 'vp_preview' to satisfy our rewrite rule /vp_preview .
|
149 |
-
add_rewrite_endpoint( 'vp_preview', EP_PERMALINK | EP_PAGES );
|
150 |
-
|
151 |
-
// flush rules to get this to work properly (do this once, then comment out) .
|
152 |
-
$wp_rewrite->flush_rules();
|
153 |
-
}
|
154 |
-
|
155 |
Â
/**
|
156 |
Â
* Display preview frame
|
157 |
Â
* Available by requesting:
|
158 |
-
* SITE
|
159 |
Â
*/
|
160 |
Â
public function template_redirect() {
|
161 |
Â
if ( $this->preview_enabled ) {
|
@@ -186,7 +157,7 @@ class Visual_Portfolio_Preview {
|
|
186 |
Â
|
187 |
Â
// Enqueue assets.
|
188 |
Â
wp_enqueue_script( 'iframe-resizer-content', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/js/iframeResizer.contentWindow.min.js', array(), '4.2.11', true );
|
189 |
-
wp_enqueue_script( 'visual-portfolio-preview', visual_portfolio()->plugin_url . 'assets/js/preview.js', array( 'jquery', 'iframe-resizer-content' ), '2.
|
190 |
Â
|
191 |
Â
// Post data for script.
|
192 |
Â
wp_localize_script(
|
@@ -229,7 +200,7 @@ class Visual_Portfolio_Preview {
|
|
229 |
Â
Visual_Portfolio_Assets::enqueue( $options );
|
230 |
Â
|
231 |
Â
// Custom styles.
|
232 |
-
visual_portfolio()->include_template_style( 'visual-portfolio-preview', 'preview/style', array(), '2.
|
233 |
Â
|
234 |
Â
// Output template.
|
235 |
Â
visual_portfolio()->include_template(
|
35 |
Â
add_action( 'init', array( $this, 'is_preview_check' ) );
|
36 |
Â
add_filter( 'pre_handle_404', array( $this, 'pre_handle_404' ) );
|
37 |
Â
add_filter( 'vpf_get_options', array( $this, 'filter_preview_option' ) );
|
Â
|
|
38 |
Â
add_action( 'template_redirect', array( $this, 'template_redirect' ) );
|
39 |
Â
add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ), 11 );
|
40 |
Â
|
45 |
Â
* Localize scripts with preview URL.
|
46 |
Â
*/
|
47 |
Â
public function localize_scripts() {
|
48 |
+
$url = add_query_arg(
|
49 |
+
array(
|
50 |
+
'vp_preview' => 'vp_preview',
|
51 |
+
),
|
52 |
+
get_site_url()
|
53 |
+
);
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
54 |
Â
|
55 |
Â
wp_localize_script(
|
56 |
Â
'visual-portfolio-gutenberg',
|
123 |
Â
return $options;
|
124 |
Â
}
|
125 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
126 |
Â
/**
|
127 |
Â
* Display preview frame
|
128 |
Â
* Available by requesting:
|
129 |
+
* SITE/?vp_preview=vp_preview with POST data: `vp_preview_frame=true&vp_preview_frame_id=10`
|
130 |
Â
*/
|
131 |
Â
public function template_redirect() {
|
132 |
Â
if ( $this->preview_enabled ) {
|
157 |
Â
|
158 |
Â
// Enqueue assets.
|
159 |
Â
wp_enqueue_script( 'iframe-resizer-content', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/js/iframeResizer.contentWindow.min.js', array(), '4.2.11', true );
|
160 |
+
wp_enqueue_script( 'visual-portfolio-preview', visual_portfolio()->plugin_url . 'assets/js/preview.min.js', array( 'jquery', 'iframe-resizer-content' ), '2.7.0', true );
|
161 |
Â
|
162 |
Â
// Post data for script.
|
163 |
Â
wp_localize_script(
|
200 |
Â
Visual_Portfolio_Assets::enqueue( $options );
|
201 |
Â
|
202 |
Â
// Custom styles.
|
203 |
+
visual_portfolio()->include_template_style( 'visual-portfolio-preview', 'preview/style', array(), '2.7.0' );
|
204 |
Â
|
205 |
Â
// Output template.
|
206 |
Â
visual_portfolio()->include_template(
|
classes/class-supported-themes.php
CHANGED
@@ -68,7 +68,7 @@ class Visual_Portfolio_Supported_Themes {
|
|
68 |
Â
public function wp_enqueue_scripts() {
|
69 |
Â
$theme_compat = $this->get_theme_compatibility_style();
|
70 |
Â
if ( $theme_compat ) {
|
71 |
-
wp_enqueue_style( $theme_compat['name'], $theme_compat['url'], array(), '2.
|
72 |
Â
wp_style_add_data( $theme_compat['name'], 'rtl', 'replace' );
|
73 |
Â
wp_style_add_data( $theme_compat['name'], 'suffix', '.min' );
|
74 |
Â
}
|
68 |
Â
public function wp_enqueue_scripts() {
|
69 |
Â
$theme_compat = $this->get_theme_compatibility_style();
|
70 |
Â
if ( $theme_compat ) {
|
71 |
+
wp_enqueue_style( $theme_compat['name'], $theme_compat['url'], array(), '2.7.0' );
|
72 |
Â
wp_style_add_data( $theme_compat['name'], 'rtl', 'replace' );
|
73 |
Â
wp_style_add_data( $theme_compat['name'], 'suffix', '.min' );
|
74 |
Â
}
|
classes/class-tinymce.php
CHANGED
@@ -70,7 +70,7 @@ class Visual_Portfolio_TinyMCE {
|
|
70 |
Â
return;
|
71 |
Â
}
|
72 |
Â
|
73 |
-
wp_enqueue_script( 'visual-portfolio-tinymce-localize', visual_portfolio()->plugin_url . 'assets/admin/js/mce-localize.min.js', array(), '2.
|
74 |
Â
wp_localize_script( 'visual-portfolio-tinymce-localize', 'VPTinyMCEOptions', $data_tiny_mce );
|
75 |
Â
}
|
76 |
Â
}
|
70 |
Â
return;
|
71 |
Â
}
|
72 |
Â
|
73 |
+
wp_enqueue_script( 'visual-portfolio-tinymce-localize', visual_portfolio()->plugin_url . 'assets/admin/js/mce-localize.min.js', array(), '2.7.0', true );
|
74 |
Â
wp_localize_script( 'visual-portfolio-tinymce-localize', 'VPTinyMCEOptions', $data_tiny_mce );
|
75 |
Â
}
|
76 |
Â
}
|
classes/class-vc.php
CHANGED
@@ -35,7 +35,7 @@ class Visual_Portfolio_VC {
|
|
35 |
Â
*/
|
36 |
Â
public function admin_enqueue_scripts( $page ) {
|
37 |
Â
if ( 'post.php' === $page || 'post-new.php' === $page ) {
|
38 |
-
wp_enqueue_script( 'visual-portfolio-vc-frontend', visual_portfolio()->plugin_url . 'assets/admin/js/vc-frontend.min.js', array( 'jquery' ), '2.
|
39 |
Â
}
|
40 |
Â
}
|
41 |
Â
|
35 |
Â
*/
|
36 |
Â
public function admin_enqueue_scripts( $page ) {
|
37 |
Â
if ( 'post.php' === $page || 'post-new.php' === $page ) {
|
38 |
+
wp_enqueue_script( 'visual-portfolio-vc-frontend', visual_portfolio()->plugin_url . 'assets/admin/js/vc-frontend.min.js', array( 'jquery' ), '2.7.0', true );
|
39 |
Â
}
|
40 |
Â
}
|
41 |
Â
|
gutenberg/components/classes-tree/index.js
CHANGED
@@ -72,7 +72,10 @@ export default class ClassesTree extends Component {
|
|
72 |
Â
|
73 |
Â
this.frameWindow = this.iframePreview.contentWindow;
|
74 |
Â
this.frameJQuery = this.iframePreview.contentWindow.jQuery;
|
75 |
-
|
Â
|
|
Â
|
|
Â
|
|
76 |
Â
|
77 |
Â
this.updateTreeData();
|
78 |
Â
}
|
72 |
Â
|
73 |
Â
this.frameWindow = this.iframePreview.contentWindow;
|
74 |
Â
this.frameJQuery = this.iframePreview.contentWindow.jQuery;
|
75 |
+
|
76 |
+
if ( this.frameJQuery ) {
|
77 |
+
this.$framePortfolio = this.frameJQuery( '.vp-portfolio' );
|
78 |
+
}
|
79 |
Â
|
80 |
Â
this.updateTreeData();
|
81 |
Â
}
|
gutenberg/components/iframe-preview/index.js
CHANGED
@@ -7,12 +7,14 @@ import './style.scss';
|
|
7 |
Â
* External dependencies
|
8 |
Â
*/
|
9 |
Â
import { throttle, debounce } from 'throttle-debounce';
|
Â
|
|
10 |
Â
import iframeResizer from 'iframe-resizer/js/iframeResizer';
|
11 |
Â
import classnames from 'classnames/dedupe';
|
12 |
Â
|
13 |
Â
/**
|
14 |
Â
* Internal dependencies
|
15 |
Â
*/
|
Â
|
|
16 |
Â
import getDynamicCSS, { hasDynamicCSS } from '../../utils/controls-dynamic-css';
|
17 |
Â
|
18 |
Â
const $ = window.jQuery;
|
@@ -23,7 +25,6 @@ const variables = window.VPAdminGutenbergVariables;
|
|
23 |
Â
*/
|
24 |
Â
const {
|
25 |
Â
applyFilters,
|
26 |
-
addFilter,
|
27 |
Â
} = wp.hooks;
|
28 |
Â
|
29 |
Â
const {
|
@@ -40,6 +41,8 @@ const {
|
|
40 |
Â
Spinner,
|
41 |
Â
} = wp.components;
|
42 |
Â
|
Â
|
|
Â
|
|
43 |
Â
/**
|
44 |
Â
* Component Class
|
45 |
Â
*/
|
@@ -49,8 +52,11 @@ class IframePreview extends Component {
|
|
49 |
Â
|
50 |
Â
this.state = {
|
51 |
Â
loading: true,
|
Â
|
|
52 |
Â
};
|
53 |
Â
|
Â
|
|
Â
|
|
54 |
Â
this.frameRef = createRef();
|
55 |
Â
this.formRef = createRef();
|
56 |
Â
|
@@ -58,9 +64,9 @@ class IframePreview extends Component {
|
|
58 |
Â
this.maybeAttributesChanged = this.maybeAttributesChanged.bind( this );
|
59 |
Â
this.onFrameLoad = this.onFrameLoad.bind( this );
|
60 |
Â
this.maybeReload = this.maybeReload.bind( this );
|
61 |
-
this.maybeReloadDebounce = debounce( 300, this.maybeReload.bind( this ) );
|
62 |
Â
this.maybeResizePreviews = this.maybeResizePreviews.bind( this );
|
63 |
-
this.maybeResizePreviewsThrottle = throttle( 100, this.maybeResizePreviews );
|
64 |
Â
this.printInput = this.printInput.bind( this );
|
65 |
Â
}
|
66 |
Â
|
@@ -100,6 +106,7 @@ class IframePreview extends Component {
|
|
100 |
Â
|
101 |
Â
if ( this.frameRef.current.iframeResizer ) {
|
102 |
Â
this.frameRef.current.iframeResizer.close();
|
Â
|
|
103 |
Â
}
|
104 |
Â
}
|
105 |
Â
|
@@ -111,13 +118,23 @@ class IframePreview extends Component {
|
|
111 |
Â
onFrameLoad( e ) {
|
112 |
Â
this.frameWindow = e.target.contentWindow;
|
113 |
Â
this.frameJQuery = e.target.contentWindow.jQuery;
|
114 |
-
this.$framePortfolio = this.frameJQuery( '.vp-portfolio' );
|
115 |
Â
|
116 |
-
this.
|
Â
|
|
117 |
Â
|
118 |
-
|
119 |
-
|
120 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
121 |
Â
}
|
122 |
Â
|
123 |
Â
maybePreviewTypeChanged( prevProps ) {
|
@@ -269,11 +286,11 @@ class IframePreview extends Component {
|
|
269 |
Â
render() {
|
270 |
Â
const {
|
271 |
Â
attributes,
|
272 |
-
clientId,
|
273 |
Â
} = this.props;
|
274 |
Â
|
275 |
Â
const {
|
276 |
Â
loading,
|
Â
|
|
277 |
Â
} = this.state;
|
278 |
Â
|
279 |
Â
const {
|
@@ -290,7 +307,7 @@ class IframePreview extends Component {
|
|
290 |
Â
<div className="visual-portfolio-gutenberg-preview-inner">
|
291 |
Â
<form
|
292 |
Â
action={ variables.preview_url }
|
293 |
-
target={
|
294 |
Â
method="POST"
|
295 |
Â
style={ { display: 'none' } }
|
296 |
Â
ref={ this.formRef }
|
@@ -313,8 +330,8 @@ class IframePreview extends Component {
|
|
313 |
Â
</form>
|
314 |
Â
<iframe
|
315 |
Â
title="vp-preview"
|
316 |
-
id={
|
317 |
-
name={
|
318 |
Â
// eslint-disable-next-line
|
319 |
Â
allowtransparency="true"
|
320 |
Â
ref={ this.frameRef }
|
@@ -337,81 +354,3 @@ export default withSelect( ( select ) => {
|
|
337 |
Â
previewDeviceType: __experimentalGetPreviewDeviceType ? __experimentalGetPreviewDeviceType() : 'desktop',
|
338 |
Â
};
|
339 |
Â
} )( IframePreview );
|
340 |
-
|
341 |
-
// live reload
|
342 |
-
addFilter( 'vpf.editor.changed-attributes', 'vpf/editor/changed-attributes/live-reload', ( data ) => {
|
343 |
-
if ( ! data.$framePortfolio ) {
|
344 |
-
return data;
|
345 |
-
}
|
346 |
-
|
347 |
-
let reload = false;
|
348 |
-
|
349 |
-
Object.keys( data.attributes ).forEach( ( name ) => {
|
350 |
-
const val = data.attributes[ name ];
|
351 |
-
|
352 |
-
switch ( name ) {
|
353 |
-
case 'tiles_type':
|
354 |
-
case 'masonry_columns':
|
355 |
-
case 'masonry_images_aspect_ratio':
|
356 |
-
case 'grid_columns':
|
357 |
-
case 'grid_images_aspect_ratio':
|
358 |
-
case 'justified_row_height':
|
359 |
-
case 'justified_row_height_tolerance':
|
360 |
-
case 'slider_effect':
|
361 |
-
case 'slider_speed':
|
362 |
-
case 'slider_autoplay':
|
363 |
-
case 'slider_autoplay_hover_pause':
|
364 |
-
case 'slider_centered_slides':
|
365 |
-
case 'slider_loop':
|
366 |
-
case 'slider_free_mode':
|
367 |
-
case 'slider_free_mode_sticky':
|
368 |
-
case 'slider_bullets_dynamic':
|
369 |
-
case 'items_gap': {
|
370 |
-
data.$framePortfolio.attr( `data-vp-${ name.replace( /_/g, '-' ) }`, val );
|
371 |
-
data.$framePortfolio.vpf( 'init' );
|
372 |
-
|
373 |
-
break;
|
374 |
-
}
|
375 |
-
case 'items_style_default__align':
|
376 |
-
case 'items_style_fade__align':
|
377 |
-
case 'items_style_fly__align':
|
378 |
-
case 'items_style_emerge__align': {
|
379 |
-
let allAlignClasses = '';
|
380 |
-
|
381 |
-
[ 'left', 'center', 'right', 'top-left', 'top-center', 'top-right', 'bottom-left', 'bottom-center', 'bottom-right' ].forEach( ( alignName ) => {
|
382 |
-
allAlignClasses += `${ allAlignClasses ? ' ' : '' }vp-portfolio__item-align-${ alignName }`;
|
383 |
-
} );
|
384 |
-
|
385 |
-
data.$framePortfolio.find( '.vp-portfolio__item-overlay' ).removeClass( allAlignClasses ).addClass( `vp-portfolio__item-align-${ val }` );
|
386 |
-
|
387 |
-
break;
|
388 |
-
}
|
389 |
-
case 'filter_align':
|
390 |
-
data.$framePortfolio.find( '.vp-filter' ).removeClass( 'vp-filter__align-center vp-filter__align-left vp-filter__align-right' ).addClass( `vp-filter__align-${ val }` );
|
391 |
-
|
392 |
-
break;
|
393 |
-
case 'sort_align':
|
394 |
-
data.$framePortfolio.find( '.vp-sort' ).removeClass( 'vp-sort__align-center vp-sort__align-left vp-sort__align-right' ).addClass( `vp-sort__align-${ val }` );
|
395 |
-
|
396 |
-
break;
|
397 |
-
case 'pagination_align':
|
398 |
-
data.$framePortfolio.find( '.vp-pagination' ).removeClass( 'vp-pagination__align-center vp-pagination__align-left vp-pagination__align-right' ).addClass( `vp-pagination__align-${ val }` );
|
399 |
-
|
400 |
-
break;
|
401 |
-
// prevent some options reload
|
402 |
-
case 'list_name':
|
403 |
-
case 'stretch':
|
404 |
-
case 'custom_css':
|
405 |
-
// no reload
|
406 |
-
break;
|
407 |
-
default:
|
408 |
-
reload = reload || data.reload;
|
409 |
-
break;
|
410 |
-
}
|
411 |
-
} );
|
412 |
-
|
413 |
-
return {
|
414 |
-
...data,
|
415 |
-
reload,
|
416 |
-
};
|
417 |
-
} );
|
7 |
Â
* External dependencies
|
8 |
Â
*/
|
9 |
Â
import { throttle, debounce } from 'throttle-debounce';
|
10 |
+
import rafSchd from 'raf-schd';
|
11 |
Â
import iframeResizer from 'iframe-resizer/js/iframeResizer';
|
12 |
Â
import classnames from 'classnames/dedupe';
|
13 |
Â
|
14 |
Â
/**
|
15 |
Â
* Internal dependencies
|
16 |
Â
*/
|
17 |
+
import './live-reload-conditions';
|
18 |
Â
import getDynamicCSS, { hasDynamicCSS } from '../../utils/controls-dynamic-css';
|
19 |
Â
|
20 |
Â
const $ = window.jQuery;
|
25 |
Â
*/
|
26 |
Â
const {
|
27 |
Â
applyFilters,
|
Â
|
|
28 |
Â
} = wp.hooks;
|
29 |
Â
|
30 |
Â
const {
|
41 |
Â
Spinner,
|
42 |
Â
} = wp.components;
|
43 |
Â
|
44 |
+
let uniqueIdCount = 1;
|
45 |
+
|
46 |
Â
/**
|
47 |
Â
* Component Class
|
48 |
Â
*/
|
52 |
Â
|
53 |
Â
this.state = {
|
54 |
Â
loading: true,
|
55 |
+
uniqueId: `vpf-preview-${ uniqueIdCount }`,
|
56 |
Â
};
|
57 |
Â
|
58 |
+
uniqueIdCount += 1;
|
59 |
+
|
60 |
Â
this.frameRef = createRef();
|
61 |
Â
this.formRef = createRef();
|
62 |
Â
|
64 |
Â
this.maybeAttributesChanged = this.maybeAttributesChanged.bind( this );
|
65 |
Â
this.onFrameLoad = this.onFrameLoad.bind( this );
|
66 |
Â
this.maybeReload = this.maybeReload.bind( this );
|
67 |
+
this.maybeReloadDebounce = debounce( 300, rafSchd( this.maybeReload.bind( this ) ) );
|
68 |
Â
this.maybeResizePreviews = this.maybeResizePreviews.bind( this );
|
69 |
+
this.maybeResizePreviewsThrottle = throttle( 100, rafSchd( this.maybeResizePreviews ) );
|
70 |
Â
this.printInput = this.printInput.bind( this );
|
71 |
Â
}
|
72 |
Â
|
106 |
Â
|
107 |
Â
if ( this.frameRef.current.iframeResizer ) {
|
108 |
Â
this.frameRef.current.iframeResizer.close();
|
109 |
+
this.frameRef.current.iframeResizer.removeListeners();
|
110 |
Â
}
|
111 |
Â
}
|
112 |
Â
|
118 |
Â
onFrameLoad( e ) {
|
119 |
Â
this.frameWindow = e.target.contentWindow;
|
120 |
Â
this.frameJQuery = e.target.contentWindow.jQuery;
|
Â
|
|
121 |
Â
|
122 |
+
if ( this.frameJQuery ) {
|
123 |
+
this.$framePortfolio = this.frameJQuery( '.vp-portfolio' );
|
124 |
Â
|
125 |
+
this.maybeResizePreviews();
|
126 |
+
|
127 |
+
if ( this.frameTimeout ) {
|
128 |
+
clearTimeout( this.frameTimeout );
|
129 |
+
}
|
130 |
+
|
131 |
+
// We need this timeout, since we resize iframe size and layouts resized with transitions.
|
132 |
+
this.frameTimeout = setTimeout( () => {
|
133 |
+
this.setState( {
|
134 |
+
loading: false,
|
135 |
+
} );
|
136 |
+
}, 300 );
|
137 |
+
}
|
138 |
Â
}
|
139 |
Â
|
140 |
Â
maybePreviewTypeChanged( prevProps ) {
|
286 |
Â
render() {
|
287 |
Â
const {
|
288 |
Â
attributes,
|
Â
|
|
289 |
Â
} = this.props;
|
290 |
Â
|
291 |
Â
const {
|
292 |
Â
loading,
|
293 |
+
uniqueId,
|
294 |
Â
} = this.state;
|
295 |
Â
|
296 |
Â
const {
|
307 |
Â
<div className="visual-portfolio-gutenberg-preview-inner">
|
308 |
Â
<form
|
309 |
Â
action={ variables.preview_url }
|
310 |
+
target={ uniqueId }
|
311 |
Â
method="POST"
|
312 |
Â
style={ { display: 'none' } }
|
313 |
Â
ref={ this.formRef }
|
330 |
Â
</form>
|
331 |
Â
<iframe
|
332 |
Â
title="vp-preview"
|
333 |
+
id={ uniqueId }
|
334 |
+
name={ uniqueId }
|
335 |
Â
// eslint-disable-next-line
|
336 |
Â
allowtransparency="true"
|
337 |
Â
ref={ this.frameRef }
|
354 |
Â
previewDeviceType: __experimentalGetPreviewDeviceType ? __experimentalGetPreviewDeviceType() : 'desktop',
|
355 |
Â
};
|
356 |
Â
} )( IframePreview );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
gutenberg/components/iframe-preview/live-reload-conditions.js
ADDED
@@ -0,0 +1,84 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/**
|
2 |
+
* WordPress dependencies
|
3 |
+
*/
|
4 |
+
const {
|
5 |
+
addFilter,
|
6 |
+
} = wp.hooks;
|
7 |
+
|
8 |
+
// live reload
|
9 |
+
addFilter( 'vpf.editor.changed-attributes', 'vpf/editor/changed-attributes/live-reload', ( data ) => {
|
10 |
+
if ( ! data.$framePortfolio ) {
|
11 |
+
return data;
|
12 |
+
}
|
13 |
+
|
14 |
+
let reload = false;
|
15 |
+
|
16 |
+
Object.keys( data.attributes ).forEach( ( name ) => {
|
17 |
+
const val = data.attributes[ name ];
|
18 |
+
|
19 |
+
switch ( name ) {
|
20 |
+
case 'tiles_type':
|
21 |
+
case 'masonry_columns':
|
22 |
+
case 'masonry_images_aspect_ratio':
|
23 |
+
case 'grid_columns':
|
24 |
+
case 'grid_images_aspect_ratio':
|
25 |
+
case 'justified_row_height':
|
26 |
+
case 'justified_row_height_tolerance':
|
27 |
+
case 'slider_effect':
|
28 |
+
case 'slider_speed':
|
29 |
+
case 'slider_autoplay':
|
30 |
+
case 'slider_autoplay_hover_pause':
|
31 |
+
case 'slider_centered_slides':
|
32 |
+
case 'slider_loop':
|
33 |
+
case 'slider_free_mode':
|
34 |
+
case 'slider_free_mode_sticky':
|
35 |
+
case 'slider_bullets_dynamic':
|
36 |
+
case 'items_gap': {
|
37 |
+
data.$framePortfolio.attr( `data-vp-${ name.replace( /_/g, '-' ) }`, val );
|
38 |
+
data.$framePortfolio.vpf( 'init' );
|
39 |
+
|
40 |
+
break;
|
41 |
+
}
|
42 |
+
case 'items_style_default__align':
|
43 |
+
case 'items_style_fade__align':
|
44 |
+
case 'items_style_fly__align':
|
45 |
+
case 'items_style_emerge__align': {
|
46 |
+
let allAlignClasses = '';
|
47 |
+
|
48 |
+
[ 'left', 'center', 'right', 'top-left', 'top-center', 'top-right', 'bottom-left', 'bottom-center', 'bottom-right' ].forEach( ( alignName ) => {
|
49 |
+
allAlignClasses += `${ allAlignClasses ? ' ' : '' }vp-portfolio__item-align-${ alignName }`;
|
50 |
+
} );
|
51 |
+
|
52 |
+
data.$framePortfolio.find( '.vp-portfolio__item-overlay' ).removeClass( allAlignClasses ).addClass( `vp-portfolio__item-align-${ val }` );
|
53 |
+
|
54 |
+
break;
|
55 |
+
}
|
56 |
+
case 'filter_align':
|
57 |
+
data.$framePortfolio.find( '.vp-filter' ).removeClass( 'vp-filter__align-center vp-filter__align-left vp-filter__align-right' ).addClass( `vp-filter__align-${ val }` );
|
58 |
+
|
59 |
+
break;
|
60 |
+
case 'sort_align':
|
61 |
+
data.$framePortfolio.find( '.vp-sort' ).removeClass( 'vp-sort__align-center vp-sort__align-left vp-sort__align-right' ).addClass( `vp-sort__align-${ val }` );
|
62 |
+
|
63 |
+
break;
|
64 |
+
case 'pagination_align':
|
65 |
+
data.$framePortfolio.find( '.vp-pagination' ).removeClass( 'vp-pagination__align-center vp-pagination__align-left vp-pagination__align-right' ).addClass( `vp-pagination__align-${ val }` );
|
66 |
+
|
67 |
+
break;
|
68 |
+
// prevent some options reload
|
69 |
+
case 'list_name':
|
70 |
+
case 'stretch':
|
71 |
+
case 'custom_css':
|
72 |
+
// no reload
|
73 |
+
break;
|
74 |
+
default:
|
75 |
+
reload = reload || data.reload;
|
76 |
+
break;
|
77 |
+
}
|
78 |
+
} );
|
79 |
+
|
80 |
+
return {
|
81 |
+
...data,
|
82 |
+
reload,
|
83 |
+
};
|
84 |
+
} );
|
gutenberg/components/select-control/index.js
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
Â
* External dependencies
|
3 |
Â
*/
|
4 |
Â
import { debounce } from 'throttle-debounce';
|
Â
|
|
5 |
Â
import Select, { components } from 'react-select';
|
6 |
Â
import AsyncSelect from 'react-select/async';
|
7 |
Â
import CreatableSelect from 'react-select/creatable';
|
@@ -53,7 +54,7 @@ export default class VpfSelectControl extends Component {
|
|
53 |
Â
this.getDefaultValue = this.getDefaultValue.bind( this );
|
54 |
Â
this.findValueData = this.findValueData.bind( this );
|
55 |
Â
this.requestAjax = this.requestAjax.bind( this );
|
56 |
-
this.requestAjaxDebounce = debounce( 300, this.requestAjax );
|
57 |
Â
}
|
58 |
Â
|
59 |
Â
componentDidMount() {
|
2 |
Â
* External dependencies
|
3 |
Â
*/
|
4 |
Â
import { debounce } from 'throttle-debounce';
|
5 |
+
import rafSchd from 'raf-schd';
|
6 |
Â
import Select, { components } from 'react-select';
|
7 |
Â
import AsyncSelect from 'react-select/async';
|
8 |
Â
import CreatableSelect from 'react-select/creatable';
|
54 |
Â
this.getDefaultValue = this.getDefaultValue.bind( this );
|
55 |
Â
this.findValueData = this.findValueData.bind( this );
|
56 |
Â
this.requestAjax = this.requestAjax.bind( this );
|
57 |
+
this.requestAjaxDebounce = debounce( 300, rafSchd( this.requestAjax ) );
|
58 |
Â
}
|
59 |
Â
|
60 |
Â
componentDidMount() {
|
gutenberg/custom-post-meta.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=263)}({263:function(e,t,n){e.exports=n(273)},264:function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=l(e);if(t){var r=l(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=wp.i18n.__,f=wp.compose,p=f.withInstanceId,s=f.compose,m=wp.data,d=m.withSelect,b=m.withDispatch,y=wp.element,v=y.Fragment,h=y.Component,w=wp.components,_=w.PanelRow,g=w.FocalPointPicker,P=wp.hooks.addFilter,O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(f,e);var t,n,u,l=a(f);function f(){return o(this,f),l.apply(this,arguments)}return t=f,(n=[{key:"render",value:function(){var e=this.props,t=e.getMeta,n=e.thumbnailData,o=e.updateMeta,r="";if(n&&(r=n.source_url,n.mime_type&&"image/gif"===n.mime_type||(n.media_details&&n.media_details.sizes&&n.media_details.sizes["post-thumbnail"]?r=n.media_details.sizes["post-thumbnail"].source_url:n.media_details&&n.media_details.sizes&&n.media_details.sizes.thumbnail&&(r=n.media_details.sizes.thumbnail.source_url))),!r)return null;var i=t("_vp_image_focal_point");return i&&i.x&&i.y||(i={x:"0.5",y:"0.5"}),wp.element.createElement("div",{className:"vpf-post-image-focal-point-panel"},wp.element.createElement(_,null,wp.element.createElement("p",{className:"description"},c("Focal point will be used in Visual Portfolio layouts only.","@@text_domain"))),wp.element.createElement(_,null,wp.element.createElement(g,{url:r,value:i,onChange:function(e){o("_vp_image_focal_point",e)}})))}}])&&r(t.prototype,n),u&&r(t,u),f}(h),j=s([d((function(e){var t=e("core/editor").getEditedPostAttribute,n=e("core").getMedia,o=t("featured_media"),r=t("meta")||{};return{thumbnailData:o?n(o):null,getMeta:function(e){return r[e]}}})),b((function(e){return{updateMeta:function(t,n){var o,r,i;e("core/editor").editPost({meta:(o={},r=t,i=n,r in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i,o)})}}})),p])(O);P("editor.PostFeaturedImage","vpf/post-featured-image-focal-point",(function(e){return function(t){return wp.element.createElement(v,null,wp.element.createElement(j,null),wp.element.createElement(e,t))}}))},273:function(e,t,n){"use strict";n.r(t);var o=n(3);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=f(e);if(t){var r=f(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?c(e):t}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=wp.i18n.__,s=wp.compose,m=s.withInstanceId,d=s.compose,b=wp.data,y=b.withSelect,v=b.withDispatch,h=wp.element.Component,w=wp.components,_=w.PanelRow,g=w.TextControl,P=wp.editPost.PluginDocumentSettingPanel,O=wp.plugins.registerPlugin,j=window,S=j.jQuery,x=j.ajaxurl,E=j.VPGutenbergMetaVariables,M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(f,e);var t,n,r,l=u(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(t=l.call(this,e)).state={oembedQuery:"",oembedHTML:""},t.maybePrepareOembed=Object(o.debounce)(300,t.maybePrepareOembed.bind(c(t))),t}return t=f,(n=[{key:"componentDidMount",value:function(){this.maybePrepareOembed()}},{key:"componentDidUpdate",value:function(){this.maybePrepareOembed()}},{key:"maybePrepareOembed",value:function(){var e=this,t=this.state,n=t.oembedQuery,o=t.oembedHTML,r=this.props,i=r.getMeta;if("video"===(0,r.getPostFormat)()){var a=i("_vp_format_video_url");n!==a&&(this.oembedAjax&&this.oembedAjax.abort&&this.oembedAjax.abort(),n||!o?this.oembedAjax=S.ajax({url:x,method:"POST",dataType:"json",data:{action:"vp_find_oembed",q:a,nonce:E.nonce},complete:function(t){var n=t.responseJSON,o={oembedQuery:a,oembedHTML:""};n&&void 0!==n.html&&(o.oembedHTML=n.html),e.setState(o),e.oembedAjax=null}}):this.setState({oembedHTML:""}))}}},{key:"render",value:function(){var e=this.props,t=e.getMeta,n=e.getPostFormat,o=e.updateMeta,r=this.state.oembedHTML;return"video"!==n()?null:wp.element.createElement(P,{name:"VPVideo",title:p("Video","@@text_domain"),icon:wp.element.createElement("svg",{width:"14",height:"14",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M19.25 10C19.25 15.1086 15.1086 19.25 10 19.25C4.89137 19.25 0.75 15.1086 0.75 10C0.75 4.89137 4.89137 0.75 10 0.75C15.1086 0.75 19.25 4.89137 19.25 10Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"transparent"}),wp.element.createElement("path",{d:"M8 12.6326V7.36671C8.00011 7.30082 8.01856 7.23618 8.05342 7.17955C8.08828 7.12293 8.13826 7.0764 8.19812 7.04485C8.25798 7.0133 8.32552 6.99789 8.39367 7.00023C8.46181 7.00257 8.52805 7.02258 8.58544 7.05816L12.8249 9.69035C12.8786 9.72358 12.9228 9.76933 12.9534 9.82337C12.984 9.87742 13 9.93803 13 9.99963C13 10.0612 12.984 10.1218 12.9534 10.1759C12.9228 10.2299 12.8786 10.2757 12.8249 10.3089L8.58544 12.9418C8.52805 12.9774 8.46181 12.9974 8.39367 12.9998C8.32552 13.0021 8.25798 12.9867 8.19812 12.9551C8.13826 12.9236 8.08828 12.8771 8.05342 12.8204C8.01856 12.7638 8.00011 12.6992 8 12.6333V12.6326Z",fill:"currentColor"})),className:"vpf-meta-video-panel"},wp.element.createElement(_,null,wp.element.createElement("p",{className:"description"},p("Video will be used in Visual Portfolio layouts only. Full list of supported links","@@text_domain"),"Â ",wp.element.createElement("a",{href:"https://visualportfolio.co/documentation/portfolio-items/video-portfolio-item/#supported-video-vendors",target:"_blank",rel:"noopener noreferrer"},p("see here","@@text_domain")))),wp.element.createElement(_,null,wp.element.createElement(g,{label:p("Video URL","@@text_domain"),value:t("_vp_format_video_url")||"",onChange:function(e){o("_vp_format_video_url",e)},type:"url",placeholder:"https://"})),wp.element.createElement(_,null,wp.element.createElement("div",{className:"vp-oembed-preview",dangerouslySetInnerHTML:{__html:r}})))}}])&&i(t.prototype,n),r&&i(t,r),f}(h);O("vp-video",{render:d([y((function(e){return{getMeta:function(t){return(e("core/editor").getEditedPostAttribute("meta")||{})[t]},getPostFormat:function(){return e("core/editor").getEditedPostAttribute("format")}}})),v((function(e){return{updateMeta:function(t,n){var o,r,i;e("core/editor").editPost({meta:(o={},r=t,i=n,r in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i,o)})}}})),m])(M)});n(264)},3:function(e,t,n){var o,r,i,a;function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}a=function(e){"use strict";function t(e,t,n,o){var r,i=!1,a=0;function u(){r&&clearTimeout(r)}function l(){for(var l=arguments.length,c=new Array(l),f=0;f<l;f++)c[f]=arguments[f];var p=this,s=Date.now()-a;function m(){a=Date.now(),n.apply(p,c)}function d(){r=void 0}i||(o&&!r&&m(),u(),void 0===o&&s>e?m():!0!==t&&(r=setTimeout(o?d:m,void 0===o?e-s:e)))}return"boolean"!=typeof t&&(o=n,n=t,t=void 0),l.cancel=function(){u(),i=!0},l}e.debounce=function(e,n,o){return void 0===o?t(e,n,!1):t(e,o,!1!==n)},e.throttle=t,Object.defineProperty(e,"__esModule",{value:!0})},"object"===u(t)&&void 0!==e?a(t):(r=[t],void 0===(i="function"==typeof(o=a)?o.apply(t,r):o)||(e.exports=i))}});
|
1 |
+
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=265)}({265:function(e,t,n){e.exports=n(275)},266:function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=l(e);if(t){var r=l(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=wp.i18n.__,f=wp.compose,p=f.withInstanceId,s=f.compose,m=wp.data,d=m.withSelect,b=m.withDispatch,y=wp.element,v=y.Fragment,h=y.Component,w=wp.components,_=w.PanelRow,g=w.FocalPointPicker,P=wp.hooks.addFilter,O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(f,e);var t,n,u,l=a(f);function f(){return o(this,f),l.apply(this,arguments)}return t=f,(n=[{key:"render",value:function(){var e=this.props,t=e.getMeta,n=e.thumbnailData,o=e.updateMeta,r="";if(n&&(r=n.source_url,n.mime_type&&"image/gif"===n.mime_type||(n.media_details&&n.media_details.sizes&&n.media_details.sizes["post-thumbnail"]?r=n.media_details.sizes["post-thumbnail"].source_url:n.media_details&&n.media_details.sizes&&n.media_details.sizes.thumbnail&&(r=n.media_details.sizes.thumbnail.source_url))),!r)return null;var i=t("_vp_image_focal_point");return i&&i.x&&i.y||(i={x:"0.5",y:"0.5"}),wp.element.createElement("div",{className:"vpf-post-image-focal-point-panel"},wp.element.createElement(_,null,wp.element.createElement("p",{className:"description"},c("Focal point will be used in Visual Portfolio layouts only.","@@text_domain"))),wp.element.createElement(_,null,wp.element.createElement(g,{url:r,value:i,onChange:function(e){o("_vp_image_focal_point",e)}})))}}])&&r(t.prototype,n),u&&r(t,u),f}(h),j=s([d((function(e){var t=e("core/editor").getEditedPostAttribute,n=e("core").getMedia,o=t("featured_media"),r=t("meta")||{};return{thumbnailData:o?n(o):null,getMeta:function(e){return r[e]}}})),b((function(e){return{updateMeta:function(t,n){var o,r,i;e("core/editor").editPost({meta:(o={},r=t,i=n,r in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i,o)})}}})),p])(O);P("editor.PostFeaturedImage","vpf/post-featured-image-focal-point",(function(e){return function(t){return wp.element.createElement(v,null,wp.element.createElement(j,null),wp.element.createElement(e,t))}}))},275:function(e,t,n){"use strict";n.r(t);var o=n(3),r=n(4);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=p(e);if(t){var r=p(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var s=wp.i18n.__,m=wp.compose,d=m.withInstanceId,b=m.compose,y=wp.data,v=y.withSelect,h=y.withDispatch,w=wp.element.Component,_=wp.components,g=_.PanelRow,P=_.TextControl,O=wp.editPost.PluginDocumentSettingPanel,j=wp.plugins.registerPlugin,S=window,x=S.jQuery,E=S.ajaxurl,M=S.VPGutenbergMetaVariables,C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(p,e);var t,n,i,c=l(p);function p(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(t=c.call(this,e)).state={oembedQuery:"",oembedHTML:""},t.maybePrepareOembed=Object(o.debounce)(300,Object(r.a)(t.maybePrepareOembed.bind(f(t)))),t}return t=p,(n=[{key:"componentDidMount",value:function(){this.maybePrepareOembed()}},{key:"componentDidUpdate",value:function(){this.maybePrepareOembed()}},{key:"maybePrepareOembed",value:function(){var e=this,t=this.state,n=t.oembedQuery,o=t.oembedHTML,r=this.props,i=r.getMeta;if("video"===(0,r.getPostFormat)()){var a=i("_vp_format_video_url");n!==a&&(this.oembedAjax&&this.oembedAjax.abort&&this.oembedAjax.abort(),n||!o?this.oembedAjax=x.ajax({url:E,method:"POST",dataType:"json",data:{action:"vp_find_oembed",q:a,nonce:M.nonce},complete:function(t){var n=t.responseJSON,o={oembedQuery:a,oembedHTML:""};n&&void 0!==n.html&&(o.oembedHTML=n.html),e.setState(o),e.oembedAjax=null}}):this.setState({oembedHTML:""}))}}},{key:"render",value:function(){var e=this.props,t=e.getMeta,n=e.getPostFormat,o=e.updateMeta,r=this.state.oembedHTML;return"video"!==n()?null:wp.element.createElement(O,{name:"VPVideo",title:s("Video","@@text_domain"),icon:wp.element.createElement("svg",{width:"14",height:"14",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M19.25 10C19.25 15.1086 15.1086 19.25 10 19.25C4.89137 19.25 0.75 15.1086 0.75 10C0.75 4.89137 4.89137 0.75 10 0.75C15.1086 0.75 19.25 4.89137 19.25 10Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"transparent"}),wp.element.createElement("path",{d:"M8 12.6326V7.36671C8.00011 7.30082 8.01856 7.23618 8.05342 7.17955C8.08828 7.12293 8.13826 7.0764 8.19812 7.04485C8.25798 7.0133 8.32552 6.99789 8.39367 7.00023C8.46181 7.00257 8.52805 7.02258 8.58544 7.05816L12.8249 9.69035C12.8786 9.72358 12.9228 9.76933 12.9534 9.82337C12.984 9.87742 13 9.93803 13 9.99963C13 10.0612 12.984 10.1218 12.9534 10.1759C12.9228 10.2299 12.8786 10.2757 12.8249 10.3089L8.58544 12.9418C8.52805 12.9774 8.46181 12.9974 8.39367 12.9998C8.32552 13.0021 8.25798 12.9867 8.19812 12.9551C8.13826 12.9236 8.08828 12.8771 8.05342 12.8204C8.01856 12.7638 8.00011 12.6992 8 12.6333V12.6326Z",fill:"currentColor"})),className:"vpf-meta-video-panel"},wp.element.createElement(g,null,wp.element.createElement("p",{className:"description"},s("Video will be used in Visual Portfolio layouts only. Full list of supported links","@@text_domain"),"Â ",wp.element.createElement("a",{href:"https://visualportfolio.co/documentation/portfolio-items/video-portfolio-item/#supported-video-vendors",target:"_blank",rel:"noopener noreferrer"},s("see here","@@text_domain")))),wp.element.createElement(g,null,wp.element.createElement(P,{label:s("Video URL","@@text_domain"),value:t("_vp_format_video_url")||"",onChange:function(e){o("_vp_format_video_url",e)},type:"url",placeholder:"https://"})),wp.element.createElement(g,null,wp.element.createElement("div",{className:"vp-oembed-preview",dangerouslySetInnerHTML:{__html:r}})))}}])&&a(t.prototype,n),i&&a(t,i),p}(w);j("vp-video",{render:b([v((function(e){return{getMeta:function(t){return(e("core/editor").getEditedPostAttribute("meta")||{})[t]},getPostFormat:function(){return e("core/editor").getEditedPostAttribute("format")}}})),h((function(e){return{updateMeta:function(t,n){var o,r,i;e("core/editor").editPost({meta:(o={},r=t,i=n,r in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i,o)})}}})),d])(C)});n(266)},3:function(e,t,n){var o,r,i,a;function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}a=function(e){"use strict";function t(e,t,n,o){var r,i=!1,a=0;function u(){r&&clearTimeout(r)}function l(){for(var l=arguments.length,c=new Array(l),f=0;f<l;f++)c[f]=arguments[f];var p=this,s=Date.now()-a;function m(){a=Date.now(),n.apply(p,c)}function d(){r=void 0}i||(o&&!r&&m(),u(),void 0===o&&s>e?m():!0!==t&&(r=setTimeout(o?d:m,void 0===o?e-s:e)))}return"boolean"!=typeof t&&(o=n,n=t,t=void 0),l.cancel=function(){u(),i=!0},l}e.debounce=function(e,n,o){return void 0===o?t(e,n,!1):t(e,o,!1!==n)},e.throttle=t,Object.defineProperty(e,"__esModule",{value:!0})},"object"===u(t)&&void 0!==e?a(t):(r=[t],void 0===(i="function"==typeof(o=a)?o.apply(t,r):o)||(e.exports=i))},4:function(e,t,n){"use strict";t.a=function(e){var t=[],n=null,o=function(){for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];t=r,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return o.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},o}}});
|
gutenberg/custom-post-meta/video.js
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
Â
* External Dependencies
|
3 |
Â
*/
|
4 |
Â
import { debounce } from 'throttle-debounce';
|
Â
|
|
5 |
Â
|
6 |
Â
/**
|
7 |
Â
* WordPress Dependencies
|
@@ -43,7 +44,7 @@ class VpVideoComponent extends Component {
|
|
43 |
Â
oembedHTML: '',
|
44 |
Â
};
|
45 |
Â
|
46 |
-
this.maybePrepareOembed = debounce( 300, this.maybePrepareOembed.bind( this ) );
|
47 |
Â
}
|
48 |
Â
|
49 |
Â
componentDidMount() {
|
2 |
Â
* External Dependencies
|
3 |
Â
*/
|
4 |
Â
import { debounce } from 'throttle-debounce';
|
5 |
+
import rafSchd from 'raf-schd';
|
6 |
Â
|
7 |
Â
/**
|
8 |
Â
* WordPress Dependencies
|
44 |
Â
oembedHTML: '',
|
45 |
Â
};
|
46 |
Â
|
47 |
+
this.maybePrepareOembed = debounce( 300, rafSchd( this.maybePrepareOembed.bind( this ) ) );
|
48 |
Â
}
|
49 |
Â
|
50 |
Â
componentDidMount() {
|
gutenberg/index.min.js
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=
|
2 |
Â
/*!
|
3 |
Â
Copyright (c) 2017 Jed Watson.
|
4 |
Â
Licensed under the MIT License (MIT), see
|
5 |
Â
http://jedwatson.github.io/classnames
|
6 |
-
*/!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var n=t.length,i=0;i<n;++i)r(e,t[i])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var i=/\s+/;function r(e,r){if(r){var s=o(r);"string"===s?function(e,t){for(var n=t.split(i),o=n.length,r=0;r<o;++r)e[n[r]]=!0}(e,r):Array.isArray(r)?t(e,r):"object"===s?function(e,t){for(var i in t)n.call(t,i)&&(e[i]=!!t[i])}(e,r):"number"===s&&function(e,t){e[t]=!0}(e,r)}}return function(){for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];var r=new e;t(r,i);var s=[];for(var a in r)r[a]&&s.push(a);return s.join(" ")}}();e.exports?(r.default=r,e.exports=r):"object"===o(n(46))&&n(46)?void 0===(i=function(){return r}.apply(t,[]))||(e.exports=i):window.classNames=r}()},function(e,t,n){var i,o,r,s;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}s=function(e){"use strict";function t(e,t,n,i){var o,r=!1,s=0;function a(){o&&clearTimeout(o)}function l(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var h=this,d=Date.now()-s;function p(){s=Date.now(),n.apply(h,c)}function f(){o=void 0}r||(i&&!o&&p(),a(),void 0===i&&d>e?p():!0!==t&&(o=setTimeout(i?f:p,void 0===i?e-d:e)))}return"boolean"!=typeof t&&(i=n,n=t,t=void 0),l.cancel=function(){a(),r=!0},l}e.debounce=function(e,n,i){return void 0===i?t(e,n,!1):t(e,i,!1!==n)},e.throttle=t,Object.defineProperty(e,"__esModule",{value:!0})},"object"===a(t)&&void 0!==e?s(t):(o=[t],void 0===(r="function"==typeof(i=s)?i.apply(t,o):i)||(e.exports=r))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(54),r="object"==("undefined"==typeof self?"undefined":i(self))&&self&&self.Object===Object&&self,s=o||r||Function("return this")();e.exports=s},function(e,t){e.exports=ReactDOM},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){var t=n(e);return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";e.exports=function(e,t,n,i,o,r,s,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,i,o,r,s,a],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){var i=n(103),o=n(108);e.exports=function(e,t){var n=o(e,t);return i(n)?n:void 0}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return null!=e&&"object"==n(e)}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var i=n(15),o=n(104),r=n(105),s=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):r(e)}},function(e,t,n){var i=n(32),o=n(51);e.exports=function(e,t,n,r){var s=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var c=t[a],u=r?r(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),s?o(n,c,u):i(n,c,u)}return n}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(i=window)}e.exports=i},function(e,t,n){var i=n(5).Symbol;e.exports=i},function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=n(0),a=c(s),l=c(n(1));function c(e){return e&&e.__esModule?e:{default:e}}var u={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},h=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],d=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},p=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),f=function(){return p?"_"+Math.random().toString(36).substr(2,12):void 0},g=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==i(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||f()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+i(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||f()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(d(e,this.sizer),this.placeHolderSizer&&d(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return p&&e?a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=o({},this.props.style);t.display||(t.display="inline-block");var n=o({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),i=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(this.props,[]);return function(e){h.forEach((function(t){return delete e[t]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",o({},i,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:u},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:u},this.props.placeholder):null)}}]),t}(s.Component);g.propTypes={className:l.default.string,defaultValue:l.default.any,extraWidth:l.default.oneOfType([l.default.number,l.default.string]),id:l.default.string,injectStyles:l.default.bool,inputClassName:l.default.string,inputRef:l.default.func,inputStyle:l.default.object,minWidth:l.default.oneOfType([l.default.number,l.default.string]),onAutosize:l.default.func,onChange:l.default.func,placeholder:l.default.string,placeholderIsMinWidth:l.default.bool,style:l.default.object,value:l.default.any},g.defaultProps={minWidth:1,injectStyles:!0},t.default=g},function(e,t,n){"use strict";var i=n(0);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var r=i.createElement("rect",{width:100,height:100,rx:50,fill:"currentColor"}),s=i.createElement("path",{d:"M57.531 69.5L70.244 33H58.447L47 69.5h10.531z",fill:"url(#icon-gutenberg_svg__paint0_linear)"}),a=i.createElement("path",{d:"M42.713 69.5L30 33h11.797l11.447 36.5H42.713z",fill:"#fff"}),l=i.createElement("defs",null,i.createElement("linearGradient",{id:"icon-gutenberg_svg__paint0_linear",x1:64.5,y1:33,x2:33,y2:77,gradientUnits:"userSpaceOnUse"},i.createElement("stop",{stopColor:"#fff"}),i.createElement("stop",{offset:1,stopColor:"#fff",stopOpacity:0})));t.a=function(e){return i.createElement("svg",o({width:100,height:100,viewBox:"0 0 100 100",fill:"none"},e),r,s,a,l)}},function(e,t,n){"use strict";function i(e,t){var n=t[e];if(void 0===n&&/[\[\.]/g.test(e)){var i=e.split("."),o=[];if(i&&i.length&&(i.forEach((function(e){if(/[\[]/g.test(e)){var t=e.split(/[\[\]]/g);t&&t.length&&t.forEach((function(e){""!==e&&("".concat(parseInt(e,10))===e?o.push(parseInt(e,10)):o.push(e))}))}else o.push(e)})),o.length)){var r=t;o.forEach((function(e){r=r&&void 0!==r[e]?r[e]:void 0})),n=r}}return n}n.d(t,"a",(function(){return i}))},function(e,t,n){var i=n(53),o=n(59);e.exports=function(e){return null!=e&&o(e.length)&&!i(e)}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var i=n(61),o=n(121),r=n(19);e.exports=function(e){return r(e)?i(e):o(e)}},function(e,t,n){function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(12),r=n(10);e.exports=function(e){return"symbol"==i(e)||r(e)&&"[object Symbol]"==o(e)}},function(e,t,n){var i=n(140),o=n(141),r=n(142),s=n(143),a=n(144);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=r,l.prototype.has=s,l.prototype.set=a,e.exports=l},function(e,t,n){var i=n(33);e.exports=function(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}},function(e,t,n){var i=n(9)(Object,"create");e.exports=i},function(e,t,n){var i=n(158);e.exports=function(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(18);function o(e,t,n){var i=!0;switch(t){case"==":i=e==n;break;case"===":i=e===n;break;case"!=":i=e!=n;break;case"!==":i=e!==n;break;case"*=":i=-1!==e.indexOf(n);break;case">=":i=e>=n;break;case"<=":i=e<=n;break;case">":i=e>n;break;case"<":i=e<n;break;case"&&":case"AND":i=e&&n;break;case"||":case"OR":i=e||n;break;default:i=e}return i}function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"AND",s="AND"===n,a=s?"OR":"AND";return e.forEach((function(e){if(Array.isArray(e)&&!e.control)s=o(s,n,r(e,t,a));else if(e.control){var l=Object(i.a)(e.control,t),c=e.operator||"==",u=void 0!==e.value?e.value:"true";"true"===l?l=!0:"false"===l&&(l=!1),"true"===u?u=!0:"false"===u&&(u=!1),s=o(s,n,o(l,c,u))}})),s}},function(e,t,n){(function(e){function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function e(t,n,i){"string"==typeof t?(2==arguments.length&&(i=n),e.modules[t]||(e.payloads[t]=i,e.modules[t]=null)):e.original?e.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n,i,o=function(e,t,n){if("string"==typeof t){var i=s(e,t);if(null!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var o=[],a=0,l=t.length;a<l;++a){var c=s(e,t[a]);if(null==c&&r.original)return;o.push(c)}return n&&n.apply(null,o)||!0}},r=function e(t,n){var i=o("",t,n);return null==i&&e.original?e.original.apply(this,arguments):i},s=function(e,n){n=function e(t,n){if(-1!==n.indexOf("!")){var i=n.split("!");return e(t,i[0])+"!"+e(t,i[1])}if("."==n.charAt(0))for(n=t.split("/").slice(0,-1).join("/")+"/"+n;-1!==n.indexOf(".")&&o!=n;){var o=n;n=n.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return n}(e,n);var i=t.modules[n];if(!i){if("function"==typeof(i=t.payloads[n])){var r={},s={id:n,uri:"",exports:r,packaged:!0};r=i((function(e,t){return o(n,e,t)}),r,s)||s.exports,t.modules[n]=r,delete t.payloads[n]}i=t.modules[n]=r||i}return i};i=e,(n="ace")&&(e[n]||(e[n]={}),i=e[n]),i.define&&i.define.packaged||(t.original=i.define,i.define=t,i.define.packaged=!0),i.require&&i.require.packaged||(r.original=i.require,i.require=r,i.require.packaged=!0)}(),ace.define("ace/lib/fixoldbrowsers",["require","exports","module"],(function(e,t,n){"use strict";"undefined"==typeof Element||Element.prototype.remove||Object.defineProperty(Element.prototype,"remove",{enumerable:!1,writable:!0,configurable:!0,value:function(){this.parentNode&&this.parentNode.removeChild(this)}})})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var o="object"==("undefined"==typeof navigator?"undefined":i(navigator))?navigator:{},r=(/mac|win|linux/i.exec(o.platform)||["other"])[0].toLowerCase(),s=o.userAgent||"",a=o.appName||"";t.isWin="win"==r,t.isMac="mac"==r,t.isLinux="linux"==r,t.isIE="Microsoft Internet Explorer"==a||a.indexOf("MSAppHost")>=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=s.match(/ Gecko\/\d+/),t.isOpera="object"==("undefined"==typeof opera?"undefined":i(opera))&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(s.split(" Edge/")[1])||void 0,t.isAIR=s.indexOf("AdobeAIR")>=0,t.isAndroid=s.indexOf("Android")>=0,t.isChromeOS=s.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var o=e("./useragent");if(t.buildDom=function e(t,n,o){if("string"==typeof t&&t){var r=document.createTextNode(t);return n&&n.appendChild(r),r}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var s=[],a=0;a<t.length;a++){var l=e(t[a],n,o);l&&s.push(l)}return s}var c=document.createElement(t[0]),u=t[1],h=1;u&&"object"==i(u)&&!Array.isArray(u)&&(h=2);for(a=h;a<t.length;a++)e(t[a],c,o);return 2==h&&Object.keys(u).forEach((function(e){var t=u[e];"class"===e?c.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?c[e]=t:"ref"===e?o&&(o[t]=c):null!=t&&c.setAttribute(e,t)})),n&&n.appendChild(c),c},t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var i=n.indexOf(t);if(-1==i)break;n.splice(i,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),i=!0;;){var o=n.indexOf(t);if(-1==o)break;i=!1,n.splice(o,1)}return i&&n.push(t),e.className=n.join(" "),i},t.setCssClass=function(e,n,i){i?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,i=0;if(n=(t=t||document).querySelectorAll("style"))for(;i<n.length;)if(n[i++].id===e)return!0},t.importCssString=function(e,n,i){var o=i;i&&i.getRootNode&&(o=i.getRootNode())&&o!=i||(o=document);var r=o.ownerDocument||o;if(n&&t.hasCssString(n,o))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var s=t.createElement("style");s.appendChild(r.createTextNode(e)),n&&(s.id=n),o==r&&(o=t.getDocumentHead(r)),o.insertBefore(s,o.firstChild)},t.importCssStylsheet=function(e,n){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(n))},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=t.createElement("ace_outer"),o=i.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",i.appendChild(n);var r=e.documentElement;r.appendChild(i);var s=n.offsetWidth;o.overflow="scroll";var a=n.offsetWidth;return s==a&&(a=i.clientWidth),r.removeChild(i),s-a},"undefined"==typeof document&&(t.importCssString=function(){}),t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!o.isWin||"undefined"!=typeof window&&window.devicePixelRatio>=1.5,"undefined"!=typeof document){var r=document.createElement("div");t.HI_DPI&&void 0!==r.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),o.isEdge||void 0===r.style.animationName||(t.HAS_CSS_ANIMATION=!0),r=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("./oop"),o=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter((function(e){return t&n.KEY_MODS[e]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(t,o),t.keyCodeToString=function(e){var t=o[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var o,r=e("./keys"),s=e("./useragent"),a=null,l=0;function c(){return null==o&&function(){o=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){o={passive:!1}}})}catch(e){}}(),o}function u(e,t,n){this.elem=e,this.type=t,this.callback=n}u.prototype.destroy=function(){d(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var h=t.addListener=function(e,t,n,i){e.addEventListener(t,n,c()),i&&i.$toDestroy.push(new u(e,t,n))},d=t.removeListener=function(e,t,n){e.removeEventListener(t,n,c())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||s.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var i=e&&e.ownerDocument||document;function o(e){t&&t(e),n&&n(e),d(i,"mousemove",t),d(i,"mouseup",o),d(i,"dragstart",o)}return h(i,"mousemove",t),h(i,"mouseup",o),h(i,"dragstart",o),o},t.addMouseWheelListener=function(e,t,n){"onmousewheel"in e?h(e,"mousewheel",(function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),t(e)}),n):"onwheel"in e?h(e,"wheel",(function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}t(e)}),n):h(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),t(e)}),n)},t.addMultiMouseDownListener=function(e,n,i,o,r){var a,l,c,u=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};function p(e){if(0!==t.getButton(e)?u=0:e.detail>1?++u>4&&(u=1):u=1,s.isIE){var r=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-l)>5;c&&!r||(u=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[u-1]||600),1==u&&(a=e.clientX,l=e.clientY)}if(e._clicks=u,i[o]("mousedown",e),u>4)u=0;else if(u>1)return i[o](d[u],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){h(e,"mousedown",p,r)}))};var p=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function f(e,t,n){var i=p(t);if(!s.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),a.altGr){if(3==(3&i))return;a.altGr=0}if(18===n||17===n){var o="location"in t?t.location:t.keyLocation;if(17===n&&1===o)1==a[n]&&(l=t.timeStamp);else if(18===n&&3===i&&2===o){t.timeStamp-l<50&&(a.altGr=!0)}}}if((n in r.MODIFIER_KEYS&&(n=-1),!i&&13===n)&&(3===(o="location"in t?t.location:t.keyLocation)&&(e(t,i,-n),t.defaultPrevented)))return;if(s.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&e(t,i,n)}function g(){a=Object.create(null)}if(t.getModifierString=function(e){return r.KEY_MODS[p(e)]},t.addCommandKeyListener=function(e,n,i){if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var o=null;h(e,"keydown",(function(e){o=e.keyCode}),i),h(e,"keypress",(function(e){return f(n,e,o)}),i)}else{var r=null;h(e,"keydown",(function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=f(n,e,e.keyCode);return r=e.defaultPrevented,t}),i),h(e,"keypress",(function(e){r&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),r=null)}),i),h(e,"keyup",(function(e){a[e.keyCode]=null}),i),a||(g(),h(window,"focus",g))}},"object"==("undefined"==typeof window?"undefined":i(window))&&window.postMessage&&!s.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-"+m++;h(n,"message",(function o(r){r.data==i&&(t.stopPropagation(r),d(n,"message",o),e())})),n.postMessage(i,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==("undefined"==typeof window?"undefined":i(window))&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";var o=function(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==i(e)?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==i(e)?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)n={row:e,column:0};if(this.start.row>t)var i={row:t+1,column:0};else if(this.start.row<e)i={row:e,column:0};return o.fromPoints(i||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(0==n)return this;if(-1==n)var i={row:e,column:t};else var r={row:e,column:t};return o.fromPoints(i||this.start,r||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return o.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new o(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new o(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new o(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(o.prototype),o.fromPoints=function(e,t){return new o(e.row,e.column,t.row,t.column)},o.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},o.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=o})),ace.define("ace/lib/lang",["require","exports","module"],(function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var o=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(o,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,o=e.length;n<o;n++)e[n]&&"object"==i(e[n])?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function e(t){if("object"!==i(t)||!t)return t;var n;if(Array.isArray(t)){n=[];for(var o=0;o<t.length;o++)n[o]=e(t[o]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var o in n={},t)n[o]=e(t[o]);return n},t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,(function(e){n.push({offset:arguments[arguments.length-2],length:e.length})})),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},i=function e(i){return e.cancel(),t=setTimeout(n,i||0),e};return i.schedule=i,i.call=function(){return this.cancel(),e(),i},i.cancel=function(){return clearTimeout(t),t=null,i},i.isPending=function(){return t},i},t.delayedCall=function(e,t){var n=null,i=function(){n=null,e()},o=function(e){null==n&&(n=setTimeout(i,e||t))};return o.delay=function(e){n&&clearTimeout(n),n=setTimeout(i,e||t)},o.schedule=o,o.call=function(){this.cancel(),e()},o.cancel=function(){n&&clearTimeout(n),n=null},o.isPending=function(){return n},o}})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,n){"use strict";var i;n.exports={lineMode:!1,pasteCancelled:function(){return!!(i&&i>Date.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var i=e("../lib/event"),o=e("../lib/useragent"),r=e("../lib/dom"),s=e("../lib/lang"),a=e("../clipboard"),l=o.isChrome<18,c=o.isIE,u=o.isChrome>63,h=e("../lib/keys"),d=h.KEY_MODS,p=o.isIOS,f=p?/\s/:/\n/,g=o.isMobile;t.TextInput=function(e,t){var n=r.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var m=!1,v=!1,b=!1,y=!1,w="";g||(n.style.fontSize="1px");var x=!1,S=!1,C="",k=0,E=0,$=0;try{var _=document.activeElement===n}catch(e){}i.addListener(n,"blur",(function(e){S||(t.onBlur(e),_=!1)}),t),i.addListener(n,"focus",(function(e){if(!S){if(_=!0,o.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),o.isEdge?setTimeout(A):A()}}),t),this.$focusScroll=!1,this.focus=function(){if(w||u||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch(e){return}var i=[];if(t)for(var o=n.parentElement;o&&1==o.nodeType;)i.push(o),o.setAttribute("ace_nocontext",!0),o=!o.parentElement&&o.getRootNode?o.getRootNode().host:o.parentElement;n.focus({preventScroll:!0}),t&&i.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return _},t.on("beforeEndOperation",(function(){var e=t.curOp,i=e&&e.command&&e.command.name;if("insertstring"!=i){var o=i&&(e.docChanged||e.selectionChanged);b&&o&&(C=n.value="",N()),A()}}));var A=p?function(e){if(_&&(!m||e)&&!y){e||(e="");var i="\n ab"+e+"cde fg\n";i!=n.value&&(n.value=C=i);var o=4+(e.length||(t.selection.isEmpty()?0:1));4==k&&E==o||n.setSelectionRange(4,o),k=4,E=o}}:function(){if(!b&&!y&&(_||L)){b=!0;var e=0,i=0,o="";if(t.session){var r=t.selection,s=r.getRange(),a=r.cursor.row;if(e=s.start.column,i=s.end.column,o=t.session.getLine(a),s.start.row!=a){var l=t.session.getLine(a-1);e=s.start.row<a-1?0:e,i+=l.length+1,o=l+"\n"+o}else if(s.end.row!=a){var c=t.session.getLine(a+1);i=s.end.row>a+1?c.length:i,i+=o.length+1,o=o+"\n"+c}else g&&a>0&&(o="\n"+o,i+=1,e+=1);o.length>400&&(e<400&&i<400?o=o.slice(0,400):(o="\n",e==i?e=i=0:(e=0,i=1)))}var u=o+"\n\n";if(u!=C&&(n.value=C=u,k=E=u.length),L&&(k=n.selectionStart,E=n.selectionEnd),E!=i||k!=e||n.selectionEnd!=E)try{n.setSelectionRange(e,i),k=e,E=i}catch(e){}b=!1}};this.resetSelection=A,_&&t.onFocus();var O=null;this.setInputHandler=function(e){O=e},this.getInputHandler=function(){return O};var L=!1,R=function(e,i){if(L&&(L=!1),v)return A(),e&&t.onPaste(e),v=!1,"";for(var r=n.selectionStart,s=n.selectionEnd,a=k,l=C.length-E,c=e,u=e.length-r,h=e.length-s,d=0;a>0&&C[d]==e[d];)d++,a--;for(c=c.slice(d),d=1;l>0&&C.length-d>k-1&&C[C.length-d]==e[e.length-d];)d++,l--;u-=d-1,h-=d-1;var p=c.length-d+1;if(p<0&&(a=-p,p=0),c=c.slice(0,p),!(i||c||u||a||l||h))return"";y=!0;var f=!1;return o.isAndroid&&". "==c&&(c=" ",f=!0),c&&!a&&!l&&!u&&!h||x?t.onTextInput(c):t.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:u,restoreEnd:h}),y=!1,C=e,k=r,E=s,$=h,f?"\n":c},T=function(e){if(b)return j();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var i=n.value,o=R(i,!0);(i.length>500||f.test(o)||g&&k<1&&k==E)&&A()},M=function e(t,n,i){var o=t.clipboardData||window.clipboardData;if(o&&!l){var r=c||i?"Text":"text/plain";try{return n?!1!==o.setData(r,n):o.getData(r)}catch(t){if(!i)return e(t,n,!0)}}},I=function(e,o){var r=t.getCopyText();if(!r)return i.preventDefault(e);M(e,r)?(p&&(A(r),m=r,setTimeout((function(){m=!1}),10)),o?t.onCut():t.onCopy(),i.preventDefault(e)):(m=!0,n.value=r,n.select(),setTimeout((function(){m=!1,A(),o?t.onCut():t.onCopy()})))},P=function(e){I(e,!0)},F=function(e){I(e,!1)},D=function(e){var r=M(e);a.pasteCancelled()||("string"==typeof r?(r&&t.onPaste(r,e),o.isIE&&setTimeout(A),i.preventDefault(e)):(n.value="",v=!0))};i.addCommandKeyListener(n,t.onCommandKey.bind(t),t),i.addListener(n,"select",(function(e){b||(m?m=!1:!function(e){return 0===e.selectionStart&&e.selectionEnd>=C.length&&e.value===C&&C&&e.selectionEnd!==E}(n)?g&&n.selectionStart!=k&&A():(t.selectAll(),A()))}),t),i.addListener(n,"input",T,t),i.addListener(n,"cut",P,t),i.addListener(n,"copy",F,t),i.addListener(n,"paste",D,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||i.addListener(e,"keydown",(function(e){if((!o.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:F(e);break;case 86:D(e);break;case 88:P(e)}}),t);var j=function(){if(b&&t.onCompositionUpdate&&!t.$readOnly){if(x)return B();if(b.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;R(e),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+E-b.selectionStart+$)}}},N=function(e){t.onCompositionEnd&&!t.$readOnly&&(b=!1,t.onCompositionEnd(),t.off("mousedown",B),e&&T())};function B(){S=!0,n.blur(),n.focus(),S=!1}var W,z=s.delayedCall(j,50).schedule.bind(null,null);function H(){clearTimeout(W),W=setTimeout((function(){w&&(n.style.cssText=w,w=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}i.addListener(n,"compositionstart",(function(e){if(!b&&t.onCompositionStart&&!t.$readOnly&&(b={},!x)){e.data&&(b.useTextareaForIME=!1),setTimeout(j,0),t._signal("compositionStart"),t.on("mousedown",B);var i=t.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,b.markerRange=i,b.selectionStart=k,t.onCompositionStart(b),b.useTextareaForIME?(C=n.value="",k=0,E=0):(n.msGetInputContext&&(b.context=n.msGetInputContext()),n.getInputContext&&(b.context=n.getInputContext()))}}),t),i.addListener(n,"compositionupdate",j,t),i.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.length<n.selectionStart&&(b||(C=n.value),k=E=-1,A()),z()}),t),i.addListener(n,"keydown",z,t),i.addListener(n,"compositionend",N,t),this.getElement=function(){return n},this.setCommandMode=function(e){x=e,n.readOnly=!1},this.setReadOnly=function(e){x||(n.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){L=!0,A(),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,s){w||(w=n.style.cssText),n.style.cssText=(s?"z-index:100000;":"")+(o.isIE?"opacity:0.1;":"")+"text-indent: -"+(k+E)*t.renderer.characterWidth*.5+"px;";var a=t.container.getBoundingClientRect(),l=r.computedStyle(t.container),c=a.top+(parseInt(l.borderTopWidth)||0),u=a.left+(parseInt(a.borderLeftWidth)||0),h=a.bottom-c-n.clientHeight-2,d=function(e){r.translate(n,e.clientX-u-2,Math.min(e.clientY-c-2,h))};d(e),"mousedown"==e.type&&(t.renderer.$isMousePressed=!0,clearTimeout(W),o.isWin&&i.capture(t.container,d,H))},this.onContextMenuClose=H;var V=function(e){t.textInput.onContextMenu(e),H()};i.addListener(n,"mouseup",V,t),i.addListener(n,"mousedown",(function(e){e.preventDefault(),H()}),t),i.addListener(t.renderer.scroller,"contextmenu",V,t),i.addListener(n,"contextmenu",V,t),p&&function(e,t,n){var i=null,o=!1;n.addEventListener("keydown",(function(e){i&&clearTimeout(i),o=!0}),!0),n.addEventListener("keyup",(function(e){i=setTimeout((function(){o=!1}),100)}),!0);var r=function(e){if(document.activeElement===n&&!(o||b||t.$mouseHandler.isMousePressed||m)){var i=n.selectionStart,r=n.selectionEnd,s=null,a=0;if(0==i?s=h.up:1==i?s=h.home:r>E&&"\n"==C[r]?s=h.end:i<k&&" "==C[i-1]?(s=h.left,a=d.option):i<k||i==k&&E!=k&&i==r?s=h.left:r>E&&C.slice(0,r).split("\n").length>2?s=h.down:r>E&&" "==C[r-1]?(s=h.right,a=d.option):(r>E||r==E&&E!=k&&i==r)&&(s=h.right),i!==r&&(a|=d.shift),s){if(!t.onCommandKey({},a,s)&&t.commands){s=h.keyCodeToString(s);var l=t.commands.findKeyCommand(a,s);l&&t.execCommand(l)}k=i,E=r,A("")}}};document.addEventListener("selectionchange",r),t.on("destroy",(function(){document.removeEventListener("selectionchange",r)}))}(0,t,n)},t.$setUserAgentForTests=function(e,t){g=e,p=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/useragent");function o(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function r(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var o=this.editor,r=e.getButton();return 0!==r?((o.getSelectionRange().isEmpty()||1==r)&&o.selection.moveToPosition(n),void(2==r&&(o.textInput.onContextMenu(e.domEvent),i.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||o.isFocused()||(o.focus(),!this.$focusTimeout||this.$clickSelection||o.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var o=r(this.$clickSelection,n);n=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[e](i.row,i.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(o.start),a=this.$clickSelection.comparePoint(o.end);if(-1==s&&a<=0)t=this.$clickSelection.end,o.end.row==i.row&&o.end.column==i.column||(i=o.start);else if(1==a&&s>=0)t=this.$clickSelection.start,o.start.row==i.row&&o.start.column==i.column||(i=o.end);else if(-1==s&&1==a)i=o.end,t=o.start;else{var l=r(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,n,i,o=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,i=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))),r=Date.now();(o>0||r-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=e.domEvent.timeStamp,o=i-n.t,r=o?e.wheelX/o:n.vx,s=o?e.wheelY/o:n.vy;o<550&&(r=(r+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(r/s),l=!1;if(a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l)n.allowed=i;else if(i-n.allowed<550){Math.abs(r)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0}return n.t=i,n.vx=r,n.vy=s,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(o.prototype),t.DefaultHandlers=o})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){"use strict";e("./lib/oop");var i=e("./lib/dom");function o(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(o.prototype),t.Tooltip=o})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=e("../lib/oop"),r=e("../lib/event"),s=e("../tooltip").Tooltip;function a(e){s.call(this,e)}o.inherits(a,s),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),r=this.getHeight();(e+=15)+o>n&&(e-=e+o-n),(t+=15)+r>i&&(t-=20+r),s.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,n,o,s=e.editor,l=s.renderer.$gutterLayer,c=new a(s.container);function u(){t&&(t=clearTimeout(t)),o&&(c.hide(),o=null,s._signal("hideGutterTooltip",c),s.off("mousewheel",u))}function h(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(s.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,i=s.session.selection;if(t.getShiftKey())i.selectTo(n,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(r){var a=r.domEvent.target||r.domEvent.srcElement;if(i.hasCssClass(a,"ace_fold-widget"))return u();o&&e.$tooltipFollowsMouse&&h(r),n=r,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,i=l.$annotations[t];if(!i)return u();if(t==s.session.getLength()){var r=s.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(r>s.session.documentToScreenRow(a.row,a.column))return u()}if(o!=i)if(o=i.text.join("<br/>"),c.setHtml(o),c.show(),s._signal("showGutterTooltip",c),s.on("mousewheel",u),e.$tooltipFollowsMouse)h(n);else{var d=n.domEvent.target.getBoundingClientRect(),p=c.getElement().style;p.left=d.right+"px",p.top=d.bottom+"px"}}():u()}),50))})),r.addListener(s.renderer.$gutter,"mouseout",(function(e){n=null,o&&!t&&(t=setTimeout((function(){t=null,u()}),50))}),s),s.on("changeSession",u)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/event"),o=e("../lib/useragent"),r=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=o.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(r.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=e("../lib/event"),r=e("../lib/useragent");function s(e){var t=e.editor,n=i.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",r.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var s,l,c,u,h,d,p,f,g,m,v,b=t.container,y=0;function w(){var e=d;(function(e,n){var i=Date.now(),o=!n||e.row!=n.row,r=!n||e.column!=n.column;!m||o||r?(t.moveCursorToPosition(e),m=i,v={x:l,y:c}):a(v.x,v.y,l,c)>5?m=null:i-m>=200&&(t.renderer.scrollCursorIntoView(),m=null)})(d=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var i=Date.now(),o=t.renderer.layerConfig.lineHeight,r=t.renderer.layerConfig.characterWidth,s=t.renderer.scroller.getBoundingClientRect(),a={x:{left:l-s.left,right:s.right-l},y:{top:c-s.top,bottom:s.bottom-c}},u=Math.min(a.x.left,a.x.right),h=Math.min(a.y.top,a.y.bottom),d={row:e.row,column:e.column};u/r<=2&&(d.column+=a.x.left<a.x.right?-3:2),h/o<=1&&(d.row+=a.y.top<a.y.bottom?-1:1);var p=e.row!=d.row,f=e.column!=d.column,m=!n||e.row!=n.row;p||f&&!m?g?i-g>=200&&t.renderer.scrollCursorIntoView(d):g=i:g=null}(d,e)}function x(){h=t.selection.toOrientedRange(),s=t.session.addMarker(h,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),w(),u=setInterval(w,20),y=0,o.addListener(document,"mousemove",k)}function S(){clearInterval(u),t.session.removeMarker(s),s=null,t.selection.fromOrientedRange(h),t.isFocused()&&!f&&t.$resetCursorStyle(),h=null,d=null,y=0,g=null,m=null,o.removeListener(document,"mousemove",k)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(e)}),0),e.preventDefault()}h=t.getSelectionRange();var o=e.dataTransfer;o.effectAllowed=t.getReadOnly()?"copy":"copyMove",r.isOpera&&(t.container.appendChild(n),n.scrollTop=0),o.setDragImage&&o.setDragImage(n,0,0),r.isOpera&&t.container.removeChild(n),o.clearData(),o.setData("Text",t.session.getTextRange()),f=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,f=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;p||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&E(e.dataTransfer))return l=e.clientX,c=e.clientY,s||x(),y++,e.dataTransfer.dropEffect=p=$(e),o.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&E(e.dataTransfer))return l=e.clientX,c=e.clientY,s||(x(),y++),null!==C&&(C=null),e.dataTransfer.dropEffect=p=$(e),o.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&s)return S(),p=null,o.preventDefault(e)},this.onDrop=function(e){if(d){var n=e.dataTransfer;if(f)switch(p){case"move":h=h.contains(d.row,d.column)?{start:d,end:d}:t.moveText(h,d);break;case"copy":h=t.moveText(h,d,!0)}else{var i=n.getData("Text");h={start:d,end:t.session.insert(d,i)},t.focus(),p=null}return S(),o.preventDefault(e)}},o.addListener(b,"dragstart",this.onDragStart.bind(e),t),o.addListener(b,"dragend",this.onDragEnd.bind(e),t),o.addListener(b,"dragenter",this.onDragEnter.bind(e),t),o.addListener(b,"dragover",this.onDragOver.bind(e),t),o.addListener(b,"dragleave",this.onDragLeave.bind(e),t),o.addListener(b,"drop",this.onDrop.bind(e),t);var C=null;function k(){null==C&&(C=setTimeout((function(){null!=C&&s&&S()}),20))}function E(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function $(e){var t=["copy","copymove","all","uninitialized"],n=r.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return n&&t.indexOf(i)>=0?o="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?o="move":t.indexOf(i)>=0&&(o="copy"),o}}function a(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=r.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;r.isIE&&"dragReady"==this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in o&&(o.unselectable="on"),t.getDragDelay()){if(r.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(s.prototype),t.DragdropHandler=s})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./mouse_event").MouseEvent,o=e("../lib/event"),r=e("../lib/dom");t.addTouchListeners=function(e,t){var n,s,a,l,c,u,h,d,p,f="scroll",g=0,m=0,v=0,b=0;function y(){var e=window.navigator&&window.navigator.clipboard,n=!1,i=function(i){var o,s,a=i.target.getAttribute("action");if("more"==a||!n)return n=!n,o=t.getCopyText(),s=t.session.getUndoManager().hasUndo(),void p.replaceChild(r.buildDom(n?["span",!o&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],o&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],o&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],s&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),p.firstChild);"paste"==a?e.readText().then((function(e){t.execCommand(a,e)})):a&&("cut"!=a&&"copy"!=a||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(a)),p.firstChild.style.display="none",n=!1,"openCommandPallete"!=a&&t.focus()};p=r.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){f="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),i(e)},onclick:i},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function w(){p||y();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),i=t.renderer.textToScreenCoordinates(0,0).pageX,o=t.renderer.scrollLeft,r=t.container.getBoundingClientRect();p.style.top=n.pageY-r.top-3+"px",n.pageX-r.left<r.width-70?(p.style.left="",p.style.right="10px"):(p.style.right="",p.style.left=i+o-r.left+"px"),p.style.display="",p.firstChild.style.display="none",t.on("input",x)}function x(e){p&&(p.style.display="none"),t.off("input",x)}function S(){c=null,clearTimeout(c);var e=t.selection.getRange(),n=e.contains(h.row,h.column);!e.isEmpty()&&n||(t.selection.moveToPosition(h),t.selection.selectWord()),f="wait",w()}o.addListener(e,"contextmenu",(function(e){d&&t.textInput.getElement().focus()}),t),o.addListener(e,"touchstart",(function(e){var o=e.touches;if(c||o.length>1)return clearTimeout(c),c=null,a=-1,void(f="zoom");d=t.$mouseHandler.isMousePressed=!0;var r=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,p=e.timeStamp;l=p;var y=o[0],w=y.clientX,x=y.clientY;Math.abs(n-w)+Math.abs(s-x)>r&&(a=-1),n=e.clientX=w,s=e.clientY=x,v=b=0;var C=new i(e,t);if(h=C.getDocumentPosition(),p-a<500&&1==o.length&&!g)m++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(h);var e=m>=2?t.selection.getLineRange(h.row):t.session.getBracketRange(h);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),f="wait"}();else{m=0;var k=t.selection.cursor,E=t.selection.isEmpty()?k:t.selection.anchor,$=t.renderer.$cursorLayer.getPixelPosition(k,!0),_=t.renderer.$cursorLayer.getPixelPosition(E,!0),A=t.renderer.scroller.getBoundingClientRect(),O=t.renderer.layerConfig.offset,L=t.renderer.scrollLeft,R=function(e,t){return(e/=u)*e+(t=t/r-.75)*t};if(e.clientX<A.left)return void(f="zoom");var T=R(e.clientX-A.left-$.left+L,e.clientY-A.top-$.top+O),M=R(e.clientX-A.left-_.left+L,e.clientY-A.top-_.top+O);T<3.5&&M<3.5&&(f=T>M?"cursor":"anchor"),f=M<3.5?"anchor":T<3.5?"cursor":"scroll",c=setTimeout(S,450)}a=p}),t),o.addListener(e,"touchend",(function(e){d=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==f?(f="",g=0):c?(t.selection.moveToPosition(h),g=0,w()):"scroll"==f?(g+=60,u=setInterval((function(){g--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(b)<.01&&(b=0),g<20&&(v*=.9),g<20&&(b*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*b),e==t.session.getScrollTop()&&(g=0)}),10),x()):w(),clearTimeout(c),c=null}),t),o.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var o=e.touches;if(!(o.length>1||"zoom"==f)){var r=o[0],a=n-r.clientX,u=s-r.clientY;if("wait"==f){if(!(a*a+u*u>4))return e.preventDefault();f="cursor"}n=r.clientX,s=r.clientY,e.clientX=r.clientX,e.clientY=r.clientY;var h=e.timeStamp,d=h-l;if(l=h,"scroll"==f){var p=new i(e,t);p.speed=1,p.wheelX=a,p.wheelY=u,10*Math.abs(a)<Math.abs(u)&&(a=0),10*Math.abs(u)<Math.abs(a)&&(u=0),0!=d&&(v=a/d,b=u/d),t._emit("mousewheel",p),p.propagationStopped||(v=b=0)}else{var g=new i(e,t).getDocumentPosition();"cursor"==f?t.selection.moveCursorToPosition(g):"anchor"==f&&t.selection.setSelectionAnchor(g.row,g.column),t.renderer.scrollCursorIntoView(g),e.preventDefault()}}}),t)}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=i.getDocumentHead(),o=document.createElement("script");o.src=e,n.appendChild(o),o.onload=o.onreadystatechange=function(e,n){!n&&o.readyState&&"loaded"!=o.readyState&&"complete"!=o.readyState||(o=o.onload=o.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,n){"use strict";var o={},r=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};o._emit=o._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],o=this._defaultHandlers[e];if(n.length||o){"object"==i(t)&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var a=0;a<n.length&&(n[a](t,this),!t.propagationStopped);a++);return o&&!t.defaultPrevented?o(t,this):void 0}},o._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var i=0;i<n.length;i++)n[i](t,this)}},o.once=function(e,t){var n=this;if(this.on(e,(function i(){n.off(e,i),t.apply(null,arguments)})),!t)return new Promise((function(e){t=e}))},o.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var i=n[e],o=n._disabled_[e];o||(n._disabled_[e]=o=[]),o.push(i);var r=o.indexOf(t);-1!=r&&o.splice(r,1)}n[e]=t},o.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var i=n._disabled_[e];if(n[e]==t)i&&this.setDefaultHandler(e,i.pop());else if(i){var o=i.indexOf(t);-1!=o&&i.splice(o,1)}}},o.on=o.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];return i||(i=this._eventRegistry[e]=[]),-1==i.indexOf(t)&&i[n?"unshift":"push"](t),t},o.off=o.removeListener=o.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var i=n.indexOf(t);-1!==i&&n.splice(i,1)}},o.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=o})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){var o=e("./oop"),r=e("./event_emitter").EventEmitter,s={setOptions:function(e){Object.keys(e).forEach((function(t){this.setOption(t,e[t])}),this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(t=e,e=Object.keys(t));else{var n=this.$options;e=Object.keys(n).filter((function(e){return!n[e].hidden}))}return e.forEach((function(e){t[e]=this.getOption(e)}),this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return a('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:a('misspelled option "'+e+'"')}};function a(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function l(e,t){var n=new Error(e);n.data=t,"object"==("undefined"==typeof console?"undefined":i(console))&&console.error&&console.error(n),setTimeout((function(){throw n}))}var c=function(){this.$defaultOptions={}};(function(){o.implement(this,r),this.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach((function(t){var i=n[t];"string"==typeof i&&(i={forwardTo:i}),i.name||(i.name=t),e.$options[i.name]=i,"initialValue"in i&&(e["$"+i.name]=i.initialValue)})),o.implement(e,s),this},this.resetOptions=function(e){Object.keys(e.$options).forEach((function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)}))},this.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var i=this.$defaultOptions[e]||(this.$defaultOptions[e]={});i[t]&&(i.forwardTo?this.setDefaultValue(i.forwardTo,t,n):i[t].value=n)},this.setDefaultValues=function(e,t){Object.keys(t).forEach((function(n){this.setDefaultValue(e,n,t[n])}),this)},this.warn=a,this.reportError=l}).call(c.prototype),t.AppConfig=c})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],(function(e,t,i){var o=e("./lib/lang"),r=(e("./lib/oop"),e("./lib/net")),s=e("./lib/app_config").AppConfig;i.exports=t=new s;var a=function(){return this||"undefined"!=typeof window&&window}(),l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1};t.get=function(e){if(!l.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return l[e]},t.set=function(e,t){if(l.hasOwnProperty(e))l[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e)},t.all=function(){return o.copyObject(l)},t.$modes={},t.moduleUrl=function(e,t){if(l.$moduleUrls[e])return l.$moduleUrls[e];var n=e.split("/"),i="snippets"==(t=t||n[n.length-2]||"")?"/":"-",o=n[n.length-1];if("worker"==t&&"-"==i){var r=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");o=o.replace(r,"")}(!o||o==t)&&n.length>1&&(o=n[n.length-2]);var s=l[t+"Path"];return null==s?s=l.basePath:"/"==i&&(t=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+i+o+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,i){var o,s;Array.isArray(n)&&(s=n[0],n=n[1]);try{o=e(n)}catch(e){}if(o&&!t.$loading[n])return i&&i(o);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(i),!(t.$loading[n].length>1)){var a=function(){e([n],(function(e){t._emit("load.module",{name:n,module:e});var i=t.$loading[n];t.$loading[n]=null,i.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return a();r.loadScript(t.moduleUrl(n,s),a),c()}};var c=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};function u(o){if(a&&a.document){l.packaged=o||e.packaged||i.packaged||a.define&&n(49).packaged;for(var r,s={},c="",u=document.currentScript||document._currentScript,h=(u&&u.ownerDocument||document).getElementsByTagName("script"),d=0;d<h.length;d++){var p=h[d],f=p.src||p.getAttribute("src");if(f){for(var g=p.attributes,m=0,v=g.length;m<v;m++){var b=g[m];0===b.name.indexOf("data-ace-")&&(s[(r=b.name.replace(/^data-ace-/,""),r.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=b.value)}var y=f.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);y&&(c=y[1])}}for(var w in c&&(s.base=s.base||c,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base,s)void 0!==s[w]&&t.set(w,s[w])}}u(!0),t.init=u,t.version="1.4.12"})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],(function(e,t,n){"use strict";var i=e("../lib/event"),o=e("../lib/useragent"),r=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("./touch_handler").addTouchListeners,u=e("../config"),h=function(e){var t=this;this.editor=e,new r(this),new s(this),new l(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus()},a=e.renderer.getMouseEventTarget();i.addListener(a,"click",this.onMouseEvent.bind(this,"click"),e),i.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),i.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),i.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),c(e.container,e);var u=e.renderer.$gutter;i.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),i.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick"),e),i.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),i.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),i.addListener(a,"mousedown",n,e),i.addListener(u,"mousedown",n,e),o.isIE&&e.renderer.scrollBarV&&(i.addListener(e.renderer.scrollBarV.element,"mousedown",n,e),i.addListener(e.renderer.scrollBarH.element,"mousedown",n,e)),e.on("mousemove",(function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var i=e.renderer.screenToTextCoordinates(n.x,n.y),o=e.session.selection.getRange(),r=e.renderer;!o.isEmpty()&&o.insideStart(i.row,i.column)?r.setCursorStyle("default"):r.setCursorStyle("")}}),e)};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var n=new a(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor,r=this.editor.renderer;r.$isMousePressed=!0;var s=this,l=function(e){if(e){if(o.isWebKit&&!e.which&&s.releaseMouse)return s.releaseMouse();s.x=e.clientX,s.y=e.clientY,t&&t(e),s.mouseEvent=new a(e,s.editor),s.$mouseMoved=!0}},c=function(e){n.off("beforeEndOperation",h),clearInterval(d),u(),s[s.state+"End"]&&s[s.state+"End"](e),s.state="",s.isMousePressed=r.$isMousePressed=!1,r.$keepTextAreaAtCursor&&r.$moveTextAreaToCursor(),s.$onCaptureMouseMove=s.releaseMouse=null,e&&s.onMouseEvent("mouseup",e),n.endOperation()},u=function(){s[s.state]&&s[s.state](),s.$mouseMoved=!1};if(o.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout((function(){c(e)}));var h=function(e){s.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(s[s.state+"End"]&&s[s.state+"End"](),s.state="",s.releaseMouse())};n.on("beforeEndOperation",h),n.startOperation({command:{name:"mouse"}}),s.$onCaptureMouseMove=l,s.releaseMouse=i.capture(this.editor.container,l,c);var d=setInterval(u,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&i.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)},this.destroy=function(){this.releaseMouse&&this.releaseMouse()}}).call(h.prototype),u.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:o.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=h})),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom");t.FoldHandler=function(e){e.on("click",(function(t){var n=t.getDocumentPosition(),o=e.session,r=o.getFoldAt(n.row,n.column,1);r&&(t.getAccelKey()?o.removeFold(r):o.expandFold(r),t.stop());var s=t.domEvent&&t.domEvent.target;s&&i.hasCssClass(s,"ace_inline_button")&&i.hasCssClass(s,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),e.renderer.scrollCursorIntoView())})),e.on("gutterclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,i=e.session;i.foldWidgets&&i.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}})),e.on("gutterdblclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,i=e.session,o=i.getParentFoldRangeData(n,!0),r=o.range||o.firstRange;if(r){n=r.start.row;var s=i.getFoldAt(n,i.getLine(n).length,1);s?i.removeFold(s):(i.addFold("...",r),e.renderer.scrollCursorIntoView({row:r.start.row,column:0}))}t.stop()}}))}})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(e,t,n){"use strict";var i=e("../lib/keys"),o=e("../lib/event"),r=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map((function(n){return n.getStatusText&&n.getStatusText(t,e)||""})).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,i){for(var r,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((r=this.$handlers[l].handleKeyboard(this.$data,e,t,n,i))&&r.command&&((s="null"==r.command||a.exec(r.command,this.$editor,r.args,i))&&i&&-1!=e&&1!=r.passEvent&&1!=r.command.passEvent&&o.stopEvent(i),s)););return s||-1!=e||(r={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",r),s},this.onCommandKey=function(e,t,n){var o=i.keyCodeToString(n);return this.$callKeyboardHandlers(t,o,n,e)},this.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)}}).call(r.prototype),t.KeyBinding=r})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(e,t,n){"use strict";var i=0,o=0,r=!1,s=!1,a=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=[18,18,18,18,18,18,18,18,18,6,5,6,8,5,18,18,18,18,18,18,18,18,18,18,18,18,18,18,5,5,5,6,8,4,4,11,11,11,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,18,18,18,18,18,18,5,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,9,4,11,11,11,11,4,4,4,4,0,4,4,18,4,4,11,11,2,2,4,0,4,4,4,2,0,4,4,4,4,4],h=[8,8,8,8,8,8,8,8,8,8,8,18,18,18,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,11,11,11,11,11,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8];function d(e,t,n){if(!(o<e))if(1!=e||1!=i||s)for(var r,a,l,c,u=n.length,h=0;h<u;){if(t[h]>=e){for(r=h+1;r<u&&t[r]>=e;)r++;for(a=h,l=r-1;a<l;a++,l--)c=n[a],n[a]=n[l],n[l]=c;h=r}h++}else n.reverse()}function p(e,t,n,o){var l,c,u,h,d=t[o];switch(d){case 0:case 1:r=!1;case 4:case 3:return d;case 2:return r?3:2;case 7:return r=!0,!0,1;case 8:return 4;case 9:return o<1||o+1>=t.length||2!=(l=n[o-1])&&3!=l||2!=(c=t[o+1])&&3!=c?4:(r&&(c=3),c==l?c:4);case 10:return 2==(l=o>0?n[o-1]:5)&&o+1<t.length&&2==t[o+1]?2:4;case 11:if(o>0&&2==n[o-1])return 2;if(r)return 4;for(h=o+1,u=t.length;h<u&&11==t[h];)h++;return h<u&&2==t[h]?2:4;case 12:for(u=t.length,h=o+1;h<u&&12==t[h];)h++;if(h<u){var p=e[o],f=p>=1425&&p<=2303||64286==p;if(l=t[h],f&&(1==l||7==l))return 1}return o<1||5==(l=t[o-1])?4:n[o-1];case 5:return r=!1,s=!0,i;case 6:return a=!0,4;case 13:case 14:case 16:case 17:case 15:r=!1;case 18:return 4}}function f(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:u[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?11:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?h[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,n,u){if(e.length<2)return{};var h=e.split(""),g=new Array(h.length),m=new Array(h.length),v=[];i=u?1:0,function(e,t,n,u){var h=i?c:l,d=null,g=null,m=null,v=0,b=null,y=-1,w=null,x=null,S=[];if(!u)for(w=0,u=[];w<n;w++)u[w]=f(e[w]);for(o=i,r=!1,!1,s=!1,a=!1,x=0;x<n;x++){if(d=v,S[x]=g=p(e,u,S,x),b=240&(v=h[d][g]),v&=15,t[x]=m=h[v][5],b>0)if(16==b){for(w=y;w<x;w++)t[w]=1;y=-1}else y=-1;if(h[v][6])-1==y&&(y=x);else if(y>-1){for(w=y;w<x;w++)t[w]=m;y=-1}5==u[x]&&(t[x]=0),o|=m}if(a)for(w=0;w<n;w++)if(6==u[w]){t[w]=i;for(var C=w-1;C>=0&&8==u[C];C--)t[C]=i}}(h,v,h.length,n);for(var b=0;b<g.length;g[b]=b,b++);d(2,v,g),d(1,v,g);for(b=0;b<g.length-1;b++)3===n[b]?v[b]=t.AN:1===v[b]&&(n[b]>7&&n[b]<13||4===n[b]||18===n[b])?v[b]=t.ON_R:b>0&&"ل"===h[b-1]&&/\u0622|\u0623|\u0625|\u0627/.test(h[b])&&(v[b-1]=v[b]=t.R_H,b++);h[h.length-1]===t.DOT&&(v[h.length-1]=t.B),"‫"===h[0]&&(v[0]=t.RLE);for(b=0;b<g.length;b++)m[b]=v[g[b]];return{logicalFromVisual:g,bidiLevels:m}},t.hasBidiCharacters=function(e,t){for(var n=!1,i=0;i<e.length;i++)t[i]=f(e.charAt(i)),n||1!=t[i]&&7!=t[i]&&3!=t[i]||(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}})),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],(function(e,t,n){"use strict";var i=e("./lib/bidiutil"),o=e("./lib/lang"),r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=i,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=r.test(e.getValue())};(function(){this.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&r.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var r=this.session.$wrapData[e];r&&(void 0===t&&(t=this.getSplitIndex()),t>0&&r.length?(this.wrapIndent=r.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=t<r.length?this.line.substring(r[t-1],r[t]):this.line.substring(r[r.length-1])):this.line=this.line.substring(0,r[t])),t==r.length&&(this.line+=this.showInvisibles?n:i.DOT)}else this.line+=this.showInvisibles?n:i.DOT;var s,a=this.session,l=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,(function(e,t){return"\t"===e||a.isFullWidth(e.charCodeAt(0))?(s="\t"===e?a.getScreenTabSize(t+l):2,l+=s-1,o.stringRepeat(i.DOT,s)):e})),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==i.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},this.updateBidiMap=function(){var e=[];i.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=i.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(e){if(this.characterWidth!==e.$characterSize.width){this.fontMetrics=e;var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth("ה");this.charWidths[i.L]=this.charWidths[i.EN]=this.charWidths[i.ON_R]=t,this.charWidths[i.R]=this.charWidths[i.AN]=n,this.charWidths[i.R_H]=.45*n,this.charWidths[i.B]=this.charWidths[i.RLE]=0,this.currentRow=null}},this.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},this.setEolChar=function(e){this.EOL=e},this.setContentWidth=function(e){this.contentWidth=e},this.isRtlLine=function(e){return!!this.$isRtl||(null!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},this.setRtlDirection=function(e,t){for(var n=e.getCursorPosition(),i=e.selection.getSelectionAnchor().row;i<=n.row;i++)t||e.session.getLine(i).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(i).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:i},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(i,0,1)},this.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,n=e>t?this.session.getOverwrite()?e:e-1:t,o=i.getVisualFromLogicalIdx(n,this.bidiMap),r=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&r[o]%2!=0&&o++;for(var a=0;a<o;a++)s+=this.charWidths[r[a]];return!this.session.getOverwrite()&&e>t&&r[o]%2==0&&(s+=this.charWidths[r[o]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},this.getSelections=function(e,t){var n,i=this.bidiMap,o=i.bidiLevels,r=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,u=!1,h=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,p=0;p<o.length;p++)d=i.logicalFromVisual[p],n=o[p],(c=d>=a&&d<l)&&!u?h=s:!c&&u&&r.push({left:h,width:s-h}),s+=this.charWidths[n],u=c;if(c&&p===o.length&&r.push({left:h,width:s-h}),this.isRtlDir)for(var f=0;f<r.length;f++)r[f].left+=this.rtlLineOffset;return r},this.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,n=(e=Math.max(e,0),0),i=0,o=this.bidiMap.bidiLevels,r=this.charWidths[o[i]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e>n+r/2;){if(n+=r,i===o.length-1){r=0;break}r=this.charWidths[o[++i]]}return i>0&&o[i-1]%2!=0&&o[i]%2==0?(e<n&&i--,t=this.bidiMap.logicalFromVisual[i]):i>0&&o[i-1]%2==0&&o[i]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===o.length-1&&0===r&&o[i-1]%2==0||!this.isRtlDir&&0===i&&o[i]%2!=0?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&o[i-1]%2!=0&&0!==r&&i--,t=this.bidiMap.logicalFromVisual[i]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(s.prototype),t.BidiHandler=s})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/lang"),r=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))};(function(){i.implement(this,r),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(n.row,n.column,i.row,i.column)},this.$setSelection=function(e,t,n,i){if(!this.$silent){var o=this.$isEmpty,r=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||r)&&this._emit("changeSelection")}},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(i);return o?(i=o.start.row,n=o.end.row):n=i,!0===t?new s(i,0,n,this.session.getLine(n).length):new s(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,o=e.column+t;return n<0&&(i=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,o).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();t=this.lead;this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),i=this.session.screenToDocumentPosition(n,0),o=this.session.getDisplayLine(e,null,i.row,i.column).match(/^\s*/);o[0].length==t||this.session.$useEmacsStyleLineStart||(i.column+=o[0].length),this.moveCursorToPosition(i)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var i=n.search(/\s+$/);i>0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,t,1);if(o)this.moveCursorTo(o.end.row,o.end.column);else{if(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(i)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))this.moveCursorTo(e.start.row,e.start.column);else{var i=this.session.getFoldStringAt(t,n,-1);null==i&&(i=this.doc.getLine(t).substring(0,n));var r=o.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(r)&&(n-=this.session.nonTokenRe.lastIndex,r=r.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(r)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(o.lastIndex=0;(t=e[n])&&!o.test(t);)if(o.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return o.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==n.length){var r=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e<r&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),t=0}var s=this.$shortWordEndIndex(i);this.moveCursorTo(e,t+s)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var i=this.session.getLine(t).substring(0,n);if(0===n){do{t--,i=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var r=o.stringReverse(i),s=this.$shortWordEndIndex(r);return this.moveCursorTo(t,n-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];e<0?e-=o.rowsAbove||0:e>0&&(e+=o.rowCount-(o.rowsAbove||0))}var r=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&r.row===this.lead.row&&(r.column,this.lead.column),this.moveCursorTo(r.row,r.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(o.charAt(t))&&o.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch(e){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){"use strict";var i=e("./config"),o=2e3,r=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],o=0,r=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(r.defaultToken=c.defaultToken),c.caseInsensitive&&(s="gi"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var u=c.regex,h=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==h?c.token=c.token[0]:h-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:h-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=h>1?this.$applyToken:c.token),h>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+o+1)})):(h=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),r[o]=l,o+=h,i.push(u),c.onMatch||(c.onMatch=null)}}i.length||(r[0]=0,i.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)}),this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){o=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var i=[],o=0,r=n.length;o<r;o++)t[o]&&(i[i.length]={type:n[o],value:t[o]});return i},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],i=this.tokenArray,o=0,r=i.length;o<r;o++)t[o+1]&&(n[n.length]={type:i[o],value:t[o+1]});return n},this.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!]|(\()/g,(function(e,t){return t?"(?:":e}))},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,i=!1,o={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(e,t,r,s,a,l){return i?i="]"!=a:a?i=!0:s?(n==o.stack&&(o.end=l+1,o.stack=-1),n--):r&&(n++,1!=r.length&&(o.stack=n,o.start=l)),e})),null!=o.end&&/^\)*$/.test(e.substr(o.end))&&(e=e.substring(0,o.start)+e.substr(o.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var n=t.slice(0);"#tmp"===(t=n[0])&&(n.shift(),t=n.shift())}else n=[];var i=t||"start",r=this.states[i];r||(i="start",r=this.states[i]);var s=this.matchMappings[i],a=this.regExps[i];a.lastIndex=0;for(var l,c=[],u=0,h=0,d={type:null,value:""};l=a.exec(e);){var p=s.defaultToken,f=null,g=l[0],m=a.lastIndex;if(m-g.length>u){var v=e.substring(u,m-g.length);d.type==p?d.value+=v:(d.type&&c.push(d),d={type:p,value:v})}for(var b=0;b<l.length-2;b++)if(void 0!==l[b+1]){p=(f=r[s[b]]).onMatch?f.onMatch(g,i,n,e):f.token,f.next&&(i="string"==typeof f.next?f.next:f.next(i,n),(r=this.states[i])||(this.reportError("state doesn't exist",i),i="start",r=this.states[i]),s=this.matchMappings[i],u=m,(a=this.regExps[i]).lastIndex=m),f.consumeLineEnd&&(u=m);break}if(g)if("string"==typeof p)f&&!1===f.merge||d.type!==p?(d.type&&c.push(d),d={type:p,value:g}):d.value+=g;else if(p){d.type&&c.push(d),d={type:null,value:""};for(b=0;b<p.length;b++)c.push(p[b])}if(u==e.length)break;if(u=m,h++>o){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u<e.length;)d.type&&c.push(d),d={value:e.substring(u,u+=500),type:"overflow"};i="start",n=[];break}}return d.type&&c.push(d),n.length>1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},this.reportError=i.reportError}).call(r.prototype),t.Tokenizer=r})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var i=e("../lib/lang"),o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],o=0;o<i.length;o++){var r=i[o];(r.next||r.onMatch)&&("string"==typeof r.next&&0!==r.next.indexOf(t)&&(r.next=t+r.next),r.nextState&&0!==r.nextState.indexOf(t)&&(r.nextState=t+r.nextState))}this.$rules[t+n]=i}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,o,r){var s="function"==typeof e?(new e).getRules():e;if(o)for(var a=0;a<o.length;a++)o[a]=t+o[a];else for(var l in o=[],s)o.push(t+l);if(this.addRules(s,t),n){var c=Array.prototype[r?"push":"unshift"];for(a=0;a<o.length;a++)c.apply(this.$rules[o[a]],i.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var n=0,i=this.$rules;Object.keys(i).forEach((function o(r){var s=i[r];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var u=l.next||l.push;if(u&&Array.isArray(u)){var h=l.stateName;h||("string"!=typeof(h=l.token)&&(h=h[0]||""),i[h]&&(h+=n++)),i[h]=u,l.next=h,o(h)}else"pop"==u&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var d in l.rules)i[d]?i[d].push&&i[d].push.apply(i[d],l.rules[d]):i[d]=l.rules[d];var p="string"==typeof l?l:l.include;if(p&&(c=Array.isArray(p)?p.map((function(e){return i[e]})):i[p]),c){var f=[a,1].concat(c);l.noEscape&&(f=f.filter((function(e){return!e.next}))),s.splice.apply(s,f),a--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}),this)},this.createKeywordMapper=function(e,t,n,i){var o=Object.create(null);return this.$keywordList=[],Object.keys(e).forEach((function(t){for(var r=e[t].split(i||"|"),s=r.length;s--;){var a=r[s];this.$keywordList.push(a),n&&(a=a.toLowerCase()),o[a]=t}}),this),e=null,n?function(e){return o[e.toLowerCase()]||t}:function(e){return o[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(o.prototype),t.TextHighlightRules=o})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(e,t,n){"use strict";var i=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var n=(new e).getBehaviours(t);else n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call(i.prototype),t.Behaviour=i})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("./range").Range,o=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var i=e.getTokenAt(t,n);this.$tokenIndex=i?i.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)}}).call(o.prototype),t.TokenIterator=o})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var i,o=e("../../lib/oop"),r=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},h={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return i=u[t];i=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(e,t,n,i){var o=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,o,e.end.column+(o?0:1)]}},f=function e(t){this.add("braces","insertion",(function(n,o,r,s,l){var c=r.getCursorPosition(),u=s.doc.getLine(c.row);if("{"==l){d(r);var h=r.getSelectionRange(),f=s.doc.getTextRange(h);if(""!==f&&"{"!==f&&r.getWrapBehavioursEnabled())return p(h,f,"{","}");if(e.isSaneInsertion(r,s))return/[\]\}\)]/.test(u[c.column])||r.inMultiSelectMode||t&&t.braces?(e.recordAutoInsert(r,s,"}"),{text:"{}",selection:[1,1]}):(e.recordMaybeInsert(r,s,"{"),{text:"{",selection:[1,1]})}else if("}"==l){if(d(r),"}"==u.substring(c.column,c.column+1))if(null!==s.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&e.isAutoInsertedClosing(c,u,l))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==l||"\r\n"==l){d(r);var g="";if(e.isMaybeInsertedClosing(c,u)&&(g=a.stringRepeat("}",i.maybeInsertedBrackets),e.clearMaybeInsertedClosing()),"}"===u.substring(c.column,c.column+1)){var m=s.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!m)return null;var v=this.$getIndent(s.getLine(m.row))}else{if(!g)return void e.clearMaybeInsertedClosing();v=this.$getIndent(u)}var b=v+s.getTabString();return{text:"\n"+b+"\n"+v+g,selection:[1,b.length,1,b.length]}}e.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,o,r){var s=o.doc.getTextRange(r);if(!r.isMultiLine()&&"{"==s){if(d(n),"}"==o.doc.getLine(r.start.row).substring(r.end.column,r.end.column+1))return r.end.column++,r;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,n,i,o,r){if("("==r){d(i);var s=i.getSelectionRange(),a=o.doc.getTextRange(s);if(""!==a&&i.getWrapBehavioursEnabled())return p(s,a,"(",")");if(e.isSaneInsertion(i,o))return e.recordAutoInsert(i,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){d(i);var l=i.getCursorPosition(),c=o.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1))if(null!==o.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,r))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&"("==r&&(d(n),")"==i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("brackets","insertion",(function(t,n,i,o,r){if("["==r){d(i);var s=i.getSelectionRange(),a=o.doc.getTextRange(s);if(""!==a&&i.getWrapBehavioursEnabled())return p(s,a,"[","]");if(e.isSaneInsertion(i,o))return e.recordAutoInsert(i,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){d(i);var l=i.getCursorPosition(),c=o.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1))if(null!==o.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,r))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&"["==r&&(d(n),"]"==i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("string_dquotes","insertion",(function(e,t,n,i,o){var r=i.$mode.$quotes||h;if(1==o.length&&r[o]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(o))return;d(n);var s=o,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&r[l])&&n.getWrapBehavioursEnabled())return p(a,l,s,s);if(!l){var c=n.getCursorPosition(),u=i.doc.getLine(c.row),f=u.substring(c.column-1,c.column),g=u.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==f&&m&&/escape/.test(m.type))return null;var b,y=m&&/string|escape/.test(m.type),w=!v||/string|escape/.test(v.type);if(g==s)(b=y!==w)&&/string\.end/.test(v.type)&&(b=!1);else{if(y&&!w)return null;if(y&&w)return null;var x=i.$mode.tokenRe;x.lastIndex=0;var S=x.test(f);x.lastIndex=0;var C=x.test(f);if(S||C)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;var k=u[c.column-2];if(f==s&&(k==s||x.test(k)))return null;b=!0}return{text:b?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,i,o){var r=i.$mode.$quotes||h,s=i.doc.getTextRange(o);if(!o.isMultiLine()&&r.hasOwnProperty(s)&&(d(n),i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==s))return o.end.column++,o}))};f.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new s(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",l)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var o=new s(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",c)},f.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},f.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,r,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=o.row,i.autoInsertedLineEnd=n+r.substr(o.column),i.autoInsertedBrackets++},f.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,r)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=o.row,i.maybeInsertedLineStart=r.substr(0,o.column)+n,i.maybeInsertedLineEnd=r.substr(o.column),i.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.column)==i.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},o.inherits(f,r),t.CstyleBehaviour=f})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],o=0,r=[],s=0;s<i.length;s+=2)r.push(o+=i[s]),i[s+1]&&r.push(45,o+=i[s+1]);t.wordChars=String.fromCharCode.apply(null,r)})),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var o=e("../config"),r=e("../tokenizer").Tokenizer,s=e("./text_highlight_rules").TextHighlightRules,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("../unicode"),c=e("../lib/lang"),u=e("../token_iterator").TokenIterator,h=e("../range").Range,d=function(){this.HighlightRules=s};(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new r(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,i){var o=t.doc,r=!0,s=!0,a=1/0,l=t.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))g=this.lineCommentStart.map(c.escapeRegExp).join("|"),p=this.lineCommentStart[0];else g=c.escapeRegExp(this.lineCommentStart),p=this.lineCommentStart;g=new RegExp("^(\\s*)(?:"+g+") ?"),u=t.getUseSoftTabs();b=function(e,t){var n=e.match(g);if(n){var i=n[1].length,r=n[0].length;d(e,i,r)||" "!=n[0][r-1]||r--,o.removeInLine(t,i,r)}};var h=p+" ",d=(v=function(e,t){r&&!/\S/.test(e)||(d(e,a,a)?o.insertInLine({row:t,column:a},h):o.insertInLine({row:t,column:a},p))},y=function(e,t){return g.test(e)},function(e,t,n){for(var i=0;t--&&" "==e.charAt(t);)i++;if(i%l!=0)return!1;for(i=0;" "==e.charAt(n++);)i++;return l>2?i%l!=l-1:i%l==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,f=this.blockComment.end,g=new RegExp("^(\\s*)(?:"+c.escapeRegExp(p)+")"),m=new RegExp("(?:"+c.escapeRegExp(f)+")\\s*$"),v=function(e,t){y(e,t)||r&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},f),o.insertInLine({row:t,column:a},p))},b=function(e,t){var n;(n=e.match(m))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(g))&&o.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(g.test(e))return!0;for(var i=t.getTokens(n),o=0;o<i.length;o++)if("comment"===i[o].type)return!0}}function w(e){for(var t=n;t<=i;t++)e(o.getLine(t),t)}var x=1/0;w((function(e,t){var n=e.search(/\S/);-1!==n?(n<a&&(a=n),s&&!y(e,t)&&(s=!1)):x>e.length&&(x=e.length)})),a==1/0&&(a=x,r=!1,s=!1),u&&a%l!=0&&(a=Math.floor(a/l)*l),w(s?b:v)},this.toggleBlockComment=function(e,t,n,i){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var r,s,a=(g=new u(t,i.row,i.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var c,d;a&&/comment/.test(a.type);){if(-1!=(m=a.value.indexOf(o.start))){var p=g.getCurrentTokenRow(),f=g.getCurrentTokenColumn()+m;c=new h(p,f,p,f+o.start.length);break}a=g.stepBackward()}var g;for(a=(g=new u(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){var m;if(-1!=(m=a.value.indexOf(o.end))){p=g.getCurrentTokenRow(),f=g.getCurrentTokenColumn()+m;d=new h(p,f,p,f+o.end.length);break}a=g.stepForward()}d&&t.remove(d),c&&(t.remove(c),r=c.start.row,s=-o.start.length)}else s=o.start.length,r=n.start.row,t.insert(n.end,o.end),t.insert(n.start,o.start);l.start.row==r&&(l.start.column+=s),l.end.row==r&&(l.end.column+=s),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],i=n.prototype.$id,r=o.$modes[i];r||(o.$modes[i]=r=new n),o.$modes[t]||(o.$modes[t]=r),this.$embeds.push(t),this.$modes[t]=r}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t<s.length;t++)!function(e){var n=s[t],i=e[n];e[s[t]]=function(){return this.$delegator(n,arguments,i)}}(this)},this.$delegator=function(e,t,n){var i=t[0]||"start";if("string"!=typeof i){if(Array.isArray(i[2])){var o=i[2][i[2].length-1];if(s=this.$modes[o])return s[e].apply(s,[i[1]].concat([].slice.call(t,1)))}i=i[0]||"start"}for(var r=0;r<this.$embeds.length;r++)if(this.$modes[this.$embeds[r]]){var s,a=i.split(this.$embeds[r]);if(!a[0]&&a[1])return t[0]=a[1],(s=this.$modes[this.$embeds[r]])[e].apply(s,t)}var l=n.apply(this,t);return n?l:void 0},this.transformAction=function(e,t,n,i,o){if(this.$behaviour){var r=this.$behaviour.getBehaviours();for(var s in r)if(r[s][t]){var a=r[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var o in t)for(var r=t[o],s=0,a=r.length;s<a;s++)if("string"==typeof r[s].token)/keyword|support|storage/.test(r[s].token)&&n.push(r[s].regex);else if("object"===i(r[s].token))for(var l=0,c=r[s].token.length;l<c;l++)if(/keyword|support|storage/.test(r[s].token[l])){o=r[s].regex.match(/\(.+?\)/g)[l];n.push(o.substr(1,o.length-2))}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,i){return(this.$keywordList||this.$createKeywordList()).map((function(e){return{name:e,value:e,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}).call(d.prototype),t.Mode=d})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var i=t.start.row,o=t.start.column,r=e[i]||"";switch(t.action){case"insert":if(1===t.lines.length)e[i]=r.substring(0,o)+t.lines[0]+r.substring(o);else{var s=[i,1].concat(t.lines);e.splice.apply(e,s),e[i]=r.substring(0,o)+e[i],e[i+t.lines.length-1]+=r.substring(o)}break;case"remove":var a=t.end.column,l=t.end.row;i===l?e[i]=r.substring(0,o)+r.substring(a):e.splice(i,l-i+1,r.substring(0,o)+e[l].substring(a))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===n?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var i=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&i}i.implement(this,o),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(t){if(!(t.start.row==t.end.row&&t.start.row!=this.row||t.start.row>this.row)){var n=function(t,n,i){var o="insert"==t.action,r=(o?1:-1)*(t.end.row-t.start.row),s=(o?1:-1)*(t.end.column-t.start.column),a=t.start,l=o?a:t.end;if(e(n,a,i))return{row:n.row,column:n.column};if(e(l,n,!i))return{row:n.row+r,column:n.column+(n.row==l.row?s:0)};return{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var o={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:o,value:i})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(r.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./apply_delta").applyDelta,r=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){i.implement(this,r),this.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var i=this.getLine(e);return null==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),i={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:i,action:"insert",lines:t}),this.clonePos(i)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){var i=this.clippedPos(e,t),o=this.clippedPos(e,n);return this.applyDelta({start:i,end:o,action:"remove",lines:this.getLinesForRange({start:i,end:o})},!0),this.clonePos(i)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,i=t<this.getLength()-1,o=n?e-1:e,r=n?this.getLine(o).length:0,a=i?t+1:t,l=i?0:this.getLine(a).length,c=new s(o,r,a,l),u=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),u},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(o(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,i=n.length-t+1,o=e.start.row,r=e.start.column,s=0,a=0;s<i;s=a){a+=t-1;var l=n.slice(s,a);l.push(""),this.applyDelta({start:this.pos(o+s,r),end:this.pos(o+a,r=0),action:e.action,lines:l},!0)}e.lines=n.slice(s),e.start.row=o+s,e.start.column=r,this.applyDelta(e,!0)},this.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,o=t||0,r=n.length;o<r;o++)if((e-=n[o].length+i)<0)return{row:o,column:e+n[o].length+i};return{row:r-1,column:e+n[r-1].length+i}},this.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,o=0,r=Math.min(e.row,n.length),s=t||0;s<r;++s)o+=n[s].length+i;return o+e.column}}).call(l.prototype),t.Document=l})),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,i=-1,o=n.doc,r=t;n.lines[t];)t++;var s=o.getLength(),a=0;for(n.running=!1;t<s;){n.$tokenizeRow(t),i=t;do{t++}while(n.lines[t]);if(++a%5==0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),r<=i&&n.fireUpdateEvent(r,i)}}};(function(){i.implement(this,o),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens}}).call(r.prototype),t.BackgroundTokenizer=r})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),o=(e("./lib/oop"),e("./range").Range),r=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,r){if(this.regExp)for(var s=r.firstRow,a=r.lastRow,l=s;l<=a;l++){var c=this.cache[l];null==c&&((c=i.getMatchOffsets(n.getLine(l),this.regExp)).length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map((function(e){return new o(l,e.offset,l,e.offset+e.length)})),this.cache[l]=c.length?c:"");for(var u=c.length;u--;)t.drawSingleLineMarker(e,c[u].toScreenRange(n),this.clazz,r)}}}).call(r.prototype),t.SearchHighlight=r})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../range").Range;function o(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,o,r=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l<s.length;l++){if(-1==(o=(i=s[l]).range.compareStart(t,n)))return void e(null,t,n,r,a);if(!e(null,i.start.row,i.start.column,r,a)&&e(i.placeholder,i.start.row,i.start.column,r)||0===o)return;a=!i.sameRow,r=i.end.column}e(null,t,n,r,a)},this.getNextFoldTo=function(e,t){for(var n,i,o=0;o<this.folds.length;o++){if(-1==(i=(n=this.folds[o]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===i)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var i,o,r=this.getNextFoldTo(e,t);if(r)if(i=r.fold,"inside"==r.kind&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){var s=(o=this.folds).indexOf(i);for(0===s&&(this.start.column+=n);s<o.length;s++){if((i=o[s]).start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}},this.split=function(e,t){var n=this.getNextFoldTo(e,t);if(!n||"inside"==n.kind)return null;var i=n.fold,r=this.folds,s=this.foldData,a=r.indexOf(i),l=r[a-1];this.end.row=l.end.row,this.end.column=l.end.column;var c=new o(s,r=r.splice(a,r.length-a));return s.splice(s.indexOf(this)+1,0,c),c},this.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var i=this.foldData;i.splice(i.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach((function(t){e.push(" "+t.toString())})),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var i=this.folds[n];if((e-=i.start.column-t)<0)return{row:i.start.row,column:i.start.column+e};if((e-=i.placeholder.length)<0)return i.start;t=i.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(o.prototype),t.FoldLine=o})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("./range").Range.comparePoints,o=function(){this.ranges=[],this.$bias=1};(function(){this.comparePoints=i,this.pointIndex=function(e,t,n){for(var o=this.ranges,r=n||0;r<o.length;r++){var s=o[r],a=i(e,s.end);if(!(a>0)){var l=i(e,s.start);return 0===a?t&&0!==l?-r-2:r:l>0||0===l&&!t?r:-r-1}}return-r-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,o=(n=n.sort((function(e,t){return i(e.start,t.start)})))[0],r=1;r<n.length;r++){e=o,o=n[r];var s=i(e.end,o.start);s<0||(0!=s||e.isEmpty()||o.isEmpty())&&(i(e.end,o.end)<0&&(e.end.row=o.end.row,e.end.column=o.end.column),n.splice(r,1),t.push(o),o=e,r--)}return this.ranges=n,t},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var i=this.pointIndex({row:e,column:0});i<0&&(i=-i-1);var o=this.pointIndex({row:t,column:0},i);o<0&&(o=-o-1);for(var r=[],s=i;s<o;s++)r.push(n[s]);return r},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){for(var t=e.start,n=e.end,i=t.row,o=n.row,r=this.ranges,s=0,a=r.length;s<a;s++){if((u=r[s]).end.row>=i)break}if("insert"==e.action)for(var l=o-i,c=-t.column+n.column;s<a;s++){if((u=r[s]).start.row>i)break;if(u.start.row==i&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=c,u.start.row+=l)),u.end.row==i&&u.end.column>=t.column){if(u.end.column==t.column&&this.$bias<0)continue;u.end.column==t.column&&c>0&&s<a-1&&u.end.column>u.start.column&&u.end.column==r[s+1].start.column&&(u.end.column-=c),u.end.column+=c,u.end.row+=l}}else for(l=i-o,c=t.column-n.column;s<a;s++){if((u=r[s]).start.row>o)break;u.end.row<o&&(i<u.end.row||i==u.end.row&&t.column<u.end.column)?(u.end.row=i,u.end.column=t.column):u.end.row==o?u.end.column<=n.column?(l||u.end.column>t.column)&&(u.end.column=t.column,u.end.row=t.row):(u.end.column+=c,u.end.row+=l):u.end.row>o&&(u.end.row+=l),u.start.row<o&&(i<u.start.row||i==u.start.row&&t.column<u.start.column)?(u.start.row=i,u.start.column=t.column):u.start.row==o?u.start.column<=n.column?(l||u.start.column>t.column)&&(u.start.column=t.column,u.start.row=t.row):(u.start.column+=c,u.start.row+=l):u.start.row>o&&(u.start.row+=l)}if(0!=l&&s<a)for(;s<a;s++){var u;(u=r[s]).start.row+=l,u.end.row+=l}}}).call(o.prototype),t.RangeList=o})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("../range_list").RangeList,o=e("../lib/oop"),r=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};function s(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function a(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}o.inherits(r,i),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach((function(t){t.setFoldLine(e)}))},this.clone=function(){var e=this.range.clone(),t=new r(e,this.placeholder);return this.subFolds.forEach((function(e){t.subFolds.push(e.clone())})),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){var t,n;t=e,n=this.start,s(t.start,n),s(t.end,n);for(var i=e.start.row,o=e.start.column,r=0,a=-1;r<this.subFolds.length&&1==(a=this.subFolds[r].range.compare(i,o));r++);var l=this.subFolds[r],c=0;if(0==a){if(l.range.containsRange(e))return l.addSubFold(e);c=1}i=e.range.end.row,o=e.range.end.column;var u=r;for(a=-1;u<this.subFolds.length&&1==(a=this.subFolds[u].range.compare(i,o));u++);0==a&&u++;for(var h=this.subFolds.splice(r,u-r,e),d=0==a?h.length-1:h.length,p=c;p<d;p++)e.addSubFold(h[p]);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return function(e,t){a(e.start,t),a(e.end,t)}(e,this.start)}}.call(r.prototype)})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],(function(e,t,n){"use strict";var i=e("../range").Range,o=e("./fold_line").FoldLine,r=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,n){var i=this.getFoldLine(e);if(!i)return null;for(var o=i.folds,r=0;r<o.length;r++){var s=o[r].range;if(s.contains(e,t)){if(1==n&&s.isEnd(e,t)&&!s.isEmpty())continue;if(-1==n&&s.isStart(e,t)&&!s.isEmpty())continue;return o[r]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,i=this.$foldData,o=[];t.column+=1,n.column-=1;for(var r=0;r<i.length;r++){var s=i[r].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=i[r].folds,l=0;l<a.length;l++){var c=a[l];if(-2==(s=c.range.compareRange(e)))break;if(2!=s){if(42==s)break;o.push(c)}}}}return t.column-=1,n.column+=1,o},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach((function(e){t=t.concat(this.getFoldsInRange(e))}),this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var i=0;i<t[n].folds.length;i++)e.push(t[n].folds[i]);return e},this.getFoldStringAt=function(e,t,n,i){if(!(i=i||this.getFoldLine(e)))return null;for(var o,r,s={end:{column:0}},a=0;a<i.folds.length;a++){var l=(r=i.folds[a]).range.compareEnd(e,t);if(-1==l){o=this.getLine(r.start.row).substring(s.end.column,r.start.column);break}if(0===l)return null;s=r}return o||(o=this.getLine(r.start.row).substring(s.end.column)),-1==n?o.substring(0,t-s.end.column):1==n?o.substring(t-s.end.column):o},this.getFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i<n.length;i++){var o=n[i];if(o.start.row<=e&&o.end.row>=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i<n.length;i++){var o=n[i];if(o.end.row>=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,o=0;o<n.length;o++){var r=n[o],s=r.end.row,a=r.start.row;if(s>=t){a<t&&(a>=e?i-=t-a:i=0);break}s>=e&&(i-=a>=e?s-a:s-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,i=this.$foldData,s=!1;e instanceof r?n=e:(n=new r(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column,h=this.getFoldAt(a,l,1),d=this.getFoldAt(c,u,-1);if(h&&d==h)return h.addSubFold(n);h&&!h.range.isStart(a,l)&&this.removeFold(h),d&&!d.range.isEnd(c,u)&&this.removeFold(d);var p=this.getFoldsInRange(n.range);p.length>0&&(this.removeFolds(p),n.collapseChildren||p.forEach((function(e){n.addSubFold(e)})));for(var f=0;f<i.length;f++){var g=i[f];if(c==g.start.row){g.addFold(n),s=!0;break}if(a==g.end.row){if(g.addFold(n),s=!0,!n.sameRow){var m=i[f+1];if(m&&m.start.row==c){g.merge(m);break}}break}if(c<=g.start.row)break}return s||(g=this.$addFoldLine(new o(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(g.start.row,g.start.row):this.$updateRowLengthCache(g.start.row,g.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach((function(e){this.addFold(e)}),this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,i=t.end.row,o=this.$foldData,r=t.folds;if(1==r.length)o.splice(o.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))r.pop(),t.end.row=r[r.length-1].end.row,t.end.column=r[r.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))r.shift(),t.start.row=r[0].start.row,t.start.column=r[0].start.column;else if(e.sameRow)r.splice(r.indexOf(e),1);else{var s=t.split(e.start.row,e.start.column);(r=s.folds).shift(),s.start.row=r[0].start.row,s.start.column=r[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,i):this.$updateRowLengthCache(n,i)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach((function(e){this.removeFold(e)}),this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach((function(t){e.restoreRange(t),this.addFold(t)}),this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,o;if(null==e?(n=new i(0,0,this.getLength(),0),null==t&&(t=!0)):n="number"==typeof e?new i(e,0,e,this.getLine(e).length):"row"in e?i.fromPoints(e,e):e,o=this.getFoldsInRangeList(n),0!=t?this.removeFolds(o):this.expandFolds(o),o.length)return o},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,o){null==i&&(i=e.start.row),null==o&&(o=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var r=this.doc,s="";return e.walk((function(e,t,n,a){if(!(t<i)){if(t==i){if(n<o)return;a=Math.max(o,a)}s+=null!=e?e:r.getLine(t).substring(a,n)}}),t,n),s},this.getDisplayLine=function(e,t,n,i){var o,r=this.getFoldLine(e);return r?this.getFoldDisplayLine(r,e,t,n,i):(o=this.doc.getLine(e)).substring(i||0,t||o.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map((function(t){var n=t.folds.map((function(e){return e.clone()}));return new o(e,n)}))},this.toggleFold=function(e){var t,n,i=this.selection.getRange();if(i.isEmpty()){var o=i.start;if(t=this.getFoldAt(o.row,o.column))return void this.expandFold(t);(n=this.findMatchingBracket(o))?1==i.comparePoint(n)?i.end=n:(i.start=n,i.start.column++,i.end.column--):(n=this.findMatchingBracket({row:o.row,column:o.column+1}))?(1==i.comparePoint(n)?i.end=n:i.start=n,i.start.column++):i=this.getCommentFoldRange(o.row,o.column)||i}else{var r=this.getFoldsInRange(i);if(e&&r.length)return void this.expandFolds(r);1==r.length&&(t=r[0])}if(t||(t=this.getFoldAt(i.start.row,i.start.column)),t&&t.range.toString()==i.toString())this.expandFold(t);else{var s="...";if(!i.isMultiLine()){if((s=this.getTextRange(i)).length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,i)}},this.getCommentFoldRange=function(e,t,n){var o=new s(this,e,t),r=o.getCurrentToken(),a=r&&r.type;if(r&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start");var l=new RegExp(a),c=new i;if(1!=n){do{r=o.stepBackward()}while(r&&l.test(r.type));o.stepForward()}if(c.start.row=o.getCurrentTokenRow(),c.start.column=o.getCurrentTokenColumn()+2,o=new s(this,e,t),-1!=n){var u=-1;do{if(r=o.stepForward(),-1==u){var h=this.getState(o.$row);l.test(h)||(u=o.$row)}else if(o.$row>u)break}while(r&&l.test(r.type));r=o.stepBackward()}else r=o.getCurrentToken();return c.end.row=o.getCurrentTokenRow(),c.end.column=o.getCurrentTokenColumn()+r.value.length-2,c}},this.foldAll=function(e,t,n,i){null==n&&(n=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength();for(var r=e=e||0;r<t;r++)if(null==o[r]&&(o[r]=this.getFoldWidget(r)),"start"==o[r]&&(!i||i(r))){var s=this.getFoldWidgetRange(r);s&&s.isMultiLine()&&s.end.row<=t&&s.start.row>=e&&(r=s.end.row,s.collapseChildren=n,this.addFold("...",s))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),i=0;i<n.length;i++){var o=n[i];if("text"!=o.type||!/^\s+$/.test(o.value))return!!/comment/.test(o.type)}}))},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var i,o=e-1;o>=0;){var r=n[o];if(null==r&&(r=n[o]=this.getFoldWidget(o)),"start"==r){var s=this.getFoldWidgetRange(o);if(i||(i=s),s&&s.end.row>=e)break}o--}return{range:-1!==o&&s,firstRange:i}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),o="end"===n?-1:1,r=this.getFoldAt(e,-1===o?0:i.length,o);if(r)return t.children||t.all?this.removeFold(r):this.expandFold(r),r;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(r=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(r.range))return this.removeFold(r),r;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange){t=n.start.row;var o=this.getFoldAt(t,this.getLine(t).length,1);o?this.removeFold(o):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var i=e("../token_iterator").TokenIterator,o=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,r=n.charAt(e.column-1),s=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(s||(r=n.charAt(e.column),e={row:e.row,column:e.column+1},s=r&&r.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=o.fromPoints(e,a),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=o.fromPoints(a,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e){var t=this.getLine(e.row),n=t.charAt(e.column-1),i=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(i||(n=t.charAt(e.column),e={row:e.row,column:e.column+1},i=n&&n.match(/([\(\[\{])|([\)\]\}])/)),!i)return null;var r=new o(e.row,e.column-1,e.row,e.column),s=i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e);return s?[r,new o(s.row,s.column,s.row,s.column+1)]:[r]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var o=this.$brackets[e],r=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var u=c.charAt(l);if(u==o){if(0==(r-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(r+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var o=this.$brackets[e],r=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;l<u;){var h=c.charAt(l);if(h==o){if(0==(r-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(r+=1);l+=1}do{a=s.stepForward()}while(a&&!n.test(a.type));if(null==a)break;l=0}return null}}}})),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],(function(e,t,n){"use strict";var o=e("./lib/oop"),r=e("./lib/lang"),s=e("./bidihandler").BidiHandler,a=e("./config"),l=e("./lib/event_emitter").EventEmitter,c=e("./selection").Selection,u=e("./mode/text").Mode,h=e("./range").Range,d=e("./document").Document,p=e("./background_tokenizer").BackgroundTokenizer,f=e("./search_highlight").SearchHighlight,g=function e(t,n){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++e.$uid,this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==i(t)&&t.getLine||(t=new d(t)),this.setDocument(t),this.selection=new c(this),this.$bidiHandler=new s(this),a.resetOptions(this),this.setMode(n),a._signal("session",this)};g.$uid=0,function(){o.implement(this,l),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var o=n+i>>1,r=e[o];if(t>r)n=o+1;else{if(!(t<r))return o;i=o-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n,i=this.bgTokenizer.getTokens(e),o=0;if(null==t){var r=i.length-1;o=this.getLine(e).length}else for(r=0;r<i.length&&!((o+=i[r].value.length)>=t);r++);return(n=i[r])?(n.index=r,n.start=o-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,n,i){var o=this.$markerId++,r={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!i,id:o};return i?(this.$frontMarkers[o]=r,this._signal("changeFrontMarker")):(this.$backMarkers[o]=r,this._signal("changeBackMarker")),o},this.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new f(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,i){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var o=new h(e,0,t,1/0);return o.id=this.addMarker(o,n,"fullLine",i),o},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getWordRange=function(e,t){var n=this.getLine(e),i=!1;if(t>0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var o=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))o=/\s/;else o=this.nonTokenRe;var r=t;if(r>0){do{r--}while(r>=0&&n.charAt(r).match(o));r++}for(var s=t;s<n.length&&n.charAt(s).match(o);)s++;return new h(e,r,e,s)},this.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),i=this.getLine(n.end.row);i.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes=a.$modes,this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"===i(e)){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,o=n.path}else o=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new u),this.$modes[o]&&!n)return this.$onChangeMode(this.$modes[o]),void(t&&t());this.$modeId=o,a.loadModule(["mode",o],function(e){if(this.$modeId!==o)return t&&t();this.$modes[o]&&!n?this.$onChangeMode(this.$modes[o]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[o]=e,e.$id=o),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){var n=this.$mode;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var i=e.getTokenizer();if(void 0!==i.on){var o=this.onReloadTokenizer.bind(this);i.on("update",o)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(i);else{this.bgTokenizer=new p(i);var r=this;this.bgTokenizer.on("update",(function(e){r._signal("tokenizerUpdate",e)}))}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:e}))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){a.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach((function(t){t&&t.screenWidth>e&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,o=0,r=this.$foldData[o],s=r?r.start.row:1/0,a=t.length,l=0;l<a;l++){if(l>s){if((l=r.end.row+1)>=a)break;s=(r=this.$foldData[o++])?r.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;n<e.length;n++){var i=e[n];"insert"!=i.action&&"remove"!=i.action||this.doc.$safeApplyDelta(i)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t){function n(e){return t?"insert"!==e.action:"insert"===e.action}for(var i,o,r=0;r<e.length;r++){var s=e[r];s.start&&(i?n(s)?(o=s.start,-1==i.compare(o.row,o.column)&&i.setStart(o),o=s.end,1==i.compare(o.row,o.column)&&i.setEnd(o)):(o=s.start,-1==i.compare(o.row,o.column)&&(i=h.fromPoints(s.start,s.start))):i=n(s)?h.fromPoints(s.start,s.end):h.fromPoints(s.start,s.start))}return i},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var i=this.getTextRange(e),o=this.getFoldsInRange(e),r=h.fromPoints(t,t);if(!n){this.remove(e);var s=e.start.row-e.end.row;(c=s?-e.end.column:e.start.column-e.end.column)&&(r.start.row==e.end.row&&r.start.column>e.end.column&&(r.start.column+=c),r.end.row==e.end.row&&r.end.column>e.end.column&&(r.end.column+=c)),s&&r.start.row>=e.end.row&&(r.start.row+=s,r.end.row+=s)}if(r.end=this.insert(r.start,i),o.length){var a=e.start,l=r.start,c=(s=l.row-a.row,l.column-a.column);this.addFolds(o.map((function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=c),e.end.row==a.row&&(e.end.column+=c),e.start.row+=s,e.end.row+=s,e})))}return r},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new h(0,0,0,0),i=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var r=this.getLine(o);n.start.row=o,n.end.row=o;for(var s=0;s<i&&" "==r.charAt(s);++s);s<i&&"\t"==r.charAt(s)?(n.start.column=s,n.end.column=s+1):(n.start.column=0,n.end.column=s),this.remove(n)}},this.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((o=this.getRowFoldStart(e+n))<0)return 0;var i=o-e}else if(n>0){var o;if((o=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=o-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var r=new h(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(r).map((function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e})),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,a),s.length&&this.addFolds(s),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,o=e.end,r=i.row,s=o.row,a=s-r,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(r,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var u=0;if(g=this.getFoldLine(o.row)){g.addRemoveChars(o.row,o.column,i.column-o.column),g.shiftRow(-a);var h=this.getFoldLine(r);h&&h!==g&&(h.merge(g),g=h),u=c.indexOf(g)+1}for(;u<c.length;u++){(g=c[u]).start.row>=o.row&&g.shiftRow(-a)}s=r}else{var d=Array(a);d.unshift(r,0);var p=t?this.$wrapData:this.$rowLengthCache;p.splice.apply(p,d);c=this.$foldData,u=0;if(g=this.getFoldLine(r)){var f=g.range.compareInside(i.row,i.column);0==f?(g=g.split(i.row,i.column))&&(g.shiftRow(a),g.addRemoveChars(s,0,o.column-i.column)):-1==f&&(g.addRemoveChars(r,0,o.column-i.column),g.shiftRow(a)),u=c.indexOf(g)+1}for(;u<c.length;u++){var g;(g=c[u]).start.row>=r&&g.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(g=this.getFoldLine(r))&&g.addRemoveChars(r,i.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(r,s):this.$updateRowLengthCache(r,s),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,i){var o,r,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=n;for(i=Math.min(i,s.length-1);u<=i;)(r=this.getFoldLine(u,r))?(o=[],r.walk(function(n,i,r,a){var l;if(null!=n){(l=this.$getDisplayTokens(n,o.length))[0]=e;for(var c=1;c<l.length;c++)l[c]=t}else l=this.$getDisplayTokens(s[i].substring(a,r),o.length);o=o.concat(l)}.bind(this),r.end.row,s[r.end.row].length+1),l[r.start.row]=this.$computeWrapSplits(o,c,a),u=r.end.row+1):(o=this.$getDisplayTokens(s[u]),l[u]=this.$computeWrapSplits(o,c,a),u++)};var e=3,t=4;function n(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,i,o){if(0==n.length)return[];var r=[],s=n.length,a=0,l=0,c=this.$wrapAsCode,u=this.$indentedSoftWrap,h=i<=Math.max(2*o,8)||!1===u?0:Math.floor(i/2);function d(e){for(var t=e-a,i=a;i<e;i++){var s=n[i];12!==s&&2!==s||(t-=1)}r.length||(p=function(){var e=0;if(0===h)return e;if(u)for(var t=0;t<n.length;t++){var i=n[t];if(10==i)e+=1;else{if(11!=i){if(12==i)continue;break}e+=o}}return c&&!1!==u&&(e+=o),Math.min(e,h)}(),r.indent=p),l+=t,r.push(l),a=e}for(var p=0;s-a>i-p;){var f=a+i-p;if(n[f-1]>=10&&n[f]>=10)d(f);else if(n[f]!=e&&n[f]!=t){for(var g=Math.max(f-(i-(i>>2)),a-1);f>g&&n[f]<e;)f--;if(c){for(;f>g&&n[f]<e;)f--;for(;f>g&&9==n[f];)f--}else for(;f>g&&n[f]<10;)f--;f>g?d(++f):(2==n[f=a+i]&&f--,d(f-p))}else{for(;f!=a-1&&n[f]!=e;f--);if(f>a){d(f);continue}for(f=a+i;f<n.length&&n[f]==t;f++);if(f==n.length)break;d(f)}}return r},this.$getDisplayTokens=function(e,t){var i,o=[];t=t||0;for(var r=0;r<e.length;r++){var s=e.charCodeAt(r);if(9==s){i=this.getScreenTabSize(o.length+t),o.push(11);for(var a=1;a<i;a++)o.push(12)}else 32==s?o.push(10):s>39&&s<48||s>57&&s<64?o.push(9):s>=4352&&n(s)?o.push(1,2):o.push(1)}return o},this.$getStringScreenWidth=function(e,t,i){if(0==t)return[0,0];var o,r;for(null==t&&(t=1/0),i=i||0,r=0;r<e.length&&(9==(o=e.charCodeAt(r))?i+=this.getScreenTabSize(i):o>=4352&&n(o)?i+=2:i+=1,!(i>t));r++);return[i,r]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var i,o,r=0,s=0,a=0,l=0,c=this.$screenRowCache,u=this.$getRowCacheIndex(c,e),h=c.length;if(h&&u>=0){a=c[u],r=this.$docRowCache[u];var d=e>c[h-1]}else d=!h;for(var p=this.getLength()-1,f=this.getNextFoldLine(r),g=f?f.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(r))>e||r>=p);)a+=l,++r>g&&(r=f.end.row+1,g=(f=this.getNextFoldLine(r,f))?f.start.row:1/0),d&&(this.$docRowCache.push(r),this.$screenRowCache.push(a));if(f&&f.start.row<=r)i=this.getFoldDisplayLine(f),r=f.start.row;else{if(a+l<=e||r>p)return{row:p,column:this.getLine(p).length};i=this.getLine(r),f=null}var m=0,v=Math.floor(e-a);if(this.$useWrapMode){var b=this.$wrapData[r];b&&(o=b[v],v>0&&b.length&&(m=b.indent,s=b[v-1]||b[b.length-1],i=i.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,r,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,t-m)[1],this.$useWrapMode&&s>=o&&(s=o-1),f?f.idxToPosition(s):{row:r,column:s}},this.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i,o=0,r=null;(i=this.getFoldAt(e,t,1))&&(e=i.start.row,t=i.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){a=l[c],o=this.$screenRowCache[c];var h=e>l[u-1]}else h=!u;for(var d=this.getNextFoldLine(a),p=d?d.start.row:1/0;a<e;){if(a>=p){if((s=d.end.row+1)>e)break;p=(d=this.getNextFoldLine(s,d))?d.start.row:1/0}else s=a+1;o+=this.getRowLength(a),a=s,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(o))}var f="";d&&a>=p?(f=this.getFoldDisplayLine(d,e,t),r=d.start.row):(f=this.getLine(e).substring(0,t),r=e);var g=0;if(this.$useWrapMode){var m=this.$wrapData[r];if(m){for(var v=0;f.length>=m[v];)o++,v++;f=f.substring(m[v-1]||0,f.length),g=v>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(o+=this.lineWidgets[a].rowsAbove),{row:o,column:g+this.$getStringScreenWidth(f)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,o=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);i<n;){var r=this.$wrapData[i];e+=r?r.length+1:1,++i>o&&(i=t.end.row+1,o=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)e-=(t=s[a]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,i){if(0===n)return[0,0];var o,r;for(n||(n=1/0),i=i||0,r=0;r<t.length&&!((i+="\t"===(o=t.charAt(r))?this.getScreenTabSize(i):e.getCharacterWidth(o))>n);r++);return[i,r]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.selection.detach()},this.isFullWidth=n}.call(g.prototype),e("./edit_session/folding").Folding.call(g.prototype),e("./edit_session/bracket_match").BracketMatch.call(g.prototype),a.defineOptions(g.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=g})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),o=e("./lib/oop"),r=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return o.mixin(this.$options,e),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach((function(e,n,o,s){return i=new r(e,n,o,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start))||(i=null,!1)})),i},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,o=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,u=o.length-c;e:for(var h=a.offset||0;h<=u;h++){for(var d=0;d<c;d++)if(-1==o[h+d].search(a[d]))continue e;var p=o[h],f=o[h+c-1],g=p.length-p.match(a[0])[0].length,m=f.match(a[c-1])[0].length;l&&l.end.row===h&&l.end.column>g||(s.push(l=new r(h,g,h+c-1,m)),c>2&&(h=h+c-2))}}else for(var v=0;v<o.length;v++){var b=i.getMatchOffsets(o[v],a);for(d=0;d<b.length;d++){var y=b[d];s.push(new r(v,y.offset,v,y.offset+y.length))}}if(n){var w=n.start.column,x=n.start.column;for(v=0,d=s.length-1;v<d&&s[v].start.column<w&&s[v].start.row==n.start.row;)v++;for(;v<d&&s[d].end.column>x&&s[d].end.row==n.end.row;)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v<d;v++)s[v].start.row+=n.start.row,s[v].end.row+=n.start.row}return s},this.replace=function(e,t){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(i){var o=i.exec(e);if(!o||o[0].length!=e.length)return null;if(t=e.replace(i,t),n.preserveCase){t=t.split("");for(var r=Math.min(e.length,e.length);r--;){var s=e[r];s&&s.toLowerCase()!=s?t[r]=t[r].toUpperCase():t[r]=t[r].toLowerCase()}t=t.join("")}return t}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=i.escapeRegExp(n)),e.wholeWord&&(n=function(e,t){function n(e){return/\w/.test(e)||t.regExp?"\\b":""}return n(e[0])+e+n(e[e.length-1])}(n,e));var o=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,o);try{var r=new RegExp(n,o)}catch(e){r=!1}return e.re=r},this.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],o=0;o<n.length;o++)try{i.push(new RegExp(n[o],t))}catch(e){return!1}return i},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=1==t.backwards,o=0!=t.skipCurrent,r=t.range,s=t.start;s||(s=r?r[i?"end":"start"]:e.selection.getRange()),s.start&&(s=s[o!=i?"end":"start"]);var a=r?r.start.row:0,l=r?r.end.row:e.getLength()-1;if(i)var c=function(e){var n=s.row;if(!h(n,s.column,e)){for(n--;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=l,a=s.row;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return}};else c=function(e){var n=s.row;if(!h(n,s.column,e)){for(n+=1;n<=l;n++)if(h(n,0,e))return;if(0!=t.wrap)for(n=a,l=s.row;n<=l;n++)if(h(n,0,e))return}};if(t.$isMultiLine)var u=n.length,h=function(t,o,r){var s=i?t-u+1:t;if(!(s<0)){var a=e.getLine(s),l=a.search(n[0]);if(!(!i&&l<o||-1===l)){for(var c=1;c<u;c++)if(-1==(a=e.getLine(s+c)).search(n[c]))return;var h=a.match(n[u-1])[0].length;if(!(i&&h>o))return!!r(s,l,s+u-1,h)||void 0}}};else if(i)h=function(t,i,o){var r,s=e.getLine(t),a=[],l=0;for(n.lastIndex=0;r=n.exec(s);){var c=r[0].length;if(l=r.index,!c){if(l>=s.length)break;n.lastIndex=l+=1}if(r.index+c>i)break;a.push(r.index,c)}for(var u=a.length-1;u>=0;u-=2){var h=a[u-1];if(o(t,h,t,h+(c=a[u])))return!0}};else h=function(t,i,o){var r,s,a=e.getLine(t);for(n.lastIndex=i;s=n.exec(a);){var l=s[0].length;if(o(t,r=s.index,t,r+l))return!0;if(!l&&(n.lastIndex=r+=1,r>=a.length))return!1}};return{forEach:c}}}).call(s.prototype),t.Search=s})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var o=e("../lib/keys"),r=e("../lib/useragent"),s=o.KEY_MODS;function a(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function l(e,t){a.call(this,e,t),this.$singleCommand=!1}l.prototype=a.prototype,function(){function e(e){return"object"==i(e)&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var o in i){var r=i[o];if(r==e)delete i[o];else if(Array.isArray(r)){var s=r.indexOf(e);-1!=s&&(r.splice(s,1),1==r.length&&(i[o]=r[0]))}}},this.bindKey=function(e,t,n){if("object"==i(e)&&e&&(null==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var i="";if(-1!=e.indexOf(" ")){var o=e.split(/\s+/);e=o.pop(),o.forEach((function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var r=this.parseKeys(e),a=s[r.hashId]+r.key;this._addCommandToBinding(i+a,t,n)}),this)},this._addCommandToBinding=function(t,n,i){var o,r=this.commandKeyBinding;if(n)if(!r[t]||this.$singleCommand)r[t]=n;else{Array.isArray(r[t])?-1!=(o=r[t].indexOf(n))&&r[t].splice(o,1):r[t]=[r[t]],"number"!=typeof i&&(i=e(n));var s=r[t];for(o=0;o<s.length;o++){if(e(s[o])>i)break}s.splice(o,0,n)}else delete r[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"===i(n)&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),i=o[n];if(o.FUNCTION_KEYS[i])n=o.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var r=0,s=t.length;s--;){var a=o.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;r|=a}return{key:n,hashId:r}},this.findKeyCommand=function(e,t){var n=s[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,i){if(!(i<0)){var o=s[t]+n,r=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,r=this.commandKeyBinding[e.$keyChain]||r),!r||"chainKeys"!=r&&"chainKeys"!=r[r.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:r}):(e.$keyChain=e.$keyChain||o,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(a.prototype),t.HashHandler=a,t.MultiHashHandler=l})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("../keyboard/hash_handler").MultiHashHandler,r=e("../lib/event_emitter").EventEmitter,s=function(e,t){o.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};i.inherits(s,o),function(){i.implement(this,r),this.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var o={editor:t,command:e,args:n};return o.returnValue=this._emit("exec",o),this._signal("afterExec",o),!1!==o.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(s.prototype),t.CommandManager=s})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var i=e("../lib/lang"),o=e("../config"),r=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",bindKey:s("Alt-E","F4"),exec:function(e){o.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),o=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=o.row+1;c++){var u=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}o.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new r(n.row,0,o.row+2,0),l),a>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(s=e.session.doc.getLine(n.row).length>s?s+1:s,e.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,o=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;s<i.length;s++)s==i.length-1&&(i[s].end.row===t&&i[s].end.column===n||o.push(new r(i[s].end.row,i[s].end.column,t,n))),0===s?0===i[s].start.row&&0===i[s].start.column||o.push(new r(0,0,i[s].start.row,i[s].start.column)):o.push(new r(i[s-1].end.row,i[s-1].end.column,i[s].start.row,i[s].start.column));e.exitMultiSelectMode(),e.clearSelection();for(s=0;s<o.length;s++)e.selection.addRange(o[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command pallete",bindKey:s("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var a=1;a<9;a++)t.commands.push({name:"foldToLevel"+a,description:"Fold To Level "+a,level:a,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})})),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/clipboard"],(function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var o=e("./lib/oop"),r=e("./lib/dom"),s=e("./lib/lang"),a=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,h=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,p=e("./search").Search,f=e("./range").Range,g=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,b=e("./config"),y=e("./token_iterator").TokenIterator,w=e("./clipboard"),x=function e(t,n,o){this.$toDestroy=[];var r=t.getContainerElement();this.container=r,this.renderer=t,this.id="editor"+ ++e.$uid,this.commands=new m(a.isMac?"mac":"win",v),"object"==("undefined"==typeof document?"undefined":i(document))&&(this.textInput=new l(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new u(this)),this.keyBinding=new h(this),this.$search=(new p).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(n||o&&o.session||new d("")),b.resetOptions(this),o&&this.setOptions(o),b._signal("editor",this)};x.$uid=0,function(){o.implement(this,g),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name)return;if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),o=this.renderer.layerConfig;(i.start.row>=o.lastRow||i.end.row<=o.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var r=this.selection.toJSON();this.curOp.selectionAfter=r,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(r),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;b.loadModule(["keybinding",e],(function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=t.getMatchingBracketRanges(e.getCursorPosition());if(!n&&t.$mode.getMatching&&(n=t.$mode.getMatching(e.session)),n){var i="ace_bracket";Array.isArray(n)?1==n.length&&(i="ace_error_bracket"):n=[n],2==n.length&&(0==f.comparePoints(n[0].end,n[1].start)?n=[f.fromPoints(n[0].start,n[1].end)]:0==f.comparePoints(n[0].start,n[1].end)&&(n=[f.fromPoints(n[1].start,n[0].end)])),t.$bracketHighlight={ranges:n,markerIds:n.map((function(e){return t.addMarker(e,i,"text")}))}}}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout((function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),i=new y(e.session,n.row,n.column),o=i.getCurrentToken();if(!o||!/\b(?:tag-open|tag-name)/.test(o.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1===o.type.indexOf("tag-open")||(o=i.stepForward())){var r=o.value,s=o.value,a=0,l=i.stepBackward();if("<"===l.value)do{l=o,(o=i.stepForward())&&(-1!==o.type.indexOf("tag-name")?r===(s=o.value)&&("<"===l.value?a++:"</"===l.value&&a--):r===s&&"/>"===o.value&&a--)}while(o&&a>=0);else{do{if(o=l,l=i.stepBackward(),o)if(-1!==o.type.indexOf("tag-name"))r===o.value&&("<"===l.value?a++:"</"===l.value&&a--);else if("/>"===o.value){for(var c=0,u=l;u;){if(-1!==u.type.indexOf("tag-name")&&u.value===r){a--;break}if("<"===u.value)break;u=i.stepBackward(),c++}for(var h=0;h<c;h++)i.stepForward()}}while(l&&a<=0);i.stepForward()}if(!o)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var d=i.getCurrentTokenRow(),p=i.getCurrentTokenColumn(),g=new f(d,p,d,p+o.value.length),m=t.$backMarkers[t.$tagHighlight];t.$tagHighlight&&null!=m&&0!==g.compareRange(m.range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),t.$tagHighlight||(t.$tagHighlight=t.addMarker(g,"ace_bracket","text"))}}}),50)}},this.focus=function(){var e=this;setTimeout((function(){e.isFocused()||e.textInput.focus()})),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new f(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var o=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(o),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,i=t.end.column,o=e.getLine(t.start.row),r=o.substring(n,i);if(!(r.length>5e3)&&/[\w\d]/.test(r)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:r}),a=o.substring(n-1,i+1);if(s.test(a))return s}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),o=0;o<i.length;o++){var r=i[o];o&&i[o-1].start.row==r.start.row||(e+=this.session.getLine(r.start.row)+t)}}var s={text:e};return this._signal("copy",s),w.lineMode=n?s.text:"",s.text},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text,n=t==w.lineMode,i=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?i.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(n)this.selection.rangeList.ranges.forEach((function(e){i.insert({row:e.start.row,column:0},t)}));else{var o=t.split(/\r\n|\r|\n/),r=this.selection.rangeList.ranges,s=!(2!=o.length||o[0]&&o[1]);if(o.length!=r.length||s)return this.commands.exec("insertstring",this,t);for(var a=r.length;a--;){var l=r[a];l.isEmpty()||i.remove(l),i.insert(l.start,o[a])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,i=n.getMode(),o=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var r=i.transformAction(n.getState(o.row),"insertion",this,n,e);r&&(e!==r.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),e=r.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){(s=new f.fromPoints(o,o)).end.column+=e.length,this.session.remove(s)}}else{var s=this.getSelectionRange();o=this.session.remove(s),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=n.getLine(o.row);if(o.column>a.search(/\S|$/)){var l=a.substr(o.column).search(/\S|$/);n.doc.removeInLine(o.row,o.column,o.column+l)}}this.clearSelection();var c=o.column,u=n.getState(o.row),h=(a=n.getLine(o.row),i.checkOutdent(u,a,e));if(n.insert(o,e),r&&r.selection&&(2==r.selection.length?this.selection.setSelectionRange(new f(o.row,c+r.selection[0],o.row,c+r.selection[1])):this.selection.setSelectionRange(new f(o.row+r.selection[0],r.selection[1],o.row+r.selection[2],r.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var d=i.getNextLineIndent(u,a.slice(0,o.column),n.getTabString());n.insert({row:o.row+1,column:0},d)}h&&i.autoOutdent(u,n,o.row)}},this.autoIndent=function(){var e,t,n=this.session,i=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var o=this.getSelectionRange();e=o.start.row,t=o.end.row}for(var r,s,a,l="",c="",u="",h=n.getTabString(),d=e;d<=t;d++)d>0&&(l=n.getState(d-1),c=n.getLine(d-1),u=i.getNextLineIndent(l,c,h)),r=n.getLine(d),u!==(s=i.$getIndent(r))&&(s.length>0&&(a=new f(d,0,d,s.length),n.remove(a)),u.length>0&&n.insert({row:d,column:0},u)),i.autoOutdent(l,n,d)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove());(!e&&this.selection.isEmpty()||this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),o=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var r=n.getTextRange(t);if("\n"==r[r.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}o&&(t=o)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,o=this.session.getLine(e.row);t<o.length?(n=o.charAt(t)+o.charAt(t-1),i=new f(e.row,t-1,e.row,t+1)):(n=o.charAt(t-1)+o.charAt(t-2),i=new f(e.row,t-2,e.row,t)),this.session.replace(i,n),this.session.selection.moveToPosition(i.end)}}},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n)){u=this.$getSelectedRows();return void e.indentRows(u.first,u.last,"\t")}}var i=e.getLine(t.start.row),o=t.start,r=e.getTabSize(),a=e.documentToScreenColumn(o.row,o.column);if(this.session.getUseSoftTabs())var l=r-a%r,c=s.stringRepeat(" ",l);else{for(l=a%r;" "==i[t.start.column-1]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)}var u=this.$getSelectedRows();e.indentRows(u.first,u.last,"\t")},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],i=e.first;i<=e.last;i++)n.push(t.getLine(i));n.sort((function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0}));var o=new f(0,0,0,0);for(i=e.first;i<=e.last;i++){var r=t.getLine(i);o.start.row=i,o.end.row=i,o.end.column=r.length,t.replace(o,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex<t;){var o=n.exec(i);if(o.index<=t&&o.index+o[0].length>=t)return{value:o[0],start:o.index,end:o.index+o[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new f(t,n-1,t,n),o=this.session.getTextRange(i);if(!isNaN(parseFloat(o))&&isFinite(o)){var r=this.getNumberAt(t,n);if(r){var s=r.value.indexOf(".")>=0?r.start+r.value.indexOf(".")+1:r.end,a=r.start+r.value.length-s,l=parseFloat(r.value);l*=Math.pow(10,a),s!==r.end&&n<s?e*=Math.pow(10,r.end-n-1):e*=Math.pow(10,r.end-n),l+=e;var c=(l/=Math.pow(10,a)).toFixed(a),u=new f(t,r.start,t,r.end);this.session.replace(u,c),this.moveCursorTo(t,Math.max(r.start+1,n+c.length-r.value.length))}}else this.toggleWord()},this.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],this.toggleWord=function(){var e=this.selection.getCursor().row,t=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),i=this.selection.getWordRange().start.column,o=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),r=t-i-1;r<0&&(r=0);var a=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&o.forEach((function(t,o){l=a+t.length,r>=a&&r<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,a+i),c.selection.selectTo(e,l+i)),a=l}));for(var u,h=this.$toggleWordPairs,d=0;d<h.length;d++)for(var p=h[d],f=0;f<=1;f++){var g=+!f,m=n.match(new RegExp("^\\s?_?("+s.escapeRegExp(p[f])+")\\s?$","i"));if(m)n.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(m[1])+")($|\\s)","g"))&&(u=n.replace(new RegExp(s.escapeRegExp(p[f]),"i"),(function(e){var t=p[g];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+p[g].charAt(0).toUpperCase()+t.substr(1)),t})),this.insert(u),u="")}},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),i=e.isBackwards();if(n.isEmpty()){var o=n.start.row;t.duplicateLines(o,o)}else{var r=i?n.start:n.end,s=t.insert(r,t.getTextRange(n),!1);n.start=r,n.end=s,e.setSelectionRange(n,i)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var n,i,o=this.selection;if(!o.inMultiSelectMode||this.inVirtualSelectionMode){var r=o.toOrientedRange();n=this.$getSelectedRows(r),i=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(i=0),r.moveBy(i,0),o.fromOrientedRange(r)}else{var s=o.rangeList.ranges;o.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,u=0;u<c;u++){var h=u;s[u].moveBy(a,0);for(var d=(n=this.$getSelectedRows(s[u])).first,p=n.last;++u<c;){l&&s[u].moveBy(l,0);var f=this.$getSelectedRows(s[u]);if(t&&f.first!=p)break;if(!t&&f.first>p+1)break;p=f.last}for(u--,a=this.session.$moveLines(d,p,t?0:e),t&&-1==e&&(h=u+1);h<=u;)s[h].moveBy(a,0),h++;t||(a=0),l+=a}o.fromOrientedRange(o.ranges[0]),o.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,o=e*Math.floor(i.height/i.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(o,0)})):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection());var r=n.scrollTop;n.scrollBy(0,o*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(r)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new y(this.session,n.row,n.column),o=i.getCurrentToken(),r=o||i.stepForward();if(r){var s,a,l=!1,c={},u=n.column-r.start,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(r.value.match(/[{}()\[\]]/g)){for(;u<r.value.length&&!l;u++)if(h[r.value[u]])switch(a=h[r.value[u]]+"."+r.type.replace("rparen","lparen"),isNaN(c[a])&&(c[a]=0),r.value[u]){case"(":case"[":case"{":c[a]++;break;case")":case"]":case"}":c[a]--,-1===c[a]&&(s="bracket",l=!0)}}else-1!==r.type.indexOf("tag-name")&&(isNaN(c[r.value])&&(c[r.value]=0),"<"===o.value?c[r.value]++:"</"===o.value&&c[r.value]--,-1===c[r.value]&&(s="tag",l=!0));l||(o=r,r=i.stepForward(),u=0)}while(r&&!l);if(s){var d,p;if("bracket"===s)(d=this.session.getBracketRange(n))||(p=(d=new f(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+u-1,i.getCurrentTokenRow(),i.getCurrentTokenColumn()+u-1)).start,(t||p.row===n.row&&Math.abs(p.column-n.column)<2)&&(d=this.session.getBracketRange(p)));else if("tag"===s){if(!r||-1===r.type.indexOf("tag-name"))return;var g=r.value;if(0===(d=new f(i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2,i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2)).compare(n.row,n.column)){l=!1;do{r=o,(o=i.stepBackward())&&(-1!==o.type.indexOf("tag-close")&&d.setEnd(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1),r.value===g&&-1!==r.type.indexOf("tag-name")&&("<"===o.value?c[g]++:"</"===o.value&&c[g]--,0===c[g]&&(l=!0)))}while(o&&!l)}r&&r.type.indexOf("tag-name")&&(p=d.start).row==n.row&&Math.abs(p.column-n.column)<2&&(p=d.end)}(p=d&&d.cursor||p)&&(e?d&&t?this.selection.setRange(d):d&&d.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(p.row,p.column):this.selection.moveTo(p.row,p.column))}}},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),i=0;return n?(this.$tryReplace(n,e)&&(i=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),i):i},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),i=0;if(!n.length)return i;var o=this.getSelectionRange();this.selection.moveTo(0,0);for(var r=n.length-1;r>=0;--r)this.$tryReplace(n[r],e)&&i++;return this.selection.setSelectionRange(o),i},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==i(e)&&o.mixin(t,e);var r=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(r)||this.$search.$options.needle)||(r=this.session.getWordRange(r.start.row,r.start.column),e=this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var s=this.$search.find(this.session);return t.preventScroll?s:s?(this.revealRange(s,n),s):(t.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var o=this.$scrollAnchor;o.style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild);var r=this.on("changeSelection",(function(){i=!0})),s=this.renderer.on("beforeRender",(function(){i&&(t=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,r=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=r.top-s.offset;null!=(i=r.top>=0&&a+t.top<0||!(r.top<s.height&&r.top+t.top+s.lineHeight>window.innerHeight)&&null)&&(o.style.top=a+"px",o.style.left=r.left+"px",o.style.height=s.lineHeight+"px",o.scrollIntoView(i)),i=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",r),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,r.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var i=this;b.loadModule("./ext/prompt",(function(o){o.prompt(i,e,t,n)}))}}.call(x.prototype),b.defineOptions(x.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?S.attach(this):S.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?S.attach(this):S.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),r.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),r.addCssClass(this.container,"ace_hasPlaceholder");var t=r.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var S={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=x})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=function(){this.$maxRev=0,this.$fromUndo=!1,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){this.$fromUndo||e!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==t&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev),"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e))},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var o=n[i][0];if(o.id<=e)break;o.id<t&&(o.ignore=!0)}this.lastDeltas=null},this.getSelection=function(e,t){for(var n=this.selections,i=n.length;i--;){var o=n[i];if(o.rev<e)return t&&(o=n[i+1]),o}},this.getRevision=function(){return this.$rev},this.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=null,o=0,r=n.length;r--;){var s=n[r][0];if(s.id<t&&!i&&(i=r+1),s.id<=e){o=r+1;break}}return n.slice(o,i)},this.getChangedRanges=function(e,t){null==t&&(t=this.$rev+1)},this.getChangedLines=function(e,t){null==t&&(t=this.$rev+1)},this.undo=function(e,t){this.lastDeltas=null;var n=this.$undoStack;if(function(e,t){for(var n=t;n--;){var i=e[n];if(i&&!i[0].ignore){for(;n<t-1;){var o=u(e[n],e[n+1]);e[n]=o[0],e[n+1]=o[1],n++}return!0}}}(n,n.length)){e||(e=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var i=n.pop(),o=null;return i&&(o=e.undoChanges(i,t),this.$redoStack.push(i),this.$syncRev()),this.$fromUndo=!1,o}},this.redo=function(e,t){if(this.lastDeltas=null,e||(e=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);!function(e,t){for(var n=0;n<t.length;n++)for(var i=t[n],o=0;o<i.length;o++)g(e,i[o])}(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach((function(e){e[0].id=++this.$maxRev}),this)}var i=this.$redoStack.pop(),o=null;return i&&(o=e.redoChanges(i,t),this.$undoStack.push(i),this.$syncRev()),this.$fromUndo=!1,o},this.$syncRev=function(){var e=this.$undoStack,t=e[e.length-1],n=t&&t[0].id||0;this.$redoStackBaseRev=n,this.$rev=n},this.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},this.canUndo=function(){return this.$undoStack.length>0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?a(e):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)}}).call(i.prototype);var o=e("./range").Range,r=o.comparePoints;o.comparePoints;function s(e){return{row:e.row,column:e.column}}function a(e){if(e=e||this,Array.isArray(e))return e.map(a).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(r(t.start,e.end)>=0)d(t,e,-1);else{if(!(r(t.start,e.start)<=0))return null;d(e,t,1)}else if(n&&!i)if(r(t.start,e.end)>=0)d(t,e,-1);else{if(!(r(t.end,e.start)<=0))return null;d(e,t,-1)}else if(!n&&i)if(r(t.start,e.start)>=0)d(t,e,1);else{if(!(r(t.start,e.start)<=0))return null;d(e,t,1)}else if(!n&&!i)if(r(t.start,e.start)>=0)d(t,e,1);else{if(!(r(t.end,e.start)<=0))return null;d(e,t,-1)}return[t,e]}function u(e,t){for(var n=e.length;n--;)for(var i=0;i<t.length;i++)if(!c(e[n],t[i])){for(;n<e.length;){for(;i--;)c(t[i],e[n]);i=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}function h(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)r(e.start,t.start)<0?d(t,e,1):d(e,t,1);else if(n&&!i)r(e.start,t.end)>=0?d(e,t,-1):(r(e.start,t.start)<=0||d(e,o.fromPoints(t.start,e.start),-1),d(t,e,1));else if(!n&&i)r(t.start,e.end)>=0?d(t,e,-1):(r(t.start,e.start)<=0||d(t,o.fromPoints(e.start,t.start),-1),d(e,t,1));else if(!n&&!i)if(r(t.start,e.end)>=0)d(t,e,-1);else{var s,a;if(!(r(t.end,e.start)<=0))return r(e.start,t.start)<0&&(s=e,e=f(e,t.start)),r(e.end,t.end)>0&&(a=f(e,t.end)),p(t.end,e.start,e.end,-1),a&&!s&&(e.lines=a.lines,e.start=a.start,e.end=a.end,a=e),[t,s,a].filter(Boolean);d(e,t,-1)}return[t,e]}function d(e,t,n){p(e.start,t.start,t.end,n),p(e.end,t.start,t.end,n)}function p(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function f(e,t){var n=e.lines,i=e.end;e.end=s(t);var o=e.end.row-e.start.row,r=n.splice(o,n.length),a=o?t.column:t.column-e.start.column;return n.push(r[0].substring(0,a)),r[0]=r[0].substr(a),{start:s(t),end:i,lines:r,action:e.action}}function g(e,t){t=function(e){return{start:s(e.start),end:s(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var i=e[n],o=0;o<i.length;o++){var r=h(i[o],t);t=r[0],2!=r.length&&(r[2]?(i.splice(o+1,1,r[1],r[2]),o++):r[1]||(i.splice(o,1),o--))}i.length||e.splice(n,1)}return e}t.UndoManager=i})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=function(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0};(function(){this.moveContainer=function(e){i.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},this.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},this.computeLineTop=function(e,t,n){var i=t.firstRowScreen*t.lineHeight,o=Math.floor(i/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-o*this.canvasHeight},this.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},this.getLength=function(){return this.cells.length},this.get=function(e){return this.cells[e]},this.shift=function(){this.$cacheCell(this.cells.shift())},this.pop=function(){this.$cacheCell(this.cells.pop())},this.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=i.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},this.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=i.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement("afterbegin",e.element)},this.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},this.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},this.createCell=function(e,t,n,o){var r=this.cellCache.pop();if(!r){var s=i.createElement("div");o&&o(s),this.element.appendChild(s),r={element:s,text:"",row:e}}return r.row=e,r}}).call(o.prototype),t.Lines=o})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=e("../lib/oop"),r=e("../lib/lang"),s=e("../lib/event_emitter").EventEmitter,a=e("./lines").Lines,l=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new a(this.element),this.$lines.$offsetCoefficient=1};function c(e){var t=document.createTextNode("");e.appendChild(t);var n=i.createElement("span");return e.appendChild(n),e}(function(){o.implement(this,s),this.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],i=n.row,o=this.$annotations[i];o||(o=this.$annotations[i]={text:[]});var s=n.text;s=s?r.escapeHTML(s):n.html||"",-1===o.text.indexOf(s)&&o.text.push(s);var a=n.type;"error"==a?o.className=" ace_error":"warning"==a&&" ace_error"!=o.className?o.className=" ace_warning":"info"!=a||o.className||(o.className=" ace_info")}},this.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var i=new Array(n+1);i.unshift(t,1),this.$annotations.splice.apply(this.$annotations,i)}}},this.update=function(e){this.config=e;var t=this.session,n=e.firstRow,i=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=i,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var o=t.getNextFoldLine(n),r=o?o.start.row:1/0,s=null,a=-1,l=n;;){if(l>r&&(l=o.end.row+1,r=(o=t.getNextFoldLine(l,o))?o.start.row:1/0),l>i){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(s=this.$lines.get(++a))?s.row=l:(s=this.$lines.createCell(l,e,this.session,c),this.$lines.push(s)),this.$renderCell(s,e,o,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,o=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(o=t.getLength()+i-1);var r=n?n.getWidth(t,o,e):o.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();(r+=s.left+s.right)===this.gutterWidth||isNaN(r)||(this.gutterWidth=r,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",r))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<t.length;n++){var i=t[n];if(i.row>=this.$cursorRow){if(i.row>this.$cursorRow){var o=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&o&&o.start.row==t[n-1].row))break;i=t[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!t||i<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var o=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);o>0;o--)this.$lines.shift();if(i>n)for(o=this.session.getFoldedRowCount(n+1,i);o>0;o--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n>i&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var i=[],o=t,r=this.session.getNextFoldLine(o),s=r?r.start.row:1/0;o>s&&(o=r.end.row+1,s=(r=this.session.getNextFoldLine(o,r))?r.start.row:1/0),!(o>n);){var a=this.$lines.createCell(o,e,this.session,c);this.$renderCell(a,e,r,o),i.push(a),o++}return i},this.$renderCell=function(e,t,n,o){var r=e.element,s=this.session,a=r.childNodes[0],l=r.childNodes[1],c=s.$firstLineNumber,u=s.$breakpoints,h=s.$decorations,d=s.gutterRenderer||this.$renderer,p=this.$showFoldWidgets&&s.foldWidgets,f=n?n.start.row:Number.MAX_VALUE,g="ace_gutter-cell ";if(this.$highlightGutterLine&&(o==this.$cursorRow||n&&o<this.$cursorRow&&o>=f&&this.$cursorRow<=n.end.row)&&(g+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),u[o]&&(g+=u[o]),h[o]&&(g+=h[o]),this.$annotations[o]&&(g+=this.$annotations[o].className),r.className!=g&&(r.className=g),p){var m=p[o];null==m&&(m=p[o]=s.getFoldWidget(o))}if(m){g="ace_fold-widget ace_"+m;"start"==m&&o==f&&o<n.end.row?g+=" ace_closed":g+=" ace_open",l.className!=g&&(l.className=g);var v=t.lineHeight+"px";i.setStyle(l.style,"height",v),i.setStyle(l.style,"display","inline-block")}else l&&i.setStyle(l.style,"display","none");var b=(d?d.getText(s,o):o+c).toString();return b!==a.data&&(a.data=b),i.setStyle(e.element.style,"height",this.$lines.computeLineHeight(o,t,s)+"px"),i.setStyle(e.element.style,"top",this.$lines.computeLineTop(o,t,s)+"px"),e.text=b,e},this.$fixedWidth=!1,this.$highlightGutterLine=!0,this.$renderer="",this.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?i.addCssClass(this.element,"ace_folding-enabled"):i.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=i.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0}}).call(l.prototype),t.Gutter=l})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../range").Range,o=e("../lib/dom"),r=function(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var i=this.markers[n];if(i.range){var o=i.range.clipRows(e.firstRow,e.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),i.renderer){var r=this.$getTop(o.start.row,e),s=this.$padding+o.start.column*e.characterWidth;i.renderer(t,o,s,r,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,o,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,o,i.clazz,e):o.isMultiLine()?"text"==i.type?this.drawTextMarker(t,o,i.clazz,e):this.drawMultiLineMarker(t,o,i.clazz,e):this.drawSingleLineMarker(t,o,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,n,o,r){for(var s=this.session,a=t.start.row,l=t.end.row,c=a,u=0,h=0,d=s.getScreenLastRowColumn(c),p=new i(c,t.start.column,c,h);c<=l;c++)p.start.row=p.end.row=c,p.start.column=c==a?t.start.column:s.getRowWrapIndent(c),p.end.column=d,u=h,h=d,d=c+1<l?s.getScreenLastRowColumn(c+1):c==l?0:t.end.column,this.drawSingleLineMarker(e,p,n+(c==a?" ace_start":"")+" ace_br"+((c==a||c==a+1&&t.start.column?1:0)|(u<h?2:0)|(h>d?4:0)|(c==l?8:0)),o,c==l?0:1,r)},this.drawMultiLineMarker=function(e,t,n,i,o){var r=this.$padding,s=i.lineHeight,a=this.$getTop(t.start.row,i),l=r+t.start.column*i.characterWidth;(o=o||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",i,null,o)):this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",i,null,o)}else{a=this.$getTop(t.end.row,i);var u=t.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+u+"px;top:"+a+"px;left:"+r+"px;"+(o||""))}if(!((s=(t.end.row-t.start.row-1)*i.lineHeight)<=0)){a=this.$getTop(t.start.row+1,i);var h=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(h?" ace_br"+h:""),"height:"+s+"px;right:0;top:"+a+"px;left:"+r+"px;"+(o||""))}},this.drawSingleLineMarker=function(e,t,n,i,o,r){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,i,o,r);var s=i.lineHeight,a=(t.end.column+(o||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),c=this.$padding+t.start.column*i.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(r||""))},this.drawBidiSingleLineMarker=function(e,t,n,i,o,r){var s=i.lineHeight,a=this.$getTop(t.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+s+"px;width:"+e.width+(o||0)+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(r||""))}),this)},this.drawFullLineMarker=function(e,t,n,i,o){var r=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-r),this.elt(n,"height:"+s+"px;top:"+r+"px;left:0;right:0;"+(o||""))},this.drawScreenLineMarker=function(e,t,n,i,o){var r=this.$getTop(t.start.row,i),s=i.lineHeight;this.elt(n,"height:"+s+"px;top:"+r+"px;left:0;right:0;"+(o||""))}}).call(r.prototype),t.Marker=r})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("../lib/dom"),r=e("../lib/lang"),s=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=function(e){this.dom=o,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)};(function(){i.implement(this,a),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n<e+1;n++){if(this.showTabs)(i=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",i.textContent=r.stringRepeat(this.TAB_CHAR,n),t.push(i);else t.push(this.dom.createTextNode(r.stringRepeat(" ",n),this.element))}if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var i,o=this.showSpaces?" ace_invisible ace_invisible_space":"",s=this.showSpaces?r.stringRepeat(this.SPACE_CHAR,this.tabSize):r.stringRepeat(" ",this.tabSize),a=this.showTabs?" ace_invisible ace_invisible_tab":"",l=this.showTabs?r.stringRepeat(this.TAB_CHAR,this.tabSize):s;(i=this.dom.createElement("span")).className="ace_indent-guide"+o,i.textContent=s,this.$tabStrings[" "]=i,(i=this.dom.createElement("span")).className="ace_indent-guide"+a,i.textContent=l,this.$tabStrings["\t"]=i}},this.updateLines=function(e,t,n){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var i=Math.max(t,e.firstRow),o=Math.min(n,e.lastRow),r=this.element.childNodes,s=0,a=e.firstRow;a<i;a++){if(l=this.session.getFoldLine(a)){if(l.containsRow(i)){i=l.start.row;break}a=l.end.row}s++}for(var l,c=!1,u=(a=i,(l=this.session.getNextFoldLine(a))?l.start.row:1/0);a>u&&(a=l.end.row+1,u=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>o);){var h=r[s++];if(h){this.dom.removeChildren(h),this.$renderLine(h,a,a==u&&l),c&&(h.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var d=e.lineHeight*this.session.getRowLength(a)+"px";h.style.height!=d&&(c=!0,h.style.height=d)}a++}if(c)for(;s<this.$lines.cells.length;){var p=this.$lines.cells[s++];p.element.style.top=this.$lines.computeLineTop(p.row,e,this.session)+"px"}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=e.lastRow,i=t?t.lastRow:-1;if(!t||i<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var o=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);o>0;o--)this.$lines.shift();if(t.lastRow>e.lastRow)for(o=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);o>0;o--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,n){for(var i=[],r=t,s=this.session.getNextFoldLine(r),a=s?s.start.row:1/0;r>a&&(r=s.end.row+1,a=(s=this.session.getNextFoldLine(r,s))?s.start.row:1/0),!(r>n);){var l=this.$lines.createCell(r,e,this.session),c=l.element;this.dom.removeChildren(c),o.setStyle(c.style,"height",this.$lines.computeLineHeight(r,e,this.session)+"px"),o.setStyle(c.style,"top",this.$lines.computeLineTop(r,e,this.session)+"px"),this.$renderLine(c,r,r==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",i.push(l),r++}return i},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,i){for(var o,s=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,a=this.dom.createFragment(this.element),l=0;o=s.exec(i);){var c=o[1],u=o[2],h=o[3],d=o[4],p=o[5];if(this.showSpaces||!u){var f=l!=o.index?i.slice(l,o.index):"";if(l=o.index+o[0].length,f&&a.appendChild(this.dom.createTextNode(f,this.element)),c){var g=this.session.getScreenTabSize(t+o.index);a.appendChild(this.$tabStrings[g].cloneNode(!0)),t+=g-1}else if(u){if(this.showSpaces)(v=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",v.textContent=r.stringRepeat(this.SPACE_CHAR,u.length),a.appendChild(v);else a.appendChild(this.com.createTextNode(u,this.element))}else if(h){(v=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",v.textContent=r.stringRepeat(this.SPACE_CHAR,h.length),a.appendChild(v)}else if(d){t+=1,(v=this.dom.createElement("span")).style.width=2*this.config.characterWidth+"px",v.className=this.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",v.textContent=this.showSpaces?this.SPACE_CHAR:d,a.appendChild(v)}else if(p){t+=1,(v=this.dom.createElement("span")).style.width=2*this.config.characterWidth+"px",v.className="ace_cjk",v.textContent=p,a.appendChild(v)}}}if(a.appendChild(this.dom.createTextNode(l?i.slice(l):i,this.element)),this.$textToken[n.type])e.appendChild(a);else{var m="ace_"+n.type.replace(/\./g," ace_"),v=this.dom.createElement("span");"fold"==n.type&&(v.style.width=n.value.length*this.config.characterWidth+"px"),v.className=m,v.appendChild(a),e.appendChild(v)}return t+i.length},this.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);if(i<=0||i>=n)return t;if(" "==t[0]){for(var o=(i-=i%this.tabSize)/this.tabSize,r=0;r<o;r++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return t.substr(i)}if("\t"==t[0]){for(r=0;r<i;r++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0));return t.substr(i)}return t},this.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},this.$renderWrappedLine=function(e,t,n){var i=0,o=0,s=n[0],a=0,l=this.$createLineElement();e.appendChild(l);for(var c=0;c<t.length;c++){var u=t[c],h=u.value;if(0==c&&this.displayIndentGuides){if(i=h.length,!(h=this.renderIndentGuide(l,h,s)))continue;i-=h.length}if(i+h.length<s)a=this.$renderToken(l,a,u,h),i+=h.length;else{for(;i+h.length>=s;)a=this.$renderToken(l,a,u,h.substring(0,s-i)),h=h.substring(s-i),i=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(r.stringRepeat(" ",n.indent),this.element)),a=0,s=n[++o]||Number.MAX_VALUE;0!=h.length&&(i+=h.length,a=this.$renderToken(l,a,u,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(e,t){var n=0,i=t[0],o=i.value;this.displayIndentGuides&&(o=this.renderIndentGuide(e,o)),o&&(n=this.$renderToken(e,n,i,o));for(var r=1;r<t.length;r++){if(n+(o=(i=t[r]).value).length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,i,o);n=this.$renderToken(e,n,i,o)}},this.$renderOverflowMessage=function(e,t,n,i,o){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));var r=this.dom.createElement("span");r.className="ace_inline_button ace_keyword ace_toggle_wrap",r.textContent=o?"<hide>":"<click to see more...>",e.appendChild(r)},this.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var i=this.$getFoldLineTokens(t,n);else i=this.session.getTokens(t);var o=e;if(i.length){var r=this.session.getRowSplitData(t);if(r&&r.length){this.$renderWrappedLine(e,i,r);o=e.lastChild}else{o=e;this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.$renderSimpleLine(o,i)}}else this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o));if(this.showEOL&&o){n&&(t=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(s)}},this.$getFoldLineTokens=function(e,t){var n=this.session,i=[];var o=n.getTokens(e);return t.walk((function(e,t,r,s,a){null!=e?i.push({type:"fold",value:e}):(a&&(o=n.getTokens(t)),o.length&&function(e,t,n){for(var o=0,r=0;r+e[o].value.length<t;)if(r+=e[o].value.length,++o==e.length)return;for(r!=t&&((s=e[o].value.substring(t-r)).length>n-t&&(s=s.substring(0,n-t)),i.push({type:e[o].type,value:s}),r=t+s.length,o+=1);r<n&&o<e.length;){var s;(s=e[o].value).length+r>n?i.push({type:e[o].type,value:s.substring(0,n-r)}):i.push(e[o]),r+=s.length,o+=1}}(o,s,r))}),t.end.row,this.session.getLine(t.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(l.prototype),t.Text=l})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)i.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){i.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&i.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&setTimeout(function(){i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.top<t.maxHeight},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,o=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);n=0;for(var r=t.length;n<r;n++){var s=this.getPixelPosition(t[n].cursor,!0);if(!((s.top>e.height+e.offset||s.top<0)&&n>1)){var a=this.cursors[o++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,e,t[n],this.session):this.isCursorInView(s,e)?(i.setStyle(l,"display","block"),i.translate(a,s.left,s.top),i.setStyle(l,"width",Math.round(e.characterWidth)+"px"),i.setStyle(l,"height",e.lineHeight+"px")):i.setStyle(l,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=s,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/dom"),r=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,a=function(e){this.element=o.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=o.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,r.addListener(this.element,"scroll",this.onScroll.bind(this)),r.addListener(this.element,"mousedown",r.preventDefault)};(function(){i.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=o.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};i.inherits(l,a),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>32768?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(l.prototype);var c=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(c,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(c.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var i=e("./lib/event"),o=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(i.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(o.prototype),t.RenderLoop=o})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/oop"),o=e("../lib/dom"),r=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c="function"==typeof ResizeObserver,u=200,h=t.FontMetrics=function(e){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=r.stringRepeat("X",256),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()};(function(){i.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=s.onIdle((function t(){e.checkForSizeChanges(),s.onIdle(t,500)}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/256};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.textContent=r.stringRepeat(e,256),this.$main.getBoundingClientRect().width/256},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=o.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},this.transformCoordinates=function(e,t){e&&(e=r(1/this.$getZoom(this.el),e));function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function o(e,t){return[e[0]+t[0],e[1]+t[1]]}function r(e,t){return[e*t[0],e*t[1]]}function s(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),l=s(this.els[1]),c=s(this.els[2]),h=s(this.els[3]),d=n(i(h,l),i(h,c),i(o(l,c),o(h,a))),p=r(1+d[0],i(l,a)),f=r(1+d[1],i(c,a));if(t){var g=t,m=d[0]*g[0]/u+d[1]*g[1]/u+1,v=o(r(g[0],p),r(g[1],f));return o(r(1/m/u,v),a)}var b=i(e,a),y=n(i(p,r(d[0],b)),i(f,r(d[1],b)),b);return r(u,y)}}).call(h.prototype)})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/dom"),r=e("./config"),s=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,c=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,d=e("./renderloop").RenderLoop,p=e("./layer/font_metrics").FontMetrics,f=e("./lib/event_emitter").EventEmitter,g='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',m=e("./lib/useragent"),v=m.isIE;o.importCssString(g,"ace_editor.css");var b=function(e,t){var n=this;this.container=e||o.createElement("div"),o.addCssClass(this.container,"ace_editor"),o.HI_DPI&&o.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var i=this.$textLayer=new l(this.content);this.canvas=i.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new p(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!m.isIOS,this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),r.resetOptions(this),r._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,i.implement(this,f),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),o.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var o=this.container;i||(i=o.clientHeight||o.scrollHeight),n||(n=o.clientWidth||o.scrollWidth);var r=this.$updateCachedSize(e,t,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(r|this.$changes,!0):this.$loop.schedule(r|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,i){i-=this.$extraHeight||0;var r=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(i&&(e||s.height!=i)&&(s.height=i,r|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",r|=this.CHANGE_SCROLL),n&&(e||s.width!=n)){r|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,o.setStyle(this.scrollBarH.element.style,"left",t+"px"),o.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";o.setStyle(this.scrollBarH.element.style,"right",l),o.setStyle(this.scroller.style,"right",l),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(r|=this.CHANGE_FULL)}return s.$dirty=!n||!i,r&&this._signal("resize",a),r},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=o.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var i=this.layerConfig,r=n.top,s=n.left;r-=i.offset;var a=t&&t.useTextareaForIME?this.lineHeight:v?0:1;if(r<0||r>i.height-a)o.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-a;if(t)if(t.useTextareaForIME){var u=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else r+=this.lineHeight+2;else r+=this.lineHeight;(s-=this.scrollLeft)>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,o.setStyle(e,"height",a+"px"),o.setStyle(e,"width",l+"px"),o.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(r,c))}}}else o.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,i){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|i,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,o.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-o.top),this.updateFull()},this.setMargin=function(e,t,n,i){var o=this.margin;o.top=0|e,o.bottom=0|t,o.right=0|i,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;i>0&&(this.scrollTop=i,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-n.offset);var r=n.width+2*this.$padding+"px",s=n.minHeight+"px";o.setStyle(this.content.style,"width",r),o.setStyle(this.content.style,"height",s)}if(e&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(n):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var o=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,o,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,o=this.$getLongestLine(),r=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),s=this.$horizScroll!==r;s&&(this.$horizScroll=r,this.scrollBarH.setVisible(r));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=c;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,i-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+u.right)));var h=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+c<0||this.scrollTop>u.top),d=a!==h;d&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var p,f,g=this.scrollTop%this.lineHeight,m=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-g)/this.lineHeight)),b=v+m,y=this.lineHeight;v=e.screenToDocumentRow(v,0);var w=e.getFoldLine(v);w&&(v=w.start.row),p=e.documentToScreenRow(v,0),f=e.getRowLength(v)*y,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(b)*y+f,g=this.scrollTop-p*y;var x=0;return(this.layerConfig.width!=o||s)&&(x=this.CHANGE_H_SCROLL),(s||d)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:v,firstRowScreen:p,lastRow:b,lineHeight:y,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:g,gutterOffset:y?Math.max(0,Math.ceil((g+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),x},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||t<n.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)}},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),o=i.left,r=i.top,s=n&&n.top||0,a=n&&n.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>r?(t&&l+s>r+this.lineHeight&&(r-=t*this.$size.scrollerHeight),0===r&&(r=-this.scrollMargin.top),this.session.setScrollTop(r)):l+this.$size.scrollerHeight-a<r+this.lineHeight&&(t&&l+this.$size.scrollerHeight-a<r-this.lineHeight&&(r+=t*this.$size.scrollerHeight),this.session.setScrollTop(r+this.lineHeight+a-this.$size.scrollerHeight));var c=this.scrollLeft;c>o?(o<this.$padding+2*this.layerConfig.characterWidth&&(o=-this.scrollMargin.left),this.session.setScrollLeft(o)):c+this.$size.scrollerWidth<o+this.characterWidth?this.session.setScrollLeft(Math.round(o+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&o-c<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),i=this.$size.scrollerHeight-this.lineHeight,o=n.top-i*(t||0);return this.session.setScrollTop(o),o},this.STEPS=8,this.$calcSteps=function(e,t){var n,i,o=0,r=this.STEPS,s=[];for(o=0;o<r;++o)s.push((n=o/this.STEPS,i=e,(t-e)*(Math.pow(n-1,3)+1)+i));return s},this.scrollToLine=function(e,t,n,i){var o=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(o-=this.$size.scrollerHeight/2);var r=this.scrollTop;this.session.setScrollTop(o),!1!==n&&this.animateScrolling(r,i)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var i=this;if(e!=n){if(this.$scrollAnimation){var o=this.$scrollAnimation.steps;if(o.length&&(e=o[0])==n)return}var r=i.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:r},clearInterval(this.$timer),i.session.setScrollTop(r.shift()),i.session.$scrollTop=n,this.$timer=setInterval((function(){if(!i.session)return clearInterval(i.$timer);r.length?(i.session.setScrollTop(r.shift()),i.session.$scrollTop=n):null!=n?(i.session.$scrollTop=-1,i.session.setScrollTop(n),n=null):(i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,t&&t())}),10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,r=o/this.characterWidth,s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(r):Math.round(r);return{row:s,column:a,side:r-a>0?1:-1,offsetX:o}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,r=o/this.characterWidth,s=this.$blockCursor?Math.floor(r):Math.round(r),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),o)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),o=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),r=i.row*this.lineHeight;return{pageX:n.left+o-this.scrollLeft,pageY:n.top+r-this.scrollTop}},this.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(e,t,n,i){var o=this.session;o.bgTokenizer.lines[n]=null;var r={type:t,value:e},s=o.getTokens(n);if(null==i)s.push(r);else for(var a=0,l=0;l<s.length;l++){var c=s[l];if(i<=(a+=c.value.length)){var u=c.value.length-(a-i),h=c.value.slice(0,u),d=c.value.slice(u);s.splice(l,1,{type:c.type,value:h},r,{type:c.type,value:d});break}}this.updateLines(n,n)},this.removeExtraToken=function(e,t){this.updateLines(e,e)},this.setTheme=function(e,t){var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)s(e);else{var i=e||this.$options.theme.initialValue;r.loadModule(["theme",i],s)}function s(i){if(n.$themeId!=e)return t&&t();if(!i||!i.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");i.$id&&(n.$themeId=i.$id),o.importCssString(i.cssText,i.cssClass,n.container),n.theme&&o.removeCssClass(n.container,n.theme.cssClass);var r="padding"in i?i.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&r!=n.$padding&&n.setPadding(r),n.$theme=i.cssClass,n.theme=i,o.addCssClass(n.container,i.cssClass),o.setCssClass(n.container,"ace_dark",i.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:i}),t&&t()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){o.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){o.removeCssClass(this.container,e)},this.setCursorStyle=function(e){o.setStyle(this.scroller.style,"cursor",e)},this.setMouseCursor=function(e){o.setStyle(this.scroller.style,"cursor",e)},this.attachToShadowRoot=function(){o.importCssString(g,"ace_editor.css",this.container)},this.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent=""}}).call(b.prototype),r.defineOptions(b.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){o.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!m.isMobile&&!m.isIE}}),t.VirtualRenderer=b})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("../lib/net"),r=e("../lib/event_emitter").EventEmitter,s=e("../config");function a(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+o.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)}var l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,r),this.$createWorkerFromOldConfig=function(t,n,i,o,r){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)o=o||s.moduleUrl(n,"worker");else{var l=this.$normalizePath;o=o||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=a(o),r&&this.send("importScripts",r),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:i}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return o.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,t.push(i)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype);t.UIWorkerClient=function(e,t,n){var i=null,o=!1,a=Object.create(r),c=[],u=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),i&&(o?setTimeout(h):h())}});u.setEmitSync=function(e){o=e};var h=function(){var e=c.shift();e.command?i[e.command].apply(i,e.args):e.event&&a._signal(e.event,e.data)};return a.postMessage=function(e){u.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],(function(e){for(i=new e[n](a);c.length;)h()})),u},t.WorkerClient=l,t.createWorker=a})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("./range").Range,o=e("./lib/event_emitter").EventEmitter,r=e("./lib/oop"),s=function(e,t,n,i,o,r){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout((function(){s.onCursorChange()}))},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){r.implement(this,o),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=n.addMarker(new i(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,o=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,r=t.start.column-this.pos.column;if(this.updateAnchors(e),o&&(this.length+=n),o&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+r};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+r};this.doc.remove(new i(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,o){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),o,null,!1)};n(this.pos,this.mainClass);for(var o=this.others.length;o--;)n(this.others[o],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(s.prototype),t.PlaceHolder=s})),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/event"),o=e("../lib/useragent");function r(e,t){return e.row==t.row&&e.column==t.column}t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,s=t.shiftKey,a=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(a&&o.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)e.editor.textInput.onContextMenu(e.domEvent);else if(a||n||l){if(0===c){var u,h=e.editor,d=h.selection,p=h.inMultiSelectMode,f=e.getDocumentPosition(),g=d.getCursor(),m=e.inSelection()||d.isEmpty()&&r(f,g),v=e.x,b=e.y,y=h.session,w=h.renderer.pixelToScreenCoordinates(v,b),x=w;if(h.$mouseHandler.$enableJumpToDef)a&&n||l&&n?u=s?"block":"add":n&&h.$blockSelectEnabled&&(u="block");else if(l&&!n){if(u="add",!p&&s)return}else n&&h.$blockSelectEnabled&&(u="block");if(u&&o.isMac&&t.ctrlKey&&h.$mouseHandler.cancelContextMenu(),"add"==u){if(!p&&m)return;if(!p){var S=d.toOrientedRange();h.addSelectionMarker(S)}var C=d.rangeList.rangeAtPoint(f);h.inVirtualSelectionMode=!0,s&&(C=null,S=d.ranges[0]||S,h.removeSelectionMarker(S)),h.once("mouseup",(function(){var e=d.toOrientedRange();C&&e.isEmpty()&&r(C.cursor,e.cursor)?d.substractPoint(e.cursor):(s?d.substractPoint(S.cursor):S&&(h.removeSelectionMarker(S),d.addRange(S)),d.addRange(e)),h.inVirtualSelectionMode=!1}))}else if("block"==u){var k;e.stop(),h.inVirtualSelectionMode=!0;var E=[],$=function(){var e=h.renderer.pixelToScreenCoordinates(v,b),t=y.screenToDocumentPosition(e.row,e.column,e.offsetX);r(x,e)&&r(t,d.lead)||(x=e,h.selection.moveToPosition(t),h.renderer.scrollCursorIntoView(),h.removeSelectionMarkers(E),E=d.rectangularRangeBlock(x,w),h.$mouseHandler.$clickSelection&&1==E.length&&E[0].isEmpty()&&(E[0]=h.$mouseHandler.$clickSelection.clone()),E.forEach(h.addSelectionMarker,h),h.updateSelectionMarkers())};p&&!l?d.toSingleRange():!p&&l&&(k=d.toOrientedRange(),h.addSelectionMarker(k)),s?w=y.documentToScreenPosition(d.lead):d.moveToPosition(f),x={row:-1,column:-1};var _=$;i.capture(h.container,(function(e){v=e.clientX,b=e.clientY}),(function(e){$(),clearInterval(A),h.removeSelectionMarkers(E),E.length||(E=[d.toOrientedRange()]),k&&(h.removeSelectionMarker(k),d.toSingleRange(k));for(var t=0;t<E.length;t++)d.addRange(E[t]);h.inVirtualSelectionMode=!1,h.$mouseHandler.$clickSelection=null}));var A=setInterval((function(){_()}),20);return e.preventDefault()}}}else 0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}})),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],(function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.rangeCount>1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var i=e("./range_list").RangeList,o=e("./range").Range,r=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var u=new(0,e("./search").Search);var h=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(h.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n<e.length;n++){var i=e[n],r=i.start.row,s=i.end.row;if(r===s)t.push(i.clone());else{for(t.push(new o(r,i.start.column,r,this.session.getLine(r).length));++r<s;)t.push(this.getLineRange(r,!0));t.push(new o(s,0,s,i.end.column))}0!=n||this.isBackwards()||(t=t.reverse())}this.toSingleRange();for(n=t.length;n--;)this.addRange(t[n])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],n=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.cursor),r=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(i,r).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],r=e.column<t.column;if(r)var s=e.column,a=t.column,l=e.offsetX,c=t.offsetX;else s=t.column,a=e.column,l=t.offsetX,c=e.offsetX;var u,h,d,p=e.row<t.row;if(p)var f=e.row,g=t.row;else f=t.row,g=e.row;s<0&&(s=0),f<0&&(f=0),f==g&&(n=!0);for(var m=f;m<=g;m++){var v=o.fromPoints(this.session.screenToDocumentPosition(m,s,l),this.session.screenToDocumentPosition(m,a,c));if(v.isEmpty()){if(u&&(h=v.end,d=u,h.row==d.row&&h.column==d.column))break;u=v.end}v.cursor=r?v.start:v.end,i.push(v)}if(p&&i.reverse(),!n){for(var b=i.length-1;i[b].isEmpty()&&b>0;)b--;if(b>0)for(var y=0;i[y].isEmpty();)y++;for(var w=b;w>=y;w--)i[w].isEmpty()&&i.splice(w,1)}return i}}.call(r.prototype);var d=e("./editor").Editor;function p(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(c.defaultCommands),function(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;function i(t){n&&(e.renderer.setMouseCursor(""),n=!1)}a.addListener(t,"keydown",(function(t){var o=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&o?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),e),a.addListener(t,"keyup",i,e),a.addListener(t,"blur",i,e)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var o=t.indexOf(i);-1!=o&&t.splice(o,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,o=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,u=(o?l:c).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var h=l._eventRegistry;l._eventRegistry={};var d=new r(a);this.inVirtualSelectionMode=!0;for(var p=u.length;p--;){if(s)for(;p>0&&u[p].start.row==u[p-1].end.row;)p--;d.fromOrientedRange(u[p]),d.index=p,this.selection=a.selection=d;var f=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===f||(i=f),d.toOrientedRange(u[p])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=h,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var g=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),g&&g.from==g.to&&this.renderer.animateScrolling(g.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;i<t.length;i++)n.push(this.session.getTextRange(t[i]));var o=this.session.getDocument().getNewLineCharacter();(e=n.join(o)).length==(n.length-1)*o.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var i=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;i.row!=t.row||this.session.$clipPositionToDocument(i.row,i.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(e,t,n){if((t=t||{}).needle=e||t.needle,null==t.needle){var i=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(i)}this.$search.set(t);var o=this.$search.findAll(this.session);if(!o.length)return 0;var r=this.multiSelect;n||r.toSingleRange(o[0]);for(var s=o.length;s--;)r.addRange(o[s],!0);return i&&r.rangeList.rangeAtPoint(i.start)&&r.addRange(i,!0),o.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),i=n.cursor==n.end,r=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(r.column=this.selection.$desiredColumn);var s,a=this.session.screenToDocumentPosition(r.row+e,r.column);if(n.isEmpty())c=a;else var l=this.session.documentToScreenPosition(i?n.end:n.start),c=this.session.screenToDocumentPosition(l.row+e,l.column);i?(s=o.fromPoints(a,c)).cursor=s.start:(s=o.fromPoints(c,a)).cursor=s.end;if(s.desiredColumn=r.column,this.selection.inMultiSelectMode){if(t)var u=n.cursor}else this.selection.addRange(n);this.selection.addRange(s),u&&this.selection.substractPoint(u)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,i=n.ranges,o=i.length;o--;){if((a=i[o]).isEmpty()){var r=t.getWordRange(a.start.row,a.start.column);a.start.row=r.start.row,a.start.column=r.start.column,a.end.row=r.end.row,a.end.column=r.end.column}}n.mergeOverlappingRanges();var s=[];for(o=i.length;o--;){var a=i[o];s.unshift(t.getTextRange(a))}e<0?s.unshift(s.pop()):s.push(s.shift());for(o=i.length;o--;){r=(a=i[o]).clone();t.replace(a,s[o]),a.start.row=r.start.row,a.start.column=r.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(e,t,n){var i=this.session,o=i.multiSelect.toOrientedRange();if(!o.isEmpty()||((o=i.getWordRange(o.start.row,o.start.column)).cursor=-1==e?o.start:o.end,this.multiSelect.addRange(o),!n)){var r=i.getTextRange(o),s=function(e,t,n){return u.$options.wrap=!0,u.$options.needle=t,u.$options.backwards=-1==n,u.find(e)}(i,r,e);s&&(s.cursor=-1==e?s.start:s.end,this.session.unfold(s),this.multiSelect.addRange(s),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(o.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,i=-1,r=n.filter((function(e){if(e.cursor.row==i)return!0;i=e.cursor.row}));if(n.length&&r.length!=n.length-1){r.forEach((function(e){t.substractPoint(e.cursor)}));var s=0,a=1/0,c=n.map((function(t){var n=t.cursor,i=e.getLine(n.row).substr(n.column).search(/\S/g);return-1==i&&(i=0),n.column>s&&(s=n.column),i<a&&(a=i),i}));n.forEach((function(t,n){var i=t.cursor,r=s-i.column,u=c[n]-a;r>u?e.insert(i,l.stringRepeat(" ",r-u)):e.remove(new o(i.row,i.column,i.row,i.column-r+u)),t.start.column=t.end.column=s,t.start.row=t.end.row=i.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),h=u.start.row,d=u.end.row,p=h==d;if(p){var f,g=this.session.getLength();do{f=this.session.getLine(d)}while(/[=:]/.test(f)&&++d<g);do{f=this.session.getLine(h)}while(/[=:]/.test(f)&&--h>0);h<0&&(h=0),d>=g&&(d=g-1)}var m=this.session.removeFullLines(h,d);m=this.$reAlignText(m,p),this.session.insert({row:h,column:0},m.join("\n")+"\n"),p||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,i,o,r=!0,s=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,i=t[2].length,o=t[3].length,t):(n+i+o!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(r=!1),n>t[1].length&&(n=t[1].length),i<t[2].length&&(i=t[2].length),o>t[3].length&&(o=t[3].length),t):[e]})).map(t?c:r?s?function(e){return e[2]?a(n+i-e[2].length)+e[2]+a(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?a(n)+e[2]+a(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(n)+e[2]+a(i-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=p,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){p(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../../range").Range,o=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var o=/\S/,r=e.getLine(t),s=r.search(o);if(-1!=s){for(var a=n||r.length,l=e.getLength(),c=t,u=t;++t<l;){var h=e.getLine(t).search(o);if(-1!=h){if(h<=s){var d=e.getTokenAt(t,0);if(!d||"string"!==d.type)break}u=t}}if(u>c){var p=e.getLine(u).length;return new i(c,a,u,p)}}},this.openingBracketBlock=function(e,t,n,o,r){var s={row:n,column:o+1},a=e.$findClosingBracket(t,s,r);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,o,r){var s={row:n,column:o},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,i.fromPoints(a,s)}}).call(o.prototype)})),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./lib/dom");function o(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var i=e.data,o=i.start.row,r=i.end.row,s="add"==e.action,a=o+1;a<r;a++)n[a]&&(n[a].hidden=s);n[r]&&(s?n[o]?n[r].hidden=s:n[o]=n[r]:(n[o]==n[r]&&(n[o]=void 0),n[r].hidden=s))}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,i=e.end.row-n;if(0===i);else if("remove"==e.action){var o=t.splice(n+1,i);!t[n]&&o[o.length-1]&&(t[n]=o.pop()),o.forEach((function(e){e&&this.removeLineWidget(e)}),this),this.$updateRows()}else{var r=new Array(i);t[n]&&null!=t[n].column&&e.start.column>t[n].column&&n++,r.unshift(n,0),t.splice.apply(t,r),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},this.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var o=this.session.lineWidgets;e.row!=n.end.row||o[n.start.row]?e.hidden=!0:o[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var o=1/0,r=0;r<n.length;r++){var s=n[r];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,t.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/i.characterWidth));var a=s.h/i.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row))<0&&(a=0),s.rowCount!=a&&(s.rowCount=a,s.row<o&&(o=s.row))}}o!=1/0&&(this.session._emit("changeFold",{data:{start:{row:o}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var n=t.layerConfig,i=this.session.lineWidgets;if(i){for(var o=Math.min(this.firstRow,n.firstRow),r=Math.max(this.lastRow,n.lastRow,i.length);o>0&&!i[o];)o--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=o;s<=r;s++){var a=i[s];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(o.prototype),t.LineWidgets=o})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";var i=e("../line_widgets").LineWidgets,o=e("../lib/dom"),r=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),a=s.row,l=n.widgetManager.getWidgetsAtRow(a).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():a-=t;var c,u=function(e,t,n){var i=e.getAnnotations().sort(r.comparePoints);if(i.length){var o=function(e,t,n){for(var i=0,o=e.length-1;i<=o;){var r=i+o>>1,s=n(t,e[r]);if(s>0)i=r+1;else{if(!(s<0))return r;o=r-1}}return-(i+1)}(i,{row:t,column:-1},r.comparePoints);o<0&&(o=-o-1),o>=i.length?o=n>0?0:i.length-1:0===o&&n<0&&(o=i.length-1);var s=i[o];if(s&&n){if(s.row===t){do{s=i[o+=n]}while(s&&s.row===t);if(!s)return i.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=i[o+=n]}while(s&&s.row==t);return a.length&&a}}}(n,a,t);if(u){var h=u[0];s.column=(h.pos&&"number"!=typeof h.column?h.pos.sc:h.column)||0,s.row=h.row,c=e.renderer.$gutterLayer.$annotations[s.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var d={row:s.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},p=d.el.appendChild(o.createElement("div")),f=d.el.appendChild(o.createElement("div"));f.className="error_widget_arrow "+c.className;var g=e.renderer.$cursorLayer.getPixelPosition(s).left;f.style.left=g+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",p.className="error_widget "+c.className,p.innerHTML=c.text.join("<br>"),p.appendChild(o.createElement("div"));var m=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},o.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")})),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],(function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var o=e("./lib/dom"),r=e("./lib/event"),s=e("./range").Range,a=e("./editor").Editor,l=e("./edit_session").EditSession,c=e("./undomanager").UndoManager,u=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.define=n(49),t.edit=function(e,n){if("string"==typeof e){var i=e;if(!(e=document.getElementById(i)))throw new Error("ace.edit can't find div #"+i)}if(e&&e.env&&e.env.editor instanceof a)return e.env.editor;var s="";if(e&&/input|textarea/i.test(e.tagName)){var l=e;s=l.value,e=o.createElement("pre"),l.parentNode.replaceChild(e,l)}else e&&(s=e.textContent,e.innerHTML="");var c=t.createEditSession(s),h=new a(new u(e),c,n),d={document:c,editor:h,onResize:h.resize.bind(h,null)};return l&&(d.textarea=l),r.addListener(window,"resize",d.onResize),h.on("destroy",(function(){r.removeListener(window,"resize",d.onResize),d.editor.container.env=null})),h.container.env=h.env=d,h},t.createEditSession=function(e,t){var n=new l(e,t);return n.setUndoManager(new c),n},t.Range=s,t.Editor=a,t.EditSession=l,t.UndoManager=c,t.VirtualRenderer=u,t.version=t.config.version})),ace.require(["ace/ace"],(function(n){for(var o in n&&(n.config.init(!0),n.define=ace.define),window.ace||(window.ace=n),n)n.hasOwnProperty(o)&&(window.ace[o]=n[o]);window.ace.default=window.ace,"object"==i(e)&&"object"==i(t)&&e&&(e.exports=window.ace)}))}).call(this,n(4)(e))},function(e,t,n){var i,o;"undefined"!=typeof window&&window,void 0===(o="function"==typeof(i=function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},i=n[e]=n[e]||[];return-1==i.indexOf(t)&&i.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var i=n.indexOf(t);return-1!=i&&n.splice(i,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var i=this._onceEvents&&this._onceEvents[e],o=0;o<n.length;o++){var r=n[o];i&&i[r]&&(this.off(e,r),delete i[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e})?i.call(t,n,t,e):i)||(e.exports=o)},function(e,t,n){var i,o;function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
1 |
+
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=267)}([function(e,t){e.exports=React},function(e,t,n){e.exports=n(85)()},function(e,t,n){var i;function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
2 |
Â
/*!
|
3 |
Â
Copyright (c) 2017 Jed Watson.
|
4 |
Â
Licensed under the MIT License (MIT), see
|
5 |
Â
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var n=t.length,i=0;i<n;++i)r(e,t[i])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var i=/\s+/;function r(e,r){if(r){var s=o(r);"string"===s?function(e,t){for(var n=t.split(i),o=n.length,r=0;r<o;++r)e[n[r]]=!0}(e,r):Array.isArray(r)?t(e,r):"object"===s?function(e,t){for(var i in t)n.call(t,i)&&(e[i]=!!t[i])}(e,r):"number"===s&&function(e,t){e[t]=!0}(e,r)}}return function(){for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];var r=new e;t(r,i);var s=[];for(var a in r)r[a]&&s.push(a);return s.join(" ")}}();e.exports?(r.default=r,e.exports=r):"object"===o(n(47))&&n(47)?void 0===(i=function(){return r}.apply(t,[]))||(e.exports=i):window.classNames=r}()},function(e,t,n){var i,o,r,s;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}s=function(e){"use strict";function t(e,t,n,i){var o,r=!1,s=0;function a(){o&&clearTimeout(o)}function l(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var h=this,d=Date.now()-s;function p(){s=Date.now(),n.apply(h,c)}function f(){o=void 0}r||(i&&!o&&p(),a(),void 0===i&&d>e?p():!0!==t&&(o=setTimeout(i?f:p,void 0===i?e-d:e)))}return"boolean"!=typeof t&&(i=n,n=t,t=void 0),l.cancel=function(){a(),r=!0},l}e.debounce=function(e,n,i){return void 0===i?t(e,n,!1):t(e,i,!1!==n)},e.throttle=t,Object.defineProperty(e,"__esModule",{value:!0})},"object"===a(t)&&void 0!==e?s(t):(o=[t],void 0===(r="function"==typeof(i=s)?i.apply(t,o):i)||(e.exports=r))},function(e,t,n){"use strict";t.a=function(e){var t=[],n=null,i=function(){for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];t=o,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return i.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},i}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(55),r="object"==("undefined"==typeof self?"undefined":i(self))&&self&&self.Object===Object&&self,s=o||r||Function("return this")();e.exports=s},function(e,t){e.exports=ReactDOM},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){var t=n(e);return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";e.exports=function(e,t,n,i,o,r,s,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,i,o,r,s,a],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){var i=n(104),o=n(109);e.exports=function(e,t){var n=o(e,t);return i(n)?n:void 0}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return null!=e&&"object"==n(e)}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var i=n(15),o=n(105),r=n(106),s=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):r(e)}},function(e,t,n){var i=n(33),o=n(52);e.exports=function(e,t,n,r){var s=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var c=t[a],u=r?r(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),s?o(n,c,u):i(n,c,u)}return n}},function(e,t,n){var i=n(6).Symbol;e.exports=i},function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=n(0),a=c(s),l=c(n(1));function c(e){return e&&e.__esModule?e:{default:e}}var u={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},h=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],d=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},p=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),f=function(){return p?"_"+Math.random().toString(36).substr(2,12):void 0},g=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==i(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||f()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+i(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||f()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(d(e,this.sizer),this.placeHolderSizer&&d(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return p&&e?a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=o({},this.props.style);t.display||(t.display="inline-block");var n=o({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),i=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(this.props,[]);return function(e){h.forEach((function(t){return delete e[t]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",o({},i,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:u},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:u},this.props.placeholder):null)}}]),t}(s.Component);g.propTypes={className:l.default.string,defaultValue:l.default.any,extraWidth:l.default.oneOfType([l.default.number,l.default.string]),id:l.default.string,injectStyles:l.default.bool,inputClassName:l.default.string,inputRef:l.default.func,inputStyle:l.default.object,minWidth:l.default.oneOfType([l.default.number,l.default.string]),onAutosize:l.default.func,onChange:l.default.func,placeholder:l.default.string,placeholderIsMinWidth:l.default.bool,style:l.default.object,value:l.default.any},g.defaultProps={minWidth:1,injectStyles:!0},t.default=g},function(e,t,n){"use strict";var i=n(0);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var r=i.createElement("rect",{width:100,height:100,rx:50,fill:"currentColor"}),s=i.createElement("path",{d:"M57.531 69.5L70.244 33H58.447L47 69.5h10.531z",fill:"url(#icon-gutenberg_svg__paint0_linear)"}),a=i.createElement("path",{d:"M42.713 69.5L30 33h11.797l11.447 36.5H42.713z",fill:"#fff"}),l=i.createElement("defs",null,i.createElement("linearGradient",{id:"icon-gutenberg_svg__paint0_linear",x1:64.5,y1:33,x2:33,y2:77,gradientUnits:"userSpaceOnUse"},i.createElement("stop",{stopColor:"#fff"}),i.createElement("stop",{offset:1,stopColor:"#fff",stopOpacity:0})));t.a=function(e){return i.createElement("svg",o({width:100,height:100,viewBox:"0 0 100 100",fill:"none"},e),r,s,a,l)}},function(e,t,n){"use strict";function i(e,t){var n=t[e];if(void 0===n&&/[\[\.]/g.test(e)){var i=e.split("."),o=[];if(i&&i.length&&(i.forEach((function(e){if(/[\[]/g.test(e)){var t=e.split(/[\[\]]/g);t&&t.length&&t.forEach((function(e){""!==e&&("".concat(parseInt(e,10))===e?o.push(parseInt(e,10)):o.push(e))}))}else o.push(e)})),o.length)){var r=t;o.forEach((function(e){r=r&&void 0!==r[e]?r[e]:void 0})),n=r}}return n}n.d(t,"a",(function(){return i}))},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(i=window)}e.exports=i},function(e,t,n){var i=n(54),o=n(60);e.exports=function(e){return null!=e&&o(e.length)&&!i(e)}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var i=n(62),o=n(122),r=n(20);e.exports=function(e){return r(e)?i(e):o(e)}},function(e,t,n){function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(13),r=n(11);e.exports=function(e){return"symbol"==i(e)||r(e)&&"[object Symbol]"==o(e)}},function(e,t,n){var i=n(141),o=n(142),r=n(143),s=n(144),a=n(145);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=r,l.prototype.has=s,l.prototype.set=a,e.exports=l},function(e,t,n){var i=n(34);e.exports=function(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}},function(e,t,n){var i=n(10)(Object,"create");e.exports=i},function(e,t,n){var i=n(159);e.exports=function(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(18);function o(e,t,n){var i=!0;switch(t){case"==":i=e==n;break;case"===":i=e===n;break;case"!=":i=e!=n;break;case"!==":i=e!==n;break;case"*=":i=-1!==e.indexOf(n);break;case">=":i=e>=n;break;case"<=":i=e<=n;break;case">":i=e>n;break;case"<":i=e<n;break;case"&&":case"AND":i=e&&n;break;case"||":case"OR":i=e||n;break;default:i=e}return i}function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"AND",s="AND"===n,a=s?"OR":"AND";return e.forEach((function(e){if(Array.isArray(e)&&!e.control)s=o(s,n,r(e,t,a));else if(e.control){var l=Object(i.a)(e.control,t),c=e.operator||"==",u=void 0!==e.value?e.value:"true";"true"===l?l=!0:"false"===l&&(l=!1),"true"===u?u=!0:"false"===u&&(u=!1),s=o(s,n,o(l,c,u))}})),s}},function(e,t,n){(function(e){function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function e(t,n,i){"string"==typeof t?(2==arguments.length&&(i=n),e.modules[t]||(e.payloads[t]=i,e.modules[t]=null)):e.original?e.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n,i,o=function(e,t,n){if("string"==typeof t){var i=s(e,t);if(null!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var o=[],a=0,l=t.length;a<l;++a){var c=s(e,t[a]);if(null==c&&r.original)return;o.push(c)}return n&&n.apply(null,o)||!0}},r=function e(t,n){var i=o("",t,n);return null==i&&e.original?e.original.apply(this,arguments):i},s=function(e,n){n=function e(t,n){if(-1!==n.indexOf("!")){var i=n.split("!");return e(t,i[0])+"!"+e(t,i[1])}if("."==n.charAt(0))for(n=t.split("/").slice(0,-1).join("/")+"/"+n;-1!==n.indexOf(".")&&o!=n;){var o=n;n=n.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return n}(e,n);var i=t.modules[n];if(!i){if("function"==typeof(i=t.payloads[n])){var r={},s={id:n,uri:"",exports:r,packaged:!0};r=i((function(e,t){return o(n,e,t)}),r,s)||s.exports,t.modules[n]=r,delete t.payloads[n]}i=t.modules[n]=r||i}return i};i=e,(n="ace")&&(e[n]||(e[n]={}),i=e[n]),i.define&&i.define.packaged||(t.original=i.define,i.define=t,i.define.packaged=!0),i.require&&i.require.packaged||(r.original=i.require,i.require=r,i.require.packaged=!0)}(),ace.define("ace/lib/fixoldbrowsers",["require","exports","module"],(function(e,t,n){"use strict";"undefined"==typeof Element||Element.prototype.remove||Object.defineProperty(Element.prototype,"remove",{enumerable:!1,writable:!0,configurable:!0,value:function(){this.parentNode&&this.parentNode.removeChild(this)}})})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var o="object"==("undefined"==typeof navigator?"undefined":i(navigator))?navigator:{},r=(/mac|win|linux/i.exec(o.platform)||["other"])[0].toLowerCase(),s=o.userAgent||"",a=o.appName||"";t.isWin="win"==r,t.isMac="mac"==r,t.isLinux="linux"==r,t.isIE="Microsoft Internet Explorer"==a||a.indexOf("MSAppHost")>=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=s.match(/ Gecko\/\d+/),t.isOpera="object"==("undefined"==typeof opera?"undefined":i(opera))&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(s.split(" Edge/")[1])||void 0,t.isAIR=s.indexOf("AdobeAIR")>=0,t.isAndroid=s.indexOf("Android")>=0,t.isChromeOS=s.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var o=e("./useragent");if(t.buildDom=function e(t,n,o){if("string"==typeof t&&t){var r=document.createTextNode(t);return n&&n.appendChild(r),r}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var s=[],a=0;a<t.length;a++){var l=e(t[a],n,o);l&&s.push(l)}return s}var c=document.createElement(t[0]),u=t[1],h=1;u&&"object"==i(u)&&!Array.isArray(u)&&(h=2);for(a=h;a<t.length;a++)e(t[a],c,o);return 2==h&&Object.keys(u).forEach((function(e){var t=u[e];"class"===e?c.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?c[e]=t:"ref"===e?o&&(o[t]=c):null!=t&&c.setAttribute(e,t)})),n&&n.appendChild(c),c},t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var i=n.indexOf(t);if(-1==i)break;n.splice(i,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),i=!0;;){var o=n.indexOf(t);if(-1==o)break;i=!1,n.splice(o,1)}return i&&n.push(t),e.className=n.join(" "),i},t.setCssClass=function(e,n,i){i?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,i=0;if(n=(t=t||document).querySelectorAll("style"))for(;i<n.length;)if(n[i++].id===e)return!0},t.importCssString=function(e,n,i){var o=i;i&&i.getRootNode&&(o=i.getRootNode())&&o!=i||(o=document);var r=o.ownerDocument||o;if(n&&t.hasCssString(n,o))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var s=t.createElement("style");s.appendChild(r.createTextNode(e)),n&&(s.id=n),o==r&&(o=t.getDocumentHead(r)),o.insertBefore(s,o.firstChild)},t.importCssStylsheet=function(e,n){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(n))},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=t.createElement("ace_outer"),o=i.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",i.appendChild(n);var r=e.documentElement;r.appendChild(i);var s=n.offsetWidth;o.overflow="scroll";var a=n.offsetWidth;return s==a&&(a=i.clientWidth),r.removeChild(i),s-a},"undefined"==typeof document&&(t.importCssString=function(){}),t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!o.isWin||"undefined"!=typeof window&&window.devicePixelRatio>=1.5,"undefined"!=typeof document){var r=document.createElement("div");t.HI_DPI&&void 0!==r.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),o.isEdge||void 0===r.style.animationName||(t.HAS_CSS_ANIMATION=!0),r=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("./oop"),o=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter((function(e){return t&n.KEY_MODS[e]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(t,o),t.keyCodeToString=function(e){var t=o[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var o,r=e("./keys"),s=e("./useragent"),a=null,l=0;function c(){return null==o&&function(){o=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){o={passive:!1}}})}catch(e){}}(),o}function u(e,t,n){this.elem=e,this.type=t,this.callback=n}u.prototype.destroy=function(){d(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var h=t.addListener=function(e,t,n,i){e.addEventListener(t,n,c()),i&&i.$toDestroy.push(new u(e,t,n))},d=t.removeListener=function(e,t,n){e.removeEventListener(t,n,c())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||s.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var i=e&&e.ownerDocument||document;function o(e){t&&t(e),n&&n(e),d(i,"mousemove",t),d(i,"mouseup",o),d(i,"dragstart",o)}return h(i,"mousemove",t),h(i,"mouseup",o),h(i,"dragstart",o),o},t.addMouseWheelListener=function(e,t,n){"onmousewheel"in e?h(e,"mousewheel",(function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),t(e)}),n):"onwheel"in e?h(e,"wheel",(function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}t(e)}),n):h(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),t(e)}),n)},t.addMultiMouseDownListener=function(e,n,i,o,r){var a,l,c,u=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};function p(e){if(0!==t.getButton(e)?u=0:e.detail>1?++u>4&&(u=1):u=1,s.isIE){var r=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-l)>5;c&&!r||(u=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[u-1]||600),1==u&&(a=e.clientX,l=e.clientY)}if(e._clicks=u,i[o]("mousedown",e),u>4)u=0;else if(u>1)return i[o](d[u],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){h(e,"mousedown",p,r)}))};var p=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function f(e,t,n){var i=p(t);if(!s.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),a.altGr){if(3==(3&i))return;a.altGr=0}if(18===n||17===n){var o="location"in t?t.location:t.keyLocation;if(17===n&&1===o)1==a[n]&&(l=t.timeStamp);else if(18===n&&3===i&&2===o){t.timeStamp-l<50&&(a.altGr=!0)}}}if((n in r.MODIFIER_KEYS&&(n=-1),!i&&13===n)&&(3===(o="location"in t?t.location:t.keyLocation)&&(e(t,i,-n),t.defaultPrevented)))return;if(s.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&e(t,i,n)}function g(){a=Object.create(null)}if(t.getModifierString=function(e){return r.KEY_MODS[p(e)]},t.addCommandKeyListener=function(e,n,i){if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var o=null;h(e,"keydown",(function(e){o=e.keyCode}),i),h(e,"keypress",(function(e){return f(n,e,o)}),i)}else{var r=null;h(e,"keydown",(function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=f(n,e,e.keyCode);return r=e.defaultPrevented,t}),i),h(e,"keypress",(function(e){r&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),r=null)}),i),h(e,"keyup",(function(e){a[e.keyCode]=null}),i),a||(g(),h(window,"focus",g))}},"object"==("undefined"==typeof window?"undefined":i(window))&&window.postMessage&&!s.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-"+m++;h(n,"message",(function o(r){r.data==i&&(t.stopPropagation(r),d(n,"message",o),e())})),n.postMessage(i,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==("undefined"==typeof window?"undefined":i(window))&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";var o=function(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==i(e)?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==i(e)?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)n={row:e,column:0};if(this.start.row>t)var i={row:t+1,column:0};else if(this.start.row<e)i={row:e,column:0};return o.fromPoints(i||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(0==n)return this;if(-1==n)var i={row:e,column:t};else var r={row:e,column:t};return o.fromPoints(i||this.start,r||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return o.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new o(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new o(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new o(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(o.prototype),o.fromPoints=function(e,t){return new o(e.row,e.column,t.row,t.column)},o.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},o.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=o})),ace.define("ace/lib/lang",["require","exports","module"],(function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var o=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(o,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,o=e.length;n<o;n++)e[n]&&"object"==i(e[n])?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function e(t){if("object"!==i(t)||!t)return t;var n;if(Array.isArray(t)){n=[];for(var o=0;o<t.length;o++)n[o]=e(t[o]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var o in n={},t)n[o]=e(t[o]);return n},t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,(function(e){n.push({offset:arguments[arguments.length-2],length:e.length})})),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},i=function e(i){return e.cancel(),t=setTimeout(n,i||0),e};return i.schedule=i,i.call=function(){return this.cancel(),e(),i},i.cancel=function(){return clearTimeout(t),t=null,i},i.isPending=function(){return t},i},t.delayedCall=function(e,t){var n=null,i=function(){n=null,e()},o=function(e){null==n&&(n=setTimeout(i,e||t))};return o.delay=function(e){n&&clearTimeout(n),n=setTimeout(i,e||t)},o.schedule=o,o.call=function(){this.cancel(),e()},o.cancel=function(){n&&clearTimeout(n),n=null},o.isPending=function(){return n},o}})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,n){"use strict";var i;n.exports={lineMode:!1,pasteCancelled:function(){return!!(i&&i>Date.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var i=e("../lib/event"),o=e("../lib/useragent"),r=e("../lib/dom"),s=e("../lib/lang"),a=e("../clipboard"),l=o.isChrome<18,c=o.isIE,u=o.isChrome>63,h=e("../lib/keys"),d=h.KEY_MODS,p=o.isIOS,f=p?/\s/:/\n/,g=o.isMobile;t.TextInput=function(e,t){var n=r.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var m=!1,v=!1,b=!1,y=!1,w="";g||(n.style.fontSize="1px");var x=!1,S=!1,C="",k=0,E=0,$=0;try{var _=document.activeElement===n}catch(e){}i.addListener(n,"blur",(function(e){S||(t.onBlur(e),_=!1)}),t),i.addListener(n,"focus",(function(e){if(!S){if(_=!0,o.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),o.isEdge?setTimeout(A):A()}}),t),this.$focusScroll=!1,this.focus=function(){if(w||u||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch(e){return}var i=[];if(t)for(var o=n.parentElement;o&&1==o.nodeType;)i.push(o),o.setAttribute("ace_nocontext",!0),o=!o.parentElement&&o.getRootNode?o.getRootNode().host:o.parentElement;n.focus({preventScroll:!0}),t&&i.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return _},t.on("beforeEndOperation",(function(){var e=t.curOp,i=e&&e.command&&e.command.name;if("insertstring"!=i){var o=i&&(e.docChanged||e.selectionChanged);b&&o&&(C=n.value="",N()),A()}}));var A=p?function(e){if(_&&(!m||e)&&!y){e||(e="");var i="\n ab"+e+"cde fg\n";i!=n.value&&(n.value=C=i);var o=4+(e.length||(t.selection.isEmpty()?0:1));4==k&&E==o||n.setSelectionRange(4,o),k=4,E=o}}:function(){if(!b&&!y&&(_||L)){b=!0;var e=0,i=0,o="";if(t.session){var r=t.selection,s=r.getRange(),a=r.cursor.row;if(e=s.start.column,i=s.end.column,o=t.session.getLine(a),s.start.row!=a){var l=t.session.getLine(a-1);e=s.start.row<a-1?0:e,i+=l.length+1,o=l+"\n"+o}else if(s.end.row!=a){var c=t.session.getLine(a+1);i=s.end.row>a+1?c.length:i,i+=o.length+1,o=o+"\n"+c}else g&&a>0&&(o="\n"+o,i+=1,e+=1);o.length>400&&(e<400&&i<400?o=o.slice(0,400):(o="\n",e==i?e=i=0:(e=0,i=1)))}var u=o+"\n\n";if(u!=C&&(n.value=C=u,k=E=u.length),L&&(k=n.selectionStart,E=n.selectionEnd),E!=i||k!=e||n.selectionEnd!=E)try{n.setSelectionRange(e,i),k=e,E=i}catch(e){}b=!1}};this.resetSelection=A,_&&t.onFocus();var O=null;this.setInputHandler=function(e){O=e},this.getInputHandler=function(){return O};var L=!1,R=function(e,i){if(L&&(L=!1),v)return A(),e&&t.onPaste(e),v=!1,"";for(var r=n.selectionStart,s=n.selectionEnd,a=k,l=C.length-E,c=e,u=e.length-r,h=e.length-s,d=0;a>0&&C[d]==e[d];)d++,a--;for(c=c.slice(d),d=1;l>0&&C.length-d>k-1&&C[C.length-d]==e[e.length-d];)d++,l--;u-=d-1,h-=d-1;var p=c.length-d+1;if(p<0&&(a=-p,p=0),c=c.slice(0,p),!(i||c||u||a||l||h))return"";y=!0;var f=!1;return o.isAndroid&&". "==c&&(c=" ",f=!0),c&&!a&&!l&&!u&&!h||x?t.onTextInput(c):t.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:u,restoreEnd:h}),y=!1,C=e,k=r,E=s,$=h,f?"\n":c},T=function(e){if(b)return j();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var i=n.value,o=R(i,!0);(i.length>500||f.test(o)||g&&k<1&&k==E)&&A()},M=function e(t,n,i){var o=t.clipboardData||window.clipboardData;if(o&&!l){var r=c||i?"Text":"text/plain";try{return n?!1!==o.setData(r,n):o.getData(r)}catch(t){if(!i)return e(t,n,!0)}}},I=function(e,o){var r=t.getCopyText();if(!r)return i.preventDefault(e);M(e,r)?(p&&(A(r),m=r,setTimeout((function(){m=!1}),10)),o?t.onCut():t.onCopy(),i.preventDefault(e)):(m=!0,n.value=r,n.select(),setTimeout((function(){m=!1,A(),o?t.onCut():t.onCopy()})))},P=function(e){I(e,!0)},F=function(e){I(e,!1)},D=function(e){var r=M(e);a.pasteCancelled()||("string"==typeof r?(r&&t.onPaste(r,e),o.isIE&&setTimeout(A),i.preventDefault(e)):(n.value="",v=!0))};i.addCommandKeyListener(n,t.onCommandKey.bind(t),t),i.addListener(n,"select",(function(e){b||(m?m=!1:!function(e){return 0===e.selectionStart&&e.selectionEnd>=C.length&&e.value===C&&C&&e.selectionEnd!==E}(n)?g&&n.selectionStart!=k&&A():(t.selectAll(),A()))}),t),i.addListener(n,"input",T,t),i.addListener(n,"cut",P,t),i.addListener(n,"copy",F,t),i.addListener(n,"paste",D,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||i.addListener(e,"keydown",(function(e){if((!o.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:F(e);break;case 86:D(e);break;case 88:P(e)}}),t);var j=function(){if(b&&t.onCompositionUpdate&&!t.$readOnly){if(x)return B();if(b.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;R(e),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+E-b.selectionStart+$)}}},N=function(e){t.onCompositionEnd&&!t.$readOnly&&(b=!1,t.onCompositionEnd(),t.off("mousedown",B),e&&T())};function B(){S=!0,n.blur(),n.focus(),S=!1}var z,W=s.delayedCall(j,50).schedule.bind(null,null);function H(){clearTimeout(z),z=setTimeout((function(){w&&(n.style.cssText=w,w=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}i.addListener(n,"compositionstart",(function(e){if(!b&&t.onCompositionStart&&!t.$readOnly&&(b={},!x)){e.data&&(b.useTextareaForIME=!1),setTimeout(j,0),t._signal("compositionStart"),t.on("mousedown",B);var i=t.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,b.markerRange=i,b.selectionStart=k,t.onCompositionStart(b),b.useTextareaForIME?(C=n.value="",k=0,E=0):(n.msGetInputContext&&(b.context=n.msGetInputContext()),n.getInputContext&&(b.context=n.getInputContext()))}}),t),i.addListener(n,"compositionupdate",j,t),i.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.length<n.selectionStart&&(b||(C=n.value),k=E=-1,A()),W()}),t),i.addListener(n,"keydown",W,t),i.addListener(n,"compositionend",N,t),this.getElement=function(){return n},this.setCommandMode=function(e){x=e,n.readOnly=!1},this.setReadOnly=function(e){x||(n.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){L=!0,A(),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,s){w||(w=n.style.cssText),n.style.cssText=(s?"z-index:100000;":"")+(o.isIE?"opacity:0.1;":"")+"text-indent: -"+(k+E)*t.renderer.characterWidth*.5+"px;";var a=t.container.getBoundingClientRect(),l=r.computedStyle(t.container),c=a.top+(parseInt(l.borderTopWidth)||0),u=a.left+(parseInt(a.borderLeftWidth)||0),h=a.bottom-c-n.clientHeight-2,d=function(e){r.translate(n,e.clientX-u-2,Math.min(e.clientY-c-2,h))};d(e),"mousedown"==e.type&&(t.renderer.$isMousePressed=!0,clearTimeout(z),o.isWin&&i.capture(t.container,d,H))},this.onContextMenuClose=H;var V=function(e){t.textInput.onContextMenu(e),H()};i.addListener(n,"mouseup",V,t),i.addListener(n,"mousedown",(function(e){e.preventDefault(),H()}),t),i.addListener(t.renderer.scroller,"contextmenu",V,t),i.addListener(n,"contextmenu",V,t),p&&function(e,t,n){var i=null,o=!1;n.addEventListener("keydown",(function(e){i&&clearTimeout(i),o=!0}),!0),n.addEventListener("keyup",(function(e){i=setTimeout((function(){o=!1}),100)}),!0);var r=function(e){if(document.activeElement===n&&!(o||b||t.$mouseHandler.isMousePressed||m)){var i=n.selectionStart,r=n.selectionEnd,s=null,a=0;if(0==i?s=h.up:1==i?s=h.home:r>E&&"\n"==C[r]?s=h.end:i<k&&" "==C[i-1]?(s=h.left,a=d.option):i<k||i==k&&E!=k&&i==r?s=h.left:r>E&&C.slice(0,r).split("\n").length>2?s=h.down:r>E&&" "==C[r-1]?(s=h.right,a=d.option):(r>E||r==E&&E!=k&&i==r)&&(s=h.right),i!==r&&(a|=d.shift),s){if(!t.onCommandKey({},a,s)&&t.commands){s=h.keyCodeToString(s);var l=t.commands.findKeyCommand(a,s);l&&t.execCommand(l)}k=i,E=r,A("")}}};document.addEventListener("selectionchange",r),t.on("destroy",(function(){document.removeEventListener("selectionchange",r)}))}(0,t,n)},t.$setUserAgentForTests=function(e,t){g=e,p=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/useragent");function o(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function r(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var o=this.editor,r=e.getButton();return 0!==r?((o.getSelectionRange().isEmpty()||1==r)&&o.selection.moveToPosition(n),void(2==r&&(o.textInput.onContextMenu(e.domEvent),i.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||o.isFocused()||(o.focus(),!this.$focusTimeout||this.$clickSelection||o.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var o=r(this.$clickSelection,n);n=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[e](i.row,i.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(o.start),a=this.$clickSelection.comparePoint(o.end);if(-1==s&&a<=0)t=this.$clickSelection.end,o.end.row==i.row&&o.end.column==i.column||(i=o.start);else if(1==a&&s>=0)t=this.$clickSelection.start,o.start.row==i.row&&o.start.column==i.column||(i=o.end);else if(-1==s&&1==a)i=o.end,t=o.start;else{var l=r(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,n,i,o=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,i=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))),r=Date.now();(o>0||r-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=e.domEvent.timeStamp,o=i-n.t,r=o?e.wheelX/o:n.vx,s=o?e.wheelY/o:n.vy;o<550&&(r=(r+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(r/s),l=!1;if(a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l)n.allowed=i;else if(i-n.allowed<550){Math.abs(r)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0}return n.t=i,n.vx=r,n.vy=s,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(o.prototype),t.DefaultHandlers=o})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){"use strict";e("./lib/oop");var i=e("./lib/dom");function o(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(o.prototype),t.Tooltip=o})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=e("../lib/oop"),r=e("../lib/event"),s=e("../tooltip").Tooltip;function a(e){s.call(this,e)}o.inherits(a,s),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),r=this.getHeight();(e+=15)+o>n&&(e-=e+o-n),(t+=15)+r>i&&(t-=20+r),s.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,n,o,s=e.editor,l=s.renderer.$gutterLayer,c=new a(s.container);function u(){t&&(t=clearTimeout(t)),o&&(c.hide(),o=null,s._signal("hideGutterTooltip",c),s.off("mousewheel",u))}function h(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(s.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,i=s.session.selection;if(t.getShiftKey())i.selectTo(n,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(r){var a=r.domEvent.target||r.domEvent.srcElement;if(i.hasCssClass(a,"ace_fold-widget"))return u();o&&e.$tooltipFollowsMouse&&h(r),n=r,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,i=l.$annotations[t];if(!i)return u();if(t==s.session.getLength()){var r=s.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(r>s.session.documentToScreenRow(a.row,a.column))return u()}if(o!=i)if(o=i.text.join("<br/>"),c.setHtml(o),c.show(),s._signal("showGutterTooltip",c),s.on("mousewheel",u),e.$tooltipFollowsMouse)h(n);else{var d=n.domEvent.target.getBoundingClientRect(),p=c.getElement().style;p.left=d.right+"px",p.top=d.bottom+"px"}}():u()}),50))})),r.addListener(s.renderer.$gutter,"mouseout",(function(e){n=null,o&&!t&&(t=setTimeout((function(){t=null,u()}),50))}),s),s.on("changeSession",u)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/event"),o=e("../lib/useragent"),r=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=o.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(r.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=e("../lib/event"),r=e("../lib/useragent");function s(e){var t=e.editor,n=i.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",r.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var s,l,c,u,h,d,p,f,g,m,v,b=t.container,y=0;function w(){var e=d;(function(e,n){var i=Date.now(),o=!n||e.row!=n.row,r=!n||e.column!=n.column;!m||o||r?(t.moveCursorToPosition(e),m=i,v={x:l,y:c}):a(v.x,v.y,l,c)>5?m=null:i-m>=200&&(t.renderer.scrollCursorIntoView(),m=null)})(d=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var i=Date.now(),o=t.renderer.layerConfig.lineHeight,r=t.renderer.layerConfig.characterWidth,s=t.renderer.scroller.getBoundingClientRect(),a={x:{left:l-s.left,right:s.right-l},y:{top:c-s.top,bottom:s.bottom-c}},u=Math.min(a.x.left,a.x.right),h=Math.min(a.y.top,a.y.bottom),d={row:e.row,column:e.column};u/r<=2&&(d.column+=a.x.left<a.x.right?-3:2),h/o<=1&&(d.row+=a.y.top<a.y.bottom?-1:1);var p=e.row!=d.row,f=e.column!=d.column,m=!n||e.row!=n.row;p||f&&!m?g?i-g>=200&&t.renderer.scrollCursorIntoView(d):g=i:g=null}(d,e)}function x(){h=t.selection.toOrientedRange(),s=t.session.addMarker(h,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),w(),u=setInterval(w,20),y=0,o.addListener(document,"mousemove",k)}function S(){clearInterval(u),t.session.removeMarker(s),s=null,t.selection.fromOrientedRange(h),t.isFocused()&&!f&&t.$resetCursorStyle(),h=null,d=null,y=0,g=null,m=null,o.removeListener(document,"mousemove",k)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(e)}),0),e.preventDefault()}h=t.getSelectionRange();var o=e.dataTransfer;o.effectAllowed=t.getReadOnly()?"copy":"copyMove",r.isOpera&&(t.container.appendChild(n),n.scrollTop=0),o.setDragImage&&o.setDragImage(n,0,0),r.isOpera&&t.container.removeChild(n),o.clearData(),o.setData("Text",t.session.getTextRange()),f=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,f=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;p||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&E(e.dataTransfer))return l=e.clientX,c=e.clientY,s||x(),y++,e.dataTransfer.dropEffect=p=$(e),o.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&E(e.dataTransfer))return l=e.clientX,c=e.clientY,s||(x(),y++),null!==C&&(C=null),e.dataTransfer.dropEffect=p=$(e),o.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&s)return S(),p=null,o.preventDefault(e)},this.onDrop=function(e){if(d){var n=e.dataTransfer;if(f)switch(p){case"move":h=h.contains(d.row,d.column)?{start:d,end:d}:t.moveText(h,d);break;case"copy":h=t.moveText(h,d,!0)}else{var i=n.getData("Text");h={start:d,end:t.session.insert(d,i)},t.focus(),p=null}return S(),o.preventDefault(e)}},o.addListener(b,"dragstart",this.onDragStart.bind(e),t),o.addListener(b,"dragend",this.onDragEnd.bind(e),t),o.addListener(b,"dragenter",this.onDragEnter.bind(e),t),o.addListener(b,"dragover",this.onDragOver.bind(e),t),o.addListener(b,"dragleave",this.onDragLeave.bind(e),t),o.addListener(b,"drop",this.onDrop.bind(e),t);var C=null;function k(){null==C&&(C=setTimeout((function(){null!=C&&s&&S()}),20))}function E(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function $(e){var t=["copy","copymove","all","uninitialized"],n=r.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return n&&t.indexOf(i)>=0?o="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?o="move":t.indexOf(i)>=0&&(o="copy"),o}}function a(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=r.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;r.isIE&&"dragReady"==this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in o&&(o.unselectable="on"),t.getDragDelay()){if(r.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(s.prototype),t.DragdropHandler=s})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./mouse_event").MouseEvent,o=e("../lib/event"),r=e("../lib/dom");t.addTouchListeners=function(e,t){var n,s,a,l,c,u,h,d,p,f="scroll",g=0,m=0,v=0,b=0;function y(){var e=window.navigator&&window.navigator.clipboard,n=!1,i=function(i){var o,s,a=i.target.getAttribute("action");if("more"==a||!n)return n=!n,o=t.getCopyText(),s=t.session.getUndoManager().hasUndo(),void p.replaceChild(r.buildDom(n?["span",!o&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],o&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],o&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],s&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),p.firstChild);"paste"==a?e.readText().then((function(e){t.execCommand(a,e)})):a&&("cut"!=a&&"copy"!=a||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(a)),p.firstChild.style.display="none",n=!1,"openCommandPallete"!=a&&t.focus()};p=r.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){f="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),i(e)},onclick:i},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function w(){p||y();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),i=t.renderer.textToScreenCoordinates(0,0).pageX,o=t.renderer.scrollLeft,r=t.container.getBoundingClientRect();p.style.top=n.pageY-r.top-3+"px",n.pageX-r.left<r.width-70?(p.style.left="",p.style.right="10px"):(p.style.right="",p.style.left=i+o-r.left+"px"),p.style.display="",p.firstChild.style.display="none",t.on("input",x)}function x(e){p&&(p.style.display="none"),t.off("input",x)}function S(){c=null,clearTimeout(c);var e=t.selection.getRange(),n=e.contains(h.row,h.column);!e.isEmpty()&&n||(t.selection.moveToPosition(h),t.selection.selectWord()),f="wait",w()}o.addListener(e,"contextmenu",(function(e){d&&t.textInput.getElement().focus()}),t),o.addListener(e,"touchstart",(function(e){var o=e.touches;if(c||o.length>1)return clearTimeout(c),c=null,a=-1,void(f="zoom");d=t.$mouseHandler.isMousePressed=!0;var r=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,p=e.timeStamp;l=p;var y=o[0],w=y.clientX,x=y.clientY;Math.abs(n-w)+Math.abs(s-x)>r&&(a=-1),n=e.clientX=w,s=e.clientY=x,v=b=0;var C=new i(e,t);if(h=C.getDocumentPosition(),p-a<500&&1==o.length&&!g)m++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(h);var e=m>=2?t.selection.getLineRange(h.row):t.session.getBracketRange(h);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),f="wait"}();else{m=0;var k=t.selection.cursor,E=t.selection.isEmpty()?k:t.selection.anchor,$=t.renderer.$cursorLayer.getPixelPosition(k,!0),_=t.renderer.$cursorLayer.getPixelPosition(E,!0),A=t.renderer.scroller.getBoundingClientRect(),O=t.renderer.layerConfig.offset,L=t.renderer.scrollLeft,R=function(e,t){return(e/=u)*e+(t=t/r-.75)*t};if(e.clientX<A.left)return void(f="zoom");var T=R(e.clientX-A.left-$.left+L,e.clientY-A.top-$.top+O),M=R(e.clientX-A.left-_.left+L,e.clientY-A.top-_.top+O);T<3.5&&M<3.5&&(f=T>M?"cursor":"anchor"),f=M<3.5?"anchor":T<3.5?"cursor":"scroll",c=setTimeout(S,450)}a=p}),t),o.addListener(e,"touchend",(function(e){d=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==f?(f="",g=0):c?(t.selection.moveToPosition(h),g=0,w()):"scroll"==f?(g+=60,u=setInterval((function(){g--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(b)<.01&&(b=0),g<20&&(v*=.9),g<20&&(b*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*b),e==t.session.getScrollTop()&&(g=0)}),10),x()):w(),clearTimeout(c),c=null}),t),o.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var o=e.touches;if(!(o.length>1||"zoom"==f)){var r=o[0],a=n-r.clientX,u=s-r.clientY;if("wait"==f){if(!(a*a+u*u>4))return e.preventDefault();f="cursor"}n=r.clientX,s=r.clientY,e.clientX=r.clientX,e.clientY=r.clientY;var h=e.timeStamp,d=h-l;if(l=h,"scroll"==f){var p=new i(e,t);p.speed=1,p.wheelX=a,p.wheelY=u,10*Math.abs(a)<Math.abs(u)&&(a=0),10*Math.abs(u)<Math.abs(a)&&(u=0),0!=d&&(v=a/d,b=u/d),t._emit("mousewheel",p),p.propagationStopped||(v=b=0)}else{var g=new i(e,t).getDocumentPosition();"cursor"==f?t.selection.moveCursorToPosition(g):"anchor"==f&&t.selection.setSelectionAnchor(g.row,g.column),t.renderer.scrollCursorIntoView(g),e.preventDefault()}}}),t)}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=i.getDocumentHead(),o=document.createElement("script");o.src=e,n.appendChild(o),o.onload=o.onreadystatechange=function(e,n){!n&&o.readyState&&"loaded"!=o.readyState&&"complete"!=o.readyState||(o=o.onload=o.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,n){"use strict";var o={},r=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};o._emit=o._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],o=this._defaultHandlers[e];if(n.length||o){"object"==i(t)&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var a=0;a<n.length&&(n[a](t,this),!t.propagationStopped);a++);return o&&!t.defaultPrevented?o(t,this):void 0}},o._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var i=0;i<n.length;i++)n[i](t,this)}},o.once=function(e,t){var n=this;if(this.on(e,(function i(){n.off(e,i),t.apply(null,arguments)})),!t)return new Promise((function(e){t=e}))},o.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var i=n[e],o=n._disabled_[e];o||(n._disabled_[e]=o=[]),o.push(i);var r=o.indexOf(t);-1!=r&&o.splice(r,1)}n[e]=t},o.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var i=n._disabled_[e];if(n[e]==t)i&&this.setDefaultHandler(e,i.pop());else if(i){var o=i.indexOf(t);-1!=o&&i.splice(o,1)}}},o.on=o.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];return i||(i=this._eventRegistry[e]=[]),-1==i.indexOf(t)&&i[n?"unshift":"push"](t),t},o.off=o.removeListener=o.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var i=n.indexOf(t);-1!==i&&n.splice(i,1)}},o.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=o})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){var o=e("./oop"),r=e("./event_emitter").EventEmitter,s={setOptions:function(e){Object.keys(e).forEach((function(t){this.setOption(t,e[t])}),this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(t=e,e=Object.keys(t));else{var n=this.$options;e=Object.keys(n).filter((function(e){return!n[e].hidden}))}return e.forEach((function(e){t[e]=this.getOption(e)}),this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return a('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:a('misspelled option "'+e+'"')}};function a(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function l(e,t){var n=new Error(e);n.data=t,"object"==("undefined"==typeof console?"undefined":i(console))&&console.error&&console.error(n),setTimeout((function(){throw n}))}var c=function(){this.$defaultOptions={}};(function(){o.implement(this,r),this.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach((function(t){var i=n[t];"string"==typeof i&&(i={forwardTo:i}),i.name||(i.name=t),e.$options[i.name]=i,"initialValue"in i&&(e["$"+i.name]=i.initialValue)})),o.implement(e,s),this},this.resetOptions=function(e){Object.keys(e.$options).forEach((function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)}))},this.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var i=this.$defaultOptions[e]||(this.$defaultOptions[e]={});i[t]&&(i.forwardTo?this.setDefaultValue(i.forwardTo,t,n):i[t].value=n)},this.setDefaultValues=function(e,t){Object.keys(t).forEach((function(n){this.setDefaultValue(e,n,t[n])}),this)},this.warn=a,this.reportError=l}).call(c.prototype),t.AppConfig=c})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],(function(e,t,i){var o=e("./lib/lang"),r=(e("./lib/oop"),e("./lib/net")),s=e("./lib/app_config").AppConfig;i.exports=t=new s;var a=function(){return this||"undefined"!=typeof window&&window}(),l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1};t.get=function(e){if(!l.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return l[e]},t.set=function(e,t){if(l.hasOwnProperty(e))l[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e)},t.all=function(){return o.copyObject(l)},t.$modes={},t.moduleUrl=function(e,t){if(l.$moduleUrls[e])return l.$moduleUrls[e];var n=e.split("/"),i="snippets"==(t=t||n[n.length-2]||"")?"/":"-",o=n[n.length-1];if("worker"==t&&"-"==i){var r=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");o=o.replace(r,"")}(!o||o==t)&&n.length>1&&(o=n[n.length-2]);var s=l[t+"Path"];return null==s?s=l.basePath:"/"==i&&(t=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+i+o+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,i){var o,s;Array.isArray(n)&&(s=n[0],n=n[1]);try{o=e(n)}catch(e){}if(o&&!t.$loading[n])return i&&i(o);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(i),!(t.$loading[n].length>1)){var a=function(){e([n],(function(e){t._emit("load.module",{name:n,module:e});var i=t.$loading[n];t.$loading[n]=null,i.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return a();r.loadScript(t.moduleUrl(n,s),a),c()}};var c=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};function u(o){if(a&&a.document){l.packaged=o||e.packaged||i.packaged||a.define&&n(50).packaged;for(var r,s={},c="",u=document.currentScript||document._currentScript,h=(u&&u.ownerDocument||document).getElementsByTagName("script"),d=0;d<h.length;d++){var p=h[d],f=p.src||p.getAttribute("src");if(f){for(var g=p.attributes,m=0,v=g.length;m<v;m++){var b=g[m];0===b.name.indexOf("data-ace-")&&(s[(r=b.name.replace(/^data-ace-/,""),r.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=b.value)}var y=f.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);y&&(c=y[1])}}for(var w in c&&(s.base=s.base||c,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base,s)void 0!==s[w]&&t.set(w,s[w])}}u(!0),t.init=u,t.version="1.4.12"})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],(function(e,t,n){"use strict";var i=e("../lib/event"),o=e("../lib/useragent"),r=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("./touch_handler").addTouchListeners,u=e("../config"),h=function(e){var t=this;this.editor=e,new r(this),new s(this),new l(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus()},a=e.renderer.getMouseEventTarget();i.addListener(a,"click",this.onMouseEvent.bind(this,"click"),e),i.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),i.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),i.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),c(e.container,e);var u=e.renderer.$gutter;i.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),i.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick"),e),i.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),i.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),i.addListener(a,"mousedown",n,e),i.addListener(u,"mousedown",n,e),o.isIE&&e.renderer.scrollBarV&&(i.addListener(e.renderer.scrollBarV.element,"mousedown",n,e),i.addListener(e.renderer.scrollBarH.element,"mousedown",n,e)),e.on("mousemove",(function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var i=e.renderer.screenToTextCoordinates(n.x,n.y),o=e.session.selection.getRange(),r=e.renderer;!o.isEmpty()&&o.insideStart(i.row,i.column)?r.setCursorStyle("default"):r.setCursorStyle("")}}),e)};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var n=new a(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor,r=this.editor.renderer;r.$isMousePressed=!0;var s=this,l=function(e){if(e){if(o.isWebKit&&!e.which&&s.releaseMouse)return s.releaseMouse();s.x=e.clientX,s.y=e.clientY,t&&t(e),s.mouseEvent=new a(e,s.editor),s.$mouseMoved=!0}},c=function(e){n.off("beforeEndOperation",h),clearInterval(d),u(),s[s.state+"End"]&&s[s.state+"End"](e),s.state="",s.isMousePressed=r.$isMousePressed=!1,r.$keepTextAreaAtCursor&&r.$moveTextAreaToCursor(),s.$onCaptureMouseMove=s.releaseMouse=null,e&&s.onMouseEvent("mouseup",e),n.endOperation()},u=function(){s[s.state]&&s[s.state](),s.$mouseMoved=!1};if(o.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout((function(){c(e)}));var h=function(e){s.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(s[s.state+"End"]&&s[s.state+"End"](),s.state="",s.releaseMouse())};n.on("beforeEndOperation",h),n.startOperation({command:{name:"mouse"}}),s.$onCaptureMouseMove=l,s.releaseMouse=i.capture(this.editor.container,l,c);var d=setInterval(u,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&i.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)},this.destroy=function(){this.releaseMouse&&this.releaseMouse()}}).call(h.prototype),u.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:o.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=h})),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom");t.FoldHandler=function(e){e.on("click",(function(t){var n=t.getDocumentPosition(),o=e.session,r=o.getFoldAt(n.row,n.column,1);r&&(t.getAccelKey()?o.removeFold(r):o.expandFold(r),t.stop());var s=t.domEvent&&t.domEvent.target;s&&i.hasCssClass(s,"ace_inline_button")&&i.hasCssClass(s,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),e.renderer.scrollCursorIntoView())})),e.on("gutterclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,i=e.session;i.foldWidgets&&i.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}})),e.on("gutterdblclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,i=e.session,o=i.getParentFoldRangeData(n,!0),r=o.range||o.firstRange;if(r){n=r.start.row;var s=i.getFoldAt(n,i.getLine(n).length,1);s?i.removeFold(s):(i.addFold("...",r),e.renderer.scrollCursorIntoView({row:r.start.row,column:0}))}t.stop()}}))}})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(e,t,n){"use strict";var i=e("../lib/keys"),o=e("../lib/event"),r=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map((function(n){return n.getStatusText&&n.getStatusText(t,e)||""})).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,i){for(var r,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((r=this.$handlers[l].handleKeyboard(this.$data,e,t,n,i))&&r.command&&((s="null"==r.command||a.exec(r.command,this.$editor,r.args,i))&&i&&-1!=e&&1!=r.passEvent&&1!=r.command.passEvent&&o.stopEvent(i),s)););return s||-1!=e||(r={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",r),s},this.onCommandKey=function(e,t,n){var o=i.keyCodeToString(n);return this.$callKeyboardHandlers(t,o,n,e)},this.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)}}).call(r.prototype),t.KeyBinding=r})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(e,t,n){"use strict";var i=0,o=0,r=!1,s=!1,a=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=[18,18,18,18,18,18,18,18,18,6,5,6,8,5,18,18,18,18,18,18,18,18,18,18,18,18,18,18,5,5,5,6,8,4,4,11,11,11,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,18,18,18,18,18,18,5,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,9,4,11,11,11,11,4,4,4,4,0,4,4,18,4,4,11,11,2,2,4,0,4,4,4,2,0,4,4,4,4,4],h=[8,8,8,8,8,8,8,8,8,8,8,18,18,18,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,11,11,11,11,11,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8];function d(e,t,n){if(!(o<e))if(1!=e||1!=i||s)for(var r,a,l,c,u=n.length,h=0;h<u;){if(t[h]>=e){for(r=h+1;r<u&&t[r]>=e;)r++;for(a=h,l=r-1;a<l;a++,l--)c=n[a],n[a]=n[l],n[l]=c;h=r}h++}else n.reverse()}function p(e,t,n,o){var l,c,u,h,d=t[o];switch(d){case 0:case 1:r=!1;case 4:case 3:return d;case 2:return r?3:2;case 7:return r=!0,!0,1;case 8:return 4;case 9:return o<1||o+1>=t.length||2!=(l=n[o-1])&&3!=l||2!=(c=t[o+1])&&3!=c?4:(r&&(c=3),c==l?c:4);case 10:return 2==(l=o>0?n[o-1]:5)&&o+1<t.length&&2==t[o+1]?2:4;case 11:if(o>0&&2==n[o-1])return 2;if(r)return 4;for(h=o+1,u=t.length;h<u&&11==t[h];)h++;return h<u&&2==t[h]?2:4;case 12:for(u=t.length,h=o+1;h<u&&12==t[h];)h++;if(h<u){var p=e[o],f=p>=1425&&p<=2303||64286==p;if(l=t[h],f&&(1==l||7==l))return 1}return o<1||5==(l=t[o-1])?4:n[o-1];case 5:return r=!1,s=!0,i;case 6:return a=!0,4;case 13:case 14:case 16:case 17:case 15:r=!1;case 18:return 4}}function f(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:u[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?11:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?h[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,n,u){if(e.length<2)return{};var h=e.split(""),g=new Array(h.length),m=new Array(h.length),v=[];i=u?1:0,function(e,t,n,u){var h=i?c:l,d=null,g=null,m=null,v=0,b=null,y=-1,w=null,x=null,S=[];if(!u)for(w=0,u=[];w<n;w++)u[w]=f(e[w]);for(o=i,r=!1,!1,s=!1,a=!1,x=0;x<n;x++){if(d=v,S[x]=g=p(e,u,S,x),b=240&(v=h[d][g]),v&=15,t[x]=m=h[v][5],b>0)if(16==b){for(w=y;w<x;w++)t[w]=1;y=-1}else y=-1;if(h[v][6])-1==y&&(y=x);else if(y>-1){for(w=y;w<x;w++)t[w]=m;y=-1}5==u[x]&&(t[x]=0),o|=m}if(a)for(w=0;w<n;w++)if(6==u[w]){t[w]=i;for(var C=w-1;C>=0&&8==u[C];C--)t[C]=i}}(h,v,h.length,n);for(var b=0;b<g.length;g[b]=b,b++);d(2,v,g),d(1,v,g);for(b=0;b<g.length-1;b++)3===n[b]?v[b]=t.AN:1===v[b]&&(n[b]>7&&n[b]<13||4===n[b]||18===n[b])?v[b]=t.ON_R:b>0&&"ل"===h[b-1]&&/\u0622|\u0623|\u0625|\u0627/.test(h[b])&&(v[b-1]=v[b]=t.R_H,b++);h[h.length-1]===t.DOT&&(v[h.length-1]=t.B),"‫"===h[0]&&(v[0]=t.RLE);for(b=0;b<g.length;b++)m[b]=v[g[b]];return{logicalFromVisual:g,bidiLevels:m}},t.hasBidiCharacters=function(e,t){for(var n=!1,i=0;i<e.length;i++)t[i]=f(e.charAt(i)),n||1!=t[i]&&7!=t[i]&&3!=t[i]||(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}})),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],(function(e,t,n){"use strict";var i=e("./lib/bidiutil"),o=e("./lib/lang"),r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=i,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=r.test(e.getValue())};(function(){this.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&r.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var r=this.session.$wrapData[e];r&&(void 0===t&&(t=this.getSplitIndex()),t>0&&r.length?(this.wrapIndent=r.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=t<r.length?this.line.substring(r[t-1],r[t]):this.line.substring(r[r.length-1])):this.line=this.line.substring(0,r[t])),t==r.length&&(this.line+=this.showInvisibles?n:i.DOT)}else this.line+=this.showInvisibles?n:i.DOT;var s,a=this.session,l=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,(function(e,t){return"\t"===e||a.isFullWidth(e.charCodeAt(0))?(s="\t"===e?a.getScreenTabSize(t+l):2,l+=s-1,o.stringRepeat(i.DOT,s)):e})),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==i.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},this.updateBidiMap=function(){var e=[];i.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=i.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(e){if(this.characterWidth!==e.$characterSize.width){this.fontMetrics=e;var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth("ה");this.charWidths[i.L]=this.charWidths[i.EN]=this.charWidths[i.ON_R]=t,this.charWidths[i.R]=this.charWidths[i.AN]=n,this.charWidths[i.R_H]=.45*n,this.charWidths[i.B]=this.charWidths[i.RLE]=0,this.currentRow=null}},this.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},this.setEolChar=function(e){this.EOL=e},this.setContentWidth=function(e){this.contentWidth=e},this.isRtlLine=function(e){return!!this.$isRtl||(null!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},this.setRtlDirection=function(e,t){for(var n=e.getCursorPosition(),i=e.selection.getSelectionAnchor().row;i<=n.row;i++)t||e.session.getLine(i).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(i).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:i},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(i,0,1)},this.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,n=e>t?this.session.getOverwrite()?e:e-1:t,o=i.getVisualFromLogicalIdx(n,this.bidiMap),r=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&r[o]%2!=0&&o++;for(var a=0;a<o;a++)s+=this.charWidths[r[a]];return!this.session.getOverwrite()&&e>t&&r[o]%2==0&&(s+=this.charWidths[r[o]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},this.getSelections=function(e,t){var n,i=this.bidiMap,o=i.bidiLevels,r=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,u=!1,h=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,p=0;p<o.length;p++)d=i.logicalFromVisual[p],n=o[p],(c=d>=a&&d<l)&&!u?h=s:!c&&u&&r.push({left:h,width:s-h}),s+=this.charWidths[n],u=c;if(c&&p===o.length&&r.push({left:h,width:s-h}),this.isRtlDir)for(var f=0;f<r.length;f++)r[f].left+=this.rtlLineOffset;return r},this.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,n=(e=Math.max(e,0),0),i=0,o=this.bidiMap.bidiLevels,r=this.charWidths[o[i]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e>n+r/2;){if(n+=r,i===o.length-1){r=0;break}r=this.charWidths[o[++i]]}return i>0&&o[i-1]%2!=0&&o[i]%2==0?(e<n&&i--,t=this.bidiMap.logicalFromVisual[i]):i>0&&o[i-1]%2==0&&o[i]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===o.length-1&&0===r&&o[i-1]%2==0||!this.isRtlDir&&0===i&&o[i]%2!=0?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&o[i-1]%2!=0&&0!==r&&i--,t=this.bidiMap.logicalFromVisual[i]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(s.prototype),t.BidiHandler=s})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/lang"),r=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))};(function(){i.implement(this,r),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(n.row,n.column,i.row,i.column)},this.$setSelection=function(e,t,n,i){if(!this.$silent){var o=this.$isEmpty,r=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||r)&&this._emit("changeSelection")}},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(i);return o?(i=o.start.row,n=o.end.row):n=i,!0===t?new s(i,0,n,this.session.getLine(n).length):new s(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,o=e.column+t;return n<0&&(i=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,o).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();t=this.lead;this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),i=this.session.screenToDocumentPosition(n,0),o=this.session.getDisplayLine(e,null,i.row,i.column).match(/^\s*/);o[0].length==t||this.session.$useEmacsStyleLineStart||(i.column+=o[0].length),this.moveCursorToPosition(i)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var i=n.search(/\s+$/);i>0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,t,1);if(o)this.moveCursorTo(o.end.row,o.end.column);else{if(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(i)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))this.moveCursorTo(e.start.row,e.start.column);else{var i=this.session.getFoldStringAt(t,n,-1);null==i&&(i=this.doc.getLine(t).substring(0,n));var r=o.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(r)&&(n-=this.session.nonTokenRe.lastIndex,r=r.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(r)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(o.lastIndex=0;(t=e[n])&&!o.test(t);)if(o.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return o.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==n.length){var r=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e<r&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),t=0}var s=this.$shortWordEndIndex(i);this.moveCursorTo(e,t+s)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var i=this.session.getLine(t).substring(0,n);if(0===n){do{t--,i=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var r=o.stringReverse(i),s=this.$shortWordEndIndex(r);return this.moveCursorTo(t,n-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];e<0?e-=o.rowsAbove||0:e>0&&(e+=o.rowCount-(o.rowsAbove||0))}var r=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&r.row===this.lead.row&&(r.column,this.lead.column),this.moveCursorTo(r.row,r.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(o.charAt(t))&&o.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch(e){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){"use strict";var i=e("./config"),o=2e3,r=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],o=0,r=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(r.defaultToken=c.defaultToken),c.caseInsensitive&&(s="gi"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var u=c.regex,h=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==h?c.token=c.token[0]:h-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:h-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=h>1?this.$applyToken:c.token),h>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+o+1)})):(h=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),r[o]=l,o+=h,i.push(u),c.onMatch||(c.onMatch=null)}}i.length||(r[0]=0,i.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)}),this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){o=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var i=[],o=0,r=n.length;o<r;o++)t[o]&&(i[i.length]={type:n[o],value:t[o]});return i},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],i=this.tokenArray,o=0,r=i.length;o<r;o++)t[o+1]&&(n[n.length]={type:i[o],value:t[o+1]});return n},this.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!]|(\()/g,(function(e,t){return t?"(?:":e}))},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,i=!1,o={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(e,t,r,s,a,l){return i?i="]"!=a:a?i=!0:s?(n==o.stack&&(o.end=l+1,o.stack=-1),n--):r&&(n++,1!=r.length&&(o.stack=n,o.start=l)),e})),null!=o.end&&/^\)*$/.test(e.substr(o.end))&&(e=e.substring(0,o.start)+e.substr(o.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var n=t.slice(0);"#tmp"===(t=n[0])&&(n.shift(),t=n.shift())}else n=[];var i=t||"start",r=this.states[i];r||(i="start",r=this.states[i]);var s=this.matchMappings[i],a=this.regExps[i];a.lastIndex=0;for(var l,c=[],u=0,h=0,d={type:null,value:""};l=a.exec(e);){var p=s.defaultToken,f=null,g=l[0],m=a.lastIndex;if(m-g.length>u){var v=e.substring(u,m-g.length);d.type==p?d.value+=v:(d.type&&c.push(d),d={type:p,value:v})}for(var b=0;b<l.length-2;b++)if(void 0!==l[b+1]){p=(f=r[s[b]]).onMatch?f.onMatch(g,i,n,e):f.token,f.next&&(i="string"==typeof f.next?f.next:f.next(i,n),(r=this.states[i])||(this.reportError("state doesn't exist",i),i="start",r=this.states[i]),s=this.matchMappings[i],u=m,(a=this.regExps[i]).lastIndex=m),f.consumeLineEnd&&(u=m);break}if(g)if("string"==typeof p)f&&!1===f.merge||d.type!==p?(d.type&&c.push(d),d={type:p,value:g}):d.value+=g;else if(p){d.type&&c.push(d),d={type:null,value:""};for(b=0;b<p.length;b++)c.push(p[b])}if(u==e.length)break;if(u=m,h++>o){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u<e.length;)d.type&&c.push(d),d={value:e.substring(u,u+=500),type:"overflow"};i="start",n=[];break}}return d.type&&c.push(d),n.length>1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},this.reportError=i.reportError}).call(r.prototype),t.Tokenizer=r})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var i=e("../lib/lang"),o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],o=0;o<i.length;o++){var r=i[o];(r.next||r.onMatch)&&("string"==typeof r.next&&0!==r.next.indexOf(t)&&(r.next=t+r.next),r.nextState&&0!==r.nextState.indexOf(t)&&(r.nextState=t+r.nextState))}this.$rules[t+n]=i}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,o,r){var s="function"==typeof e?(new e).getRules():e;if(o)for(var a=0;a<o.length;a++)o[a]=t+o[a];else for(var l in o=[],s)o.push(t+l);if(this.addRules(s,t),n){var c=Array.prototype[r?"push":"unshift"];for(a=0;a<o.length;a++)c.apply(this.$rules[o[a]],i.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var n=0,i=this.$rules;Object.keys(i).forEach((function o(r){var s=i[r];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var u=l.next||l.push;if(u&&Array.isArray(u)){var h=l.stateName;h||("string"!=typeof(h=l.token)&&(h=h[0]||""),i[h]&&(h+=n++)),i[h]=u,l.next=h,o(h)}else"pop"==u&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var d in l.rules)i[d]?i[d].push&&i[d].push.apply(i[d],l.rules[d]):i[d]=l.rules[d];var p="string"==typeof l?l:l.include;if(p&&(c=Array.isArray(p)?p.map((function(e){return i[e]})):i[p]),c){var f=[a,1].concat(c);l.noEscape&&(f=f.filter((function(e){return!e.next}))),s.splice.apply(s,f),a--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}),this)},this.createKeywordMapper=function(e,t,n,i){var o=Object.create(null);return this.$keywordList=[],Object.keys(e).forEach((function(t){for(var r=e[t].split(i||"|"),s=r.length;s--;){var a=r[s];this.$keywordList.push(a),n&&(a=a.toLowerCase()),o[a]=t}}),this),e=null,n?function(e){return o[e.toLowerCase()]||t}:function(e){return o[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(o.prototype),t.TextHighlightRules=o})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(e,t,n){"use strict";var i=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var n=(new e).getBehaviours(t);else n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call(i.prototype),t.Behaviour=i})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("./range").Range,o=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var i=e.getTokenAt(t,n);this.$tokenIndex=i?i.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)}}).call(o.prototype),t.TokenIterator=o})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var i,o=e("../../lib/oop"),r=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},h={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return i=u[t];i=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(e,t,n,i){var o=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,o,e.end.column+(o?0:1)]}},f=function e(t){this.add("braces","insertion",(function(n,o,r,s,l){var c=r.getCursorPosition(),u=s.doc.getLine(c.row);if("{"==l){d(r);var h=r.getSelectionRange(),f=s.doc.getTextRange(h);if(""!==f&&"{"!==f&&r.getWrapBehavioursEnabled())return p(h,f,"{","}");if(e.isSaneInsertion(r,s))return/[\]\}\)]/.test(u[c.column])||r.inMultiSelectMode||t&&t.braces?(e.recordAutoInsert(r,s,"}"),{text:"{}",selection:[1,1]}):(e.recordMaybeInsert(r,s,"{"),{text:"{",selection:[1,1]})}else if("}"==l){if(d(r),"}"==u.substring(c.column,c.column+1))if(null!==s.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&e.isAutoInsertedClosing(c,u,l))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==l||"\r\n"==l){d(r);var g="";if(e.isMaybeInsertedClosing(c,u)&&(g=a.stringRepeat("}",i.maybeInsertedBrackets),e.clearMaybeInsertedClosing()),"}"===u.substring(c.column,c.column+1)){var m=s.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!m)return null;var v=this.$getIndent(s.getLine(m.row))}else{if(!g)return void e.clearMaybeInsertedClosing();v=this.$getIndent(u)}var b=v+s.getTabString();return{text:"\n"+b+"\n"+v+g,selection:[1,b.length,1,b.length]}}e.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,o,r){var s=o.doc.getTextRange(r);if(!r.isMultiLine()&&"{"==s){if(d(n),"}"==o.doc.getLine(r.start.row).substring(r.end.column,r.end.column+1))return r.end.column++,r;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,n,i,o,r){if("("==r){d(i);var s=i.getSelectionRange(),a=o.doc.getTextRange(s);if(""!==a&&i.getWrapBehavioursEnabled())return p(s,a,"(",")");if(e.isSaneInsertion(i,o))return e.recordAutoInsert(i,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){d(i);var l=i.getCursorPosition(),c=o.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1))if(null!==o.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,r))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&"("==r&&(d(n),")"==i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("brackets","insertion",(function(t,n,i,o,r){if("["==r){d(i);var s=i.getSelectionRange(),a=o.doc.getTextRange(s);if(""!==a&&i.getWrapBehavioursEnabled())return p(s,a,"[","]");if(e.isSaneInsertion(i,o))return e.recordAutoInsert(i,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){d(i);var l=i.getCursorPosition(),c=o.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1))if(null!==o.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,r))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&"["==r&&(d(n),"]"==i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("string_dquotes","insertion",(function(e,t,n,i,o){var r=i.$mode.$quotes||h;if(1==o.length&&r[o]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(o))return;d(n);var s=o,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&r[l])&&n.getWrapBehavioursEnabled())return p(a,l,s,s);if(!l){var c=n.getCursorPosition(),u=i.doc.getLine(c.row),f=u.substring(c.column-1,c.column),g=u.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==f&&m&&/escape/.test(m.type))return null;var b,y=m&&/string|escape/.test(m.type),w=!v||/string|escape/.test(v.type);if(g==s)(b=y!==w)&&/string\.end/.test(v.type)&&(b=!1);else{if(y&&!w)return null;if(y&&w)return null;var x=i.$mode.tokenRe;x.lastIndex=0;var S=x.test(f);x.lastIndex=0;var C=x.test(f);if(S||C)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;var k=u[c.column-2];if(f==s&&(k==s||x.test(k)))return null;b=!0}return{text:b?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,i,o){var r=i.$mode.$quotes||h,s=i.doc.getTextRange(o);if(!o.isMultiLine()&&r.hasOwnProperty(s)&&(d(n),i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==s))return o.end.column++,o}))};f.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new s(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",l)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var o=new s(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",c)},f.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},f.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,r,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=o.row,i.autoInsertedLineEnd=n+r.substr(o.column),i.autoInsertedBrackets++},f.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,r)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=o.row,i.maybeInsertedLineStart=r.substr(0,o.column)+n,i.maybeInsertedLineEnd=r.substr(o.column),i.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.column)==i.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},o.inherits(f,r),t.CstyleBehaviour=f})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],o=0,r=[],s=0;s<i.length;s+=2)r.push(o+=i[s]),i[s+1]&&r.push(45,o+=i[s+1]);t.wordChars=String.fromCharCode.apply(null,r)})),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var o=e("../config"),r=e("../tokenizer").Tokenizer,s=e("./text_highlight_rules").TextHighlightRules,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("../unicode"),c=e("../lib/lang"),u=e("../token_iterator").TokenIterator,h=e("../range").Range,d=function(){this.HighlightRules=s};(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new r(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,i){var o=t.doc,r=!0,s=!0,a=1/0,l=t.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))g=this.lineCommentStart.map(c.escapeRegExp).join("|"),p=this.lineCommentStart[0];else g=c.escapeRegExp(this.lineCommentStart),p=this.lineCommentStart;g=new RegExp("^(\\s*)(?:"+g+") ?"),u=t.getUseSoftTabs();b=function(e,t){var n=e.match(g);if(n){var i=n[1].length,r=n[0].length;d(e,i,r)||" "!=n[0][r-1]||r--,o.removeInLine(t,i,r)}};var h=p+" ",d=(v=function(e,t){r&&!/\S/.test(e)||(d(e,a,a)?o.insertInLine({row:t,column:a},h):o.insertInLine({row:t,column:a},p))},y=function(e,t){return g.test(e)},function(e,t,n){for(var i=0;t--&&" "==e.charAt(t);)i++;if(i%l!=0)return!1;for(i=0;" "==e.charAt(n++);)i++;return l>2?i%l!=l-1:i%l==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,f=this.blockComment.end,g=new RegExp("^(\\s*)(?:"+c.escapeRegExp(p)+")"),m=new RegExp("(?:"+c.escapeRegExp(f)+")\\s*$"),v=function(e,t){y(e,t)||r&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},f),o.insertInLine({row:t,column:a},p))},b=function(e,t){var n;(n=e.match(m))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(g))&&o.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(g.test(e))return!0;for(var i=t.getTokens(n),o=0;o<i.length;o++)if("comment"===i[o].type)return!0}}function w(e){for(var t=n;t<=i;t++)e(o.getLine(t),t)}var x=1/0;w((function(e,t){var n=e.search(/\S/);-1!==n?(n<a&&(a=n),s&&!y(e,t)&&(s=!1)):x>e.length&&(x=e.length)})),a==1/0&&(a=x,r=!1,s=!1),u&&a%l!=0&&(a=Math.floor(a/l)*l),w(s?b:v)},this.toggleBlockComment=function(e,t,n,i){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var r,s,a=(g=new u(t,i.row,i.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var c,d;a&&/comment/.test(a.type);){if(-1!=(m=a.value.indexOf(o.start))){var p=g.getCurrentTokenRow(),f=g.getCurrentTokenColumn()+m;c=new h(p,f,p,f+o.start.length);break}a=g.stepBackward()}var g;for(a=(g=new u(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){var m;if(-1!=(m=a.value.indexOf(o.end))){p=g.getCurrentTokenRow(),f=g.getCurrentTokenColumn()+m;d=new h(p,f,p,f+o.end.length);break}a=g.stepForward()}d&&t.remove(d),c&&(t.remove(c),r=c.start.row,s=-o.start.length)}else s=o.start.length,r=n.start.row,t.insert(n.end,o.end),t.insert(n.start,o.start);l.start.row==r&&(l.start.column+=s),l.end.row==r&&(l.end.column+=s),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],i=n.prototype.$id,r=o.$modes[i];r||(o.$modes[i]=r=new n),o.$modes[t]||(o.$modes[t]=r),this.$embeds.push(t),this.$modes[t]=r}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t<s.length;t++)!function(e){var n=s[t],i=e[n];e[s[t]]=function(){return this.$delegator(n,arguments,i)}}(this)},this.$delegator=function(e,t,n){var i=t[0]||"start";if("string"!=typeof i){if(Array.isArray(i[2])){var o=i[2][i[2].length-1];if(s=this.$modes[o])return s[e].apply(s,[i[1]].concat([].slice.call(t,1)))}i=i[0]||"start"}for(var r=0;r<this.$embeds.length;r++)if(this.$modes[this.$embeds[r]]){var s,a=i.split(this.$embeds[r]);if(!a[0]&&a[1])return t[0]=a[1],(s=this.$modes[this.$embeds[r]])[e].apply(s,t)}var l=n.apply(this,t);return n?l:void 0},this.transformAction=function(e,t,n,i,o){if(this.$behaviour){var r=this.$behaviour.getBehaviours();for(var s in r)if(r[s][t]){var a=r[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var o in t)for(var r=t[o],s=0,a=r.length;s<a;s++)if("string"==typeof r[s].token)/keyword|support|storage/.test(r[s].token)&&n.push(r[s].regex);else if("object"===i(r[s].token))for(var l=0,c=r[s].token.length;l<c;l++)if(/keyword|support|storage/.test(r[s].token[l])){o=r[s].regex.match(/\(.+?\)/g)[l];n.push(o.substr(1,o.length-2))}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,i){return(this.$keywordList||this.$createKeywordList()).map((function(e){return{name:e,value:e,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}).call(d.prototype),t.Mode=d})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var i=t.start.row,o=t.start.column,r=e[i]||"";switch(t.action){case"insert":if(1===t.lines.length)e[i]=r.substring(0,o)+t.lines[0]+r.substring(o);else{var s=[i,1].concat(t.lines);e.splice.apply(e,s),e[i]=r.substring(0,o)+e[i],e[i+t.lines.length-1]+=r.substring(o)}break;case"remove":var a=t.end.column,l=t.end.row;i===l?e[i]=r.substring(0,o)+r.substring(a):e.splice(i,l-i+1,r.substring(0,o)+e[l].substring(a))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===n?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var i=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&i}i.implement(this,o),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(t){if(!(t.start.row==t.end.row&&t.start.row!=this.row||t.start.row>this.row)){var n=function(t,n,i){var o="insert"==t.action,r=(o?1:-1)*(t.end.row-t.start.row),s=(o?1:-1)*(t.end.column-t.start.column),a=t.start,l=o?a:t.end;if(e(n,a,i))return{row:n.row,column:n.column};if(e(l,n,!i))return{row:n.row+r,column:n.column+(n.row==l.row?s:0)};return{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var o={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:o,value:i})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(r.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./apply_delta").applyDelta,r=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){i.implement(this,r),this.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var i=this.getLine(e);return null==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),i={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:i,action:"insert",lines:t}),this.clonePos(i)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){var i=this.clippedPos(e,t),o=this.clippedPos(e,n);return this.applyDelta({start:i,end:o,action:"remove",lines:this.getLinesForRange({start:i,end:o})},!0),this.clonePos(i)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,i=t<this.getLength()-1,o=n?e-1:e,r=n?this.getLine(o).length:0,a=i?t+1:t,l=i?0:this.getLine(a).length,c=new s(o,r,a,l),u=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),u},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(o(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,i=n.length-t+1,o=e.start.row,r=e.start.column,s=0,a=0;s<i;s=a){a+=t-1;var l=n.slice(s,a);l.push(""),this.applyDelta({start:this.pos(o+s,r),end:this.pos(o+a,r=0),action:e.action,lines:l},!0)}e.lines=n.slice(s),e.start.row=o+s,e.start.column=r,this.applyDelta(e,!0)},this.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,o=t||0,r=n.length;o<r;o++)if((e-=n[o].length+i)<0)return{row:o,column:e+n[o].length+i};return{row:r-1,column:e+n[r-1].length+i}},this.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,o=0,r=Math.min(e.row,n.length),s=t||0;s<r;++s)o+=n[s].length+i;return o+e.column}}).call(l.prototype),t.Document=l})),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,i=-1,o=n.doc,r=t;n.lines[t];)t++;var s=o.getLength(),a=0;for(n.running=!1;t<s;){n.$tokenizeRow(t),i=t;do{t++}while(n.lines[t]);if(++a%5==0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),r<=i&&n.fireUpdateEvent(r,i)}}};(function(){i.implement(this,o),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens}}).call(r.prototype),t.BackgroundTokenizer=r})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),o=(e("./lib/oop"),e("./range").Range),r=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,r){if(this.regExp)for(var s=r.firstRow,a=r.lastRow,l=s;l<=a;l++){var c=this.cache[l];null==c&&((c=i.getMatchOffsets(n.getLine(l),this.regExp)).length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map((function(e){return new o(l,e.offset,l,e.offset+e.length)})),this.cache[l]=c.length?c:"");for(var u=c.length;u--;)t.drawSingleLineMarker(e,c[u].toScreenRange(n),this.clazz,r)}}}).call(r.prototype),t.SearchHighlight=r})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../range").Range;function o(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,o,r=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l<s.length;l++){if(-1==(o=(i=s[l]).range.compareStart(t,n)))return void e(null,t,n,r,a);if(!e(null,i.start.row,i.start.column,r,a)&&e(i.placeholder,i.start.row,i.start.column,r)||0===o)return;a=!i.sameRow,r=i.end.column}e(null,t,n,r,a)},this.getNextFoldTo=function(e,t){for(var n,i,o=0;o<this.folds.length;o++){if(-1==(i=(n=this.folds[o]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===i)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var i,o,r=this.getNextFoldTo(e,t);if(r)if(i=r.fold,"inside"==r.kind&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){var s=(o=this.folds).indexOf(i);for(0===s&&(this.start.column+=n);s<o.length;s++){if((i=o[s]).start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}},this.split=function(e,t){var n=this.getNextFoldTo(e,t);if(!n||"inside"==n.kind)return null;var i=n.fold,r=this.folds,s=this.foldData,a=r.indexOf(i),l=r[a-1];this.end.row=l.end.row,this.end.column=l.end.column;var c=new o(s,r=r.splice(a,r.length-a));return s.splice(s.indexOf(this)+1,0,c),c},this.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var i=this.foldData;i.splice(i.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach((function(t){e.push(" "+t.toString())})),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var i=this.folds[n];if((e-=i.start.column-t)<0)return{row:i.start.row,column:i.start.column+e};if((e-=i.placeholder.length)<0)return i.start;t=i.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(o.prototype),t.FoldLine=o})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("./range").Range.comparePoints,o=function(){this.ranges=[],this.$bias=1};(function(){this.comparePoints=i,this.pointIndex=function(e,t,n){for(var o=this.ranges,r=n||0;r<o.length;r++){var s=o[r],a=i(e,s.end);if(!(a>0)){var l=i(e,s.start);return 0===a?t&&0!==l?-r-2:r:l>0||0===l&&!t?r:-r-1}}return-r-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,o=(n=n.sort((function(e,t){return i(e.start,t.start)})))[0],r=1;r<n.length;r++){e=o,o=n[r];var s=i(e.end,o.start);s<0||(0!=s||e.isEmpty()||o.isEmpty())&&(i(e.end,o.end)<0&&(e.end.row=o.end.row,e.end.column=o.end.column),n.splice(r,1),t.push(o),o=e,r--)}return this.ranges=n,t},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var i=this.pointIndex({row:e,column:0});i<0&&(i=-i-1);var o=this.pointIndex({row:t,column:0},i);o<0&&(o=-o-1);for(var r=[],s=i;s<o;s++)r.push(n[s]);return r},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){for(var t=e.start,n=e.end,i=t.row,o=n.row,r=this.ranges,s=0,a=r.length;s<a;s++){if((u=r[s]).end.row>=i)break}if("insert"==e.action)for(var l=o-i,c=-t.column+n.column;s<a;s++){if((u=r[s]).start.row>i)break;if(u.start.row==i&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=c,u.start.row+=l)),u.end.row==i&&u.end.column>=t.column){if(u.end.column==t.column&&this.$bias<0)continue;u.end.column==t.column&&c>0&&s<a-1&&u.end.column>u.start.column&&u.end.column==r[s+1].start.column&&(u.end.column-=c),u.end.column+=c,u.end.row+=l}}else for(l=i-o,c=t.column-n.column;s<a;s++){if((u=r[s]).start.row>o)break;u.end.row<o&&(i<u.end.row||i==u.end.row&&t.column<u.end.column)?(u.end.row=i,u.end.column=t.column):u.end.row==o?u.end.column<=n.column?(l||u.end.column>t.column)&&(u.end.column=t.column,u.end.row=t.row):(u.end.column+=c,u.end.row+=l):u.end.row>o&&(u.end.row+=l),u.start.row<o&&(i<u.start.row||i==u.start.row&&t.column<u.start.column)?(u.start.row=i,u.start.column=t.column):u.start.row==o?u.start.column<=n.column?(l||u.start.column>t.column)&&(u.start.column=t.column,u.start.row=t.row):(u.start.column+=c,u.start.row+=l):u.start.row>o&&(u.start.row+=l)}if(0!=l&&s<a)for(;s<a;s++){var u;(u=r[s]).start.row+=l,u.end.row+=l}}}).call(o.prototype),t.RangeList=o})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("../range_list").RangeList,o=e("../lib/oop"),r=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};function s(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function a(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}o.inherits(r,i),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach((function(t){t.setFoldLine(e)}))},this.clone=function(){var e=this.range.clone(),t=new r(e,this.placeholder);return this.subFolds.forEach((function(e){t.subFolds.push(e.clone())})),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){var t,n;t=e,n=this.start,s(t.start,n),s(t.end,n);for(var i=e.start.row,o=e.start.column,r=0,a=-1;r<this.subFolds.length&&1==(a=this.subFolds[r].range.compare(i,o));r++);var l=this.subFolds[r],c=0;if(0==a){if(l.range.containsRange(e))return l.addSubFold(e);c=1}i=e.range.end.row,o=e.range.end.column;var u=r;for(a=-1;u<this.subFolds.length&&1==(a=this.subFolds[u].range.compare(i,o));u++);0==a&&u++;for(var h=this.subFolds.splice(r,u-r,e),d=0==a?h.length-1:h.length,p=c;p<d;p++)e.addSubFold(h[p]);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return function(e,t){a(e.start,t),a(e.end,t)}(e,this.start)}}.call(r.prototype)})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],(function(e,t,n){"use strict";var i=e("../range").Range,o=e("./fold_line").FoldLine,r=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,n){var i=this.getFoldLine(e);if(!i)return null;for(var o=i.folds,r=0;r<o.length;r++){var s=o[r].range;if(s.contains(e,t)){if(1==n&&s.isEnd(e,t)&&!s.isEmpty())continue;if(-1==n&&s.isStart(e,t)&&!s.isEmpty())continue;return o[r]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,i=this.$foldData,o=[];t.column+=1,n.column-=1;for(var r=0;r<i.length;r++){var s=i[r].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=i[r].folds,l=0;l<a.length;l++){var c=a[l];if(-2==(s=c.range.compareRange(e)))break;if(2!=s){if(42==s)break;o.push(c)}}}}return t.column-=1,n.column+=1,o},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach((function(e){t=t.concat(this.getFoldsInRange(e))}),this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var i=0;i<t[n].folds.length;i++)e.push(t[n].folds[i]);return e},this.getFoldStringAt=function(e,t,n,i){if(!(i=i||this.getFoldLine(e)))return null;for(var o,r,s={end:{column:0}},a=0;a<i.folds.length;a++){var l=(r=i.folds[a]).range.compareEnd(e,t);if(-1==l){o=this.getLine(r.start.row).substring(s.end.column,r.start.column);break}if(0===l)return null;s=r}return o||(o=this.getLine(r.start.row).substring(s.end.column)),-1==n?o.substring(0,t-s.end.column):1==n?o.substring(t-s.end.column):o},this.getFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i<n.length;i++){var o=n[i];if(o.start.row<=e&&o.end.row>=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i<n.length;i++){var o=n[i];if(o.end.row>=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,o=0;o<n.length;o++){var r=n[o],s=r.end.row,a=r.start.row;if(s>=t){a<t&&(a>=e?i-=t-a:i=0);break}s>=e&&(i-=a>=e?s-a:s-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,i=this.$foldData,s=!1;e instanceof r?n=e:(n=new r(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column,h=this.getFoldAt(a,l,1),d=this.getFoldAt(c,u,-1);if(h&&d==h)return h.addSubFold(n);h&&!h.range.isStart(a,l)&&this.removeFold(h),d&&!d.range.isEnd(c,u)&&this.removeFold(d);var p=this.getFoldsInRange(n.range);p.length>0&&(this.removeFolds(p),n.collapseChildren||p.forEach((function(e){n.addSubFold(e)})));for(var f=0;f<i.length;f++){var g=i[f];if(c==g.start.row){g.addFold(n),s=!0;break}if(a==g.end.row){if(g.addFold(n),s=!0,!n.sameRow){var m=i[f+1];if(m&&m.start.row==c){g.merge(m);break}}break}if(c<=g.start.row)break}return s||(g=this.$addFoldLine(new o(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(g.start.row,g.start.row):this.$updateRowLengthCache(g.start.row,g.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach((function(e){this.addFold(e)}),this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,i=t.end.row,o=this.$foldData,r=t.folds;if(1==r.length)o.splice(o.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))r.pop(),t.end.row=r[r.length-1].end.row,t.end.column=r[r.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))r.shift(),t.start.row=r[0].start.row,t.start.column=r[0].start.column;else if(e.sameRow)r.splice(r.indexOf(e),1);else{var s=t.split(e.start.row,e.start.column);(r=s.folds).shift(),s.start.row=r[0].start.row,s.start.column=r[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,i):this.$updateRowLengthCache(n,i)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach((function(e){this.removeFold(e)}),this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach((function(t){e.restoreRange(t),this.addFold(t)}),this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,o;if(null==e?(n=new i(0,0,this.getLength(),0),null==t&&(t=!0)):n="number"==typeof e?new i(e,0,e,this.getLine(e).length):"row"in e?i.fromPoints(e,e):e,o=this.getFoldsInRangeList(n),0!=t?this.removeFolds(o):this.expandFolds(o),o.length)return o},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,o){null==i&&(i=e.start.row),null==o&&(o=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var r=this.doc,s="";return e.walk((function(e,t,n,a){if(!(t<i)){if(t==i){if(n<o)return;a=Math.max(o,a)}s+=null!=e?e:r.getLine(t).substring(a,n)}}),t,n),s},this.getDisplayLine=function(e,t,n,i){var o,r=this.getFoldLine(e);return r?this.getFoldDisplayLine(r,e,t,n,i):(o=this.doc.getLine(e)).substring(i||0,t||o.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map((function(t){var n=t.folds.map((function(e){return e.clone()}));return new o(e,n)}))},this.toggleFold=function(e){var t,n,i=this.selection.getRange();if(i.isEmpty()){var o=i.start;if(t=this.getFoldAt(o.row,o.column))return void this.expandFold(t);(n=this.findMatchingBracket(o))?1==i.comparePoint(n)?i.end=n:(i.start=n,i.start.column++,i.end.column--):(n=this.findMatchingBracket({row:o.row,column:o.column+1}))?(1==i.comparePoint(n)?i.end=n:i.start=n,i.start.column++):i=this.getCommentFoldRange(o.row,o.column)||i}else{var r=this.getFoldsInRange(i);if(e&&r.length)return void this.expandFolds(r);1==r.length&&(t=r[0])}if(t||(t=this.getFoldAt(i.start.row,i.start.column)),t&&t.range.toString()==i.toString())this.expandFold(t);else{var s="...";if(!i.isMultiLine()){if((s=this.getTextRange(i)).length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,i)}},this.getCommentFoldRange=function(e,t,n){var o=new s(this,e,t),r=o.getCurrentToken(),a=r&&r.type;if(r&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start");var l=new RegExp(a),c=new i;if(1!=n){do{r=o.stepBackward()}while(r&&l.test(r.type));o.stepForward()}if(c.start.row=o.getCurrentTokenRow(),c.start.column=o.getCurrentTokenColumn()+2,o=new s(this,e,t),-1!=n){var u=-1;do{if(r=o.stepForward(),-1==u){var h=this.getState(o.$row);l.test(h)||(u=o.$row)}else if(o.$row>u)break}while(r&&l.test(r.type));r=o.stepBackward()}else r=o.getCurrentToken();return c.end.row=o.getCurrentTokenRow(),c.end.column=o.getCurrentTokenColumn()+r.value.length-2,c}},this.foldAll=function(e,t,n,i){null==n&&(n=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength();for(var r=e=e||0;r<t;r++)if(null==o[r]&&(o[r]=this.getFoldWidget(r)),"start"==o[r]&&(!i||i(r))){var s=this.getFoldWidgetRange(r);s&&s.isMultiLine()&&s.end.row<=t&&s.start.row>=e&&(r=s.end.row,s.collapseChildren=n,this.addFold("...",s))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),i=0;i<n.length;i++){var o=n[i];if("text"!=o.type||!/^\s+$/.test(o.value))return!!/comment/.test(o.type)}}))},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var i,o=e-1;o>=0;){var r=n[o];if(null==r&&(r=n[o]=this.getFoldWidget(o)),"start"==r){var s=this.getFoldWidgetRange(o);if(i||(i=s),s&&s.end.row>=e)break}o--}return{range:-1!==o&&s,firstRange:i}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),o="end"===n?-1:1,r=this.getFoldAt(e,-1===o?0:i.length,o);if(r)return t.children||t.all?this.removeFold(r):this.expandFold(r),r;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(r=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(r.range))return this.removeFold(r),r;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange){t=n.start.row;var o=this.getFoldAt(t,this.getLine(t).length,1);o?this.removeFold(o):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var i=e("../token_iterator").TokenIterator,o=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,r=n.charAt(e.column-1),s=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(s||(r=n.charAt(e.column),e={row:e.row,column:e.column+1},s=r&&r.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=o.fromPoints(e,a),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=o.fromPoints(a,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e){var t=this.getLine(e.row),n=t.charAt(e.column-1),i=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(i||(n=t.charAt(e.column),e={row:e.row,column:e.column+1},i=n&&n.match(/([\(\[\{])|([\)\]\}])/)),!i)return null;var r=new o(e.row,e.column-1,e.row,e.column),s=i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e);return s?[r,new o(s.row,s.column,s.row,s.column+1)]:[r]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var o=this.$brackets[e],r=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var u=c.charAt(l);if(u==o){if(0==(r-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(r+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var o=this.$brackets[e],r=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;l<u;){var h=c.charAt(l);if(h==o){if(0==(r-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(r+=1);l+=1}do{a=s.stepForward()}while(a&&!n.test(a.type));if(null==a)break;l=0}return null}}}})),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],(function(e,t,n){"use strict";var o=e("./lib/oop"),r=e("./lib/lang"),s=e("./bidihandler").BidiHandler,a=e("./config"),l=e("./lib/event_emitter").EventEmitter,c=e("./selection").Selection,u=e("./mode/text").Mode,h=e("./range").Range,d=e("./document").Document,p=e("./background_tokenizer").BackgroundTokenizer,f=e("./search_highlight").SearchHighlight,g=function e(t,n){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++e.$uid,this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==i(t)&&t.getLine||(t=new d(t)),this.setDocument(t),this.selection=new c(this),this.$bidiHandler=new s(this),a.resetOptions(this),this.setMode(n),a._signal("session",this)};g.$uid=0,function(){o.implement(this,l),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var o=n+i>>1,r=e[o];if(t>r)n=o+1;else{if(!(t<r))return o;i=o-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n,i=this.bgTokenizer.getTokens(e),o=0;if(null==t){var r=i.length-1;o=this.getLine(e).length}else for(r=0;r<i.length&&!((o+=i[r].value.length)>=t);r++);return(n=i[r])?(n.index=r,n.start=o-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,n,i){var o=this.$markerId++,r={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!i,id:o};return i?(this.$frontMarkers[o]=r,this._signal("changeFrontMarker")):(this.$backMarkers[o]=r,this._signal("changeBackMarker")),o},this.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new f(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,i){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var o=new h(e,0,t,1/0);return o.id=this.addMarker(o,n,"fullLine",i),o},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getWordRange=function(e,t){var n=this.getLine(e),i=!1;if(t>0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var o=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))o=/\s/;else o=this.nonTokenRe;var r=t;if(r>0){do{r--}while(r>=0&&n.charAt(r).match(o));r++}for(var s=t;s<n.length&&n.charAt(s).match(o);)s++;return new h(e,r,e,s)},this.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),i=this.getLine(n.end.row);i.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes=a.$modes,this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"===i(e)){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,o=n.path}else o=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new u),this.$modes[o]&&!n)return this.$onChangeMode(this.$modes[o]),void(t&&t());this.$modeId=o,a.loadModule(["mode",o],function(e){if(this.$modeId!==o)return t&&t();this.$modes[o]&&!n?this.$onChangeMode(this.$modes[o]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[o]=e,e.$id=o),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){var n=this.$mode;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var i=e.getTokenizer();if(void 0!==i.on){var o=this.onReloadTokenizer.bind(this);i.on("update",o)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(i);else{this.bgTokenizer=new p(i);var r=this;this.bgTokenizer.on("update",(function(e){r._signal("tokenizerUpdate",e)}))}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:e}))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){a.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach((function(t){t&&t.screenWidth>e&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,o=0,r=this.$foldData[o],s=r?r.start.row:1/0,a=t.length,l=0;l<a;l++){if(l>s){if((l=r.end.row+1)>=a)break;s=(r=this.$foldData[o++])?r.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;n<e.length;n++){var i=e[n];"insert"!=i.action&&"remove"!=i.action||this.doc.$safeApplyDelta(i)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t){function n(e){return t?"insert"!==e.action:"insert"===e.action}for(var i,o,r=0;r<e.length;r++){var s=e[r];s.start&&(i?n(s)?(o=s.start,-1==i.compare(o.row,o.column)&&i.setStart(o),o=s.end,1==i.compare(o.row,o.column)&&i.setEnd(o)):(o=s.start,-1==i.compare(o.row,o.column)&&(i=h.fromPoints(s.start,s.start))):i=n(s)?h.fromPoints(s.start,s.end):h.fromPoints(s.start,s.start))}return i},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var i=this.getTextRange(e),o=this.getFoldsInRange(e),r=h.fromPoints(t,t);if(!n){this.remove(e);var s=e.start.row-e.end.row;(c=s?-e.end.column:e.start.column-e.end.column)&&(r.start.row==e.end.row&&r.start.column>e.end.column&&(r.start.column+=c),r.end.row==e.end.row&&r.end.column>e.end.column&&(r.end.column+=c)),s&&r.start.row>=e.end.row&&(r.start.row+=s,r.end.row+=s)}if(r.end=this.insert(r.start,i),o.length){var a=e.start,l=r.start,c=(s=l.row-a.row,l.column-a.column);this.addFolds(o.map((function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=c),e.end.row==a.row&&(e.end.column+=c),e.start.row+=s,e.end.row+=s,e})))}return r},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new h(0,0,0,0),i=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var r=this.getLine(o);n.start.row=o,n.end.row=o;for(var s=0;s<i&&" "==r.charAt(s);++s);s<i&&"\t"==r.charAt(s)?(n.start.column=s,n.end.column=s+1):(n.start.column=0,n.end.column=s),this.remove(n)}},this.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((o=this.getRowFoldStart(e+n))<0)return 0;var i=o-e}else if(n>0){var o;if((o=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=o-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var r=new h(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(r).map((function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e})),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,a),s.length&&this.addFolds(s),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,o=e.end,r=i.row,s=o.row,a=s-r,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(r,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var u=0;if(g=this.getFoldLine(o.row)){g.addRemoveChars(o.row,o.column,i.column-o.column),g.shiftRow(-a);var h=this.getFoldLine(r);h&&h!==g&&(h.merge(g),g=h),u=c.indexOf(g)+1}for(;u<c.length;u++){(g=c[u]).start.row>=o.row&&g.shiftRow(-a)}s=r}else{var d=Array(a);d.unshift(r,0);var p=t?this.$wrapData:this.$rowLengthCache;p.splice.apply(p,d);c=this.$foldData,u=0;if(g=this.getFoldLine(r)){var f=g.range.compareInside(i.row,i.column);0==f?(g=g.split(i.row,i.column))&&(g.shiftRow(a),g.addRemoveChars(s,0,o.column-i.column)):-1==f&&(g.addRemoveChars(r,0,o.column-i.column),g.shiftRow(a)),u=c.indexOf(g)+1}for(;u<c.length;u++){var g;(g=c[u]).start.row>=r&&g.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(g=this.getFoldLine(r))&&g.addRemoveChars(r,i.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(r,s):this.$updateRowLengthCache(r,s),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,i){var o,r,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=n;for(i=Math.min(i,s.length-1);u<=i;)(r=this.getFoldLine(u,r))?(o=[],r.walk(function(n,i,r,a){var l;if(null!=n){(l=this.$getDisplayTokens(n,o.length))[0]=e;for(var c=1;c<l.length;c++)l[c]=t}else l=this.$getDisplayTokens(s[i].substring(a,r),o.length);o=o.concat(l)}.bind(this),r.end.row,s[r.end.row].length+1),l[r.start.row]=this.$computeWrapSplits(o,c,a),u=r.end.row+1):(o=this.$getDisplayTokens(s[u]),l[u]=this.$computeWrapSplits(o,c,a),u++)};var e=3,t=4;function n(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,i,o){if(0==n.length)return[];var r=[],s=n.length,a=0,l=0,c=this.$wrapAsCode,u=this.$indentedSoftWrap,h=i<=Math.max(2*o,8)||!1===u?0:Math.floor(i/2);function d(e){for(var t=e-a,i=a;i<e;i++){var s=n[i];12!==s&&2!==s||(t-=1)}r.length||(p=function(){var e=0;if(0===h)return e;if(u)for(var t=0;t<n.length;t++){var i=n[t];if(10==i)e+=1;else{if(11!=i){if(12==i)continue;break}e+=o}}return c&&!1!==u&&(e+=o),Math.min(e,h)}(),r.indent=p),l+=t,r.push(l),a=e}for(var p=0;s-a>i-p;){var f=a+i-p;if(n[f-1]>=10&&n[f]>=10)d(f);else if(n[f]!=e&&n[f]!=t){for(var g=Math.max(f-(i-(i>>2)),a-1);f>g&&n[f]<e;)f--;if(c){for(;f>g&&n[f]<e;)f--;for(;f>g&&9==n[f];)f--}else for(;f>g&&n[f]<10;)f--;f>g?d(++f):(2==n[f=a+i]&&f--,d(f-p))}else{for(;f!=a-1&&n[f]!=e;f--);if(f>a){d(f);continue}for(f=a+i;f<n.length&&n[f]==t;f++);if(f==n.length)break;d(f)}}return r},this.$getDisplayTokens=function(e,t){var i,o=[];t=t||0;for(var r=0;r<e.length;r++){var s=e.charCodeAt(r);if(9==s){i=this.getScreenTabSize(o.length+t),o.push(11);for(var a=1;a<i;a++)o.push(12)}else 32==s?o.push(10):s>39&&s<48||s>57&&s<64?o.push(9):s>=4352&&n(s)?o.push(1,2):o.push(1)}return o},this.$getStringScreenWidth=function(e,t,i){if(0==t)return[0,0];var o,r;for(null==t&&(t=1/0),i=i||0,r=0;r<e.length&&(9==(o=e.charCodeAt(r))?i+=this.getScreenTabSize(i):o>=4352&&n(o)?i+=2:i+=1,!(i>t));r++);return[i,r]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var i,o,r=0,s=0,a=0,l=0,c=this.$screenRowCache,u=this.$getRowCacheIndex(c,e),h=c.length;if(h&&u>=0){a=c[u],r=this.$docRowCache[u];var d=e>c[h-1]}else d=!h;for(var p=this.getLength()-1,f=this.getNextFoldLine(r),g=f?f.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(r))>e||r>=p);)a+=l,++r>g&&(r=f.end.row+1,g=(f=this.getNextFoldLine(r,f))?f.start.row:1/0),d&&(this.$docRowCache.push(r),this.$screenRowCache.push(a));if(f&&f.start.row<=r)i=this.getFoldDisplayLine(f),r=f.start.row;else{if(a+l<=e||r>p)return{row:p,column:this.getLine(p).length};i=this.getLine(r),f=null}var m=0,v=Math.floor(e-a);if(this.$useWrapMode){var b=this.$wrapData[r];b&&(o=b[v],v>0&&b.length&&(m=b.indent,s=b[v-1]||b[b.length-1],i=i.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,r,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,t-m)[1],this.$useWrapMode&&s>=o&&(s=o-1),f?f.idxToPosition(s):{row:r,column:s}},this.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i,o=0,r=null;(i=this.getFoldAt(e,t,1))&&(e=i.start.row,t=i.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){a=l[c],o=this.$screenRowCache[c];var h=e>l[u-1]}else h=!u;for(var d=this.getNextFoldLine(a),p=d?d.start.row:1/0;a<e;){if(a>=p){if((s=d.end.row+1)>e)break;p=(d=this.getNextFoldLine(s,d))?d.start.row:1/0}else s=a+1;o+=this.getRowLength(a),a=s,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(o))}var f="";d&&a>=p?(f=this.getFoldDisplayLine(d,e,t),r=d.start.row):(f=this.getLine(e).substring(0,t),r=e);var g=0;if(this.$useWrapMode){var m=this.$wrapData[r];if(m){for(var v=0;f.length>=m[v];)o++,v++;f=f.substring(m[v-1]||0,f.length),g=v>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(o+=this.lineWidgets[a].rowsAbove),{row:o,column:g+this.$getStringScreenWidth(f)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,o=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);i<n;){var r=this.$wrapData[i];e+=r?r.length+1:1,++i>o&&(i=t.end.row+1,o=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)e-=(t=s[a]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,i){if(0===n)return[0,0];var o,r;for(n||(n=1/0),i=i||0,r=0;r<t.length&&!((i+="\t"===(o=t.charAt(r))?this.getScreenTabSize(i):e.getCharacterWidth(o))>n);r++);return[i,r]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.selection.detach()},this.isFullWidth=n}.call(g.prototype),e("./edit_session/folding").Folding.call(g.prototype),e("./edit_session/bracket_match").BracketMatch.call(g.prototype),a.defineOptions(g.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=g})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),o=e("./lib/oop"),r=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return o.mixin(this.$options,e),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach((function(e,n,o,s){return i=new r(e,n,o,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start))||(i=null,!1)})),i},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,o=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,u=o.length-c;e:for(var h=a.offset||0;h<=u;h++){for(var d=0;d<c;d++)if(-1==o[h+d].search(a[d]))continue e;var p=o[h],f=o[h+c-1],g=p.length-p.match(a[0])[0].length,m=f.match(a[c-1])[0].length;l&&l.end.row===h&&l.end.column>g||(s.push(l=new r(h,g,h+c-1,m)),c>2&&(h=h+c-2))}}else for(var v=0;v<o.length;v++){var b=i.getMatchOffsets(o[v],a);for(d=0;d<b.length;d++){var y=b[d];s.push(new r(v,y.offset,v,y.offset+y.length))}}if(n){var w=n.start.column,x=n.start.column;for(v=0,d=s.length-1;v<d&&s[v].start.column<w&&s[v].start.row==n.start.row;)v++;for(;v<d&&s[d].end.column>x&&s[d].end.row==n.end.row;)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v<d;v++)s[v].start.row+=n.start.row,s[v].end.row+=n.start.row}return s},this.replace=function(e,t){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(i){var o=i.exec(e);if(!o||o[0].length!=e.length)return null;if(t=e.replace(i,t),n.preserveCase){t=t.split("");for(var r=Math.min(e.length,e.length);r--;){var s=e[r];s&&s.toLowerCase()!=s?t[r]=t[r].toUpperCase():t[r]=t[r].toLowerCase()}t=t.join("")}return t}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=i.escapeRegExp(n)),e.wholeWord&&(n=function(e,t){function n(e){return/\w/.test(e)||t.regExp?"\\b":""}return n(e[0])+e+n(e[e.length-1])}(n,e));var o=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,o);try{var r=new RegExp(n,o)}catch(e){r=!1}return e.re=r},this.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],o=0;o<n.length;o++)try{i.push(new RegExp(n[o],t))}catch(e){return!1}return i},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=1==t.backwards,o=0!=t.skipCurrent,r=t.range,s=t.start;s||(s=r?r[i?"end":"start"]:e.selection.getRange()),s.start&&(s=s[o!=i?"end":"start"]);var a=r?r.start.row:0,l=r?r.end.row:e.getLength()-1;if(i)var c=function(e){var n=s.row;if(!h(n,s.column,e)){for(n--;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=l,a=s.row;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return}};else c=function(e){var n=s.row;if(!h(n,s.column,e)){for(n+=1;n<=l;n++)if(h(n,0,e))return;if(0!=t.wrap)for(n=a,l=s.row;n<=l;n++)if(h(n,0,e))return}};if(t.$isMultiLine)var u=n.length,h=function(t,o,r){var s=i?t-u+1:t;if(!(s<0)){var a=e.getLine(s),l=a.search(n[0]);if(!(!i&&l<o||-1===l)){for(var c=1;c<u;c++)if(-1==(a=e.getLine(s+c)).search(n[c]))return;var h=a.match(n[u-1])[0].length;if(!(i&&h>o))return!!r(s,l,s+u-1,h)||void 0}}};else if(i)h=function(t,i,o){var r,s=e.getLine(t),a=[],l=0;for(n.lastIndex=0;r=n.exec(s);){var c=r[0].length;if(l=r.index,!c){if(l>=s.length)break;n.lastIndex=l+=1}if(r.index+c>i)break;a.push(r.index,c)}for(var u=a.length-1;u>=0;u-=2){var h=a[u-1];if(o(t,h,t,h+(c=a[u])))return!0}};else h=function(t,i,o){var r,s,a=e.getLine(t);for(n.lastIndex=i;s=n.exec(a);){var l=s[0].length;if(o(t,r=s.index,t,r+l))return!0;if(!l&&(n.lastIndex=r+=1,r>=a.length))return!1}};return{forEach:c}}}).call(s.prototype),t.Search=s})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var o=e("../lib/keys"),r=e("../lib/useragent"),s=o.KEY_MODS;function a(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function l(e,t){a.call(this,e,t),this.$singleCommand=!1}l.prototype=a.prototype,function(){function e(e){return"object"==i(e)&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var o in i){var r=i[o];if(r==e)delete i[o];else if(Array.isArray(r)){var s=r.indexOf(e);-1!=s&&(r.splice(s,1),1==r.length&&(i[o]=r[0]))}}},this.bindKey=function(e,t,n){if("object"==i(e)&&e&&(null==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var i="";if(-1!=e.indexOf(" ")){var o=e.split(/\s+/);e=o.pop(),o.forEach((function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var r=this.parseKeys(e),a=s[r.hashId]+r.key;this._addCommandToBinding(i+a,t,n)}),this)},this._addCommandToBinding=function(t,n,i){var o,r=this.commandKeyBinding;if(n)if(!r[t]||this.$singleCommand)r[t]=n;else{Array.isArray(r[t])?-1!=(o=r[t].indexOf(n))&&r[t].splice(o,1):r[t]=[r[t]],"number"!=typeof i&&(i=e(n));var s=r[t];for(o=0;o<s.length;o++){if(e(s[o])>i)break}s.splice(o,0,n)}else delete r[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"===i(n)&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),i=o[n];if(o.FUNCTION_KEYS[i])n=o.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var r=0,s=t.length;s--;){var a=o.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;r|=a}return{key:n,hashId:r}},this.findKeyCommand=function(e,t){var n=s[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,i){if(!(i<0)){var o=s[t]+n,r=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,r=this.commandKeyBinding[e.$keyChain]||r),!r||"chainKeys"!=r&&"chainKeys"!=r[r.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:r}):(e.$keyChain=e.$keyChain||o,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(a.prototype),t.HashHandler=a,t.MultiHashHandler=l})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("../keyboard/hash_handler").MultiHashHandler,r=e("../lib/event_emitter").EventEmitter,s=function(e,t){o.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};i.inherits(s,o),function(){i.implement(this,r),this.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var o={editor:t,command:e,args:n};return o.returnValue=this._emit("exec",o),this._signal("afterExec",o),!1!==o.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(s.prototype),t.CommandManager=s})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var i=e("../lib/lang"),o=e("../config"),r=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",bindKey:s("Alt-E","F4"),exec:function(e){o.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),o=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=o.row+1;c++){var u=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}o.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new r(n.row,0,o.row+2,0),l),a>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(s=e.session.doc.getLine(n.row).length>s?s+1:s,e.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,o=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;s<i.length;s++)s==i.length-1&&(i[s].end.row===t&&i[s].end.column===n||o.push(new r(i[s].end.row,i[s].end.column,t,n))),0===s?0===i[s].start.row&&0===i[s].start.column||o.push(new r(0,0,i[s].start.row,i[s].start.column)):o.push(new r(i[s-1].end.row,i[s-1].end.column,i[s].start.row,i[s].start.column));e.exitMultiSelectMode(),e.clearSelection();for(s=0;s<o.length;s++)e.selection.addRange(o[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command pallete",bindKey:s("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var a=1;a<9;a++)t.commands.push({name:"foldToLevel"+a,description:"Fold To Level "+a,level:a,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})})),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/clipboard"],(function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var o=e("./lib/oop"),r=e("./lib/dom"),s=e("./lib/lang"),a=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,h=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,p=e("./search").Search,f=e("./range").Range,g=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,b=e("./config"),y=e("./token_iterator").TokenIterator,w=e("./clipboard"),x=function e(t,n,o){this.$toDestroy=[];var r=t.getContainerElement();this.container=r,this.renderer=t,this.id="editor"+ ++e.$uid,this.commands=new m(a.isMac?"mac":"win",v),"object"==("undefined"==typeof document?"undefined":i(document))&&(this.textInput=new l(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new u(this)),this.keyBinding=new h(this),this.$search=(new p).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(n||o&&o.session||new d("")),b.resetOptions(this),o&&this.setOptions(o),b._signal("editor",this)};x.$uid=0,function(){o.implement(this,g),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name)return;if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),o=this.renderer.layerConfig;(i.start.row>=o.lastRow||i.end.row<=o.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var r=this.selection.toJSON();this.curOp.selectionAfter=r,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(r),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;b.loadModule(["keybinding",e],(function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=t.getMatchingBracketRanges(e.getCursorPosition());if(!n&&t.$mode.getMatching&&(n=t.$mode.getMatching(e.session)),n){var i="ace_bracket";Array.isArray(n)?1==n.length&&(i="ace_error_bracket"):n=[n],2==n.length&&(0==f.comparePoints(n[0].end,n[1].start)?n=[f.fromPoints(n[0].start,n[1].end)]:0==f.comparePoints(n[0].start,n[1].end)&&(n=[f.fromPoints(n[1].start,n[0].end)])),t.$bracketHighlight={ranges:n,markerIds:n.map((function(e){return t.addMarker(e,i,"text")}))}}}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout((function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),i=new y(e.session,n.row,n.column),o=i.getCurrentToken();if(!o||!/\b(?:tag-open|tag-name)/.test(o.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1===o.type.indexOf("tag-open")||(o=i.stepForward())){var r=o.value,s=o.value,a=0,l=i.stepBackward();if("<"===l.value)do{l=o,(o=i.stepForward())&&(-1!==
|