Visual Portfolio, Photo Gallery & Post Grid - Version 2.3.0

Version Description

Download this release

Release Info

Developer nko
Plugin Icon 128x128 Visual Portfolio, Photo Gallery & Post Grid
Version 2.3.0
Comparing to
See all releases

Code changes from version 2.2.0 to 2.3.0

assets/admin/css/style-rtl.min.css CHANGED
@@ -2,4 +2,4 @@
2
  * Name : Visual Portfolio
3
  * Version : @@plugin_version
4
  * Author : nK https://nkdev.info
5
- */.dashicons-visual-portfolio,.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon.svg");background-repeat:no-repeat;background-position:center center;background-size:18px;opacity:.6}.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon-mce.svg");opacity:1}.menu-top.current .dashicons-visual-portfolio,.menu-top:hover .dashicons-visual-portfolio,.wp-has-current-submenu .dashicons-visual-portfolio{opacity:1}.vc_element-icon[data-is-container="true"].icon-visual-portfolio,.vc_element-icon.icon-visual-portfolio{background-position:50% 50%}.vc_element-icon.icon-visual-portfolio,.vc_control-visual-portfolio{position:relative;overflow:hidden;background-image:url("../images/icon-vc.png");background-position:50% 50%;background-size:cover;border-radius:3px}.vc_add-element-container .icon-visual-portfolio{position:absolute}.vc_control-visual-portfolio{display:inline-block;width:18px;height:18px;margin:0 2px;cursor:pointer}.vc_controls-row .vc_control-visual-portfolio{float:left;margin:4px}.vc_control-visual-portfolio-overlay{position:absolute;top:0;left:0;bottom:0;right:0;z-index:2}.vp-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-sizing:border-box;box-sizing:border-box;margin-left:-15px;margin-right:-15px}.vp-col-1,.vp-col-2,.vp-col-3,.vp-col-4,.vp-col-5,.vp-col-6,.vp-col-7,.vp-col-8,.vp-col-9,.vp-col-10,.vp-col-11,.vp-col-12{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-sizing:border-box;box-sizing:border-box;padding-left:15px;padding-right:15px}.vp-col-1{-ms-flex-preferred-size:8.33333%;flex-basis:8.33333%;max-width:8.33333%}.vp-col-2{-ms-flex-preferred-size:16.66667%;flex-basis:16.66667%;max-width:16.66667%}.vp-col-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.vp-col-4{-ms-flex-preferred-size:33.33333%;flex-basis:33.33333%;max-width:33.33333%}.vp-col-5{-ms-flex-preferred-size:41.66667%;flex-basis:41.66667%;max-width:41.66667%}.vp-col-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.vp-col-7{-ms-flex-preferred-size:58.33333%;flex-basis:58.33333%;max-width:58.33333%}.vp-col-8{-ms-flex-preferred-size:66.66667%;flex-basis:66.66667%;max-width:66.66667%}.vp-col-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.vp-col-10{-ms-flex-preferred-size:83.33333%;flex-basis:83.33333%;max-width:83.33333%}.vp-col-11{-ms-flex-preferred-size:91.66667%;flex-basis:91.66667%;max-width:91.66667%}.vp-col-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix .vp-control-html{margin-bottom:0}.vp-oembed-preview{position:relative;width:100%;padding-top:56.25%;color:#a2a2a2;background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-oembed-preview::after{content:"\f126";position:absolute;display:block;top:50%;right:50%;width:20px;height:20px;margin-top:-10px;margin-right:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;z-index:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.vp-oembed-preview>iframe{position:absolute;top:0;right:0;width:100%;height:100%;z-index:2}.vpf-meta-video-panel>.components-panel__body-title .components-panel__icon{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1;margin-left:10px;margin-right:0}.vpf-meta-image-focal-point-panel>.components-panel__body-title .components-panel__icon{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1;margin-left:10px;margin-right:0}.vpf-meta-image-focal-point-panel .components-focal-point-picker_position-display-container .components-base-control__label{max-width:100%}.vpf-meta-image-focal-point-panel .components-focal-point-picker_position-display-container .components-base-control{margin-bottom:0}.vp-input{width:100%}.vp-portfolio__thumbnail{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;border-radius:3px}.vp-portfolio__thumbnail img{position:absolute;display:block;top:0;right:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.vp-portfolio__thumbnail:empty{background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-portfolio__thumbnail:empty,.vp-portfolio__thumbnail:empty:hover,.vp-portfolio__thumbnail:empty:active,.vp-portfolio__thumbnail:empty:focus{color:#a2a2a2}.vp-portfolio__thumbnail:empty::after{content:"\f128";position:absolute;display:block;top:50%;right:50%;width:20px;height:20px;margin-top:-10px;margin-right:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-list-table th.column-portfolio_post_thumbs{width:70px}.wp-list-table th.column-vp_lists_post_icon{width:28px}.wp-list-table th.column-vp_lists_post_shortcode{width:250px}@media screen and (max-width: 782px){.wp-list-table th.column-portfolio_post_thumbs,.wp-list-table th.column-vp_lists_post_icon{display:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs,.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-vp_lists_post_icon{float:right;width:70px !important;min-width:70px}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-vp_lists_post_icon{width:40px !important}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs::before{content:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-title{overflow:hidden;clear:left}}.vp-portfolio-list__icon{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;color:inherit;color:#868686;background-color:#f1f1f1;border:1px solid #e8e8e8;border-radius:3px}.vp-portfolio-list__icon:hover,.vp-portfolio-list__icon:active,.vp-portfolio-list__icon:focus{color:#5f5f5f}.vp-portfolio-list__icon svg{position:absolute;display:block;top:15%;right:15%;width:70%;height:70%;-o-object-fit:cover;object-fit:cover}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>td{pointer-events:none;opacity:.5}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>th{position:relative;padding-left:50px}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>th label::after{content:"PRO";position:absolute;display:block;top:30px;left:10px;padding:.2em .8em;font-size:.8em;color:#fff;background-color:#2540cc;border-radius:1em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.vpf-settings-control-pro,.vpf-control-wrap-pro_note{display:none}
2
  * Name : Visual Portfolio
3
  * Version : @@plugin_version
4
  * Author : nK https://nkdev.info
5
+ */#adminmenu a[href*="page=visual_portfolio_go_pro"],.wp-list-table.plugins a[href*="page=visual_portfolio_go_pro"]{font-weight:700;color:#ff6a38}#adminmenu a[href*="page=visual_portfolio_go_pro"] .dashicons,.wp-list-table.plugins a[href*="page=visual_portfolio_go_pro"] .dashicons{-webkit-transition:none;-o-transition:none;transition:none}#adminmenu a[href*="page=visual_portfolio_go_pro"]:hover,#adminmenu a[href*="page=visual_portfolio_go_pro"]:focus,.wp-list-table.plugins a[href*="page=visual_portfolio_go_pro"]:hover,.wp-list-table.plugins a[href*="page=visual_portfolio_go_pro"]:focus{color:#f59372}.dashicons-visual-portfolio,.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon.svg");background-repeat:no-repeat;background-position:center center;background-size:18px;opacity:.6}.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon-mce.svg");opacity:1}.menu-top.current .dashicons-visual-portfolio,.menu-top:hover .dashicons-visual-portfolio,.wp-has-current-submenu .dashicons-visual-portfolio{opacity:1}.vc_element-icon[data-is-container="true"].icon-visual-portfolio,.vc_element-icon.icon-visual-portfolio{background-position:50% 50%}.vc_element-icon.icon-visual-portfolio,.vc_control-visual-portfolio{position:relative;overflow:hidden;background-image:url("../images/icon-vc.png");background-position:50% 50%;background-size:cover;border-radius:3px}.vc_add-element-container .icon-visual-portfolio{position:absolute}.vc_control-visual-portfolio{display:inline-block;width:18px;height:18px;margin:0 2px;cursor:pointer}.vc_controls-row .vc_control-visual-portfolio{float:left;margin:4px}.vc_control-visual-portfolio-overlay{position:absolute;top:0;left:0;bottom:0;right:0;z-index:2}.vp-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-sizing:border-box;box-sizing:border-box;margin-left:-15px;margin-right:-15px}.vp-col-1,.vp-col-2,.vp-col-3,.vp-col-4,.vp-col-5,.vp-col-6,.vp-col-7,.vp-col-8,.vp-col-9,.vp-col-10,.vp-col-11,.vp-col-12{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-sizing:border-box;box-sizing:border-box;padding-left:15px;padding-right:15px}.vp-col-1{-ms-flex-preferred-size:8.33333%;flex-basis:8.33333%;max-width:8.33333%}.vp-col-2{-ms-flex-preferred-size:16.66667%;flex-basis:16.66667%;max-width:16.66667%}.vp-col-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.vp-col-4{-ms-flex-preferred-size:33.33333%;flex-basis:33.33333%;max-width:33.33333%}.vp-col-5{-ms-flex-preferred-size:41.66667%;flex-basis:41.66667%;max-width:41.66667%}.vp-col-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.vp-col-7{-ms-flex-preferred-size:58.33333%;flex-basis:58.33333%;max-width:58.33333%}.vp-col-8{-ms-flex-preferred-size:66.66667%;flex-basis:66.66667%;max-width:66.66667%}.vp-col-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.vp-col-10{-ms-flex-preferred-size:83.33333%;flex-basis:83.33333%;max-width:83.33333%}.vp-col-11{-ms-flex-preferred-size:91.66667%;flex-basis:91.66667%;max-width:91.66667%}.vp-col-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix .vp-control-html{margin-bottom:0}.vp-oembed-preview{position:relative;width:100%;padding-top:56.25%;color:#a2a2a2;background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-oembed-preview::after{content:"\f126";position:absolute;display:block;top:50%;right:50%;width:20px;height:20px;margin-top:-10px;margin-right:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;z-index:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.vp-oembed-preview>iframe{position:absolute;top:0;right:0;width:100%;height:100%;z-index:2}.vpf-meta-video-panel>.components-panel__body-title .components-panel__icon{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1;margin-left:10px;margin-right:0}.vpf-meta-image-focal-point-panel>.components-panel__body-title .components-panel__icon{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1;margin-left:10px;margin-right:0}.vpf-meta-image-focal-point-panel .components-focal-point-picker_position-display-container .components-base-control__label{max-width:100%}.vpf-meta-image-focal-point-panel .components-focal-point-picker_position-display-container .components-base-control{margin-bottom:0}.vp-input{width:100%}.vp-portfolio__thumbnail{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;border-radius:3px}.vp-portfolio__thumbnail img{position:absolute;display:block;top:0;right:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.vp-portfolio__thumbnail:empty{background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-portfolio__thumbnail:empty,.vp-portfolio__thumbnail:empty:hover,.vp-portfolio__thumbnail:empty:active,.vp-portfolio__thumbnail:empty:focus{color:#a2a2a2}.vp-portfolio__thumbnail:empty::after{content:"\f128";position:absolute;display:block;top:50%;right:50%;width:20px;height:20px;margin-top:-10px;margin-right:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-list-table th.column-portfolio_post_thumbs{width:70px}.wp-list-table th.column-vp_lists_post_icon{width:28px}.wp-list-table th.column-vp_lists_post_shortcode{width:250px}@media screen and (max-width: 782px){.wp-list-table th.column-portfolio_post_thumbs,.wp-list-table th.column-vp_lists_post_icon{display:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs,.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-vp_lists_post_icon{float:right;width:70px !important;min-width:70px}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-vp_lists_post_icon{width:40px !important}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs::before{content:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-title{overflow:hidden;clear:left}}.vp-portfolio-list__icon{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;color:inherit;color:#868686;background-color:#f1f1f1;border:1px solid #e8e8e8;border-radius:3px}.vp-portfolio-list__icon:hover,.vp-portfolio-list__icon:active,.vp-portfolio-list__icon:focus{color:#5f5f5f}.vp-portfolio-list__icon svg{position:absolute;display:block;top:15%;right:15%;width:70%;height:70%;-o-object-fit:cover;object-fit:cover}.portfolio_page_visual-portfolio-settings .metabox-holder .notice{padding:15px}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>td{pointer-events:none;opacity:.5}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro .vpf-settings-control-pro-label{position:relative;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:18px;height:18px;margin-right:10px;font-family:sans-serif;font-size:11px;line-height:18px;color:#fff;text-align:center;cursor:pointer;background-color:#4c4c4c;border-radius:10px}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro .vpf-settings-control-pro-label>span{position:absolute;display:none;bottom:100%;width:130px;padding:5px;margin-bottom:10px;background-color:rgba(0,0,0,0.8);border-radius:4px;z-index:9990}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro .vpf-settings-control-pro-label:hover>span,.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro .vpf-settings-control-pro-label:focus>span{display:block}.portfolio_page_visual-portfolio-settings .social_pro_info>th{display:none}.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro{max-width:240px;padding:20px;text-align:center;background-color:#e2e2e2;border-radius:4px}.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro h3{margin-top:0;margin-bottom:15px;font-size:13px}.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro p{margin-bottom:1em;font-size:13px}.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro-button{display:inline-block;padding:7px 15px;margin-top:5px;text-decoration:none;background:#2540cc;border-radius:3px}.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro-button,.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro-button:hover,.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro-button:focus,.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro-button:active{color:#fff}.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro-button:hover,.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro-button:focus{background:#314cda}#vp_social_integrations h2,#vp_social_integrations .submit{display:none}
assets/admin/css/style.min.css CHANGED
@@ -2,4 +2,4 @@
2
  * Name : Visual Portfolio
3
  * Version : @@plugin_version
4
  * Author : nK https://nkdev.info
5
- */.dashicons-visual-portfolio,.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon.svg");background-repeat:no-repeat;background-position:center center;background-size:18px;opacity:.6}.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon-mce.svg");opacity:1}.menu-top.current .dashicons-visual-portfolio,.menu-top:hover .dashicons-visual-portfolio,.wp-has-current-submenu .dashicons-visual-portfolio{opacity:1}.vc_element-icon[data-is-container="true"].icon-visual-portfolio,.vc_element-icon.icon-visual-portfolio{background-position:50% 50%}.vc_element-icon.icon-visual-portfolio,.vc_control-visual-portfolio{position:relative;overflow:hidden;background-image:url("../images/icon-vc.png");background-position:50% 50%;background-size:cover;border-radius:3px}.vc_add-element-container .icon-visual-portfolio{position:absolute}.vc_control-visual-portfolio{display:inline-block;width:18px;height:18px;margin:0 2px;cursor:pointer}.vc_controls-row .vc_control-visual-portfolio{float:right;margin:4px}.vc_control-visual-portfolio-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2}.vp-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-sizing:border-box;box-sizing:border-box;margin-right:-15px;margin-left:-15px}.vp-col-1,.vp-col-2,.vp-col-3,.vp-col-4,.vp-col-5,.vp-col-6,.vp-col-7,.vp-col-8,.vp-col-9,.vp-col-10,.vp-col-11,.vp-col-12{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:15px;padding-left:15px}.vp-col-1{-ms-flex-preferred-size:8.33333%;flex-basis:8.33333%;max-width:8.33333%}.vp-col-2{-ms-flex-preferred-size:16.66667%;flex-basis:16.66667%;max-width:16.66667%}.vp-col-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.vp-col-4{-ms-flex-preferred-size:33.33333%;flex-basis:33.33333%;max-width:33.33333%}.vp-col-5{-ms-flex-preferred-size:41.66667%;flex-basis:41.66667%;max-width:41.66667%}.vp-col-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.vp-col-7{-ms-flex-preferred-size:58.33333%;flex-basis:58.33333%;max-width:58.33333%}.vp-col-8{-ms-flex-preferred-size:66.66667%;flex-basis:66.66667%;max-width:66.66667%}.vp-col-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.vp-col-10{-ms-flex-preferred-size:83.33333%;flex-basis:83.33333%;max-width:83.33333%}.vp-col-11{-ms-flex-preferred-size:91.66667%;flex-basis:91.66667%;max-width:91.66667%}.vp-col-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix .vp-control-html{margin-bottom:0}.vp-oembed-preview{position:relative;width:100%;padding-top:56.25%;color:#a2a2a2;background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-oembed-preview::after{content:"\f126";position:absolute;display:block;top:50%;left:50%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;z-index:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.vp-oembed-preview>iframe{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2}.vpf-meta-video-panel>.components-panel__body-title .components-panel__icon{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1;margin-right:10px;margin-left:0}.vpf-meta-image-focal-point-panel>.components-panel__body-title .components-panel__icon{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1;margin-right:10px;margin-left:0}.vpf-meta-image-focal-point-panel .components-focal-point-picker_position-display-container .components-base-control__label{max-width:100%}.vpf-meta-image-focal-point-panel .components-focal-point-picker_position-display-container .components-base-control{margin-bottom:0}.vp-input{width:100%}.vp-portfolio__thumbnail{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;border-radius:3px}.vp-portfolio__thumbnail img{position:absolute;display:block;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.vp-portfolio__thumbnail:empty{background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-portfolio__thumbnail:empty,.vp-portfolio__thumbnail:empty:hover,.vp-portfolio__thumbnail:empty:active,.vp-portfolio__thumbnail:empty:focus{color:#a2a2a2}.vp-portfolio__thumbnail:empty::after{content:"\f128";position:absolute;display:block;top:50%;left:50%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-list-table th.column-portfolio_post_thumbs{width:70px}.wp-list-table th.column-vp_lists_post_icon{width:28px}.wp-list-table th.column-vp_lists_post_shortcode{width:250px}@media screen and (max-width: 782px){.wp-list-table th.column-portfolio_post_thumbs,.wp-list-table th.column-vp_lists_post_icon{display:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs,.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-vp_lists_post_icon{float:left;width:70px !important;min-width:70px}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-vp_lists_post_icon{width:40px !important}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs::before{content:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-title{overflow:hidden;clear:right}}.vp-portfolio-list__icon{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;color:inherit;color:#868686;background-color:#f1f1f1;border:1px solid #e8e8e8;border-radius:3px}.vp-portfolio-list__icon:hover,.vp-portfolio-list__icon:active,.vp-portfolio-list__icon:focus{color:#5f5f5f}.vp-portfolio-list__icon svg{position:absolute;display:block;top:15%;left:15%;width:70%;height:70%;-o-object-fit:cover;object-fit:cover}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>td{pointer-events:none;opacity:.5}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>th{position:relative;padding-right:50px}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>th label::after{content:"PRO";position:absolute;display:block;top:30px;right:10px;padding:.2em .8em;font-size:.8em;color:#fff;background-color:#2540cc;border-radius:1em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.vpf-settings-control-pro,.vpf-control-wrap-pro_note{display:none}
2
  * Name : Visual Portfolio
3
  * Version : @@plugin_version
4
  * Author : nK https://nkdev.info
5
+ */#adminmenu a[href*="page=visual_portfolio_go_pro"],.wp-list-table.plugins a[href*="page=visual_portfolio_go_pro"]{font-weight:700;color:#ff6a38}#adminmenu a[href*="page=visual_portfolio_go_pro"] .dashicons,.wp-list-table.plugins a[href*="page=visual_portfolio_go_pro"] .dashicons{-webkit-transition:none;-o-transition:none;transition:none}#adminmenu a[href*="page=visual_portfolio_go_pro"]:hover,#adminmenu a[href*="page=visual_portfolio_go_pro"]:focus,.wp-list-table.plugins a[href*="page=visual_portfolio_go_pro"]:hover,.wp-list-table.plugins a[href*="page=visual_portfolio_go_pro"]:focus{color:#f59372}.dashicons-visual-portfolio,.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon.svg");background-repeat:no-repeat;background-position:center center;background-size:18px;opacity:.6}.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon-mce.svg");opacity:1}.menu-top.current .dashicons-visual-portfolio,.menu-top:hover .dashicons-visual-portfolio,.wp-has-current-submenu .dashicons-visual-portfolio{opacity:1}.vc_element-icon[data-is-container="true"].icon-visual-portfolio,.vc_element-icon.icon-visual-portfolio{background-position:50% 50%}.vc_element-icon.icon-visual-portfolio,.vc_control-visual-portfolio{position:relative;overflow:hidden;background-image:url("../images/icon-vc.png");background-position:50% 50%;background-size:cover;border-radius:3px}.vc_add-element-container .icon-visual-portfolio{position:absolute}.vc_control-visual-portfolio{display:inline-block;width:18px;height:18px;margin:0 2px;cursor:pointer}.vc_controls-row .vc_control-visual-portfolio{float:right;margin:4px}.vc_control-visual-portfolio-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2}.vp-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-sizing:border-box;box-sizing:border-box;margin-right:-15px;margin-left:-15px}.vp-col-1,.vp-col-2,.vp-col-3,.vp-col-4,.vp-col-5,.vp-col-6,.vp-col-7,.vp-col-8,.vp-col-9,.vp-col-10,.vp-col-11,.vp-col-12{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:15px;padding-left:15px}.vp-col-1{-ms-flex-preferred-size:8.33333%;flex-basis:8.33333%;max-width:8.33333%}.vp-col-2{-ms-flex-preferred-size:16.66667%;flex-basis:16.66667%;max-width:16.66667%}.vp-col-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.vp-col-4{-ms-flex-preferred-size:33.33333%;flex-basis:33.33333%;max-width:33.33333%}.vp-col-5{-ms-flex-preferred-size:41.66667%;flex-basis:41.66667%;max-width:41.66667%}.vp-col-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.vp-col-7{-ms-flex-preferred-size:58.33333%;flex-basis:58.33333%;max-width:58.33333%}.vp-col-8{-ms-flex-preferred-size:66.66667%;flex-basis:66.66667%;max-width:66.66667%}.vp-col-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.vp-col-10{-ms-flex-preferred-size:83.33333%;flex-basis:83.33333%;max-width:83.33333%}.vp-col-11{-ms-flex-preferred-size:91.66667%;flex-basis:91.66667%;max-width:91.66667%}.vp-col-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix .vp-control-html{margin-bottom:0}.vp-oembed-preview{position:relative;width:100%;padding-top:56.25%;color:#a2a2a2;background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-oembed-preview::after{content:"\f126";position:absolute;display:block;top:50%;left:50%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;z-index:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.vp-oembed-preview>iframe{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2}.vpf-meta-video-panel>.components-panel__body-title .components-panel__icon{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1;margin-right:10px;margin-left:0}.vpf-meta-image-focal-point-panel>.components-panel__body-title .components-panel__icon{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1;margin-right:10px;margin-left:0}.vpf-meta-image-focal-point-panel .components-focal-point-picker_position-display-container .components-base-control__label{max-width:100%}.vpf-meta-image-focal-point-panel .components-focal-point-picker_position-display-container .components-base-control{margin-bottom:0}.vp-input{width:100%}.vp-portfolio__thumbnail{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;border-radius:3px}.vp-portfolio__thumbnail img{position:absolute;display:block;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.vp-portfolio__thumbnail:empty{background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-portfolio__thumbnail:empty,.vp-portfolio__thumbnail:empty:hover,.vp-portfolio__thumbnail:empty:active,.vp-portfolio__thumbnail:empty:focus{color:#a2a2a2}.vp-portfolio__thumbnail:empty::after{content:"\f128";position:absolute;display:block;top:50%;left:50%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-list-table th.column-portfolio_post_thumbs{width:70px}.wp-list-table th.column-vp_lists_post_icon{width:28px}.wp-list-table th.column-vp_lists_post_shortcode{width:250px}@media screen and (max-width: 782px){.wp-list-table th.column-portfolio_post_thumbs,.wp-list-table th.column-vp_lists_post_icon{display:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs,.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-vp_lists_post_icon{float:left;width:70px !important;min-width:70px}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-vp_lists_post_icon{width:40px !important}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs::before{content:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-title{overflow:hidden;clear:right}}.vp-portfolio-list__icon{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;color:inherit;color:#868686;background-color:#f1f1f1;border:1px solid #e8e8e8;border-radius:3px}.vp-portfolio-list__icon:hover,.vp-portfolio-list__icon:active,.vp-portfolio-list__icon:focus{color:#5f5f5f}.vp-portfolio-list__icon svg{position:absolute;display:block;top:15%;left:15%;width:70%;height:70%;-o-object-fit:cover;object-fit:cover}.portfolio_page_visual-portfolio-settings .metabox-holder .notice{padding:15px}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro>td{pointer-events:none;opacity:.5}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro .vpf-settings-control-pro-label{position:relative;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:18px;height:18px;margin-left:10px;font-family:sans-serif;font-size:11px;line-height:18px;color:#fff;text-align:center;cursor:pointer;background-color:#4c4c4c;border-radius:10px}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro .vpf-settings-control-pro-label>span{position:absolute;display:none;bottom:100%;width:130px;padding:5px;margin-bottom:10px;background-color:rgba(0,0,0,0.8);border-radius:4px;z-index:9990}.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro .vpf-settings-control-pro-label:hover>span,.portfolio_page_visual-portfolio-settings .vpf-settings-control-pro .vpf-settings-control-pro-label:focus>span{display:block}.portfolio_page_visual-portfolio-settings .social_pro_info>th{display:none}.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro{max-width:240px;padding:20px;text-align:center;background-color:#e2e2e2;border-radius:4px}.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro h3{margin-top:0;margin-bottom:15px;font-size:13px}.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro p{margin-bottom:1em;font-size:13px}.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro-button{display:inline-block;padding:7px 15px;margin-top:5px;text-decoration:none;background:#2540cc;border-radius:3px}.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro-button,.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro-button:hover,.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro-button:focus,.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro-button:active{color:#fff}.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro-button:hover,.portfolio_page_visual-portfolio-settings .vpf-settings-info-pro-button:focus{background:#314cda}#vp_social_integrations h2,#vp_social_integrations .submit{display:none}
assets/admin/js/elementor.js CHANGED
@@ -2,7 +2,7 @@
2
  * Additional js for Elementor
3
  *
4
  * Name : Visual Portfolio
5
- * Version : 2.2.0
6
  * Author : nK https://nkdev.info
7
  */
8
  import { throttle } from 'throttle-debounce';
2
  * Additional js for Elementor
3
  *
4
  * Name : Visual Portfolio
5
+ * Version : 2.3.0
6
  * Author : nK https://nkdev.info
7
  */
8
  import { throttle } from 'throttle-debounce';
assets/admin/js/mce-dropdown.js CHANGED
@@ -1,6 +1,6 @@
1
  /*!
2
  * Name : Visual Portfolio
3
- * Version : 2.2.0
4
  * Author : nK https://nkdev.info
5
  */
6
  const {
1
  /*!
2
  * Name : Visual Portfolio
3
+ * Version : 2.3.0
4
  * Author : nK https://nkdev.info
5
  */
6
  const {
assets/admin/js/script.js CHANGED
@@ -1,6 +1,6 @@
1
  /*!
2
  * Name : Visual Portfolio
3
- * Version : 2.2.0
4
  * Author : nK https://nkdev.info
5
  */
6
  import { debounce } from 'throttle-debounce';
1
  /*!
2
  * Name : Visual Portfolio
3
+ * Version : 2.3.0
4
  * Author : nK https://nkdev.info
5
  */
6
  import { debounce } from 'throttle-debounce';
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.2.0
6
  * Author : nK https://nkdev.info
7
  */
8
  const {
2
  * Additional js for frontend VC
3
  *
4
  * Name : Visual Portfolio
5
+ * Version : 2.3.0
6
  * Author : nK https://nkdev.info
7
  */
8
  const {
assets/js/plugin-fancybox.js CHANGED
@@ -23,7 +23,7 @@ if ( 'undefined' !== typeof $.fancybox && VPPopupAPI ) {
23
 
24
  // prepare items for fancybox api.
25
  items.forEach( ( item ) => {
26
- if ( 'embed' === item.type ) {
27
  finalItems.push( {
28
  type: 'iframe',
29
  src: item.src,
@@ -32,6 +32,15 @@ if ( 'undefined' !== typeof $.fancybox && VPPopupAPI ) {
32
  height: item.height,
33
  },
34
  } );
 
 
 
 
 
 
 
 
 
35
  } else {
36
  finalItems.push( {
37
  type: 'image',
@@ -105,7 +114,7 @@ if ( 'undefined' !== typeof $.fancybox && VPPopupAPI ) {
105
  baseClass: 'vp-fancybox',
106
 
107
  // Hide browser vertical scrollbars; use at your own risk
108
- hideScrollbar: false,
109
 
110
  // Use mousewheel to navigate gallery
111
  // If 'auto' - enabled for images only
23
 
24
  // prepare items for fancybox api.
25
  items.forEach( ( item ) => {
26
+ if ( 'embed' === item.type && item.src ) {
27
  finalItems.push( {
28
  type: 'iframe',
29
  src: item.src,
32
  height: item.height,
33
  },
34
  } );
35
+ } else if ( 'embed' === item.type && item.embed ) {
36
+ finalItems.push( {
37
+ type: 'html',
38
+ src: item.embed,
39
+ opts: {
40
+ width: item.width,
41
+ height: item.height,
42
+ },
43
+ } );
44
  } else {
45
  finalItems.push( {
46
  type: 'image',
114
  baseClass: 'vp-fancybox',
115
 
116
  // Hide browser vertical scrollbars; use at your own risk
117
+ hideScrollbar: true,
118
 
119
  // Use mousewheel to navigate gallery
120
  // If 'auto' - enabled for images only
assets/js/plugin-fancybox.min.js CHANGED
@@ -1 +1 @@
1
- !function(o){var e={};function t(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return o[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=o,t.c=e,t.d=function(o,e,n){t.o(o,e)||Object.defineProperty(o,e,{enumerable:!0,get:n})},t.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},t.t=function(o,e){if(1&e&&(o=t(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var r in o)t.d(n,r,function(e){return o[e]}.bind(null,r));return n},t.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return t.d(e,"a",e),e},t.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},t.p="",t(t.s=240)}({240:function(o,e,t){o.exports=t(241)},241:function(o,e){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(o,e,r){var s=[];o.forEach((function(o){"embed"===o.type?s.push({type:"iframe",src:o.src,opts:{width:o.width,height:o.height}}):s.push({type:"image",src:o.src,el:o.el,opts:{width:o.width,height:o.height,srcset:o.srcset,caption:o.caption,thumb:o.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:!1,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,e]),t=n.fancybox.open(s,i,e),r&&r.emitEvent("initFancybox",[i,s,e,t])},a.close=function(){t&&(t.close(),t=!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=240)}({240:function(e,o,t){e.exports=t(241)},241: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-isotope.js CHANGED
@@ -20,9 +20,10 @@ $doc.on( 'extendClass.vpf', ( event, VP ) => {
20
  */
21
  VP.prototype.initIsotope = function( options ) {
22
  const self = this;
23
- const isRtl = 'rtl' === getComputedStyle( self.$items_wrap[ 0 ] ).direction;
24
 
25
  if ( self.$items_wrap.isotope && ( 'tiles' === self.options.layout || 'masonry' === self.options.layout || 'grid' === self.options.layout ) ) {
 
 
26
  const initOptions = options || {
27
  itemSelector: '.vp-portfolio__item-wrap',
28
  layoutMode: 'grid' === self.options.layout ? 'fitRows' : 'masonry',
20
  */
21
  VP.prototype.initIsotope = function( options ) {
22
  const self = this;
 
23
 
24
  if ( self.$items_wrap.isotope && ( 'tiles' === self.options.layout || 'masonry' === self.options.layout || 'grid' === self.options.layout ) ) {
25
+ const isRtl = 'rtl' === getComputedStyle( self.$items_wrap[ 0 ] ).direction;
26
+
27
  const initOptions = options || {
28
  itemSelector: '.vp-portfolio__item-wrap',
29
  layoutMode: 'grid' === self.options.layout ? 'fitRows' : 'masonry',
assets/js/plugin-isotope.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function o(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=e,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},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 i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(i,n,function(e){return t[e]}.bind(null,n));return i},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=244)}({244:function(t,e,o){t.exports=o(245)},245:function(t,e,o){"use strict";o.r(e);var i=o(3),n=window.jQuery,r=n(document);r.on("extendClass.vpf",(function(t,e){"vpf"===t.namespace&&(e.prototype.initIsotope=function(t){var e="rtl"===getComputedStyle(this.$items_wrap[0]).direction;if(this.$items_wrap.isotope&&("tiles"===this.options.layout||"masonry"===this.options.layout||"grid"===this.options.layout)){var o=t||{itemSelector:".vp-portfolio__item-wrap",layoutMode:"grid"===this.options.layout?"fitRows":"masonry",transitionDuration:"0.3s",percentPosition:!0,originLeft:!e};this.emitEvent("beforeInitIsotope",[t]),this.$items_wrap.isotope(o),this.emitEvent("initIsotope",[t])}},e.prototype.destroyIsotope=function(){this.$items_wrap.data("isotope")&&(this.$items_wrap.isotope("destroy"),this.emitEvent("destroyIsotope"))})})),r.on("addItems.vpf",(function(t,e,o,i){if("vpf"===t.namespace&&e.$items_wrap.data("isotope")){if(i){var n=e.$items_wrap.find(".vp-portfolio__item-wrap");e.$items_wrap.isotope("remove",n),e.$items_wrap.prepend(o).isotope("prepended",o)}else e.$items_wrap.append(o).isotope("appended",o);setTimeout((function(){e.initIsotope("layout")}),0)}})),r.on("removeItems.vpf",(function(t,e,o){"vpf"===t.namespace&&(e.$items_wrap.data("isotope")&&e.$items_wrap.isotope("remove",o))})),r.on("init.vpf",(function(t,e){"vpf"===t.namespace&&e.initIsotope()})),r.on("imagesLoaded.vpf",(function(t,e){"vpf"===t.namespace&&e.initIsotope("layout")})),r.on("destroy.vpf",(function(t,e){"vpf"===t.namespace&&e.destroyIsotope()})),r.on("vc-full-width-row",Object(i.a)(150,(function(t,e){n(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){"use strict";function i(t,e,o,i){var n,r=!1,p=0;function s(){n&&clearTimeout(n)}function a(){var a=this,u=Date.now()-p,f=arguments;function c(){p=Date.now(),o.apply(a,f)}function d(){n=void 0}r||(i&&!n&&c(),s(),void 0===i&&u>t?c():!0!==e&&(n=setTimeout(i?d:c,void 0===i?t-u:t)))}return"boolean"!=typeof e&&(i=o,o=e,e=void 0),a.cancel=function(){s(),r=!0},a}function n(t,e,o){return void 0===o?i(t,e,!1):i(t,o,!1!==e)}o.d(e,"b",(function(){return i})),o.d(e,"a",(function(){return n}))}});
1
+ !function(t){var e={};function o(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=e,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},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 i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(i,n,function(e){return t[e]}.bind(null,n));return i},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=244)}({244:function(t,e,o){t.exports=o(245)},245:function(t,e,o){"use strict";o.r(e);var i=o(3),n=window.jQuery,r=n(document);r.on("extendClass.vpf",(function(t,e){"vpf"===t.namespace&&(e.prototype.initIsotope=function(t){if(this.$items_wrap.isotope&&("tiles"===this.options.layout||"masonry"===this.options.layout||"grid"===this.options.layout)){var e="rtl"===getComputedStyle(this.$items_wrap[0]).direction,o=t||{itemSelector:".vp-portfolio__item-wrap",layoutMode:"grid"===this.options.layout?"fitRows":"masonry",transitionDuration:"0.3s",percentPosition:!0,originLeft:!e};this.emitEvent("beforeInitIsotope",[t]),this.$items_wrap.isotope(o),this.emitEvent("initIsotope",[t])}},e.prototype.destroyIsotope=function(){this.$items_wrap.data("isotope")&&(this.$items_wrap.isotope("destroy"),this.emitEvent("destroyIsotope"))})})),r.on("addItems.vpf",(function(t,e,o,i){if("vpf"===t.namespace&&e.$items_wrap.data("isotope")){if(i){var n=e.$items_wrap.find(".vp-portfolio__item-wrap");e.$items_wrap.isotope("remove",n),e.$items_wrap.prepend(o).isotope("prepended",o)}else e.$items_wrap.append(o).isotope("appended",o);setTimeout((function(){e.initIsotope("layout")}),0)}})),r.on("removeItems.vpf",(function(t,e,o){"vpf"===t.namespace&&(e.$items_wrap.data("isotope")&&e.$items_wrap.isotope("remove",o))})),r.on("init.vpf",(function(t,e){"vpf"===t.namespace&&e.initIsotope()})),r.on("imagesLoaded.vpf",(function(t,e){"vpf"===t.namespace&&e.initIsotope("layout")})),r.on("destroy.vpf",(function(t,e){"vpf"===t.namespace&&e.destroyIsotope()})),r.on("vc-full-width-row",Object(i.a)(150,(function(t,e){n(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){"use strict";function i(t,e,o,i){var n,r=!1,p=0;function s(){n&&clearTimeout(n)}function a(){var a=this,u=Date.now()-p,f=arguments;function c(){p=Date.now(),o.apply(a,f)}function d(){n=void 0}r||(i&&!n&&c(),s(),void 0===i&&u>t?c():!0!==e&&(n=setTimeout(i?d:c,void 0===i?t-u:t)))}return"boolean"!=typeof e&&(i=o,o=e,e=void 0),a.cancel=function(){s(),r=!0},a}function n(t,e,o){return void 0===o?i(t,e,!1):i(t,o,!1!==e)}o.d(e,"b",(function(){return i})),o.d(e,"a",(function(){return n}))}});
assets/js/plugin-photoswipe.js CHANGED
@@ -54,7 +54,13 @@ function resizeVideo( data, curItem ) {
54
  resultW = vpH * ratio;
55
  }
56
 
57
- $container.find( '.vp-pswp-video' ).css( 'max-width', resultW );
 
 
 
 
 
 
58
  $container.css( {
59
  top: barTop,
60
  bottom: barBot,
54
  resultW = vpH * ratio;
55
  }
56
 
57
+ const $videoCont = $container.find( '.vp-pswp-video' );
58
+
59
+ $videoCont.css( 'max-width', resultW );
60
+ $videoCont.children().css( {
61
+ paddingBottom: `${ 100 * ( curItem.vh / curItem.vw ) }%`,
62
+ } );
63
+
64
  $container.css( {
65
  top: barTop,
66
  bottom: barBot,
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=246)}({246:function(t,e,n){t.exports=n(247)},247:function(t,e,n){"use strict";n.r(e);var o=n(27),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,s.find(".vp-pswp-video").css("max-width",n),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 f;if(!p(".vp-pswp").length){var v='\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(v)}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 v;n&&n.emitEvent("beforeInitPhotoSwipe",[l,o,e]),f=new u(a,d,o,l);var b,m=!1,g=!0;f.listen("beforeResize",(function(){v=f.viewportSize.x*window.devicePixelRatio,m&&1e3>v?(m=!1,b=!0):!m&&1e3<=v&&(m=!0,b=!0),b&&!g&&f.invalidateCurrItems(),g&&(g=!1),b=!1})),f.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)))})),f.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,f.invalidateCurrItems(),f.updateSize(!0)},n.src=e.src}})),f.listen("resize",(function(){h(this)})),f.listen("afterChange",(function(){h(this)})),f.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"))}}))}})),f.listen("destroy",(function(){this&&this.itemHolders.length&&this.itemHolders.forEach((function(t){t.el&&p(t.el).find(".vp-pswp-video").remove()})),f=!1})),f.init(),n&&n.emitEvent("initPhotoSwipe",[l,o,e,f])}},l.close=function(){f&&(f.close(),f=!1)}}},27:function(t,e,n){"use strict";
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=246)}({246:function(t,e,n){t.exports=n(247)},247:function(t,e,n){"use strict";n.r(e);var o=n(27),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)}}},27:function(t,e,n){"use strict";
2
  /*!
3
  * is-number <https://github.com/jonschlinkert/is-number>
4
  *
assets/js/popup-gallery.js CHANGED
@@ -13,14 +13,28 @@ const {
13
  settingsPopupGallery,
14
  } = VPData;
15
 
16
- const $wnd = $( window );
17
-
18
  /*
19
  * Global Popup Gallery API.
20
  */
21
  const VPPopupAPI = {
22
  vendor: false,
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  init() {},
25
  open() {},
26
  close() {},
@@ -33,54 +47,45 @@ const VPPopupAPI = {
33
  * @returns {object|boolean} video data
34
  */
35
  parseVideo( url ) {
36
- // Parse Youtube ID
37
- function getYoutubeID( ytUrl ) {
38
- // eslint-disable-next-line no-useless-escape
39
- const regExp = /.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#\&\?]*).*/;
40
- const match = ytUrl.match( regExp );
41
- return match && 11 === match[ 1 ].length ? match[ 1 ] : false;
42
- }
43
-
44
- // Parse Vimeo ID
45
- function getVimeoID( vmUrl ) {
46
- // eslint-disable-next-line no-useless-escape
47
- const regExp = /https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/;
48
- const match = vmUrl.match( regExp );
49
- return match && match[ 3 ] ? match[ 3 ] : false;
50
- }
51
-
52
- const Youtube = getYoutubeID( url );
53
- const Vimeo = getVimeoID( url );
54
- let embedUrl = url;
55
-
56
- if ( Youtube ) {
57
- embedUrl = `https://www.youtube.com/embed/${ Youtube }`;
58
-
59
- return {
60
- vendor: 'youtube',
61
- id: Youtube,
62
- url,
63
- embedUrl,
64
- embed: `<iframe width="1920" height="1080" src="${ embedUrl }" frameborder="0" allowfullscreen></iframe>`,
65
- };
66
- } if ( Vimeo ) {
67
- embedUrl = `//player.vimeo.com/video/${ Vimeo }`;
68
-
69
- return {
70
- vendor: 'vimeo',
71
- id: Vimeo,
72
- url,
73
- embedUrl,
74
- embed: `<iframe width="1920" height="1080" src="${ embedUrl }" frameborder="0" allowfullscreen></iframe>`,
75
- };
76
- }
77
 
78
- return {
79
  vendor: 'unknown',
80
  id: url,
81
  url,
82
- embedUrl,
83
- embed: `<iframe width="1920" height="1080" src="${ url }" frameborder="0" allowfullscreen></iframe>`,
84
  };
85
  },
86
 
@@ -95,7 +100,6 @@ const VPPopupAPI = {
95
  const items = [];
96
  let $meta;
97
  let size;
98
- let videoSize;
99
  let item;
100
  let video;
101
  let videoData;
@@ -105,7 +109,6 @@ const VPPopupAPI = {
105
 
106
  if ( $meta && $meta.length ) {
107
  size = ( $meta.attr( 'data-vp-popup-img-size' ) || '1920x1080' ).split( 'x' );
108
- videoSize = '1920x1080'.split( 'x' );
109
  video = $meta.attr( 'data-vp-popup-video' );
110
  videoData = false;
111
 
@@ -119,8 +122,8 @@ const VPPopupAPI = {
119
  el: this,
120
  src: videoData.embedUrl,
121
  embed: videoData.embed,
122
- width: parseInt( videoSize[ 0 ], 10 ),
123
- height: parseInt( videoSize[ 1 ], 10 ),
124
  };
125
  } else {
126
  // create slide object
@@ -190,15 +193,18 @@ $( document ).on( 'extendClass.vpf', ( event, VP ) => {
190
  }
191
 
192
  // click action
193
- self.$item.on( `click.vpf-uid-${ self.uid }`, '.vp-portfolio__item', function( e ) {
194
- if ( ! $( this ).closest( '.vp-portfolio__item-wrap' ).find( '.vp-portfolio__item-popup' ).length ) {
 
 
195
  return;
196
  }
197
 
198
  e.preventDefault();
199
 
200
  let index = -1;
201
- const clicked = this;
 
202
  self.$item.find( '.vp-portfolio__item-wrap .vp-portfolio__item-popup' ).each( function( idx ) {
203
  if ( -1 === index && $( this ).closest( '.vp-portfolio__item-wrap' ).find( '.vp-portfolio__item' )[ 0 ] === clicked ) {
204
  index = idx;
@@ -213,11 +219,6 @@ $( document ).on( 'extendClass.vpf', ( event, VP ) => {
213
 
214
  VPPopupAPI.open( items, index, self );
215
  } );
216
-
217
- // close on scroll
218
- $wnd.on( `scroll.vpf-uid-${ self.uid }`, () => {
219
- VPPopupAPI.close();
220
- } );
221
  };
222
 
223
  /**
13
  settingsPopupGallery,
14
  } = VPData;
15
 
 
 
16
  /*
17
  * Global Popup Gallery API.
18
  */
19
  const VPPopupAPI = {
20
  vendor: false,
21
 
22
+ vendors: [
23
+ {
24
+ vendor: 'youtube',
25
+ embedUrl: 'https://www.youtube.com/embed/{{video_id}}',
26
+ pattern: /(https?:\/\/)?(www.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(?:embed\/|v\/|watch\?v=|watch\?list=(.*)&v=|watch\?(.*[^&]&)v=)?((\w|-){11})(&list=(\w+)&?)?/,
27
+ patternIndex: 6,
28
+ },
29
+ {
30
+ vendor: 'vimeo',
31
+ embedUrl: 'https://player.vimeo.com/video/{{video_id}}',
32
+ // eslint-disable-next-line no-useless-escape
33
+ pattern: /https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,
34
+ patternIndex: 3,
35
+ },
36
+ ],
37
+
38
  init() {},
39
  open() {},
40
  close() {},
47
  * @returns {object|boolean} video data
48
  */
49
  parseVideo( url ) {
50
+ let result = false;
51
+
52
+ VPPopupAPI.vendors.forEach( ( vendorData ) => {
53
+ if ( ! result ) {
54
+ const match = url.match( vendorData.pattern );
55
+ const videoId = match && match[ vendorData.patternIndex ] ? match[ vendorData.patternIndex ] : false;
56
+
57
+ if ( videoId ) {
58
+ if ( vendorData.embedCallback ) {
59
+ result = vendorData.embedCallback( url, match );
60
+ } else {
61
+ let { embedUrl } = vendorData;
62
+ embedUrl = embedUrl.replace( /{{video_id}}/g, videoId );
63
+ embedUrl = embedUrl.replace( /{{video_url}}/g, url );
64
+ embedUrl = embedUrl.replace( /{{video_url_encoded}}/g, encodeURIComponent( url ) );
65
+
66
+ const width = vendorData.width || 1920;
67
+ const height = vendorData.height || 1080;
68
+
69
+ result = {
70
+ vendor: vendorData.vendor,
71
+ id: videoId,
72
+ embed: `<iframe width="${ width }" height="${ height }" src="${ embedUrl }" scrolling="no" frameborder="0" allowTransparency="true" allow="autoplay; fullscreen; encrypted-media" allowfullscreen></iframe>`,
73
+ embedUrl,
74
+ url,
75
+ width,
76
+ height,
77
+ };
78
+ }
79
+ }
80
+ }
81
+ } );
 
 
 
 
 
 
 
 
 
82
 
83
+ return result || {
84
  vendor: 'unknown',
85
  id: url,
86
  url,
87
+ embedUrl: url,
88
+ embed: `<iframe width="1920" height="1080" src="${ url }" scrolling="no" frameborder="0" allowTransparency="true" allow="autoplay; fullscreen; encrypted-media" allowfullscreen></iframe>`,
89
  };
90
  },
91
 
100
  const items = [];
101
  let $meta;
102
  let size;
 
103
  let item;
104
  let video;
105
  let videoData;
109
 
110
  if ( $meta && $meta.length ) {
111
  size = ( $meta.attr( 'data-vp-popup-img-size' ) || '1920x1080' ).split( 'x' );
 
112
  video = $meta.attr( 'data-vp-popup-video' );
113
  videoData = false;
114
 
122
  el: this,
123
  src: videoData.embedUrl,
124
  embed: videoData.embed,
125
+ width: videoData.width || 1920,
126
+ height: videoData.height || 1080,
127
  };
128
  } else {
129
  // create slide object
193
  }
194
 
195
  // click action
196
+ self.$item.on( `click.vpf-uid-${ self.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( e ) {
197
+ const $this = $( this );
198
+
199
+ if ( ! $this.closest( '.vp-portfolio__item-wrap' ).find( '.vp-portfolio__item-popup' ).length ) {
200
  return;
201
  }
202
 
203
  e.preventDefault();
204
 
205
  let index = -1;
206
+ const clicked = $this.closest( '.vp-portfolio__item' )[ 0 ];
207
+
208
  self.$item.find( '.vp-portfolio__item-wrap .vp-portfolio__item-popup' ).each( function( idx ) {
209
  if ( -1 === index && $( this ).closest( '.vp-portfolio__item-wrap' ).find( '.vp-portfolio__item' )[ 0 ] === clicked ) {
210
  index = idx;
219
 
220
  VPPopupAPI.open( items, index, self );
221
  } );
 
 
 
 
 
222
  };
223
 
224
  /**
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=250)}({250:function(e,t,i){e.exports=i(251)},251:function(e,t){var i=window.jQuery,o=window.VPData.settingsPopupGallery,r=i(window),n={vendor:!1,init:function(){},open:function(){},close:function(){},parseVideo:function(e){var t,i=!(!(t=e.match(/.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#\&\?]*).*/))||11!==t[1].length)&&t[1],o=function(e){var t=e.match(/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/);return!(!t||!t[3])&&t[3]}(e),r=e;return i?{vendor:"youtube",id:i,url:e,embedUrl:r="https://www.youtube.com/embed/".concat(i),embed:'<iframe width="1920" height="1080" src="'.concat(r,'" frameborder="0" allowfullscreen></iframe>')}:o?{vendor:"vimeo",id:o,url:e,embedUrl:r="//player.vimeo.com/video/".concat(o),embed:'<iframe width="1920" height="1080" src="'.concat(r,'" frameborder="0" allowfullscreen></iframe>')}:{vendor:"unknown",id:e,url:e,embedUrl:r,embed:'<iframe width="1920" height="1080" src="'.concat(e,'" frameborder="0" allowfullscreen></iframe>')}},parseGallery:function(e){var t,o,r,p,a,l,c=[];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"),r="1920x1080".split("x"),a=t.attr("data-vp-popup-video"),l=!1,a&&(l=n.parseVideo(a)),l)p={type:"embed",el:this,src:l.embedUrl,embed:l.embed,width:parseInt(r[0],10),height:parseInt(r[1],10)};else{p={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")||p.src;if(e){var s=(t.attr("data-vp-popup-sm-img-size")||t.attr("data-vp-popup-img-size")||"1920x1080").split("x");p.srcSmall=e,p.srcSmallWidth=parseInt(s[0],10),p.srcSmallHeight=parseInt(s[1],10)}var u=t.attr("data-vp-popup-md-img")||p.src;if(u){var d=(t.attr("data-vp-popup-md-img-size")||t.attr("data-vp-popup-img-size")||"1920x1080").split("x");p.srcMedium=u,p.srcMediumWidth=parseInt(d[0],10),p.srcMediumHeight=parseInt(d[1],10)}var f=t.children(".vp-portfolio__item-popup-title").get(0),m=t.children(".vp-portfolio__item-popup-description").get(0);(f||m)&&(p.caption=(f?f.outerHTML:"")+(m?m.outerHTML:""))}c.push(p)}})),c}};function p(e){return/(.png|.jpg|.jpeg|.gif|.tiff|.bmp|.webp)$/.test(e.href.toLowerCase().split("?")[0].split("#")[0])}function a(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=n,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",(function(t){if(i(this).closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item-popup").length){t.preventDefault();var o=-1,r=this;e.$item.find(".vp-portfolio__item-wrap .vp-portfolio__item-popup").each((function(e){-1===o&&i(this).closest(".vp-portfolio__item-wrap").find(".vp-portfolio__item")[0]===r&&(o=e)})),0>o&&(o=0);var p=n.parseGallery(e.$item);n.open(p,o,e)}})),r.on("scroll.vpf-uid-".concat(e.uid),(function(){n.close()}))))},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&&p(this)){e.preventDefault();var t=i(this),o=[],r=a(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"),u=0;s.each((function(){p(this)&&(this===r.linkEl&&(c=u),o.push(a(this)),u+=1)}))}else o.push(r);n.open(o,c)}}))}});
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=250)}({250:function(e,t,i){e.exports=i(251)},251: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&&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.2.0
4
  * Author : nK https://nkdev.info
5
  */
6
  const $ = window.jQuery;
1
  /*!
2
  * Name : Visual Portfolio
3
+ * Version : 2.3.0
4
  * Author : nK https://nkdev.info
5
  */
6
  const $ = window.jQuery;
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.2.0
6
  * Author: nK
7
  * Author URI: https://nkdev.info
8
  * License: GPLv2 or later
@@ -39,6 +39,13 @@ class Visual_Portfolio {
39
  return self::$instance;
40
  }
41
 
 
 
 
 
 
 
 
42
  /**
43
  * Path to the plugin directory
44
  *
@@ -78,8 +85,9 @@ class Visual_Portfolio {
78
  * Init options
79
  */
80
  public function init() {
81
- $this->plugin_path = plugin_dir_path( __FILE__ );
82
- $this->plugin_url = plugin_dir_url( __FILE__ );
 
83
 
84
  if ( in_array( 'visual-portfolio-pro/class-visual-portfolio-pro.php', (array) get_option( 'active_plugins', array() ), true ) ) {
85
  $this->pro_plugin_path = plugin_dir_path( WP_PLUGIN_DIR . '/visual-portfolio-pro/class-visual-portfolio-pro.php' );
@@ -94,17 +102,6 @@ class Visual_Portfolio {
94
 
95
  // register images sizes.
96
  $this->add_image_sizes();
97
-
98
- // init classes.
99
- new Visual_Portfolio_Settings();
100
- new Visual_Portfolio_Rest();
101
- new Visual_Portfolio_Get();
102
- new Visual_Portfolio_Shortcode();
103
- new Visual_Portfolio_Preview();
104
- new Visual_Portfolio_Admin();
105
- new Visual_Portfolio_TinyMCE();
106
- new Visual_Portfolio_VC();
107
- new Visual_Portfolio_Elementor();
108
  }
109
 
110
  /**
2
  /**
3
  * Plugin Name: Visual Portfolio
4
  * Description: Portfolio post type with visual editor
5
+ * Version: 2.3.0
6
  * Author: nK
7
  * Author URI: https://nkdev.info
8
  * License: GPLv2 or later
39
  return self::$instance;
40
  }
41
 
42
+ /**
43
+ * Basename of plugin main file
44
+ *
45
+ * @var $plugin_basename
46
+ */
47
+ public $plugin_basename;
48
+
49
  /**
50
  * Path to the plugin directory
51
  *
85
  * Init options
86
  */
87
  public function init() {
88
+ $this->plugin_basename = plugin_basename( __FILE__ );
89
+ $this->plugin_path = plugin_dir_path( __FILE__ );
90
+ $this->plugin_url = plugin_dir_url( __FILE__ );
91
 
92
  if ( in_array( 'visual-portfolio-pro/class-visual-portfolio-pro.php', (array) get_option( 'active_plugins', array() ), true ) ) {
93
  $this->pro_plugin_path = plugin_dir_path( WP_PLUGIN_DIR . '/visual-portfolio-pro/class-visual-portfolio-pro.php' );
102
 
103
  // register images sizes.
104
  $this->add_image_sizes();
 
 
 
 
 
 
 
 
 
 
 
105
  }
106
 
107
  /**
classes/class-admin.php CHANGED
@@ -20,6 +20,11 @@ class Visual_Portfolio_Admin {
20
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
21
  add_action( 'enqueue_block_editor_assets', array( $this, 'saved_layouts_editor_enqueue_scripts' ) );
22
 
 
 
 
 
 
23
  // register controls.
24
  add_action( 'init', array( $this, 'register_controls' ), 9 );
25
  add_filter( 'vpf_extend_layouts', array( $this, 'add_default_layouts' ), 9 );
@@ -37,9 +42,9 @@ class Visual_Portfolio_Admin {
37
  'nonce' => wp_create_nonce( 'vp-ajax-nonce' ),
38
  );
39
 
40
- wp_enqueue_script( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/js/script.min.js', array( 'jquery', 'wp-data' ), '2.2.0', true );
41
  wp_localize_script( 'visual-portfolio-admin', 'VPAdminVariables', $data_init );
42
- wp_enqueue_style( 'visual-portfolio-admin', visual_portfolio()->plugin_url . 'assets/admin/css/style.min.css', '', '2.2.0' );
43
  wp_style_add_data( 'visual-portfolio-admin', 'rtl', 'replace' );
44
  wp_style_add_data( 'visual-portfolio-admin', 'suffix', '.min' );
45
  }
@@ -53,8 +58,8 @@ class Visual_Portfolio_Admin {
53
  );
54
 
55
  if ( 'vp_lists' === get_post_type() ) {
56
- wp_enqueue_script( 'visual-portfolio-saved-layouts', visual_portfolio()->plugin_url . 'gutenberg/layouts-editor.min.js', array( 'jquery' ), '2.2.0', true );
57
- wp_enqueue_style( 'visual-portfolio-saved-layouts', visual_portfolio()->plugin_url . 'gutenberg/layouts-editor.min.css', '', '2.2.0' );
58
  wp_style_add_data( 'visual-portfolio-saved-layouts', 'rtl', 'replace' );
59
  wp_style_add_data( 'visual-portfolio-saved-layouts', 'suffix', '.min' );
60
 
@@ -71,6 +76,56 @@ class Visual_Portfolio_Admin {
71
  }
72
  }
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  /**
75
  * Add default layouts.
76
  *
@@ -595,7 +650,7 @@ class Visual_Portfolio_Admin {
595
  'show_views_count' => true,
596
  'show_reading_time' => true,
597
  'show_excerpt' => true,
598
- 'show_icons' => false,
599
  'align' => true,
600
  ),
601
  'controls' => array(
@@ -625,6 +680,77 @@ class Visual_Portfolio_Admin {
625
  ),
626
  ),
627
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
628
  ),
629
  ),
630
 
@@ -646,6 +772,17 @@ class Visual_Portfolio_Admin {
646
  'align' => 'extended',
647
  ),
648
  'controls' => array(
 
 
 
 
 
 
 
 
 
 
 
649
  array(
650
  'type' => 'color',
651
  'label' => esc_html__( 'Overlay Background Color', 'visual-portfolio' ),
@@ -736,6 +873,17 @@ class Visual_Portfolio_Admin {
736
  'align' => true,
737
  ),
738
  'controls' => array(
 
 
 
 
 
 
 
 
 
 
 
739
  array(
740
  'type' => 'color',
741
  'label' => esc_html__( 'Overlay Background Color', 'visual-portfolio' ),
@@ -760,6 +908,30 @@ class Visual_Portfolio_Admin {
760
  ),
761
  ),
762
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
763
  ),
764
  ),
765
  ),
@@ -849,15 +1021,11 @@ class Visual_Portfolio_Admin {
849
  'title' => esc_html__( 'Images', 'visual-portfolio' ),
850
  'icon' => '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.0428 14.3315V1.71123C16.0428 0.748663 15.2941 0 14.3315 0H1.71123C0.748663 0 0 0.748663 0 1.71123V14.3315C0 15.2941 0.748663 16.0428 1.71123 16.0428H14.3315C15.2941 16.0428 16.0428 15.2941 16.0428 14.3315ZM1.60428 1.71123C1.60428 1.60428 1.71123 1.60428 1.71123 1.60428H14.3315C14.4385 1.60428 14.4385 1.71123 14.4385 1.71123V9.62567L11.9786 7.80749C11.6578 7.59358 11.3369 7.59358 11.016 7.80749L7.91444 10.0535L5.34759 8.87701C5.13369 8.77005 4.81283 8.77005 4.59893 8.87701L1.49733 10.4813V1.71123H1.60428ZM1.60428 14.3315V12.4064L5.02674 10.5882L7.59358 11.8717C7.80749 11.9786 8.12834 11.9786 8.4492 11.7647L11.4438 9.62567L14.4385 11.7647V14.4385C14.4385 14.5455 14.3315 14.5455 14.3315 14.5455H1.71123C1.71123 14.4385 1.60428 14.3315 1.60428 14.3315Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M19.25 5.75C19.6642 5.75 20 6.08579 20 6.5C20 6.91421 20 17.25 20 17.25C20 18.7688 18.7688 20 17.25 20H4.27C3.85579 20 3.52 19.6642 3.52 19.25C3.52 18.8358 3.85579 18.5 4.27 18.5H17.25C17.9404 18.5 18.5 17.9404 18.5 17.25C18.5 17.25 18.5 6.91421 18.5 6.5C18.5 6.08579 18.8358 5.75 19.25 5.75Z" fill="currentColor"/></svg>',
851
  ),
852
- // phpcs:ignore
853
- /*
854
- TODO: PRO
855
- 'social-stream' => array(
856
- 'value' => 'social-stream',
857
- 'title' => esc_html__( 'Social', 'visual-portfolio' ),
858
- 'icon' => '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.1429 6.57142C16.563 6.57142 17.7143 5.42015 17.7143 3.99999C17.7143 2.57983 16.563 1.42856 15.1429 1.42856C13.7227 1.42856 12.5714 2.57983 12.5714 3.99999C12.5714 5.42015 13.7227 6.57142 15.1429 6.57142Z" stroke="currentColor" stroke-width="1.5" fill="transparent" stroke-linecap="round" stroke-linejoin="round"/><path d="M4.85715 12.5714C6.27731 12.5714 7.42858 11.4201 7.42858 9.99999C7.42858 8.57983 6.27731 7.42856 4.85715 7.42856C3.43699 7.42856 2.28572 8.57983 2.28572 9.99999C2.28572 11.4201 3.43699 12.5714 4.85715 12.5714Z" stroke="currentColor" stroke-width="1.5" fill="transparent" stroke-linecap="round" stroke-linejoin="round"/><path d="M15.1429 18.5714C16.563 18.5714 17.7143 17.4201 17.7143 16C17.7143 14.5798 16.563 13.4286 15.1429 13.4286C13.7227 13.4286 12.5714 14.5798 12.5714 16C12.5714 17.4201 13.7227 18.5714 15.1429 18.5714Z" stroke="currentColor" stroke-width="1.5" fill="transparent" stroke-linecap="round" stroke-linejoin="round"/><path d="M7.14285 11.4286L12.8571 14.5714" stroke="currentColor" stroke-width="1.5" fill="transparent" stroke-linecap="round" stroke-linejoin="round"/><path d="M12.8571 5.42856L7.14285 8.57141" stroke="currentColor" stroke-width="1.5" fill="transparent" stroke-linecap="round" stroke-linejoin="round"/></svg>',
859
- ),
860
- */
861
  ),
862
  )
863
  );
@@ -1159,6 +1327,7 @@ class Visual_Portfolio_Admin {
1159
  'type' => 'text',
1160
  'label' => esc_html__( 'Video URL', 'visual-portfolio' ),
1161
  'placeholder' => esc_html__( 'https://...', 'visual-portfolio' ),
 
1162
  'condition' => array(
1163
  array(
1164
  'control' => 'SELF.format',
@@ -1268,7 +1437,7 @@ class Visual_Portfolio_Admin {
1268
  'type' => 'pro_note',
1269
  'name' => 'social_pro_note',
1270
  'label' => esc_html__( 'PRO Feature', 'visual-portfolio' ),
1271
- 'description' => esc_html__( 'Social feeds such as Instagram, Youtube, etc...', 'visual-portfolio' ),
1272
  )
1273
  );
1274
 
@@ -1803,17 +1972,12 @@ class Visual_Portfolio_Admin {
1803
  'category' => 'sort',
1804
  'render_callback' => 'Visual_Portfolio_Get::sort',
1805
  ),
1806
-
1807
- // phpcs:ignore
1808
- /*
1809
- TODO: PRO
1810
- 'search' => array(
1811
- 'title' => esc_html__( 'Search', 'visual-portfolio' ),
1812
- 'allowed_locations' => array( 'top' ),
1813
- 'category' => 'search',
1814
- 'is_pro' => true,
1815
- ),
1816
- */
1817
  'items' => array(
1818
  'title' => esc_html__( 'Items', 'visual-portfolio' ),
1819
  'allowed_locations' => array( 'items' ),
@@ -2616,3 +2780,5 @@ selector p {
2616
  wp_die();
2617
  }
2618
  }
 
 
20
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
21
  add_action( 'enqueue_block_editor_assets', array( $this, 'saved_layouts_editor_enqueue_scripts' ) );
22
 
23
+ // Pro link.
24
+ add_filter( 'plugin_action_links_' . visual_portfolio()->plugin_basename, array( $this, 'add_go_pro_link_plugins_page' ) );
25
+ add_action( 'admin_init', array( $this, 'go_pro_redirect' ) );
26
+ add_action( 'admin_menu', array( $this, 'pro_admin_menu' ), 12 );
27
+
28
  // register controls.
29
  add_action( 'init', array( $this, 'register_controls' ), 9 );
30
  add_filter( 'vpf_extend_layouts', array( $this, 'add_default_layouts' ), 9 );
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.3.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.3.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.3.0', true );
62
+ wp_enqueue_style( 'visual-portfolio-saved-layouts', visual_portfolio()->plugin_url . 'gutenberg/layouts-editor.min.css', array(), '2.3.0' );
63
  wp_style_add_data( 'visual-portfolio-saved-layouts', 'rtl', 'replace' );
64
  wp_style_add_data( 'visual-portfolio-saved-layouts', 'suffix', '.min' );
65
 
76
  }
77
  }
78
 
79
+ /**
80
+ * Add Go Pro link to plugins page.
81
+ *
82
+ * @param Array $links - available links.
83
+ *
84
+ * @return array
85
+ */
86
+ public function add_go_pro_link_plugins_page( $links ) {
87
+ return array_merge(
88
+ $links,
89
+ array(
90
+ '<a target="_blank" href="admin.php?page=visual_portfolio_go_pro">' . esc_html__( 'Go Pro', 'visual-portfolio' ) . '</a>',
91
+ )
92
+ );
93
+ }
94
+
95
+ /**
96
+ * Go Pro.
97
+ * Redirect to the Pro purchase page.
98
+ */
99
+ public function go_pro_redirect() {
100
+ // phpcs:ignore
101
+ if ( ! isset( $_GET['page'] ) || empty( $_GET['page'] ) ) {
102
+ return;
103
+ }
104
+
105
+ // phpcs:ignore
106
+ if ( 'visual_portfolio_go_pro' === $_GET['page'] ) {
107
+ // phpcs:ignore
108
+ wp_redirect( 'https://visualportfolio.co/pro/' );
109
+ exit();
110
+ }
111
+ }
112
+
113
+ /**
114
+ * Register the admin settings menu PRO link.
115
+ *
116
+ * @return void
117
+ */
118
+ public function pro_admin_menu() {
119
+ add_submenu_page(
120
+ 'edit.php?post_type=portfolio',
121
+ '',
122
+ '<span class="dashicons dashicons-star-filled" style="font-size: 17px"></span> ' . esc_html__( 'Go Pro', 'visual-portfolio' ),
123
+ 'manage_options',
124
+ 'visual_portfolio_go_pro',
125
+ array( $this, 'go_pro_redirect' )
126
+ );
127
+ }
128
+
129
  /**
130
  * Add default layouts.
131
  *
650
  'show_views_count' => true,
651
  'show_reading_time' => true,
652
  'show_excerpt' => true,
653
+ 'show_icons' => true,
654
  'align' => true,
655
  ),
656
  'controls' => array(
680
  ),
681
  ),
682
  ),
683
+ array(
684
+ 'type' => 'radio',
685
+ 'label' => esc_html__( 'Display Overlay', 'visual-portfolio' ),
686
+ 'name' => 'show_overlay',
687
+ 'default' => 'hover',
688
+ 'options' => array(
689
+ 'hover' => esc_html__( 'Hover State Only', 'visual-portfolio' ),
690
+ 'default' => esc_html__( 'Default State Only', 'visual-portfolio' ),
691
+ 'always' => esc_html__( 'Always', 'visual-portfolio' ),
692
+ ),
693
+ ),
694
+ array(
695
+ 'type' => 'color',
696
+ 'label' => esc_html__( 'Overlay Background Color', 'visual-portfolio' ),
697
+ 'name' => 'bg_color',
698
+ 'alpha' => true,
699
+ 'style' => array(
700
+ array(
701
+ 'element' => '.vp-portfolio__items-style-default',
702
+ 'property' => '--vp-items-style-default--overlay__background-color',
703
+ ),
704
+ ),
705
+ ),
706
+ array(
707
+ 'type' => 'color',
708
+ 'label' => esc_html__( 'Overlay Text Color', 'visual-portfolio' ),
709
+ 'name' => 'text_color',
710
+ 'alpha' => true,
711
+ 'style' => array(
712
+ array(
713
+ 'element' => '.vp-portfolio__items-style-default',
714
+ 'property' => '--vp-items-style-default--overlay__color',
715
+ ),
716
+ ),
717
+ ),
718
+ array(
719
+ 'type' => 'color',
720
+ 'label' => esc_html__( 'Meta Text Color', 'visual-portfolio' ),
721
+ 'name' => 'meta_text_color',
722
+ 'alpha' => true,
723
+ 'style' => array(
724
+ array(
725
+ 'element' => '.vp-portfolio__items-style-default',
726
+ 'property' => '--vp-items-style-default--meta__color',
727
+ ),
728
+ ),
729
+ ),
730
+ array(
731
+ 'type' => 'color',
732
+ 'label' => esc_html__( 'Meta Links Color', 'visual-portfolio' ),
733
+ 'name' => 'meta_links_color',
734
+ 'alpha' => true,
735
+ 'style' => array(
736
+ array(
737
+ 'element' => '.vp-portfolio__items-style-default',
738
+ 'property' => '--vp-items-style-default--links__color',
739
+ ),
740
+ ),
741
+ ),
742
+ array(
743
+ 'type' => 'color',
744
+ 'label' => esc_html__( 'Meta Links Hover Color', 'visual-portfolio' ),
745
+ 'name' => 'meta_links_hover_color',
746
+ 'alpha' => true,
747
+ 'style' => array(
748
+ array(
749
+ 'element' => '.vp-portfolio__items-style-default',
750
+ 'property' => '--vp-items-style-default--links-hover__color',
751
+ ),
752
+ ),
753
+ ),
754
  ),
755
  ),
756
 
772
  'align' => 'extended',
773
  ),
774
  'controls' => array(
775
+ array(
776
+ 'type' => 'radio',
777
+ 'label' => esc_html__( 'Display Overlay', 'visual-portfolio' ),
778
+ 'name' => 'show_overlay',
779
+ 'default' => 'hover',
780
+ 'options' => array(
781
+ 'hover' => esc_html__( 'Hover State Only', 'visual-portfolio' ),
782
+ 'default' => esc_html__( 'Default State Only', 'visual-portfolio' ),
783
+ 'always' => esc_html__( 'Always', 'visual-portfolio' ),
784
+ ),
785
+ ),
786
  array(
787
  'type' => 'color',
788
  'label' => esc_html__( 'Overlay Background Color', 'visual-portfolio' ),
873
  'align' => true,
874
  ),
875
  'controls' => array(
876
+ array(
877
+ 'type' => 'radio',
878
+ 'label' => esc_html__( 'Display Overlay', 'visual-portfolio' ),
879
+ 'name' => 'show_overlay',
880
+ 'default' => 'hover',
881
+ 'options' => array(
882
+ 'hover' => esc_html__( 'Hover State Only', 'visual-portfolio' ),
883
+ 'default' => esc_html__( 'Default State Only', 'visual-portfolio' ),
884
+ 'always' => esc_html__( 'Always', 'visual-portfolio' ),
885
+ ),
886
+ ),
887
  array(
888
  'type' => 'color',
889
  'label' => esc_html__( 'Overlay Background Color', 'visual-portfolio' ),
908
  ),
909
  ),
910
  ),
911
+ array(
912
+ 'type' => 'color',
913
+ 'label' => esc_html__( 'Overlay Links Color', 'visual-portfolio' ),
914
+ 'name' => 'links_color',
915
+ 'alpha' => true,
916
+ 'style' => array(
917
+ array(
918
+ 'element' => '.vp-portfolio__items-style-emerge',
919
+ 'property' => '--vp-items-style-emerge--links__color',
920
+ ),
921
+ ),
922
+ ),
923
+ array(
924
+ 'type' => 'color',
925
+ 'label' => esc_html__( 'Overlay Links Hover Color', 'visual-portfolio' ),
926
+ 'name' => 'links_hover_color',
927
+ 'alpha' => true,
928
+ 'style' => array(
929
+ array(
930
+ 'element' => '.vp-portfolio__items-style-emerge',
931
+ 'property' => '--vp-items-style-emerge--links-hover__color',
932
+ ),
933
+ ),
934
+ ),
935
  ),
936
  ),
937
  ),
1021
  'title' => esc_html__( 'Images', 'visual-portfolio' ),
1022
  'icon' => '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.0428 14.3315V1.71123C16.0428 0.748663 15.2941 0 14.3315 0H1.71123C0.748663 0 0 0.748663 0 1.71123V14.3315C0 15.2941 0.748663 16.0428 1.71123 16.0428H14.3315C15.2941 16.0428 16.0428 15.2941 16.0428 14.3315ZM1.60428 1.71123C1.60428 1.60428 1.71123 1.60428 1.71123 1.60428H14.3315C14.4385 1.60428 14.4385 1.71123 14.4385 1.71123V9.62567L11.9786 7.80749C11.6578 7.59358 11.3369 7.59358 11.016 7.80749L7.91444 10.0535L5.34759 8.87701C5.13369 8.77005 4.81283 8.77005 4.59893 8.87701L1.49733 10.4813V1.71123H1.60428ZM1.60428 14.3315V12.4064L5.02674 10.5882L7.59358 11.8717C7.80749 11.9786 8.12834 11.9786 8.4492 11.7647L11.4438 9.62567L14.4385 11.7647V14.4385C14.4385 14.5455 14.3315 14.5455 14.3315 14.5455H1.71123C1.71123 14.4385 1.60428 14.3315 1.60428 14.3315Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M19.25 5.75C19.6642 5.75 20 6.08579 20 6.5C20 6.91421 20 17.25 20 17.25C20 18.7688 18.7688 20 17.25 20H4.27C3.85579 20 3.52 19.6642 3.52 19.25C3.52 18.8358 3.85579 18.5 4.27 18.5H17.25C17.9404 18.5 18.5 17.9404 18.5 17.25C18.5 17.25 18.5 6.91421 18.5 6.5C18.5 6.08579 18.8358 5.75 19.25 5.75Z" fill="currentColor"/></svg>',
1023
  ),
1024
+ 'social-stream' => array(
1025
+ 'value' => 'social-stream',
1026
+ 'title' => esc_html__( 'Social', 'visual-portfolio' ),
1027
+ 'icon' => '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.1429 6.57142C16.563 6.57142 17.7143 5.42015 17.7143 3.99999C17.7143 2.57983 16.563 1.42856 15.1429 1.42856C13.7227 1.42856 12.5714 2.57983 12.5714 3.99999C12.5714 5.42015 13.7227 6.57142 15.1429 6.57142Z" stroke="currentColor" stroke-width="1.5" fill="transparent" stroke-linecap="round" stroke-linejoin="round"/><path d="M4.85715 12.5714C6.27731 12.5714 7.42858 11.4201 7.42858 9.99999C7.42858 8.57983 6.27731 7.42856 4.85715 7.42856C3.43699 7.42856 2.28572 8.57983 2.28572 9.99999C2.28572 11.4201 3.43699 12.5714 4.85715 12.5714Z" stroke="currentColor" stroke-width="1.5" fill="transparent" stroke-linecap="round" stroke-linejoin="round"/><path d="M15.1429 18.5714C16.563 18.5714 17.7143 17.4201 17.7143 16C17.7143 14.5798 16.563 13.4286 15.1429 13.4286C13.7227 13.4286 12.5714 14.5798 12.5714 16C12.5714 17.4201 13.7227 18.5714 15.1429 18.5714Z" stroke="currentColor" stroke-width="1.5" fill="transparent" stroke-linecap="round" stroke-linejoin="round"/><path d="M7.14285 11.4286L12.8571 14.5714" stroke="currentColor" stroke-width="1.5" fill="transparent" stroke-linecap="round" stroke-linejoin="round"/><path d="M12.8571 5.42856L7.14285 8.57141" stroke="currentColor" stroke-width="1.5" fill="transparent" stroke-linecap="round" stroke-linejoin="round"/></svg>',
1028
+ ),
 
 
 
 
1029
  ),
1030
  )
1031
  );
1327
  'type' => 'text',
1328
  'label' => esc_html__( 'Video URL', 'visual-portfolio' ),
1329
  'placeholder' => esc_html__( 'https://...', 'visual-portfolio' ),
1330
+ 'description' => esc_html__( 'Full list of supported links', 'visual-portfolio' ) . '&nbsp;<a href="https://visualportfolio.co/documentation/portfolio-items/video-portfolio-item/#supported-video-vendors" target="_blank" rel="noopener noreferrer">' . esc_html__( 'see here', 'visual-portfolio' ) . '</a>',
1331
  'condition' => array(
1332
  array(
1333
  'control' => 'SELF.format',
1437
  'type' => 'pro_note',
1438
  'name' => 'social_pro_note',
1439
  'label' => esc_html__( 'PRO Feature', 'visual-portfolio' ),
1440
+ 'description' => esc_html__( 'Social feeds such as Youtube, Vimeo, Flickr, Twitter, etc...', 'visual-portfolio' ),
1441
  )
1442
  );
1443
 
1972
  'category' => 'sort',
1973
  'render_callback' => 'Visual_Portfolio_Get::sort',
1974
  ),
1975
+ 'search' => array(
1976
+ 'title' => esc_html__( 'Search', 'visual-portfolio' ),
1977
+ 'allowed_locations' => array( 'top' ),
1978
+ 'category' => 'search',
1979
+ 'is_pro' => true,
1980
+ ),
 
 
 
 
 
1981
  'items' => array(
1982
  'title' => esc_html__( 'Items', 'visual-portfolio' ),
1983
  'allowed_locations' => array( 'items' ),
2780
  wp_die();
2781
  }
2782
  }
2783
+
2784
+ new Visual_Portfolio_Admin();
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 );
102
  } elseif ( is_string( $data['value'] ) ) {
103
- visual_portfolio()->include_template_style( $name, $data['value'] );
104
  } else {
105
- wp_enqueue_style( $name );
106
  }
107
 
108
  self::$stored_assets[ $type ]['value'] = false;
@@ -245,7 +245,7 @@ class Visual_Portfolio_Assets {
245
  $dynamic_styles = Visual_Portfolio_Controls_Dynamic_CSS::get( $options );
246
  $controls_css_handle = 'vp-dynamic-styles-' . $options['id'];
247
 
248
- wp_register_style( $controls_css_handle, false, array(), '2.2.0' );
249
  wp_enqueue_style( $controls_css_handle );
250
  wp_add_inline_style( $controls_css_handle, $dynamic_styles ? $dynamic_styles : ' ' );
251
 
@@ -369,7 +369,7 @@ class Visual_Portfolio_Assets {
369
  );
370
 
371
  foreach ( $vp_styles as $name => $data ) {
372
- wp_register_style( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.2.0' );
373
  wp_style_add_data( $name, 'rtl', 'replace' );
374
  wp_style_add_data( $name, 'suffix', '.min' );
375
  }
@@ -477,7 +477,7 @@ class Visual_Portfolio_Assets {
477
  );
478
 
479
  foreach ( $vp_scripts as $name => $data ) {
480
- wp_register_script( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.2.0', true );
481
  }
482
 
483
  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.3.0', true );
102
  } elseif ( is_string( $data['value'] ) ) {
103
+ visual_portfolio()->include_template_style( $name, $data['value'], array(), '2.3.0' );
104
  } else {
105
+ wp_enqueue_style( $name, '', array(), '2.3.0' );
106
  }
107
 
108
  self::$stored_assets[ $type ]['value'] = false;
245
  $dynamic_styles = Visual_Portfolio_Controls_Dynamic_CSS::get( $options );
246
  $controls_css_handle = 'vp-dynamic-styles-' . $options['id'];
247
 
248
+ wp_register_style( $controls_css_handle, false, array(), '2.3.0' );
249
  wp_enqueue_style( $controls_css_handle );
250
  wp_add_inline_style( $controls_css_handle, $dynamic_styles ? $dynamic_styles : ' ' );
251
 
369
  );
370
 
371
  foreach ( $vp_styles as $name => $data ) {
372
+ wp_register_style( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.3.0' );
373
  wp_style_add_data( $name, 'rtl', 'replace' );
374
  wp_style_add_data( $name, 'suffix', '.min' );
375
  }
477
  );
478
 
479
  foreach ( $vp_scripts as $name => $data ) {
480
+ wp_register_script( $name, visual_portfolio()->plugin_url . $data[0], $data[1], '2.3.0', true );
481
  }
482
 
483
  do_action( 'vpf_after_assets_register' );
classes/class-controls.php CHANGED
@@ -180,7 +180,7 @@ class Visual_Portfolio_Controls {
180
  if ( ! isset( $args['name'] ) ) {
181
  return;
182
  }
183
- self::$registered_fields[ $args['name'] ] = $args;
184
 
185
  do_action( 'vpf_registered_control', $args['name'], $args );
186
  }
180
  if ( ! isset( $args['name'] ) ) {
181
  return;
182
  }
183
+ self::$registered_fields[ $args['name'] ] = apply_filters( 'vpf_register_control', $args, $args['name'] );
184
 
185
  do_action( 'vpf_registered_control', $args['name'], $args );
186
  }
classes/class-custom-post-type.php CHANGED
@@ -41,6 +41,7 @@ class Visual_Portfolio_Custom_Post_Type {
41
  // force enable Gutenberg editor in 'vp_lists' for Classic Editor plugin.
42
  add_action( 'classic_editor_enabled_editors_for_post_type', array( $this, 'vp_lists_classic_plugin_force_gutenberg' ), 150, 2 );
43
  add_action( 'use_block_editor_for_post_type', array( $this, 'vp_lists_classic_plugin_force_gutenberg_2' ), 150, 2 );
 
44
 
45
  // force enable Gutenberg in 'vp_lists' for users with disabled option "Visual Editor".
46
  add_filter( 'user_can_richedit', array( $this, 'vp_lists_user_can_richedit_force' ) );
@@ -244,7 +245,7 @@ class Visual_Portfolio_Custom_Post_Type {
244
  if ( ! is_blog_installed() ) {
245
  return;
246
  }
247
- if ( get_option( 'visual_portfolio_updated_caps' ) === '2.2.0' ) {
248
  return;
249
  }
250
 
@@ -321,7 +322,7 @@ class Visual_Portfolio_Custom_Post_Type {
321
  $wp_roles->add_cap( 'administrator', $cap );
322
  }
323
 
324
- update_option( 'visual_portfolio_updated_caps', '2.2.0' );
325
  }
326
 
327
  /**
@@ -526,6 +527,20 @@ class Visual_Portfolio_Custom_Post_Type {
526
  return true;
527
  }
528
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
529
  /**
530
  * Force enable Gutenberg in 'vp_lists' for users with disabled option "Visual Editor".
531
  *
41
  // force enable Gutenberg editor in 'vp_lists' for Classic Editor plugin.
42
  add_action( 'classic_editor_enabled_editors_for_post_type', array( $this, 'vp_lists_classic_plugin_force_gutenberg' ), 150, 2 );
43
  add_action( 'use_block_editor_for_post_type', array( $this, 'vp_lists_classic_plugin_force_gutenberg_2' ), 150, 2 );
44
+ add_action( 'use_block_editor_for_post', array( $this, 'vp_lists_classic_plugin_force_gutenberg_3' ), 150, 2 );
45
 
46
  // force enable Gutenberg in 'vp_lists' for users with disabled option "Visual Editor".
47
  add_filter( 'user_can_richedit', array( $this, 'vp_lists_user_can_richedit_force' ) );
245
  if ( ! is_blog_installed() ) {
246
  return;
247
  }
248
+ if ( get_option( 'visual_portfolio_updated_caps' ) === '2.3.0' ) {
249
  return;
250
  }
251
 
322
  $wp_roles->add_cap( 'administrator', $cap );
323
  }
324
 
325
+ update_option( 'visual_portfolio_updated_caps', '2.3.0' );
326
  }
327
 
328
  /**
527
  return true;
528
  }
529
 
530
+ /**
531
+ * Force set Gutenberg editor for 'vp_lists' in 3rd-party plugins/themes, that uses their own builders.
532
+ *
533
+ * @param boolean $use_block_editor Use block editor.
534
+ * @param object $post The post object.
535
+ */
536
+ public function vp_lists_classic_plugin_force_gutenberg_3( $use_block_editor, $post ) {
537
+ if ( isset( $post->post_type ) && 'vp_lists' === $post->post_type ) {
538
+ return true;
539
+ }
540
+
541
+ return $use_block_editor;
542
+ }
543
+
544
  /**
545
  * Force enable Gutenberg in 'vp_lists' for users with disabled option "Visual Editor".
546
  *
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/iframeResizer.min.js', '', '4.2.1', 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.2.0', true );
37
 
38
- wp_register_style( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/css/elementor.min.css', array(), '2.2.0' );
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/iframeResizer.min.js', '', '4.2.1', 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.3.0', true );
37
 
38
+ wp_register_style( 'visual-portfolio-elementor', visual_portfolio()->plugin_url . 'assets/admin/css/elementor.min.css', array(), '2.3.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
@@ -21,7 +21,8 @@ if ( version_compare( PHP_VERSION, '5.5.9' ) >= 0 && ! class_exists( 'Cocur\Slug
21
  * Session Start
22
  */
23
  function vpf_session_start() {
24
- if ( ! is_admin() && ! session_id() ) {
 
25
  session_start();
26
  }
27
  }
@@ -158,7 +159,7 @@ class Visual_Portfolio_Get {
158
  $custom_taxonomies_result = false;
159
  if ( $custom_taxonomies && ! empty( $custom_taxonomies ) ) {
160
  foreach ( $custom_taxonomies as $tax ) {
161
- $custom_taxonomies_result = $custom_taxonomies_result || $custom_taxonomies === $tax;
162
  }
163
  }
164
 
@@ -421,18 +422,6 @@ class Visual_Portfolio_Get {
421
  }
422
  }
423
 
424
- $data_attrs = Visual_Portfolio_Extend::portfolio_attrs( $data_attrs, $options );
425
- $class = Visual_Portfolio_Extend::portfolio_class( $class, $options );
426
-
427
- visual_portfolio()->include_template(
428
- 'items-list/wrapper-start',
429
- array(
430
- 'options' => $options,
431
- 'data_attrs' => $data_attrs,
432
- 'class' => $class,
433
- )
434
- );
435
-
436
  // get options for the current style.
437
  $style_options = array();
438
  $style_options_slug = 'items_style_' . $options['items_style'] . '__';
@@ -450,6 +439,19 @@ class Visual_Portfolio_Get {
450
  }
451
  }
452
 
 
 
 
 
 
 
 
 
 
 
 
 
 
453
  // Top Layout elements.
454
  self::print_layout_elements( 'top', $options );
455
 
@@ -463,7 +465,8 @@ class Visual_Portfolio_Get {
463
  visual_portfolio()->include_template(
464
  'items-list/items-wrapper-start',
465
  array(
466
- 'options' => $options,
 
467
  )
468
  );
469
 
@@ -552,26 +555,22 @@ class Visual_Portfolio_Get {
552
  }
553
  }
554
 
555
- $args = apply_filters(
556
- 'vpf_image_item_args',
557
- array_merge(
558
- $each_item_args,
559
- array(
560
- 'uid' => isset( $img['uid'] ) && $img['uid'] ? $img['uid'] : '',
561
- 'url' => isset( $img['url'] ) && $img['url'] ? $img['url'] : wp_get_attachment_image_url( $img['id'], $img_size_popup ),
562
- 'title' => isset( $img['title'] ) && $img['title'] ? $img['title'] : '',
563
- 'format' => isset( $img['format'] ) && $img['format'] ? $img['format'] : 'standard',
564
- 'published_time' => isset( $img['published_time'] ) && $img['published_time'] ? $img['published_time'] : '',
565
- 'filter' => implode( ',', $filter_values ),
566
- 'image_id' => intval( $img['id'] ),
567
- 'focal_point' => isset( $img['focalPoint'] ) && $img['focalPoint'] ? $img['focalPoint'] : '',
568
- 'allow_popup' => ! isset( $img['url'] ) || ! $img['url'],
569
- 'categories' => $categories,
570
- 'author' => isset( $img['author'] ) && $img['author'] ? $img['author'] : '',
571
- 'author_url' => isset( $img['author'] ) && isset( $img['author_url'] ) && $img['author'] && $img['author_url'] ? $img['author_url'] : '',
572
- )
573
- ),
574
- $img
575
  );
576
 
577
  $slider_thumbnails[] = $args['image_id'];
@@ -585,6 +584,8 @@ class Visual_Portfolio_Get {
585
  $args['video'] = $img['video_url'];
586
  }
587
 
 
 
588
  self::each_item( $args );
589
  }
590
  } elseif ( isset( $portfolio_query ) ) {
@@ -691,7 +692,8 @@ class Visual_Portfolio_Get {
691
  visual_portfolio()->include_template(
692
  'items-list/items-wrapper-end',
693
  array(
694
- 'options' => $options,
 
695
  )
696
  );
697
 
@@ -701,7 +703,8 @@ class Visual_Portfolio_Get {
701
  visual_portfolio()->include_template(
702
  'items-list/layouts/slider/arrows',
703
  array(
704
- 'options' => $options,
 
705
  )
706
  );
707
  }
@@ -709,7 +712,8 @@ class Visual_Portfolio_Get {
709
  visual_portfolio()->include_template(
710
  'items-list/layouts/slider/bullets',
711
  array(
712
- 'options' => $options,
 
713
  )
714
  );
715
  }
@@ -724,9 +728,10 @@ class Visual_Portfolio_Get {
724
  visual_portfolio()->include_template(
725
  'items-list/layouts/slider/thumbnails',
726
  array(
727
- 'options' => $options,
728
- 'thumbnails' => $slider_thumbnails,
729
- 'img_size' => $img_size,
 
730
  )
731
  );
732
  }
@@ -737,7 +742,8 @@ class Visual_Portfolio_Get {
737
  visual_portfolio()->include_template(
738
  'items-list/wrapper-end',
739
  array(
740
- 'options' => $options,
 
741
  )
742
  );
743
 
@@ -1701,6 +1707,15 @@ class Visual_Portfolio_Get {
1701
  $args['published_human_format'] = $args['published'];
1702
  }
1703
 
 
 
 
 
 
 
 
 
 
1704
  // prepare read more button.
1705
  if ( isset( $args['opts']['show_read_more'] ) && $args['opts']['show_read_more'] ) {
1706
  if ( $is_posts && 'more_tag' === $args['opts']['show_read_more'] ) {
@@ -1714,11 +1729,6 @@ class Visual_Portfolio_Get {
1714
  }
1715
  }
1716
 
1717
- // add video format args.
1718
- if ( 'video' === $args['format'] && $args['video'] ) {
1719
- $args['format_video_url'] = $args['video'];
1720
- }
1721
-
1722
  // Click action.
1723
  switch ( $args['vp_opts']['items_click_action'] ) {
1724
  case 'popup_gallery':
@@ -2243,3 +2253,5 @@ class Visual_Portfolio_Get {
2243
  return $tags;
2244
  }
2245
  }
 
 
21
  * Session Start
22
  */
23
  function vpf_session_start() {
24
+ // Fixes problem with headers sent - https://wordpress.org/support/topic/headers-already-sent-43/ .
25
+ if ( ! is_admin() && ! session_id() && ! headers_sent() ) {
26
  session_start();
27
  }
28
  }
159
  $custom_taxonomies_result = false;
160
  if ( $custom_taxonomies && ! empty( $custom_taxonomies ) ) {
161
  foreach ( $custom_taxonomies as $tax ) {
162
+ $custom_taxonomies_result = $custom_taxonomies_result || $taxonomy === $tax;
163
  }
164
  }
165
 
422
  }
423
  }
424
 
 
 
 
 
 
 
 
 
 
 
 
 
425
  // get options for the current style.
426
  $style_options = array();
427
  $style_options_slug = 'items_style_' . $options['items_style'] . '__';
439
  }
440
  }
441
 
442
+ $data_attrs = Visual_Portfolio_Extend::portfolio_attrs( $data_attrs, $options );
443
+ $class = Visual_Portfolio_Extend::portfolio_class( $class, $options );
444
+
445
+ visual_portfolio()->include_template(
446
+ 'items-list/wrapper-start',
447
+ array(
448
+ 'options' => $options,
449
+ 'style_options' => $style_options,
450
+ 'data_attrs' => $data_attrs,
451
+ 'class' => $class,
452
+ )
453
+ );
454
+
455
  // Top Layout elements.
456
  self::print_layout_elements( 'top', $options );
457
 
465
  visual_portfolio()->include_template(
466
  'items-list/items-wrapper-start',
467
  array(
468
+ 'options' => $options,
469
+ 'style_options' => $style_options,
470
  )
471
  );
472
 
555
  }
556
  }
557
 
558
+ $args = array_merge(
559
+ $each_item_args,
560
+ array(
561
+ 'uid' => isset( $img['uid'] ) && $img['uid'] ? $img['uid'] : '',
562
+ 'url' => isset( $img['url'] ) && $img['url'] ? $img['url'] : wp_get_attachment_image_url( $img['id'], $img_size_popup ),
563
+ 'title' => isset( $img['title'] ) && $img['title'] ? $img['title'] : '',
564
+ 'format' => isset( $img['format'] ) && $img['format'] ? $img['format'] : 'standard',
565
+ 'published_time' => isset( $img['published_time'] ) && $img['published_time'] ? $img['published_time'] : '',
566
+ 'filter' => implode( ',', $filter_values ),
567
+ 'image_id' => intval( $img['id'] ),
568
+ 'focal_point' => isset( $img['focalPoint'] ) && $img['focalPoint'] ? $img['focalPoint'] : '',
569
+ 'allow_popup' => ! isset( $img['url'] ) || ! $img['url'],
570
+ 'categories' => $categories,
571
+ 'author' => isset( $img['author'] ) && $img['author'] ? $img['author'] : '',
572
+ 'author_url' => isset( $img['author'] ) && isset( $img['author_url'] ) && $img['author'] && $img['author_url'] ? $img['author_url'] : '',
573
+ )
 
 
 
 
574
  );
575
 
576
  $slider_thumbnails[] = $args['image_id'];
584
  $args['video'] = $img['video_url'];
585
  }
586
 
587
+ $args = apply_filters( 'vpf_image_item_args', $args, $img );
588
+
589
  self::each_item( $args );
590
  }
591
  } elseif ( isset( $portfolio_query ) ) {
692
  visual_portfolio()->include_template(
693
  'items-list/items-wrapper-end',
694
  array(
695
+ 'options' => $options,
696
+ 'style_options' => $style_options,
697
  )
698
  );
699
 
703
  visual_portfolio()->include_template(
704
  'items-list/layouts/slider/arrows',
705
  array(
706
+ 'options' => $options,
707
+ 'style_options' => $style_options,
708
  )
709
  );
710
  }
712
  visual_portfolio()->include_template(
713
  'items-list/layouts/slider/bullets',
714
  array(
715
+ 'options' => $options,
716
+ 'style_options' => $style_options,
717
  )
718
  );
719
  }
728
  visual_portfolio()->include_template(
729
  'items-list/layouts/slider/thumbnails',
730
  array(
731
+ 'options' => $options,
732
+ 'style_options' => $style_options,
733
+ 'thumbnails' => $slider_thumbnails,
734
+ 'img_size' => $img_size,
735
  )
736
  );
737
  }
742
  visual_portfolio()->include_template(
743
  'items-list/wrapper-end',
744
  array(
745
+ 'options' => $options,
746
+ 'style_options' => $style_options,
747
  )
748
  );
749
 
1707
  $args['published_human_format'] = $args['published'];
1708
  }
1709
 
1710
+ // add video format args.
1711
+ if ( 'video' === $args['format'] && $args['video'] ) {
1712
+ $args['format_video_url'] = $args['video'];
1713
+
1714
+ if ( ! $is_posts ) {
1715
+ $args['url'] = $args['video'];
1716
+ }
1717
+ }
1718
+
1719
  // prepare read more button.
1720
  if ( isset( $args['opts']['show_read_more'] ) && $args['opts']['show_read_more'] ) {
1721
  if ( $is_posts && 'more_tag' === $args['opts']['show_read_more'] ) {
1729
  }
1730
  }
1731
 
 
 
 
 
 
1732
  // Click action.
1733
  switch ( $args['vp_opts']['items_click_action'] ) {
1734
  case 'popup_gallery':
2253
  return $tags;
2254
  }
2255
  }
2256
+
2257
+ new Visual_Portfolio_Get();
classes/class-gutenberg.php CHANGED
@@ -165,14 +165,14 @@ class Visual_Portfolio_Gutenberg_Block {
165
  'visual-portfolio-gutenberg',
166
  plugins_url( '../gutenberg/index.min.js', __FILE__ ),
167
  array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'jquery' ),
168
- '2.2.0',
169
  true
170
  );
171
  wp_enqueue_style(
172
  'visual-portfolio-gutenberg',
173
  plugins_url( '../gutenberg/style.min.css', __FILE__ ),
174
  array(),
175
- '2.2.0'
176
  );
177
  wp_style_add_data( 'visual-portfolio-gutenberg', 'rtl', 'replace' );
178
  wp_style_add_data( 'visual-portfolio-gutenberg', 'suffix', '.min' );
@@ -192,7 +192,7 @@ class Visual_Portfolio_Gutenberg_Block {
192
  'visual-portfolio-gutenberg-custom-post-meta',
193
  plugins_url( '../gutenberg/custom-post-meta.min.js', __FILE__ ),
194
  array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'wp-plugins', 'jquery' ),
195
- '2.2.0',
196
  true
197
  );
198
 
165
  'visual-portfolio-gutenberg',
166
  plugins_url( '../gutenberg/index.min.js', __FILE__ ),
167
  array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'jquery' ),
168
+ '2.3.0',
169
  true
170
  );
171
  wp_enqueue_style(
172
  'visual-portfolio-gutenberg',
173
  plugins_url( '../gutenberg/style.min.css', __FILE__ ),
174
  array(),
175
+ '2.3.0'
176
  );
177
  wp_style_add_data( 'visual-portfolio-gutenberg', 'rtl', 'replace' );
178
  wp_style_add_data( 'visual-portfolio-gutenberg', 'suffix', '.min' );
192
  'visual-portfolio-gutenberg-custom-post-meta',
193
  plugins_url( '../gutenberg/custom-post-meta.min.js', __FILE__ ),
194
  array( 'wp-editor', 'wp-i18n', 'wp-element', 'wp-components', 'wp-plugins', 'jquery' ),
195
+ '2.3.0',
196
  true
197
  );
198
 
classes/class-migration.php CHANGED
@@ -18,7 +18,7 @@ class Visual_Portfolio_Migrations {
18
  *
19
  * @var string
20
  */
21
- protected $version = '2.2.0';
22
 
23
  /**
24
  * Initial version.
18
  *
19
  * @var string
20
  */
21
+ protected $version = '2.3.0';
22
 
23
  /**
24
  * Initial version.
classes/class-preview.php CHANGED
@@ -37,6 +37,7 @@ class Visual_Portfolio_Preview {
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
 
41
  add_action( 'wp_print_scripts', array( $this, 'localize_scripts' ), 9 );
42
  }
@@ -163,6 +164,17 @@ class Visual_Portfolio_Preview {
163
  }
164
  }
165
 
 
 
 
 
 
 
 
 
 
 
 
166
  /**
167
  * Template of preview page.
168
  */
@@ -174,7 +186,7 @@ class Visual_Portfolio_Preview {
174
 
175
  // Enqueue assets.
176
  wp_enqueue_script( 'iframe-resizer-content', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/iframeResizer.contentWindow.min.js', array(), '4.2.10', true );
177
- wp_enqueue_script( 'visual-portfolio-preview', visual_portfolio()->plugin_url . 'assets/js/preview.js', array( 'jquery', 'iframe-resizer-content' ), '2.2.0', true );
178
 
179
  // Post data for script.
180
  wp_localize_script(
@@ -217,7 +229,7 @@ class Visual_Portfolio_Preview {
217
  Visual_Portfolio_Assets::enqueue( $options );
218
 
219
  // Custom styles.
220
- visual_portfolio()->include_template_style( 'visual-portfolio-preview', 'preview/style' );
221
 
222
  // Output template.
223
  visual_portfolio()->include_template(
@@ -229,3 +241,5 @@ class Visual_Portfolio_Preview {
229
  );
230
  }
231
  }
 
 
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
 
42
  add_action( 'wp_print_scripts', array( $this, 'localize_scripts' ), 9 );
43
  }
164
  }
165
  }
166
 
167
+ /**
168
+ * Enqueue scripts action.
169
+ */
170
+ public function wp_enqueue_scripts() {
171
+ // Dequeue WooCommerce Geolocation script, since it reloads our preview iframe.
172
+ // Thanks to https://wordpress.org/support/topic/in-editor-the-normal-preview-replaced-with-a-smaller-website-load/ .
173
+ if ( $this->preview_enabled && wp_script_is( 'wc-geolocation', 'enqueued' ) ) {
174
+ wp_dequeue_script( 'wc-geolocation' );
175
+ }
176
+ }
177
+
178
  /**
179
  * Template of preview page.
180
  */
186
 
187
  // Enqueue assets.
188
  wp_enqueue_script( 'iframe-resizer-content', visual_portfolio()->plugin_url . 'assets/vendor/iframe-resizer/iframeResizer.contentWindow.min.js', array(), '4.2.10', true );
189
+ wp_enqueue_script( 'visual-portfolio-preview', visual_portfolio()->plugin_url . 'assets/js/preview.js', array( 'jquery', 'iframe-resizer-content' ), '2.3.0', true );
190
 
191
  // Post data for script.
192
  wp_localize_script(
229
  Visual_Portfolio_Assets::enqueue( $options );
230
 
231
  // Custom styles.
232
+ visual_portfolio()->include_template_style( 'visual-portfolio-preview', 'preview/style', array(), '2.3.0' );
233
 
234
  // Output template.
235
  visual_portfolio()->include_template(
241
  );
242
  }
243
  }
244
+
245
+ new Visual_Portfolio_Preview();
classes/class-rest.php CHANGED
@@ -197,3 +197,5 @@ class Visual_Portfolio_Rest extends WP_REST_Controller {
197
  );
198
  }
199
  }
 
 
197
  );
198
  }
199
  }
200
+
201
+ new Visual_Portfolio_Rest();
classes/class-settings.php CHANGED
@@ -60,6 +60,25 @@ class Visual_Portfolio_Settings {
60
  return 'off' === $result ? false : ( 'on' === $result ? true : $result );
61
  }
62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  /**
64
  * Init actions
65
  */
@@ -119,9 +138,13 @@ class Visual_Portfolio_Settings {
119
  'id' => 'vp_popup_gallery',
120
  'title' => esc_html__( 'Popup Gallery', 'visual-portfolio' ),
121
  ),
 
 
 
 
122
  );
123
 
124
- return $sections;
125
  }
126
 
127
  /**
@@ -159,7 +182,7 @@ class Visual_Portfolio_Settings {
159
  // AJAX Caching and Preloading.
160
  array(
161
  'name' => 'ajax_caching',
162
- 'label' => esc_html__( 'AJAX Caching and Preloading', 'visual-portfolio' ),
163
  'desc' => esc_html__( 'Reduce AJAX calls request time.', 'visual-portfolio' ),
164
  'type' => 'checkbox',
165
  'default' => ! class_exists( 'Visual_Portfolio_Pro' ) ? 'off' : 'on',
@@ -355,7 +378,7 @@ class Visual_Portfolio_Settings {
355
  'desc' => esc_html__( 'When you display pages in popup iframe, you may not need some page elements like header and footer. Hide it using custom CSS with classname `.vp-popup-iframe`.', 'visual-portfolio' ),
356
  'type' => 'textarea',
357
  'default' => ! class_exists( 'Visual_Portfolio_Pro' ) ? '' : '
358
- .vp-popup-iframe .site-header,
359
  .vp-popup-iframe #site-footer,
360
  .vp-popup-iframe #colophon {
361
  display: none;
@@ -363,9 +386,24 @@ class Visual_Portfolio_Settings {
363
  'is_pro' => true,
364
  ),
365
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
366
  );
367
 
368
- return $settings_fields;
369
  }
370
 
371
  /**
@@ -400,3 +438,5 @@ class Visual_Portfolio_Settings {
400
  <?php
401
  }
402
  }
 
 
60
  return 'off' === $result ? false : ( 'on' === $result ? true : $result );
61
  }
62
 
63
+ /**
64
+ * Update Option Value
65
+ *
66
+ * @param string $option - option name.
67
+ * @param string $section - section name.
68
+ * @param string $value - new option value.
69
+ */
70
+ public static function update_option( $option, $section, $value ) {
71
+ $options = get_option( $section );
72
+
73
+ if ( ! is_array( $options ) ) {
74
+ $options = array();
75
+ }
76
+
77
+ $options[ $option ] = $value;
78
+
79
+ update_option( $section, $options );
80
+ }
81
+
82
  /**
83
  * Init actions
84
  */
138
  'id' => 'vp_popup_gallery',
139
  'title' => esc_html__( 'Popup Gallery', 'visual-portfolio' ),
140
  ),
141
+ array(
142
+ 'id' => 'vp_social_integrations',
143
+ 'title' => esc_html__( 'Social Integrations', 'visual-portfolio' ),
144
+ ),
145
  );
146
 
147
+ return apply_filters( 'vpf_settings_sections', $sections );
148
  }
149
 
150
  /**
182
  // AJAX Caching and Preloading.
183
  array(
184
  'name' => 'ajax_caching',
185
+ 'label' => esc_html__( 'AJAX Cache and Preload', 'visual-portfolio' ),
186
  'desc' => esc_html__( 'Reduce AJAX calls request time.', 'visual-portfolio' ),
187
  'type' => 'checkbox',
188
  'default' => ! class_exists( 'Visual_Portfolio_Pro' ) ? 'off' : 'on',
378
  'desc' => esc_html__( 'When you display pages in popup iframe, you may not need some page elements like header and footer. Hide it using custom CSS with classname `.vp-popup-iframe`.', 'visual-portfolio' ),
379
  'type' => 'textarea',
380
  'default' => ! class_exists( 'Visual_Portfolio_Pro' ) ? '' : '
381
+ .vp-popup-iframe #site-header,
382
  .vp-popup-iframe #site-footer,
383
  .vp-popup-iframe #colophon {
384
  display: none;
386
  'is_pro' => true,
387
  ),
388
  ),
389
+ 'vp_social_integrations' => array(
390
+ array(
391
+ 'name' => 'social_pro_info',
392
+ 'desc' => '
393
+ <div class="vpf-settings-info-pro">
394
+ <h3>' . esc_html__( 'PRO Feature', 'visual-portfolio' ) . '</h3>
395
+ <div>
396
+ <p>' . esc_html__( 'Social feeds such as Youtube, Vimeo, Flickr, Twitter, etc...', 'visual-portfolio' ) . '</p>
397
+ <a class="vpf-settings-info-pro-button" target="_blank" rel="noopener noreferrer" href="https://visualportfolio.co/pro/">' . esc_html__( 'Read More', 'visual-portfolio' ) . '</a>
398
+ </div>
399
+ </div>
400
+ ',
401
+ 'type' => 'html',
402
+ ),
403
+ ),
404
  );
405
 
406
+ return apply_filters( 'vpf_settings_fields', $settings_fields );
407
  }
408
 
409
  /**
438
  <?php
439
  }
440
  }
441
+
442
+ new Visual_Portfolio_Settings();
classes/class-shortcode.php CHANGED
@@ -83,3 +83,5 @@ class Visual_Portfolio_Shortcode {
83
  return Visual_Portfolio_Get::get_sort( $atts );
84
  }
85
  }
 
 
83
  return Visual_Portfolio_Get::get_sort( $atts );
84
  }
85
  }
86
+
87
+ new Visual_Portfolio_Shortcode();
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.2.0' );
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.3.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.2.0', true );
74
  wp_localize_script( 'visual-portfolio-tinymce-localize', 'VPTinyMCEOptions', $data_tiny_mce );
75
  }
76
  }
@@ -99,3 +99,5 @@ class Visual_Portfolio_TinyMCE {
99
  return $buttons;
100
  }
101
  }
 
 
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.3.0', true );
74
  wp_localize_script( 'visual-portfolio-tinymce-localize', 'VPTinyMCEOptions', $data_tiny_mce );
75
  }
76
  }
99
  return $buttons;
100
  }
101
  }
102
+
103
+ new Visual_Portfolio_TinyMCE();
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.2.0', true );
39
  }
40
  }
41
 
@@ -94,3 +94,5 @@ class Visual_Portfolio_VC {
94
  }
95
  }
96
  }
 
 
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.3.0', true );
39
  }
40
  }
41
 
94
  }
95
  }
96
  }
97
+
98
+ new Visual_Portfolio_VC();
gutenberg/components/iframe-preview/index.js CHANGED
@@ -142,11 +142,11 @@ export default class IframePreview extends Component {
142
  } );
143
 
144
  if ( Object.keys( changedAttributes ).length ) {
145
- let reload = true;
146
 
147
  // Don't reload if block has dynamic styles.
148
  Object.keys( changedAttributes ).forEach( ( name ) => {
149
- reload = reload && ! hasDynamicCSS( name );
150
  } );
151
 
152
  const data = applyFilters( 'vpf.editor.changed-attributes', {
142
  } );
143
 
144
  if ( Object.keys( changedAttributes ).length ) {
145
+ let reload = false;
146
 
147
  // Don't reload if block has dynamic styles.
148
  Object.keys( changedAttributes ).forEach( ( name ) => {
149
+ reload = reload || ! hasDynamicCSS( name );
150
  } );
151
 
152
  const data = applyFilters( 'vpf.editor.changed-attributes', {
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=264)}({264:function(e,t,n){e.exports=n(273)},265: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 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 a(){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}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=wp.i18n.__,f=wp.compose,p=f.withInstanceId,s=f.compose,m=wp.data,d=m.withSelect,b=m.withDispatch,y=wp.element.Component,h=wp.components,v=h.PanelRow,w=h.FocalPointPicker,g=wp.editPost.PluginDocumentSettingPanel,_=wp.plugins.registerPlugin,P=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)}(m,e);var t,n,f,p,s=(t=m,function(){var e,n=c(t);if(a()){var o=c(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return u(this,e)});function m(){return o(this,m),s.apply(this,arguments)}return n=m,(f=[{key:"render",value:function(){var e=this.props,t=e.getMeta,n=e.getThumbnail,o=e.updateMeta,r=n();if(!r||!r.source_url)return"";var i=t("_vp_image_focal_point");return i&&i.x&&i.y||(i={x:"0.5",y:"0.5"}),wp.element.createElement(g,{name:"VPImageFocalPoint",title:l("Featured Image Focal Point","@@text_domain"),icon:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("rect",{x:"0.75",y:"0.75",width:"18.5",height:"18.5",rx:"1.25",stroke:"currentColor",strokeWidth:"1.5",fill:"transparent"}),wp.element.createElement("path",{d:"M1 15.5L6 12L10 14L14.5 10L19 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"transparent"})),className:"vpf-meta-image-focal-point-panel"},wp.element.createElement(v,null,wp.element.createElement("p",{className:"description"},l("Focal point will be used in Visual Portfolio layouts only.","@@text_domain"))),wp.element.createElement(v,null,wp.element.createElement(w,{url:r.source_url,value:i,onChange:function(e){o("_vp_image_focal_point",e)}})))}}])&&r(n.prototype,f),p&&r(n,p),m}(y);_("vp-image-focal-point",{render:s([d((function(e){return{getMeta:function(t){return(e("core/editor").getEditedPostAttribute("meta")||{})[t]},getThumbnail:function(){var t=e("core/editor").getEditedPostAttribute("featured_media");return t?e("core").getMedia(t):null}}})),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])(P)})},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 u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(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 l(){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}}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,h=b.withDispatch,v=wp.element.Component,w=wp.components,g=w.PanelRow,_=w.TextControl,P=wp.editPost.PluginDocumentSettingPanel,O=wp.plugins.registerPlugin,j=window,x=j.jQuery,E=j.ajaxurl,S=j.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)}(d,e);var t,n,r,s,m=(t=d,function(){var e,n=f(t);if(l()){var o=f(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return a(this,e)});function d(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),(t=m.call(this,e)).state={oembedQuery:"",oembedHTML:""},t.maybePrepareOembed=Object(o.a)(300,t.maybePrepareOembed.bind(c(t))),t}return n=d,(r=[{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 u=i("_vp_format_video_url");n!==u&&(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:u,nonce:S.nonce},complete:function(t){var n=t.responseJSON,o={oembedQuery:u,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()?"":wp.element.createElement(P,{name:"VPVideo",title:p("Video","@@text_domain"),icon:wp.element.createElement("svg",{width:"20",height:"20",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"},p("Video will be used in Visual Portfolio layouts only.","@@text_domain"))),wp.element.createElement(g,null,wp.element.createElement(_,{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(g,null,wp.element.createElement("div",{className:"vp-oembed-preview",dangerouslySetInnerHTML:{__html:r}})))}}])&&i(n.prototype,r),s&&i(n,s),d}(v);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")}}})),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)})}}})),m])(C)});n(265)},3:function(e,t,n){"use strict";function o(e,t,n,o){var r,i=!1,u=0;function a(){r&&clearTimeout(r)}function c(){var c=this,l=Date.now()-u,f=arguments;function p(){u=Date.now(),n.apply(c,f)}function s(){r=void 0}i||(o&&!r&&p(),a(),void 0===o&&l>e?p():!0!==t&&(r=setTimeout(o?s:p,void 0===o?e-l:e)))}return"boolean"!=typeof t&&(o=n,n=t,t=void 0),c.cancel=function(){a(),i=!0},c}function r(e,t,n){return void 0===n?o(e,t,!1):o(e,n,!1!==t)}n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return r}))}});
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=264)}({264:function(e,t,n){e.exports=n(274)},265: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,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 u(){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}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=wp.i18n.__,f=wp.compose,p=f.withInstanceId,s=f.compose,m=wp.data,d=m.withSelect,b=m.withDispatch,y=wp.element.Component,v=wp.components,h=v.PanelRow,w=v.FocalPointPicker,g=wp.editPost.PluginDocumentSettingPanel,_=wp.plugins.registerPlugin,P=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)}(m,e);var t,n,f,p,s=(t=m,function(){var e,n=c(t);if(u()){var o=c(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return a(this,e)});function m(){return o(this,m),s.apply(this,arguments)}return n=m,(f=[{key:"render",value:function(){var e=this.props,t=e.getMeta,n=e.getThumbnail,o=e.updateMeta,r=n();if(!r||!r.source_url)return"";var i=t("_vp_image_focal_point");return i&&i.x&&i.y||(i={x:"0.5",y:"0.5"}),wp.element.createElement(g,{name:"VPImageFocalPoint",title:l("Featured Image Focal Point","@@text_domain"),icon:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("rect",{x:"0.75",y:"0.75",width:"18.5",height:"18.5",rx:"1.25",stroke:"currentColor",strokeWidth:"1.5",fill:"transparent"}),wp.element.createElement("path",{d:"M1 15.5L6 12L10 14L14.5 10L19 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"transparent"})),className:"vpf-meta-image-focal-point-panel"},wp.element.createElement(h,null,wp.element.createElement("p",{className:"description"},l("Focal point will be used in Visual Portfolio layouts only.","@@text_domain"))),wp.element.createElement(h,null,wp.element.createElement(w,{url:r.source_url,value:i,onChange:function(e){o("_vp_image_focal_point",e)}})))}}])&&r(n.prototype,f),p&&r(n,p),m}(y);_("vp-image-focal-point",{render:s([d((function(e){return{getMeta:function(t){return(e("core/editor").getEditedPostAttribute("meta")||{})[t]},getThumbnail:function(){var t=e("core/editor").getEditedPostAttribute("featured_media");return t?e("core").getMedia(t):null}}})),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])(P)})},274: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,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 l(){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}}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,g=w.PanelRow,_=w.TextControl,P=wp.editPost.PluginDocumentSettingPanel,O=wp.plugins.registerPlugin,j=window,x=j.jQuery,E=j.ajaxurl,S=j.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&&a(e,t)}(d,e);var t,n,r,s,m=(t=d,function(){var e,n=f(t);if(l()){var o=f(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return u(this,e)});function d(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),(t=m.call(this,e)).state={oembedQuery:"",oembedHTML:""},t.maybePrepareOembed=Object(o.a)(300,t.maybePrepareOembed.bind(c(t))),t}return n=d,(r=[{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:S.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()?"":wp.element.createElement(P,{name:"VPVideo",title:p("Video","@@text_domain"),icon:wp.element.createElement("svg",{width:"20",height:"20",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"},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(g,null,wp.element.createElement(_,{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(g,null,wp.element.createElement("div",{className:"vp-oembed-preview",dangerouslySetInnerHTML:{__html:r}})))}}])&&i(n.prototype,r),s&&i(n,s),d}(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])(C)});n(265)},3:function(e,t,n){"use strict";function o(e,t,n,o){var r,i=!1,a=0;function u(){r&&clearTimeout(r)}function c(){var c=this,l=Date.now()-a,f=arguments;function p(){a=Date.now(),n.apply(c,f)}function s(){r=void 0}i||(o&&!r&&p(),u(),void 0===o&&l>e?p():!0!==t&&(r=setTimeout(o?s:p,void 0===o?e-l:e)))}return"boolean"!=typeof t&&(o=n,n=t,t=void 0),c.cancel=function(){u(),i=!0},c}function r(e,t,n){return void 0===n?o(e,t,!1):o(e,n,!1!==t)}n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return r}))}});
gutenberg/custom-post-meta/video.js CHANGED
@@ -144,7 +144,13 @@ class VpVideoComponent extends Component {
144
  className="vpf-meta-video-panel"
145
  >
146
  <PanelRow>
147
- <p className="description">{ __( 'Video will be used in Visual Portfolio layouts only.', 'visual-portfolio' ) }</p>
 
 
 
 
 
 
148
  </PanelRow>
149
  <PanelRow>
150
  <TextControl
144
  className="vpf-meta-video-panel"
145
  >
146
  <PanelRow>
147
+ <p className="description">
148
+ { __( 'Video will be used in Visual Portfolio layouts only. Full list of supported links', 'visual-portfolio' ) }
149
+ &nbsp;
150
+ <a href="https://visualportfolio.co/documentation/portfolio-items/video-portfolio-item/#supported-video-vendors" target="_blank" rel="noopener noreferrer">
151
+ { __( 'see here', 'visual-portfolio' ) }
152
+ </a>
153
+ </p>
154
  </PanelRow>
155
  <PanelRow>
156
  <TextControl
gutenberg/extensions/classic-icon-with-overlay.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ const {
5
+ addFilter,
6
+ } = wp.hooks;
7
+
8
+ /**
9
+ * Add overlay automatically for Classic style, when Display Icon option enabled.
10
+ */
11
+ addFilter( 'vpf.editor.controls-on-change', 'vpf/editor/controls-on-change/classic-icon-with-overlay', ( newAttributes, control, val, attributes ) => {
12
+ if ( 'items_style_default__show_icon' === control.name && val && ! attributes.items_style_default__bg_color ) {
13
+ newAttributes.items_style_default__bg_color = '#000';
14
+ newAttributes.items_style_default__text_color = '#fff';
15
+ }
16
+
17
+ return newAttributes;
18
+ } );
gutenberg/extensions/stretch-for-saved-only.js CHANGED
@@ -5,13 +5,9 @@ const {
5
  addFilter,
6
  } = wp.hooks;
7
 
8
- const {
9
- VPSavedLayoutVariables,
10
- } = window;
11
-
12
  // Allow Stretch control on Saved Layouts editor only.
13
  addFilter( 'vpf.editor.controls-render-data', 'vpf/editor/controls-render-data/customize-controls', ( data ) => {
14
- if ( 'stretch' === data.name && ! VPSavedLayoutVariables ) {
15
  data = {
16
  ...data,
17
  skip: true,
5
  addFilter,
6
  } = wp.hooks;
7
 
 
 
 
 
8
  // Allow Stretch control on Saved Layouts editor only.
9
  addFilter( 'vpf.editor.controls-render-data', 'vpf/editor/controls-render-data/customize-controls', ( data ) => {
10
+ if ( 'stretch' === data.name && ! window.VPSavedLayoutVariables ) {
11
  data = {
12
  ...data,
13
  skip: true,
gutenberg/index.js CHANGED
@@ -12,6 +12,7 @@ import './store';
12
  * Extensions
13
  */
14
  import './extensions/block-id';
 
15
  import './extensions/items-count-all';
16
  import './extensions/link-rel';
17
  import './extensions/stretch-for-saved-only';
12
  * Extensions
13
  */
14
  import './extensions/block-id';
15
+ import './extensions/classic-icon-with-overlay';
16
  import './extensions/items-count-all';
17
  import './extensions/link-rel';
18
  import './extensions/stretch-for-saved-only';
gutenberg/index.min.js CHANGED
@@ -8,7 +8,7 @@
8
  * getSize v2.0.3
9
  * measure size of elements
10
  * MIT license
11
- */window,void 0===(i="function"==typeof(r=function(){"use strict";function e(e){var t=parseFloat(e);return-1==e.indexOf("%")&&!isNaN(t)&&t}var t="undefined"==typeof console?function(){}:function(e){console.error(e)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],r=n.length;function i(e){var n=getComputedStyle(e);return n||t("Style returned "+n+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),n}var s,a=!1;function l(t){if(function(){if(!a){a=!0;var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(t);var r=i(t);s=200==Math.round(e(r.width)),l.isBoxSizeOuter=s,n.removeChild(t)}}(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==o(t)&&t.nodeType){var c=i(t);if("none"==c.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t<r;t++)e[n[t]]=0;return e}();var u={};u.width=t.offsetWidth,u.height=t.offsetHeight;for(var h=u.isBorderBox="border-box"==c.boxSizing,d=0;d<r;d++){var p=n[d],f=c[p],m=parseFloat(f);u[p]=isNaN(m)?0:m}var g=u.paddingLeft+u.paddingRight,v=u.paddingTop+u.paddingBottom,b=u.marginLeft+u.marginRight,y=u.marginTop+u.marginBottom,w=u.borderLeftWidth+u.borderRightWidth,k=u.borderTopWidth+u.borderBottomWidth,x=h&&s,S=e(c.width);!1!==S&&(u.width=S+(x?0:g+w));var E=e(c.height);return!1!==E&&(u.height=E+(x?0:v+k)),u.innerWidth=u.width-(g+w),u.innerHeight=u.height-(v+k),u.outerWidth=u.width+b,u.outerHeight=u.height+y,u}}return l})?r.call(t,n,t,e):r)||(e.exports=i)},function(e,t,n){var r=n(50),i=n(32),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];o.call(e,t)&&i(s,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){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)}var i=n(53),o="object"==r(t)&&t&&!t.nodeType&&t,s=o&&"object"==r(e)&&e&&!e.nodeType&&e,a=s&&s.exports===o&&i.process,l=function(){try{var e=s&&s.require&&s.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=l}).call(this,n(11)(e))},function(e,t,n){var r=n(8)(n(4),"Map");e.exports=r},function(e,t,n){var r=n(168),i=n(69),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),r(s(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(63)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(171),i=n(35),o=n(172),s=n(173),a=n(174),l=n(12),c=n(54),u=c(r),h=c(i),d=c(o),p=c(s),f=c(a),m=l;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||o&&"[object Promise]"!=m(o.resolve())||s&&"[object Set]"!=m(new s)||a&&"[object WeakMap]"!=m(new a))&&(m=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case u:return"[object DataView]";case h:return"[object Map]";case d:return"[object Promise]";case p:return"[object Set]";case f:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){var r=n(177);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){var r=n(10),i=n(189),o=n(190),s=n(193);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(s(e))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return pn}));var r=n(3),i=n(0),o=n.n(i),s=n(76),a=n.n(s);var l=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var i=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var o=105===e.charCodeAt(1)&&64===e.charCodeAt(0);i.insertRule(e,o?0:i.cssRules.length)}catch(e){0}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}();function c(e){return(c="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 u=function(e){function t(e,t,r){var i=t.trim().split(m);t=i;var o=i.length,s=e.length;switch(s){case 0:case 1:var a=0;for(e=0===s?"":e[0]+" ";a<o;++a)t[a]=n(e,t[a],r).trim();break;default:var l=a=0;for(t=[];a<o;++a)for(var c=0;c<s;++c)t[l++]=n(e[c]+" ",i[a],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,o){var s=e+";",a=2*t+3*n+4*o;if(944===a){e=s.indexOf(":",9)+1;var l=s.substring(e,s.length-1).trim();return l=s.substring(0,e).trim()+l+";",1===O||2===O&&i(l,1)?"-webkit-"+l+l:l}if(0===O||2===O&&!i(s,1))return s;switch(a){case 1015:return 97===s.charCodeAt(10)?"-webkit-"+s+s:s;case 951:return 116===s.charCodeAt(3)?"-webkit-"+s+s:s;case 963:return 110===s.charCodeAt(5)?"-webkit-"+s+s:s;case 1009:if(100!==s.charCodeAt(4))break;case 969:case 942:return"-webkit-"+s+s;case 978:return"-webkit-"+s+"-moz-"+s+s;case 1019:case 983:return"-webkit-"+s+"-moz-"+s+"-ms-"+s+s;case 883:if(45===s.charCodeAt(8))return"-webkit-"+s+s;if(0<s.indexOf("image-set(",11))return s.replace(C,"$1-webkit-$2")+s;break;case 932:if(45===s.charCodeAt(4))switch(s.charCodeAt(5)){case 103:return"-webkit-box-"+s.replace("-grow","")+"-webkit-"+s+"-ms-"+s.replace("grow","positive")+s;case 115:return"-webkit-"+s+"-ms-"+s.replace("shrink","negative")+s;case 98:return"-webkit-"+s+"-ms-"+s.replace("basis","preferred-size")+s}return"-webkit-"+s+"-ms-"+s+s;case 964:return"-webkit-"+s+"-ms-flex-"+s+s;case 1023:if(99!==s.charCodeAt(8))break;return"-webkit-box-pack"+(l=s.substring(s.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+s+"-ms-flex-pack"+l+s;case 1005:return p.test(s)?s.replace(d,":-webkit-")+s.replace(d,":-moz-")+s:s;case 1e3:switch(t=(l=s.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=s.replace(w,"tb");break;case 232:l=s.replace(w,"tb-rl");break;case 220:l=s.replace(w,"lr");break;default:return s}return"-webkit-"+s+"-ms-"+l+s;case 1017:if(-1===s.indexOf("sticky",9))break;case 975:switch(t=(s=e).length-10,a=(l=(33===s.charCodeAt(t)?s.substring(0,t):s).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:s=s.replace(l,"-webkit-"+l)+";"+s;break;case 207:case 102:s=s.replace(l,"-webkit-"+(102<a?"inline-":"")+"box")+";"+s.replace(l,"-webkit-"+l)+";"+s.replace(l,"-ms-"+l+"box")+";"+s}return s+";";case 938:if(45===s.charCodeAt(5))switch(s.charCodeAt(6)){case 105:return l=s.replace("-items",""),"-webkit-"+s+"-webkit-box-"+l+"-ms-flex-"+l+s;case 115:return"-webkit-"+s+"-ms-flex-item-"+s.replace(S,"")+s;default:return"-webkit-"+s+"-ms-flex-line-pack"+s.replace("align-content","").replace(S,"")+s}break;case 973:case 989:if(45!==s.charCodeAt(3)||122===s.charCodeAt(4))break;case 931:case 953:if(!0===_.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,o).replace(":fill-available",":stretch"):s.replace(l,"-webkit-"+l)+s.replace(l,"-moz-"+l.replace("fill-",""))+s;break;case 962:if(s="-webkit-"+s+(102===s.charCodeAt(5)?"-ms-"+s:"")+s,211===n+o&&105===s.charCodeAt(13)&&0<s.indexOf("transform",10))return s.substring(0,s.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+s}return s}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),j(2!==t?r:r.replace(E,"$1"),n,t)}function o(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(x," or ($1)").substring(4):"("+t+")"}function s(e,t,n,r,i,o,s,a,c,u){for(var h,d=0,p=t;d<M;++d)switch(h=$[d].call(l,e,p,n,r,i,o,s,a,c,u)){case void 0:case!1:case!0:case null:break;default:p=h}if(p!==t)return p}function a(e){return void 0!==(e=e.prefix)&&(j=null,e?"function"!=typeof e?O=1:(O=2,j=e):O=0),a}function l(e,n){var a=e;if(33>a.charCodeAt(0)&&(a=a.trim()),a=[a],0<M){var l=s(-1,n,a,a,L,T,0,0,0,0);void 0!==l&&"string"==typeof l&&(n=l)}var c=function e(n,a,l,c,d){for(var p,f,m,g,w,x=0,S=0,E=0,_=0,C=0,$=0,j=m=p=0,I=0,N=0,F=0,D=0,W=l.length,z=W-1,B="",V="",H="",U="";I<W;){if(f=l.charCodeAt(I),I===z&&0!==S+_+E+x&&(0!==S&&(f=47===S?10:47),_=E=x=0,W++,z++),0===S+_+E+x){if(I===z&&(0<N&&(B=B.replace(h,"")),0<B.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:B+=l.charAt(I)}f=59}switch(f){case 123:for(p=(B=B.trim()).charCodeAt(0),m=1,D=++I;I<W;){switch(f=l.charCodeAt(I)){case 123:m++;break;case 125:m--;break;case 47:switch(f=l.charCodeAt(I+1)){case 42:case 47:e:{for(j=I+1;j<z;++j)switch(l.charCodeAt(j)){case 47:if(42===f&&42===l.charCodeAt(j-1)&&I+2!==j){I=j+1;break e}break;case 10:if(47===f){I=j+1;break e}}I=j}}break;case 91:f++;case 40:f++;case 34:case 39:for(;I++<z&&l.charCodeAt(I)!==f;);}if(0===m)break;I++}switch(m=l.substring(D,I),0===p&&(p=(B=B.replace(u,"").trim()).charCodeAt(0)),p){case 64:switch(0<N&&(B=B.replace(h,"")),f=B.charCodeAt(1)){case 100:case 109:case 115:case 45:N=a;break;default:N=R}if(D=(m=e(a,N,m,f,d+1)).length,0<M&&(w=s(3,m,N=t(R,B,F),a,L,T,D,f,d,c),B=N.join(""),void 0!==w&&0===(D=(m=w.trim()).length)&&(f=0,m="")),0<D)switch(f){case 115:B=B.replace(k,o);case 100:case 109:case 45:m=B+"{"+m+"}";break;case 107:m=(B=B.replace(v,"$1 $2"))+"{"+m+"}",m=1===O||2===O&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=B+m,112===c&&(V+=m,m="")}else m="";break;default:m=e(a,t(a,B,F),m,c,d+1)}H+=m,m=F=N=j=p=0,B="",f=l.charCodeAt(++I);break;case 125:case 59:if(1<(D=(B=(0<N?B.replace(h,""):B).trim()).length))switch(0===j&&(p=B.charCodeAt(0),45===p||96<p&&123>p)&&(D=(B=B.replace(" ",":")).length),0<M&&void 0!==(w=s(1,B,a,n,L,T,V.length,c,d,c))&&0===(D=(B=w.trim()).length)&&(B="\0\0"),p=B.charCodeAt(0),f=B.charCodeAt(1),p){case 0:break;case 64:if(105===f||99===f){U+=B+l.charAt(I);break}default:58!==B.charCodeAt(D-1)&&(V+=r(B,p,f,B.charCodeAt(2)))}F=N=j=p=0,B="",f=l.charCodeAt(++I)}}switch(f){case 13:case 10:47===S?S=0:0===1+p&&107!==c&&0<B.length&&(N=1,B+="\0"),0<M*P&&s(0,B,a,n,L,T,V.length,c,d,c),T=1,L++;break;case 59:case 125:if(0===S+_+E+x){T++;break}default:switch(T++,g=l.charAt(I),f){case 9:case 32:if(0===_+x+S)switch(C){case 44:case 58:case 9:case 32:g="";break;default:32!==f&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===_+S+x&&(N=F=1,g="\f"+g);break;case 108:if(0===_+S+x+A&&0<j)switch(I-j){case 2:112===C&&58===l.charCodeAt(I-3)&&(A=C);case 8:111===$&&(A=$)}break;case 58:0===_+S+x&&(j=I);break;case 44:0===S+E+_+x&&(N=1,g+="\r");break;case 34:case 39:0===S&&(_=_===f?0:0===_?f:_);break;case 91:0===_+S+E&&x++;break;case 93:0===_+S+E&&x--;break;case 41:0===_+S+x&&E--;break;case 40:if(0===_+S+x){if(0===p)switch(2*C+3*$){case 533:break;default:p=1}E++}break;case 64:0===S+E+_+x+j+m&&(m=1);break;case 42:case 47:if(!(0<_+x+E))switch(S){case 0:switch(2*f+3*l.charCodeAt(I+1)){case 235:S=47;break;case 220:D=I,S=42}break;case 42:47===f&&42===C&&D+2!==I&&(33===l.charCodeAt(D+2)&&(V+=l.substring(D,I+1)),g="",S=0)}}0===S&&(B+=g)}$=C,C=f,I++}if(0<(D=V.length)){if(N=a,0<M&&(void 0!==(w=s(2,V,N,n,L,T,D,c,d,c))&&0===(V=w).length))return U+V+H;if(V=N.join(",")+"{"+V+"}",0!=O*A){switch(2!==O||i(V,2)||(A=0),A){case 111:V=V.replace(y,":-moz-$1")+V;break;case 112:V=V.replace(b,"::-webkit-input-$1")+V.replace(b,"::-moz-$1")+V.replace(b,":-ms-input-$1")+V}A=0}}return U+V+H}(R,a,n,0,0);return 0<M&&(void 0!==(l=s(-2,c,a,a,L,T,c.length,0,0,0))&&(c=l)),"",A=0,T=L=1,c}var u=/^\0+/g,h=/[\0\r\f]/g,d=/: */g,p=/zoo|gra/,f=/([,: ])(transform)/g,m=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,y=/:(read-only)/g,w=/[svh]\w+-[tblr]{2}/,k=/\(\s*(.*)\s*\)/g,x=/([\s\S]*?);/g,S=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,_=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,T=1,L=1,A=0,O=1,R=[],$=[],M=0,j=null,P=0;return l.use=function e(t){switch(t){case void 0:case null:M=$.length=0;break;default:if("function"==typeof t)$[M++]=t;else if("object"===c(t))for(var n=0,r=t.length;n<r;++n)e(t[n]);else P=0|!!t}return e},l.set=a,void 0!==e&&a(e),l};function h(e){e&&d.current.insert(e+"}")}var d={current:null},p=function(e,t,n,r,i,o,s,a,l,c){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return d.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===a)return t+"/*|*/";break;case 3:switch(a){case 102:case 112:return d.current.insert(n[0]+t),"";default:return t+(0===c?"/*|*/":"")}case-2:t.split("/*|*/}").forEach(h)}},f=function(e){void 0===e&&(e={});var t,n=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var r=new u(t);var i,o={};i=e.container||document.head;var s,a=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(a,(function(e){e.getAttribute("data-emotion-"+n).split(" ").forEach((function(e){o[e]=!0})),e.parentNode!==i&&i.appendChild(e)})),r.use(e.stylisPlugins)(p),s=function(e,t,n,i){var o=t.name;d.current=n,r(e,t.styles),i&&(c.inserted[o]=!0)};var c={key:n,sheet:new l({key:n,container:i,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:o,registered:{},insert:s};return c};function m(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]):r+=n+" "})),r}var g=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var i=t;do{e.insert("."+r,i,e.sheet,!0);i=i.next}while(void 0!==i)}};var v=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},b={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function y(e){return(y="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 w=/[A-Z]|^ms/g,k=/_EMO_([^_]+?)_([^]*?)_EMO_/g,x=function(e){return 45===e.charCodeAt(1)},S=function(e){return null!=e&&"boolean"!=typeof e},E=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return x(e)?e:e.replace(w,"-$&").toLowerCase()})),_=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(k,(function(e,t,n){return T={name:t,styles:n,next:T},t}))}return 1===b[e]||x(e)||"number"!=typeof t||0===t?t:t+"px"};function C(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(y(n)){case"boolean":return"";case"object":if(1===n.anim)return T={name:n.name,styles:n.styles,next:T},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)T={name:i.name,styles:i.styles,next:T},i=i.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=C(e,t,n[i],!1);else for(var o in n){var s=n[o];if("object"!==y(s))null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":S(s)&&(r+=E(o)+":"+_(o,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var a=C(e,t,s,!1);switch(o){case"animation":case"animationName":r+=E(o)+":"+a+";";break;default:r+=o+"{"+a+"}"}}else for(var l=0;l<s.length;l++)S(s[l])&&(r+=E(o)+":"+_(o,s[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=T,s=n(e);return T=o,C(e,t,s,r)}break;case"string":}if(null==t)return n;var a=t[n];return void 0===a||r?n:a}var T,L=/label:\s*([^\s;\n{]+)\s*;/g;var A=function(e,t,n){if(1===e.length&&"object"===y(e[0])&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";T=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=C(n,t,o,!1)):i+=o[0];for(var s=1;s<e.length;s++)i+=C(n,t,e[s],46===i.charCodeAt(i.length-1)),r&&(i+=o[s]);L.lastIndex=0;for(var a,l="";null!==(a=L.exec(i));)l+="-"+a[1];return{name:v(i)+l,styles:i,next:T}};var O=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return A(t)};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)}var $=Object(i.createContext)("undefined"!=typeof HTMLElement?f():null),M=Object(i.createContext)({}),j=$.Provider,P=function(e){return Object(i.forwardRef)((function(t,n){return Object(i.createElement)($.Consumer,null,(function(r){return e(t,r,n)}))}))},I="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",N=Object.prototype.hasOwnProperty,F=function(e,t,n,r){var o=null===n?t.css:t.css(n);"string"==typeof o&&void 0!==e.registered[o]&&(o=e.registered[o]);var s=t[I],a=[o],l="";"string"==typeof t.className?l=m(e.registered,a,t.className):null!=t.className&&(l=t.className+" ");var c=A(a);g(e,c,"string"==typeof s);l+=e.key+"-"+c.name;var u={};for(var h in t)N.call(t,h)&&"css"!==h&&h!==I&&(u[h]=t[h]);return u.ref=r,u.className=l,Object(i.createElement)(s,u)},D=P((function(e,t,n){return"function"==typeof e.css?Object(i.createElement)(M.Consumer,null,(function(r){return F(t,e,r,n)})):F(t,e,null,n)}));var W=function(e,t){var n=arguments;if(null==t||!N.call(t,"css"))return i.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=D;var s={};for(var a in t)N.call(t,a)&&(s[a]=t[a]);s[I]=e,o[1]=s;for(var l=2;l<r;l++)o[l]=n[l];return i.createElement.apply(null,o)},z=(i.Component,function e(t){for(var n=t.length,r=0,i="";r<n;r++){var o=t[r];if(null!=o){var s=void 0;switch(R(o)){case"boolean":break;case"object":if(Array.isArray(o))s=e(o);else for(var a in s="",o)o[a]&&a&&(s&&(s+=" "),s+=a);break;default:s=o}s&&(i&&(i+=" "),i+=s)}}return i});function B(e,t,n){var r=[],i=m(e,r,n);return r.length<2?n:i+t(r)}var V=P((function(e,t){return Object(i.createElement)(M.Consumer,null,(function(n){var r=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=A(n,t.registered);return g(t,i,!1),t.key+"-"+i.name},i={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return B(t.registered,r,z(n))},theme:n},o=e.children(i);return!0,o}))})),H=n(5),U=n(1),G=n.n(U);function q(e){return(q="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 K=function(){};function Y(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function X(e,t,n){var r=[n];if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&r.push(""+Y(e,i));return r.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var J=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===q(e)&&null!==e?[e]:[]};function Q(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Z(e){return Q(e)?window.pageYOffset:e.scrollTop}function ee(e,t){Q(e)?window.scrollTo(0,t):e.scrollTop=t}function te(e,t,n,r){void 0===n&&(n=200),void 0===r&&(r=K);var i=Z(e),o=t-i,s=0;!function t(){var a,l=o*((a=(a=s+=10)/n-1)*a*a+1)+i;ee(e,l),s<n?window.requestAnimationFrame(t):r(e)}()}function ne(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var re=n(15),ie=n.n(re);function oe(e){return(oe="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 se(){return(se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ae(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function le(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,s=e.isFixedPosition,a=e.theme.spacing,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,i=document.documentElement;if("fixed"===t.position)return i;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return i}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect().height,h=n.getBoundingClientRect(),d=h.bottom,p=h.height,f=h.top,m=n.offsetParent.getBoundingClientRect().top,g=window.innerHeight,v=Z(l),b=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),w=m-y,k=g-f,x=w+v,S=u-v-f,E=d-g+v+b,_=v+f-y;switch(i){case"auto":case"bottom":if(k>=p)return{placement:"bottom",maxHeight:t};if(S>=p&&!s)return o&&te(l,E,160),{placement:"bottom",maxHeight:t};if(!s&&S>=r||s&&k>=r)return o&&te(l,E,160),{placement:"bottom",maxHeight:s?k-b:S-b};if("auto"===i||s){var C=t,T=s?w:x;return T>=r&&(C=Math.min(T-b-a.controlHeight,t)),{placement:"top",maxHeight:C}}if("bottom"===i)return ee(l,E),{placement:"bottom",maxHeight:t};break;case"top":if(w>=p)return{placement:"top",maxHeight:t};if(x>=p&&!s)return o&&te(l,_,160),{placement:"top",maxHeight:t};if(!s&&x>=r||s&&w>=r){var L=t;return(!s&&x>=r||s&&w>=r)&&(L=s?w-y:x-y),o&&te(l,_,160),{placement:"top",maxHeight:L}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+i+'".')}return c}var ce=function(e){return"auto"===e?"bottom":e},ue=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={maxHeight:t.props.maxMenuHeight,placement:null},t.getPlacement=function(e){var n=t.props,r=n.minMenuHeight,i=n.maxMenuHeight,o=n.menuPlacement,s=n.menuPosition,a=n.menuShouldScrollIntoView,l=n.theme,c=t.context.getPortalPlacement;if(e){var u="fixed"===s,h=le({maxHeight:i,menuEl:e,minHeight:r,placement:o,shouldScroll:a&&!u,isFixedPosition:u,theme:l});c&&c(h),t.setState(h)}},t.getUpdatedProps=function(){var e=t.props.menuPlacement,n=t.state.placement||ce(e);return se({},t.props,{placement:n,maxHeight:t.state.maxHeight})},t}return ae(t,e),t.prototype.render=function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})},t}(i.Component);ue.contextTypes={getPortalPlacement:G.a.func};var he=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},de=he,pe=he,fe=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return W("div",se({css:i("noOptionsMessage",e),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},o),t)};fe.defaultProps={children:"No options"};var me=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return W("div",se({css:i("loadingMessage",e),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},o),t)};me.defaultProps={children:"Loading..."};var ge=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={placement:null},t.getPortalPlacement=function(e){var n=e.placement;n!==ce(t.props.menuPlacement)&&t.setState({placement:n})},t}ae(t,e);var n=t.prototype;return n.getChildContext=function(){return{getPortalPlacement:this.getPortalPlacement}},n.render=function(){var e=this.props,t=e.appendTo,n=e.children,r=e.controlElement,i=e.menuPlacement,o=e.menuPosition,s=e.getStyles,a="fixed"===o;if(!t&&!a||!r)return null;var l=this.state.placement||ce(i),c=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),u=a?0:window.pageYOffset,h=c[l]+u,d=W("div",{css:s("menuPortal",{offset:h,position:o,rect:c})},n);return t?Object(H.createPortal)(d,t):d},t}(i.Component);ge.childContextTypes={getPortalPlacement:G.a.func};var ve=Array.isArray,be=Object.keys,ye=Object.prototype.hasOwnProperty;function we(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==oe(t)&&"object"==oe(n)){var r,i,o,s=ve(t),a=ve(n);if(s&&a){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(s!=a)return!1;var l=t instanceof Date,c=n instanceof Date;if(l!=c)return!1;if(l&&c)return t.getTime()==n.getTime();var u=t instanceof RegExp,h=n instanceof RegExp;if(u!=h)return!1;if(u&&h)return t.toString()==n.toString();var d=be(t);if((i=d.length)!==be(n).length)return!1;for(r=i;0!=r--;)if(!ye.call(n,d[r]))return!1;for(r=i;0!=r--;)if(!("_owner"===(o=d[r])&&t.$$typeof||e(t[o],n[o])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}function ke(){return(ke=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function xe(){var e=function(e,t){t||(t=e.slice(0));return e.raw=t,e}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]);return xe=function(){return e},e}function Se(){return(Se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ee={name:"19bqh2r",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;"},_e=function(e){var t=e.size,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["size"]);return W("svg",Se({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Ee},n))},Ce=function(e){return W(_e,Se({size:20},e),W("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Te=function(e){return W(_e,Se({size:20},e),W("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Le=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorContainer",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?i.neutral80:i.neutral40}}},Ae=Le,Oe=Le,Re=function(){var e=O.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(xe()),$e=function(e){var t=e.delay,n=e.offset;return W("span",{css:O({animation:Re+" 1s ease-in-out "+t+"ms infinite;",backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"")})},Me=function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps,o=e.isRtl;return W("div",Se({},i,{css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)}),W($e,{delay:0,offset:o}),W($e,{delay:160,offset:!0}),W($e,{delay:320,offset:!o}))};function je(){return(je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Me.defaultProps={size:4};function Pe(){return(Pe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ie(){return(Ie=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ne=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}};function Fe(){return(Fe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var De=function(e){var t=e.children,n=e.innerProps;return W("div",n,t)},We=De,ze=De;var Be=function(e){var t=e.children,n=e.className,r=e.components,i=e.cx,o=e.data,s=e.getStyles,a=e.innerProps,l=e.isDisabled,c=e.removeProps,u=e.selectProps,h=r.Container,d=r.Label,p=r.Remove;return W(V,null,(function(r){var f=r.css,m=r.cx;return W(h,{data:o,innerProps:Fe({},a,{className:m(f(s("multiValue",e)),i({"multi-value":!0,"multi-value--is-disabled":l},n))}),selectProps:u},W(d,{data:o,innerProps:{className:m(f(s("multiValueLabel",e)),i({"multi-value__label":!0},n))},selectProps:u},t),W(p,{data:o,innerProps:Fe({className:m(f(s("multiValueRemove",e)),i({"multi-value__remove":!0},n))},c),selectProps:u}))}))};function Ve(){return(Ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Be.defaultProps={cropWithEllipsis:!0};function He(){return(He=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ue(){return(Ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ge(){return(Ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var qe={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return W("div",Se({},o,{css:i("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)}),t||W(Ce,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,i=e.className,o=e.isDisabled,s=e.isFocused,a=e.innerRef,l=e.innerProps,c=e.menuIsOpen;return W("div",je({ref:a,css:r("control",e),className:n({control:!0,"control--is-disabled":o,"control--is-focused":s,"control--menu-is-open":c},i)},l),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return W("div",Se({},o,{css:i("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)}),t||W(Te,null))},DownChevron:Te,CrossIcon:Ce,Group:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.Heading,s=e.headingProps,a=e.label,l=e.theme,c=e.selectProps;return W("div",{css:i("group",e),className:r({group:!0},n)},W(o,Pe({},s,{selectProps:c,theme:l,getStyles:i,cx:r}),a),W("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.theme,o=(e.selectProps,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["className","cx","getStyles","theme","selectProps"]));return W("div",Pe({css:r("groupHeading",Pe({theme:i},o)),className:n({"group-heading":!0},t)},o))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles;return W("div",{css:i("indicatorsContainer",e),className:r({indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps;return W("span",Se({},i,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerRef,o=e.isHidden,s=e.isDisabled,a=e.theme,l=(e.selectProps,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return W("div",{css:r("input",Ie({theme:a},l))},W(ie.a,Ie({className:n({input:!0},t),inputRef:i,inputStyle:Ne(o),disabled:s},l)))},LoadingIndicator:Me,Menu:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerRef,s=e.innerProps;return W("div",se({css:i("menu",e),className:r({menu:!0},n)},s,{ref:o}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isMulti,s=e.innerRef;return W("div",{css:i("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":o},n),ref:s},t)},MenuPortal:ge,LoadingMessage:me,NoOptionsMessage:fe,MultiValue:Be,MultiValueContainer:We,MultiValueLabel:ze,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return W("div",n,t||W(Ce,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isDisabled,s=e.isFocused,a=e.isSelected,l=e.innerRef,c=e.innerProps;return W("div",Ve({css:i("option",e),className:r({option:!0,"option--is-disabled":o,"option--is-focused":s,"option--is-selected":a},n),ref:l},c),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return W("div",He({css:i("placeholder",e),className:r({placeholder:!0},n)},o),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps,s=e.isDisabled,a=e.isRtl;return W("div",ke({css:i("container",e),className:r({"--is-disabled":s,"--is-rtl":a},n)},o),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isDisabled,s=e.innerProps;return W("div",Ue({css:i("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":o},n)},s),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.isMulti,o=e.getStyles,s=e.hasValue;return W("div",{css:o("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":i,"value-container--has-value":s},n)},t)}};function Ke(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Ye=function(e,t){var n;void 0===t&&(t=Ke);var r,i=[],o=!1;return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return o&&n===this&&t(s,i)||(r=e.apply(this,s),o=!0,n=this,i=s),r}},Xe=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],Je=function(e){for(var t=0;t<Xe.length;t++)e=e.replace(Xe[t].letters,Xe[t].base);return e};function Qe(){return(Qe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ze=function(e){return e.replace(/^\s+|\s+$/g,"")},et=function(e){return e.label+" "+e.value};function tt(){return(tt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var nt={name:"1laao21-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;"},rt=function(e){return W("span",tt({css:nt},e))};function it(){return(it=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ot(e){e.in,e.out,e.onExited,e.appear,e.enter,e.exit;var t=e.innerRef,n=(e.emotion,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return W("input",it({ref:t},n,{css:O({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"")}))}var st=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.innerRef(Object(H.findDOMNode)(this))},i.componentWillUnmount=function(){this.props.innerRef(null)},i.render=function(){return this.props.children},r}(i.Component),at=["boxSizing","height","overflow","paddingRight","position"],lt={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function ct(e){e.preventDefault()}function ut(e){e.stopPropagation()}function ht(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function dt(){return"ontouchstart"in window||navigator.maxTouchPoints}var pt=!(!window.document||!window.document.createElement),ft=0,mt=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).originalStyles={},t.listenerOptions={capture:!1,passive:!1},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this;if(pt){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,i=document.body,o=i&&i.style;if(n&&at.forEach((function(t){var n=o&&o[t];e.originalStyles[t]=n})),n&&ft<1){var s=parseInt(this.originalStyles.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,l=window.innerWidth-a+s||0;Object.keys(lt).forEach((function(e){var t=lt[e];o&&(o[e]=t)})),o&&(o.paddingRight=l+"px")}i&&dt()&&(i.addEventListener("touchmove",ct,this.listenerOptions),r&&(r.addEventListener("touchstart",ht,this.listenerOptions),r.addEventListener("touchmove",ut,this.listenerOptions))),ft+=1}},i.componentWillUnmount=function(){var e=this;if(pt){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,i=document.body,o=i&&i.style;ft=Math.max(ft-1,0),n&&ft<1&&at.forEach((function(t){var n=e.originalStyles[t];o&&(o[t]=n)})),i&&dt()&&(i.removeEventListener("touchmove",ct,this.listenerOptions),r&&(r.removeEventListener("touchstart",ht,this.listenerOptions),r.removeEventListener("touchmove",ut,this.listenerOptions)))}},i.render=function(){return null},r}(i.Component);mt.defaultProps={accountForScrollbars:!0};var gt={name:"1dsbpcp",styles:"position:fixed;left:0;bottom:0;right:0;top:0;"},vt=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={touchScrollTarget:null},t.getScrollTarget=function(e){e!==t.state.touchScrollTarget&&t.setState({touchScrollTarget:e})},t.blurSelectInput=function(){document.activeElement&&document.activeElement.blur()},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(){var e=this.props,t=e.children,n=e.isEnabled,r=this.state.touchScrollTarget;return n?W("div",null,W("div",{onClick:this.blurSelectInput,css:gt}),W(st,{innerRef:this.getScrollTarget},t),r?W(mt,{touchScrollTarget:r}):null):t},r}(i.PureComponent);var bt=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).isBottom=!1,t.isTop=!1,t.scrollTarget=void 0,t.touchStart=void 0,t.cancelScroll=function(e){e.preventDefault(),e.stopPropagation()},t.handleEventDelta=function(e,n){var r=t.props,i=r.onBottomArrive,o=r.onBottomLeave,s=r.onTopArrive,a=r.onTopLeave,l=t.scrollTarget,c=l.scrollTop,u=l.scrollHeight,h=l.clientHeight,d=t.scrollTarget,p=n>0,f=u-h-c,m=!1;f>n&&t.isBottom&&(o&&o(e),t.isBottom=!1),p&&t.isTop&&(a&&a(e),t.isTop=!1),p&&n>f?(i&&!t.isBottom&&i(e),d.scrollTop=u,m=!0,t.isBottom=!0):!p&&-n>c&&(s&&!t.isTop&&s(e),d.scrollTop=0,m=!0,t.isTop=!0),m&&t.cancelScroll(e)},t.onWheel=function(e){t.handleEventDelta(e,e.deltaY)},t.onTouchStart=function(e){t.touchStart=e.changedTouches[0].clientY},t.onTouchMove=function(e){var n=t.touchStart-e.changedTouches[0].clientY;t.handleEventDelta(e,n)},t.getScrollTarget=function(e){t.scrollTarget=e},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.startListening(this.scrollTarget)},i.componentWillUnmount=function(){this.stopListening(this.scrollTarget)},i.startListening=function(e){e&&("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))},i.stopListening=function(e){"function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1)},i.render=function(){return o.a.createElement(st,{innerRef:this.getScrollTarget},this.props.children)},r}(i.Component);function yt(e){var t=e.isEnabled,n=void 0===t||t,r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["isEnabled"]);return n?o.a.createElement(bt,r):r.children}var wt=function(e,t){void 0===t&&(t={});var n=t,r=n.isSearchable,i=n.isMulti,o=n.label,s=n.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options"+(s?"":", press Enter to select the currently focused option")+", press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(r?",type to refine list":"")+", press Down to open the menu, "+(i?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},kt=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return r?"option "+n+" is disabled. Select another option.":"option "+n+", selected."}},xt=function(e){return!!e.isDisabled};var St={clearIndicator:Oe,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,i=r.colors,o=r.borderRadius,s=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?i.neutral10:n?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+i.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?i.primary:i.neutral30}}},dropdownIndicator:Ae,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,i=r.colors,o=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:pe,menu:function(e){var t,n=e.placement,r=e.theme,i=r.borderRadius,o=r.spacing,s=r.colors;return(t={label:"menu"})[function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n)]="100%",t.backgroundColor=s.neutral0,t.borderRadius=i,t.boxShadow="0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",t.marginBottom=o.menuGutter,t.marginTop=o.menuGutter,t.position="absolute",t.width="100%",t.zIndex=1,t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,i=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,i=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:de,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,i=e.theme,o=i.spacing,s=i.colors;return{label:"option",backgroundColor:r?s.primary:n?s.primary25:"transparent",color:t?s.neutral20:r?s.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*o.baseUnit+"px "+3*o.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?s.primary:s.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{label:"singleValue",color:t?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var Et={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}};function _t(){return(_t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ct(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Tt,Lt={backspaceRemovesValue:!0,blurInputOnSelect:ne(),captureMenuScroll:!ne(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=Qe({ignoreCase:!0,ignoreAccents:!0,stringify:et,trim:!0,matchFrom:"any"},Tt),r=n.ignoreCase,i=n.ignoreAccents,o=n.stringify,s=n.trim,a=n.matchFrom,l=s?Ze(t):t,c=s?Ze(o(e)):o(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),i&&(l=Je(l),c=Je(c)),"start"===a?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:xt,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},At=1,Ot=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},n.blockOptionHover=!1,n.isComposing=!1,n.clearFocusValueOnUpdate=!1,n.commonProps=void 0,n.components=void 0,n.hasGroups=!1,n.initialTouchX=0,n.initialTouchY=0,n.inputIsHiddenAfterUpdate=void 0,n.instancePrefix="",n.openAfterFocus=!1,n.scrollToFocusedOptionOnUpdate=!1,n.userIsDragging=void 0,n.controlRef=null,n.getControlRef=function(e){n.controlRef=e},n.focusedOptionRef=null,n.getFocusedOptionRef=function(e){n.focusedOptionRef=e},n.menuListRef=null,n.getMenuListRef=function(e){n.menuListRef=e},n.inputRef=null,n.getInputRef=function(e){n.inputRef=e},n.cacheComponents=function(e){n.components=Ge({},qe,{components:e}.components)},n.focus=n.focusInput,n.blur=n.blurInput,n.onChange=function(e,t){var r=n.props;(0,r.onChange)(e,_t({},t,{name:r.name}))},n.setValue=function(e,t,r){void 0===t&&(t="set-value");var i=n.props,o=i.closeMenuOnSelect,s=i.isMulti;n.onInputChange("",{action:"set-value"}),o&&(n.inputIsHiddenAfterUpdate=!s,n.onMenuClose()),n.clearFocusValueOnUpdate=!0,n.onChange(e,{action:t,option:r})},n.selectOption=function(e){var t=n.props,r=t.blurInputOnSelect,i=t.isMulti,o=n.state.selectValue;if(i)if(n.isOptionSelected(e,o)){var s=n.getOptionValue(e);n.setValue(o.filter((function(e){return n.getOptionValue(e)!==s})),"deselect-option",e),n.announceAriaLiveSelection({event:"deselect-option",context:{value:n.getOptionLabel(e)}})}else n.isOptionDisabled(e,o)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue([].concat(o,[e]),"select-option",e),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));else n.isOptionDisabled(e,o)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue(e,"select-option"),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));r&&n.blurInput()},n.removeValue=function(e){var t=n.state.selectValue,r=n.getOptionValue(e),i=t.filter((function(e){return n.getOptionValue(e)!==r}));n.onChange(i.length?i:null,{action:"remove-value",removedValue:e}),n.announceAriaLiveSelection({event:"remove-value",context:{value:e?n.getOptionLabel(e):""}}),n.focusInput()},n.clearValue=function(){var e=n.props.isMulti;n.onChange(e?[]:null,{action:"clear"})},n.popValue=function(){var e=n.state.selectValue,t=e[e.length-1],r=e.slice(0,e.length-1);n.announceAriaLiveSelection({event:"pop-value",context:{value:t?n.getOptionLabel(t):""}}),n.onChange(r.length?r:null,{action:"pop-value",removedValue:t})},n.getOptionLabel=function(e){return n.props.getOptionLabel(e)},n.getOptionValue=function(e){return n.props.getOptionValue(e)},n.getStyles=function(e,t){var r=St[e](t);r.boxSizing="border-box";var i=n.props.styles[e];return i?i(r,t):r},n.getElementId=function(e){return n.instancePrefix+"-"+e},n.getActiveDescendentId=function(){var e=n.props.menuIsOpen,t=n.state,r=t.menuOptions,i=t.focusedOption;if(i&&e){var o=r.focusable.indexOf(i),s=r.render[o];return s&&s.key}},n.announceAriaLiveSelection=function(e){var t=e.event,r=e.context;n.setState({ariaLiveSelection:kt(t,r)})},n.announceAriaLiveContext=function(e){var t=e.event,r=e.context;n.setState({ariaLiveContext:wt(t,_t({},r,{label:n.props["aria-label"]}))})},n.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())},n.onMenuMouseMove=function(e){n.blockOptionHover=!1},n.onControlMouseDown=function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},n.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||n.props.isDisabled)){var t=n.props,r=t.isMulti,i=t.menuIsOpen;n.focusInput(),i?(n.inputIsHiddenAfterUpdate=!r,n.onMenuClose()):n.openMenu("first"),e.preventDefault(),e.stopPropagation()}},n.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,"touchend"===e.type?n.focusInput():setTimeout((function(){return n.focusInput()})))},n.onScroll=function(e){"boolean"==typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Q(e.target)&&n.props.onMenuClose():"function"==typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()},n.onCompositionStart=function(){n.isComposing=!0},n.onCompositionEnd=function(){n.isComposing=!1},n.onTouchStart=function(e){var t=e.touches.item(0);t&&(n.initialTouchX=t.clientX,n.initialTouchY=t.clientY,n.userIsDragging=!1)},n.onTouchMove=function(e){var t=e.touches.item(0);if(t){var r=Math.abs(t.clientX-n.initialTouchX),i=Math.abs(t.clientY-n.initialTouchY);n.userIsDragging=r>5||i>5}},n.onTouchEnd=function(e){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(e.target)&&n.menuListRef&&!n.menuListRef.contains(e.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)},n.onControlTouchEnd=function(e){n.userIsDragging||n.onControlMouseDown(e)},n.onClearIndicatorTouchEnd=function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)},n.onDropdownIndicatorTouchEnd=function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)},n.handleInputChange=function(e){var t=e.currentTarget.value;n.inputIsHiddenAfterUpdate=!1,n.onInputChange(t,{action:"input-change"}),n.onMenuOpen()},n.onInputFocus=function(e){var t=n.props,r=t.isSearchable,i=t.isMulti;n.props.onFocus&&n.props.onFocus(e),n.inputIsHiddenAfterUpdate=!1,n.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:i}}),n.setState({isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1},n.onInputBlur=function(e){n.menuListRef&&n.menuListRef.contains(document.activeElement)?n.inputRef.focus():(n.props.onBlur&&n.props.onBlur(e),n.onInputChange("",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1}))},n.onOptionHover=function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})},n.shouldHideSelectedOptions=function(){var e=n.props,t=e.hideSelectedOptions,r=e.isMulti;return void 0===t?r:t},n.onKeyDown=function(e){var t=n.props,r=t.isMulti,i=t.backspaceRemovesValue,o=t.escapeClearsValue,s=t.inputValue,a=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,h=t.tabSelectsValue,d=t.openMenuOnFocus,p=n.state,f=p.focusedOption,m=p.focusedValue,g=p.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||s)return;n.focusValue("previous");break;case"ArrowRight":if(!r||s)return;n.focusValue("next");break;case"Delete":case"Backspace":if(s)return;if(m)n.removeValue(m);else{if(!i)return;r?n.popValue():a&&n.clearValue()}break;case"Tab":if(n.isComposing)return;if(e.shiftKey||!c||!h||!f||d&&n.isOptionSelected(f,g))return;n.selectOption(f);break;case"Enter":if(229===e.keyCode)break;if(c){if(!f)return;if(n.isComposing)return;n.selectOption(f);break}return;case"Escape":c?(n.inputIsHiddenAfterUpdate=!1,n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):a&&o&&n.clearValue();break;case" ":if(s)return;if(!c){n.openMenu("first");break}if(!f)return;n.selectOption(f);break;case"ArrowUp":c?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":c?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!c)return;n.focusOption("pageup");break;case"PageDown":if(!c)return;n.focusOption("pagedown");break;case"Home":if(!c)return;n.focusOption("first");break;case"End":if(!c)return;n.focusOption("last");break;default:return}e.preventDefault()}},n.buildMenuOptions=function(e,t){var r=e.inputValue,i=void 0===r?"":r,o=e.options,s=function(e,r){var o=n.isOptionDisabled(e,t),s=n.isOptionSelected(e,t),a=n.getOptionLabel(e),l=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&s||!n.filterOption({label:a,value:l,data:e},i))){var c=o?void 0:function(){return n.onOptionHover(e)},u=o?void 0:function(){return n.selectOption(e)},h=n.getElementId("option")+"-"+r;return{innerProps:{id:h,onClick:u,onMouseMove:c,onMouseOver:c,tabIndex:-1},data:e,isDisabled:o,isSelected:s,key:h,label:a,type:"option",value:l}}};return o.reduce((function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var i=t.options.map((function(t,n){var i=s(t,r+"-"+n);return i&&e.focusable.push(t),i})).filter(Boolean);if(i.length){var o=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:o,data:t,options:i})}}else{var a=s(t,""+r);a&&(e.render.push(a),e.focusable.push(t))}return e}),{render:[],focusable:[]})};var r=t.value;n.cacheComponents=Ye(n.cacheComponents,we).bind(Ct(Ct(n))),n.cacheComponents(t.components),n.instancePrefix="react-select-"+(n.props.instanceId||++At);var i=J(r);n.buildMenuOptions=Ye(n.buildMenuOptions,(function(e,t){var n=e,r=n[0],i=n[1],o=t,s=o[0];return we(i,o[1])&&we(r.inputValue,s.inputValue)&&we(r.options,s.options)})).bind(Ct(Ct(n)));var o=t.menuIsOpen?n.buildMenuOptions(t,i):{render:[],focusable:[]};return n.state.menuOptions=o,n.state.selectValue=i,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()},i.UNSAFE_componentWillReceiveProps=function(e){var t=this.props,n=t.options,r=t.value,i=t.menuIsOpen,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.menuIsOpen!==i||e.inputValue!==o){var s=J(e.value),a=e.menuIsOpen?this.buildMenuOptions(e,s):{render:[],focusable:[]},l=this.getNextFocusedValue(s),c=this.getNextFocusedOption(a.focusable);this.setState({menuOptions:a,selectValue:s,focusedOption:c,focusedValue:l})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)},i.componentDidUpdate=function(e){var t,n,r,i,o,s=this.props,a=s.isDisabled,l=s.menuIsOpen,c=this.state.isFocused;(c&&!a&&e.isDisabled||c&&l&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=n.offsetHeight/3,i.bottom+o>r.bottom?ee(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+o,t.scrollHeight)):i.top-o<r.top&&ee(t,Math.max(n.offsetTop-o,0)),this.scrollToFocusedOptionOnUpdate=!1)},i.componentWillUnmount=function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)},i.onMenuOpen=function(){this.props.onMenuOpen()},i.onMenuClose=function(){var e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()},i.onInputChange=function(e,t){this.props.onInputChange(e,t)},i.focusInput=function(){this.inputRef&&this.inputRef.focus()},i.blurInput=function(){this.inputRef&&this.inputRef.blur()},i.openMenu=function(e){var t=this,n=this.state,r=n.selectValue,i=n.isFocused,o=this.buildMenuOptions(this.props,r),s=this.props.isMulti,a="first"===e?0:o.focusable.length-1;if(!s){var l=o.focusable.indexOf(r[0]);l>-1&&(a=l)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.setState({menuOptions:o,focusedValue:null,focusedOption:o.focusable[a]},(function(){t.onMenuOpen(),t.announceAriaLiveContext({event:"menu"})}))},i.focusValue=function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,i=this.state,o=i.selectValue,s=i.focusedValue;if(n){this.setState({focusedOption:null});var a=o.indexOf(s);s||(a=-1,this.announceAriaLiveContext({event:"value"}));var l=o.length-1,c=-1;if(o.length){switch(e){case"previous":c=0===a?0:-1===a?l:a-1;break;case"next":a>-1&&a<l&&(c=a+1)}-1===c&&this.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:n}}),this.setState({inputIsHidden:-1!==c,focusedValue:o[c]})}}},i.focusOption=function(e){void 0===e&&(e="first");var t=this.props.pageSize,n=this.state,r=n.focusedOption,i=n.menuOptions.focusable;if(i.length){var o=0,s=i.indexOf(r);r||(s=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?o=s>0?s-1:i.length-1:"down"===e?o=(s+1)%i.length:"pageup"===e?(o=s-t)<0&&(o=0):"pagedown"===e?(o=s+t)>i.length-1&&(o=i.length-1):"last"===e&&(o=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[o],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:xt(i[o])}})}},i.getTheme=function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Et):_t({},Et,this.props.theme):Et},i.getCommonProps=function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,i=this.props,o=i.classNamePrefix,s=i.isMulti,a=i.isRtl,l=i.options,c=this.state.selectValue,u=this.hasValue();return{cx:X.bind(null,o),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:u,isMulti:s,isRtl:a,options:l,selectOption:r,setValue:n,selectProps:i,theme:this.getTheme()}},i.getNextFocusedValue=function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r<e.length)return e[r]}return null},i.getNextFocusedOption=function(e){var t=this.state.focusedOption;return t&&e.indexOf(t)>-1?t:e[0]},i.hasValue=function(){return this.state.selectValue.length>0},i.hasOptions=function(){return!!this.state.menuOptions.render.length},i.countOptions=function(){return this.state.menuOptions.focusable.length},i.isClearable=function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t},i.isOptionDisabled=function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)},i.isOptionSelected=function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some((function(e){return n.getOptionValue(e)===r}))},i.filterOption=function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)},i.formatOptionLabel=function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)},i.formatGroupLabel=function(e){return this.props.formatGroupLabel(e)},i.startListeningComposition=function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))},i.stopListeningComposition=function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))},i.startListeningToTouch=function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))},i.stopListeningToTouch=function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))},i.constructAriaLiveMessage=function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,i=e.focusedOption,o=this.props,s=o.options,a=o.menuIsOpen,l=o.inputValue,c=o.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value "+n(t)+" focused, "+(r.indexOf(t)+1)+" of "+r.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(i&&a?function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option "+n(t)+" focused"+(t.isDisabled?" disabled":"")+", "+(r.indexOf(t)+1)+" of "+r.length+"."}({focusedOption:i,getOptionLabel:this.getOptionLabel,options:s}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:l,screenReaderMessage:c({count:this.countOptions()})})+" "+t},i.renderInput=function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,s=e.tabIndex,a=this.components.Input,l=this.state.inputIsHidden,c=r||this.getElementId("input"),u={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};if(!n)return o.a.createElement(ot,_t({id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:K,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:s,value:""},u));var h=this.commonProps,d=h.cx,p=h.theme,f=h.selectProps;return o.a.createElement(a,_t({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:d,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:f,spellCheck:"false",tabIndex:s,theme:p,type:"text",value:i},u))},i.renderPlaceholderOrValue=function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,s=t.MultiValueRemove,a=t.SingleValue,l=t.Placeholder,c=this.commonProps,u=this.props,h=u.controlShouldRenderValue,d=u.isDisabled,p=u.isMulti,f=u.inputValue,m=u.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue,y=g.isFocused;if(!this.hasValue()||!h)return f?null:o.a.createElement(l,_t({},c,{key:"placeholder",isDisabled:d,isFocused:y}),m);if(p)return v.map((function(t,a){var l=t===b;return o.a.createElement(n,_t({},c,{components:{Container:r,Label:i,Remove:s},isFocused:l,isDisabled:d,key:e.getOptionValue(t),index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));if(f)return null;var w=v[0];return o.a.createElement(a,_t({},c,{data:w,isDisabled:d}),this.formatOptionLabel(w,"value"))},i.renderClearIndicator=function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,s=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return o.a.createElement(e,_t({},t,{innerProps:a,isFocused:s}))},i.renderLoadingIndicator=function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,s=this.state.isFocused;if(!e||!i)return null;return o.a.createElement(e,_t({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:s}))},i.renderIndicatorSeparator=function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,s=this.state.isFocused;return o.a.createElement(n,_t({},r,{isDisabled:i,isFocused:s}))},i.renderDropdownIndicator=function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return o.a.createElement(e,_t({},t,{innerProps:i,isDisabled:n,isFocused:r}))},i.renderMenu=function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,i=t.Menu,s=t.MenuList,a=t.MenuPortal,l=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,h=this.commonProps,d=this.state,p=d.focusedOption,f=d.menuOptions,m=this.props,g=m.captureMenuScroll,v=m.inputValue,b=m.isLoading,y=m.loadingMessage,w=m.minMenuHeight,k=m.maxMenuHeight,x=m.menuIsOpen,S=m.menuPlacement,E=m.menuPosition,_=m.menuPortalTarget,C=m.menuShouldBlockScroll,T=m.menuShouldScrollIntoView,L=m.noOptionsMessage,A=m.onMenuScrollToTop,O=m.onMenuScrollToBottom;if(!x)return null;var R,$=function(t){var n=p===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,o.a.createElement(u,_t({},h,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())R=f.render.map((function(t){if("group"===t.type){t.type;var i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["type"]),s=t.key+"-heading";return o.a.createElement(n,_t({},h,i,{Heading:r,headingProps:{id:s},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return $(e)})))}if("option"===t.type)return $(t)}));else if(b){var M=y({inputValue:v});if(null===M)return null;R=o.a.createElement(l,h,M)}else{var j=L({inputValue:v});if(null===j)return null;R=o.a.createElement(c,h,j)}var P={minMenuHeight:w,maxMenuHeight:k,menuPlacement:S,menuPosition:E,menuShouldScrollIntoView:T},I=o.a.createElement(ue,_t({},h,P),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,l=r.maxHeight;return o.a.createElement(i,_t({},h,P,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:a}),o.a.createElement(yt,{isEnabled:g,onTopArrive:A,onBottomArrive:O},o.a.createElement(vt,{isEnabled:C},o.a.createElement(s,_t({},h,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:l}),R))))}));return _||"fixed"===E?o.a.createElement(a,_t({},h,{appendTo:_,controlElement:this.controlRef,menuPlacement:S,menuPosition:E}),I):I},i.renderFormField=function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,s=t.name,a=this.state.selectValue;if(s&&!r){if(i){if(n){var l=a.map((function(t){return e.getOptionValue(t)})).join(n);return o.a.createElement("input",{name:s,type:"hidden",value:l})}var c=a.length>0?a.map((function(t,n){return o.a.createElement("input",{key:"i-"+n,name:s,type:"hidden",value:e.getOptionValue(t)})})):o.a.createElement("input",{name:s,type:"hidden"});return o.a.createElement("div",null,c)}var u=a[0]?this.getOptionValue(a[0]):"";return o.a.createElement("input",{name:s,type:"hidden",value:u})}},i.renderLiveRegion=function(){return this.state.isFocused?o.a.createElement(rt,{"aria-live":"polite"},o.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),o.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null},i.render=function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,s=this.props,a=s.className,l=s.id,c=s.isDisabled,u=s.menuIsOpen,h=this.state.isFocused,d=this.commonProps=this.getCommonProps();return o.a.createElement(r,_t({},d,{className:a,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:h}),this.renderLiveRegion(),o.a.createElement(t,_t({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:h,menuIsOpen:u}),o.a.createElement(i,_t({},d,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),o.a.createElement(n,_t({},d,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())},r}(i.Component);function Rt(){return(Rt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Ot.defaultProps=Lt;var $t={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},Mt=function(e){var t,n;return n=t=function(t){var n,r;function i(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).select=void 0,e.state={inputValue:void 0!==e.props.inputValue?e.props.inputValue:e.props.defaultInputValue,menuIsOpen:void 0!==e.props.menuIsOpen?e.props.menuIsOpen:e.props.defaultMenuIsOpen,value:void 0!==e.props.value?e.props.value:e.props.defaultValue},e.onChange=function(t,n){e.callProp("onChange",t,n),e.setState({value:t})},e.onInputChange=function(t,n){var r=e.callProp("onInputChange",t,n);e.setState({inputValue:void 0!==r?r:t})},e.onMenuOpen=function(){e.callProp("onMenuOpen"),e.setState({menuIsOpen:!0})},e.onMenuClose=function(){e.callProp("onMenuClose"),e.setState({menuIsOpen:!1})},e}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var s=i.prototype;return s.focus=function(){this.select.focus()},s.blur=function(){this.select.blur()},s.getProp=function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]},s.callProp=function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.props)[e].apply(t,r)}},s.render=function(){var t=this,n=this.props,r=(n.defaultInputValue,n.defaultMenuIsOpen,n.defaultValue,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(n,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return o.a.createElement(e,Rt({},r,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))},i}(i.Component),t.defaultProps=$t,n};i.Component;var jt=Mt(Ot);function Pt(){return(Pt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var It,Nt,Ft,Dt={cacheOptions:!1,defaultOptions:!1,filterOption:null,isLoading:!1},Wt=Mt(Ot),zt=(It=Wt,Ft=Nt=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this).select=void 0,n.lastRequest=void 0,n.mounted=!1,n.optionsCache={},n.handleInputChange=function(e,t){var r=n.props,i=r.cacheOptions,o=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,t,r.onInputChange);if(!o)return delete n.lastRequest,void n.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(i&&n.optionsCache[o])n.setState({inputValue:o,loadedInputValue:o,loadedOptions:n.optionsCache[o],isLoading:!1,passEmptyOptions:!1});else{var s=n.lastRequest={};n.setState({inputValue:o,isLoading:!0,passEmptyOptions:!n.state.loadedInputValue},(function(){n.loadOptions(o,(function(e){n.mounted&&(e&&(n.optionsCache[o]=e),s===n.lastRequest&&(delete n.lastRequest,n.setState({isLoading:!1,loadedInputValue:o,loadedOptions:e||[],passEmptyOptions:!1})))}))}))}return o},n.state={defaultOptions:Array.isArray(t.defaultOptions)?t.defaultOptions:void 0,inputValue:void 0!==t.inputValue?t.inputValue:"",isLoading:!0===t.defaultOptions,loadedOptions:[],passEmptyOptions:!1},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=this.state.inputValue;!0===t&&this.loadOptions(n,(function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}}))},i.UNSAFE_componentWillReceiveProps=function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})},i.componentWillUnmount=function(){this.mounted=!1},i.focus=function(){this.select.focus()},i.blur=function(){this.select.blur()},i.loadOptions=function(e,t){var n=this.props.loadOptions;if(!n)return t();var r=n(e,t);r&&"function"==typeof r.then&&r.then(t,(function(){return t()}))},i.render=function(){var e=this,t=this.props,n=(t.loadOptions,t.isLoading),r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["loadOptions","isLoading"]),i=this.state,s=i.defaultOptions,a=i.inputValue,l=i.isLoading,c=i.loadedInputValue,u=i.loadedOptions,h=i.passEmptyOptions?[]:a&&c?u:s||[];return o.a.createElement(It,Pt({},r,{ref:function(t){e.select=t},options:h,isLoading:l||n,onInputChange:this.handleInputChange}))},r}(i.Component),Nt.defaultProps=Dt,Ft);function Bt(){return(Bt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Vt=function(e,t){void 0===e&&(e="");var n=String(e).toLowerCase(),r=String(t.value).toLowerCase(),i=String(t.label).toLowerCase();return r===n||i===n},Ht=Bt({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(e){return'Create "'+e+'"'},isValidNewOption:function(e,t,n){return!(!e||t.some((function(t){return Vt(e,t)}))||n.some((function(t){return Vt(e,t)})))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}}),Ut=Mt(function(e){var t,n;return n=t=function(t){var n,r;function i(e){var n;(n=t.call(this,e)||this).select=void 0,n.onChange=function(e,t){var r=n.props,i=r.getNewOptionData,o=r.inputValue,s=r.isMulti,a=r.onChange,l=r.onCreateOption,c=r.value,u=r.name;if("select-option"!==t.action)return a(e,t);var h=n.state.newOption,d=Array.isArray(e)?e:[e];if(d[d.length-1]!==h)a(e,t);else if(l)l(o);else{var p=i(o,o),f={action:"create-option",name:u};a(s?[].concat(J(c),[p]):p,f)}};var r=e.options||[];return n.state={newOption:void 0,options:r},n}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var s=i.prototype;return s.UNSAFE_componentWillReceiveProps=function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,r=e.formatCreateLabel,i=e.getNewOptionData,o=e.inputValue,s=e.isLoading,a=e.isValidNewOption,l=e.value,c=e.options||[],u=this.state.newOption;u=a(o,J(l),c)?i(o,r(o)):void 0,this.setState({newOption:u,options:!t&&s||!u?c:"first"===n?[u].concat(c):[].concat(c,[u])})},s.focus=function(){this.select.focus()},s.blur=function(){this.select.blur()},s.render=function(){var t=this,n=this.state.options;return o.a.createElement(e,Bt({},this.props,{ref:function(e){t.select=e},options:n,onChange:this.onChange}))},i}(i.Component),t.defaultProps=Ht,n}(Ot));function Gt(e){return(Gt="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 qt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yt(e,t){return(Yt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xt(e,t){return!t||"object"!==Gt(t)&&"function"!=typeof t?Jt(e):t}function Jt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qt(){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}}function Zt(e){return(Zt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function en(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?en(Object(n),!0).forEach((function(t){nn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):en(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rn=qe.Option,on=window,sn=on.jQuery,an=on.ajaxurl,ln=on.VPGutenbergVariables,cn=wp.i18n.__,un=wp.element.Component,hn={control:function(e,t){return tn(tn(tn({},e),{},{cursor:"pointer",minHeight:30},t.isFocused&&!t.isDisabled?{borderColor:"#007cba"}:{borderColor:"#7e8993","&:hover":{borderColor:"#7e8993"}}),t.isFocused?{boxShadow:"0 0 0 1px #007cba","&:hover":{borderColor:"#007cba"}}:{})},valueContainer:function(e){return tn(tn({},e),{},{padding:"0 8px"})},input:function(e){return tn(tn({},e),{},{margin:0,height:30,paddingTop:0,paddingBottom:0,input:{boxShadow:"none !important"}})},dropdownIndicator:function(e){return tn(tn({},e),{},{padding:5,color:"#555555","&:hover":{color:"#555555"},svg:{width:17,height:17}})},clearIndicator:function(e){return tn(tn({},e),{},{padding:5,svg:{width:15,height:15}})},indicatorSeparator:function(){return!1},multiValue:function(e){return tn(tn({},e),{},{padding:"2px 3px",borderRadius:4,backgroundColor:"#555d66"})},multiValueLabel:function(e){return tn(tn({},e),{},{padding:0,color:"#fff"})},multiValueRemove:function(e){return tn(tn({},e),{},{padding:0,marginLeft:5,color:"#adadad",svg:{width:10,height:10}})},option:function(e,t){return tn(tn(tn({},e),{},{display:"flex",alignItems:"center",padding:"4px 10px"},t.isFocused?{backgroundColor:"#efefef"}:{}),t.isSelected?{backgroundColor:"#007cba"}:{})},menu:function(e){return tn(tn({},e),{},{zIndex:2})}},dn={},pn=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&&Yt(e,t)}(a,e);var t,n,i,o,s=(t=a,function(){var e,n=Zt(t);if(Qt()){var r=Zt(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Xt(this,e)});function a(){var e;qt(this,a);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var o=(e=s.call.apply(s,[this].concat(n))).props.callback;return e.state={options:{},ajaxStatus:!!o},e.getOptions=e.getOptions.bind(Jt(e)),e.getDefaultValue=e.getDefaultValue.bind(Jt(e)),e.findValueData=e.findValueData.bind(Jt(e)),e.requestAjax=e.requestAjax.bind(Jt(e)),e.requestAjaxDebounce=Object(r.a)(300,e.requestAjax),e}return n=a,(i=[{key:"componentDidMount",value:function(){var e=this;this.props.callback&&this.requestAjax({},(function(t){t.options&&e.setState({options:t.options})}))}},{key:"getOptions",value:function(){var e=this.props.controlName;return dn[e]?dn[e]:Object.keys(this.state.options).length?this.state.options:this.props.options}},{key:"getDefaultValue",value:function(){var e=this,t=this.props,n=t.value,r=t.isMultiple,i=null;if(r){if(!n&&"string"!=typeof n||!n.length)return i;i=[],n.forEach((function(t){i.push(e.findValueData(t))}))}else{if(!n&&"string"!=typeof n)return i;i=this.findValueData(n)}return i}},{key:"findValueData",value:function(e){var t={value:e,label:e},n=this.getOptions();return n&&Object.keys(n).forEach((function(r){var i=n[r];r===e&&("string"==typeof i?t.label=i:t=i)})),t}},{key:"requestAjax",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.props,o=i.controlName,s=i.attributes;if(!this.isAJAXinProgress){this.isAJAXinProgress=!0,r&&this.setState({ajaxStatus:"progress"});var a=tn({action:"vp_dynamic_control_callback",nonce:ln.nonce,vp_control_name:o,vp_attributes:s},t);sn.ajax({url:an,method:"POST",dataType:"json",data:a,complete:function(t){var i=t.responseJSON;n&&i.response&&(i.response.options&&(dn[o]=tn(tn({},dn[o]),i.response.options)),n(i.response)),r&&e.setState({ajaxStatus:!0}),e.isAJAXinProgress=!1}})}}},{key:"prepareOptions",value:function(e){return Object.keys(e||{}).map((function(t){var n=e[t];return"object"===Gt(n)?{value:n.value,label:n.label}:{value:t,label:e[t]}}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.onChange,r=t.isMultiple,i=t.isSearchable,o=t.isCreatable,s=t.callback,a=this.state.ajaxStatus,l=!!s&&i,c=a&&"progress"===a,u={className:"vpf-component-select",styles:hn,components:{Option:function(e){var t=e.data;return wp.element.createElement(rn,e,void 0!==t.img?wp.element.createElement("div",{className:"vpf-component-select-option-img"},t.img?wp.element.createElement("img",{src:t.img,alt:t.label}):""):"",wp.element.createElement("span",{className:"vpf-component-select-option-label"},t.label),t.category?wp.element.createElement("div",{className:"vpf-component-select-option-category"},t.category):"")}},value:this.getDefaultValue(),options:this.prepareOptions(this.getOptions()),onChange:function(e){if(r)if(Array.isArray(e)){var t=[];e.forEach((function(e){t.push(e?e.value:"")})),n(t)}else n([]);else n(e?e.value:"")},isMulti:r,isSearchable:i,isLoading:c,isClearable:!1,placeholder:cn(i?"Type to search...":"Select...","@@text_domain")};return o?(u.placeholder=cn("Type and press Enter...","@@text_domain"),u.isSearchable=!0,wp.element.createElement(Ut,u)):l?(u.loadOptions=function(t,n){e.requestAjaxDebounce({q:t},(function(e){var t=[];e&&e.options&&Object.keys(e.options).forEach((function(n){t.push(e.options[n])})),n(t.length?t:null)}),!1)},u.cacheOptions=!0,u.defaultOptions=u.options,delete u.options,delete u.isLoading,wp.element.createElement(zt,u)):wp.element.createElement(jt,u)}}])&&Kt(n.prototype,i),o&&Kt(n,o),a}(un)},function(e,t,n){"use strict";n.d(t,"a",(function(){return $}));n(210);var r=n(3),i=n(77),o=n.n(i),s=n(2),a=n.n(s),l=n(28),c=window.VPGutenbergVariables.controls;function u(e){var t="",n="";if(void 0!==e.block_id&&e.block_id?n=e.block_id:void 0!==e.id&&e.id&&(n=e.id),!n)return t;if(n=".vp-id-".concat(n),Object.keys(c).forEach((function(r){var i=c[r];void 0!==i.style&&i.style&&void 0!==i.condition&&i.condition.length&&Object(l.a)(i.condition,e)&&i.style.forEach((function(r){t+=function(e,t,n){var r="";return e&&void 0!==t&&""!==t&&null!==t&&void 0!==n.property?(void 0!==n.mask&&(t=n.mask.replace("$",t)),void 0!==n.element&&/\$/g.test(n.element)?e=n.element.replace("$",e):e+=void 0!==n.element?" ".concat(n.element):"",r="".concat(e," { ").concat(n.property,": ").concat(t,"; } ")):r}(n,e[i.name],r)}))})),void 0!==e.custom_css&&e.custom_css){var r=e.custom_css;r=(r=r.replace(/selector/g,n)).replace(/<\//g,"&lt;/"),t+=r}return t}function h(e){return(h="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 d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(){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}}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=window.jQuery,S=window.VPAdminGutenbergVariables,E=wp.hooks,_=E.applyFilters,C=E.addFilter,T=wp.element,L=T.Component,A=T.Fragment,O=T.createRef,R=wp.components.Spinner,$=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&&v(e,t)}(d,e);var t,n,i,s,l=(t=d,function(){var e,n=k(t);if(w()){var r=k(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return b(this,e)});function d(){var e;m(this,d);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=l.call.apply(l,[this].concat(n))).state={attributes:p({},e.props.attributes),loading:!0},e.frameRef=O(),e.formRef=O(),e.maybeAttributesChanged=e.maybeAttributesChanged.bind(y(e)),e.onFrameLoad=e.onFrameLoad.bind(y(e)),e.maybeReload=e.maybeReload.bind(y(e)),e.maybeReloadDebounce=Object(r.a)(300,e.maybeReload.bind(y(e))),e.maybeResizePreviews=e.maybeResizePreviews.bind(y(e)),e.maybeResizePreviewsThrottle=Object(r.b)(100,e.maybeResizePreviews),e.printInput=e.printInput.bind(y(e)),e}return n=d,(i=[{key:"componentDidMount",value:function(){var e=this.props.clientId;o()({interval:10,checkOrigin:!1,onMessage:function(t){"clicked"===t.message&&(wp.data.dispatch("core/editor").selectBlock(e),window.focus())}},this.frameRef.current),this.frameRef.current.addEventListener("load",this.onFrameLoad),window.addEventListener("resize",this.maybeResizePreviewsThrottle),this.maybeReload()}},{key:"componentDidUpdate",value:function(){this.maybeAttributesChanged()}},{key:"componentWillUnmount",value:function(){this.frameRef.current.removeEventListener("load",this.onFrameLoad),window.removeEventListener("resize",this.maybeResizePreviewsThrottle),this.frameRef.current.iframeResizer&&this.frameRef.current.iframeResizer.removeListeners()}},{key:"onFrameLoad",value:function(e){this.frameWindow=e.target.contentWindow,this.frameJQuery=e.target.contentWindow.jQuery,this.$framePortfolio=this.frameJQuery(".vp-portfolio"),this.maybeResizePreviews(),this.setState({loading:!1})}},{key:"maybeAttributesChanged",value:function(){var e=this;if(!this.busyReload){this.busyReload=!0;var t=this.props.attributes,n=this.state.attributes,r=this.frameRef.current,i={};if(Object.keys(t).forEach((function(e){var r=t[e];void 0!==n[e]&&n[e]===r||(i[e]=r)})),Object.keys(i).length){var o=!0;Object.keys(i).forEach((function(e){var t;o=o&&!(void 0!==c[t=e]&&void 0!==c[t].style&&c[t].style.length)}));var s=_("vpf.editor.changed-attributes",{attributes:i,reload:o,$frame:this.frameRef.current,frameWindow:this.frameWindow,frameJQuery:this.frameJQuery,$framePortfolio:this.$framePortfolio});s.reload||(s.frameWindow&&s.frameWindow.vp_preview_post_data&&(s.frameWindow.vp_preview_post_data[s.name]=s.value),r.iFrameResizer&&t.block_id&&r.iFrameResizer.sendMessage({name:"dynamic-css",blockId:t.block_id,styles:u(t)})),this.setState({attributes:p(p({},n),s.attributes)},(function(){s.reload&&e.maybeReloadDebounce(),e.busyReload=!1}))}else this.busyReload=!1}}},{key:"maybeReload",value:function(){this.setState({loading:!0}),this.formRef.current.submit()}},{key:"maybeResizePreviews",value:function(){var e=x(".editor-styles-wrapper").width();if(e&&this.frameRef.current){var t=this.frameRef.current,n=x(t),r=n.closest(".visual-portfolio-gutenberg-preview-inner"),i=n.closest(".visual-portfolio-gutenberg-preview").width();r.css({width:e}),t.iFrameResizer&&(t.iFrameResizer.sendMessage({name:"resize",width:i}),t.iFrameResizer.resize())}}},{key:"printInput",value:function(e,t){var n=this,r={key:e,type:"text",name:e,value:t};if("number"==typeof t)r.type="number";else if("boolean"==typeof t)r.type="number",r.value=t?1:0;else if("object"===h(t)&&null!==t)return wp.element.createElement(A,null,Object.keys(t).map((function(r){return n.printInput("".concat(e,"[").concat(r,"]"),t[r])})));return wp.element.createElement("input",r)}},{key:"render",value:function(){var e=this,t=this.props.clientId,n=this.state,r=n.attributes,i=n.loading,o=r.id,s=r.content_source;return wp.element.createElement("div",{className:a()("visual-portfolio-gutenberg-preview",i?"visual-portfolio-gutenberg-preview-loading":"")},wp.element.createElement("div",{className:"visual-portfolio-gutenberg-preview-inner"},wp.element.createElement("form",{action:S.preview_url,target:"vpf-preview-".concat(t),method:"POST",style:{display:"none"},ref:this.formRef},wp.element.createElement("input",{type:"hidden",name:"vp_preview_frame",value:"true"}),wp.element.createElement("input",{type:"hidden",name:"vp_preview_type",value:"gutenberg"}),"saved"===s?wp.element.createElement("input",{type:"text",name:"vp_id",value:o}):wp.element.createElement(A,null,wp.element.createElement("input",{type:"hidden",name:"vp_content_source",value:s}),Object.keys(r).map((function(t){var n=r[t];return e.printInput("vp_".concat(t),n)})))),wp.element.createElement("iframe",{title:"vp-preview",id:"vpf-preview-".concat(t),name:"vpf-preview-".concat(t),allowtransparency:"true",ref:this.frameRef})),i?wp.element.createElement(R,null):"")}}])&&g(n.prototype,i),s&&g(n,s),d}(L);C("vpf.editor.changed-attributes","vpf/editor/changed-attributes/live-reload",(function(e){if(!e.$framePortfolio)return e;var t=!1;return Object.keys(e.attributes).forEach((function(n){var r=e.attributes[n];switch(n){case"tiles_type":case"masonry_columns":case"masonry_images_aspect_ratio":case"grid_columns":case"grid_images_aspect_ratio":case"justified_row_height":case"justified_row_height_tolerance":case"slider_effect":case"slider_speed":case"slider_autoplay":case"slider_autoplay_hover_pause":case"slider_centered_slides":case"slider_loop":case"slider_free_mode":case"slider_free_mode_sticky":case"slider_bullets_dynamic":case"items_gap":e.$framePortfolio.attr("data-vp-".concat(n.replace(/_/g,"-")),r),e.$framePortfolio.vpf("init");break;case"items_style_default__align":case"items_style_fade__align":case"items_style_fly__align":case"items_style_emerge__align":var i="";["left","center","right","top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"].forEach((function(e){i+="".concat(i?" ":"","vp-portfolio__item-align-").concat(e)})),e.$framePortfolio.find(".vp-portfolio__item-overlay").removeClass(i).addClass("vp-portfolio__item-align-".concat(r));break;case"filter_align":e.$framePortfolio.find(".vp-filter").removeClass("vp-filter__align-center vp-filter__align-left vp-filter__align-right").addClass("vp-filter__align-".concat(r));break;case"sort_align":e.$framePortfolio.find(".vp-sort").removeClass("vp-sort__align-center vp-sort__align-left vp-sort__align-right").addClass("vp-sort__align-".concat(r));break;case"pagination_align":e.$framePortfolio.find(".vp-pagination").removeClass("vp-pagination__align-center vp-pagination__align-left vp-pagination__align-right").addClass("vp-pagination__align-".concat(r));break;case"list_name":case"stretch":case"custom_css":break;default:t=t||e.reload}})),p(p({},e),{},{reload:t})}))},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){(function(e,n){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)}var i="[object Arguments]",o="[object Map]",s="[object Object]",a="[object Set]",l=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u[o]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u[a]=u["[object String]"]=u["[object WeakMap]"]=!1;var h="object"==(void 0===e?"undefined":r(e))&&e&&e.Object===Object&&e,d="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,p=h||d||Function("return this")(),f="object"==r(t)&&t&&!t.nodeType&&t,m=f&&"object"==r(n)&&n&&!n.nodeType&&n,g=m&&m.exports===f,v=g&&h.process,b=function(){try{return v&&v.binding&&v.binding("util")}catch(e){}}(),y=b&&b.isTypedArray;function w(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function k(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function x(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var S,E,_,C=Array.prototype,T=Function.prototype,L=Object.prototype,A=p["__core-js_shared__"],O=T.toString,R=L.hasOwnProperty,$=(S=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",M=L.toString,j=RegExp("^"+O.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=g?p.Buffer:void 0,I=p.Symbol,N=p.Uint8Array,F=L.propertyIsEnumerable,D=C.splice,W=I?I.toStringTag:void 0,z=Object.getOwnPropertySymbols,B=P?P.isBuffer:void 0,V=(E=Object.keys,_=Object,function(e){return E(_(e))}),H=be(p,"DataView"),U=be(p,"Map"),G=be(p,"Promise"),q=be(p,"Set"),K=be(p,"WeakMap"),Y=be(Object,"create"),X=xe(H),J=xe(U),Q=xe(G),Z=xe(q),ee=xe(K),te=I?I.prototype:void 0,ne=te?te.valueOf:void 0;function re(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function se(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new oe;++t<n;)this.add(e[t])}function ae(e){var t=this.__data__=new ie(e);this.size=t.size}function le(e,t){var n=_e(e),r=!n&&Ee(e),i=!n&&!r&&Ce(e),o=!n&&!r&&!i&&Re(e),s=n||r||i||o,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=a.length;for(var c in e)!t&&!R.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ke(c,l))||a.push(c);return a}function ce(e,t){for(var n=e.length;n--;)if(Se(e[n][0],t))return n;return-1}function ue(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":W&&W in Object(e)?function(e){var t=R.call(e,W),n=e[W];try{e[W]=void 0;var r=!0}catch(e){}var i=M.call(e);r&&(t?e[W]=n:delete e[W]);return i}(e):function(e){return M.call(e)}(e)}function he(e){return Oe(e)&&ue(e)==i}function de(e,t,n,r,l){return e===t||(null==e||null==t||!Oe(e)&&!Oe(t)?e!=e&&t!=t:function(e,t,n,r,l,c){var u=_e(e),h=_e(t),d=u?"[object Array]":we(e),p=h?"[object Array]":we(t),f=(d=d==i?s:d)==s,m=(p=p==i?s:p)==s,g=d==p;if(g&&Ce(e)){if(!Ce(t))return!1;u=!0,f=!1}if(g&&!f)return c||(c=new ae),u||Re(e)?me(e,t,n,r,l,c):function(e,t,n,r,i,s,l){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!s(new N(e),new N(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Se(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case o:var c=k;case a:var u=1&r;if(c||(c=x),e.size!=t.size&&!u)return!1;var h=l.get(e);if(h)return h==t;r|=2,l.set(e,t);var d=me(c(e),c(t),r,i,s,l);return l.delete(e),d;case"[object Symbol]":if(ne)return ne.call(e)==ne.call(t)}return!1}(e,t,d,n,r,l,c);if(!(1&n)){var v=f&&R.call(e,"__wrapped__"),b=m&&R.call(t,"__wrapped__");if(v||b){var y=v?e.value():e,w=b?t.value():t;return c||(c=new ae),l(y,w,n,r,c)}}if(!g)return!1;return c||(c=new ae),function(e,t,n,r,i,o){var s=1&n,a=ge(e),l=a.length,c=ge(t).length;if(l!=c&&!s)return!1;var u=l;for(;u--;){var h=a[u];if(!(s?h in t:R.call(t,h)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var p=!0;o.set(e,t),o.set(t,e);var f=s;for(;++u<l;){h=a[u];var m=e[h],g=t[h];if(r)var v=s?r(g,m,h,t,e,o):r(m,g,h,e,t,o);if(!(void 0===v?m===g||i(m,g,n,r,o):v)){p=!1;break}f||(f="constructor"==h)}if(p&&!f){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,r,l,c)}(e,t,n,r,de,l))}function pe(e){return!(!Ae(e)||function(e){return!!$&&$ in e}(e))&&(Te(e)?j:l).test(xe(e))}function fe(e){if(!function(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||L;return e===n}(e))return V(e);var t=[];for(var n in Object(e))R.call(e,n)&&"constructor"!=n&&t.push(n);return t}function me(e,t,n,r,i,o){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,h=!0,d=2&n?new se:void 0;for(o.set(e,t),o.set(t,e);++u<a;){var p=e[u],f=t[u];if(r)var m=s?r(f,p,u,t,e,o):r(p,f,u,e,t,o);if(void 0!==m){if(m)continue;h=!1;break}if(d){if(!w(t,(function(e,t){if(s=t,!d.has(s)&&(p===e||i(p,e,n,r,o)))return d.push(t);var s}))){h=!1;break}}else if(p!==f&&!i(p,f,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function ge(e){return function(e,t,n){var r=t(e);return _e(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,$e,ye)}function ve(e,t){var n=e.__data__;return function(e){var t=r(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function be(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return pe(n)?n:void 0}re.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},re.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},re.prototype.get=function(e){var t=this.__data__;if(Y){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return R.call(t,e)?t[e]:void 0},re.prototype.has=function(e){var t=this.__data__;return Y?void 0!==t[e]:R.call(t,e)},re.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Y&&void 0===t?"__lodash_hash_undefined__":t,this},ie.prototype.clear=function(){this.__data__=[],this.size=0},ie.prototype.delete=function(e){var t=this.__data__,n=ce(t,e);return!(n<0)&&(n==t.length-1?t.pop():D.call(t,n,1),--this.size,!0)},ie.prototype.get=function(e){var t=this.__data__,n=ce(t,e);return n<0?void 0:t[n][1]},ie.prototype.has=function(e){return ce(this.__data__,e)>-1},ie.prototype.set=function(e,t){var n=this.__data__,r=ce(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},oe.prototype.clear=function(){this.size=0,this.__data__={hash:new re,map:new(U||ie),string:new re}},oe.prototype.delete=function(e){var t=ve(this,e).delete(e);return this.size-=t?1:0,t},oe.prototype.get=function(e){return ve(this,e).get(e)},oe.prototype.has=function(e){return ve(this,e).has(e)},oe.prototype.set=function(e,t){var n=ve(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},se.prototype.add=se.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},se.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.clear=function(){this.__data__=new ie,this.size=0},ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ie){var r=n.__data__;if(!U||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new oe(r)}return n.set(e,t),this.size=n.size,this};var ye=z?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}(z(e),(function(t){return F.call(e,t)})))}:function(){return[]},we=ue;function ke(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||c.test(e))&&e>-1&&e%1==0&&e<t}function xe(e){if(null!=e){try{return O.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Se(e,t){return e===t||e!=e&&t!=t}(H&&"[object DataView]"!=we(new H(new ArrayBuffer(1)))||U&&we(new U)!=o||G&&"[object Promise]"!=we(G.resolve())||q&&we(new q)!=a||K&&"[object WeakMap]"!=we(new K))&&(we=function(e){var t=ue(e),n=t==s?e.constructor:void 0,r=n?xe(n):"";if(r)switch(r){case X:return"[object DataView]";case J:return o;case Q:return"[object Promise]";case Z:return a;case ee:return"[object WeakMap]"}return t});var Ee=he(function(){return arguments}())?he:function(e){return Oe(e)&&R.call(e,"callee")&&!F.call(e,"callee")},_e=Array.isArray;var Ce=B||function(){return!1};function Te(e){if(!Ae(e))return!1;var t=ue(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Le(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ae(e){var t=r(e);return null!=e&&("object"==t||"function"==t)}function Oe(e){return null!=e&&"object"==r(e)}var Re=y?function(e){return function(t){return e(t)}}(y):function(e){return Oe(e)&&Le(e.length)&&!!u[ue(e)]};function $e(e){return function(e){return null!=e&&Le(e.length)&&!Te(e)}(e)?le(e):fe(e)}n.exports=function(e,t){return de(e,t)}}).call(this,n(18),n(11)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];t.getAceInstance=function(){var e;return window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=n(47),e};t.debounce=function(e,t){var n=null;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(r,i)}),t)}}},function(e,t,n){(function(e){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(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function e(t,n,r){"string"==typeof t?(2==arguments.length&&(r=n),e.modules[t]||(e.payloads[t]=r,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,r,i=function(e,t,n){if("string"==typeof t){var r=s(e,t);if(null!=r)return n&&n(),r}else if("[object Array]"===Object.prototype.toString.call(t)){for(var i=[],a=0,l=t.length;a<l;++a){var c=s(e,t[a]);if(null==c&&o.original)return;i.push(c)}return n&&n.apply(null,i)||!0}},o=function e(t,n){var r=i("",t,n);return null==r&&e.original?e.original.apply(this,arguments):r},s=function(e,n){n=function e(t,n){if(-1!==n.indexOf("!")){var r=n.split("!");return e(t,r[0])+"!"+e(t,r[1])}if("."==n.charAt(0))for(n=t.split("/").slice(0,-1).join("/")+"/"+n;-1!==n.indexOf(".")&&i!=n;){var i=n;n=n.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return n}(e,n);var r=t.modules[n];if(!r){if("function"==typeof(r=t.payloads[n])){var o={},s={id:n,uri:"",exports:o,packaged:!0};o=r((function(e,t){return i(n,e,t)}),o,s)||s.exports,t.modules[n]=o,delete t.payloads[n]}r=t.modules[n]=o||r}return r};r=e,(n="ace")&&(e[n]||(e[n]={}),r=e[n]),r.define&&r.define.packaged||(t.original=r.define,r.define=t,r.define.packaged=!0),r.require&&r.require.packaged||(o.original=r.require,r.require=o,r.require.packaged=!0)}(),ace.define("ace/lib/regexp",["require","exports","module"],(function(e,t,n){"use strict";var r,i={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},o=void 0===i.exec.call(/()??/,"")[1],s=(r=/^/g,i.test.call(r,""),!r.lastIndex);function a(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function l(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var r=n||0;r<e.length;r++)if(e[r]===t)return r;return-1}s&&o||(RegExp.prototype.exec=function(e){var t,n,r=i.exec.apply(this,arguments);if("string"==typeof e&&r){if(!o&&r.length>1&&l(r,"")>-1&&(n=RegExp(this.source,i.replace.call(a(this),"g","")),i.replace.call(e.slice(r.index),n,(function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(r[e]=void 0)}))),this._xregexp&&this._xregexp.captureNames)for(var c=1;c<r.length;c++)(t=this._xregexp.captureNames[c-1])&&(r[t]=r[c]);!s&&this.global&&!r[0].length&&this.lastIndex>r.index&&this.lastIndex--}return r},s||(RegExp.prototype.test=function(e){var t=i.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))})),ace.define("ace/lib/es5-shim",["require","exports","module"],(function(e,t,n){function i(){}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=p.call(arguments,1),r=function r(){if(this instanceof r){var i=t.apply(this,n.concat(p.call(arguments)));return Object(i)===i?i:this}return t.apply(e,n.concat(p.call(arguments)))};return t.prototype&&(i.prototype=t.prototype,r.prototype=new i,i.prototype=null),r});var o,s,a,l,c,u=Function.prototype.call,h=Array.prototype,d=Object.prototype,p=h.slice,f=u.bind(d.toString),m=u.bind(d.hasOwnProperty);if((c=m(d,"__defineGetter__"))&&(o=u.bind(d.__defineGetter__),s=u.bind(d.__defineSetter__),a=u.bind(d.__lookupGetter__),l=u.bind(d.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,n=[];if(n.splice.apply(n,e(20)),n.splice.apply(n,e(26)),t=n.length,n.splice(5,0,"XXX"),n.length,t+1==n.length)return!0}()){var g=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?g.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(p.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):null==e?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=p.call(arguments,2),o=i.length;if(e===n)o&&this.push.apply(this,i);else{var s=Math.min(t,n-e),a=e+s,l=a+o-s,c=n-a,u=n-s;if(l<a)for(var h=0;h<c;++h)this[l+h]=this[a+h];else if(l>a)for(h=c;h--;)this[l+h]=this[a+h];if(o&&e===u)this.length=u,this.push.apply(this,i);else for(this.length=u+o,h=0;h<o;++h)this[e+h]=i[h]}return r};Array.isArray||(Array.isArray=function(e){return"[object Array]"==f(e)});var v,b,y=Object("a"),w="a"!=y[0]||!(0 in y);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=M(this),n=w&&"[object String]"==f(this)?this.split(""):t,r=arguments[1],i=-1,o=n.length>>>0;if("[object Function]"!=f(e))throw new TypeError;for(;++i<o;)i in n&&e.call(r,n[i],i,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=M(this),n=w&&"[object String]"==f(this)?this.split(""):t,r=n.length>>>0,i=Array(r),o=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)s in n&&(i[s]=e.call(o,n[s],s,t));return i}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,n=M(this),r=w&&"[object String]"==f(this)?this.split(""):n,i=r.length>>>0,o=[],s=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var a=0;a<i;a++)a in r&&(t=r[a],e.call(s,t,a,n)&&o.push(t));return o}),Array.prototype.every||(Array.prototype.every=function(e){var t=M(this),n=w&&"[object String]"==f(this)?this.split(""):t,r=n.length>>>0,i=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)if(o in n&&!e.call(i,n[o],o,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=M(this),n=w&&"[object String]"==f(this)?this.split(""):t,r=n.length>>>0,i=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)if(o in n&&e.call(i,n[o],o,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=M(this),n=w&&"[object String]"==f(this)?this.split(""):t,r=n.length>>>0;if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");if(!r&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var i,o=0;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in n){i=n[o++];break}if(++o>=r)throw new TypeError("reduce of empty array with no initial value")}for(;o<r;o++)o in n&&(i=e.call(void 0,i,n[o],o,t));return i}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=M(this),n=w&&"[object String]"==f(this)?this.split(""):t,r=n.length>>>0;if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");if(!r&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var i,o=r-1;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in n){i=n[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do{o in this&&(i=e.call(void 0,i,n[o],o,t))}while(o--);return i}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=w&&"[object String]"==f(this)?this.split(""):M(this),n=t.length>>>0;if(!n)return-1;var r=0;for(arguments.length>1&&(r=$(arguments[1])),r=r>=0?r:Math.max(0,n+r);r<n;r++)if(r in t&&t[r]===e)return r;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=w&&"[object String]"==f(this)?this.split(""):M(this),n=t.length>>>0;if(!n)return-1;var r=n-1;for(arguments.length>1&&(r=Math.min(r,$(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:d)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=r(e)&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(m(e,t)){var n;if(n={enumerable:!0,configurable:!0},c){var i=e.__proto__;e.__proto__=d;var o=a(e,t),s=l(e,t);if(e.__proto__=i,o||s)return o&&(n.get=o),s&&(n.set=s),n}return n.value=e[t],n}}}(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create)||(v=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(null===e)n=v();else{if("object"!=r(e))throw new TypeError("typeof prototype["+r(e)+"] != 'object'");var i=function(){};i.prototype=e,(n=new i).__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n});function k(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}if(Object.defineProperty){var x=k({}),S="undefined"==typeof document||k(document.createElement("div"));if(!x||!S)var E=Object.defineProperty}if(!Object.defineProperty||E){Object.defineProperty=function(e,t,n){if("object"!=r(e)&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=r(n)&&"function"!=typeof n||null===n)throw new TypeError("Property description must be an object: "+n);if(E)try{return E.call(Object,e,t,n)}catch(e){}if(m(n,"value"))if(c&&(a(e,t)||l(e,t))){var i=e.__proto__;e.__proto__=d,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!c)throw new TypeError("getters & setters can not be defined on this javascript engine");m(n,"get")&&o(e,t,n.get),m(n,"set")&&s(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)m(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze((function(){}))}catch(e){Object.freeze=(b=Object.freeze,function(e){return"function"==typeof e?e:b(e)})}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";m(e,t);)t+="?";e[t]=!0;var n=m(e,t);return delete e[t],n}),!Object.keys){var _=!0,C=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],T=C.length;for(var L in{toString:null})_=!1;Object.keys=function(e){if("object"!=r(e)&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var n in e)m(e,n)&&t.push(n);if(_)for(var i=0,o=T;i<o;i++){var s=C[i];m(e,s)&&t.push(s)}return t}}Date.now||(Date.now=function(){return(new Date).getTime()});var A="\t\n\v\f\r                 \u2028\u2029\ufeff";if(!String.prototype.trim){A="["+A+"]";var O=new RegExp("^"+A+A+"*"),R=new RegExp(A+A+"*$");String.prototype.trim=function(){return String(this).replace(O,"").replace(R,"")}}function $(e){return(e=+e)!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}var M=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],(function(e,t,n){"use strict";e("./regexp"),e("./es5-shim"),"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 i="object"==("undefined"==typeof navigator?"undefined":r(navigator))?navigator:{},o=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),s=i.userAgent||"",a=i.appName||"";t.isWin="win"==o,t.isMac="mac"==o,t.isLinux="linux"==o,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":r(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 i=e("./useragent");if(t.buildDom=function e(t,n,i){if("string"==typeof t&&t){var o=document.createTextNode(t);return n&&n.appendChild(o),o}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,i);l&&s.push(l)}return s}var c=document.createElement(t[0]),u=t[1],h=1;u&&"object"==r(u)&&!Array.isArray(u)&&(h=2);for(a=h;a<t.length;a++)e(t[a],c,i);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?i&&(i[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 r=n.indexOf(t);if(-1==r)break;n.splice(r,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),r=!0;;){var i=n.indexOf(t);if(-1==i)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(" "),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,r=0;if(n=(t=t||document).querySelectorAll("style"))for(;r<n.length;)if(n[r++].id===e)return!0},t.importCssString=function(e,n,r){var i=r;r&&r.getRootNode&&(i=r.getRootNode())&&i!=r||(i=document);var o=i.ownerDocument||i;if(n&&t.hasCssString(n,i))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var s=t.createElement("style");s.appendChild(o.createTextNode(e)),n&&(s.id=n),i==o&&(i=t.getDocumentHead(o)),i.insertBefore(s,i.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 r=t.createElement("ace_outer"),i=r.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",r.appendChild(n);var o=e.documentElement;o.appendChild(r);var s=n.offsetWidth;i.overflow="scroll";var a=n.offsetWidth;return s==a&&(a=r.clientWidth),o.removeChild(r),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=!i.isWin||"undefined"!=typeof window&&window.devicePixelRatio>=1.5,"undefined"!=typeof document){var o=document.createElement("div");t.HI_DPI&&void 0!==o.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),i.isEdge||void 0===o.style.animationName||(t.HAS_CSS_ANIMATION=!0),o=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 r=e("./oop"),i=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 r.mixin(n,n.MODIFIER_KEYS),r.mixin(n,n.PRINTABLE_KEYS),r.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}();r.mixin(t,i),t.keyCodeToString=function(e){var t=i[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 i,o=e("./keys"),s=e("./useragent"),a=null,l=0;function c(){return null==i&&function(){i=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){i={passive:!1}}})}catch(e){}}(),i}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,r){e.addEventListener(t,n,c()),r&&r.$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){function r(e){t&&t(e),n&&n(e),d(document,"mousemove",t),d(document,"mouseup",r),d(document,"dragstart",r)}return h(document,"mousemove",t),h(document,"mouseup",r),h(document,"dragstart",r),r},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,r,i,o){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 o=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-l)>5;c&&!o||(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,r[i]("mousedown",e),u>4)u=0;else if(u>1)return r[i](d[u],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){h(e,"mousedown",p,o)}))};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 r=p(t);if(!s.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(r|=8),a.altGr){if(3==(3&r))return;a.altGr=0}if(18===n||17===n){var i="location"in t?t.location:t.keyLocation;if(17===n&&1===i)1==a[n]&&(l=t.timeStamp);else if(18===n&&3===r&&2===i){t.timeStamp-l<50&&(a.altGr=!0)}}}if((n in o.MODIFIER_KEYS&&(n=-1),!r&&13===n)&&(3===(i="location"in t?t.location:t.keyLocation)&&(e(t,r,-n),t.defaultPrevented)))return;if(s.isChromeOS&&8&r){if(e(t,r,n),t.defaultPrevented)return;r&=-9}return!!(r||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS)&&e(t,r,n)}function m(){a=Object.create(null)}if(t.getModifierString=function(e){return o.KEY_MODS[p(e)]},t.addCommandKeyListener=function(e,n,r){if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var i=null;h(e,"keydown",(function(e){i=e.keyCode}),r),h(e,"keypress",(function(e){return f(n,e,i)}),r)}else{var o=null;h(e,"keydown",(function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=f(n,e,e.keyCode);return o=e.defaultPrevented,t}),r),h(e,"keypress",(function(e){o&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),o=null)}),r),h(e,"keyup",(function(e){a[e.keyCode]=null}),r),a||(m(),h(window,"focus",m))}},"object"==("undefined"==typeof window?"undefined":r(window))&&window.postMessage&&!s.isOldIE){var g=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+g++;h(n,"message",(function i(o){o.data==r&&(t.stopPropagation(o),d(n,"message",i),e())})),n.postMessage(r,"*")}}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":r(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 i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(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,r=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(r.row,r.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(r.row,r.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"==r(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"==r(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 r={row:t+1,column:0};else if(this.start.row<e)r={row:e,column:0};return i.fromPoints(r||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 r={row:e,column:t};else var o={row:e,column:t};return i.fromPoints(r||this.start,o||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 i.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(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 i(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(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i})),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 i=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(o,"")},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,i=e.length;n<i;n++)e[n]&&"object"==r(e[n])?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function e(t){if("object"!==r(t)||!t)return t;var n;if(Array.isArray(t)){n=[];for(var i=0;i<t.length;i++)n[i]=e(t[i]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var i in n={},t)n[i]=e(t[i]);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,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},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()},r=function e(r){return e.cancel(),t=setTimeout(n,r||0),e};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){null==n&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,n){"use strict";var r;n.exports={lineMode:!1,pasteCancelled:function(){return!!(r&&r>Date.now()-50)||(r=!1)},cancel:function(){r=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 r=e("../lib/event"),i=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=e("../clipboard"),l=i.isChrome<18,c=i.isIE,u=i.isChrome>63,h=e("../lib/keys"),d=h.KEY_MODS,p=i.isIOS,f=p?/\s/:/\n/,m=i.isMobile;t.TextInput=function(e,t){var n=o.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 g=!1,v=!1,b=!1,y=!1,w="";m||(n.style.fontSize="1px");var k=!1,x=!1,S="",E=0,_=0,C=0;try{var T=document.activeElement===n}catch(e){}r.addListener(n,"blur",(function(e){x||(t.onBlur(e),T=!1)}),t),r.addListener(n,"focus",(function(e){if(!x){if(T=!0,i.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),i.isEdge?setTimeout(L):L()}}),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 r=[];if(t)for(var i=n.parentElement;i&&1==i.nodeType;)r.push(i),i.setAttribute("ace_nocontext",!0),i=!i.parentElement&&i.getRootNode?i.getRootNode().host:i.parentElement;n.focus({preventScroll:!0}),t&&r.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},t.on("beforeEndOperation",(function(){var e=t.curOp,r=e&&e.command&&e.command.name;if("insertstring"!=r){var i=r&&(e.docChanged||e.selectionChanged);b&&i&&(S=n.value="",D()),L()}}));var L=p?function(e){if(T&&(!g||e)&&!y){e||(e="");var r="\n ab"+e+"cde fg\n";r!=n.value&&(n.value=S=r);var i=4+(e.length||(t.selection.isEmpty()?0:1));4==E&&_==i||n.setSelectionRange(4,i),E=4,_=i}}:function(){if(!b&&!y&&(T||O)){b=!0;var e=0,r=0,i="";if(t.session){var o=t.selection,s=o.getRange(),a=o.cursor.row;if(e=s.start.column,r=s.end.column,i=t.session.getLine(a),s.start.row!=a){var l=t.session.getLine(a-1);e=s.start.row<a-1?0:e,r+=l.length+1,i=l+"\n"+i}else if(s.end.row!=a){var c=t.session.getLine(a+1);r=s.end.row>a+1?c.length:r,r+=i.length+1,i=i+"\n"+c}else m&&a>0&&(i="\n"+i,r+=1,e+=1);i.length>400&&(e<400&&r<400?i=i.slice(0,400):(i="\n",e=0,r=1))}var u=i+"\n\n";if(u!=S&&(n.value=S=u,E=_=u.length),O&&(E=n.selectionStart,_=n.selectionEnd),_!=r||E!=e||n.selectionEnd!=_)try{n.setSelectionRange(e,r),E=e,_=r}catch(e){}b=!1}};this.resetSelection=L,T&&t.onFocus();var A=null;this.setInputHandler=function(e){A=e},this.getInputHandler=function(){return A};var O=!1,R=function(e,r){if(O&&(O=!1),v)return L(),e&&t.onPaste(e),v=!1,"";for(var i=n.selectionStart,o=n.selectionEnd,s=E,a=S.length-_,l=e,c=e.length-i,u=e.length-o,h=0;s>0&&S[h]==e[h];)h++,s--;for(l=l.slice(h),h=1;a>0&&S.length-h>E-1&&S[S.length-h]==e[e.length-h];)h++,a--;c-=h-1,u-=h-1;var d=l.length-h+1;return d<0&&(s=-d,d=0),l=l.slice(0,d),r||l||c||s||a||u?(y=!0,l&&!s&&!a&&!c&&!u||k?t.onTextInput(l):t.onTextInput(l,{extendLeft:s,extendRight:a,restoreStart:c,restoreEnd:u}),y=!1,S=e,E=i,_=o,C=u,l):""},$=function(e){if(b)return F();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var r=n.value,i=R(r,!0);(r.length>500||f.test(i)||m&&E<1&&E==_)&&L()},M=function e(t,n,r){var i=t.clipboardData||window.clipboardData;if(i&&!l){var o=c||r?"Text":"text/plain";try{return n?!1!==i.setData(o,n):i.getData(o)}catch(t){if(!r)return e(t,n,!0)}}},j=function(e,i){var o=t.getCopyText();if(!o)return r.preventDefault(e);M(e,o)?(p&&(L(o),g=o,setTimeout((function(){g=!1}),10)),i?t.onCut():t.onCopy(),r.preventDefault(e)):(g=!0,n.value=o,n.select(),setTimeout((function(){g=!1,L(),i?t.onCut():t.onCopy()})))},P=function(e){j(e,!0)},I=function(e){j(e,!1)},N=function(e){var o=M(e);a.pasteCancelled()||("string"==typeof o?(o&&t.onPaste(o,e),i.isIE&&setTimeout(L),r.preventDefault(e)):(n.value="",v=!0))};r.addCommandKeyListener(n,t.onCommandKey.bind(t),t),r.addListener(n,"select",(function(e){b||(g?g=!1:!function(e){return 0===e.selectionStart&&e.selectionEnd>=S.length&&e.value===S&&S&&e.selectionEnd!==_}(n)?m&&n.selectionStart!=E&&L():(t.selectAll(),L()))}),t),r.addListener(n,"input",$,t),r.addListener(n,"cut",P,t),r.addListener(n,"copy",I,t),r.addListener(n,"paste",N,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||r.addListener(e,"keydown",(function(e){if((!i.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:I(e);break;case 86:N(e);break;case 88:P(e)}}),t);var F=function(){if(b&&t.onCompositionUpdate&&!t.$readOnly){if(k)return W();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+_-b.selectionStart+C)}}},D=function(e){t.onCompositionEnd&&!t.$readOnly&&(b=!1,t.onCompositionEnd(),t.off("mousedown",W),e&&$())};function W(){x=!0,n.blur(),n.focus(),x=!1}var z,B=s.delayedCall(F,50).schedule.bind(null,null);function V(){clearTimeout(z),z=setTimeout((function(){w&&(n.style.cssText=w,w=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}r.addListener(n,"compositionstart",(function(e){if(!b&&t.onCompositionStart&&!t.$readOnly&&(b={},!k)){e.data&&(b.useTextareaForIME=!1),setTimeout(F,0),t._signal("compositionStart"),t.on("mousedown",W);var r=t.getSelectionRange();r.end.row=r.start.row,r.end.column=r.start.column,b.markerRange=r,b.selectionStart=E,t.onCompositionStart(b),b.useTextareaForIME?(S=n.value="",E=0,_=0):(n.msGetInputContext&&(b.context=n.msGetInputContext()),n.getInputContext&&(b.context=n.getInputContext()))}}),t),r.addListener(n,"compositionupdate",F,t),r.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.length<n.selectionStart&&(b||(S=n.value),E=_=-1,L()),B()}),t),r.addListener(n,"keydown",B,t),r.addListener(n,"compositionend",D,t),this.getElement=function(){return n},this.setCommandMode=function(e){k=e,n.readOnly=!1},this.setReadOnly=function(e){k||(n.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){O=!0,L(),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;":"")+(i.isIE?"opacity:0.1;":"")+"text-indent: -"+(E+_)*t.renderer.characterWidth*.5+"px;";var a=t.container.getBoundingClientRect(),l=o.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){o.translate(n,e.clientX-u-2,Math.min(e.clientY-c-2,h))};d(e),"mousedown"==e.type&&(t.renderer.$isMousePressed=!0,clearTimeout(z),i.isWin&&r.capture(t.container,d,V))},this.onContextMenuClose=V;var H=function(e){t.textInput.onContextMenu(e),V()};r.addListener(n,"mouseup",H,t),r.addListener(n,"mousedown",(function(e){e.preventDefault(),V()}),t),r.addListener(t.renderer.scroller,"contextmenu",H,t),r.addListener(n,"contextmenu",H,t),p&&function(e,t,n){var r=null,i=!1;n.addEventListener("keydown",(function(e){r&&clearTimeout(r),i=!0}),!0),n.addEventListener("keyup",(function(e){r=setTimeout((function(){i=!1}),100)}),!0);var o=function(e){if(document.activeElement===n&&!(i||b||t.$mouseHandler.isMousePressed||g)){var r=n.selectionStart,o=n.selectionEnd,s=null,a=0;if(0==r?s=h.up:1==r?s=h.home:o>_&&"\n"==S[o]?s=h.end:r<E&&" "==S[r-1]?(s=h.left,a=d.option):r<E||r==E&&_!=E&&r==o?s=h.left:o>_&&S.slice(0,o).split("\n").length>2?s=h.down:o>_&&" "==S[o-1]?(s=h.right,a=d.option):(o>_||o==_&&_!=E&&r==o)&&(s=h.right),r!==o&&(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)}E=r,_=o,L("")}}};document.addEventListener("selectionchange",o),t.on("destroy",(function(){document.removeEventListener("selectionchange",o)}))}(0,t,n)},t.$setUserAgentForTests=function(e,t){m=e,p=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/useragent");function i(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 o(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 i=this.editor,o=e.getButton();return 0!==o?((i.getSelectionRange().isEmpty()||1==o)&&i.selection.moveToPosition(n),void(2==o&&(i.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||i.isFocused()||(i.focus(),!this.$focusTimeout||this.$clickSelection||i.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 r=this.$clickSelection.comparePoint(n);if(-1==r)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var i=o(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(i.start),a=this.$clickSelection.comparePoint(i.end);if(-1==s&&a<=0)t=this.$clickSelection.end,i.end.row==r.row&&i.end.column==r.column||(r=i.start);else if(1==a&&s>=0)t=this.$clickSelection.start,i.start.row==r.row&&i.start.column==r.column||(r=i.end);else if(-1==s&&1==a)r=i.end,t=i.start;else{var l=o(this.$clickSelection,r);r=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),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,r,i=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,r=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))),o=Date.now();(i>0||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.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,r=e.domEvent.timeStamp,i=r-n.t,o=i?e.wheelX/i:n.vx,s=i?e.wheelY/i:n.vy;i<550&&(o=(o+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(o/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=r;else if(r-n.allowed<550){Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=r):n.allowed=0}return n.t=r,n.vx=o,n.vy=s,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(i.prototype),t.DefaultHandlers=i})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){"use strict";e("./lib/oop");var r=e("./lib/dom");function i(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=r.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){r.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(i.prototype),t.Tooltip=i})),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 r=e("../lib/dom"),i=e("../lib/oop"),o=e("../lib/event"),s=e("../tooltip").Tooltip;function a(e){s.call(this,e)}i.inherits(a,s),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),o=this.getHeight();(e+=15)+i>n&&(e-=e+i-n),(t+=15)+o>r&&(t-=20+o),s.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,n,i,s=e.editor,l=s.renderer.$gutterLayer,c=new a(s.container);function u(){t&&(t=clearTimeout(t)),i&&(c.hide(),i=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,r=s.session.selection;if(t.getShiftKey())r.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(o){var a=o.domEvent.target||o.domEvent.srcElement;if(r.hasCssClass(a,"ace_fold-widget"))return u();i&&e.$tooltipFollowsMouse&&h(o),n=o,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,r=l.$annotations[t];if(!r)return u();if(t==s.session.getLength()){var o=s.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(o>s.session.documentToScreenRow(a.row,a.column))return u()}if(i!=r)if(i=r.text.join("<br/>"),c.setHtml(i),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))})),o.addListener(s.renderer.$gutter,"mouseout",(function(e){n=null,i&&!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 r=e("../lib/event"),i=e("../lib/useragent"),o=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(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.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 r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.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 r=e("../lib/dom"),i=e("../lib/event"),o=e("../lib/useragent");function s(e){var t=e.editor,n=r.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o.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,m,g,v,b=t.container,y=0;function w(){var e=d;(function(e,n){var r=Date.now(),i=!n||e.row!=n.row,o=!n||e.column!=n.column;!g||i||o?(t.moveCursorToPosition(e),g=r,v={x:l,y:c}):a(v.x,v.y,l,c)>5?g=null:r-g>=200&&(t.renderer.scrollCursorIntoView(),g=null)})(d=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var r=Date.now(),i=t.renderer.layerConfig.lineHeight,o=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/o<=2&&(d.column+=a.x.left<a.x.right?-3:2),h/i<=1&&(d.row+=a.y.top<a.y.bottom?-1:1);var p=e.row!=d.row,f=e.column!=d.column,g=!n||e.row!=n.row;p||f&&!g?m?r-m>=200&&t.renderer.scrollCursorIntoView(d):m=r:m=null}(d,e)}function k(){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,i.addListener(document,"mousemove",E)}function x(){clearInterval(u),t.session.removeMarker(s),s=null,t.selection.fromOrientedRange(h),t.isFocused()&&!f&&t.$resetCursorStyle(),h=null,d=null,y=0,m=null,g=null,i.removeListener(document,"mousemove",E)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var r=this;return setTimeout((function(){r.startSelect(),r.captureMouse(e)}),0),e.preventDefault()}h=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",o.isOpera&&(t.container.appendChild(n),n.scrollTop=0),i.setDragImage&&i.setDragImage(n,0,0),o.isOpera&&t.container.removeChild(n),i.clearData(),i.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.dataTransfer))return l=e.clientX,c=e.clientY,s||k(),y++,e.dataTransfer.dropEffect=p=C(e),i.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&_(e.dataTransfer))return l=e.clientX,c=e.clientY,s||(k(),y++),null!==S&&(S=null),e.dataTransfer.dropEffect=p=C(e),i.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&s)return x(),p=null,i.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 r=n.getData("Text");h={start:d,end:t.session.insert(d,r)},t.focus(),p=null}return x(),i.preventDefault(e)}},i.addListener(b,"dragstart",this.onDragStart.bind(e),t),i.addListener(b,"dragend",this.onDragEnd.bind(e),t),i.addListener(b,"dragenter",this.onDragEnter.bind(e),t),i.addListener(b,"dragover",this.onDragOver.bind(e),t),i.addListener(b,"dragleave",this.onDragLeave.bind(e),t),i.addListener(b,"drop",this.onDrop.bind(e),t);var S=null;function E(){null==S&&(S=setTimeout((function(){null!=S&&s&&x()}),20))}function _(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function C(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,r="uninitialized";try{r=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var i="none";return n&&t.indexOf(r)>=0?i="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(r)>=0?i="move":t.indexOf(r)>=0&&(i="copy"),i}}function a(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-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=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.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(),r=e.getButton();if(1===(e.domEvent.detail||1)&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var i=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in i&&(i.unselectable="on"),t.getDragDelay()){if(o.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 r=e("./mouse_event").MouseEvent,i=e("../lib/event"),o=e("../lib/dom");t.addTouchListeners=function(e,t){var n,s,a,l,c,u,h,d,p,f="scroll",m=0,g=0,v=0,b=0;function y(){var e=window.navigator&&window.navigator.clipboard,n=!1,r=function(r){var i,s,a=r.target.getAttribute("action");if("more"==a||!n)return n=!n,i=t.getCopyText(),s=t.session.getUndoManager().hasUndo(),void p.replaceChild(o.buildDom(n?["span",!i&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],i&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],i&&["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=o.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(),r(e)},onclick:r},["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),r=t.container.getBoundingClientRect();p.style.top=n.pageY-r.top-3+"px",p.style.right="10px",p.style.display="",p.firstChild.style.display="none",t.on("input",k)}function k(e){p&&(p.style.display="none"),t.off("input",k)}function x(){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()}i.addListener(e,"contextmenu",(function(e){d&&t.textInput.getElement().focus()}),t),i.addListener(e,"touchstart",(function(e){var i=e.touches;if(c||i.length>1)return clearTimeout(c),c=null,a=-1,void(f="zoom");d=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,p=e.timeStamp;l=p;var y=i[0],w=y.clientX,k=y.clientY;Math.abs(n-w)+Math.abs(s-k)>o&&(a=-1),n=e.clientX=w,s=e.clientY=k,v=b=0;var S=new r(e,t);if(h=S.getDocumentPosition(),p-a<500&&1==i.length&&!m)g++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(h);var e=g>=2?t.selection.getLineRange(h.row):t.session.getBracketRange(h);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),f="wait"}();else{g=0;var E=t.selection.cursor,_=t.selection.isEmpty()?E:t.selection.anchor,C=t.renderer.$cursorLayer.getPixelPosition(E,!0),T=t.renderer.$cursorLayer.getPixelPosition(_,!0),L=t.renderer.scroller.getBoundingClientRect(),A=function(e,t){return(e/=u)*e+(t=t/o-.75)*t};if(e.clientX<L.left)return void(f="zoom");var O=A(e.clientX-L.left-C.left,e.clientY-L.top-C.top),R=A(e.clientX-L.left-T.left,e.clientY-L.top-T.top);O<3.5&&R<3.5&&(f=O>R?"cursor":"anchor"),f=R<3.5?"anchor":O<3.5?"cursor":"scroll",c=setTimeout(x,450)}a=p}),t),i.addListener(e,"touchend",(function(e){d=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==f?(f="",m=0):c?(t.selection.moveToPosition(h),m=0,w()):"scroll"==f?(m+=60,u=setInterval((function(){m--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(b)<.01&&(b=0),m<20&&(v*=.9),m<20&&(b*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*b),e==t.session.getScrollTop()&&(m=0)}),10),k()):w(),clearTimeout(c),c=null}),t),i.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var i=e.touches;if(!(i.length>1||"zoom"==f)){var o=i[0],a=n-o.clientX,u=s-o.clientY;if("wait"==f){if(!(a*a+u*u>4))return e.preventDefault();f="cursor"}n=o.clientX,s=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var h=e.timeStamp,d=h-l;if(l=h,"scroll"==f){var p=new r(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 m=new r(e,t).getDocumentPosition();"cursor"==f?t.selection.moveCursorToPosition(m):"anchor"==f&&t.selection.setSelectionAnchor(m.row,m.column),t.renderer.scrollCursorIntoView(m),e.preventDefault()}}}),t)}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=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=r.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){!n&&i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(i=i.onload=i.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 i={},o=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],i=this._defaultHandlers[e];if(n.length||i){"object"==r(t)&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=o),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var a=0;a<n.length&&(n[a](t,this),!t.propagationStopped);a++);return i&&!t.defaultPrevented?i(t,this):void 0}},i._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)}},i.once=function(e,t){var n=this;if(this.on(e,(function r(){n.off(e,r),t.apply(null,arguments)})),!t)return new Promise((function(e){t=e}))},i.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var o=i.indexOf(t);-1!=o&&i.splice(o,1)}n[e]=t},i.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var r=n._disabled_[e];if(n[e]==t)r&&this.setDefaultHandler(e,r.pop());else if(r){var i=r.indexOf(t);-1!=i&&r.splice(i,1)}}},i.on=i.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),-1==r.indexOf(t)&&r[n?"unshift":"push"](t),t},i.off=i.removeListener=i.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}},i.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=i})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){var i=e("./oop"),o=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":r(console))&&console.error&&console.error(n),setTimeout((function(){throw n}))}var c=function(){this.$defaultOptions={}};(function(){i.implement(this,o),this.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach((function(t){var r=n[t];"string"==typeof r&&(r={forwardTo:r}),r.name||(r.name=t),e.$options[r.name]=r,"initialValue"in r&&(e["$"+r.name]=r.initialValue)})),i.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 r=this.$defaultOptions[e]||(this.$defaultOptions[e]={});r[t]&&(r.forwardTo?this.setDefaultValue(r.forwardTo,t,n):r[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,r){var i=e("./lib/lang"),o=(e("./lib/oop"),e("./lib/net")),s=e("./lib/app_config").AppConfig;r.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 i.copyObject(l)},t.$modes={},t.moduleUrl=function(e,t){if(l.$moduleUrls[e])return l.$moduleUrls[e];var n=e.split("/"),r="snippets"==(t=t||n[n.length-2]||"")?"/":"-",i=n[n.length-1];if("worker"==t&&"-"==r){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");i=i.replace(o,"")}(!i||i==t)&&n.length>1&&(i=n[n.length-2]);var s=l[t+"Path"];return null==s?s=l.basePath:"/"==r&&(t=r=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,r){var i,s;Array.isArray(n)&&(s=n[0],n=n[1]);try{i=e(n)}catch(e){}if(i&&!t.$loading[n])return r&&r(i);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r),!(t.$loading[n].length>1)){var a=function(){e([n],(function(e){t._emit("load.module",{name:n,module:e});var r=t.$loading[n];t.$loading[n]=null,r.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return a();o.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(i){if(a&&a.document){l.packaged=i||e.packaged||r.packaged||a.define&&n(48).packaged;for(var o,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 m=p.attributes,g=0,v=m.length;g<v;g++){var b=m[g];0===b.name.indexOf("data-ace-")&&(s[(o=b.name.replace(/^data-ace-/,""),o.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.10"})),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 r=e("../lib/event"),i=e("../lib/useragent"),o=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 o(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();r.addListener(a,"click",this.onMouseEvent.bind(this,"click"),e),r.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),r.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),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),c(e.container,e);var u=e.renderer.$gutter;r.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),r.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick"),e),r.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),r.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),r.addListener(a,"mousedown",n,e),r.addListener(u,"mousedown",n,e),i.isIE&&e.renderer.scrollBarV&&(r.addListener(e.renderer.scrollBarV.element,"mousedown",n,e),r.addListener(e.renderer.scrollBarH.element,"mousedown",n,e)),e.on("mousemove",(function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var r=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),o=e.renderer;!i.isEmpty()&&i.insideStart(r.row,r.column)?o.setCursorStyle("default"):o.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,o=this.editor.renderer;o.$isMousePressed=!0;var s=this,l=function(e){if(e){if(i.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=o.$isMousePressed=!1,o.$keepTextAreaAtCursor&&o.$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(i.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=r.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&&r.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(h.prototype),u.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:i.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 r=e("../lib/dom");t.FoldHandler=function(e){e.on("click",(function(t){var n=t.getDocumentPosition(),i=e.session,o=i.getFoldAt(n.row,n.column,1);o&&(t.getAccelKey()?i.removeFold(o):i.expandFold(o),t.stop());var s=t.domEvent&&t.domEvent.target;s&&r.hasCssClass(s,"ace_inline_button")&&r.hasCssClass(s,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),e.renderer.scrollCursorIntoView())})),e.on("gutterclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session;r.foldWidgets&&r.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,r=e.session,i=r.getParentFoldRangeData(n,!0),o=i.range||i.firstRange;if(o){n=o.start.row;var s=r.getFoldAt(n,r.getLine(n).length,1);s?r.removeFold(s):(r.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.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 r=e("../lib/keys"),i=e("../lib/event"),o=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,r){for(var o,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((o=this.$handlers[l].handleKeyboard(this.$data,e,t,n,r))&&o.command&&((s="null"==o.command||a.exec(o.command,this.$editor,o.args,r))&&r&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&i.stopEvent(r),s)););return s||-1!=e||(o={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),s},this.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);return this.$callKeyboardHandlers(t,i,n,e)},this.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(e,t,n){"use strict";var r=0,i=0,o=!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(!(i<e))if(1!=e||1!=r||s)for(var o,a,l,c,u=n.length,h=0;h<u;){if(t[h]>=e){for(o=h+1;o<u&&t[o]>=e;)o++;for(a=h,l=o-1;a<l;a++,l--)c=n[a],n[a]=n[l],n[l]=c;h=o}h++}else n.reverse()}function p(e,t,n,i){var l,c,u,h,d=t[i];switch(d){case 0:case 1:o=!1;case 4:case 3:return d;case 2:return o?3:2;case 7:return o=!0,!0,1;case 8:return 4;case 9:return i<1||i+1>=t.length||2!=(l=n[i-1])&&3!=l||2!=(c=t[i+1])&&3!=c?4:(o&&(c=3),c==l?c:4);case 10:return 2==(l=i>0?n[i-1]:5)&&i+1<t.length&&2==t[i+1]?2:4;case 11:if(i>0&&2==n[i-1])return 2;if(o)return 4;for(h=i+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=i+1;h<u&&12==t[h];)h++;if(h<u){var p=e[i],f=p>=1425&&p<=2303||64286==p;if(l=t[h],f&&(1==l||7==l))return 1}return i<1||5==(l=t[i-1])?4:n[i-1];case 5:return o=!1,s=!0,r;case 6:return a=!0,4;case 13:case 14:case 16:case 17:case 15:o=!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(""),m=new Array(h.length),g=new Array(h.length),v=[];r=u?1:0,function(e,t,n,u){var h=r?c:l,d=null,m=null,g=null,v=0,b=null,y=-1,w=null,k=null,x=[];if(!u)for(w=0,u=[];w<n;w++)u[w]=f(e[w]);for(i=r,o=!1,!1,s=!1,a=!1,k=0;k<n;k++){if(d=v,x[k]=m=p(e,u,x,k),b=240&(v=h[d][m]),v&=15,t[k]=g=h[v][5],b>0)if(16==b){for(w=y;w<k;w++)t[w]=1;y=-1}else y=-1;if(h[v][6])-1==y&&(y=k);else if(y>-1){for(w=y;w<k;w++)t[w]=g;y=-1}5==u[k]&&(t[k]=0),i|=g}if(a)for(w=0;w<n;w++)if(6==u[w]){t[w]=r;for(var S=w-1;S>=0&&8==u[S];S--)t[S]=r}}(h,v,h.length,n);for(var b=0;b<m.length;m[b]=b,b++);d(2,v,m),d(1,v,m);for(b=0;b<m.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<m.length;b++)g[b]=v[m[b]];return{logicalFromVisual:m,bidiLevels:g}},t.hasBidiCharacters=function(e,t){for(var n=!1,r=0;r<e.length;r++)t[r]=f(e.charAt(r)),n||1!=t[r]&&7!=t[r]&&3!=t[r]||(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 r=e("./lib/bidiutil"),i=e("./lib/lang"),o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=r,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=o.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&&o.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,r=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===r;)r=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 o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[r.L],this.line=t<o.length?this.line.substring(o[t-1],o[t]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[t])),t==o.length&&(this.line+=this.showInvisibles?n:r.DOT)}else this.line+=this.showInvisibles?n:r.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,i.stringRepeat(r.DOT,s)):e})),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==r.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=[];r.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=r.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[r.L]=this.charWidths[r.EN]=this.charWidths[r.ON_R]=t,this.charWidths[r.R]=this.charWidths[r.AN]=n,this.charWidths[r.R_H]=.45*n,this.charWidths[r.B]=this.charWidths[r.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(),r=e.selection.getSelectionAnchor().row;r<=n.row;r++)t||e.session.getLine(r).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(r).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:r},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(r,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,i=r.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&o[i]%2!=0&&i++;for(var a=0;a<i;a++)s+=this.charWidths[o[a]];return!this.session.getOverwrite()&&e>t&&o[i]%2==0&&(s+=this.charWidths[o[i]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},this.getSelections=function(e,t){var n,r=this.bidiMap,i=r.bidiLevels,o=[],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<i.length;p++)d=r.logicalFromVisual[p],n=i[p],(c=d>=a&&d<l)&&!u?h=s:!c&&u&&o.push({left:h,width:s-h}),s+=this.charWidths[n],u=c;if(c&&p===i.length&&o.push({left:h,width:s-h}),this.isRtlDir)for(var f=0;f<o.length;f++)o[f].left+=this.rtlLineOffset;return o},this.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,n=(e=Math.max(e,0),0),r=0,i=this.bidiMap.bidiLevels,o=this.charWidths[i[r]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e>n+o/2;){if(n+=o,r===i.length-1){o=0;break}o=this.charWidths[i[++r]]}return r>0&&i[r-1]%2!=0&&i[r]%2==0?(e<n&&r--,t=this.bidiMap.logicalFromVisual[r]):r>0&&i[r-1]%2==0&&i[r]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===i.length-1&&0===o&&i[r-1]%2==0||!this.isRtlDir&&0===r&&i[r]%2!=0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&i[r-1]%2!=0&&0!==o&&r--,t=this.bidiMap.logicalFromVisual[r]),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 r=e("./lib/oop"),i=e("./lib/lang"),o=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(){r.implement(this,o),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,r=t?e.start:e.end;this.$setSelection(n.row,n.column,r.row,r.column)},this.$setSelection=function(e,t,n,r){if(!this.$silent){var i=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,r),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||o)&&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,r="number"==typeof e?e:this.lead.row,i=this.session.getFoldLine(r);return i?(r=i.start.row,n=i.end.row):n=r,!0===t?new s(r,0,n,this.session.getLine(n).length):new s(r,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 r=e.column,i=e.column+t;return n<0&&(r=e.column-t,i=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,i).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),r=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(e,null,r.row,r.column).match(/^\s*/);i[0].length==t||this.session.$useEmacsStyleLineStart||(r.column+=i[0].length),this.moveCursorToPosition(r)},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 r=n.search(/\s+$/);r>0&&(t.column=r)}}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),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);if(i)this.moveCursorTo(i.end.row,i.end.column);else{if(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=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(r)&&(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 r=this.session.getFoldStringAt(t,n,-1);null==r&&(r=this.doc.getLine(t).substring(0,n));var o=i.stringReverse(r);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(n-=this.session.nonTokenRe.lastIndex,o=o.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(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,r=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&r.test(t);)n++;if(n<1)for(i.lastIndex=0;(t=e[n])&&!i.test(t);)if(i.lastIndex=0,n++,r.test(t)){if(n>2){n--;break}for(;(t=e[n])&&r.test(t);)n++;if(n>2)break}}return i.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e<o&&/^\s*$/.test(r));/^\s+/.test(r)||(r=""),t=0}var s=this.$shortWordEndIndex(r);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 r=this.session.getLine(t).substring(0,n);if(0===n){do{t--,r=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(r));n=r.length,/\s+$/.test(r)||(r="")}var o=i.stringReverse(r),s=this.$shortWordEndIndex(o);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,r=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];e<0?e-=i.rowsAbove||0:e>0&&(e+=i.rowCount-(i.rowsAbove||0))}var o=this.session.screenToDocumentPosition(r.row+e,r.column,n);0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.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 r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.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 r=e("./config"),i=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],r=[],i=0,o=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(o.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)+i+1)})):(h=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[i]=l,i+=h,r.push(u),c.onMatch||(c.onMatch=null)}}r.length||(o[0]=0,r.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)}),this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){i=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 r=[],i=0,o=n.length;i<o;i++)t[i]&&(r[r.length]={type:n[i],value:t[i]});return r},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],r=this.tokenArray,i=0,o=r.length;i<o;i++)t[i+1]&&(n[n.length]={type:r[i],value:t[i+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,r=!1,i={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(e,t,o,s,a,l){return r?r="]"!=a:a?r=!0:s?(n==i.stack&&(i.end=l+1,i.stack=-1),n--):o&&(n++,1!=o.length&&(i.stack=n,i.start=l)),e})),null!=i.end&&/^\)*$/.test(e.substr(i.end))&&(e=e.substring(0,i.start)+e.substr(i.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 r=t||"start",o=this.states[r];o||(r="start",o=this.states[r]);var s=this.matchMappings[r],a=this.regExps[r];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,m=l[0],g=a.lastIndex;if(g-m.length>u){var v=e.substring(u,g-m.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=o[s[b]]).onMatch?f.onMatch(m,r,n,e):f.token,f.next&&(r="string"==typeof f.next?f.next:f.next(r,n),(o=this.states[r])||(this.reportError("state doesn't exist",r),r="start",o=this.states[r]),s=this.matchMappings[r],u=g,(a=this.regExps[r]).lastIndex=g),f.consumeLineEnd&&(u=g);break}if(m)if("string"==typeof p)f&&!1===f.merge||d.type!==p?(d.type&&c.push(d),d={type:p,value:m}):d.value+=m;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=g,h++>i){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"};r="start",n=[];break}}return d.type&&c.push(d),n.length>1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:c,state:n.length?n:r}},this.reportError=r.reportError}).call(o.prototype),t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var r=e("../lib/lang"),i=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 r=e[n],i=0;i<r.length;i++){var o=r[i];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState))}this.$rules[t+n]=r}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,i,o){var s="function"==typeof e?(new e).getRules():e;if(i)for(var a=0;a<i.length;a++)i[a]=t+i[a];else for(var l in i=[],s)i.push(t+l);if(this.addRules(s,t),n){var c=Array.prototype[o?"push":"unshift"];for(a=0;a<i.length;a++)c.apply(this.$rules[i[a]],r.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,r=this.$rules;Object.keys(r).forEach((function i(o){var s=r[o];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]||""),r[h]&&(h+=n++)),r[h]=u,l.next=h,i(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)r[d]?r[d].push&&r[d].push.apply(r[d],l.rules[d]):r[d]=l.rules[d];var p="string"==typeof l?l:l.include;if(p&&(c=Array.isArray(p)?p.map((function(e){return r[e]})):r[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,r){var i=Object.create(null);return Object.keys(e).forEach((function(t){var o=e[t];n&&(o=o.toLowerCase());for(var s=o.split(r||"|"),a=s.length;a--;)i[s[a]]=t})),Object.getPrototypeOf(i)&&(i.__proto__=null),this.$keywordList=Object.keys(i),e=null,n?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(i.prototype),t.TextHighlightRules=i})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(e,t,n){"use strict";var r=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(r.prototype),t.Behaviour=r})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("./range").Range,i=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var r=e.getTokenAt(t,n);this.$tokenIndex=r?r.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 r(this.$row,t,this.$row,t+e.value.length)}}).call(i.prototype),t.TokenIterator=i})),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 r,i=e("../../lib/oop"),o=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 r=u[t];r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(e,t,n,r){var i=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}},f=function e(t){this.add("braces","insertion",(function(n,i,o,s,l){var c=o.getCursorPosition(),u=s.doc.getLine(c.row);if("{"==l){d(o);var h=o.getSelectionRange(),f=s.doc.getTextRange(h);if(""!==f&&"{"!==f&&o.getWrapBehavioursEnabled())return p(h,f,"{","}");if(e.isSaneInsertion(o,s))return/[\]\}\)]/.test(u[c.column])||o.inMultiSelectMode||t&&t.braces?(e.recordAutoInsert(o,s,"}"),{text:"{}",selection:[1,1]}):(e.recordMaybeInsert(o,s,"{"),{text:"{",selection:[1,1]})}else if("}"==l){if(d(o),"}"==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(o);var m="";if(e.isMaybeInsertedClosing(c,u)&&(m=a.stringRepeat("}",r.maybeInsertedBrackets),e.clearMaybeInsertedClosing()),"}"===u.substring(c.column,c.column+1)){var g=s.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!g)return null;var v=this.$getIndent(s.getLine(g.row))}else{if(!m)return void e.clearMaybeInsertedClosing();v=this.$getIndent(u)}var b=v+s.getTabString();return{text:"\n"+b+"\n"+v+m,selection:[1,b.length,1,b.length]}}e.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,i,o){var s=i.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){if(d(n),"}"==i.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;r.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,n,r,i,o){if("("==o){d(r);var s=r.getSelectionRange(),a=i.doc.getTextRange(s);if(""!==a&&r.getWrapBehavioursEnabled())return p(s,a,"(",")");if(e.isSaneInsertion(r,i))return e.recordAutoInsert(r,i,")"),{text:"()",selection:[1,1]}}else if(")"==o){d(r);var l=r.getCursorPosition(),c=i.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1))if(null!==i.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,o))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"("==o&&(d(n),")"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i})),this.add("brackets","insertion",(function(t,n,r,i,o){if("["==o){d(r);var s=r.getSelectionRange(),a=i.doc.getTextRange(s);if(""!==a&&r.getWrapBehavioursEnabled())return p(s,a,"[","]");if(e.isSaneInsertion(r,i))return e.recordAutoInsert(r,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){d(r);var l=r.getCursorPosition(),c=i.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1))if(null!==i.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,o))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"["==o&&(d(n),"]"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i})),this.add("string_dquotes","insertion",(function(e,t,n,r,i){var o=r.$mode.$quotes||h;if(1==i.length&&o[i]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(i))return;d(n);var s=i,a=n.getSelectionRange(),l=r.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return p(a,l,s,s);if(!l){var c=n.getCursorPosition(),u=r.doc.getLine(c.row),f=u.substring(c.column-1,c.column),m=u.substring(c.column,c.column+1),g=r.getTokenAt(c.row,c.column),v=r.getTokenAt(c.row,c.column+1);if("\\"==f&&g&&/escape/.test(g.type))return null;var b,y=g&&/string|escape/.test(g.type),w=!v||/string|escape/.test(v.type);if(m==s)(b=y!==w)&&/string\.end/.test(v.type)&&(b=!1);else{if(y&&!w)return null;if(y&&w)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var x=k.test(f);k.lastIndex=0;var S=k.test(f);if(x||S)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var E=u[c.column-2];if(f==s&&(E==s||k.test(E)))return null;b=!0}return{text:b?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,r,i){var o=r.$mode.$quotes||h,s=r.doc.getTextRange(i);if(!i.isMultiLine()&&o.hasOwnProperty(s)&&(d(n),r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==s))return i.end.column++,i}))};f.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},f.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},f.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,o,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=i.row,r.autoInsertedLineEnd=n+o.substr(i.column),r.autoInsertedBrackets++},f.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,o)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=i.row,r.maybeInsertedLineStart=o.substr(0,i.column)+n,r.maybeInsertedLineEnd=o.substr(i.column),r.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},i.inherits(f,o),t.CstyleBehaviour=f})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var r=[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],i=0,o=[],s=0;s<r.length;s+=2)o.push(i+=r[s]),r[s+1]&&o.push(45,i+=r[s+1]);t.wordChars=String.fromCharCode.apply(null,o)})),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 i=e("../config"),o=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 o(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,r){var i=t.doc,o=!0,s=!0,a=1/0,l=t.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))m=this.lineCommentStart.map(c.escapeRegExp).join("|"),p=this.lineCommentStart[0];else m=c.escapeRegExp(this.lineCommentStart),p=this.lineCommentStart;m=new RegExp("^(\\s*)(?:"+m+") ?"),u=t.getUseSoftTabs();b=function(e,t){var n=e.match(m);if(n){var r=n[1].length,o=n[0].length;d(e,r,o)||" "!=n[0][o-1]||o--,i.removeInLine(t,r,o)}};var h=p+" ",d=(v=function(e,t){o&&!/\S/.test(e)||(d(e,a,a)?i.insertInLine({row:t,column:a},h):i.insertInLine({row:t,column:a},p))},y=function(e,t){return m.test(e)},function(e,t,n){for(var r=0;t--&&" "==e.charAt(t);)r++;if(r%l!=0)return!1;for(r=0;" "==e.charAt(n++);)r++;return l>2?r%l!=l-1:r%l==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,f=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+c.escapeRegExp(p)+")"),g=new RegExp("(?:"+c.escapeRegExp(f)+")\\s*$"),v=function(e,t){y(e,t)||o&&!/\S/.test(e)||(i.insertInLine({row:t,column:e.length},f),i.insertInLine({row:t,column:a},p))},b=function(e,t){var n;(n=e.match(g))&&i.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(m))&&i.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(m.test(e))return!0;for(var r=t.getTokens(n),i=0;i<r.length;i++)if("comment"===r[i].type)return!0}}function w(e){for(var t=n;t<=r;t++)e(i.getLine(t),t)}var k=1/0;w((function(e,t){var n=e.search(/\S/);-1!==n?(n<a&&(a=n),s&&!y(e,t)&&(s=!1)):k>e.length&&(k=e.length)})),a==1/0&&(a=k,o=!1,s=!1),u&&a%l!=0&&(a=Math.floor(a/l)*l),w(s?b:v)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(i){!i.start&&i[0]&&(i=i[0]);var o,s,a=(m=new u(t,r.row,r.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!=(g=a.value.indexOf(i.start))){var p=m.getCurrentTokenRow(),f=m.getCurrentTokenColumn()+g;c=new h(p,f,p,f+i.start.length);break}a=m.stepBackward()}var m;for(a=(m=new u(t,r.row,r.column)).getCurrentToken();a&&/comment/.test(a.type);){var g;if(-1!=(g=a.value.indexOf(i.end))){p=m.getCurrentTokenRow(),f=m.getCurrentTokenColumn()+g;d=new h(p,f,p,f+i.end.length);break}a=m.stepForward()}d&&t.remove(d),c&&(t.remove(c),o=c.start.row,s=-i.start.length)}else s=i.start.length,o=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);l.start.row==o&&(l.start.column+=s),l.end.row==o&&(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],r=n.prototype.$id,o=i.$modes[r];o||(i.$modes[r]=o=new n),i.$modes[t]||(i.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t<s.length;t++)!function(e){var n=s[t],r=e[n];e[s[t]]=function(){return this.$delegator(n,arguments,r)}}(this)},this.$delegator=function(e,t,n){var r=t[0]||"start";if("string"!=typeof r){if(Array.isArray(r[2])){var i=r[2][r[2].length-1];if(s=this.$modes[i])return s[e].apply(s,[r[1]].concat([].slice.call(t,1)))}r=r[0]||"start"}for(var o=0;o<this.$embeds.length;o++)if(this.$modes[this.$embeds[o]]){var s,a=r.split(this.$embeds[o]);if(!a[0]&&a[1])return t[0]=a[1],(s=this.$modes[this.$embeds[o]])[e].apply(s,t)}var l=n.apply(this,t);return n?l:void 0},this.transformAction=function(e,t,n,r,i){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var s in o)if(o[s][t]){var a=o[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var i in t)for(var o=t[i],s=0,a=o.length;s<a;s++)if("string"==typeof o[s].token)/keyword|support|storage/.test(o[s].token)&&n.push(o[s].regex);else if("object"===r(o[s].token))for(var l=0,c=o[s].token.length;l<c;l++)if(/keyword|support|storage/.test(o[s].token[l])){i=o[s].regex.match(/\(.+?\)/g)[l];n.push(i.substr(1,i.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,r){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 r=t.start.row,i=t.start.column,o=e[r]||"";switch(t.action){case"insert":if(1===t.lines.length)e[r]=o.substring(0,i)+t.lines[0]+o.substring(i);else{var s=[r,1].concat(t.lines);e.splice.apply(e,s),e[r]=o.substring(0,i)+e[r],e[r+t.lines.length-1]+=o.substring(i)}break;case"remove":var a=t.end.column,l=t.end.row;r===l?e[r]=o.substring(0,i)+o.substring(a):e.splice(r,l-r+1,o.substring(0,i)+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 r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,o=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 r=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&r}r.implement(this,i),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,r){var i="insert"==t.action,o=(i?1:-1)*(t.end.row-t.start.row),s=(i?1:-1)*(t.end.column-t.start.column),a=t.start,l=i?a:t.end;if(e(n,a,r))return{row:n.row,column:n.column};if(e(l,n,!r))return{row:n.row+o,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 r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})}},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(o.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 r=e("./lib/oop"),i=e("./apply_delta").applyDelta,o=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(){r.implement(this,o),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),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},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 r=this.getLine(e);return null==t&&(t=r.length),{row:e,column:t=Math.min(Math.max(t,0),r.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),r={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},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 r=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},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,r=t<this.getLength()-1,i=n?e-1:e,o=n?this.getLine(i).length:0,a=r?t+1:t,l=r?0:this.getLine(a).length,c=new s(i,o,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):(i(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,r=n.length-t+1,i=e.start.row,o=e.start.column,s=0,a=0;s<r;s=a){a+=t-1;var l=n.slice(s,a);l.push(""),this.applyDelta({start:this.pos(i+s,o),end:this.pos(i+a,o=0),action:e.action,lines:l},!0)}e.lines=n.slice(s),e.start.row=i+s,e.start.column=o,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(),r=this.getNewLineCharacter().length,i=t||0,o=n.length;i<o;i++)if((e-=n[i].length+r)<0)return{row:i,column:e+n[i].length+r};return{row:o-1,column:e+n[o-1].length+r}},this.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,o=Math.min(e.row,n.length),s=t||0;s<o;++s)i+=n[s].length+r;return i+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 r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,o=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,r=-1,i=n.doc,o=t;n.lines[t];)t++;var s=i.getLength(),a=0;for(n.running=!1;t<s;){n.$tokenizeRow(t),r=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==r&&(r=t),o<=r&&n.fireUpdateEvent(o,r)}}};(function(){r.implement(this,i),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 r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}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],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(o.prototype),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),i=(e("./lib/oop"),e("./range").Range),o=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,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l=s;l<=a;l++){var c=this.cache[l];null==c&&((c=r.getMatchOffsets(n.getLine(l),this.regExp)).length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map((function(e){return new i(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,o)}}}).call(o.prototype),t.SearchHighlight=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range;function i(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(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 r,i,o=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==(i=(r=s[l]).range.compareStart(t,n)))return void e(null,t,n,o,a);if(!e(null,r.start.row,r.start.column,o,a)&&e(r.placeholder,r.start.row,r.start.column,o)||0===i)return;a=!r.sameRow,o=r.end.column}e(null,t,n,o,a)},this.getNextFoldTo=function(e,t){for(var n,r,i=0;i<this.folds.length;i++){if(-1==(r=(n=this.folds[i]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===r)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var r,i,o=this.getNextFoldTo(e,t);if(o)if(r=o.fold,"inside"==o.kind&&r.start.column!=t&&r.start.row!=e)window.console&&window.console.log(e,t,r);else if(r.start.row==e){var s=(i=this.folds).indexOf(r);for(0===s&&(this.start.column+=n);s<i.length;s++){if((r=i[s]).start.column+=n,!r.sameRow)return;r.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 r=n.fold,o=this.folds,s=this.foldData,a=o.indexOf(r),l=o[a-1];this.end.row=l.end.row,this.end.column=l.end.column;var c=new i(s,o=o.splice(a,o.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 r=this.foldData;r.splice(r.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 r=this.folds[n];if((e-=r.start.column-t)<0)return{row:r.start.row,column:r.start.column+e};if((e-=r.placeholder.length)<0)return r.start;t=r.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(i.prototype),t.FoldLine=i})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("./range").Range.comparePoints,i=function(){this.ranges=[],this.$bias=1};(function(){this.comparePoints=r,this.pointIndex=function(e,t,n){for(var i=this.ranges,o=n||0;o<i.length;o++){var s=i[o],a=r(e,s.end);if(!(a>0)){var l=r(e,s.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-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,i=(n=n.sort((function(e,t){return r(e.start,t.start)})))[0],o=1;o<n.length;o++){e=i,i=n[o];var s=r(e.end,i.start);s<0||(0!=s||e.isEmpty()||i.isEmpty())&&(r(e.end,i.end)<0&&(e.end.row=i.end.row,e.end.column=i.end.column),n.splice(o,1),t.push(i),i=e,o--)}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 r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);for(var o=[],s=r;s<i;s++)o.push(n[s]);return o},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,r=t.row,i=n.row,o=this.ranges,s=0,a=o.length;s<a;s++){if((u=o[s]).end.row>=r)break}if("insert"==e.action)for(var l=i-r,c=-t.column+n.column;s<a;s++){if((u=o[s]).start.row>r)break;if(u.start.row==r&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=c,u.start.row+=l)),u.end.row==r&&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==o[s+1].start.column&&(u.end.column-=c),u.end.column+=c,u.end.row+=l}}else for(l=r-i,c=t.column-n.column;s<a;s++){if((u=o[s]).start.row>i)break;u.end.row<i&&(r<u.end.row||r==u.end.row&&t.column<u.end.column)?(u.end.row=r,u.end.column=t.column):u.end.row==i?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>i&&(u.end.row+=l),u.start.row<i&&(r<u.start.row||r==u.start.row&&t.column<u.start.column)?(u.start.row=r,u.start.column=t.column):u.start.row==i?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>i&&(u.start.row+=l)}if(0!=l&&s<a)for(;s<a;s++){var u;(u=o[s]).start.row+=l,u.end.row+=l}}}).call(i.prototype),t.RangeList=i})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("../range_list").RangeList,i=e("../lib/oop"),o=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}i.inherits(o,r),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 o(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 r=e.start.row,i=e.start.column,o=0,a=-1;o<this.subFolds.length&&1==(a=this.subFolds[o].range.compare(r,i));o++);var l=this.subFolds[o],c=0;if(0==a){if(l.range.containsRange(e))return l.addSubFold(e);c=1}r=e.range.end.row,i=e.range.end.column;var u=o;for(a=-1;u<this.subFolds.length&&1==(a=this.subFolds[u].range.compare(r,i));u++);0==a&&u++;for(var h=this.subFolds.splice(o,u-o,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(o.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 r=e("../range").Range,i=e("./fold_line").FoldLine,o=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;for(var i=r.folds,o=0;o<i.length;o++){var s=i[o].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 i[o]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,r=this.$foldData,i=[];t.column+=1,n.column-=1;for(var o=0;o<r.length;o++){var s=r[o].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=r[o].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;i.push(c)}}}}return t.column-=1,n.column+=1,i},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 r=0;r<t[n].folds.length;r++)e.push(t[n].folds[r]);return e},this.getFoldStringAt=function(e,t,n,r){if(!(r=r||this.getFoldLine(e)))return null;for(var i,o,s={end:{column:0}},a=0;a<r.folds.length;a++){var l=(o=r.folds[a]).range.compareEnd(e,t);if(-1==l){i=this.getLine(o.start.row).substring(s.end.column,o.start.column);break}if(0===l)return null;s=o}return i||(i=this.getLine(o.start.row).substring(s.end.column)),-1==n?i.substring(0,t-s.end.column):1==n?i.substring(t-s.end.column):i},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r<n.length;r++){var i=n[r];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r<n.length;r++){var i=n[r];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,i=0;i<n.length;i++){var o=n[i],s=o.end.row,a=o.start.row;if(s>=t){a<t&&(a>=e?r-=t-a:r=0);break}s>=e&&(r-=a>=e?s-a:s-e+1)}return r},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,r=this.$foldData,s=!1;e instanceof o?n=e:(n=new o(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),p.forEach((function(e){n.addSubFold(e)})));for(var f=0;f<r.length;f++){var m=r[f];if(c==m.start.row){m.addFold(n),s=!0;break}if(a==m.end.row){if(m.addFold(n),s=!0,!n.sameRow){var g=r[f+1];if(g&&g.start.row==c){m.merge(g);break}}break}if(c<=m.start.row)break}return s||(m=this.$addFoldLine(new i(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(m.start.row,m.start.row):this.$updateRowLengthCache(m.start.row,m.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,r=t.end.row,i=this.$foldData,o=t.folds;if(1==o.length)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))o.pop(),t.end.row=o[o.length-1].end.row,t.end.column=o[o.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))o.shift(),t.start.row=o[0].start.row,t.start.column=o[0].start.column;else if(e.sameRow)o.splice(o.indexOf(e),1);else{var s=t.split(e.start.row,e.start.column);(o=s.folds).shift(),s.start.row=o[0].start.row,s.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r)),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,i;if(null==e?(n=new r(0,0,this.getLength(),0),t=!0):n="number"==typeof e?new r(e,0,e,this.getLine(e).length):"row"in e?r.fromPoints(e,e):e,i=this.getFoldsInRangeList(n),t)this.removeFolds(i);else for(var o=i;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(i.length)return i},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,r,i){null==r&&(r=e.start.row),null==i&&(i=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,s="";return e.walk((function(e,t,n,a){if(!(t<r)){if(t==r){if(n<i)return;a=Math.max(i,a)}s+=null!=e?e:o.getLine(t).substring(a,n)}}),t,n),s},this.getDisplayLine=function(e,t,n,r){var i,o=this.getFoldLine(e);return o?this.getFoldDisplayLine(o,e,t,n,r):(i=this.doc.getLine(e)).substring(r||0,t||i.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 i(e,n)}))},this.toggleFold=function(e){var t,n,r=this.selection.getRange();if(r.isEmpty()){var i=r.start;if(t=this.getFoldAt(i.row,i.column))return void this.expandFold(t);(n=this.findMatchingBracket(i))?1==r.comparePoint(n)?r.end=n:(r.start=n,r.start.column++,r.end.column--):(n=this.findMatchingBracket({row:i.row,column:i.column+1}))?(1==r.comparePoint(n)?r.end=n:r.start=n,r.start.column++):r=this.getCommentFoldRange(i.row,i.column)||r}else{var o=this.getFoldsInRange(r);if(e&&o.length)return void this.expandFolds(o);1==o.length&&(t=o[0])}if(t||(t=this.getFoldAt(r.start.row,r.start.column)),t&&t.range.toString()==r.toString())this.expandFold(t);else{var s="...";if(!r.isMultiLine()){if((s=this.getTextRange(r)).length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,r)}},this.getCommentFoldRange=function(e,t,n){var i=new s(this,e,t),o=i.getCurrentToken(),a=o.type;if(o&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start");var l=new RegExp(a),c=new r;if(1!=n){do{o=i.stepBackward()}while(o&&l.test(o.type));i.stepForward()}if(c.start.row=i.getCurrentTokenRow(),c.start.column=i.getCurrentTokenColumn()+2,i=new s(this,e,t),-1!=n){var u=-1;do{if(o=i.stepForward(),-1==u){var h=this.getState(i.$row);l.test(h)||(u=i.$row)}else if(i.$row>u)break}while(o&&l.test(o.type));o=i.stepBackward()}else o=i.getCurrentToken();return c.end.row=i.getCurrentTokenRow(),c.end.column=i.getCurrentTokenColumn()+o.value.length-2,c}},this.foldAll=function(e,t,n){null==n&&(n=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength();for(var i=e=e||0;i<t;i++)if(null==r[i]&&(r[i]=this.getFoldWidget(i)),"start"==r[i]){var o=this.getFoldWidgetRange(i);if(o&&o.isMultiLine()&&o.end.row<=t&&o.start.row>=e){i=o.end.row;try{var s=this.addFold("...",o);s&&(s.collapseChildren=n)}catch(e){}}}}},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 r,i=e-1;i>=0;){var o=n[i];if(null==o&&(o=n[i]=this.getFoldWidget(i)),"start"==o){var s=this.getFoldWidgetRange(i);if(r||(r=s),s&&s.end.row>=e)break}i--}return{range:-1!==i&&s,firstRange:r}},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 r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),i="end"===n?-1:1,o=this.getFoldAt(e,-1===i?0:r.length,i);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(o=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(o.range))return this.removeFold(o),o;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 r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):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 r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},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 r=e("../token_iterator").TokenIterator,i=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 r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,o=n.charAt(e.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),r=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=i.fromPoints(e,a),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=i.fromPoints(a,e),r||(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),r=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(r||(n=t.charAt(e.column),e={row:e.row,column:e.column+1},r=n&&n.match(/([\(\[\{])|([\)\]\}])/)),!r)return null;var o=new i(e.row,e.column-1,e.row,e.column),s=r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e);return s?[o,new i(s.row,s.column,s.row,s.column+1)]:[o]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],o=1,s=new r(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==i){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(o+=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 i=this.$brackets[e],o=1,s=new r(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==i){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(o+=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 i=e("./lib/oop"),o=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,m=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"==r(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)};m.$uid=0,function(){i.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,r=e.length-1;n<=r;){var i=n+r>>1,o=e[i];if(t>o)n=i+1;else{if(!(t<o))return i;r=i-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,r=this.bgTokenizer.getTokens(e),i=0;if(null==t){var o=r.length-1;i=this.getLine(e).length}else for(o=0;o<r.length&&!((i+=r[o].value.length)>=t);o++);return(n=r[o])?(n.index=o,n.start=i-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=o.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()?o.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,r){var i=this.$markerId++,o={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!r,id:i};return r?(this.$frontMarkers[i]=o,this._signal("changeFrontMarker")):(this.$backMarkers[i]=o,this._signal("changeBackMarker")),i},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,r){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var i=new h(e,0,t,1/0);return i.id=this.addMarker(i,n,"fullLine",r),i},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),r=!1;if(t>0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))i=/\s/;else i=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(i));o++}for(var s=t;s<n.length&&n.charAt(s).match(i);)s++;return new h(e,o,e,s)},this.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),r=this.getLine(n.end.row);r.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"===r(e)){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,i=n.path}else i=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new u),this.$modes[i]&&!n)return this.$onChangeMode(this.$modes[i]),void(t&&t());this.$modeId=i,a.loadModule(["mode",i],function(e){if(this.$modeId!==i)return t&&t();this.$modes[i]&&!n?this.$onChangeMode(this.$modes[i]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[i]=e,e.$id=i),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 r=e.getTokenizer();if(void 0!==r.on){var i=this.onReloadTokenizer.bind(this);r.on("update",i)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(r);else{this.bgTokenizer=new p(r);var o=this;this.bgTokenizer.on("update",(function(e){o._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,r=0,i=0,o=this.$foldData[i],s=o?o.start.row:1/0,a=t.length,l=0;l<a;l++){if(l>s){if((l=o.end.row+1)>=a)break;s=(o=this.$foldData[i++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>r&&(r=n[l])}this.screenWidth=r}},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 r=e[n];"insert"==r.action||"remove"==r.action?this.doc.revertDelta(r):r.folds&&this.addFolds(r.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 r=e[n];"insert"!=r.action&&"remove"!=r.action||this.doc.$safeApplyDelta(r)}!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 r,i,o=0;o<e.length;o++){var s=e[o];s.start&&(r?n(s)?(i=s.start,-1==r.compare(i.row,i.column)&&r.setStart(i),i=s.end,1==r.compare(i.row,i.column)&&r.setEnd(i)):(i=s.start,-1==r.compare(i.row,i.column)&&(r=h.fromPoints(s.start,s.start))):r=n(s)?h.fromPoints(s.start,s.end):h.fromPoints(s.start,s.start))}return r},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var r=this.getTextRange(e),i=this.getFoldsInRange(e),o=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)&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=c),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=c)),s&&o.start.row>=e.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,r),i.length){var a=e.start,l=o.start,c=(s=l.row-a.row,l.column-a.column);this.addFolds(i.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 o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new h(0,0,0,0),r=this.getTabSize(),i=t.start.row;i<=t.end.row;++i){var o=this.getLine(i);n.start.row=i,n.end.row=i;for(var s=0;s<r&&" "==o.charAt(s);++s);s<r&&"\t"==o.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((i=this.getRowFoldStart(e+n))<0)return 0;var r=i-e}else if(n>0){var i;if((i=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;r=i-t}else{e=this.$clipRowToDocument(e);r=(t=this.$clipRowToDocument(t))-e+1}var o=new h(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(o).map((function(e){return(e=e.clone()).start.row+=r,e.end.row+=r,e})),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+r,a),s.length&&this.addFolds(s),r},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 r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,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,r=e.start,i=e.end,o=r.row,s=i.row,a=s-o,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var u=0;if(m=this.getFoldLine(i.row)){m.addRemoveChars(i.row,i.column,r.column-i.column),m.shiftRow(-a);var h=this.getFoldLine(o);h&&h!==m&&(h.merge(m),m=h),u=c.indexOf(m)+1}for(;u<c.length;u++){(m=c[u]).start.row>=i.row&&m.shiftRow(-a)}s=o}else{var d=Array(a);d.unshift(o,0);var p=t?this.$wrapData:this.$rowLengthCache;p.splice.apply(p,d);c=this.$foldData,u=0;if(m=this.getFoldLine(o)){var f=m.range.compareInside(r.row,r.column);0==f?(m=m.split(r.row,r.column))&&(m.shiftRow(a),m.addRemoveChars(s,0,i.column-r.column)):-1==f&&(m.addRemoveChars(o,0,i.column-r.column),m.shiftRow(a)),u=c.indexOf(m)+1}for(;u<c.length;u++){var m;(m=c[u]).start.row>=o&&m.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(m=this.getFoldLine(o))&&m.addRemoveChars(o,r.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(o,s):this.$updateRowLengthCache(o,s),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,r){var i,o,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=n;for(r=Math.min(r,s.length-1);u<=r;)(o=this.getFoldLine(u,o))?(i=[],o.walk(function(n,r,o,a){var l;if(null!=n){(l=this.$getDisplayTokens(n,i.length))[0]=e;for(var c=1;c<l.length;c++)l[c]=t}else l=this.$getDisplayTokens(s[r].substring(a,o),i.length);i=i.concat(l)}.bind(this),o.end.row,s[o.end.row].length+1),l[o.start.row]=this.$computeWrapSplits(i,c,a),u=o.end.row+1):(i=this.$getDisplayTokens(s[u]),l[u]=this.$computeWrapSplits(i,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,r,i){if(0==n.length)return[];var o=[],s=n.length,a=0,l=0,c=this.$wrapAsCode,u=this.$indentedSoftWrap,h=r<=Math.max(2*i,8)||!1===u?0:Math.floor(r/2);function d(e){for(var t=e-a,r=a;r<e;r++){var s=n[r];12!==s&&2!==s||(t-=1)}o.length||(p=function(){var e=0;if(0===h)return e;if(u)for(var t=0;t<n.length;t++){var r=n[t];if(10==r)e+=1;else{if(11!=r){if(12==r)continue;break}e+=i}}return c&&!1!==u&&(e+=i),Math.min(e,h)}(),o.indent=p),l+=t,o.push(l),a=e}for(var p=0;s-a>r-p;){var f=a+r-p;if(n[f-1]>=10&&n[f]>=10)d(f);else if(n[f]!=e&&n[f]!=t){for(var m=Math.max(f-(r-(r>>2)),a-1);f>m&&n[f]<e;)f--;if(c){for(;f>m&&n[f]<e;)f--;for(;f>m&&9==n[f];)f--}else for(;f>m&&n[f]<10;)f--;f>m?d(++f):(2==n[f=a+r]&&f--,d(f-p))}else{for(;f!=a-1&&n[f]!=e;f--);if(f>a){d(f);continue}for(f=a+r;f<n.length&&n[f]==t;f++);if(f==n.length)break;d(f)}}return o},this.$getDisplayTokens=function(e,t){var r,i=[];t=t||0;for(var o=0;o<e.length;o++){var s=e.charCodeAt(o);if(9==s){r=this.getScreenTabSize(i.length+t),i.push(11);for(var a=1;a<r;a++)i.push(12)}else 32==s?i.push(10):s>39&&s<48||s>57&&s<64?i.push(9):s>=4352&&n(s)?i.push(1,2):i.push(1)}return i},this.$getStringScreenWidth=function(e,t,r){if(0==t)return[0,0];var i,o;for(null==t&&(t=1/0),r=r||0,o=0;o<e.length&&(9==(i=e.charCodeAt(o))?r+=this.getScreenTabSize(r):i>=4352&&n(i)?r+=2:r+=1,!(r>t));o++);return[r,o]},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 r,i,o=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],o=this.$docRowCache[u];var d=e>c[h-1]}else d=!h;for(var p=this.getLength()-1,f=this.getNextFoldLine(o),m=f?f.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(o))>e||o>=p);)a+=l,++o>m&&(o=f.end.row+1,m=(f=this.getNextFoldLine(o,f))?f.start.row:1/0),d&&(this.$docRowCache.push(o),this.$screenRowCache.push(a));if(f&&f.start.row<=o)r=this.getFoldDisplayLine(f),o=f.start.row;else{if(a+l<=e||o>p)return{row:p,column:this.getLine(p).length};r=this.getLine(o),f=null}var g=0,v=Math.floor(e-a);if(this.$useWrapMode){var b=this.$wrapData[o];b&&(i=b[v],v>0&&b.length&&(g=b.indent,s=b[v-1]||b[b.length-1],r=r.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,o,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(r,t-g)[1],this.$useWrapMode&&s>=i&&(s=i-1),f?f.idxToPosition(s):{row:o,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 r,i=0,o=null;(r=this.getFoldAt(e,t,1))&&(e=r.start.row,t=r.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){a=l[c],i=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;i+=this.getRowLength(a),a=s,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(i))}var f="";d&&a>=p?(f=this.getFoldDisplayLine(d,e,t),o=d.start.row):(f=this.getLine(e).substring(0,t),o=e);var m=0;if(this.$useWrapMode){var g=this.$wrapData[o];if(g){for(var v=0;f.length>=g[v];)i++,v++;f=f.substring(g[v-1]||0,f.length),m=v>0?g.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(i+=this.lineWidgets[a].rowsAbove),{row:i,column:m+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,r=0,i=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);r<n;){var o=this.$wrapData[r];e+=o?o.length+1:1,++r>i&&(r=t.end.row+1,i=(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,r){if(0===n)return[0,0];var i,o;for(n||(n=1/0),r=r||0,o=0;o<t.length&&!((r+="\t"===(i=t.charAt(o))?this.getScreenTabSize(r):e.getCharacterWidth(i))>n);o++);return[r,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.selection.detach()},this.isFullWidth=n}.call(m.prototype),e("./edit_session/folding").Folding.call(m.prototype),e("./edit_session/bracket_match").BracketMatch.call(m.prototype),a.defineOptions(m.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=m})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),i=e("./lib/oop"),o=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return i.mixin(this.$options,e),this},this.getOptions=function(){return r.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 r=null;return n.forEach((function(e,n,i,s){return r=new o(e,n,i,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start))||(r=null,!1)})),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=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=i.length-c;e:for(var h=a.offset||0;h<=u;h++){for(var d=0;d<c;d++)if(-1==i[h+d].search(a[d]))continue e;var p=i[h],f=i[h+c-1],m=p.length-p.match(a[0])[0].length,g=f.match(a[c-1])[0].length;l&&l.end.row===h&&l.end.column>m||(s.push(l=new o(h,m,h+c-1,g)),c>2&&(h=h+c-2))}}else for(var v=0;v<i.length;v++){var b=r.getMatchOffsets(i[v],a);for(d=0;d<b.length;d++){var y=b[d];s.push(new o(v,y.offset,v,y.offset+y.length))}}if(n){var w=n.start.column,k=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>k&&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,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(r){var i=r.exec(e);if(!i||i[0].length!=e.length)return null;if(t=e.replace(r,t),n.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var s=e[o];s&&s.toLowerCase()!=s?t[o]=t[o].toUpperCase():t[o]=t[o].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=r.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 i=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,i);try{var o=new RegExp(n,i)}catch(e){o=!1}return e.re=o},this.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),r=[],i=0;i<n.length;i++)try{r.push(new RegExp(n[i],t))}catch(e){return!1}return r},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var r=1==t.backwards,i=0!=t.skipCurrent,o=t.range,s=t.start;s||(s=o?o[r?"end":"start"]:e.selection.getRange()),s.start&&(s=s[i!=r?"end":"start"]);var a=o?o.start.row:0,l=o?o.end.row:e.getLength()-1;if(r)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,i,o){var s=r?t-u+1:t;if(!(s<0)){var a=e.getLine(s),l=a.search(n[0]);if(!(!r&&l<i||-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(!(r&&h>i))return!!o(s,l,s+u-1,h)||void 0}}};else if(r)h=function(t,r,i){var o,s=e.getLine(t),a=[],l=0;for(n.lastIndex=0;o=n.exec(s);){var c=o[0].length;if(l=o.index,!c){if(l>=s.length)break;n.lastIndex=l+=1}if(o.index+c>r)break;a.push(o.index,c)}for(var u=a.length-1;u>=0;u-=2){var h=a[u-1];if(i(t,h,t,h+(c=a[u])))return!0}};else h=function(t,r,i){var o,s,a=e.getLine(t);for(n.lastIndex=r;s=n.exec(a);){var l=s[0].length;if(i(t,o=s.index,t,o+l))return!0;if(!l&&(n.lastIndex=o+=1,o>=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 i=e("../lib/keys"),o=e("../lib/useragent"),s=i.KEY_MODS;function a(e,t){this.platform=t||(o.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"==r(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 r=this.commandKeyBinding;for(var i in r){var o=r[i];if(o==e)delete r[i];else if(Array.isArray(o)){var s=o.indexOf(e);-1!=s&&(o.splice(s,1),1==o.length&&(r[i]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==r(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 r="";if(-1!=e.indexOf(" ")){var i=e.split(/\s+/);e=i.pop(),i.forEach((function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")}),this),r+=" "}var o=this.parseKeys(e),a=s[o.hashId]+o.key;this._addCommandToBinding(r+a,t,n)}),this)},this._addCommandToBinding=function(t,n,r){var i,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(i=o[t].indexOf(n))&&o[t].splice(i,1):o[t]=[o[t]],"number"!=typeof r&&(r=e(n));var s=o[t];for(i=0;i<s.length;i++){if(e(s[i])>r)break}s.splice(i,0,n)}else delete o[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"===r(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(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].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 o=0,s=t.length;s--;){var a=i.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:n,hashId:o}},this.findKeyCommand=function(e,t){var n=s[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,r){if(!(r<0)){var i=s[t]+n,o=this.commandKeyBinding[i];return e.$keyChain&&(e.$keyChain+=" "+i,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-i.length-1)),{command:o}):(e.$keyChain=e.$keyChain||i,{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 r=e("../lib/oop"),i=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,s=function(e,t){i.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};r.inherits(s,i),function(){r.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],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 i={editor:t,command:e,args:n};return i.returnValue=this._emit("exec",i),this._signal("afterExec",i),!1!==i.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 r=e("../lib/lang"),i=e("../config"),o=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",bindKey:s("Alt-E","F4"),exec:function(e){i.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){i.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:"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){i.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){i.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(r.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(),i=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<=i.row+1;c++){var u=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}i.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new o(n.row,0,i.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,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var s=0;s<r.length;s++)s==r.length-1&&(r[s].end.row===t&&r[s].end.column===n||i.push(new o(r[s].end.row,r[s].end.column,t,n))),0===s?0===r[s].start.row&&0===r[s].start.column||i.push(new o(0,0,r[s].start.row,r[s].start.column)):i.push(new o(r[s-1].end.row,r[s-1].end.column,r[s].start.row,r[s].start.column));e.exitMultiSelectMode(),e.clearSelection();for(s=0;s<i.length;s++)e.selection.addRange(i[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}]})),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 i=e("./lib/oop"),o=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,m=e("./lib/event_emitter").EventEmitter,g=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,b=e("./config"),y=e("./token_iterator").TokenIterator,w=e("./clipboard"),k=function e(t,n,i){this.$toDestroy=[];var o=t.getContainerElement();this.container=o,this.renderer=t,this.id="editor"+ ++e.$uid,this.commands=new g(a.isMac?"mac":"win",v),"object"==("undefined"==typeof document?"undefined":r(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||i&&i.session||new d("")),b.resetOptions(this),i&&this.setOptions(i),b._signal("editor",this)};k.$uid=0,function(){i.implement(this,m),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 r=this.selection.getRange(),i=this.renderer.layerConfig;(r.start.row>=i.lastRow||r.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var o=this.selection.toJSON();this.curOp.selectionAfter=o,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(o),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,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var i=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?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(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.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")||o.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 r="ace_bracket";Array.isArray(n)?1==n.length&&(r="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,r,"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(),r=new y(e.session,n.row,n.column),i=r.getCurrentToken();if(!i||!/\b(?:tag-open|tag-name)/.test(i.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==i.type.indexOf("tag-open")||(i=r.stepForward())){var o=i.value,s=0,a=r.stepBackward();if("<"==a.value)do{a=i,(i=r.stepForward())&&i.value===o&&-1!==i.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--)}while(i&&s>=0);else{do{i=a,a=r.stepBackward(),i&&i.value===o&&-1!==i.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--)}while(a&&s<=0);r.stepForward()}if(!i)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var l=r.getCurrentTokenRow(),c=r.getCurrentTokenColumn(),u=new f(l,c,l,c+i.value.length),h=t.$backMarkers[t.$tagHighlight];t.$tagHighlight&&null!=h&&0!==u.compareRange(h.range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),t.$tagHighlight||(t.$tagHighlight=t.addMarker(u,"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(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,r=t.end.column,i=e.getLine(t.start.row),o=i.substring(n,r);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),a=i.substring(n-1,r+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 r=this.selection.getAllRanges(),i=0;i<r.length;i++){var o=r[i];i&&r[i-1].start.row==o.start.row||(e+=this.session.getLine(o.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,r=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?r.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(n)this.selection.rangeList.ranges.forEach((function(e){r.insert({row:e.start.row,column:0},t)}));else{var i=t.split(/\r\n|\r|\n/),o=this.selection.rangeList.ranges,s=!(2!=i.length||i[0]&&i[1]);if(i.length!=o.length||s)return this.commands.exec("insertstring",this,t);for(var a=o.length;a--;){var l=o[a];l.isEmpty()||r.remove(l),r.insert(l.start,i[a])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,r=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=r.transformAction(n.getState(i.row),"insertion",this,n,e);o&&(e!==o.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){(s=new f.fromPoints(i,i)).end.column+=e.length,this.session.remove(s)}}else{var s=this.getSelectionRange();i=this.session.remove(s),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=n.getLine(i.row);if(i.column>a.search(/\S|$/)){var l=a.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+l)}}this.clearSelection();var c=i.column,u=n.getState(i.row),h=(a=n.getLine(i.row),r.checkOutdent(u,a,e));if(n.insert(i,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new f(i.row,c+o.selection[0],i.row,c+o.selection[1])):this.selection.setSelectionRange(new f(i.row+o.selection[0],o.selection[1],i.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var d=r.getNextLineIndent(u,a.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},d)}h&&r.autoOutdent(u,n,i.row)}},this.autoIndent=function(){var e,t,n=this.session,r=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var i=this.getSelectionRange();e=i.start.row,t=i.end.row}for(var o,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=r.getNextLineIndent(l,c,h)),o=n.getLine(d),u!==(s=r.$getIndent(o))&&(s.length>0&&(a=new f(d,0,d,s.length),n.remove(a)),u.length>0&&n.insert({row:d,column:0},u)),r.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,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}i&&(t=i)}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,r,i=this.session.getLine(e.row);t<i.length?(n=i.charAt(t)+i.charAt(t-1),r=new f(e.row,t-1,e.row,t+1)):(n=i.charAt(t-1)+i.charAt(t-2),r=new f(e.row,t-2,e.row,t)),this.session.replace(r,n),this.session.selection.moveToPosition(r.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 r=e.getLine(t.start.row),i=t.start,o=e.getTabSize(),a=e.documentToScreenColumn(i.row,i.column);if(this.session.getUseSoftTabs())var l=o-a%o,c=s.stringRepeat(" ",l);else{for(l=a%o;" "==r[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=[],r=e.first;r<=e.last;r++)n.push(t.getLine(r));n.sort((function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0}));var i=new f(0,0,0,0);for(r=e.first;r<=e.last;r++){var o=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=o.length,t.replace(i,n[r-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 r=this.session.getLine(e);n.lastIndex<t;){var i=n.exec(r);if(i.index<=t&&i.index+i[0].length>=t)return{value:i[0],start:i.index,end:i.index+i[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new f(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var o=this.getNumberAt(t,n);if(o){var s=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-s,l=parseFloat(o.value);l*=Math.pow(10,a),s!==o.end&&n<s?e*=Math.pow(10,o.end-n-1):e*=Math.pow(10,o.end-n),l+=e;var c=(l/=Math.pow(10,a)).toFixed(a),u=new f(t,o.start,t,o.end);this.session.replace(u,c),this.moveCursorTo(t,Math.max(o.start+1,n+c.length-o.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(),r=this.selection.getWordRange().start.column,i=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),o=t-r-1;o<0&&(o=0);var a=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&i.forEach((function(t,i){l=a+t.length,o>=a&&o<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,a+r),c.selection.selectTo(e,l+r)),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 m=+!f,g=n.match(new RegExp("^\\s?_?("+s.escapeRegExp(p[f])+")\\s?$","i"));if(g)n.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(g[1])+")($|\\s)","g"))&&(u=n.replace(new RegExp(s.escapeRegExp(p[f]),"i"),(function(e){var t=p[m];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+p[m].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(),r=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var o=r?n.start:n.end,s=t.insert(o,t.getTextRange(n),!1);n.start=o,n.end=s,e.setSelectionRange(n,r)}},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,r,i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var o=i.toOrientedRange();n=this.$getSelectedRows(o),r=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(r=0),o.moveBy(r,0),i.fromOrientedRange(o)}else{var s=i.rangeList.ranges;i.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}i.fromOrientedRange(i.ranges[0]),i.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,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(i,0)})):!1===t&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,i*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},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,r){this.renderer.scrollToLine(e,t,n,r)},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(),r=new y(this.session,n.row,n.column),i=r.getCurrentToken(),o=i||r.stepForward();if(o){var s,a,l=!1,c={},u=n.column-o.start,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;u<o.value.length&&!l;u++)if(h[o.value[u]])switch(a=h[o.value[u]]+"."+o.type.replace("rparen","lparen"),isNaN(c[a])&&(c[a]=0),o.value[u]){case"(":case"[":case"{":c[a]++;break;case")":case"]":case"}":c[a]--,-1===c[a]&&(s="bracket",l=!0)}}else-1!==o.type.indexOf("tag-name")&&(isNaN(c[o.value])&&(c[o.value]=0),"<"===i.value?c[o.value]++:"</"===i.value&&c[o.value]--,-1===c[o.value]&&(s="tag",l=!0));l||(i=o,o=r.stepForward(),u=0)}while(o&&!l);if(s){var d,p;if("bracket"===s)(d=this.session.getBracketRange(n))||(p=(d=new f(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+u-1,r.getCurrentTokenRow(),r.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(!o||-1===o.type.indexOf("tag-name"))return;var m=o.value;if(0===(d=new f(r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2,r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2)).compare(n.row,n.column)){l=!1;do{o=i,(i=r.stepBackward())&&(-1!==i.type.indexOf("tag-close")&&d.setEnd(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+1),o.value===m&&-1!==o.type.indexOf("tag-name")&&("<"===i.value?c[m]++:"</"===i.value&&c[m]--,0===c[m]&&(l=!0)))}while(i&&!l)}o&&o.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),r=0;return n?(this.$tryReplace(n,e)&&(r=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),r):r},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;var i=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=n.length-1;o>=0;--o)this.$tryReplace(n[o],e)&&r++;return this.selection.setSelectionRange(i),r},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"==r(e)&&i.mixin(t,e);var o=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(o)||this.$search.$options.needle)||(o=this.session.getWordRange(o.start.row,o.start.column),e=this.session.getTextRange(o)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:o});var s=this.$search.find(this.session);return t.preventScroll?s:s?(this.revealRange(s,n),s):(t.backwards?o.start=o.end:o.end=o.start,void this.selection.setRange(o))},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.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,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var o=this.on("changeSelection",(function(){r=!0})),s=this.renderer.on("beforeRender",(function(){r&&(t=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=o.top-s.offset;null!=(r=o.top>=0&&a+t.top<0||!(o.top<s.height&&o.top+t.top+s.lineHeight>window.innerHeight)&&null)&&(i.style.top=a+"px",i.style.left=o.left+"px",i.style.height=s.lineHeight+"px",i.scrollIntoView(r)),r=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),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,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var r=this;b.loadModule("./ext/prompt",(function(i){i.prompt(r,e,t,n)}))}}.call(k.prototype),b.defineOptions(k.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?x.attach(this):x.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?x.attach(this):x.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),o.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),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.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 x={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=k})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=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,r=n.length;r--;){var i=n[r][0];if(i.id<=e)break;i.id<t&&(i.ignore=!0)}this.lastDeltas=null},this.getSelection=function(e,t){for(var n=this.selections,r=n.length;r--;){var i=n[r];if(i.rev<e)return t&&(i=n[r+1]),i}},this.getRevision=function(){return this.$rev},this.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,r=null,i=0,o=n.length;o--;){var s=n[o][0];if(s.id<t&&!r&&(r=o+1),s.id<=e){i=o+1;break}}return n.slice(i,r)},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 r=e[n];if(r&&!r[0].ignore){for(;n<t-1;){var i=u(e[n],e[n+1]);e[n]=i[0],e[n+1]=i[1],n++}return!0}}}(n,n.length)){e||(e=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var r=n.pop(),i=null;return r&&(i=e.undoChanges(r,t),this.$redoStack.push(r),this.$syncRev()),this.$fromUndo=!1,i}},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 r=t[n],i=0;i<r.length;i++)m(e,r[i])}(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach((function(e){e[0].id=++this.$maxRev}),this)}var r=this.$redoStack.pop(),i=null;return r&&(i=e.redoChanges(r,t),this.$undoStack.push(r),this.$syncRev()),this.$fromUndo=!1,i},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(r.prototype);var i=e("./range").Range,o=i.comparePoints;i.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,r="insert"==t.action;if(n&&r)if(o(t.start,e.end)>=0)d(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;d(e,t,1)}else if(n&&!r)if(o(t.start,e.end)>=0)d(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;d(e,t,-1)}else if(!n&&r)if(o(t.start,e.start)>=0)d(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;d(e,t,1)}else if(!n&&!r)if(o(t.start,e.start)>=0)d(t,e,1);else{if(!(o(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 r=0;r<t.length;r++)if(!c(e[n],t[r])){for(;n<e.length;){for(;r--;)c(t[r],e[n]);r=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,r="insert"==t.action;if(n&&r)o(e.start,t.start)<0?d(t,e,1):d(e,t,1);else if(n&&!r)o(e.start,t.end)>=0?d(e,t,-1):(o(e.start,t.start)<=0||d(e,i.fromPoints(t.start,e.start),-1),d(t,e,1));else if(!n&&r)o(t.start,e.end)>=0?d(t,e,-1):(o(t.start,e.start)<=0||d(t,i.fromPoints(e.start,t.start),-1),d(e,t,1));else if(!n&&!r)if(o(t.start,e.end)>=0)d(t,e,-1);else{var s,a;if(!(o(t.end,e.start)<=0))return o(e.start,t.start)<0&&(s=e,e=f(e,t.start)),o(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,r){e.row==(1==r?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)}function f(e,t){var n=e.lines,r=e.end;e.end=s(t);var i=e.end.row-e.start.row,o=n.splice(i,n.length),a=i?t.column:t.column-e.start.column;return n.push(o[0].substring(0,a)),o[0]=o[0].substr(a),{start:s(t),end:r,lines:o,action:e.action}}function m(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 r=e[n],i=0;i<r.length;i++){var o=h(r[i],t);t=o[0],2!=o.length&&(o[2]?(r.splice(i+1,1,o[1],o[2]),i++):o[1]||(r.splice(i,1),i--))}r.length||e.splice(n,1)}return e}t.UndoManager=r})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../lib/dom"),i=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){r.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 r=t.firstRowScreen*t.lineHeight,i=Math.floor(r/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-i*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=r.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=r.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,i){var o=this.cellCache.pop();if(!o){var s=r.createElement("div");i&&i(s),this.element.appendChild(s),o={element:s,text:"",row:e}}return o.row=e,o}}).call(i.prototype),t.Lines=i})),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 r=e("../lib/dom"),i=e("../lib/oop"),o=e("../lib/lang"),s=e("../lib/event_emitter").EventEmitter,a=e("./lines").Lines,l=function(e){this.element=r.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=r.createElement("span");return e.appendChild(n),e}(function(){i.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],r=n.row,i=this.$annotations[r];i||(i=this.$annotations[r]={text:[]});var s=n.text;s=s?o.escapeHTML(s):n.html||"",-1===i.text.indexOf(s)&&i.text.push(s);var a=n.type;"error"==a?i.className=" ace_error":"warning"==a&&" ace_error"!=i.className?i.className=" ace_warning":"info"!=a||i.className||(i.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 r=new Array(n+1);r.unshift(t,1),this.$annotations.splice.apply(this.$annotations,r)}}},this.update=function(e){this.config=e;var t=this.session,n=e.firstRow,r=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=r,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var i=t.getNextFoldLine(n),o=i?i.start.row:1/0,s=null,a=-1,l=n;;){if(l>o&&(l=i.end.row+1,o=(i=t.getNextFoldLine(l,i))?i.start.row:1/0),l>r){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,i,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,i=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(i=t.getLength()+r-1);var o=n?n.getWidth(t,i,e):i.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();(o+=s.left+s.right)===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},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 r=t[n];if(r.row>=this.$cursorRow){if(r.row>this.$cursorRow){var i=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&i&&i.start.row==t[n-1].row))break;r=t[n-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;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),r=this.oldLastRow;if(this.oldLastRow=n,!t||r<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(r>n)for(i=this.session.getFoldedRowCount(n+1,r);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n>r&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var r=[],i=t,o=this.session.getNextFoldLine(i),s=o?o.start.row:1/0;i>s&&(i=o.end.row+1,s=(o=this.session.getNextFoldLine(i,o))?o.start.row:1/0),!(i>n);){var a=this.$lines.createCell(i,e,this.session,c);this.$renderCell(a,e,o,i),r.push(a),i++}return r},this.$renderCell=function(e,t,n,i){var o=e.element,s=this.session,a=o.childNodes[0],l=o.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,m="ace_gutter-cell ";if(this.$highlightGutterLine&&(i==this.$cursorRow||n&&i<this.$cursorRow&&i>=f&&this.$cursorRow<=n.end.row)&&(m+="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[i]&&(m+=u[i]),h[i]&&(m+=h[i]),this.$annotations[i]&&(m+=this.$annotations[i].className),o.className!=m&&(o.className=m),p){var g=p[i];null==g&&(g=p[i]=s.getFoldWidget(i))}if(g){m="ace_fold-widget ace_"+g;"start"==g&&i==f&&i<n.end.row?m+=" ace_closed":m+=" ace_open",l.className!=m&&(l.className=m);var v=t.lineHeight+"px";r.setStyle(l.style,"height",v),r.setStyle(l.style,"display","inline-block")}else l&&r.setStyle(l.style,"display","none");var b=(d?d.getText(s,i):i+c).toString();return b!==a.data&&(a.data=b),r.setStyle(e.element.style,"height",this.$lines.computeLineHeight(i,t,s)+"px"),r.setStyle(e.element.style,"top",this.$lines.computeLineTop(i,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?r.addCssClass(this.element,"ace_folding-enabled"):r.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=r.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 r=e("../range").Range,i=e("../lib/dom"),o=function(e){this.element=i.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 r=this.markers[n];if(r.range){var i=r.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),r.renderer){var o=this.$getTop(i.start.row,e),s=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,s,o,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,i,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?"text"==r.type?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start ace_br15",e)}else r.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,i,o){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 r(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)),i,c==l?0:1,o)},this.drawMultiLineMarker=function(e,t,n,r,i){var o=this.$padding,s=r.lineHeight,a=this.$getTop(t.start.row,r),l=o+t.start.column*r.characterWidth;(i=i||"",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",r,null,i)):this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(i||""));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",r,null,i)}else{a=this.$getTop(t.end.row,r);var u=t.end.column*r.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+u+"px;top:"+a+"px;left:"+o+"px;"+(i||""))}if(!((s=(t.end.row-t.start.row-1)*r.lineHeight)<=0)){a=this.$getTop(t.start.row+1,r);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:"+o+"px;"+(i||""))}},this.drawSingleLineMarker=function(e,t,n,r,i,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,i,o);var s=r.lineHeight,a=(t.end.column+(i||0)-t.start.column)*r.characterWidth,l=this.$getTop(t.start.row,r),c=this.$padding+t.start.column*r.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(o||""))},this.drawBidiSingleLineMarker=function(e,t,n,r,i,o){var s=r.lineHeight,a=this.$getTop(t.start.row,r),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+(i||0)+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(o||""))}),this)},this.drawFullLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),s=r.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,r)-o),this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(i||""))},this.drawScreenLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),s=r.lineHeight;this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(i||""))}}).call(o.prototype),t.Marker=o})),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 r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),s=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=function(e){this.dom=i,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(){r.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)(r=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",r.textContent=o.stringRepeat(this.TAB_CHAR,n),t.push(r);else t.push(this.dom.createTextNode(o.stringRepeat(" ",n),this.element))}if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r,i=this.showSpaces?" ace_invisible ace_invisible_space":"",s=this.showSpaces?o.stringRepeat(this.SPACE_CHAR,this.tabSize):o.stringRepeat(" ",this.tabSize),a=this.showTabs?" ace_invisible ace_invisible_tab":"",l=this.showTabs?o.stringRepeat(this.TAB_CHAR,this.tabSize):s;(r=this.dom.createElement("span")).className="ace_indent-guide"+i,r.textContent=s,this.$tabStrings[" "]=r,(r=this.dom.createElement("span")).className="ace_indent-guide"+a,r.textContent=l,this.$tabStrings["\t"]=r}},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 r=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),o=this.element.childNodes,s=0,a=e.firstRow;a<r;a++){if(l=this.session.getFoldLine(a)){if(l.containsRow(r)){r=l.start.row;break}a=l.end.row}s++}for(var l,c=!1,u=(a=r,(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>i);){var h=o[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,r=t?t.lastRow:-1;if(!t||r<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 i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(t.lastRow>e.lastRow)for(i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)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 r=[],o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;o>a&&(o=s.end.row+1,a=(s=this.session.getNextFoldLine(o,s))?s.start.row:1/0),!(o>n);){var l=this.$lines.createCell(o,e,this.session),c=l.element;this.dom.removeChildren(c),i.setStyle(c.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),i.setStyle(c.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(c,o,o==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",r.push(l),o++}return r},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){for(var i,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;i=s.exec(r);){var c=i[1],u=i[2],h=i[3],d=i[4],p=i[5];if(this.showSpaces||!u){var f=l!=i.index?r.slice(l,i.index):"";if(l=i.index+i[0].length,f&&a.appendChild(this.dom.createTextNode(f,this.element)),c){var m=this.session.getScreenTabSize(t+i.index);a.appendChild(this.$tabStrings[m].cloneNode(!0)),t+=m-1}else if(u){if(this.showSpaces)(v=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",v.textContent=o.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=o.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?r.slice(l):r,this.element)),this.$textToken[n.type])e.appendChild(a);else{var g="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=g,v.appendChild(a),e.appendChild(v)}return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(" "==t[0]){for(var i=(r-=r%this.tabSize)/this.tabSize,o=0;o<i;o++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return t.substr(r)}if("\t"==t[0]){for(o=0;o<r;o++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0));return t.substr(r)}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 r=0,i=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(r=h.length,!(h=this.renderIndentGuide(l,h,s)))continue;r-=h.length}if(r+h.length<s)a=this.$renderToken(l,a,u,h),r+=h.length;else{for(;r+h.length>=s;)a=this.$renderToken(l,a,u,h.substring(0,s-r)),h=h.substring(s-r),r=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat(" ",n.indent),this.element)),a=0,s=n[++i]||Number.MAX_VALUE;0!=h.length&&(r+=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,r=t[0],i=r.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(n=this.$renderToken(e,n,r,i));for(var o=1;o<t.length;o++){if(n+(i=(r=t[o]).value).length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,r,i);n=this.$renderToken(e,n,r,i)}},this.$renderOverflowMessage=function(e,t,n,r,i){n&&this.$renderToken(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=i?"<hide>":"<click to see more...>",e.appendChild(o)},this.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else r=this.session.getTokens(t);var i=e;if(r.length){var o=this.session.getRowSplitData(t);if(o&&o.length){this.$renderWrappedLine(e,r,o);i=e.lastChild}else{i=e;this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i)),this.$renderSimpleLine(i,r)}}else this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i));if(this.showEOL&&i){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,i.appendChild(s)}},this.$getFoldLineTokens=function(e,t){var n=this.session,r=[];var i=n.getTokens(e);return t.walk((function(e,t,o,s,a){null!=e?r.push({type:"fold",value:e}):(a&&(i=n.getTokens(t)),i.length&&function(e,t,n){for(var i=0,o=0;o+e[i].value.length<t;)if(o+=e[i].value.length,++i==e.length)return;for(o!=t&&((s=e[i].value.substring(t-o)).length>n-t&&(s=s.substring(0,n-t)),r.push({type:e[i].type,value:s}),o=t+s.length,i+=1);o<n&&i<e.length;){var s;(s=e[i].value).length+o>n?r.push({type:e[i].type,value:s.substring(0,n-o)}):r.push(e[i]),o+=s.length,i+=1}}(i,s,o))}),t.end.row,this.session.getLine(t.end.row).length),r},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 r=e("../lib/dom"),i=function(e){this.element=r.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(),r.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--;)r.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(){r.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){r.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,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=r.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,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.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&&r.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)),r.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,i=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);n=0;for(var o=t.length;n<o;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[i++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,e,t[n],this.session):this.isCursorInView(s,e)?(r.setStyle(l,"display","block"),r.translate(a,s.left,s.top),r.setStyle(l,"width",Math.round(e.characterWidth)+"px"),r.setStyle(l,"height",e.lineHeight+"px")):r.setStyle(l,"display","none")}}for(;this.cursors.length>i;)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?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(i.prototype),t.Cursor=i})),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 r=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,a=function(e){this.element=i.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=i.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,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){r.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=i.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};r.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"};r.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 r=e("./lib/event"),i=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&&(r.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&&(r.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(i.prototype),t.RenderLoop=i})),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 r=e("../lib/oop"),i=e("../lib/dom"),o=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=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",256),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()};(function(){r.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=o.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?(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=i.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},this.transformCoordinates=function(e,t){e&&(e=o(1/this.$getZoom(this.el),e));function n(e,t,n){var r=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/r,(+e[1]*n[0]-e[0]*n[1])/r]}function r(e,t){return[e[0]-t[0],e[1]-t[1]]}function i(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(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(r(h,l),r(h,c),r(i(l,c),i(h,a))),p=o(1+d[0],r(l,a)),f=o(1+d[1],r(c,a));if(t){var m=t,g=d[0]*m[0]/u+d[1]*m[1]/u+1,v=i(o(m[0],p),o(m[1],f));return i(o(1/g/u,v),a)}var b=r(e,a),y=n(r(p,o(d[0],b)),r(f,o(d[1],b)),b);return o(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 r=e("./lib/oop"),i=e("./lib/dom"),o=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,m='.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;}',g=e("./lib/useragent"),v=g.isIE;i.importCssString(m,"ace_editor.css");var b=function(e,t){var n=this;this.container=e||i.createElement("div"),i.addCssClass(this.container,"ace_editor"),i.HI_DPI&&i.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.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 r=this.$textLayer=new l(this.content);this.canvas=r.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=!g.isIOS,this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._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,r.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(),i.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,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var o=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var o=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(r&&(e||s.height!=r)&&(s.height=r,o|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(e||s.width!=n)){o|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,i.setStyle(this.scrollBarH.element.style,"left",t+"px"),i.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),i.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";i.setStyle(this.scrollBarH.element.style,"right",l),i.setStyle(this.scroller.style,"right",l),i.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return s.$dirty=!n||!r,o&&this._signal("resize",a),o},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=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.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 r=this.layerConfig,o=n.top,s=n.left;o-=r.offset;var a=t&&t.useTextareaForIME?this.lineHeight:v?0:1;if(o<0||o>r.height-a)i.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 o+=this.lineHeight+2;else o+=this.lineHeight;(s-=this.scrollLeft)>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,i.setStyle(e,"height",a+"px"),i.setStyle(e,"width",l+"px"),i.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(o,c))}}}else i.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,r){var i=this.scrollMargin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},this.setMargin=function(e,t,n,r){var i=this.margin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.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 r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),i.translate(this.content,-this.scrollLeft,-n.offset);var o=n.width+2*this.$padding+"px",s=n.minHeight+"px";i.setStyle(this.content.style,"width",o),i.setStyle(this.content.style,"height",s)}if(e&this.CHANGE_H_SCROLL&&(i.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 r=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength()*this.lineHeight,i=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-i-2*this.$padding<0),s=this.$horizScroll!==o;s&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));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;r+=c;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,r-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,i+2*this.$padding-t.scrollerWidth+u.right)));var h=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-r+c<0||this.scrollTop>u.top),d=a!==h;d&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var p,f,m=this.scrollTop%this.lineHeight,g=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),b=v+g,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,m=this.scrollTop-p*y;var k=0;return(this.layerConfig.width!=i||s)&&(k=this.CHANGE_H_SCROLL),(s||d)&&(k|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(i=this.$getLongestLine())),this.layerConfig={width:i,padding:this.$padding,firstRow:v,firstRowScreen:p,lastRow:b,lineHeight:y,characterWidth:this.characterWidth,minHeight:l,maxHeight:r,offset:m,gutterOffset:y?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(i-this.$padding),k},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 r=this.$cursorLayer.getPixelPosition(e),i=r.left,o=r.top,s=n&&n.top||0,a=n&&n.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(t&&l+s>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a<o+this.lineHeight&&(t&&l+this.$size.scrollerHeight-a<o-this.lineHeight&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight+a-this.$size.scrollerHeight));var c=this.scrollLeft;c>i?(i<this.$padding+2*this.layerConfig.characterWidth&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):c+this.$size.scrollerWidth<i+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&i-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),r=this.$size.scrollerHeight-this.lineHeight,i=n.top-r*(t||0);return this.session.setScrollTop(i),i},this.STEPS=8,this.$calcSteps=function(e,t){var n,r,i=0,o=this.STEPS,s=[];for(i=0;i<o;++i)s.push((n=i/this.STEPS,r=e,(t-e)*(Math.pow(n-1,3)+1)+r));return s},this.scrollToLine=function(e,t,n,r){var i=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(i-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(i),!1!==n&&this.animateScrolling(o,r)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var r=this;if(e!=n){if(this.$scrollAnimation){var i=this.$scrollAnimation.steps;if(i.length&&(e=i[0])==n)return}var o=r.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:o},clearInterval(this.$timer),r.session.setScrollTop(o.shift()),r.session.$scrollTop=n,this.$timer=setInterval((function(){if(!r.session)return clearInterval(r.$timer);o.length?(r.session.setScrollTop(o.shift()),r.session.$scrollTop=n):null!=n?(r.session.$scrollTop=-1,r.session.setScrollTop(n),n=null):(r.$timer=clearInterval(r.$timer),r.$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 r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,o=i/this.characterWidth,s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(o):Math.round(o);return{row:s,column:a,side:o-a>0?1:-1,offsetX:i}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,o=i/this.characterWidth,s=this.$blockCursor?Math.floor(o):Math.round(o),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),i)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),o=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){i.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?(i.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),i.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,r){var i=this.session;i.bgTokenizer.lines[n]=null;var o={type:t,value:e},s=i.getTokens(n);if(null==r)s.push(o);else for(var a=0,l=0;l<s.length;l++){var c=s[l];if(r<=(a+=c.value.length)){var u=c.value.length-(a-r),h=c.value.slice(0,u),d=c.value.slice(u);s.splice(l,1,{type:c.type,value:h},o,{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 r=e||this.$options.theme.initialValue;o.loadModule(["theme",r],s)}function s(r){if(n.$themeId!=e)return t&&t();if(!r||!r.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");r.$id&&(n.$themeId=r.$id),i.importCssString(r.cssText,r.cssClass,n.container),n.theme&&i.removeCssClass(n.container,n.theme.cssClass);var o="padding"in r?r.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&o!=n.$padding&&n.setPadding(o),n.$theme=r.cssClass,n.theme=r,i.addCssClass(n.container,r.cssClass),i.setCssClass(n.container,"ace_dark",r.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:r}),t&&t()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){i.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){i.removeCssClass(this.container,e)},this.setCursorStyle=function(e){i.setStyle(this.scroller.style,"cursor",e)},this.setMouseCursor=function(e){i.setStyle(this.scroller.style,"cursor",e)},this.attachToShadowRoot=function(){i.importCssString(m,"ace_editor.css",this.container)},this.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent=""}}).call(b.prototype),o.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){i.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:!g.isMobile&&!g.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 r=e("../lib/oop"),i=e("../lib/net"),o=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('"+i.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(){r.implement(this,o),this.$createWorkerFromOldConfig=function(t,n,r,i,o){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)i=i||s.moduleUrl(n,"worker");else{var l=this.$normalizePath;i=i||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(i),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:r}),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 i.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 r=this.callbackId++;this.callbacks[r]=n,t.push(r)}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 r=null,i=!1,a=Object.create(o),c=[],u=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),r&&(i?setTimeout(h):h())}});u.setEmitSync=function(e){i=e};var h=function(){var e=c.shift();e.command?r[e.command].apply(r,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(r=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 r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),s=function(e,t,n,r,i,o){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,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(){o.implement(this,i),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 i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)})),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 r(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,i=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!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+o};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+o};this.doc.remove(new r(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,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],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 r=e("../lib/event"),i=e("../lib/useragent");function o(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&&i.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(),m=d.getCursor(),g=e.inSelection()||d.isEmpty()&&o(f,m),v=e.x,b=e.y,y=h.session,w=h.renderer.pixelToScreenCoordinates(v,b),k=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&&i.isMac&&t.ctrlKey&&h.$mouseHandler.cancelContextMenu(),"add"==u){if(!p&&g)return;if(!p){var x=d.toOrientedRange();h.addSelectionMarker(x)}var S=d.rangeList.rangeAtPoint(f);h.inVirtualSelectionMode=!0,s&&(S=null,x=d.ranges[0]||x,h.removeSelectionMarker(x)),h.once("mouseup",(function(){var e=d.toOrientedRange();S&&e.isEmpty()&&o(S.cursor,e.cursor)?d.substractPoint(e.cursor):(s?d.substractPoint(x.cursor):x&&(h.removeSelectionMarker(x),d.addRange(x)),d.addRange(e)),h.inVirtualSelectionMode=!1}))}else if("block"==u){var E;e.stop(),h.inVirtualSelectionMode=!0;var _=[],C=function(){var e=h.renderer.pixelToScreenCoordinates(v,b),t=y.screenToDocumentPosition(e.row,e.column,e.offsetX);o(k,e)&&o(t,d.lead)||(k=e,h.selection.moveToPosition(t),h.renderer.scrollCursorIntoView(),h.removeSelectionMarkers(_),_=d.rectangularRangeBlock(k,w),h.$mouseHandler.$clickSelection&&1==_.length&&_[0].isEmpty()&&(_[0]=h.$mouseHandler.$clickSelection.clone()),_.forEach(h.addSelectionMarker,h),h.updateSelectionMarkers())};p&&!l?d.toSingleRange():!p&&l&&(E=d.toOrientedRange(),h.addSelectionMarker(E)),s?w=y.documentToScreenPosition(d.lead):d.moveToPosition(f),k={row:-1,column:-1};var T=C;r.capture(h.container,(function(e){v=e.clientX,b=e.clientY}),(function(e){C(),clearInterval(L),h.removeSelectionMarkers(_),_.length||(_=[d.toOrientedRange()]),E&&(h.removeSelectionMarker(E),d.toSingleRange(E));for(var t=0;t<_.length;t++)d.addRange(_[t]);h.inVirtualSelectionMode=!1,h.$mouseHandler.$clickSelection=null}));var L=setInterval((function(){T()}),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 r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(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 r=e("./range_list").RangeList,i=e("./range").Range,o=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 r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),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 r=this.ranges.indexOf(e[n]);this.ranges.splice(r,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 r,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 r=e[n],o=r.start.row,s=r.end.row;if(o===s)t.push(r.clone());else{for(t.push(new i(o,r.start.column,o,this.session.getLine(o).length));++o<s;)t.push(this.getLineRange(o,!0));t.push(new i(s,0,s,r.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=i.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=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(r,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],o=e.column<t.column;if(o)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,m=t.row;else f=t.row,m=e.row;s<0&&(s=0),f<0&&(f=0),f==m&&(n=!0);for(var g=f;g<=m;g++){var v=i.fromPoints(this.session.screenToDocumentPosition(g,s,l),this.session.screenToDocumentPosition(g,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=o?v.start:v.end,r.push(v)}if(p&&r.reverse(),!n){for(var b=r.length-1;r[b].isEmpty()&&b>0;)b--;if(b>0)for(var y=0;r[y].isEmpty();)y++;for(var w=b;w>=y;w--)r[w].isEmpty()&&r.splice(w,1)}return r}}.call(o.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 r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}a.addListener(t,"keydown",(function(t){var i=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&i?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()}),e),a.addListener(t,"keyup",r,e),a.addListener(t,"blur",r,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 r=e[n];if(r.marker){this.session.removeMarker(r.marker);var i=t.indexOf(r);-1!=i&&t.splice(i,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?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,i=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,u=(i?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 o(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||{});r||void 0===f||(r=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 m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),r}},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=[],r=0;r<t.length;r++)n.push(this.session.getTextRange(t[r]));var i=this.session.getDocument().getNewLineCharacter();(e=n.join(i)).length==(n.length-1)*i.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 r=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;r.row!=t.row||this.session.$clipPositionToDocument(r.row,r.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 r=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(r)}this.$search.set(t);var i=this.$search.findAll(this.session);if(!i.length)return 0;var o=this.multiSelect;n||o.toSingleRange(i[0]);for(var s=i.length;s--;)o.addRange(i[s],!0);return r&&o.rangeList.rangeAtPoint(r.start)&&o.addRange(r,!0),i.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),r=n.cursor==n.end,o=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var s,a=this.session.screenToDocumentPosition(o.row+e,o.column);if(n.isEmpty())c=a;else var l=this.session.documentToScreenPosition(r?n.end:n.start),c=this.session.screenToDocumentPosition(l.row+e,l.column);r?(s=i.fromPoints(a,c)).cursor=s.start:(s=i.fromPoints(c,a)).cursor=s.end;if(s.desiredColumn=o.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,r=n.ranges,i=r.length;i--;){if((a=r[i]).isEmpty()){var o=t.getWordRange(a.start.row,a.start.column);a.start.row=o.start.row,a.start.column=o.start.column,a.end.row=o.end.row,a.end.column=o.end.column}}n.mergeOverlappingRanges();var s=[];for(i=r.length;i--;){var a=r[i];s.unshift(t.getTextRange(a))}e<0?s.unshift(s.pop()):s.push(s.shift());for(i=r.length;i--;){o=(a=r[i]).clone();t.replace(a,s[i]),a.start.row=o.start.row,a.start.column=o.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(e,t,n){var r=this.session,i=r.multiSelect.toOrientedRange();if(!i.isEmpty()||((i=r.getWordRange(i.start.row,i.start.column)).cursor=-1==e?i.start:i.end,this.multiSelect.addRange(i),!n)){var o=r.getTextRange(i),s=function(e,t,n){return u.$options.wrap=!0,u.$options.needle=t,u.$options.backwards=-1==n,u.find(e)}(r,o,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(i.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,r=-1,o=n.filter((function(e){if(e.cursor.row==r)return!0;r=e.cursor.row}));if(n.length&&o.length!=n.length-1){o.forEach((function(e){t.substractPoint(e.cursor)}));var s=0,a=1/0,c=n.map((function(t){var n=t.cursor,r=e.getLine(n.row).substr(n.column).search(/\S/g);return-1==r&&(r=0),n.column>s&&(s=n.column),r<a&&(a=r),r}));n.forEach((function(t,n){var r=t.cursor,o=s-r.column,u=c[n]-a;o>u?e.insert(r,l.stringRepeat(" ",o-u)):e.remove(new i(r.row,r.column,r.row,r.column-o+u)),t.start.column=t.end.column=s,t.start.row=t.end.row=r.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,m=this.session.getLength();do{f=this.session.getLine(d)}while(/[=:]/.test(f)&&++d<m);do{f=this.session.getLine(h)}while(/[=:]/.test(f)&&--h>0);h<0&&(h=0),d>=m&&(d=m-1)}var g=this.session.removeFullLines(h,d);g=this.$reAlignText(g,p),this.session.insert({row:h,column:0},g.join("\n")+"\n"),p||(u.start.column=0,u.end.column=g[g.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,r,i,o=!0,s=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,r=t[2].length,i=t[3].length,t):(n+r+i!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),r<t[2].length&&(r=t[2].length),i>t[3].length&&(i=t[3].length),t):[e]})).map(t?c:o?s?function(e){return e[2]?a(n+r-e[2].length)+e[2]+a(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?a(n)+e[2]+a(i)+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(r-e[2].length+i)+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 r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,o=e.getLine(t),s=o.search(i);if(-1!=s){for(var a=n||o.length,l=e.getLength(),c=t,u=t;++t<l;){var h=e.getLine(t).search(i);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 r(c,a,u,p)}}},this.openingBracketBlock=function(e,t,n,i,o){var s={row:n,column:i+1},a=e.$findClosingBracket(t,s,o);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),r.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,i,o){var s={row:n,column:i},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,r.fromPoints(a,s)}}).call(i.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 r=e("./lib/dom");function i(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 r=e.data,i=r.start.row,o=r.end.row,s="add"==e.action,a=i+1;a<o;a++)n[a]&&(n[a].hidden=s);n[o]&&(s?n[i]?n[o].hidden=s:n[i]=n[o]:(n[i]==n[o]&&(n[i]=void 0),n[o].hidden=s))}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,r=e.end.row-n;if(0===r);else if("remove"==e.action){var i=t.splice(n+1,r);!t[n]&&i[i.length-1]&&(t[n]=i.pop()),i.forEach((function(e){e&&this.removeLineWidget(e)}),this),this.$updateRows()}else{var o=new Array(r);t[n]&&null!=t[n].column&&e.start.column>t[n].column&&n++,o.unshift(n,0),t.splice.apply(t,o),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=r.createElement("div"),e.el.innerHTML=e.html),e.el&&(r.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 i=this.session.lineWidgets;e.row!=n.end.row||i[n.start.row]?e.hidden=!0:i[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],r=[];n;)r.push(n),n=n.$oldWidget;return r},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,r=t.layerConfig;if(n&&n.length){for(var i=1/0,o=0;o<n.length;o++){var s=n[o];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/r.characterWidth));var a=s.h/r.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row))<0&&(a=0),s.rowCount!=a&&(s.rowCount=a,s.row<i&&(i=s.row))}}i!=1/0&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var n=t.layerConfig,r=this.session.lineWidgets;if(r){for(var i=Math.min(this.firstRow,n.firstRow),o=Math.max(this.lastRow,n.lastRow,r.length);i>0&&!r[i];)i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=i;s<=o;s++){var a=r[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(i.prototype),t.LineWidgets=i})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";var r=e("../line_widgets").LineWidgets,i=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new r(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 r=e.getAnnotations().sort(o.comparePoints);if(r.length){var i=function(e,t,n){for(var r=0,i=e.length-1;r<=i;){var o=r+i>>1,s=n(t,e[o]);if(s>0)r=o+1;else{if(!(s<0))return o;i=o-1}}return-(r+1)}(r,{row:t,column:-1},o.comparePoints);i<0&&(i=-i-1),i>=r.length?i=n>0?0:r.length-1:0===i&&n<0&&(i=r.length-1);var s=r[i];if(s&&n){if(s.row===t){do{s=r[i+=n]}while(s&&s.row===t);if(!s)return r.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=r[i+=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:i.createElement("div"),type:"errorMarker"},p=d.el.appendChild(i.createElement("div")),f=d.el.appendChild(i.createElement("div"));f.className="error_widget_arrow "+c.className;var m=e.renderer.$cursorLayer.getPixelPosition(s).left;f.style.left=m+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(i.createElement("div"));var g=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(g),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(g),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})},i.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,r){"use strict";e("./lib/fixoldbrowsers");var i=e("./lib/dom"),o=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(48),t.edit=function(e,n){if("string"==typeof e){var r=e;if(!(e=document.getElementById(r)))throw new Error("ace.edit can't find div #"+r)}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=i.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),o.addListener(window,"resize",d.onResize),h.on("destroy",(function(){o.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 i in n&&(n.config.init(!0),n.define=ace.define),window.ace||(window.ace=n),n)n.hasOwnProperty(i)&&(window.ace[i]=n[i]);window.ace.default=window.ace,"object"==r(e)&&"object"==r(t)&&e&&(e.exports=window.ace)}))}).call(this,n(11)(e))},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(46),a=s.getAceInstance(),l=n(47),c=n(83),u=n(1),h=n(0),d=n(45),p=n(84),f=function(e){function t(t){var n=e.call(this,t)||this;return s.editorEvents.forEach((function(e){n[e]=n[e].bind(n)})),n.debounce=s.debounce,n}return i(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,r=t.onBeforeLoad,i=t.mode,o=t.focus,l=t.theme,u=t.fontSize,h=t.value,d=t.defaultValue,f=t.cursorStart,m=t.showGutter,g=t.wrapEnabled,v=t.showPrintMargin,b=t.scrollMargin,y=void 0===b?[0,0,0,0]:b,w=t.keyboardHandler,k=t.onLoad,x=t.commands,S=t.annotations,E=t.markers,_=t.splits;this.editor=a.edit(this.refEditor),this.editor.setTheme("ace/theme/"+l),r&&r(a);var C=Object.keys(this.props.editorProps),T=new c.Split(this.editor.container,"ace/theme/"+l,_);this.editor.env.split=T,this.splitEditor=T.getEditor(0),this.split=T,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var L=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),T.forEach((function(t,n){for(var r=0;r<C.length;r++)t[C[r]]=e.props.editorProps[C[r]];var o=p(d,n),c=p(h,n,"");t.session.setUndoManager(new a.UndoManager),t.setTheme("ace/theme/"+l),t.renderer.setScrollMargin(y[0],y[1],y[2],y[3]),t.getSession().setMode("ace/mode/"+i),t.setFontSize(u),t.renderer.setShowGutter(m),t.getSession().setUseWrapMode(g),t.setShowPrintMargin(v),t.on("focus",e.onFocus),t.on("blur",e.onBlur),t.on("input",e.onInput),t.on("copy",e.onCopy),t.on("paste",e.onPaste),t.on("change",e.onChange),t.getSession().selection.on("changeSelection",e.onSelectionChange),t.getSession().selection.on("changeCursor",e.onCursorChange),t.session.on("changeScrollTop",e.onScroll),t.setValue(void 0===o?c:o,f);var b=p(S,n,[]),k=p(E,n,[]);t.getSession().setAnnotations(b),k&&k.length>0&&e.handleMarkers(k,t);for(r=0;r<s.editorOptions.length;r++){var _=s.editorOptions[r];L.hasOwnProperty(_)?t.setOption(_,e.props[_]):e.props[_]&&console.warn("ReaceAce: editor option "+_+" was activated but not found. Did you need to import a related tool or did you possibly mispell the option?")}e.handleOptions(e.props,t),Array.isArray(x)&&x.forEach((function(e){"string"==typeof e.exec?t.commands.bindKey(e.bindKey,e.exec):t.commands.addCommand(e)})),w&&t.setKeyboardHandler("ace/keyboard/"+w)})),n&&(this.refEditor.className+=" "+n),o&&this.splitEditor.focus();var A=this.editor.env.split;A.setOrientation("below"===this.props.orientation?A.BELOW:A.BESIDE),A.resize(!0),k&&k(A)},t.prototype.componentDidUpdate=function(e){var t=this,n=e,r=this.props,i=this.editor.env.split;if(r.splits!==n.splits&&i.setSplits(r.splits),r.orientation!==n.orientation&&i.setOrientation("below"===r.orientation?i.BELOW:i.BESIDE),i.forEach((function(e,i){r.mode!==n.mode&&e.getSession().setMode("ace/mode/"+r.mode),r.keyboardHandler!==n.keyboardHandler&&(r.keyboardHandler?e.setKeyboardHandler("ace/keyboard/"+r.keyboardHandler):e.setKeyboardHandler(null)),r.fontSize!==n.fontSize&&e.setFontSize(r.fontSize),r.wrapEnabled!==n.wrapEnabled&&e.getSession().setUseWrapMode(r.wrapEnabled),r.showPrintMargin!==n.showPrintMargin&&e.setShowPrintMargin(r.showPrintMargin),r.showGutter!==n.showGutter&&e.renderer.setShowGutter(r.showGutter);for(var o=0;o<s.editorOptions.length;o++){var a=s.editorOptions[o];r[a]!==n[a]&&e.setOption(a,r[a])}d(r.setOptions,n.setOptions)||t.handleOptions(r,e);var l=p(r.value,i,"");if(e.getValue()!==l){t.silent=!0;var c=e.session.selection.toJSON();e.setValue(l,r.cursorStart),e.session.selection.fromJSON(c),t.silent=!1}var u=p(r.annotations,i,[]),h=p(n.annotations,i,[]);d(u,h)||e.getSession().setAnnotations(u);var f=p(r.markers,i,[]),m=p(n.markers,i,[]);!d(f,m)&&Array.isArray(f)&&t.handleMarkers(f,e)})),r.className!==n.className){var o=this.refEditor.className.trim().split(" ");n.className.trim().split(" ").forEach((function(e){var t=o.indexOf(e);o.splice(t,1)})),this.refEditor.className=" "+r.className+" "+o.join(" ")}r.theme!==n.theme&&i.setTheme("ace/theme/"+r.theme),r.focus&&!n.focus&&this.splitEditor.focus(),r.height===this.props.height&&r.width===this.props.width||this.editor.resize()},t.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},t.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getValue())})),this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getSelection())})),this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=[];this.editor.env.split.forEach((function(e){t.push(e.getSelection())})),this.props.onCursorChange(t,e)}},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e)},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e)},t.prototype.onCopy=function(e){this.props.onCopy&&this.props.onCopy(e)},t.prototype.onPaste=function(e){this.props.onPaste&&this.props.onPaste(e)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e,t){for(var n=Object.keys(e.setOptions),r=0;r<n.length;r++)t.setOption(n[r],e.setOptions[n[r]])},t.prototype.handleMarkers=function(e,t){var n=t.getSession().getMarkers(!0);for(var r in n)n.hasOwnProperty(r)&&t.getSession().removeMarker(n[r].id);for(var r in n=t.getSession().getMarkers(!1))n.hasOwnProperty(r)&&t.getSession().removeMarker(n[r].id);e.forEach((function(e){var n=e.startRow,r=e.startCol,i=e.endRow,o=e.endCol,s=e.className,a=e.type,c=e.inFront,u=void 0!==c&&c,h=new l.Range(n,r,i,o);t.getSession().addMarker(h,s,a,u)}))},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,r=e.height,i=e.style,s=o({width:n,height:r},i);return h.createElement("div",{ref:this.updateRef,id:t,style:s})},t.propTypes={className:u.string,debounceChangePeriod:u.number,defaultValue:u.arrayOf(u.string),focus:u.bool,fontSize:u.oneOfType([u.number,u.string]),height:u.string,mode:u.string,name:u.string,onBlur:u.func,onChange:u.func,onCopy:u.func,onFocus:u.func,onInput:u.func,onLoad:u.func,onPaste:u.func,onScroll:u.func,orientation:u.string,showGutter:u.bool,splits:u.number,theme:u.string,value:u.arrayOf(u.string),width:u.string,onSelectionChange:u.func,onCursorChange:u.func,onBeforeLoad:u.func,minLines:u.number,maxLines:u.number,readOnly:u.bool,highlightActiveLine:u.bool,tabSize:u.number,showPrintMargin:u.bool,cursorStart:u.number,editorProps:u.object,setOptions:u.object,style:u.object,scrollMargin:u.array,annotations:u.array,markers:u.array,keyboardHandler:u.string,wrapEnabled:u.bool,enableBasicAutocompletion:u.oneOfType([u.bool,u.array]),enableLiveAutocompletion:u.oneOfType([u.bool,u.array]),commands:u.array},t.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},t}(h.Component);t.default=f},function(e,t,n){var r=n(51);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(8),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,t,n){var r=n(12),i=n(6);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){(function(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 r="object"==(void 0===t?"undefined":n(t))&&t&&t.Object===Object&&t;e.exports=r}).call(this,n(18))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(109),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),l=Array(a);++s<a;)l[s]=o[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=o[s];return c[t]=n(l),r(e,this,c)}}},function(e,t,n){var r=n(110),i=n(112)(r);e.exports=i},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},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 r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var i=n(e);return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(114),i=n(61),o=n(10),s=n(62),a=n(59),l=n(117),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),u=!n&&i(e),h=!n&&!u&&s(e),d=!n&&!u&&!h&&l(e),p=n||u||h||d,f=p?r(e.length,String):[],m=f.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||h&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m))||f.push(g);return f}},function(e,t,n){var r=n(115),i=n(9),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},function(e,t,n){(function(e){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)}var i=n(4),o=n(116),s="object"==r(t)&&t&&!t.nodeType&&t,a=s&&"object"==r(e)&&e&&!e.nodeType&&e,l=a&&a.exports===s?i.Buffer:void 0,c=(l?l.isBuffer:void 0)||o;e.exports=c}).call(this,n(11)(e))},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){"use strict";(e.exports={}).forEach=function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n]);if(r)return r}}},function(e,t,n){"use strict";var r=e.exports={};r.isIE=function(e){return(-1!==(t=navigator.userAgent.toLowerCase()).indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.indexOf(" edge/"))&&(!e||e===function(){var e=3,t=document.createElement("div"),n=t.getElementsByTagName("i");do{t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e"}while(n[0]);return e>4?e:void 0}());var t},r.isLegacyOpera=function(){return!!window.opera}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},function(e,t,n){var r=n(148),i=n(155),o=n(157),s=n(158),a=n(159);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},function(e,t,n){var r=n(60),i=n(163),o=n(19);e.exports=function(e){return o(e)?r(e,!0):i(e)}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(37),i=n(38),o=n(36),s=n(69),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:s;e.exports=a},function(e,t,n){var r=n(37),i=n(10);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},function(e,t,n){var r=n(71),i=n(70),o=n(68);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(22);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(79),i=n(82);t.diff=i.default;var o=n(49);t.split=o.default,t.default=r.default},function(e,t,n){var r="undefined"!=typeof window,i=r?window.Masonry||n(94):null,o=r?n(99):null,s=n(100),a=n(121),l=n(132),c=n(135),u=n(1),h=n(0),d=n(205),p={enableResizableChildren:u.bool,disableImagesLoaded:u.bool,onImagesLoaded:u.func,updateOnEachImageLoad:u.bool,options:u.object,imagesLoadedOptions:u.object,elementType:u.string,onLayoutComplete:u.func,onRemoveComplete:u.func},f=d({masonry:!1,erd:void 0,latestKnownDomChildren:[],displayName:"MasonryComponent",imagesLoadedCancelRef:void 0,propTypes:p,getDefaultProps:function(){return{enableResizableChildren:!1,disableImagesLoaded:!1,updateOnEachImageLoad:!1,options:{},imagesLoadedOptions:{},className:"",elementType:"div",onLayoutComplete:function(){},onRemoveComplete:function(){}}},initializeMasonry:function(e){this.masonry&&!e||(this.masonry=new i(this.masonryContainer,this.props.options),this.props.onLayoutComplete&&this.masonry.on("layoutComplete",this.props.onLayoutComplete),this.props.onRemoveComplete&&this.masonry.on("removeComplete",this.props.onRemoveComplete),this.latestKnownDomChildren=this.getCurrentDomChildren())},getCurrentDomChildren:function(){var e=this.masonryContainer,t=this.props.options.itemSelector?e.querySelectorAll(this.props.options.itemSelector):e.children;return Array.prototype.slice.call(t)},diffDomChildren:function(){var e=!1,t=this.latestKnownDomChildren.filter((function(e){return!!e.parentNode}));t.length!==this.latestKnownDomChildren.length&&(e=!0);var n=this.getCurrentDomChildren(),r=t.filter((function(e){return!~n.indexOf(e)})),i=n.filter((function(e){return!~t.indexOf(e)})),o=0,s=i.filter((function(e){var t=o===n.indexOf(e);return t&&o++,t})),a=i.filter((function(e){return-1===s.indexOf(e)})),l=[];return 0===r.length&&(l=t.filter((function(e,t){return t!==n.indexOf(e)}))),this.latestKnownDomChildren=n,{old:t,new:n,removed:r,appended:a,prepended:s,moved:l,forceItemReload:e}},performLayout:function(){var e=this.diffDomChildren(),t=e.forceItemReload||e.moved.length>0;e.removed.length>0&&(this.props.enableResizableChildren&&e.removed.forEach(this.erd.removeAllListeners,this.erd),this.masonry.remove(e.removed),t=!0),e.appended.length>0&&(this.masonry.appended(e.appended),0===e.prepended.length&&(t=!0),this.props.enableResizableChildren&&e.appended.forEach(this.listenToElementResize,this)),e.prepended.length>0&&(this.masonry.prepended(e.prepended),this.props.enableResizableChildren&&e.prepended.forEach(this.listenToElementResize,this)),t&&this.masonry.reloadItems(),this.masonry.layout()},derefImagesLoaded:function(){this.imagesLoadedCancelRef(),this.imagesLoadedCancelRef=void 0},imagesLoaded:function(){if(!this.props.disableImagesLoaded){this.imagesLoadedCancelRef&&this.derefImagesLoaded();var e=this.props.updateOnEachImageLoad?"progress":"always",t=l(function(e){this.props.onImagesLoaded&&this.props.onImagesLoaded(e),this.masonry.layout()}.bind(this),100),n=o(this.masonryContainer,this.props.imagesLoadedOptions).on(e,t);this.imagesLoadedCancelRef=function(){n.off(e,t),t.cancel()}}},initializeResizableChildren:function(){this.props.enableResizableChildren&&(this.erd=a({strategy:"scroll"}),this.latestKnownDomChildren.forEach(this.listenToElementResize,this))},listenToElementResize:function(e){this.erd.listenTo(e,function(){this.masonry.layout()}.bind(this))},destroyErd:function(){this.erd&&this.latestKnownDomChildren.forEach(this.erd.uninstall,this.erd)},componentDidMount:function(){this.initializeMasonry(),this.initializeResizableChildren(),this.imagesLoaded()},componentDidUpdate:function(){this.performLayout(),this.imagesLoaded()},componentWillUnmount:function(){this.destroyErd(),this.props.onLayoutComplete&&this.masonry.off("layoutComplete",this.props.onLayoutComplete),this.props.onRemoveComplete&&this.masonry.off("removeComplete",this.props.onRemoveComplete),this.imagesLoadedCancelRef&&this.derefImagesLoaded(),this.masonry.destroy()},setRef:function(e){this.masonryContainer=e},render:function(){var e=c(this.props,Object.keys(p));return h.createElement(this.props.elementType,s({},e,{ref:this.setRef}),this.props.children)}});e.exports=f,e.exports.default=f},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){var r,i,o;function s(e){return(s="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(n){if("undefined"!=typeof window){var a,l=0,c=!1,u=!1,h="message".length,d="[iFrameSizer]",p=d.length,f=null,m=window.requestAnimationFrame,g={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},v={},b=null,y={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){L("onMessage function not defined")},onResized:function(){},onScroll:function(){return!0}},w={};window.jQuery&&((a=window.jQuery).fn?a.fn.iFrameResize||(a.fn.iFrameResize=function(e){return this.filter("iframe").each((function(t,n){B(n,e)})).end()}):T("","Unable to bind to jQuery, it is not fully loaded.")),i=[],void 0===(o="function"==typeof(r=q)?r.apply(t,i):r)||(e.exports=o),window.iFrameResize=window.iFrameResize||q()}function k(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function x(e,t,n){e.addEventListener(t,n,!1)}function S(e,t,n){e.removeEventListener(t,n,!1)}function E(e){return d+"["+function(e){var t="Host page: "+e;return window.top!==window.self&&(t=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),t}(e)+"]"}function _(e){return v[e]?v[e].log:c}function C(e,t){A("log",e,t,_(e))}function T(e,t){A("info",e,t,_(e))}function L(e,t){A("warn",e,t,!0)}function A(e,t,n,r){!0===r&&"object"===s(window.console)&&console[e](E(t),n)}function O(e){function t(){i("Height"),i("Width"),D((function(){F(A),P(O),u("onResized",A)}),A,"init")}function n(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function r(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}function i(e){var t=Number(v[O]["max"+e]),n=Number(v[O]["min"+e]),r=e.toLowerCase(),i=Number(A[r]);C(O,"Checking "+r+" is in range "+n+"-"+t),i<n&&(i=n,C(O,"Set "+r+" to min value")),i>t&&(i=t,C(O,"Set "+r+" to max value")),A[r]=""+i}function o(e){return _.substr(_.indexOf(":")+h+e)}function s(e,t){var n,r,i;n=function(){var n,r;W("Send Page Info","pageInfo:"+(n=document.body.getBoundingClientRect(),r=A.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:r.height,iframeWidth:r.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(r.top-n.top,10),offsetLeft:parseInt(r.left-n.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,t)},r=32,w[i=t]||(w[i]=setTimeout((function(){w[i]=null,n()}),r))}function a(e){var t=e.getBoundingClientRect();return j(O),{x:Math.floor(Number(t.left)+Number(f.x)),y:Math.floor(Number(t.top)+Number(f.y))}}function l(e){var t=e?a(A.iframe):{x:0,y:0},n={x:Number(A.width)+t.x,y:Number(A.height)+t.y};C(O,"Reposition requested from iFrame (offset x:"+t.x+" y:"+t.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](n.x,n.y):L(O,"Unable to scroll to requested position, window.parentIFrame not found"):(f=n,c(),C(O,"--"))}function c(){!1!==u("onScroll",f)?P(O):I()}function u(e,t){return R(O,e,t)}var m,g,b,y,k,E,_=e.data,A={},O=null;"[iFrameResizerChild]Ready"===_?function(){for(var e in v)W("iFrame requested init",z(e),v[e].iframe,e)}():d===(""+_).substr(0,p)&&_.substr(p).split(":")[0]in v?(b=_.substr(p).split(":"),y=b[1]?parseInt(b[1],10):0,k=v[b[0]]&&v[b[0]].iframe,E=getComputedStyle(k),A={iframe:k,id:b[0],height:y+n(E)+r(E),width:b[2],type:b[3]},O=A.id,v[O]&&(v[O].loaded=!0),(g=A.type in{true:1,false:1,undefined:1})&&C(O,"Ignoring init message from meta parent page"),!g&&function(e){var t=!0;return v[e]||(t=!1,L(A.type+" No settings for "+e+". Message was: "+_)),t}(O)&&(C(O,"Received: "+_),m=!0,null===A.iframe&&(L(O,"IFrame ("+A.id+") not found"),m=!1),m&&function(){var t,n=e.origin,r=v[O]&&v[O].checkOrigin;if(r&&""+n!="null"&&!(r.constructor===Array?function(){var e=0,t=!1;for(C(O,"Checking connection is from allowed list of origins: "+r);e<r.length;e++)if(r[e]===n){t=!0;break}return t}():(t=v[O]&&v[O].remoteHost,C(O,"Checking connection is from: "+t),n===t)))throw new Error("Unexpected message received from: "+n+" for "+A.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(v[O]&&v[O].firstRun&&v[O]&&(v[O].firstRun=!1),A.type){case"close":M(A.iframe);break;case"message":d=o(6),C(O,"onMessage passed: {iframe: "+A.iframe.id+", message: "+d+"}"),u("onMessage",{iframe:A.iframe,message:JSON.parse(d)}),C(O,"--");break;case"autoResize":v[O].autoResize=JSON.parse(o(9));break;case"scrollTo":l(!1);break;case"scrollToOffset":l(!0);break;case"pageInfo":s(v[O]&&v[O].iframe,O),function(){function e(e,r){function i(){v[n]?s(v[n].iframe,n):t()}["scroll","resize"].forEach((function(t){C(n,e+t+" listener for sendPageInfo"),r(window,t,i)}))}function t(){e("Remove ",S)}var n=O;e("Add ",x),v[n]&&(v[n].stopPageInfo=t)}();break;case"pageInfoStop":v[O]&&v[O].stopPageInfo&&(v[O].stopPageInfo(),delete v[O].stopPageInfo);break;case"inPageLink":e=o(9),r=e.split("#")[1]||"",i=decodeURIComponent(r),(h=document.getElementById(i)||document.getElementsByName(i)[0])?(n=a(h),C(O,"Moving to in page link (#"+r+") at x: "+n.x+" y: "+n.y),f={x:n.x,y:n.y},c(),C(O,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(r):C(O,"In page link #"+r+" not found and window.parentIFrame not found"):C(O,"In page link #"+r+" not found");break;case"reset":N(A);break;case"init":t(),u("onInit",A.iframe);break;default:t()}var e,n,r,i,h,d}())):T(O,"Ignored: "+_)}function R(e,t,n){var r=null,i=null;if(v[e]){if("function"!=typeof(r=v[e][t]))throw new TypeError(t+" on iFrame["+e+"] is not a function");i=r(n)}return i}function $(e){var t=e.id;delete v[t]}function M(e){var t=e.id;if(!1!==R(t,"onClose",t)){C(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){L(e)}R(t,"onClosed",t),C(t,"--"),$(e)}else C(t,"Close iframe cancelled by onClose event")}function j(e){null===f&&C(e,"Get page position: "+(f={x:void 0!==window.pageXOffset?window.pageXOffset:document.documentElement.scrollLeft,y:void 0!==window.pageYOffset?window.pageYOffset:document.documentElement.scrollTop}).x+","+f.y)}function P(e){null!==f&&(window.scrollTo(f.x,f.y),C(e,"Set page position: "+f.x+","+f.y),I())}function I(){f=null}function N(e){C(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),j(e.id),D((function(){F(e),W("reset","reset",e.iframe,e.id)}),e,"reset")}function F(e){function t(t){u||"0"!==e[t]||(u=!0,C(r,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(v).forEach((function(e){!function(e){function t(t){return"0px"===(v[e]&&v[e].iframe.style[t])}v[e]&&null!==v[e].iframe.offsetParent&&(t("height")||t("width"))&&W("Visibility change","resize",v[e].iframe,e)}(e)}))}function t(t){C("window","Mutation observed: "+t[0].target+" "+t[0].type),V(e,16)}var n=k();n&&(r=document.querySelector("body"),new n(t).observe(r,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}));var r}())}function n(n){!function(t){e.id?(e.iframe.style[t]=e[t]+"px",C(e.id,"IFrame ("+r+") "+t+" set to "+e[t]+"px")):C("undefined","messageData id not set")}(n),t(n)}var r=e.iframe.id;v[r]&&(v[r].sizeHeight&&n("height"),v[r].sizeWidth&&n("width"))}function D(e,t,n){n!==t.type&&m&&!window.jasmine?(C(t.id,"Requesting animation frame"),m(e)):e()}function W(e,t,n,r,i){var o,s=!1;r=r||n.id,v[r]&&(n&&"contentWindow"in n&&null!==n.contentWindow?(o=v[r]&&v[r].targetOrigin,C(r,"["+e+"] Sending msg to iframe["+r+"] ("+t+") targetOrigin: "+o),n.contentWindow.postMessage(d+t,o)):L(r,"["+e+"] IFrame("+r+") not found"),i&&v[r]&&v[r].warningTimeout&&(v[r].msgTimeout=setTimeout((function(){!v[r]||v[r].loaded||s||(s=!0,L(r,"IFrame has not responded within "+v[r].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),v[r].warningTimeout)))}function z(e){return e+":"+v[e].bodyMarginV1+":"+v[e].sizeWidth+":"+v[e].log+":"+v[e].interval+":"+v[e].enablePublicMethods+":"+v[e].autoResize+":"+v[e].bodyMargin+":"+v[e].heightCalculationMethod+":"+v[e].bodyBackground+":"+v[e].bodyPadding+":"+v[e].tolerance+":"+v[e].inPageLinks+":"+v[e].resizeFrom+":"+v[e].widthCalculationMethod}function B(e,t){function n(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],L(o,"Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}var r,i,o=function(n){var r;return""===n&&(e.id=(r=t&&t.id||y.id+l++,null!==document.getElementById(r)&&(r+=l++),n=r),c=(t||{}).log,C(n,"Added missing iframe ID: "+n+" ("+e.src+")")),n}(e.id);o in v&&"iFrameResizer"in e?L(o,"Ignored iFrame, already setup."):(!function(t){var r;t=t||{},v[o]={firstRun:!0,iframe:e,remoteHost:e.src&&e.src.split("/").slice(0,3).join("/")},function(e){if("object"!==s(e))throw new TypeError("Options is not an object")}(t),Object.keys(t).forEach(n,t),function(e){for(var t in y)Object.prototype.hasOwnProperty.call(y,t)&&(v[o][t]=Object.prototype.hasOwnProperty.call(e,t)?e[t]:y[t])}(t),v[o]&&(v[o].targetOrigin=!0===v[o].checkOrigin?""===(r=v[o].remoteHost)||null!==r.match(/^(about:blank|javascript:|file:\/\/)/)?"*":r:"*")}(t),function(){switch(C(o,"IFrame scrolling "+(v[o]&&v[o].scrolling?"enabled":"disabled")+" for "+o),e.style.overflow=!1===(v[o]&&v[o].scrolling)?"hidden":"auto",v[o]&&v[o].scrolling){case"omit":break;case!0:e.scrolling="yes";break;case!1:e.scrolling="no";break;default:e.scrolling=v[o]?v[o].scrolling:"no"}}(),function(){function t(t){1/0!==v[o][t]&&0!==v[o][t]&&(e.style[t]=v[o][t]+"px",C(o,"Set "+t+" = "+v[o][t]+"px"))}function n(e){if(v[o]["min"+e]>v[o]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),t("maxHeight"),t("minHeight"),t("maxWidth"),t("minWidth")}(),"number"!=typeof(v[o]&&v[o].bodyMargin)&&"0"!==(v[o]&&v[o].bodyMargin)||(v[o].bodyMarginV1=v[o].bodyMargin,v[o].bodyMargin=v[o].bodyMargin+"px"),r=z(o),(i=k())&&function(t){e.parentNode&&new t((function(t){t.forEach((function(t){Array.prototype.slice.call(t.removedNodes).forEach((function(t){t===e&&M(e)}))}))})).observe(e.parentNode,{childList:!0})}(i),x(e,"load",(function(){var t,n;W("iFrame.onload",r,e,void 0,!0),t=v[o]&&v[o].firstRun,n=v[o]&&v[o].heightCalculationMethod in g,!t&&n&&N({iframe:e,height:0,width:0,type:"init"})})),W("init",r,e,void 0,!0),v[o]&&(v[o].iframe.iFrameResizer={close:M.bind(null,v[o].iframe),removeListeners:$.bind(null,v[o].iframe),resize:W.bind(null,"Window resize","resize",v[o].iframe),moveToAnchor:function(e){W("Move to anchor","moveToAnchor:"+e,v[o].iframe,o)},sendMessage:function(e){W("Send Message","message:"+(e=JSON.stringify(e)),v[o].iframe,o)}}))}function V(e,t){null===b&&(b=setTimeout((function(){b=null,e()}),t))}function H(){"hidden"!==document.visibilityState&&(C("document","Trigger event: Visiblity change"),V((function(){U("Tab Visable","resize")}),16))}function U(e,t){Object.keys(v).forEach((function(n){(function(e){return v[e]&&"parent"===v[e].resizeFrom&&v[e].autoResize&&!v[e].firstRun})(n)&&W(e,t,v[n].iframe,n)}))}function G(){x(window,"message",O),x(window,"resize",(function(){var e;C("window","Trigger event: "+(e="resize")),V((function(){U("Window "+e,"resize")}),16)})),x(document,"visibilitychange",H),x(document,"-webkit-visibilitychange",H)}function q(){function e(e,n){n&&(!function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),B(n,e),t.push(n))}var t;return function(){var e,t=["moz","webkit","o","ms"];for(e=0;e<t.length&&!m;e+=1)m=window[t[e]+"RequestAnimationFrame"];m?m=m.bind(window):C("setup","RequestAnimationFrame not supported")}(),G(),function(n,r){switch(t=[],function(e){e&&e.enablePublicMethods&&L("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(n),s(r)){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(r||"iframe"),e.bind(void 0,n));break;case"object":e(n,r);break;default:throw new TypeError("Unexpected data type ("+s(r)+")")}return t}}}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return Vo}));var r=n(2),i=n.n(r),o=n(16);function s(e){return(s="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){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t){return!t||"object"!==s(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 m(){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}}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=window,b=v.jQuery,y=v.ajaxurl,w=v.VPGutenbergVariables,k=wp.element,x=k.Component,S=k.RawHTML,E=wp.components,_=E.Button,C=E.Spinner,T={},L=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&&d(e,t)}(a,e);var t,n,r,o,s=(t=a,function(){var e,n=g(t);if(m()){var r=g(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return p(this,e)});function a(){var e;u(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=(e=s.call.apply(s,[this].concat(n))).props.callback;return e.state={options:l({},e.props.options),ajaxStatus:!!i},T[e.props.controlName]=l({},e.props.options),e.requestAjax=e.requestAjax.bind(f(e)),e}return n=a,(r=[{key:"componentDidMount",value:function(){var e=this;this.props.callback&&this.requestAjax({},(function(t){t.options&&e.setState({options:t.options})}))}},{key:"requestAjax",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.props,o=i.controlName,s=i.attributes;if(!this.isAJAXinProgress){this.isAJAXinProgress=!0,r&&this.setState({ajaxStatus:"progress"});var a=l({action:"vp_dynamic_control_callback",nonce:w.nonce,vp_control_name:o,vp_attributes:s},t);b.ajax({url:y,method:"POST",dataType:"json",data:a,complete:function(t){var i=t.responseJSON;n&&i.response&&(i.response.options&&(T[o]=l(l({},T[o]),i.response.options)),n(i.response)),r&&e.setState({ajaxStatus:!0}),e.isAJAXinProgress=!1}})}}},{key:"render",value:function(){var e=this.props,t=e.value,n=e.onChange,r=this.state,o=r.options,s=r.ajaxStatus;return s&&"progress"===s?wp.element.createElement("div",{className:"vpf-component-icon-selector"},wp.element.createElement(C,null)):wp.element.createElement("div",{className:"vpf-component-icon-selector"},Object.keys(o||{}).map((function(e){var r=o[e];return wp.element.createElement(_,{key:"icon-selector-".concat(r.title,"-").concat(r.value),onClick:function(){return n(r.value)},className:i()("vpf-component-icon-selector-item",t===r.value?"vpf-component-icon-selector-item-active":"",r.className)},r.icon?wp.element.createElement(S,null,r.icon):"",r.title?wp.element.createElement("span",null,r.title):"")})))}}])&&h(n.prototype,r),o&&h(n,o),a}(x),A=n(74),O=n.n(A);n(86),n(88),n(90),n(91),n(92),n(93);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 $(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?I(e):t}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N(){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}}function F(e){return(F=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var D=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&&j(e,t)}(s,e);var t,n,r,i,o=(t=s,function(){var e,n=F(t);if(N()){var r=F(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return P(this,e)});function s(){var e;$(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={codePlaceholder:e.props.codePlaceholder},e.maybeRemovePlaceholder=e.maybeRemovePlaceholder.bind(I(e)),e}return n=s,(r=[{key:"componentDidMount",value:function(){this.maybeRemovePlaceholder()}},{key:"maybeRemovePlaceholder",value:function(){var e=this.props.value,t=this.state.codePlaceholder;e&&t&&this.setState({codePlaceholder:""})}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=t.onChange,i=t.mode,o=t.maxLines,s=t.minLines,a=this.state.codePlaceholder;return wp.element.createElement(O.a,{className:"vpf-component-code-editor",theme:"textmate",onLoad:function(e){e.renderer.setScrollMargin(16,16,16,16),e.renderer.setPadding(16)},fontSize:12,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!1,width:"100%",setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!0,printMargin:!1,tabSize:2},editorProps:{$blockScrolling:1/0},value:n||a,onChange:function(t){r(t===a?"":t),e.maybeRemovePlaceholder()},mode:i,maxLines:o,minLines:s})}}])&&M(n.prototype,r),i&&M(n,i),s}(wp.element.Component),W=n(75),z=n.n(W),B=wp.element.useEffect;function V(e){var t=e.children;return B((function(){var e=document.createElement("style");return e.innerHTML=t,document.body.appendChild(e),function(){return document.body.removeChild(e)}}),[t]),null}function H(e){return(H="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 U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(e,t){return!t||"object"!==H(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 Y(){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}}function X(e){return(X=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var J=wp.element,Q=J.Component,Z=J.Fragment,ee=wp.components,te=ee.Button,ne=ee.Modal,re=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&&q(e,t)}(s,e);var t,n,r,i,o=(t=s,function(){var e,n=X(t);if(Y()){var r=X(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return K(this,e)});function s(){var e;U(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={isOpened:!1},e}return n=s,(r=[{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.modalTitle,i=t.buttonLabel,o=this.state.isOpened;return wp.element.createElement(Z,null,wp.element.createElement(te,{isSecondary:!0,onClick:function(){return e.setState({isOpened:!o})}},i),o?wp.element.createElement(ne,{title:r,onRequestClose:function(){return e.setState({isOpened:!o})}},n):"")}}])&&G(n.prototype,r),i&&G(n,i),s}(Q);function ie(e){return(ie="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 oe(e){return function(e){if(Array.isArray(e))return se(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return se(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ce(e,t){return(ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ue(e,t){return!t||"object"!==ie(t)&&"function"!=typeof t?he(e):t}function he(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function de(){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}}function pe(e){return(pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fe=wp.i18n.__,me=wp.element,ge=me.Component,ve=me.Fragment,be=wp.components.Button,ye=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&&ce(e,t)}(a,e);var t,n,r,o,s=(t=a,function(){var e,n=pe(t);if(de()){var r=pe(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return ue(this,e)});function a(){var e;ae(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=s.call.apply(s,[this].concat(n))).renderPreview=e.renderPreview.bind(he(e)),e}return n=a,(r=[{key:"renderPreview",value:function(e){var t=e.split(/[:|]/),n='[data-tiles-preview="'.concat(e,'"]'),r="";void 0===t[t.length-1]||t[t.length-1]||t.pop();var i=parseInt(t[0],10)||1;if(t.shift(),r+="".concat(n," .vpf-tiles-preview-item-wrap { width: ").concat(100/i,"%; }"),t&&t.length)for(var o=0;o<t.length;o+=1){var s=t[o].split(","),a=parseFloat(s[0])||1,l=parseFloat(s[1])||1,c=".vpf-tiles-preview-item-wrap";1<t.length&&(c+=":nth-of-type(".concat(t.length,"n+").concat(o+1,")")),a&&1!==a&&(r+="".concat(n," ").concat(c," { width: ").concat(100*a/i,"%; }")),r+="".concat(n," ").concat(c," .vpf-tiles-preview-item::after { padding-top: ").concat(100*l,"%; }")}return wp.element.createElement(ve,null,wp.element.createElement(z.a,{elementType:"div","data-tiles-preview":e,options:{transitionDuration:0}},Array.apply(void 0,oe(Array(4*i))).map((function(e){return wp.element.createElement("div",{key:e,className:"vpf-tiles-preview-item-wrap"},wp.element.createElement("div",{className:"vpf-tiles-preview-item"}))}))),wp.element.createElement(V,null,r))}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=t.options,o=t.onChange;return wp.element.createElement(ve,null,wp.element.createElement("div",{className:"vpf-component-tiles-selector"},wp.element.createElement(re,{modalTitle:fe("Tiles","@@text_domain"),buttonLabel:fe("Edit Tiles","@@text_domain")},wp.element.createElement("div",{className:"vpf-component-tiles-selector-items"},r.map((function(t){return wp.element.createElement(be,{key:t.value,onClick:function(){return o(t.value)},className:i()("vpf-tiles-preview-button",n===t.value?"vpf-tiles-preview-button-active":"")},e.renderPreview(t.value))})))),wp.element.createElement("div",{className:"vpf-tiles-preview-button"},this.renderPreview(n))))}}])&&le(n.prototype,r),o&&le(n,o),a}(ge);function we(e){return(we="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 ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Se(e,t){return(Se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ee(e,t){return!t||"object"!==we(t)&&"function"!=typeof t?_e(e):t}function _e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ce(){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}}function Te(e){return(Te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Le=wp.element.Component,Ae=wp.components.Toolbar,Oe={left:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 4H1V5.22222H19V4ZM11.2857 8.88889H1V10.1111H11.2857V8.88889ZM1 13.7778H13.8571V15H1V13.7778Z",fill:"currentColor"})),center:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.57286 13.7778H16.43V15H3.57286V13.7778Z",fill:"currentColor"}),wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.14 8.88889H4.85429V10.1111H15.14V8.88889Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M1 4H19V5.22222H1V4Z",fill:"currentColor"})),right:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 4H19V5.22222H1V4ZM8.71429 8.88889H19V10.1111H8.71429V8.88889ZM19 13.7778H6.14286V15H19V13.7778Z",fill:"currentColor"}))},Re={top:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.4046 6.087L10 5.67517L9.59543 6.087L6.16686 9.587L6.976 10.413L9.42857 7.90817V17H10.5714V7.90817L13.024 10.413L13.8331 9.587L10.4046 6.087V6.087ZM18 4.16667V3H2V4.16667H18Z",fill:"currentColor"})),center:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 7.98287L10.4046 7.58575L12.6903 5.33575L11.8811 4.53925L10.5714 5.82963V1H9.42857V5.82963L8.11886 4.53925L7.30971 5.33575L9.59543 7.58575L10 7.98287ZM10 12.0171L10.4046 12.4142L12.6903 14.6642L11.8811 15.4608L10.5714 14.1704V19H9.42857V14.1704L8.11886 15.4608L7.30971 14.6642L9.59543 12.4142L10 12.0171ZM2 10.5625H18V9.4375H2V10.5625Z",fill:"currentColor"})),bottom:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.4046 13.913L10 14.3248L9.59543 13.913L6.16686 10.413L6.976 9.587L9.42857 12.0918V3H10.5714V12.0918L13.024 9.587L13.8331 10.413L10.4046 13.913V13.913ZM18 15.8333V17H2V15.8333H18Z",fill:"currentColor"}))},$e=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&&Se(e,t)}(s,e);var t,n,r,i,o=(t=s,function(){var e,n=Te(t);if(Ce()){var r=Te(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Ee(this,e)});function s(){var e;ke(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).getAlignObject=e.getAlignObject.bind(_e(e)),e.getAlignString=e.getAlignString.bind(_e(e)),e}return n=s,(r=[{key:"getAlignObject",value:function(){var e="center",t="center",n=this.props.value.split("-");return n[1]?(n[0]&&(t=n[0]),n[1]&&(e=n[1])):n[0]&&(e=n[0]),{h:e,v:t}}},{key:"getAlignString",value:function(e,t){return this.props.extended?"".concat(t&&"center"!==t?"".concat(t,"-"):"").concat(e):e}},{key:"render",value:function(){var e=this,t=this.props,n=t.extended,r=t.onChange,i=this.getAlignObject(),o=[];return Object.keys(Oe).forEach((function(t){o.push({icon:Oe[t],title:"".concat(n?"Horizontal ":"").concat(t.charAt(0).toUpperCase()+t.slice(1)),onClick:function(){return r(e.getAlignString(t,i.v))},isActive:i.h===t})})),n&&(o.push({className:"vpf-component-align-control-separator"}),Object.keys(Re).forEach((function(t){o.push({icon:Re[t],title:"Vertical ".concat(t.charAt(0).toUpperCase()+t.slice(1)),onClick:function(){return r(e.getAlignString(i.h,t))},isActive:i.v===t})}))),wp.element.createElement("div",{className:"vpf-component-align-control"},wp.element.createElement(Ae,{controls:o}))}}])&&xe(n.prototype,r),i&&xe(n,i),s}(Le);function Me(e){return(Me="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 je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ie(e,t){return(Ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ne(e,t){return!t||"object"!==Me(t)&&"function"!=typeof t?Fe(e):t}function Fe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function De(){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}}function We(e){return(We=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ze=wp.i18n.__,Be=wp.element.Component,Ve=wp.components,He=Ve.SelectControl,Ue=Ve.TextControl,Ge={"":ze("Auto","@@text_domain"),"16:9":ze("Wide 16:9","@@text_domain"),"21:9":ze("Ultra Wide 21:9","@@text_domain"),"4:3":ze("TV 4:3","@@text_domain"),"3:2":ze("Classic Film 3:2","@@text_domain"),custom:ze("Custom","@@text_domain")},qe=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&&Ie(e,t)}(s,e);var t,n,r,i,o=(t=s,function(){var e,n=We(t);if(De()){var r=We(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Ne(this,e)});function s(){var e;je(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={isCustom:void 0===Ge[e.props.value]},e.updatePart=e.updatePart.bind(Fe(e)),e}return n=s,(r=[{key:"parseParts",value:function(e){var t="",n="";if(e&&/:/g.test(e)){var r=e.split(":");t=r[0],n=r[1]}return[t,n]}},{key:"updatePart",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.props,r=n.value,i=n.onChange,o=this.parseParts(r);e&&o[0]&&o[1]&&(t?o[0]=e:o[1]=e,i("".concat(o[0],":").concat(o[1])))}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=t.onChange,i=this.state.isCustom,o=this.parseParts(n);return wp.element.createElement("div",{className:"vpf-component-aspect-ratio"},wp.element.createElement(He,{value:i?"custom":n,onChange:function(t){"custom"===t?e.setState({isCustom:!0}):(e.setState({isCustom:!1}),r(t))},options:Object.keys(Ge).map((function(e){return{label:Ge[e],value:e}}))}),i?wp.element.createElement("div",{className:"vpf-component-aspect-ratio-custom"},wp.element.createElement(Ue,{label:ze("Width","@@text_domain"),type:"number",value:o[0],onChange:function(t){return e.updatePart(t,!0)}}),wp.element.createElement(Ue,{label:ze("Height","@@text_domain"),type:"number",value:o[1],onChange:function(t){return e.updatePart(t,!1)}})):"")}}])&&Pe(n.prototype,r),i&&Pe(n,i),s}(Be),Ke=n(42);function Ye(e){return(Ye="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 Xe(e){return function(e){if(Array.isArray(e))return Je(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Je(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(n),!0).forEach((function(t){et(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tt(){return(tt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function it(e,t){return(it=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ot(e,t){return!t||"object"!==Ye(t)&&"function"!=typeof t?st(e):t}function st(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function at(){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}}function lt(e){return(lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ct=wp.i18n.__,ut=wp.element,ht=ut.Component,dt=ut.Fragment,pt=wp.components,ft=pt.PanelBody,mt=pt.Button,gt=pt.DropdownMenu,vt=pt.Dropdown,bt=pt.Toolbar,yt=pt.BaseControl,wt={left:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("rect",{x:"0.75",y:"0.75",width:"18.5",height:"18.5",rx:"3.25",fill:"transparent",stroke:"currentColor",strokeWidth:"1.5"}),wp.element.createElement("line",{x1:"4.5",y1:"4.5",x2:"4.5",y2:"15.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}),wp.element.createElement("line",{x1:"9.5",y1:"4.5",x2:"9.5",y2:"15.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})),center:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("rect",{x:"0.75",y:"0.75",width:"18.5",height:"18.5",rx:"3.25",fill:"transparent",stroke:"currentColor",strokeWidth:"1.5"}),wp.element.createElement("line",{x1:"7.5",y1:"4.5",x2:"7.5",y2:"15.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}),wp.element.createElement("line",{x1:"12.5",y1:"4.5",x2:"12.5",y2:"15.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})),right:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("rect",{x:"0.75",y:"0.75",width:"18.5",height:"18.5",rx:"3.25",fill:"transparent",stroke:"currentColor",strokeWidth:"1.5"}),wp.element.createElement("line",{x1:"15.5",y1:"15.5",x2:"15.5",y2:"4.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}),wp.element.createElement("line",{x1:"10.5",y1:"15.5",x2:"10.5",y2:"4.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})),between:wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("rect",{x:"0.75",y:"0.75",width:"18.5",height:"18.5",rx:"3.25",fill:"transparent",stroke:"currentColor",strokeWidth:"1.5"}),wp.element.createElement("line",{x1:"15.5",y1:"15.5",x2:"15.5",y2:"4.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}),wp.element.createElement("line",{x1:"4.5",y1:"15.5",x2:"4.5",y2:"4.5",fill:"transparent",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}))},kt=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&&it(e,t)}(a,e);var t,n,r,o,s=(t=a,function(){var e,n=lt(t);if(at()){var r=lt(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return ot(this,e)});function a(){var e;nt(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=s.call.apply(s,[this].concat(n))).getLocationData=e.getLocationData.bind(st(e)),e.renderOptions=e.renderOptions.bind(st(e)),e.renderLocation=e.renderLocation.bind(st(e)),e.renderAlignSettings=e.renderAlignSettings.bind(st(e)),e}return n=a,(r=[{key:"getLocationData",value:function(e){var t=this.props,n=t.options,r=t.locations,i=t.value,o=r[e]&&r[e].title||!1,s=i[e]&&i[e].elements?i[e].elements:[],a=!(!i[e]||!i[e].align)&&i[e].align,l=r[e]&&r[e].align?r[e].align:[],c={};return Object.keys(n).forEach((function(t){var r=n[t];r.allowed_locations&&-1===r.allowed_locations.indexOf(e)||-1!==s.indexOf(t)||(c[t]=r)})),{title:o,elements:s,align:a,availableAlign:l,availableElements:c}}},{key:"renderOptions",value:function(e){var t=this.props,n=t.value,r=t.onChange,i=t.options,o=t.props,s=this.getLocationData(e),a=[];return s.elements.length&&s.elements.forEach((function(t){a.push(wp.element.createElement(vt,{key:t,renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return wp.element.createElement("button",{type:"button","aria-expanded":n,className:"vpf-component-elements-selector-control-location-options-item",onClick:r},i[t]?i[t].title:t,wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M8 4L14 10L8 16",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})))},renderContent:function(){return wp.element.createElement(dt,null,i[t]&&i[t].category?wp.element.createElement(Co,tt({},o,{category:i[t].category,categoryToggle:!1})):"",wp.element.createElement(ft,null,wp.element.createElement(yt,{label:ct("Remove","@@text_domain")},wp.element.createElement("br",null),wp.element.createElement(mt,{isSecondary:!0,isSmall:!0,onClick:function(){window.confirm(ct("Are you sure you want to remove the element?","@@text_domain"))&&r(Ze(Ze({},n),{},et({},e,Ze(Ze({},n[e]),{},{elements:s.elements.filter((function(e){return e!==t}))}))))}},ct("Remove Element","@@text_domain")))))}}))})),a}},{key:"renderAlignSettings",value:function(e){var t=this.props,n=t.value,r=t.onChange,i=this.getLocationData(e),o=[];return i.availableAlign.length&&i.availableAlign.forEach((function(t){o.push({icon:wt[t],title:"".concat(t.charAt(0).toUpperCase()+t.slice(1)),onClick:function(){r(Ze(Ze({},n),{},et({},e,Ze(Ze({},n[e]),{},{align:t}))))},isActive:!!i.align&&i.align===t})})),o.length?wp.element.createElement(vt,{renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return wp.element.createElement("button",{type:"button","aria-expanded":t,className:"vpf-component-elements-selector-control-location-options-item",onClick:n},i.align&&wt[i.align]?wt[i.align]:wt.center)},renderContent:function(){return wp.element.createElement(ft,null,wp.element.createElement(yt,{label:ct("Align","@@text_domain")},wp.element.createElement(bt,{controls:o})))}}):""}},{key:"renderLocation",value:function(e){var t=this.props,n=t.value,r=t.onChange,o=this.getLocationData(e),s=o.availableElements;return wp.element.createElement("div",{key:e,className:"vpf-component-elements-selector-control-location"},o.title?wp.element.createElement("div",{className:"vpf-component-elements-selector-control-location-title"},o.title):"",o.availableAlign.length?wp.element.createElement("div",{className:"vpf-component-elements-selector-control-location-align"},this.renderAlignSettings(e)):"",wp.element.createElement("div",{className:i()("vpf-component-elements-selector-control-location-options",o.align?"vpf-component-elements-selector-control-location-options-".concat(o.align):"")},this.renderOptions(e),Object.keys(s).length?wp.element.createElement(gt,{className:"vpf-component-elements-selector-control-location-options-add-button",position:"bottom",icon:wp.element.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",role:"img","aria-hidden":"true",focusable:"false"},wp.element.createElement("path",{d:"M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"})),controls:Object.keys(s).map((function(t){return{title:wp.element.createElement(dt,null,s[t].title,s[t].is_pro?wp.element.createElement("span",{className:"vpf-component-elements-selector-control-location-options-title-pro"},ct("PRO","@@text_domain")):""),onClick:function(){if(!s[t].is_pro){var i=Xe(o.elements);-1===i.indexOf(t)&&(i.push(t),r(Ze(Ze({},n),{},et({},e,Ze(Ze({},n[e]),{},{elements:i})))))}}}}))}):""))}},{key:"render",value:function(){var e=this,t=this.props.locations;return wp.element.createElement("div",{className:"vpf-component-elements-selector-control"},Object.keys(t).map((function(t){return e.renderLocation(t)})))}}])&&rt(n.prototype,r),o&&rt(n,o),a}(ht);function xt(){return(xt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function St(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Et(e,t){if(e){if("string"==typeof e)return St(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?St(e,t):void 0}}function _t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(e,t)||Et(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ct(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ct(e,t,n[t])}))}return e}function Lt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function At(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ot(e,t,n){return t&&At(e.prototype,t),n&&At(e,n),e}function Rt(e){return(Rt="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 $t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mt(e,t){return!t||"object"!==Rt(t)&&"function"!=typeof t?$t(e):t}function jt(e){return(jt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pt(e,t){return(Pt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function It(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&&Pt(e,t)}var Nt=n(0),Ft=n(1),Dt=n.n(Ft),Wt=n(5),zt=n(7),Bt=n.n(zt);function Vt(e){return function(e){if(Array.isArray(e))return St(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Et(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ht=function(){function e(){Lt(this,e),Ct(this,"refs",{})}return Ot(e,[{key:"add",value:function(e,t){this.refs[e]||(this.refs[e]=[]),this.refs[e].push(t)}},{key:"remove",value:function(e,t){var n=this.getIndex(e,t);-1!==n&&this.refs[e].splice(n,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var e=this;return this.refs[this.active.collection].find((function(t){return t.node.sortableInfo.index==e.active.index}))}},{key:"getIndex",value:function(e,t){return this.refs[e].indexOf(t)}},{key:"getOrderedRefs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(Ut)}}]),e}();function Ut(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function Gt(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})}var qt={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},Kt=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];switch(t){case"ms":return"ms";default:return t&&t.length?t[0].toUpperCase()+t.substr(1):""}}();function Yt(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function Xt(e,t){e.style["".concat(Kt,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function Jt(e,t){e.style["".concat(Kt,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function Qt(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function Zt(e,t,n){return Math.max(e,Math.min(n,t))}function en(e){return"px"===e.substr(-2)?parseFloat(e):0}function tn(e){var t=window.getComputedStyle(e);return{bottom:en(t.marginBottom),left:en(t.marginLeft),right:en(t.marginRight),top:en(t.marginTop)}}function nn(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function rn(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function on(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function sn(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}function an(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var r={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?r:an(e.parentNode,t,r)}}function ln(e,t,n){return e<n&&e>t?e-1:e>n&&e<t?e+1:e}function cn(e){var t=e.lockOffset,n=e.width,r=e.height,i=t,o=t,s="px";if("string"==typeof t){var a=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);Bt()(null!==a,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),i=parseFloat(t),o=parseFloat(t),s=a[1]}return Bt()(isFinite(i)&&isFinite(o),"lockOffset value should be a finite. Given %s",t),"%"===s&&(i=i*n/100,o=o*r/100),{x:i,y:o}}function un(e){var t=e.height,n=e.width,r=e.lockOffset,i=Array.isArray(r)?r:[r,r];Bt()(2===i.length,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",r);var o=_t(i,2),s=o[0],a=o[1];return[cn({height:t,lockOffset:s,width:n}),cn({height:t,lockOffset:a,width:n})]}function hn(e){return e instanceof HTMLElement?function(e){var t=window.getComputedStyle(e),n=/(auto|scroll)/;return["overflow","overflowX","overflowY"].find((function(e){return n.test(t[e])}))}(e)?e:hn(e.parentNode):null}function dn(e){var t=window.getComputedStyle(e);return"grid"===t.display?{x:en(t.gridColumnGap),y:en(t.gridRowGap)}:{x:0,y:0}}var pn=27,fn=32,mn=37,gn=38,vn=39,bn=40,yn="A",wn="BUTTON",kn="CANVAS",xn="INPUT",Sn="OPTION",En="TEXTAREA",_n="SELECT";function Cn(e){var t="input, textarea, select, canvas, [contenteditable]",n=e.querySelectorAll(t),r=e.cloneNode(!0);return Vt(r.querySelectorAll(t)).forEach((function(e,t){("file"!==e.type&&(e.value=n[t].value),"radio"===e.type&&e.name&&(e.name="__sortableClone__".concat(e.name)),e.tagName===kn&&n[t].width>0&&n[t].height>0)&&e.getContext("2d").drawImage(n[t],0,0)})),r}function Tn(e){return null!=e.sortableHandle}var Ln=function(){function e(t,n){Lt(this,e),this.container=t,this.onScrollCallback=n}return Ot(e,[{key:"clear",value:function(){null!=this.interval&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(e){var t=this,n=e.translate,r=e.minTranslate,i=e.maxTranslate,o=e.width,s=e.height,a={x:0,y:0},l={x:1,y:1},c=10,u=10,h=this.container,d=h.scrollTop,p=h.scrollLeft,f=h.scrollHeight,m=h.scrollWidth,g=0===d,v=f-d-h.clientHeight==0,b=0===p,y=m-p-h.clientWidth==0;n.y>=i.y-s/2&&!v?(a.y=1,l.y=u*Math.abs((i.y-s/2-n.y)/s)):n.x>=i.x-o/2&&!y?(a.x=1,l.x=c*Math.abs((i.x-o/2-n.x)/o)):n.y<=r.y+s/2&&!g?(a.y=-1,l.y=u*Math.abs((n.y-s/2-r.y)/s)):n.x<=r.x+o/2&&!b&&(a.x=-1,l.x=c*Math.abs((n.x-o/2-r.x)/o)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===a.x&&0===a.y||(this.interval=setInterval((function(){t.isAutoScrolling=!0;var e={left:l.x*a.x,top:l.y*a.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)}),5))}}]),e}();var An={axis:Dt.a.oneOf(["x","y","xy"]),contentWindow:Dt.a.any,disableAutoscroll:Dt.a.bool,distance:Dt.a.number,getContainer:Dt.a.func,getHelperDimensions:Dt.a.func,helperClass:Dt.a.string,helperContainer:Dt.a.oneOfType([Dt.a.func,"undefined"==typeof HTMLElement?Dt.a.any:Dt.a.instanceOf(HTMLElement)]),hideSortableGhost:Dt.a.bool,keyboardSortingTransitionDuration:Dt.a.number,lockAxis:Dt.a.string,lockOffset:Dt.a.oneOfType([Dt.a.number,Dt.a.string,Dt.a.arrayOf(Dt.a.oneOfType([Dt.a.number,Dt.a.string]))]),lockToContainerEdges:Dt.a.bool,onSortEnd:Dt.a.func,onSortMove:Dt.a.func,onSortOver:Dt.a.func,onSortStart:Dt.a.func,pressDelay:Dt.a.number,pressThreshold:Dt.a.number,keyCodes:Dt.a.shape({lift:Dt.a.arrayOf(Dt.a.number),drop:Dt.a.arrayOf(Dt.a.number),cancel:Dt.a.arrayOf(Dt.a.number),up:Dt.a.arrayOf(Dt.a.number),down:Dt.a.arrayOf(Dt.a.number)}),shouldCancelStart:Dt.a.func,transitionDuration:Dt.a.number,updateBeforeSortStart:Dt.a.func,useDragHandle:Dt.a.bool,useWindowAsScrollContainer:Dt.a.bool},On={lift:[fn],drop:[fn],cancel:[pn],up:[gn,mn],down:[bn,vn]},Rn={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:On,shouldCancelStart:function(e){return-1!==[xn,En,_n,Sn,wn].indexOf(e.target.tagName)||!!Qt(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},$n=Object.keys(An);function Mn(e){Bt()(!(e.distance&&e.pressDelay),"Attempted to set both `pressDelay` and `distance` on SortableContainer, you may only use one or the other, not both at the same time.")}function jn(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,value)}var Pn={index:Dt.a.number.isRequired,collection:Dt.a.oneOfType([Dt.a.number,Dt.a.string]),disabled:Dt.a.bool},In=Object.keys(Pn);function Nn(e){return(Nn="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 Fn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wn(e,t){return(Wn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zn(e,t){return!t||"object"!==Nn(t)&&"function"!=typeof t?Bn(e):t}function Bn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vn(){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}}function Hn(e){return(Hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Un(){return(Un=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Gn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gn(Object(n),!0).forEach((function(t){Kn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yn(e){return function(e){if(Array.isArray(e))return Xn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Xn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Jn=wp.i18n.__,Qn=wp.hooks.addFilter,Zn=wp.element,er=Zn.Fragment,tr=Zn.Component,nr=Zn.createRef,rr=wp.components,ir=rr.Button,or=rr.Dropdown,sr=rr.FocalPointPicker,ar=rr.withNotices,lr=wp.compose,cr=lr.compose,ur=lr.withInstanceId,hr=wp.blockEditor.MediaUpload,dr=["image"];var pr=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){return Lt(this,n),Mt(this,jt(n).apply(this,arguments))}return It(n,t),Ot(n,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(e){this.node&&(e.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),e.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),e.collection!==this.props.collection&&(this.unregister(e.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var e=this.props,t=e.collection,n=e.disabled,r=e.index,i=Object(Wt.findDOMNode)(this);i.sortableInfo={collection:t,disabled:n,index:r,manager:this.context.manager},this.node=i,this.ref={node:i},this.context.manager.add(t,this.ref)}},{key:"unregister",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return Bt()(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.refs.wrappedInstance}},{key:"render",value:function(){var t=r.withRef?"wrappedInstance":null;return Object(Nt.createElement)(e,xt({ref:t},Gt(this.props,In)))}}]),n}(Nt.Component),Ct(t,"displayName",nn("sortableElement",e)),Ct(t,"contextTypes",{manager:Dt.a.object.isRequired}),Ct(t,"propTypes",Pn),Ct(t,"defaultProps",{collection:0}),n}((function(e){var t=e.img,n=e.items,r=e.idx,i=e.onChange,o=e.imageControls,s=e.controlName,a=e.attributes,l=e.focalPoint,c=e.isSetupWizard;return wp.element.createElement(or,{key:"".concat(t.id||t.imgThumbnailUrl||t.imgUrl,"-").concat(r),position:"bottom center",className:"vpf-component-gallery-control-item",renderToggle:function(e){var o=e.isOpen,s=e.onToggle;return wp.element.createElement(er,null,wp.element.createElement(ir,{className:"vpf-component-gallery-control-item-button",onClick:s,"aria-expanded":o},wp.element.createElement("img",{src:t.imgThumbnailUrl||t.imgUrl,alt:t.alt||t.imgThumbnailUrl||t.imgUrl}),wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},wp.element.createElement("circle",{cx:"12",cy:"12",r:"3"}),wp.element.createElement("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"}))),wp.element.createElement(ir,{className:"vpf-component-gallery-control-item-remove",onClick:function(){var e=Yn(n);e[r]&&(e.splice(r,1),i(e))}},wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M3.5 5.5H7.5M16.5 5.5H12.5M12.5 5.5V2.5H7.5V5.5M12.5 5.5H7.5M5 8.5L6 17H14L15 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"transparent"}))))},renderContent:function(){return wp.element.createElement("div",{className:"vpf-component-gallery-control-item-dropdown"},l?wp.element.createElement(sr,{url:t.imgThumbnailUrl||t.imgUrl,value:t.focalPoint,onChange:function(e){var t=Yn(n);t[r]&&(t[r]=qn(qn({},t[r]),{},{focalPoint:e}),i(t))}}):"",Object.keys(o).map((function(e){var l=[],u="".concat(s,"[").concat(r,"].").concat(e);return o[e].condition.length&&o[e].condition.forEach((function(e){var t=qn({},e);t.control&&/SELF/g.test(t.control)&&(t.control=t.control.replace(/SELF/g,"".concat(s,"[").concat(r,"]"))),l.push(t)})),wp.element.createElement(Co.Control,Un({key:"".concat(t.id||t.imgThumbnailUrl||t.imgUrl,"-").concat(r,"-").concat(e),attributes:a,onChange:function(t){var o=Yn(n);o[r]&&(o[r]=qn(qn({},o[r]),{},Kn({},e,t)),i(o))}},o[e],{name:u,value:t[e],condition:l,isSetupWizard:c}))})))}})})),fr=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(e){var t;return Lt(this,n),Ct($t($t(t=Mt(this,jt(n).call(this,e)))),"state",{}),Ct($t($t(t)),"handleStart",(function(e){var n=t.props,r=n.distance,i=n.shouldCancelStart;if(2!==e.button&&!i(e)){t.touched=!0,t.position=on(e);var o=Qt(e.target,(function(e){return null!=e.sortableInfo}));if(o&&o.sortableInfo&&t.nodeIsChild(o)&&!t.state.sorting){var s=t.props.useDragHandle,a=o.sortableInfo,l=a.index,c=a.collection;if(a.disabled)return;if(s&&!Qt(e.target,Tn))return;t.manager.active={collection:c,index:l},sn(e)||e.target.tagName!==yn||e.preventDefault(),r||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout((function(){return t.handlePress(e)}),t.props.pressDelay))}}})),Ct($t($t(t)),"nodeIsChild",(function(e){return e.sortableInfo.manager===t.manager})),Ct($t($t(t)),"handleMove",(function(e){var n=t.props,r=n.distance,i=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var o=on(e),s={x:t.position.x-o.x,y:t.position.y-o.y},a=Math.abs(s.x)+Math.abs(s.y);t.delta=s,r||i&&!(a>=i)?r&&a>=r&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}})),Ct($t($t(t)),"handleEnd",(function(){t.touched=!1,t.cancel()})),Ct($t($t(t)),"cancel",(function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)})),Ct($t($t(t)),"handlePress",(function(e){try{var n=t.manager.getActive(),r=function(){if(n){var r=function(){var n=d.sortableInfo.index,r=tn(d),i=dn(t.container),c=t.scrollContainer.getBoundingClientRect(),m=s({index:n,node:d,collection:p});if(t.node=d,t.margin=r,t.gridGap=i,t.width=m.width,t.height=m.height,t.marginOffset={x:t.margin.left+t.margin.right+t.gridGap.x,y:Math.max(t.margin.top,t.margin.bottom,t.gridGap.y)},t.boundingClientRect=d.getBoundingClientRect(),t.containerBoundingRect=c,t.index=n,t.newIndex=n,t.axis={x:o.indexOf("x")>=0,y:o.indexOf("y")>=0},t.offsetEdge=an(d,t.container),t.initialOffset=on(f?Tt({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild(Cn(d)),Yt(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-r.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-r.top,"px"),width:"".concat(t.width,"px")}),f&&t.helper.focus(),l&&(t.sortableGhost=d,Yt(d,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},f){var g=h?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,v=g.top,b=g.left,y=g.width,w=v+g.height,k=b+y;t.axis.x&&(t.minTranslate.x=b-t.boundingClientRect.left,t.maxTranslate.x=k-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=v-t.boundingClientRect.top,t.maxTranslate.y=w-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(h?0:c.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(h?t.contentWindow.innerWidth:c.left+c.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(h?0:c.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(h?t.contentWindow.innerHeight:c.top+c.height)-t.boundingClientRect.top-t.height/2);a&&a.split(" ").forEach((function(e){return t.helper.classList.add(e)})),t.listenerNode=e.touches?d:t.contentWindow,f?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(qt.move.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)})),qt.end.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)}))),t.setState({sorting:!0,sortingIndex:n}),u&&u({node:d,index:n,collection:p,isKeySorting:f,nodes:t.manager.getOrderedRefs(),helper:t.helper},e),f&&t.keyMove(0)},i=t.props,o=i.axis,s=i.getHelperDimensions,a=i.helperClass,l=i.hideSortableGhost,c=i.updateBeforeSortStart,u=i.onSortStart,h=i.useWindowAsScrollContainer,d=n.node,p=n.collection,f=t.manager.isKeySorting,m=function(){if("function"==typeof c){t._awaitingUpdateBeforeSortStart=!0;var n=jn((function(){var t=d.sortableInfo.index;return Promise.resolve(c({collection:p,index:t,node:d,isKeySorting:f},e)).then((function(){}))}),(function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n}));if(n&&n.then)return n.then((function(){}))}}();return m&&m.then?m.then(r):r()}}();return Promise.resolve(r&&r.then?r.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})),Ct($t($t(t)),"handleSortMove",(function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)})),Ct($t($t(t)),"handleSortEnd",(function(e){var n=t.props,r=n.hideSortableGhost,i=n.onSortEnd,o=t.manager,s=o.active.collection,a=o.isKeySorting,l=t.manager.getOrderedRefs();t.listenerNode&&(a?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(qt.move.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)})),qt.end.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)})))),t.helper.parentNode.removeChild(t.helper),r&&t.sortableGhost&&Yt(t.sortableGhost,{opacity:"",visibility:""});for(var c=0,u=l.length;c<u;c++){var h=l[c],d=h.node;h.edgeOffset=null,h.boundingClientRect=null,Xt(d,null),Jt(d,null),h.translate=null}t.autoScroller.clear(),t.manager.active=null,t.manager.isKeySorting=!1,t.setState({sorting:!1,sortingIndex:null}),"function"==typeof i&&i({collection:s,newIndex:t.newIndex,oldIndex:t.index,isKeySorting:a,nodes:l},e),t.touched=!1})),Ct($t($t(t)),"autoscroll",(function(){var e=t.props.disableAutoscroll,n=t.manager.isKeySorting;if(e)t.autoScroller.clear();else{if(n){var r=Tt({},t.translate),i=0,o=0;return t.axis.x&&(r.x=Math.min(t.maxTranslate.x,Math.max(t.minTranslate.x,t.translate.x)),i=t.translate.x-r.x),t.axis.y&&(r.y=Math.min(t.maxTranslate.y,Math.max(t.minTranslate.y,t.translate.y)),o=t.translate.y-r.y),t.translate=r,Xt(t.helper,t.translate),t.scrollContainer.scrollLeft+=i,void(t.scrollContainer.scrollTop+=o)}t.autoScroller.update({height:t.height,maxTranslate:t.maxTranslate,minTranslate:t.minTranslate,translate:t.translate,width:t.width})}})),Ct($t($t(t)),"onAutoScroll",(function(e){t.translate.x+=e.left,t.translate.y+=e.top,t.animateNodes()})),Ct($t($t(t)),"handleKeyDown",(function(e){var n=e.keyCode,r=t.props,i=r.shouldCancelStart,o=r.keyCodes,s=Tt({},On,void 0===o?{}:o);t.manager.active&&!t.manager.isKeySorting||!(t.manager.active||s.lift.includes(n)&&!i(e)&&t.isValidSortingTarget(e))||(e.stopPropagation(),e.preventDefault(),s.lift.includes(n)&&!t.manager.active?t.keyLift(e):s.drop.includes(n)&&t.manager.active?t.keyDrop(e):s.cancel.includes(n)?(t.newIndex=t.manager.active.index,t.keyDrop(e)):s.up.includes(n)?t.keyMove(-1):s.down.includes(n)&&t.keyMove(1))})),Ct($t($t(t)),"keyLift",(function(e){var n=e.target,r=Qt(n,(function(e){return null!=e.sortableInfo})).sortableInfo,i=r.index,o=r.collection;t.initialFocusedNode=n,t.manager.isKeySorting=!0,t.manager.active={index:i,collection:o},t.handlePress(e)})),Ct($t($t(t)),"keyMove",(function(e){var n=t.manager.getOrderedRefs(),r=n[n.length-1].node.sortableInfo.index,i=t.newIndex+e,o=t.newIndex;if(!(i<0||i>r)){t.prevIndex=o,t.newIndex=i;var s=ln(t.newIndex,t.prevIndex,t.index),a=n.find((function(e){return e.node.sortableInfo.index===s})),l=a.node,c=t.containerScrollDelta,u=a.boundingClientRect||rn(l,c),h=a.translate||{x:0,y:0},d=u.top+h.y-c.top,p=u.left+h.x-c.left,f=o<i,m=f&&t.axis.x?l.offsetWidth-t.width:0,g=f&&t.axis.y?l.offsetHeight-t.height:0;t.handleSortMove({pageX:p+m,pageY:d+g,ignoreTransition:0===e})}})),Ct($t($t(t)),"keyDrop",(function(e){t.handleSortEnd(e),t.initialFocusedNode&&t.initialFocusedNode.focus()})),Ct($t($t(t)),"handleKeyEnd",(function(e){t.manager.active&&t.keyDrop(e)})),Ct($t($t(t)),"isValidSortingTarget",(function(e){var n=t.props.useDragHandle,r=e.target,i=Qt(r,(function(e){return null!=e.sortableInfo}));return i&&i.sortableInfo&&!i.sortableInfo.disabled&&(n?Tn(r):r.sortableInfo)})),Mn(e),t.manager=new Ht,t.events={end:t.handleEnd,move:t.handleMove,start:t.handleStart},t}return It(n,t),Ot(n,[{key:"getChildContext",value:function(){return{manager:this.manager}}},{key:"componentDidMount",value:function(){var e=this,t=this.props.useWindowAsScrollContainer,n=this.getContainer();Promise.resolve(n).then((function(n){e.container=n,e.document=e.container.ownerDocument||document;var r=e.props.contentWindow||e.document.defaultView||window;e.contentWindow="function"==typeof r?r():r,e.scrollContainer=t?e.document.scrollingElement||e.document.documentElement:hn(e.container)||e.container,e.autoScroller=new Ln(e.scrollContainer,e.onAutoScroll),Object.keys(e.events).forEach((function(t){return qt[t].forEach((function(n){return e.container.addEventListener(n,e.events[t],!1)}))})),e.container.addEventListener("keydown",e.handleKeyDown)}))}},{key:"componentWillUnmount",value:function(){var e=this;this.helper&&this.helper.parentNode&&this.helper.parentNode.removeChild(this.helper),this.container&&(Object.keys(this.events).forEach((function(t){return qt[t].forEach((function(n){return e.container.removeEventListener(n,e.events[t])}))})),this.container.removeEventListener("keydown",this.handleKeyDown))}},{key:"updateHelperPosition",value:function(e){var t=this.props,n=t.lockAxis,r=t.lockOffset,i=t.lockToContainerEdges,o=t.transitionDuration,s=t.keyboardSortingTransitionDuration,a=void 0===s?o:s,l=this.manager.isKeySorting,c=e.ignoreTransition,u=on(e),h={x:u.x-this.initialOffset.x,y:u.y-this.initialOffset.y};if(h.y-=window.pageYOffset-this.initialWindowScroll.top,h.x-=window.pageXOffset-this.initialWindowScroll.left,this.translate=h,i){var d=_t(un({height:this.height,lockOffset:r,width:this.width}),2),p=d[0],f=d[1],m={x:this.width/2-p.x,y:this.height/2-p.y},g={x:this.width/2-f.x,y:this.height/2-f.y};h.x=Zt(this.minTranslate.x+m.x,this.maxTranslate.x-g.x,h.x),h.y=Zt(this.minTranslate.y+m.y,this.maxTranslate.y-g.y,h.y)}"x"===n?h.y=0:"y"===n&&(h.x=0),l&&a&&!c&&Jt(this.helper,a),Xt(this.helper,h)}},{key:"animateNodes",value:function(){var e=this.props,t=e.transitionDuration,n=e.hideSortableGhost,r=e.onSortOver,i=this.containerScrollDelta,o=this.windowScrollDelta,s=this.manager.getOrderedRefs(),a=this.offsetEdge.left+this.translate.x+i.left,l=this.offsetEdge.top+this.translate.y+i.top,c=this.manager.isKeySorting,u=this.newIndex;this.newIndex=null;for(var h=0,d=s.length;h<d;h++){var p=s[h].node,f=p.sortableInfo.index,m=p.offsetWidth,g=p.offsetHeight,v={height:this.height>g?g/2:this.height/2,width:this.width>m?m/2:this.width/2},b=c&&f>this.index&&f<=u,y=c&&f<this.index&&f>=u,w={x:0,y:0},k=s[h].edgeOffset;k||(k=an(p,this.container),s[h].edgeOffset=k,c&&(s[h].boundingClientRect=rn(p,i)));var x=h<s.length-1&&s[h+1],S=h>0&&s[h-1];x&&!x.edgeOffset&&(x.edgeOffset=an(x.node,this.container),c&&(x.boundingClientRect=rn(x.node,i))),f!==this.index?(t&&Jt(p,t),this.axis.x?this.axis.y?y||f<this.index&&(a+o.left-v.width<=k.left&&l+o.top<=k.top+v.height||l+o.top+v.height<=k.top)?(w.x=this.width+this.marginOffset.x,k.left+w.x>this.containerBoundingRect.width-v.width&&x&&(w.x=x.edgeOffset.left-k.left,w.y=x.edgeOffset.top-k.top),null===this.newIndex&&(this.newIndex=f)):(b||f>this.index&&(a+o.left+v.width>=k.left&&l+o.top+v.height>=k.top||l+o.top+v.height>=k.top+g))&&(w.x=-(this.width+this.marginOffset.x),k.left+w.x<this.containerBoundingRect.left+v.width&&S&&(w.x=S.edgeOffset.left-k.left,w.y=S.edgeOffset.top-k.top),this.newIndex=f):b||f>this.index&&a+o.left+v.width>=k.left?(w.x=-(this.width+this.marginOffset.x),this.newIndex=f):(y||f<this.index&&a+o.left<=k.left+v.width)&&(w.x=this.width+this.marginOffset.x,null==this.newIndex&&(this.newIndex=f)):this.axis.y&&(b||f>this.index&&l+o.top+v.height>=k.top?(w.y=-(this.height+this.marginOffset.y),this.newIndex=f):(y||f<this.index&&l+o.top<=k.top+v.height)&&(w.y=this.height+this.marginOffset.y,null==this.newIndex&&(this.newIndex=f))),Xt(p,w),s[h].translate=w):n&&(this.sortableGhost=p,Yt(p,{opacity:0,visibility:"hidden"}))}null==this.newIndex&&(this.newIndex=this.index),c&&(this.newIndex=u);var E=c?this.prevIndex:u;r&&this.newIndex!==E&&r({collection:this.manager.active.collection,index:this.index,newIndex:this.newIndex,oldIndex:E,isKeySorting:c,nodes:s,helper:this.helper})}},{key:"getWrappedInstance",value:function(){return Bt()(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableContainer() call"),this.refs.wrappedInstance}},{key:"getContainer",value:function(){var e=this.props.getContainer;return"function"!=typeof e?Object(Wt.findDOMNode)(this):e(r.withRef?this.getWrappedInstance():void 0)}},{key:"render",value:function(){var t=r.withRef?"wrappedInstance":null;return Object(Nt.createElement)(e,xt({ref:t},Gt(this.props,$n)))}},{key:"helperContainer",get:function(){var e=this.props.helperContainer;return"function"==typeof e?e():this.props.helperContainer||this.document.body}},{key:"containerScrollDelta",get:function(){return this.props.useWindowAsScrollContainer?{left:0,top:0}:{left:this.scrollContainer.scrollLeft-this.initialScroll.left,top:this.scrollContainer.scrollTop-this.initialScroll.top}}},{key:"windowScrollDelta",get:function(){return{left:this.contentWindow.pageXOffset-this.initialWindowScroll.left,top:this.contentWindow.pageYOffset-this.initialWindowScroll.top}}}]),n}(Nt.Component),Ct(t,"displayName",nn("sortableList",e)),Ct(t,"defaultProps",Rn),Ct(t,"propTypes",An),Ct(t,"childContextTypes",{manager:Dt.a.object.isRequired}),n}((function(e){var t=e.items,n=e.onChange,r=e.imageControls,i=e.controlName,o=e.attributes,s=e.focalPoint,a=e.isSetupWizard,l=e.prepareImages;return wp.element.createElement("div",{className:"vpf-component-gallery-control-items"},t.map((function(e,l){return wp.element.createElement(pr,{key:"lzb-constructor-controls-items-sortable-".concat(e.id,"-").concat(l),index:l,img:e,idx:l,items:t,onChange:n,imageControls:r,controlName:i,attributes:o,focalPoint:s,isSetupWizard:a})})),wp.element.createElement(hr,{multiple:!0,onSelect:function(e){n([].concat(Yn(t),Yn(l(e))))},allowedTypes:dr,value:!1,render:function(e){var t=e.open;return wp.element.createElement(ir,{className:"vpf-component-gallery-control-item-add",onClick:function(e){e.stopPropagation(),t()}},wp.element.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",role:"img","aria-hidden":"true",focusable:"false"},wp.element.createElement("path",{d:"M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"})),wp.element.createElement("span",null,Jn("Add Images","@@text_domain")))}}))})),mr=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&&Wn(e,t)}(s,e);var t,n,r,i,o=(t=s,function(){var e,n=Hn(t);if(Vn()){var r=Hn(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return zn(this,e)});function s(){var e;Fn(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={hasError:!1},e.sortRef=nr(),e.onUploadError=e.onUploadError.bind(Bn(e)),e}return n=s,(r=[{key:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{key:"prepareImages",value:function(e){var t=[];return e&&e.length&&e.forEach((function(e){var n={id:e.id,imgUrl:e.url,imgThumbnailUrl:e.url};e.sizes&&e.sizes.thumbnail&&e.sizes.thumbnail.url?n.imgThumbnailUrl=e.sizes.thumbnail.url:e.sizes&&e.sizes.medium&&e.sizes.medium.url?n.imgThumbnailUrl=e.sizes.medium.url:e.sizes&&e.sizes.large&&e.sizes.large.url&&(n.imgThumbnailUrl=e.sizes.large.url),e.title&&(n.title=e.title),e.description&&(n.description=e.description),t.push(n)})),t}},{key:"render",value:function(){var e=this,t=this,n=this.props,r=n.imageControls,i=n.attributes,o=n.name,s=n.value,a=n.onChange,l=n.focalPoint,c=n.isSetupWizard,u=s.filter((function(e){return e.id}));return wp.element.createElement("div",{className:"vpf-component-gallery-control"},wp.element.createElement(hr,{onSelect:function(t){e.setState({hasError:!1}),a(e.prepareImages(t))},allowedTypes:dr,multiple:!0,value:u&&Object.keys(u).length?u.map((function(e){return e.id})):[],render:function(){return wp.element.createElement(er,null,wp.element.createElement(fr,{ref:t.sortRef,items:u,onChange:a,imageControls:r,controlName:o,attributes:i,focalPoint:l,isSetupWizard:c,prepareImages:t.prepareImages,axis:"xy",distance:"3",onSortEnd:function(e){var t=e.oldIndex,n=e.newIndex,r=function(e,t,n){if(n>=e.length)for(var r=n-e.length+1;r;)r-=1,e.push(void 0);return e.splice(n,0,e.splice(t,1)[0]),e}(Yn(u),t,n);a(r)},helperClass:"vpf-component-gallery-control-items-sortable",helperContainer:function(){return t.sortRef&&t.sortRef.current&&t.sortRef.current.container?t.sortRef.current.container:document.body}}))}}))}}])&&Dn(n.prototype,r),i&&Dn(n,i),s}(tr),gr=cr([ur,ar])(mr);function vr(e){return(vr="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 br(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wr(e,t){return(wr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kr(e,t){return!t||"object"!==vr(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 xr(){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}}function Sr(e){return(Sr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Qn("vpf.editor.controls-render-data","vpf/editor/controls-render-data/images-categories-suggestions",(function(e){if("images"===e.name){var t=[];e.attributes.images&&e.attributes.images.length&&e.attributes.images.forEach((function(e){e.categories&&e.categories.length&&e.categories.forEach((function(e){-1===t.indexOf(e)&&t.push(e)}))})),t.length&&e.image_controls&&e.image_controls.categories&&e.image_controls.categories.options&&(e.image_controls.categories.options=t.map((function(e){return{label:e,value:e}})))}return e}));var Er=wp.components.ColorPicker,_r=wp.element.Component,Cr=wp.i18n.__,Tr=wp.components,Lr=Tr.Dropdown,Ar=Tr.Tooltip,Or=Tr.BaseControl,Rr=wp.blockEditor.ColorPalette,$r=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&&wr(e,t)}(a,e);var t,n,r,o,s=(t=a,function(){var e,n=Sr(t);if(xr()){var r=Sr(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return kr(this,e)});function a(){var e;br(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=s.call.apply(s,[this].concat(n))).state={keyForPalette:e.props.value,keyForPicker:e.props.value},e}return n=a,(r=[{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=t.onChange,o=t.alpha,s=void 0!==o&&o,a=t.colorPalette,l=void 0===a||a,c=t.hint,u=void 0===c?Cr("Custom Color Picker","@@text_domain"):c,h=t.afterDropdownContent;return wp.element.createElement(Lr,{className:i()("components-color-palette__item-wrapper components-circular-option-picker__option-wrapper",n?"":"components-color-palette__custom-color"),contentClassName:"components-color-palette__picker",renderToggle:function(e){var t=e.isOpen,r=e.onToggle;return wp.element.createElement(Ar,{text:u},wp.element.createElement("button",{type:"button","aria-expanded":t,className:"components-color-palette__item components-circular-option-picker__option",onClick:r,"aria-label":u,style:{color:n||""}},wp.element.createElement("span",{className:"components-color-palette__custom-color-gradient"})))},renderContent:function(){return wp.element.createElement("div",{className:"vpf-component-color-picker"},wp.element.createElement(Er,{color:n,onChangeComplete:function(t){var n;if(void 0===t.rgb||1===t.rgb.a)n=t.hex;else{var i=t.rgb,o=i.r,s=i.g,a=i.b,l=i.a;n="rgba(".concat(o,", ").concat(s,", ").concat(a,", ").concat(l,")")}r(n||""),e.setState({keyForPalette:n})},disableAlpha:!s,key:e.state.keyForPicker}),l?wp.element.createElement(Or,{label:Cr("Color Palette","@@text_domain"),className:"vpf-component-color-picker-palette"},wp.element.createElement(Rr,{value:n,onChange:function(t){r(t||""),e.setState({keyForPicker:t})},disableCustomColors:!0,key:e.state.keyForPalette})):"",h||"")}})}}])&&yr(n.prototype,r),o&&yr(n,o),a}(_r);function Mr(e){return(Mr="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 jr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ir(e,t){return(Ir=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Nr(e,t){return!t||"object"!==Mr(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 Fr(){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}}function Dr(e){return(Dr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wr=wp.element.Component,zr=wp.i18n.__,Br=wp.date,Vr=Br.__experimentalGetSettings,Hr=Br.dateI18n,Ur=wp.components,Gr=Ur.Dropdown,qr=Ur.Button,Kr=Ur.DatePicker,Yr=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&&Ir(e,t)}(s,e);var t,n,r,i,o=(t=s,function(){var e,n=Dr(t);if(Fr()){var r=Dr(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Nr(this,e)});function s(){return jr(this,s),o.apply(this,arguments)}return n=s,(r=[{key:"render",value:function(){var e=this.props,t=e.value,n=e.onChange,r=Vr().formats.datetime||"F j, Y";return wp.element.createElement(Gr,{renderToggle:function(e){var n=e.onToggle;return wp.element.createElement(qr,{isSecondary:!0,isSmall:!0,onClick:n},t?Hr(r,t):zr("Select Date","@@text_domain"))},renderContent:function(){return wp.element.createElement("div",{className:"components-datetime vpf-component-date-picker"},wp.element.createElement(Kr,{currentDate:t,onChange:n}),t?wp.element.createElement(qr,{isSecondary:!0,isSmall:!0,onClick:function(){n("")}},zr("Reset Date","@@text_domain")):"")}})}}])&&Pr(n.prototype,r),i&&Pr(n,i),s}(Wr);function Xr(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,a)}l((r=r.apply(e,t||[])).next())}))}function Jr(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}var Qr=["text/plain","text/html"],Zr=function(){(console.warn||console.log).call(arguments)}.bind(console,"[clipboard-polyfill]"),ei=!0,ti=function(){function e(){this.m={}}return e.prototype.setData=function(e,t){ei&&-1===Qr.indexOf(e)&&Zr("Unknown data type: "+e,"Call clipboard.suppressWarnings() to suppress this warning."),this.m[e]=t},e.prototype.getData=function(e){return this.m[e]},e.prototype.forEach=function(e){for(var t in this.m)e(this.m[t],t)},e}(),ni=function(e){},ri=!0,ii=function(){(console.warn||console.log).apply(console,arguments)}.bind("[clipboard-polyfill]"),oi="text/plain";function si(e){return Xr(this,void 0,void 0,(function(){var t;return Jr(this,(function(n){if(ri&&!e.getData(oi)&&ii("clipboard.write() was called without a `text/plain` data type. On some platforms, this may result in an empty clipboard. Call clipboard.suppressWarnings() to suppress this warning."),fi()){if(function(e){var t=e.getData(oi);if(void 0!==t)return window.clipboardData.setData("Text",t);throw new Error("No `text/plain` value was specified.")}(e))return[2];throw new Error("Copying failed, possibly because the user rejected it.")}if(ci(e))return ni("regular execCopy worked"),[2];if(navigator.userAgent.indexOf("Edge")>-1)return ni('UA "Edge" => assuming success'),[2];if(ui(document.body,e))return ni("copyUsingTempSelection worked"),[2];if(function(e){var t=document.createElement("div");t.setAttribute("style","-webkit-user-select: text !important"),t.textContent="temporary element",document.body.appendChild(t);var n=ui(t,e);return document.body.removeChild(t),n}(e))return ni("copyUsingTempElem worked"),[2];if(void 0!==(t=e.getData(oi))&&function(e){ni("copyTextUsingDOM");var t=document.createElement("div");t.setAttribute("style","-webkit-user-select: text !important");var n=t;t.attachShadow&&(ni("Using shadow DOM."),n=t.attachShadow({mode:"open"}));var r=document.createElement("span");r.innerText=e,n.appendChild(r),document.body.appendChild(t),hi(r);var i=document.execCommand("copy");return di(),document.body.removeChild(t),i}(t))return ni("copyTextUsingDOM worked"),[2];throw new Error("Copy command failed.")}))}))}function ai(e){return Xr(this,void 0,void 0,(function(){return Jr(this,(function(t){return navigator.clipboard&&navigator.clipboard.writeText?(ni("Using `navigator.clipboard.writeText()`."),[2,navigator.clipboard.writeText(e)]):[2,si(pi(e))]}))}))}var li=function(){this.success=!1};function ci(e){var t=new li,n=function(e,t,n){ni("listener called"),e.success=!0,t.forEach((function(t,r){var i=n.clipboardData;i.setData(r,t),r===oi&&i.getData(r)!==t&&(ni("setting text/plain failed"),e.success=!1)})),n.preventDefault()}.bind(this,t,e);document.addEventListener("copy",n);try{document.execCommand("copy")}finally{document.removeEventListener("copy",n)}return t.success}function ui(e,t){hi(e);var n=ci(t);return di(),n}function hi(e){var t=document.getSelection();if(t){var n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}}function di(){var e=document.getSelection();e&&e.removeAllRanges()}function pi(e){var t=new ti;return t.setData(oi,e),t}function fi(){return"undefined"==typeof ClipboardEvent&&void 0!==window.clipboardData&&void 0!==window.clipboardData.setData}function mi(){return(mi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function gi(e){return(gi="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 vi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yi(e,t,n){return t&&bi(e.prototype,t),n&&bi(e,n),e}function wi(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&&ki(e,t)}function ki(e,t){return(ki=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xi(e){return function(){var t,n=Ci(e);if(_i()){var r=Ci(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return Si(this,t)}}function Si(e,t){return!t||"object"!==gi(t)&&"function"!=typeof t?Ei(e):t}function Ei(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _i(){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}}function Ci(e){return(Ci=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ti=wp.element,Li=Ti.Component,Ai=Ti.Fragment;function Oi(e){if(e&&e.hasChildNodes()){for(var t=[],n=0;n<e.childNodes.length;n+=1)t.push(Oi(e.childNodes[n]));return{classList:e.classList,nodeName:e.nodeName,children:t}}return!1}var Ri=function(e){wi(n,e);var t=xi(n);function n(){var e;vi(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={nodes:!1},e.onFrameLoad=e.onFrameLoad.bind(Ei(e)),e.maybeFindIframe=e.maybeFindIframe.bind(Ei(e)),e.updateTreeData=e.updateTreeData.bind(Ei(e)),e}return yi(n,[{key:"componentDidMount",value:function(){this.maybeFindIframe()}},{key:"componentDidUpdate",value:function(){this.maybeFindIframe()}},{key:"componentWillUnmount",value:function(){this.iframePreview&&this.iframePreview.removeEventListener("load",this.onFrameLoad)}},{key:"onFrameLoad",value:function(){this.iframePreview.contentWindow&&(this.frameWindow=this.iframePreview.contentWindow,this.frameJQuery=this.iframePreview.contentWindow.jQuery,this.$framePortfolio=this.frameJQuery(".vp-portfolio"),this.updateTreeData())}},{key:"maybeFindIframe",value:function(){if(!this.iframePreview){var e=this.props.clientId,t=document.getElementById("vpf-preview-".concat(e));t&&(this.iframePreview=t,this.iframePreview.addEventListener("load",this.onFrameLoad),this.onFrameLoad())}}},{key:"updateTreeData",value:function(){this.$framePortfolio&&this.setState({nodes:Oi(this.$framePortfolio[0])})}},{key:"render",value:function(){return this.iframePreview?wp.element.createElement("div",{className:"vpf-component-classes-tree"},wp.element.createElement(n.TreeItem,{node:this.state.nodes,skipNodeByClass:/vp-portfolio__item-popup/,collapseByClass:/^(vp-portfolio__preloader-wrap|vp-portfolio__filter-wrap|vp-portfolio__sort-wrap|vp-portfolio__items-wrap|vp-portfolio__pagination-wrap)$/,skipClass:/vp-uid-/})):""}}]),n}(Li);function $i(){return($i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Mi(e){return(Mi="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 ji(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ii(e,t,n){return t&&Pi(e.prototype,t),n&&Pi(e,n),e}function Ni(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&&Fi(e,t)}function Fi(e,t){return(Fi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Di(e){return function(){var t,n=Bi(e);if(zi()){var r=Bi(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return Wi(this,t)}}function Wi(e,t){return!t||"object"!==Mi(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 zi(){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}}function Bi(e){return(Bi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ri.TreeItem=function(e){wi(n,e);var t=xi(n);function n(){var e;vi(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={isCollapsed:null},e.isCollapsed=e.isCollapsed.bind(Ei(e)),e}return yi(n,[{key:"isCollapsed",value:function(){var e=this.props,t=e.node,n=e.collapseByClass,r=this.state.isCollapsed;return null===r&&t&&t.classList&&t.classList.length&&t.classList.forEach((function(e){n&&n.test(e)&&(r=!0)})),r}},{key:"render",value:function(){var e=this,t=this.props,n=t.node,r=t.skipNodeByClass,i=t.skipClass;if(!n||!n.children.length)return"";var o=[],s=!1;return n.classList&&n.classList.length&&n.classList.forEach((function(e){i&&i.test(e)||o.push(e),r&&r.test(e)&&(s=!0)})),s?"":wp.element.createElement("ul",null,wp.element.createElement("li",{className:"vpf-component-classes-tree-node ".concat(this.isCollapsed()?"":"is-collapsed")},wp.element.createElement("div",null,n.children.length?wp.element.createElement("button",{type:"button",className:"vpf-component-classes-tree-node-collapse",onClick:function(){return e.setState({isCollapsed:!e.isCollapsed()})}}):"","<",n.nodeName.toLowerCase(),o.length?wp.element.createElement(Ai,null,' class="',o.map((function(e){return wp.element.createElement("button",{key:e,type:"button",className:"vpf-component-classes-tree-node-class",onClick:function(){ai(e)}},e)})),'"'):"",">")),n.children.length&&this.isCollapsed()?n.children.map((function(t){return t?wp.element.createElement("li",{className:"vpf-component-classes-tree-child"},wp.element.createElement(Ri.TreeItem,mi({},e.props,{node:t}))):""})):"")}}]),n}(Li);var Vi=wp.element.Component,Hi=function(e){Ni(n,e);var t=Di(n);function n(){return ji(this,n),t.apply(this,arguments)}return Ii(n,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.children,r=e.contentBefore,i=void 0===r?"":r,o=e.contentAfter,s=void 0===o?"":o;return wp.element.createElement("div",{className:"vpf-pro-component-note"},i,wp.element.createElement("div",{className:"vpf-pro-component-note-inner"},t?wp.element.createElement("h3",null,t):"",n?wp.element.createElement("div",null,n):""),s)}}]),n}(Vi);Hi.Button=function(e){Ni(n,e);var t=Di(n);function n(){return ji(this,n),t.apply(this,arguments)}return Ii(n,[{key:"render",value:function(){var e=this.props.children;return wp.element.createElement("a",$i({className:"vpf-pro-component-note-button"},this.props),e)}}]),n}(Vi);var Ui=n(28),Gi=n(17);function qi(e){return(qi="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 Ki(){return(Ki=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Yi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ji(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zi(e,t){return(Zi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eo(e,t){return!t||"object"!==qi(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 to(){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}}function no(e){return(no=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ro=wp.i18n.__,io=wp.element,oo=io.Component,so=io.Fragment,ao=io.RawHTML,lo=wp.hooks.applyFilters,co=wp.components,uo=co.PanelBody,ho=co.Tooltip,po=co.BaseControl,fo=co.ButtonGroup,mo=co.Button,go=co.TextControl,vo=co.TextareaControl,bo=co.CheckboxControl,yo=co.RadioControl,wo=co.ToggleControl,ko=window.VPGutenbergVariables,xo=ko.controls,So=ko.controls_categories,Eo={},_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&&Zi(e,t)}(s,e);var t,n,r,i,o=(t=s,function(){var e,n=no(t);if(to()){var r=no(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return eo(this,e)});function s(){return Ji(this,s),o.apply(this,arguments)}return n=s,(r=[{key:"render",value:function(){var e=this.props,t=e.category,n=e.categoryToggle,r=void 0===n||n,i=e.attributes,o=e.setAttributes,a=e.controls,l=e.clientId,c=e.isSetupWizard;if(!i)return"";if(/^content-source-/g.test(t)&&"content-source-additional"!==t&&"content-source-".concat(i.content_source)!==t)return"";var u=a||xo,h=[];Object.keys(u).forEach((function(e){var n=u[e];if(!t||n.category&&t===n.category){var r=lo("vpf.editor.controls-render-data",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yi(Object(n),!0).forEach((function(t){Xi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({attributes:i,setAttributes:o,onChange:function(e){var t=lo("vpf.editor.controls-on-change",Xi({},n.name,e),n,e,i);o(t)}},n));s.AllowRender(r,c)&&h.push(lo("vpf.editor.controls-render",wp.element.createElement(s.Control,Ki({key:"control-".concat(n.name,"-").concat(n.label)},r,{clientId:l,isSetupWizard:c})),r))}}));var d=!!r&&t,p=!1,f=!r;return r&&void 0!==So[t]&&(d=So[t].title,p=!!So[t].is_pro,void 0===Eo[t]&&(Eo[t]=So[t].is_opened||!1),f=Eo[t]),c?h.length?wp.element.createElement("div",{className:"vpf-setup-wizard-panel"},h):"":h.length?wp.element.createElement(uo,{title:!!d&&wp.element.createElement(so,null,d,p?wp.element.createElement("span",{className:"vpf-control-category-title-pro"},ro("PRO","@@text_domain")):""),initialOpen:f,onToggle:function(){Eo[t]=!f}},h):""}}])&&Qi(n.prototype,r),i&&Qi(n,i),s}(oo);_o.Control=function(e){var t=e.attributes,n=e.onChange,r=e.isSetupWizard;if(!_o.AllowRender(e,r))return"";var o="",s=e.label,a="",l=!!e.description&&wp.element.createElement(ao,null,e.description),c=i()("vpf-control-wrap","vpf-control-wrap-".concat(e.type)),u=Object(Gi.a)(e.name,t);switch(e.type){case"html":o=wp.element.createElement(ao,null,e.default);break;case"select":case"select2":o=wp.element.createElement(Ke.a,{controlName:e.name,callback:e.value_callback,attributes:t,value:u,options:e.options||{},onChange:function(e){return n(e)},isSearchable:e.searchable,isMultiple:e.multiple,isCreatable:e.creatable||e.tags});break;case"buttons":o=wp.element.createElement(fo,null,Object.keys(e.options||{}).map((function(t){return wp.element.createElement(mo,{isSmall:!0,isSecondary:!0,isPrimary:u===t,key:t,onClick:function(){return n(t)}},e.options[t])})));break;case"icons_selector":o=wp.element.createElement(L,{controlName:e.name,callback:e.value_callback,attributes:t,value:u,options:e.options,onChange:function(e){return n(e)}});break;case"tiles_selector":o=wp.element.createElement(ye,{value:u,options:e.options,onChange:function(e){return n(e)}});break;case"elements_selector":o=wp.element.createElement(kt,{value:u,locations:e.locations,options:e.options,onChange:function(e){return n(e)},props:e});break;case"align":o=wp.element.createElement($e,{value:u,extended:e.extended,onChange:function(e){return n(e)}});break;case"aspect_ratio":o=wp.element.createElement(qe,{value:u,onChange:function(e){return n(e)}});break;case"gallery":o=wp.element.createElement(gr,{imageControls:e.image_controls,focalPoint:e.focal_point,attributes:t,name:e.name,value:u,onChange:function(e){return n(e)},isSetupWizard:r});break;case"code_editor":o=wp.element.createElement(D,{value:u,mode:e.mode,maxLines:e.max_lines,minLines:e.min_lines,codePlaceholder:e.code_placeholder,onChange:function(e){return n(e)}}),e.allow_modal&&(a=wp.element.createElement(re,{modalTitle:ro("Custom CSS","@@text_domain"),buttonLabel:ro("Open in Modal","@@text_domain")},wp.element.createElement(po,{label:e.label,help:!!e.description&&wp.element.createElement(ao,null,e.description),className:i()("vpf-control-wrap","vpf-control-wrap-".concat(e.type))},wp.element.createElement("div",null,o)),e.classes_tree?wp.element.createElement(so,null,wp.element.createElement("p",null,ro("Classes Tree:","@@text_domain")),wp.element.createElement(Ri,e)):""));break;case"range":o=wp.element.createElement("div",{className:"components-base-control components-range-control"},wp.element.createElement("div",{className:"components-base-control__field"},wp.element.createElement("input",{className:"components-range-control__slider",type:"range",min:e.min,max:e.max,step:e.step,value:u,onChange:function(e){return n(parseFloat(e.target.value))}}),wp.element.createElement("input",{className:"components-range-control__number",type:"number",min:e.min,max:e.max,step:e.step,value:u,onChange:function(e){return n(parseFloat(e.target.value))}})));break;case"toggle":o=wp.element.createElement(wo,{checked:u,label:e.alongside,onChange:function(e){return n(e)}});break;case"checkbox":o=wp.element.createElement(bo,{checked:u,label:e.alongside,onChange:function(e){return n(e)}});break;case"radio":o=wp.element.createElement(yo,{label:s,selected:u,options:Object.keys(e.options||{}).map((function(t){return{label:e.options[t],value:t}})),onChange:function(e){return n(e)}}),s=!1;break;case"color":o=wp.element.createElement($r,{value:u,alpha:e.alpha,onChange:function(e){return n(e)}});break;case"date":o=wp.element.createElement(Yr,{value:u,onChange:function(e){return n(e)}});break;case"textarea":o=wp.element.createElement(vo,{label:s,value:u,onChange:function(e){return n(e)}}),s=!1;break;case"url":o=wp.element.createElement(go,{label:s,type:"url",value:u,onChange:function(e){return n(e)}}),s=!1;break;case"hidden":o=wp.element.createElement(go,{type:"hidden",value:u,onChange:function(e){return n(e)}});break;case"pro_note":o=wp.element.createElement(Hi,{title:s},l?wp.element.createElement("p",null,l):"",wp.element.createElement(Hi.Button,{target:"_blank",rel:"noopener noreferrer",href:"https://visualportfolio.co/pro/"},ro("Read More","@@text_domain"))),s=!1,l=!1;break;default:o=wp.element.createElement(go,{label:s,value:u,onChange:function(e){return n(e)}}),s=!1}return e.hint&&(o=wp.element.createElement(ho,{text:e.hint,position:e.hint_place},wp.element.createElement("div",null,o))),wp.element.createElement(so,null,wp.element.createElement(po,{label:s,help:l,className:c},wp.element.createElement("div",null,o)),a)},_o.AllowRender=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!e.skip&&(!(e.condition&&e.condition.length&&!Object(Ui.a)(e.condition,e.attributes))&&!(t&&!e.setup_wizard))};var Co=_o,To=n(43);function Lo(e){return(Lo="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 Ao(){return(Ao=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Oo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ro(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $o(e,t){return($o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mo(e,t){return!t||"object"!==Lo(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 jo(){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}}function Po(e){return(Po=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Io=wp.i18n.__,No=wp.element,Fo=No.Component,Do=No.Fragment,Wo=wp.components.Placeholder,zo=wp.blockEditor.InspectorControls,Bo=window.VPGutenbergVariables.controls_categories,Vo=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&&$o(e,t)}(l,e);var t,n,r,s,a=(t=l,function(){var e,n=Po(t);if(jo()){var r=Po(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Mo(this,e)});function l(){return Oo(this,l),a.apply(this,arguments)}return n=l,(r=[{key:"componentDidMount",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.block_id,i=t.content_source;t.setup_wizard||r&&i||n({setup_wizard:"true"})}},{key:"componentDidUpdate",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.setup_wizard,i=t.content_source,o=t.images;if(r&&i)switch(i){case"images":o&&o.length&&n({setup_wizard:"",items_count:-1});break;case"post-based":case"social-stream":n({setup_wizard:"",layout_elements:{top:{elements:[],align:"center"},items:{elements:["items"]},bottom:{elements:["pagination"],align:"center"}}});break;default:n({setup_wizard:""})}}},{key:"renderControls",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.attributes,r=n.content_source;return"portfolio"===r&&(r=""),wp.element.createElement(Do,null,wp.element.createElement(Co,Ao({category:"content-source"},e,{isSetupWizard:t})),r?wp.element.createElement(Do,null,Object.keys(Bo).map((function(n){return"content-source"===n?"":wp.element.createElement(Co,Ao({key:n,category:n},e,{isSetupWizard:t}))}))):"")}},{key:"render",value:function(){var e=this.props.attributes,t=this.props.className,n=e.setup_wizard,r=e.ghostkitClassname;return r&&(t=i()(t,r)),wp.element.createElement(Do,null,"true"!==n?wp.element.createElement(zo,null,this.renderControls(this.props)):"",wp.element.createElement("div",{className:t},"true"!==n?wp.element.createElement(To.a,this.props):wp.element.createElement(Wo,{className:"vpf-setup-wizard",icon:wp.element.createElement(o.a,{width:"20",height:"20"}),label:Io("Visual Portfolio","@@text_domain")},this.renderControls(this.props,!0))))}}])&&Ro(n.prototype,r),s&&Ro(n,s),l}(Fo)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1),a=n(0),l=n(45),c=n(46),u=c.getAceInstance(),h=u.require("ace/range").Range,d=function(e){function t(t){var n=e.call(this,t)||this;return c.editorEvents.forEach((function(e){n[e]=n[e].bind(n)})),n.debounce=c.debounce,n}return i(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,r=t.onBeforeLoad,i=t.onValidate,o=t.mode,s=t.focus,a=t.theme,l=t.fontSize,h=t.value,d=t.defaultValue,p=t.cursorStart,f=t.showGutter,m=t.wrapEnabled,g=t.showPrintMargin,v=t.scrollMargin,b=void 0===v?[0,0,0,0]:v,y=t.keyboardHandler,w=t.onLoad,k=t.commands,x=t.annotations,S=t.markers,E=t.placeholder;this.editor=u.edit(this.refEditor),r&&r(u);for(var _=Object.keys(this.props.editorProps),C=0;C<_.length;C++)this.editor[_[C]]=this.props.editorProps[_[C]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(b[0],b[1],b[2],b[3]),this.editor.getSession().setMode("ace/mode/"+o),this.editor.setTheme("ace/theme/"+a),this.editor.setFontSize(l),this.editor.getSession().setValue(d||h,p),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(f),this.editor.getSession().setUseWrapMode(m),this.editor.setShowPrintMargin(g),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),E&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),i&&this.editor.getSession().on("changeAnnotation",(function(){var t=e.editor.getSession().getAnnotations();e.props.onValidate(t)})),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(x||[]),S&&S.length>0&&this.handleMarkers(S);var T=this.editor.$options;c.editorOptions.forEach((function(t){T.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option "+t+" was activated but not found. Did you need to import a related tool or did you possibly mispell the option?")})),this.handleOptions(this.props),Array.isArray(k)&&k.forEach((function(t){"string"==typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)})),y&&this.editor.setKeyboardHandler("ace/keyboard/"+y),n&&(this.refEditor.className+=" "+n),w&&w(this.editor),this.editor.resize(),s&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,r=0;r<c.editorOptions.length;r++){var i=c.editorOptions[r];n[i]!==t[i]&&this.editor.setOption(i,n[i])}if(n.className!==t.className){var o=this.refEditor.className.trim().split(" ");t.className.trim().split(" ").forEach((function(e){var t=o.indexOf(e);o.splice(t,1)})),this.refEditor.className=" "+n.className+" "+o.join(" ")}if(this.editor&&this.editor.getValue()!==n.value){this.silent=!0;var s=this.editor.session.selection.toJSON();this.editor.setValue(n.value,n.cursorStart),this.editor.session.selection.fromJSON(s),this.silent=!1}n.placeholder!==t.placeholder&&this.updatePlaceholder(),n.mode!==t.mode&&this.editor.getSession().setMode("ace/mode/"+n.mode),n.theme!==t.theme&&this.editor.setTheme("ace/theme/"+n.theme),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+n.keyboardHandler):this.editor.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&this.editor.setFontSize(n.fontSize),n.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(n.showGutter),l(n.setOptions,t.setOptions)||this.handleOptions(n),l(n.annotations,t.annotations)||this.editor.getSession().setAnnotations(n.annotations||[]),!l(n.markers,t.markers)&&Array.isArray(n.markers)&&this.handleMarkers(n.markers),l(n.scrollMargin,t.scrollMargin)||this.handleScrollMargins(n.scrollMargin),e.height===this.props.height&&e.width===this.props.width||this.editor.resize(),this.props.focus&&!e.focus&&this.editor.focus()},t.prototype.handleScrollMargins=function(e){void 0===e&&(e=[0,0,0,0]),this.editor.renderer.setScrollMargins(e[0],e[1],e[2],e[3])},t.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},t.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=this.editor.getValue();this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=this.editor.getSelection();this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=this.editor.getSelection();this.props.onCursorChange(t,e)}},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e),this.props.placeholder&&this.updatePlaceholder()},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e,this.editor)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e,this.editor)},t.prototype.onCopy=function(e){this.props.onCopy&&this.props.onCopy(e)},t.prototype.onPaste=function(e){this.props.onPaste&&this.props.onPaste(e)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e){for(var t=Object.keys(e.setOptions),n=0;n<t.length;n++)this.editor.setOption(t[n],e.setOptions[t[n]])},t.prototype.handleMarkers=function(e){var t=this,n=this.editor.getSession().getMarkers(!0);for(var r in n)n.hasOwnProperty(r)&&this.editor.getSession().removeMarker(n[r].id);for(var r in n=this.editor.getSession().getMarkers(!1))n.hasOwnProperty(r)&&"ace_active-line"!==n[r].clazz&&"ace_selected-word"!==n[r].clazz&&this.editor.getSession().removeMarker(n[r].id);e.forEach((function(e){var n=e.startRow,r=e.startCol,i=e.endRow,o=e.endCol,s=e.className,a=e.type,l=e.inFront,c=void 0!==l&&l,u=new h(n,r,i,o);t.editor.getSession().addMarker(u,s,a,c)}))},t.prototype.updatePlaceholder=function(){var e=this.editor,t=this.props.placeholder,n=!e.session.getValue().length,r=e.renderer.placeholderNode;!n&&r?(e.renderer.scroller.removeChild(e.renderer.placeholderNode),e.renderer.placeholderNode=null):n&&!r?((r=e.renderer.placeholderNode=document.createElement("div")).textContent=t||"",r.className="ace_comment ace_placeholder",r.style.padding="0 9px",r.style.position="absolute",r.style.zIndex="3",e.renderer.scroller.appendChild(r)):n&&r&&(r.textContent=t)},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,r=e.height,i=e.style,s=o({width:n,height:r},i);return a.createElement("div",{ref:this.updateRef,id:t,style:s})},t.propTypes={mode:s.string,focus:s.bool,theme:s.string,name:s.string,className:s.string,height:s.string,width:s.string,fontSize:s.oneOfType([s.number,s.string]),showGutter:s.bool,onChange:s.func,onCopy:s.func,onPaste:s.func,onFocus:s.func,onInput:s.func,onBlur:s.func,onScroll:s.func,value:s.string,defaultValue:s.string,onLoad:s.func,onSelectionChange:s.func,onCursorChange:s.func,onBeforeLoad:s.func,onValidate:s.func,minLines:s.number,maxLines:s.number,readOnly:s.bool,highlightActiveLine:s.bool,tabSize:s.number,showPrintMargin:s.bool,cursorStart:s.number,debounceChangePeriod:s.number,editorProps:s.object,setOptions:s.object,style:s.object,scrollMargin:s.array,annotations:s.array,markers:s.array,keyboardHandler:s.string,wrapEnabled:s.bool,enableSnippets:s.bool,enableBasicAutocompletion:s.oneOfType([s.bool,s.array]),enableLiveAutocompletion:s.oneOfType([s.bool,s.array]),navigateToFileEnd:s.bool,commands:s.array,placeholder:s.string},t.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",value:"",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},t}(a.Component);t.default=d},function(e,t,n){"use strict";var r=n(81);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),s=n(0),a=n(49),l=n(85),c=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.props.value},n.onChange=n.onChange.bind(n),n.diff=n.diff.bind(n),n}return i(t,e),t.prototype.componentDidUpdate=function(){var e=this.props.value;e!==this.state.value&&this.setState({value:e})},t.prototype.onChange=function(e){this.setState({value:e}),this.props.onChange&&this.props.onChange(e)},t.prototype.diff=function(){var e=new l,t=this.state.value[0],n=this.state.value[1];if(0===t.length&&0===n.length)return[];var r=e.diff_main(t,n);e.diff_cleanupSemantic(r);var i=this.generateDiffedLines(r);return this.setCodeMarkers(i)},t.prototype.generateDiffedLines=function(e){var t=0,n=-1,r=1,i={left:[],right:[]},o={left:1,right:1};return e.forEach((function(e){var s=e[0],a=e[1],l=a.split("\n").length-1;if(0!==a.length){var c=a[0],u=a[a.length-1],h=0;switch(s){case t:o.left+=l,o.right+=l;break;case n:"\n"===c&&(o.left++,l--),0===(h=l)&&i.right.push({startLine:o.right,endLine:o.right}),"\n"===u&&(h-=1),i.left.push({startLine:o.left,endLine:o.left+h}),o.left+=l;break;case r:"\n"===c&&(o.right++,l--),0===(h=l)&&i.left.push({startLine:o.left,endLine:o.left}),"\n"===u&&(h-=1),i.right.push({startLine:o.right,endLine:o.right+h}),o.right+=l;break;default:throw new Error("Diff type was not defined.")}}})),i},t.prototype.setCodeMarkers=function(e){void 0===e&&(e={left:[],right:[]});for(var t=[],n={left:[],right:[]},r=0;r<e.left.length;r++){var i={startRow:e.left[r].startLine-1,endRow:e.left[r].endLine,type:"text",className:"codeMarker"};n.left.push(i)}for(r=0;r<e.right.length;r++){i={startRow:e.right[r].startLine-1,endRow:e.right[r].endLine,type:"text",className:"codeMarker"};n.right.push(i)}return t[0]=n.left,t[1]=n.right,t},t.prototype.render=function(){var e=this.diff();return s.createElement(a.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:e})},t.propTypes={cursorStart:o.number,editorProps:o.object,enableBasicAutocompletion:o.bool,enableLiveAutocompletion:o.bool,focus:o.bool,fontSize:o.number,height:o.string,highlightActiveLine:o.bool,maxLines:o.number,minLines:o.number,mode:o.string,name:o.string,className:o.string,onLoad:o.func,onPaste:o.func,onScroll:o.func,onChange:o.func,orientation:o.string,readOnly:o.bool,scrollMargin:o.array,setOptions:o.object,showGutter:o.bool,showPrintMargin:o.bool,splits:o.number,style:o.object,tabSize:o.number,theme:o.string,value:o.array,width:o.string,wrapEnabled:o.bool},t.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},t}(s.Component);t.default=c},function(e,t,n){(function(e){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)}ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=(e("./lib/lang"),e("./lib/event_emitter").EventEmitter),o=e("./editor").Editor,s=e("./virtual_renderer").VirtualRenderer,a=e("./edit_session").EditSession,l=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))};(function(){r.implement(this,i),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new o(new s(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<e;)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<e;)this.$createEditor(),this.$splits++}else for(;this.$splits>e;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;return n=null==t?this.$cEditor:this.$editors[t],this.$editors.some((function(t){return t.session===e}))&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var r=t/this.$splits,i=0;i<this.$splits;i++)(e=this.$editors[i]).container.style.width=r+"px",e.container.style.top="0px",e.container.style.left=i*r+"px",e.container.style.height=n+"px",e.resize();else{var o=n/this.$splits;for(i=0;i<this.$splits;i++)(e=this.$editors[i]).container.style.width=t+"px",e.container.style.top=i*o+"px",e.container.style.left="0px",e.container.style.height=o+"px",e.resize()}}}).call(l.prototype),t.Split=l})),ace.define("ace/ext/split",["require","exports","module","ace/split"],(function(e,t,n){"use strict";n.exports=e("../split")})),ace.require(["ace/ext/split"],(function(r){"object"==n(e)&&"object"==n(t)&&e&&(e.exports=r)}))}).call(this,n(11)(e))},function(e,t,n){(function(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 r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,o=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,l=/^\[object .+?Constructor\]$/,c="object"==(void 0===t?"undefined":n(t))&&t&&t.Object===Object&&t,u="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,h=c||u||Function("return this")();var d,p=Array.prototype,f=Function.prototype,m=Object.prototype,g=h["__core-js_shared__"],v=(d=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",b=f.toString,y=m.hasOwnProperty,w=m.toString,k=RegExp("^"+b.call(y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),x=h.Symbol,S=p.splice,E=P(h,"Map"),_=P(Object,"create"),C=x?x.prototype:void 0,T=C?C.toString:void 0;function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function A(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function O(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function R(e,t){for(var n=e.length;n--;)if(D(e[n][0],t))return n;return-1}function $(e,t){for(var o=0,s=(t=function(e,t){if(W(e))return!1;var o=n(e);if("number"==o||"symbol"==o||"boolean"==o||null==e||B(e))return!0;return i.test(e)||!r.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return W(e)?e:I(e)}(t)).length;null!=e&&o<s;)e=e[N(t[o++])];return o&&o==s?e:void 0}function M(e){return!(!z(e)||(t=e,v&&v in t))&&(function(e){var t=z(e)?w.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?k:l).test(function(e){if(null!=e){try{return b.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function j(e,t){var r=e.__data__;return function(e){var t=n(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function P(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return M(n)?n:void 0}L.prototype.clear=function(){this.__data__=_?_(null):{}},L.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},L.prototype.get=function(e){var t=this.__data__;if(_){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return y.call(t,e)?t[e]:void 0},L.prototype.has=function(e){var t=this.__data__;return _?void 0!==t[e]:y.call(t,e)},L.prototype.set=function(e,t){return this.__data__[e]=_&&void 0===t?"__lodash_hash_undefined__":t,this},A.prototype.clear=function(){this.__data__=[]},A.prototype.delete=function(e){var t=this.__data__,n=R(t,e);return!(n<0)&&(n==t.length-1?t.pop():S.call(t,n,1),!0)},A.prototype.get=function(e){var t=this.__data__,n=R(t,e);return n<0?void 0:t[n][1]},A.prototype.has=function(e){return R(this.__data__,e)>-1},A.prototype.set=function(e,t){var n=this.__data__,r=R(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},O.prototype.clear=function(){this.__data__={hash:new L,map:new(E||A),string:new L}},O.prototype.delete=function(e){return j(this,e).delete(e)},O.prototype.get=function(e){return j(this,e).get(e)},O.prototype.has=function(e){return j(this,e).has(e)},O.prototype.set=function(e,t){return j(this,e).set(e,t),this};var I=F((function(e){e=function(e){return null==e?"":function(e){if("string"==typeof e)return e;if(B(e))return T?T.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(e);var t=[];return o.test(e)&&t.push(""),e.replace(s,(function(e,n,r,i){t.push(r?i.replace(a,"$1"):n||e)})),t}));function N(e){if("string"==typeof e||B(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function F(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s),s};return n.cache=new(F.Cache||O),n}function D(e,t){return e===t||e!=e&&t!=t}F.Cache=O;var W=Array.isArray;function z(e){var t=n(e);return!!e&&("object"==t||"function"==t)}function B(e){return"symbol"==n(e)||function(e){return!!e&&"object"==n(e)}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:$(e,t);return void 0===r?n:r}}).call(this,n(18))},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 r(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32}r.Diff,r.prototype.diff_main=function(e,t,n,r){void 0===r&&(r=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var i=r;if(null==e||null==t)throw new Error("Null input. (diff_main)");if(e==t)return e?[[0,e]]:[];void 0===n&&(n=!0);var o=n,s=this.diff_commonPrefix(e,t),a=e.substring(0,s);e=e.substring(s),t=t.substring(s),s=this.diff_commonSuffix(e,t);var l=e.substring(e.length-s);e=e.substring(0,e.length-s),t=t.substring(0,t.length-s);var c=this.diff_compute_(e,t,o,i);return a&&c.unshift([0,a]),l&&c.push([0,l]),this.diff_cleanupMerge(c),c},r.prototype.diff_compute_=function(e,t,n,r){var i;if(!e)return[[1,t]];if(!t)return[[-1,e]];var o=e.length>t.length?e:t,s=e.length>t.length?t:e,a=o.indexOf(s);if(-1!=a)return i=[[1,o.substring(0,a)],[0,s],[1,o.substring(a+s.length)]],e.length>t.length&&(i[0][0]=i[2][0]=-1),i;if(1==s.length)return[[-1,e],[1,t]];var l=this.diff_halfMatch_(e,t);if(l){var c=l[0],u=l[1],h=l[2],d=l[3],p=l[4],f=this.diff_main(c,h,n,r),m=this.diff_main(u,d,n,r);return f.concat([[0,p]],m)}return n&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,r):this.diff_bisect_(e,t,r)},r.prototype.diff_lineMode_=function(e,t,n){e=(u=this.diff_linesToChars_(e,t)).chars1,t=u.chars2;var r=u.lineArray,i=this.diff_main(e,t,!1,n);this.diff_charsToLines_(i,r),this.diff_cleanupSemantic(i),i.push([0,""]);for(var o=0,s=0,a=0,l="",c="";o<i.length;){switch(i[o][0]){case 1:a++,c+=i[o][1];break;case-1:s++,l+=i[o][1];break;case 0:if(s>=1&&a>=1){i.splice(o-s-a,s+a),o=o-s-a;for(var u,h=(u=this.diff_main(l,c,!1,n)).length-1;h>=0;h--)i.splice(o,0,u[h]);o+=u.length}a=0,s=0,l="",c=""}o++}return i.pop(),i},r.prototype.diff_bisect_=function(e,t,n){for(var r=e.length,i=t.length,o=Math.ceil((r+i)/2),s=o,a=2*o,l=new Array(a),c=new Array(a),u=0;u<a;u++)l[u]=-1,c[u]=-1;l[s+1]=0,c[s+1]=0;for(var h=r-i,d=h%2!=0,p=0,f=0,m=0,g=0,v=0;v<o&&!((new Date).getTime()>n);v++){for(var b=-v+p;b<=v-f;b+=2){for(var y=s+b,w=(_=b==-v||b!=v&&l[y-1]<l[y+1]?l[y+1]:l[y-1]+1)-b;_<r&&w<i&&e.charAt(_)==t.charAt(w);)_++,w++;if(l[y]=_,_>r)f+=2;else if(w>i)p+=2;else if(d){if((S=s+h-b)>=0&&S<a&&-1!=c[S])if(_>=(x=r-c[S]))return this.diff_bisectSplit_(e,t,_,w,n)}}for(var k=-v+m;k<=v-g;k+=2){for(var x,S=s+k,E=(x=k==-v||k!=v&&c[S-1]<c[S+1]?c[S+1]:c[S-1]+1)-k;x<r&&E<i&&e.charAt(r-x-1)==t.charAt(i-E-1);)x++,E++;if(c[S]=x,x>r)g+=2;else if(E>i)m+=2;else if(!d){if((y=s+h-k)>=0&&y<a&&-1!=l[y]){var _;w=s+(_=l[y])-y;if(_>=(x=r-x))return this.diff_bisectSplit_(e,t,_,w,n)}}}}return[[-1,e],[1,t]]},r.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),s=t.substring(0,r),a=e.substring(n),l=t.substring(r),c=this.diff_main(o,s,!1,i),u=this.diff_main(a,l,!1,i);return c.concat(u)},r.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){for(var t="",i=0,o=-1,s=n.length;o<e.length-1;){-1==(o=e.indexOf("\n",i))&&(o=e.length-1);var a=e.substring(i,o+1);i=o+1,(r.hasOwnProperty?r.hasOwnProperty(a):void 0!==r[a])?t+=String.fromCharCode(r[a]):(t+=String.fromCharCode(s),r[a]=s,n[s++]=a)}return t}return n[0]="",{chars1:i(e),chars2:i(t),lineArray:n}},r.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],o=0;o<r.length;o++)i[o]=t[r.charCodeAt(o)];e[n][1]=i.join("")}},r.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i},r.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i},r.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(0==n||0==r)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var o=0,s=1;;){var a=e.substring(i-s),l=t.indexOf(a);if(-1==l)return o;s+=l,0!=l&&e.substring(i-s)!=t.substring(0,s)||(o=s,s++)}},r.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;var i=this;function o(e,t,n){for(var r,o,s,a,l=e.substring(n,n+Math.floor(e.length/4)),c=-1,u="";-1!=(c=t.indexOf(l,c+1));){var h=i.diff_commonPrefix(e.substring(n),t.substring(c)),d=i.diff_commonSuffix(e.substring(0,n),t.substring(0,c));u.length<d+h&&(u=t.substring(c-d,c)+t.substring(c,c+h),r=e.substring(0,n-d),o=e.substring(n+h),s=t.substring(0,c-d),a=t.substring(c+h))}return 2*u.length>=e.length?[r,o,s,a,u]:null}var s,a,l,c,u,h=o(n,r,Math.ceil(n.length/4)),d=o(n,r,Math.ceil(n.length/2));return h||d?(s=d?h&&h[4].length>d[4].length?h:d:h,e.length>t.length?(a=s[0],l=s[1],c=s[2],u=s[3]):(c=s[0],u=s[1],a=s[2],l=s[3]),[a,l,c,u,s[4]]):null},r.prototype.diff_cleanupSemantic=function(e){for(var t=!1,n=[],r=0,i=null,o=0,s=0,a=0,l=0,c=0;o<e.length;)0==e[o][0]?(n[r++]=o,s=l,a=c,l=0,c=0,i=e[o][1]):(1==e[o][0]?l+=e[o][1].length:c+=e[o][1].length,i&&i.length<=Math.max(s,a)&&i.length<=Math.max(l,c)&&(e.splice(n[r-1],0,[-1,i]),e[n[r-1]+1][0]=1,r--,o=--r>0?n[r-1]:-1,s=0,a=0,l=0,c=0,i=null,t=!0)),o++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),o=1;o<e.length;){if(-1==e[o-1][0]&&1==e[o][0]){var u=e[o-1][1],h=e[o][1],d=this.diff_commonOverlap_(u,h),p=this.diff_commonOverlap_(h,u);d>=p?(d>=u.length/2||d>=h.length/2)&&(e.splice(o,0,[0,h.substring(0,d)]),e[o-1][1]=u.substring(0,u.length-d),e[o+1][1]=h.substring(d),o++):(p>=u.length/2||p>=h.length/2)&&(e.splice(o,0,[0,u.substring(0,p)]),e[o-1][0]=1,e[o-1][1]=h.substring(0,h.length-p),e[o+1][0]=-1,e[o+1][1]=u.substring(p),o++),o++}o++}},r.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 6;var n=e.charAt(e.length-1),i=t.charAt(0),o=n.match(r.nonAlphaNumericRegex_),s=i.match(r.nonAlphaNumericRegex_),a=o&&n.match(r.whitespaceRegex_),l=s&&i.match(r.whitespaceRegex_),c=a&&n.match(r.linebreakRegex_),u=l&&i.match(r.linebreakRegex_),h=c&&e.match(r.blanklineEndRegex_),d=u&&t.match(r.blanklineStartRegex_);return h||d?5:c||u?4:o&&!a&&l?3:a||l?2:o||s?1:0}for(var n=1;n<e.length-1;){if(0==e[n-1][0]&&0==e[n+1][0]){var i=e[n-1][1],o=e[n][1],s=e[n+1][1],a=this.diff_commonSuffix(i,o);if(a){var l=o.substring(o.length-a);i=i.substring(0,i.length-a),o=l+o.substring(0,o.length-a),s=l+s}for(var c=i,u=o,h=s,d=t(i,o)+t(o,s);o.charAt(0)===s.charAt(0);){i+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);var p=t(i,o)+t(o,s);p>=d&&(d=p,c=i,u=o,h=s)}e[n-1][1]!=c&&(c?e[n-1][1]=c:(e.splice(n-1,1),n--),e[n][1]=u,h?e[n+1][1]=h:(e.splice(n+1,1),n--))}n++}},r.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,r.whitespaceRegex_=/\s/,r.linebreakRegex_=/[\r\n]/,r.blanklineEndRegex_=/\n\r?\n$/,r.blanklineStartRegex_=/^\r?\n\r?\n/,r.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,n=[],r=0,i=null,o=0,s=!1,a=!1,l=!1,c=!1;o<e.length;)0==e[o][0]?(e[o][1].length<this.Diff_EditCost&&(l||c)?(n[r++]=o,s=l,a=c,i=e[o][1]):(r=0,i=null),l=c=!1):(-1==e[o][0]?c=!0:l=!0,i&&(s&&a&&l&&c||i.length<this.Diff_EditCost/2&&s+a+l+c==3)&&(e.splice(n[r-1],0,[-1,i]),e[n[r-1]+1][0]=1,r--,i=null,s&&a?(l=c=!0,r=0):(o=--r>0?n[r-1]:-1,l=c=!1),t=!0)),o++;t&&this.diff_cleanupMerge(e)},r.prototype.diff_cleanupMerge=function(e){e.push([0,""]);for(var t,n=0,r=0,i=0,o="",s="";n<e.length;)switch(e[n][0]){case 1:i++,s+=e[n][1],n++;break;case-1:r++,o+=e[n][1],n++;break;case 0:r+i>1?(0!==r&&0!==i&&(0!==(t=this.diff_commonPrefix(s,o))&&(n-r-i>0&&0==e[n-r-i-1][0]?e[n-r-i-1][1]+=s.substring(0,t):(e.splice(0,0,[0,s.substring(0,t)]),n++),s=s.substring(t),o=o.substring(t)),0!==(t=this.diff_commonSuffix(s,o))&&(e[n][1]=s.substring(s.length-t)+e[n][1],s=s.substring(0,s.length-t),o=o.substring(0,o.length-t))),0===r?e.splice(n-i,r+i,[1,s]):0===i?e.splice(n-r,r+i,[-1,o]):e.splice(n-r-i,r+i,[-1,o],[1,s]),n=n-r-i+(r?1:0)+(i?1:0)+1):0!==n&&0==e[n-1][0]?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,i=0,r=0,o="",s=""}""===e[e.length-1][1]&&e.pop();var a=!1;for(n=1;n<e.length-1;)0==e[n-1][0]&&0==e[n+1][0]&&(e[n][1].substring(e[n][1].length-e[n-1][1].length)==e[n-1][1]?(e[n][1]=e[n-1][1]+e[n][1].substring(0,e[n][1].length-e[n-1][1].length),e[n+1][1]=e[n-1][1]+e[n+1][1],e.splice(n-1,1),a=!0):e[n][1].substring(0,e[n+1][1].length)==e[n+1][1]&&(e[n-1][1]+=e[n+1][1],e[n][1]=e[n][1].substring(e[n+1][1].length)+e[n+1][1],e.splice(n+1,1),a=!0)),n++;a&&this.diff_cleanupMerge(e)},r.prototype.diff_xIndex=function(e,t){var n,r=0,i=0,o=0,s=0;for(n=0;n<e.length&&(1!==e[n][0]&&(r+=e[n][1].length),-1!==e[n][0]&&(i+=e[n][1].length),!(r>t));n++)o=r,s=i;return e.length!=n&&-1===e[n][0]?s:s+(t-o)},r.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,r=/</g,i=/>/g,o=/\n/g,s=0;s<e.length;s++){var a=e[s][0],l=e[s][1].replace(n,"&amp;").replace(r,"&lt;").replace(i,"&gt;").replace(o,"&para;<br>");switch(a){case 1:t[s]='<ins style="background:#e6ffe6;">'+l+"</ins>";break;case-1:t[s]='<del style="background:#ffe6e6;">'+l+"</del>";break;case 0:t[s]="<span>"+l+"</span>"}}return t.join("")},r.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},r.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)-1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},r.prototype.diff_levenshtein=function(e){for(var t=0,n=0,r=0,i=0;i<e.length;i++){var o=e[i][0],s=e[i][1];switch(o){case 1:n+=s.length;break;case-1:r+=s.length;break;case 0:t+=Math.max(n,r),n=0,r=0}}return t+=Math.max(n,r)},r.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case 1:t[n]="+"+encodeURI(e[n][1]);break;case-1:t[n]="-"+e[n][1].length;break;case 0:t[n]="="+e[n][1].length}return t.join("\t").replace(/%20/g," ")},r.prototype.diff_fromDelta=function(e,t){for(var n=[],r=0,i=0,o=t.split(/\t/g),s=0;s<o.length;s++){var a=o[s].substring(1);switch(o[s].charAt(0)){case"+":try{n[r++]=[1,decodeURI(a)]}catch(e){throw new Error("Illegal escape in diff_fromDelta: "+a)}break;case"-":case"=":var l=parseInt(a,10);if(isNaN(l)||l<0)throw new Error("Invalid number in diff_fromDelta: "+a);var c=e.substring(i,i+=l);"="==o[s].charAt(0)?n[r++]=[0,c]:n[r++]=[-1,c];break;default:if(o[s])throw new Error("Invalid diff operation in diff_fromDelta: "+o[s])}}if(i!=e.length)throw new Error("Delta length ("+i+") does not equal source text length ("+e.length+").");return n},r.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},r.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),i=this;function o(e,r){var o=e/t.length,s=Math.abs(n-r);return i.Match_Distance?o+s/i.Match_Distance:s?1:o}var s=this.Match_Threshold,a=e.indexOf(t,n);-1!=a&&(s=Math.min(o(0,a),s),-1!=(a=e.lastIndexOf(t,n+t.length))&&(s=Math.min(o(0,a),s)));var l,c,u=1<<t.length-1;a=-1;for(var h,d=t.length+e.length,p=0;p<t.length;p++){for(l=0,c=d;l<c;)o(p,n+c)<=s?l=c:d=c,c=Math.floor((d-l)/2+l);d=c;var f=Math.max(1,n-c+1),m=Math.min(n+c,e.length)+t.length,g=Array(m+2);g[m+1]=(1<<p)-1;for(var v=m;v>=f;v--){var b=r[e.charAt(v-1)];if(g[v]=0===p?(g[v+1]<<1|1)&b:(g[v+1]<<1|1)&b|(h[v+1]|h[v])<<1|1|h[v+1],g[v]&u){var y=o(p,v-1);if(y<=s){if(s=y,!((a=v-1)>n))break;f=Math.max(1,2*n-a)}}}if(o(p+1,n)>s)break;h=g}return a},r.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},r.prototype.patch_addContext_=function(e,t){if(0!=t.length){for(var n=t.substring(e.start2,e.start2+e.length1),r=0;t.indexOf(n)!=t.lastIndexOf(n)&&n.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)r+=this.Patch_Margin,n=t.substring(e.start2-r,e.start2+e.length1+r);r+=this.Patch_Margin;var i=t.substring(e.start2-r,e.start2);i&&e.diffs.unshift([0,i]);var o=t.substring(e.start2+e.length1,e.start2+e.length1+r);o&&e.diffs.push([0,o]),e.start1-=i.length,e.start2-=i.length,e.length1+=i.length+o.length,e.length2+=i.length+o.length}},r.prototype.patch_make=function(e,t,i){var o,s;if("string"==typeof e&&"string"==typeof t&&void 0===i)o=e,(s=this.diff_main(o,t,!0)).length>2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(e&&"object"==n(e)&&void 0===t&&void 0===i)s=e,o=this.diff_text1(s);else if("string"==typeof e&&t&&"object"==n(t)&&void 0===i)o=e,s=t;else{if("string"!=typeof e||"string"!=typeof t||!i||"object"!=n(i))throw new Error("Unknown call format to patch_make.");o=e,s=i}if(0===s.length)return[];for(var a=[],l=new r.patch_obj,c=0,u=0,h=0,d=o,p=o,f=0;f<s.length;f++){var m=s[f][0],g=s[f][1];switch(c||0===m||(l.start1=u,l.start2=h),m){case 1:l.diffs[c++]=s[f],l.length2+=g.length,p=p.substring(0,h)+g+p.substring(h);break;case-1:l.length1+=g.length,l.diffs[c++]=s[f],p=p.substring(0,h)+p.substring(h+g.length);break;case 0:g.length<=2*this.Patch_Margin&&c&&s.length!=f+1?(l.diffs[c++]=s[f],l.length1+=g.length,l.length2+=g.length):g.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,d),a.push(l),l=new r.patch_obj,c=0,d=p,u=h)}1!==m&&(u+=g.length),-1!==m&&(h+=g.length)}return c&&(this.patch_addContext_(l,d),a.push(l)),a},r.prototype.patch_deepCopy=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n],o=new r.patch_obj;o.diffs=[];for(var s=0;s<i.diffs.length;s++)o.diffs[s]=i.diffs[s].slice();o.start1=i.start1,o.start2=i.start2,o.length1=i.length1,o.length2=i.length2,t[n]=o}return t},r.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var r=0,i=[],o=0;o<e.length;o++){var s,a,l=e[o].start2+r,c=this.diff_text1(e[o].diffs),u=-1;if(c.length>this.Match_MaxBits?-1!=(s=this.match_main(t,c.substring(0,this.Match_MaxBits),l))&&(-1==(u=this.match_main(t,c.substring(c.length-this.Match_MaxBits),l+c.length-this.Match_MaxBits))||s>=u)&&(s=-1):s=this.match_main(t,c,l),-1==s)i[o]=!1,r-=e[o].length2-e[o].length1;else if(i[o]=!0,r=s-l,c==(a=-1==u?t.substring(s,s+c.length):t.substring(s,u+this.Match_MaxBits)))t=t.substring(0,s)+this.diff_text2(e[o].diffs)+t.substring(s+c.length);else{var h=this.diff_main(c,a,!1);if(c.length>this.Match_MaxBits&&this.diff_levenshtein(h)/c.length>this.Patch_DeleteThreshold)i[o]=!1;else{this.diff_cleanupSemanticLossless(h);for(var d,p=0,f=0;f<e[o].diffs.length;f++){var m=e[o].diffs[f];0!==m[0]&&(d=this.diff_xIndex(h,p)),1===m[0]?t=t.substring(0,s+d)+m[1]+t.substring(s+d):-1===m[0]&&(t=t.substring(0,s+d)+t.substring(s+this.diff_xIndex(h,p+m[1].length))),-1!==m[0]&&(p+=m[1].length)}}}}return[t=t.substring(n.length,t.length-n.length),i]},r.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,n="",r=1;r<=t;r++)n+=String.fromCharCode(r);for(r=0;r<e.length;r++)e[r].start1+=t,e[r].start2+=t;var i=e[0],o=i.diffs;if(0==o.length||0!=o[0][0])o.unshift([0,n]),i.start1-=t,i.start2-=t,i.length1+=t,i.length2+=t;else if(t>o[0][1].length){var s=t-o[0][1].length;o[0][1]=n.substring(o[0][1].length)+o[0][1],i.start1-=s,i.start2-=s,i.length1+=s,i.length2+=s}if(0==(o=(i=e[e.length-1]).diffs).length||0!=o[o.length-1][0])o.push([0,n]),i.length1+=t,i.length2+=t;else if(t>o[o.length-1][1].length){s=t-o[o.length-1][1].length;o[o.length-1][1]+=n.substring(0,s),i.length1+=s,i.length2+=s}return n},r.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,n=0;n<e.length;n++)if(!(e[n].length1<=t)){var i=e[n];e.splice(n--,1);for(var o=i.start1,s=i.start2,a="";0!==i.diffs.length;){var l=new r.patch_obj,c=!0;for(l.start1=o-a.length,l.start2=s-a.length,""!==a&&(l.length1=l.length2=a.length,l.diffs.push([0,a]));0!==i.diffs.length&&l.length1<t-this.Patch_Margin;){var u=i.diffs[0][0],h=i.diffs[0][1];1===u?(l.length2+=h.length,s+=h.length,l.diffs.push(i.diffs.shift()),c=!1):-1===u&&1==l.diffs.length&&0==l.diffs[0][0]&&h.length>2*t?(l.length1+=h.length,o+=h.length,c=!1,l.diffs.push([u,h]),i.diffs.shift()):(h=h.substring(0,t-l.length1-this.Patch_Margin),l.length1+=h.length,o+=h.length,0===u?(l.length2+=h.length,s+=h.length):c=!1,l.diffs.push([u,h]),h==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(h.length))}a=(a=this.diff_text2(l.diffs)).substring(a.length-this.Patch_Margin);var d=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);""!==d&&(l.length1+=d.length,l.length2+=d.length,0!==l.diffs.length&&0===l.diffs[l.diffs.length-1][0]?l.diffs[l.diffs.length-1][1]+=d:l.diffs.push([0,d])),c||e.splice(++n,0,l)}}},r.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")},r.prototype.patch_fromText=function(e){var t=[];if(!e)return t;for(var n=e.split("\n"),i=0,o=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;i<n.length;){var s=n[i].match(o);if(!s)throw new Error("Invalid patch string: "+n[i]);var a=new r.patch_obj;for(t.push(a),a.start1=parseInt(s[1],10),""===s[2]?(a.start1--,a.length1=1):"0"==s[2]?a.length1=0:(a.start1--,a.length1=parseInt(s[2],10)),a.start2=parseInt(s[3],10),""===s[4]?(a.start2--,a.length2=1):"0"==s[4]?a.length2=0:(a.start2--,a.length2=parseInt(s[4],10)),i++;i<n.length;){var l=n[i].charAt(0);try{var c=decodeURI(n[i].substring(1))}catch(e){throw new Error("Illegal escape in patch_fromText: "+c)}if("-"==l)a.diffs.push([-1,c]);else if("+"==l)a.diffs.push([1,c]);else if(" "==l)a.diffs.push([0,c]);else{if("@"==l)break;if(""!==l)throw new Error('Invalid patch mode "'+l+'" in: '+c)}i++}}return t},r.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},r.patch_obj.prototype.toString=function(){for(var e,t=["@@ -"+(0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1)+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],n=0;n<this.diffs.length;n++){switch(this.diffs[n][0]){case 1:e="+";break;case-1:e="-";break;case 0:e=" "}t[n+1]=e+encodeURI(this.diffs[n][1])+"\n"}return t.join("").replace(/%20/g," ")},e.exports=r,e.exports.diff_match_patch=r,e.exports.DIFF_DELETE=-1,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0},function(e,t,n){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)}ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",s=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",c=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b",p=function(){var e=this.createKeywordMapper({"support.function":s,"support.constant":a,"support.type":o,"support.constant.color":l,"support.constant.fonts":c},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:u},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(p,i),t.CssHighlightRules=p})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,o=e.findMatchingBracket({row:t,column:i});if(!o||o.row==t)return 0;var s=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i})),ace.define("ace/mode/css_completions",["require","exports","module"],(function(e,t,n){"use strict";var i={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},o=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e)if("string"==typeof e[t]){var n=t.replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()}));i.hasOwnProperty(n)||(i[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){if(this.completionsDefined||this.defineCompletions(),!t.getTokenAt(n.row,n.column))return[];if("ruleset"===e){var i=t.getLine(n.row).substr(0,n.column);return/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r)}return[]},this.getPropertyCompletions=function(e,t,n,r){return Object.keys(i).map((function(e){return{caption:e,snippet:e+": $0;",meta:"property",score:Number.MAX_VALUE}}))},this.getPropertyValueCompletions=function(e,t,n,o){var s=t.getLine(n.row).substr(0,n.column),a=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!a)return[];var l=[];return a in i&&"object"===r(i[a])&&(l=Object.keys(i[a])),l.map((function(e){return{caption:e,snippet:e,meta:"property value",score:Number.MAX_VALUE}}))}}).call(o.prototype),t.CssCompletions=o})),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],(function(e,t,n){"use strict";var r=e("../../lib/oop"),i=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),o=e("../../token_iterator").TokenIterator,s=function(){this.inherit(i),this.add("colon","insertion",(function(e,t,n,r,i){if(":"===i){var s=n.getCursorPosition(),a=new o(r,s.row,s.column),l=a.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=a.stepBackward()),l&&"support.type"===l.type){var c=r.doc.getLine(s.row);if(":"===c.substring(s.column,s.column+1))return{text:"",selection:[1,1]};if(!c.substring(s.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}})),this.add("colon","deletion",(function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&":"===s){var a=n.getCursorPosition(),l=new o(r,a.row,a.column),c=l.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&"support.type"===c.type)if(";"===r.doc.getLine(i.start.row).substring(i.end.column,i.end.column+1))return i.end.column++,i}})),this.add("semicolon","insertion",(function(e,t,n,r,i){if(";"===i){var o=n.getCursorPosition();if(";"===r.doc.getLine(o.row).substring(o.column,o.column+1))return{text:"",selection:[1,1]}}}))};r.inherits(s,i),t.CssBehaviour=s})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(i=o.match(this.foldingStartMarker)){var s=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,s);var a=e.getCommentFoldRange(n,s+i[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(i=o.match(this.foldingStopMarker))){s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),r=n.search(/\S/),o=t,s=n.length,a=t+=1,l=e.getLength();++t<l;){var c=(n=e.getLine(t)).search(/\S/);if(-1!==c){if(r>c)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=o)break;if(u.isMultiLine())t=u.end.row;else if(r==c)break}a=t}}return new i(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<o;){t=e.getLine(n);var c=a.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(n>s)return new i(s,r,n,t.length)}}.call(s.prototype)})),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],(function(e,t,r){"use strict";var i=e("../lib/oop"),o=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,l=e("../worker/worker_client").WorkerClient,c=e("./css_completions").CssCompletions,u=e("./behaviour/css").CssBehaviour,h=e("./folding/cstyle").FoldMode,d=function(){this.HighlightRules=s,this.$outdent=new a,this.$behaviour=new u,this.$completer=new c,this.foldingRules=new h};i.inherits(d,o),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;return i.length&&"comment"==i[i.length-1].type||t.match(/^.*\{\s*$/)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new l(["ace"],n(87),"Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/css"}.call(d.prototype),t.Mode=d}))},function(e,t){e.exports.id="ace/mode/css_worker",e.exports.src='"no use strict";!function(window){function resolveModuleId(id,paths){for(var testPath=id,tail="";testPath;){var alias=paths[testPath];if("string"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,"/")+(tail||alias.main||alias.name);if(alias===!1)return"";var i=testPath.lastIndexOf("/");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log("unable to load "+id);var path=resolveModuleId(id,window.acequire.tlns);return".js"!=path.slice(-3)&&(path+=".js"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error("Unknown command:"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}}(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if("object"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if("[object Object]"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/\'/g,"&#39;").replace(/</g,"&#60;")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||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 Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/apply_delta",["require","exports","module"],function(acequire,exports){"use strict";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||"";switch(delta.action){case"insert":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case"remove":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert="insert"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),applyDelta=acequire("./apply_delta").applyDelta,EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(textOrLines){this.$lines=[""],0===textOrLines.length?this.$lines=[""]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[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(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead."),this.insertMergedLines(position,["",""])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:"insert",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([""]),column=0):(lines=[""].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:"insert",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:"remove",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:"remove",lines:["",""]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert="insert"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal("change",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(""),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:"insert"==delta.action?"remove":"insert",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(acequire,exports){"use strict";acequire("../range").Range;var Document=acequire("../document").Document,lang=acequire("../lib/lang"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(""),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on("change",function(e){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:"insert",start:data[i],lines:data[i+1]};else var d={action:"remove",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define("ace/mode/css/csslint",["require","exports","module"],function(acequire,exports,module){function objectToString(o){return Object.prototype.toString.call(o)}function clone(parent,circular,depth,prototype){function _clone(parent,depth){if(null===parent)return null;if(0==depth)return parent;var child;if("object"!=typeof parent)return parent;if(util.isArray(parent))child=[];else if(util.isRegExp(parent))child=RegExp(parent.source,util.getRegExpFlags(parent)),parent.lastIndex&&(child.lastIndex=parent.lastIndex);else if(util.isDate(parent))child=new Date(parent.getTime());else{if(useBuffer&&Buffer.isBuffer(parent))return child=new Buffer(parent.length),parent.copy(child),child;child=prototype===void 0?Object.create(Object.getPrototypeOf(parent)):Object.create(prototype)}if(circular){var index=allParents.indexOf(parent);if(-1!=index)return allChildren[index];allParents.push(parent),allChildren.push(child)}for(var i in parent)child[i]=_clone(parent[i],depth-1);return child}var allParents=[],allChildren=[],useBuffer="undefined"!=typeof Buffer;return circular===void 0&&(circular=!0),depth===void 0&&(depth=1/0),_clone(parent,depth)}function Reporter(lines,ruleset){this.messages=[],this.stats=[],this.lines=lines,this.ruleset=ruleset}var parserlib={};(function(){function EventTarget(){this._listeners={}}function StringReader(text){this._input=text.replace(/\\n\\r?/g,"\\n"),this._line=1,this._col=1,this._cursor=0}function SyntaxError(message,line,col){this.col=col,this.line=line,this.message=message}function SyntaxUnit(text,line,col,type){this.col=col,this.line=line,this.text=text,this.type=type}function TokenStreamBase(input,tokenData){this._reader=input?new StringReader(""+input):null,this._token=null,this._tokenData=tokenData,this._lt=[],this._ltIndex=0,this._ltIndexCache=[]}EventTarget.prototype={constructor:EventTarget,addListener:function(type,listener){this._listeners[type]||(this._listeners[type]=[]),this._listeners[type].push(listener)},fire:function(event){if("string"==typeof event&&(event={type:event}),event.target!==void 0&&(event.target=this),event.type===void 0)throw Error("Event object missing \'type\' property.");if(this._listeners[event.type])for(var listeners=this._listeners[event.type].concat(),i=0,len=listeners.length;len>i;i++)listeners[i].call(this,event)},removeListener:function(type,listener){if(this._listeners[type])for(var listeners=this._listeners[type],i=0,len=listeners.length;len>i;i++)if(listeners[i]===listener){listeners.splice(i,1);break}}},StringReader.prototype={constructor:StringReader,getCol:function(){return this._col},getLine:function(){return this._line},eof:function(){return this._cursor==this._input.length},peek:function(count){var c=null;return count=count===void 0?1:count,this._cursor<this._input.length&&(c=this._input.charAt(this._cursor+count-1)),c},read:function(){var c=null;return this._cursor<this._input.length&&("\\n"==this._input.charAt(this._cursor)?(this._line++,this._col=1):this._col++,c=this._input.charAt(this._cursor++)),c},mark:function(){this._bookmark={cursor:this._cursor,line:this._line,col:this._col}},reset:function(){this._bookmark&&(this._cursor=this._bookmark.cursor,this._line=this._bookmark.line,this._col=this._bookmark.col,delete this._bookmark)},readTo:function(pattern){for(var c,buffer="";buffer.length<pattern.length||buffer.lastIndexOf(pattern)!=buffer.length-pattern.length;){if(c=this.read(),!c)throw Error(\'Expected "\'+pattern+\'" at line \'+this._line+", col "+this._col+".");buffer+=c}return buffer},readWhile:function(filter){for(var buffer="",c=this.read();null!==c&&filter(c);)buffer+=c,c=this.read();return buffer},readMatch:function(matcher){var source=this._input.substring(this._cursor),value=null;return"string"==typeof matcher?0===source.indexOf(matcher)&&(value=this.readCount(matcher.length)):matcher instanceof RegExp&&matcher.test(source)&&(value=this.readCount(RegExp.lastMatch.length)),value},readCount:function(count){for(var buffer="";count--;)buffer+=this.read();return buffer}},SyntaxError.prototype=Error(),SyntaxUnit.fromToken=function(token){return new SyntaxUnit(token.value,token.startLine,token.startCol)},SyntaxUnit.prototype={constructor:SyntaxUnit,valueOf:function(){return this.text},toString:function(){return this.text}},TokenStreamBase.createTokenData=function(tokens){var nameMap=[],typeMap={},tokenData=tokens.concat([]),i=0,len=tokenData.length+1;for(tokenData.UNKNOWN=-1,tokenData.unshift({name:"EOF"});len>i;i++)nameMap.push(tokenData[i].name),tokenData[tokenData[i].name]=i,tokenData[i].text&&(typeMap[tokenData[i].text]=i);return tokenData.name=function(tt){return nameMap[tt]},tokenData.type=function(c){return typeMap[c]},tokenData},TokenStreamBase.prototype={constructor:TokenStreamBase,match:function(tokenTypes,channel){tokenTypes instanceof Array||(tokenTypes=[tokenTypes]);\nfor(var tt=this.get(channel),i=0,len=tokenTypes.length;len>i;)if(tt==tokenTypes[i++])return!0;return this.unget(),!1},mustMatch:function(tokenTypes){var token;if(tokenTypes instanceof Array||(tokenTypes=[tokenTypes]),!this.match.apply(this,arguments))throw token=this.LT(1),new SyntaxError("Expected "+this._tokenData[tokenTypes[0]].name+" at line "+token.startLine+", col "+token.startCol+".",token.startLine,token.startCol)},advance:function(tokenTypes,channel){for(;0!==this.LA(0)&&!this.match(tokenTypes,channel);)this.get();return this.LA(0)},get:function(channel){var token,info,tokenInfo=this._tokenData,i=(this._reader,0);if(tokenInfo.length,this._lt.length&&this._ltIndex>=0&&this._ltIndex<this._lt.length){for(i++,this._token=this._lt[this._ltIndex++],info=tokenInfo[this._token.type];void 0!==info.channel&&channel!==info.channel&&this._ltIndex<this._lt.length;)this._token=this._lt[this._ltIndex++],info=tokenInfo[this._token.type],i++;if((void 0===info.channel||channel===info.channel)&&this._ltIndex<=this._lt.length)return this._ltIndexCache.push(i),this._token.type}return token=this._getToken(),token.type>-1&&!tokenInfo[token.type].hide&&(token.channel=tokenInfo[token.type].channel,this._token=token,this._lt.push(token),this._ltIndexCache.push(this._lt.length-this._ltIndex+i),this._lt.length>5&&this._lt.shift(),this._ltIndexCache.length>5&&this._ltIndexCache.shift(),this._ltIndex=this._lt.length),info=tokenInfo[token.type],info&&(info.hide||void 0!==info.channel&&channel!==info.channel)?this.get(channel):token.type},LA:function(index){var tt,total=index;if(index>0){if(index>5)throw Error("Too much lookahead.");for(;total;)tt=this.get(),total--;for(;index>total;)this.unget(),total++}else if(0>index){if(!this._lt[this._ltIndex+index])throw Error("Too much lookbehind.");tt=this._lt[this._ltIndex+index].type}else tt=this._token.type;return tt},LT:function(index){return this.LA(index),this._lt[this._ltIndex+index-1]},peek:function(){return this.LA(1)},token:function(){return this._token},tokenName:function(tokenType){return 0>tokenType||tokenType>this._tokenData.length?"UNKNOWN_TOKEN":this._tokenData[tokenType].name},tokenType:function(tokenName){return this._tokenData[tokenName]||-1},unget:function(){if(!this._ltIndexCache.length)throw Error("Too much lookahead.");this._ltIndex-=this._ltIndexCache.pop(),this._token=this._lt[this._ltIndex-1]}},parserlib.util={StringReader:StringReader,SyntaxError:SyntaxError,SyntaxUnit:SyntaxUnit,EventTarget:EventTarget,TokenStreamBase:TokenStreamBase}})(),function(){function Combinator(text,line,col){SyntaxUnit.call(this,text,line,col,Parser.COMBINATOR_TYPE),this.type="unknown",/^\\s+$/.test(text)?this.type="descendant":">"==text?this.type="child":"+"==text?this.type="adjacent-sibling":"~"==text&&(this.type="sibling")}function MediaFeature(name,value){SyntaxUnit.call(this,"("+name+(null!==value?":"+value:"")+")",name.startLine,name.startCol,Parser.MEDIA_FEATURE_TYPE),this.name=name,this.value=value}function MediaQuery(modifier,mediaType,features,line,col){SyntaxUnit.call(this,(modifier?modifier+" ":"")+(mediaType?mediaType:"")+(mediaType&&features.length>0?" and ":"")+features.join(" and "),line,col,Parser.MEDIA_QUERY_TYPE),this.modifier=modifier,this.mediaType=mediaType,this.features=features}function Parser(options){EventTarget.call(this),this.options=options||{},this._tokenStream=null}function PropertyName(text,hack,line,col){SyntaxUnit.call(this,text,line,col,Parser.PROPERTY_NAME_TYPE),this.hack=hack}function PropertyValue(parts,line,col){SyntaxUnit.call(this,parts.join(" "),line,col,Parser.PROPERTY_VALUE_TYPE),this.parts=parts}function PropertyValueIterator(value){this._i=0,this._parts=value.parts,this._marks=[],this.value=value}function PropertyValuePart(text,line,col){SyntaxUnit.call(this,text,line,col,Parser.PROPERTY_VALUE_PART_TYPE),this.type="unknown";var temp;if(/^([+\\-]?[\\d\\.]+)([a-z]+)$/i.test(text))switch(this.type="dimension",this.value=+RegExp.$1,this.units=RegExp.$2,this.units.toLowerCase()){case"em":case"rem":case"ex":case"px":case"cm":case"mm":case"in":case"pt":case"pc":case"ch":case"vh":case"vw":case"vmax":case"vmin":this.type="length";break;case"deg":case"rad":case"grad":this.type="angle";break;case"ms":case"s":this.type="time";break;case"hz":case"khz":this.type="frequency";break;case"dpi":case"dpcm":this.type="resolution"}else/^([+\\-]?[\\d\\.]+)%$/i.test(text)?(this.type="percentage",this.value=+RegExp.$1):/^([+\\-]?\\d+)$/i.test(text)?(this.type="integer",this.value=+RegExp.$1):/^([+\\-]?[\\d\\.]+)$/i.test(text)?(this.type="number",this.value=+RegExp.$1):/^#([a-f0-9]{3,6})/i.test(text)?(this.type="color",temp=RegExp.$1,3==temp.length?(this.red=parseInt(temp.charAt(0)+temp.charAt(0),16),this.green=parseInt(temp.charAt(1)+temp.charAt(1),16),this.blue=parseInt(temp.charAt(2)+temp.charAt(2),16)):(this.red=parseInt(temp.substring(0,2),16),this.green=parseInt(temp.substring(2,4),16),this.blue=parseInt(temp.substring(4,6),16))):/^rgb\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/i.test(text)?(this.type="color",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3):/^rgb\\(\\s*(\\d+)%\\s*,\\s*(\\d+)%\\s*,\\s*(\\d+)%\\s*\\)/i.test(text)?(this.type="color",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100):/^rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*([\\d\\.]+)\\s*\\)/i.test(text)?(this.type="color",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3,this.alpha=+RegExp.$4):/^rgba\\(\\s*(\\d+)%\\s*,\\s*(\\d+)%\\s*,\\s*(\\d+)%\\s*,\\s*([\\d\\.]+)\\s*\\)/i.test(text)?(this.type="color",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100,this.alpha=+RegExp.$4):/^hsl\\(\\s*(\\d+)\\s*,\\s*(\\d+)%\\s*,\\s*(\\d+)%\\s*\\)/i.test(text)?(this.type="color",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100):/^hsla\\(\\s*(\\d+)\\s*,\\s*(\\d+)%\\s*,\\s*(\\d+)%\\s*,\\s*([\\d\\.]+)\\s*\\)/i.test(text)?(this.type="color",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100,this.alpha=+RegExp.$4):/^url\\(["\']?([^\\)"\']+)["\']?\\)/i.test(text)?(this.type="uri",this.uri=RegExp.$1):/^([^\\(]+)\\(/i.test(text)?(this.type="function",this.name=RegExp.$1,this.value=text):/^["\'][^"\']*["\']/.test(text)?(this.type="string",this.value=eval(text)):Colors[text.toLowerCase()]?(this.type="color",temp=Colors[text.toLowerCase()].substring(1),this.red=parseInt(temp.substring(0,2),16),this.green=parseInt(temp.substring(2,4),16),this.blue=parseInt(temp.substring(4,6),16)):/^[\\,\\/]$/.test(text)?(this.type="operator",this.value=text):/^[a-z\\-_\\u0080-\\uFFFF][a-z0-9\\-_\\u0080-\\uFFFF]*$/i.test(text)&&(this.type="identifier",this.value=text)}function Selector(parts,line,col){SyntaxUnit.call(this,parts.join(" "),line,col,Parser.SELECTOR_TYPE),this.parts=parts,this.specificity=Specificity.calculate(this)}function SelectorPart(elementName,modifiers,text,line,col){SyntaxUnit.call(this,text,line,col,Parser.SELECTOR_PART_TYPE),this.elementName=elementName,this.modifiers=modifiers}function SelectorSubPart(text,type,line,col){SyntaxUnit.call(this,text,line,col,Parser.SELECTOR_SUB_PART_TYPE),this.type=type,this.args=[]}function Specificity(a,b,c,d){this.a=a,this.b=b,this.c=c,this.d=d}function isHexDigit(c){return null!==c&&h.test(c)}function isDigit(c){return null!==c&&/\\d/.test(c)}function isWhitespace(c){return null!==c&&/\\s/.test(c)}function isNewLine(c){return null!==c&&nl.test(c)}function isNameStart(c){return null!==c&&/[a-z_\\u0080-\\uFFFF\\\\]/i.test(c)}function isNameChar(c){return null!==c&&(isNameStart(c)||/[0-9\\-\\\\]/.test(c))}function isIdentStart(c){return null!==c&&(isNameStart(c)||/\\-\\\\/.test(c))}function mix(receiver,supplier){for(var prop in supplier)supplier.hasOwnProperty(prop)&&(receiver[prop]=supplier[prop]);return receiver}function TokenStream(input){TokenStreamBase.call(this,input,Tokens)}function ValidationError(message,line,col){this.col=col,this.line=line,this.message=message}var EventTarget=parserlib.util.EventTarget,TokenStreamBase=parserlib.util.TokenStreamBase,StringReader=parserlib.util.StringReader,SyntaxError=parserlib.util.SyntaxError,SyntaxUnit=parserlib.util.SyntaxUnit,Colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",activeBorder:"Active window border.",activecaption:"Active window caption.",appworkspace:"Background color of multiple document interface.",background:"Desktop background.",buttonface:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonhighlight:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonshadow:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttontext:"Text on push buttons.",captiontext:"Text in caption, size box, and scrollbar arrow box.",graytext:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.",greytext:"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.",highlight:"Item(s) selected in a control.",highlighttext:"Text of item(s) selected in a control.",inactiveborder:"Inactive window border.",inactivecaption:"Inactive window caption.",inactivecaptiontext:"Color of text in an inactive caption.",infobackground:"Background color for tooltip controls.",infotext:"Text color for tooltip controls.",menu:"Menu background.",menutext:"Text in menus.",scrollbar:"Scroll bar gray area.",threeddarkshadow:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedface:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedhighlight:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedlightshadow:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedshadow:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",window:"Window background.",windowframe:"Window frame.",windowtext:"Text in windows."};Combinator.prototype=new SyntaxUnit,Combinator.prototype.constructor=Combinator,MediaFeature.prototype=new SyntaxUnit,MediaFeature.prototype.constructor=MediaFeature,MediaQuery.prototype=new SyntaxUnit,MediaQuery.prototype.constructor=MediaQuery,Parser.DEFAULT_TYPE=0,Parser.COMBINATOR_TYPE=1,Parser.MEDIA_FEATURE_TYPE=2,Parser.MEDIA_QUERY_TYPE=3,Parser.PROPERTY_NAME_TYPE=4,Parser.PROPERTY_VALUE_TYPE=5,Parser.PROPERTY_VALUE_PART_TYPE=6,Parser.SELECTOR_TYPE=7,Parser.SELECTOR_PART_TYPE=8,Parser.SELECTOR_SUB_PART_TYPE=9,Parser.prototype=function(){var prop,proto=new EventTarget,additions={constructor:Parser,DEFAULT_TYPE:0,COMBINATOR_TYPE:1,MEDIA_FEATURE_TYPE:2,MEDIA_QUERY_TYPE:3,PROPERTY_NAME_TYPE:4,PROPERTY_VALUE_TYPE:5,PROPERTY_VALUE_PART_TYPE:6,SELECTOR_TYPE:7,SELECTOR_PART_TYPE:8,SELECTOR_SUB_PART_TYPE:9,_stylesheet:function(){var count,token,tt,tokenStream=this._tokenStream;for(this.fire("startstylesheet"),this._charset(),this._skipCruft();tokenStream.peek()==Tokens.IMPORT_SYM;)this._import(),this._skipCruft();for(;tokenStream.peek()==Tokens.NAMESPACE_SYM;)this._namespace(),this._skipCruft();for(tt=tokenStream.peek();tt>Tokens.EOF;){try{switch(tt){case Tokens.MEDIA_SYM:this._media(),this._skipCruft();break;case Tokens.PAGE_SYM:this._page(),this._skipCruft();break;case Tokens.FONT_FACE_SYM:this._font_face(),this._skipCruft();break;case Tokens.KEYFRAMES_SYM:this._keyframes(),this._skipCruft();break;case Tokens.VIEWPORT_SYM:this._viewport(),this._skipCruft();break;case Tokens.UNKNOWN_SYM:if(tokenStream.get(),this.options.strict)throw new SyntaxError("Unknown @ rule.",tokenStream.LT(0).startLine,tokenStream.LT(0).startCol);for(this.fire({type:"error",error:null,message:"Unknown @ rule: "+tokenStream.LT(0).value+".",line:tokenStream.LT(0).startLine,col:tokenStream.LT(0).startCol}),count=0;tokenStream.advance([Tokens.LBRACE,Tokens.RBRACE])==Tokens.LBRACE;)count++;for(;count;)tokenStream.advance([Tokens.RBRACE]),count--;break;case Tokens.S:this._readWhitespace();break;default:if(!this._ruleset())switch(tt){case Tokens.CHARSET_SYM:throw token=tokenStream.LT(1),this._charset(!1),new SyntaxError("@charset not allowed here.",token.startLine,token.startCol);case Tokens.IMPORT_SYM:throw token=tokenStream.LT(1),this._import(!1),new SyntaxError("@import not allowed here.",token.startLine,token.startCol);case Tokens.NAMESPACE_SYM:throw token=tokenStream.LT(1),this._namespace(!1),new SyntaxError("@namespace not allowed here.",token.startLine,token.startCol);default:tokenStream.get(),this._unexpectedToken(tokenStream.token())}}}catch(ex){if(!(ex instanceof SyntaxError)||this.options.strict)throw ex;this.fire({type:"error",error:ex,message:ex.message,line:ex.line,col:ex.col})}tt=tokenStream.peek()}tt!=Tokens.EOF&&this._unexpectedToken(tokenStream.token()),this.fire("endstylesheet")},_charset:function(emit){var charset,token,line,col,tokenStream=this._tokenStream;tokenStream.match(Tokens.CHARSET_SYM)&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),tokenStream.mustMatch(Tokens.STRING),token=tokenStream.token(),charset=token.value,this._readWhitespace(),tokenStream.mustMatch(Tokens.SEMICOLON),emit!==!1&&this.fire({type:"charset",charset:charset,line:line,col:col}))},_import:function(emit){var uri,importToken,tokenStream=this._tokenStream,mediaList=[];tokenStream.mustMatch(Tokens.IMPORT_SYM),importToken=tokenStream.token(),this._readWhitespace(),tokenStream.mustMatch([Tokens.STRING,Tokens.URI]),uri=tokenStream.token().value.replace(/^(?:url\\()?["\']?([^"\']+?)["\']?\\)?$/,"$1"),this._readWhitespace(),mediaList=this._media_query_list(),tokenStream.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),emit!==!1&&this.fire({type:"import",uri:uri,media:mediaList,line:importToken.startLine,col:importToken.startCol})},_namespace:function(emit){var line,col,prefix,uri,tokenStream=this._tokenStream;tokenStream.mustMatch(Tokens.NAMESPACE_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),tokenStream.match(Tokens.IDENT)&&(prefix=tokenStream.token().value,this._readWhitespace()),tokenStream.mustMatch([Tokens.STRING,Tokens.URI]),uri=tokenStream.token().value.replace(/(?:url\\()?["\']([^"\']+)["\']\\)?/,"$1"),this._readWhitespace(),tokenStream.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),emit!==!1&&this.fire({type:"namespace",prefix:prefix,uri:uri,line:line,col:col})},_media:function(){var line,col,mediaList,tokenStream=this._tokenStream;for(tokenStream.mustMatch(Tokens.MEDIA_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),mediaList=this._media_query_list(),tokenStream.mustMatch(Tokens.LBRACE),this._readWhitespace(),this.fire({type:"startmedia",media:mediaList,line:line,col:col});;)if(tokenStream.peek()==Tokens.PAGE_SYM)this._page();else if(tokenStream.peek()==Tokens.FONT_FACE_SYM)this._font_face();else if(tokenStream.peek()==Tokens.VIEWPORT_SYM)this._viewport();else if(!this._ruleset())break;tokenStream.mustMatch(Tokens.RBRACE),this._readWhitespace(),this.fire({type:"endmedia",media:mediaList,line:line,col:col})},_media_query_list:function(){var tokenStream=this._tokenStream,mediaList=[];for(this._readWhitespace(),(tokenStream.peek()==Tokens.IDENT||tokenStream.peek()==Tokens.LPAREN)&&mediaList.push(this._media_query());tokenStream.match(Tokens.COMMA);)this._readWhitespace(),mediaList.push(this._media_query());return mediaList},_media_query:function(){var tokenStream=this._tokenStream,type=null,ident=null,token=null,expressions=[];if(tokenStream.match(Tokens.IDENT)&&(ident=tokenStream.token().value.toLowerCase(),"only"!=ident&&"not"!=ident?(tokenStream.unget(),ident=null):token=tokenStream.token()),this._readWhitespace(),tokenStream.peek()==Tokens.IDENT?(type=this._media_type(),null===token&&(token=tokenStream.token())):tokenStream.peek()==Tokens.LPAREN&&(null===token&&(token=tokenStream.LT(1)),expressions.push(this._media_expression())),null===type&&0===expressions.length)return null;for(this._readWhitespace();tokenStream.match(Tokens.IDENT);)"and"!=tokenStream.token().value.toLowerCase()&&this._unexpectedToken(tokenStream.token()),this._readWhitespace(),expressions.push(this._media_expression());return new MediaQuery(ident,type,expressions,token.startLine,token.startCol)},_media_type:function(){return this._media_feature()},_media_expression:function(){var token,tokenStream=this._tokenStream,feature=null,expression=null;return tokenStream.mustMatch(Tokens.LPAREN),this._readWhitespace(),feature=this._media_feature(),this._readWhitespace(),tokenStream.match(Tokens.COLON)&&(this._readWhitespace(),token=tokenStream.LT(1),expression=this._expression()),tokenStream.mustMatch(Tokens.RPAREN),this._readWhitespace(),new MediaFeature(feature,expression?new SyntaxUnit(expression,token.startLine,token.startCol):null)},_media_feature:function(){var tokenStream=this._tokenStream;return tokenStream.mustMatch(Tokens.IDENT),SyntaxUnit.fromToken(tokenStream.token())},_page:function(){var line,col,tokenStream=this._tokenStream,identifier=null,pseudoPage=null;tokenStream.mustMatch(Tokens.PAGE_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),tokenStream.match(Tokens.IDENT)&&(identifier=tokenStream.token().value,"auto"===identifier.toLowerCase()&&this._unexpectedToken(tokenStream.token())),tokenStream.peek()==Tokens.COLON&&(pseudoPage=this._pseudo_page()),this._readWhitespace(),this.fire({type:"startpage",id:identifier,pseudo:pseudoPage,line:line,col:col}),this._readDeclarations(!0,!0),this.fire({type:"endpage",id:identifier,pseudo:pseudoPage,line:line,col:col})},_margin:function(){var line,col,tokenStream=this._tokenStream,marginSym=this._margin_sym();return marginSym?(line=tokenStream.token().startLine,col=tokenStream.token().startCol,this.fire({type:"startpagemargin",margin:marginSym,line:line,col:col}),this._readDeclarations(!0),this.fire({type:"endpagemargin",margin:marginSym,line:line,col:col}),!0):!1},_margin_sym:function(){var tokenStream=this._tokenStream;return tokenStream.match([Tokens.TOPLEFTCORNER_SYM,Tokens.TOPLEFT_SYM,Tokens.TOPCENTER_SYM,Tokens.TOPRIGHT_SYM,Tokens.TOPRIGHTCORNER_SYM,Tokens.BOTTOMLEFTCORNER_SYM,Tokens.BOTTOMLEFT_SYM,Tokens.BOTTOMCENTER_SYM,Tokens.BOTTOMRIGHT_SYM,Tokens.BOTTOMRIGHTCORNER_SYM,Tokens.LEFTTOP_SYM,Tokens.LEFTMIDDLE_SYM,Tokens.LEFTBOTTOM_SYM,Tokens.RIGHTTOP_SYM,Tokens.RIGHTMIDDLE_SYM,Tokens.RIGHTBOTTOM_SYM])?SyntaxUnit.fromToken(tokenStream.token()):null},_pseudo_page:function(){var tokenStream=this._tokenStream;return tokenStream.mustMatch(Tokens.COLON),tokenStream.mustMatch(Tokens.IDENT),tokenStream.token().value},_font_face:function(){var line,col,tokenStream=this._tokenStream;tokenStream.mustMatch(Tokens.FONT_FACE_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),this.fire({type:"startfontface",line:line,col:col}),this._readDeclarations(!0),this.fire({type:"endfontface",line:line,col:col})},_viewport:function(){var line,col,tokenStream=this._tokenStream;tokenStream.mustMatch(Tokens.VIEWPORT_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),this.fire({type:"startviewport",line:line,col:col}),this._readDeclarations(!0),this.fire({type:"endviewport",line:line,col:col})},_operator:function(inFunction){var tokenStream=this._tokenStream,token=null;return(tokenStream.match([Tokens.SLASH,Tokens.COMMA])||inFunction&&tokenStream.match([Tokens.PLUS,Tokens.STAR,Tokens.MINUS]))&&(token=tokenStream.token(),this._readWhitespace()),token?PropertyValuePart.fromToken(token):null},_combinator:function(){var token,tokenStream=this._tokenStream,value=null;return tokenStream.match([Tokens.PLUS,Tokens.GREATER,Tokens.TILDE])&&(token=tokenStream.token(),value=new Combinator(token.value,token.startLine,token.startCol),this._readWhitespace()),value},_unary_operator:function(){var tokenStream=this._tokenStream;return tokenStream.match([Tokens.MINUS,Tokens.PLUS])?tokenStream.token().value:null},_property:function(){var tokenValue,token,line,col,tokenStream=this._tokenStream,value=null,hack=null;return tokenStream.peek()==Tokens.STAR&&this.options.starHack&&(tokenStream.get(),token=tokenStream.token(),hack=token.value,line=token.startLine,col=token.startCol),tokenStream.match(Tokens.IDENT)&&(token=tokenStream.token(),tokenValue=token.value,"_"==tokenValue.charAt(0)&&this.options.underscoreHack&&(hack="_",tokenValue=tokenValue.substring(1)),value=new PropertyName(tokenValue,hack,line||token.startLine,col||token.startCol),this._readWhitespace()),value},_ruleset:function(){var tt,selectors,tokenStream=this._tokenStream;try{selectors=this._selectors_group()}catch(ex){if(!(ex instanceof SyntaxError)||this.options.strict)throw ex;if(this.fire({type:"error",error:ex,message:ex.message,line:ex.line,col:ex.col}),tt=tokenStream.advance([Tokens.RBRACE]),tt!=Tokens.RBRACE)throw ex;return!0}return selectors&&(this.fire({type:"startrule",selectors:selectors,line:selectors[0].line,col:selectors[0].col}),this._readDeclarations(!0),this.fire({type:"endrule",selectors:selectors,line:selectors[0].line,col:selectors[0].col})),selectors},_selectors_group:function(){var selector,tokenStream=this._tokenStream,selectors=[];if(selector=this._selector(),null!==selector)for(selectors.push(selector);tokenStream.match(Tokens.COMMA);)this._readWhitespace(),selector=this._selector(),null!==selector?selectors.push(selector):this._unexpectedToken(tokenStream.LT(1));return selectors.length?selectors:null},_selector:function(){var tokenStream=this._tokenStream,selector=[],nextSelector=null,combinator=null,ws=null;if(nextSelector=this._simple_selector_sequence(),null===nextSelector)return null;for(selector.push(nextSelector);;)if(combinator=this._combinator(),null!==combinator)selector.push(combinator),nextSelector=this._simple_selector_sequence(),null===nextSelector?this._unexpectedToken(tokenStream.LT(1)):selector.push(nextSelector);else{if(!this._readWhitespace())break;ws=new Combinator(tokenStream.token().value,tokenStream.token().startLine,tokenStream.token().startCol),combinator=this._combinator(),nextSelector=this._simple_selector_sequence(),null===nextSelector?null!==combinator&&this._unexpectedToken(tokenStream.LT(1)):(null!==combinator?selector.push(combinator):selector.push(ws),selector.push(nextSelector))}return new Selector(selector,selector[0].line,selector[0].col)},_simple_selector_sequence:function(){var line,col,tokenStream=this._tokenStream,elementName=null,modifiers=[],selectorText="",components=[function(){return tokenStream.match(Tokens.HASH)?new SelectorSubPart(tokenStream.token().value,"id",tokenStream.token().startLine,tokenStream.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],i=0,len=components.length,component=null;for(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol,elementName=this._type_selector(),elementName||(elementName=this._universal()),null!==elementName&&(selectorText+=elementName);;){if(tokenStream.peek()===Tokens.S)break;for(;len>i&&null===component;)component=components[i++].call(this);if(null===component){if(""===selectorText)return null;break}i=0,modifiers.push(component),selectorText+=""+component,component=null}return""!==selectorText?new SelectorPart(elementName,modifiers,selectorText,line,col):null},_type_selector:function(){var tokenStream=this._tokenStream,ns=this._namespace_prefix(),elementName=this._element_name();return elementName?(ns&&(elementName.text=ns+elementName.text,elementName.col-=ns.length),elementName):(ns&&(tokenStream.unget(),ns.length>1&&tokenStream.unget()),null)},_class:function(){var token,tokenStream=this._tokenStream;return tokenStream.match(Tokens.DOT)?(tokenStream.mustMatch(Tokens.IDENT),token=tokenStream.token(),new SelectorSubPart("."+token.value,"class",token.startLine,token.startCol-1)):null},_element_name:function(){var token,tokenStream=this._tokenStream;return tokenStream.match(Tokens.IDENT)?(token=tokenStream.token(),new SelectorSubPart(token.value,"elementName",token.startLine,token.startCol)):null},_namespace_prefix:function(){var tokenStream=this._tokenStream,value="";return(tokenStream.LA(1)===Tokens.PIPE||tokenStream.LA(2)===Tokens.PIPE)&&(tokenStream.match([Tokens.IDENT,Tokens.STAR])&&(value+=tokenStream.token().value),tokenStream.mustMatch(Tokens.PIPE),value+="|"),value.length?value:null},_universal:function(){var ns,tokenStream=this._tokenStream,value="";return ns=this._namespace_prefix(),ns&&(value+=ns),tokenStream.match(Tokens.STAR)&&(value+="*"),value.length?value:null},_attrib:function(){var ns,token,tokenStream=this._tokenStream,value=null;return tokenStream.match(Tokens.LBRACKET)?(token=tokenStream.token(),value=token.value,value+=this._readWhitespace(),ns=this._namespace_prefix(),ns&&(value+=ns),tokenStream.mustMatch(Tokens.IDENT),value+=tokenStream.token().value,value+=this._readWhitespace(),tokenStream.match([Tokens.PREFIXMATCH,Tokens.SUFFIXMATCH,Tokens.SUBSTRINGMATCH,Tokens.EQUALS,Tokens.INCLUDES,Tokens.DASHMATCH])&&(value+=tokenStream.token().value,value+=this._readWhitespace(),tokenStream.mustMatch([Tokens.IDENT,Tokens.STRING]),value+=tokenStream.token().value,value+=this._readWhitespace()),tokenStream.mustMatch(Tokens.RBRACKET),new SelectorSubPart(value+"]","attribute",token.startLine,token.startCol)):null},_pseudo:function(){var line,col,tokenStream=this._tokenStream,pseudo=null,colons=":";return tokenStream.match(Tokens.COLON)&&(tokenStream.match(Tokens.COLON)&&(colons+=":"),tokenStream.match(Tokens.IDENT)?(pseudo=tokenStream.token().value,line=tokenStream.token().startLine,col=tokenStream.token().startCol-colons.length):tokenStream.peek()==Tokens.FUNCTION&&(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol-colons.length,pseudo=this._functional_pseudo()),pseudo&&(pseudo=new SelectorSubPart(colons+pseudo,"pseudo",line,col))),pseudo},_functional_pseudo:function(){var tokenStream=this._tokenStream,value=null;return tokenStream.match(Tokens.FUNCTION)&&(value=tokenStream.token().value,value+=this._readWhitespace(),value+=this._expression(),tokenStream.mustMatch(Tokens.RPAREN),value+=")"),value},_expression:function(){for(var tokenStream=this._tokenStream,value="";tokenStream.match([Tokens.PLUS,Tokens.MINUS,Tokens.DIMENSION,Tokens.NUMBER,Tokens.STRING,Tokens.IDENT,Tokens.LENGTH,Tokens.FREQ,Tokens.ANGLE,Tokens.TIME,Tokens.RESOLUTION,Tokens.SLASH]);)value+=tokenStream.token().value,value+=this._readWhitespace();return value.length?value:null},_negation:function(){var line,col,arg,tokenStream=this._tokenStream,value="",subpart=null;return tokenStream.match(Tokens.NOT)&&(value=tokenStream.token().value,line=tokenStream.token().startLine,col=tokenStream.token().startCol,value+=this._readWhitespace(),arg=this._negation_arg(),value+=arg,value+=this._readWhitespace(),tokenStream.match(Tokens.RPAREN),value+=tokenStream.token().value,subpart=new SelectorSubPart(value,"not",line,col),subpart.args.push(arg)),subpart},_negation_arg:function(){var line,col,part,tokenStream=this._tokenStream,args=[this._type_selector,this._universal,function(){return tokenStream.match(Tokens.HASH)?new SelectorSubPart(tokenStream.token().value,"id",tokenStream.token().startLine,tokenStream.token().startCol):null},this._class,this._attrib,this._pseudo],arg=null,i=0,len=args.length;for(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol;len>i&&null===arg;)arg=args[i].call(this),i++;return null===arg&&this._unexpectedToken(tokenStream.LT(1)),part="elementName"==arg.type?new SelectorPart(arg,[],""+arg,line,col):new SelectorPart(null,[arg],""+arg,line,col)},_declaration:function(){var tokenStream=this._tokenStream,property=null,expr=null,prio=null,invalid=null,propertyName="";if(property=this._property(),null!==property){tokenStream.mustMatch(Tokens.COLON),this._readWhitespace(),expr=this._expr(),expr&&0!==expr.length||this._unexpectedToken(tokenStream.LT(1)),prio=this._prio(),propertyName=""+property,(this.options.starHack&&"*"==property.hack||this.options.underscoreHack&&"_"==property.hack)&&(propertyName=property.text);try{this._validateProperty(propertyName,expr)}catch(ex){invalid=ex}return this.fire({type:"property",property:property,value:expr,important:prio,line:property.line,col:property.col,invalid:invalid}),!0}return!1},_prio:function(){var tokenStream=this._tokenStream,result=tokenStream.match(Tokens.IMPORTANT_SYM);return this._readWhitespace(),result},_expr:function(inFunction){var values=(this._tokenStream,[]),value=null,operator=null;if(value=this._term(inFunction),null!==value)for(values.push(value);;){if(operator=this._operator(inFunction),operator&&values.push(operator),value=this._term(inFunction),null===value)break;\nvalues.push(value)}return values.length>0?new PropertyValue(values,values[0].line,values[0].col):null},_term:function(inFunction){var token,line,col,tokenStream=this._tokenStream,unary=null,value=null,endChar=null;return unary=this._unary_operator(),null!==unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol),tokenStream.peek()==Tokens.IE_FUNCTION&&this.options.ieFilters?(value=this._ie_function(),null===unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol)):inFunction&&tokenStream.match([Tokens.LPAREN,Tokens.LBRACE,Tokens.LBRACKET])?(token=tokenStream.token(),endChar=token.endChar,value=token.value+this._expr(inFunction).text,null===unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol),tokenStream.mustMatch(Tokens.type(endChar)),value+=endChar,this._readWhitespace()):tokenStream.match([Tokens.NUMBER,Tokens.PERCENTAGE,Tokens.LENGTH,Tokens.ANGLE,Tokens.TIME,Tokens.FREQ,Tokens.STRING,Tokens.IDENT,Tokens.URI,Tokens.UNICODE_RANGE])?(value=tokenStream.token().value,null===unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol),this._readWhitespace()):(token=this._hexcolor(),null===token?(null===unary&&(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol),null===value&&(value=tokenStream.LA(3)==Tokens.EQUALS&&this.options.ieFilters?this._ie_function():this._function())):(value=token.value,null===unary&&(line=token.startLine,col=token.startCol))),null!==value?new PropertyValuePart(null!==unary?unary+value:value,line,col):null},_function:function(){var lt,tokenStream=this._tokenStream,functionText=null,expr=null;if(tokenStream.match(Tokens.FUNCTION)){if(functionText=tokenStream.token().value,this._readWhitespace(),expr=this._expr(!0),functionText+=expr,this.options.ieFilters&&tokenStream.peek()==Tokens.EQUALS)do for(this._readWhitespace()&&(functionText+=tokenStream.token().value),tokenStream.LA(0)==Tokens.COMMA&&(functionText+=tokenStream.token().value),tokenStream.match(Tokens.IDENT),functionText+=tokenStream.token().value,tokenStream.match(Tokens.EQUALS),functionText+=tokenStream.token().value,lt=tokenStream.peek();lt!=Tokens.COMMA&&lt!=Tokens.S&&lt!=Tokens.RPAREN;)tokenStream.get(),functionText+=tokenStream.token().value,lt=tokenStream.peek();while(tokenStream.match([Tokens.COMMA,Tokens.S]));tokenStream.match(Tokens.RPAREN),functionText+=")",this._readWhitespace()}return functionText},_ie_function:function(){var lt,tokenStream=this._tokenStream,functionText=null;if(tokenStream.match([Tokens.IE_FUNCTION,Tokens.FUNCTION])){functionText=tokenStream.token().value;do for(this._readWhitespace()&&(functionText+=tokenStream.token().value),tokenStream.LA(0)==Tokens.COMMA&&(functionText+=tokenStream.token().value),tokenStream.match(Tokens.IDENT),functionText+=tokenStream.token().value,tokenStream.match(Tokens.EQUALS),functionText+=tokenStream.token().value,lt=tokenStream.peek();lt!=Tokens.COMMA&&lt!=Tokens.S&&lt!=Tokens.RPAREN;)tokenStream.get(),functionText+=tokenStream.token().value,lt=tokenStream.peek();while(tokenStream.match([Tokens.COMMA,Tokens.S]));tokenStream.match(Tokens.RPAREN),functionText+=")",this._readWhitespace()}return functionText},_hexcolor:function(){var color,tokenStream=this._tokenStream,token=null;if(tokenStream.match(Tokens.HASH)){if(token=tokenStream.token(),color=token.value,!/#[a-f0-9]{3,6}/i.test(color))throw new SyntaxError("Expected a hex color but found \'"+color+"\' at line "+token.startLine+", col "+token.startCol+".",token.startLine,token.startCol);this._readWhitespace()}return token},_keyframes:function(){var token,tt,name,tokenStream=this._tokenStream,prefix="";for(tokenStream.mustMatch(Tokens.KEYFRAMES_SYM),token=tokenStream.token(),/^@\\-([^\\-]+)\\-/.test(token.value)&&(prefix=RegExp.$1),this._readWhitespace(),name=this._keyframe_name(),this._readWhitespace(),tokenStream.mustMatch(Tokens.LBRACE),this.fire({type:"startkeyframes",name:name,prefix:prefix,line:token.startLine,col:token.startCol}),this._readWhitespace(),tt=tokenStream.peek();tt==Tokens.IDENT||tt==Tokens.PERCENTAGE;)this._keyframe_rule(),this._readWhitespace(),tt=tokenStream.peek();this.fire({type:"endkeyframes",name:name,prefix:prefix,line:token.startLine,col:token.startCol}),this._readWhitespace(),tokenStream.mustMatch(Tokens.RBRACE)},_keyframe_name:function(){var tokenStream=this._tokenStream;return tokenStream.mustMatch([Tokens.IDENT,Tokens.STRING]),SyntaxUnit.fromToken(tokenStream.token())},_keyframe_rule:function(){var keyList=(this._tokenStream,this._key_list());this.fire({type:"startkeyframerule",keys:keyList,line:keyList[0].line,col:keyList[0].col}),this._readDeclarations(!0),this.fire({type:"endkeyframerule",keys:keyList,line:keyList[0].line,col:keyList[0].col})},_key_list:function(){var tokenStream=this._tokenStream,keyList=[];for(keyList.push(this._key()),this._readWhitespace();tokenStream.match(Tokens.COMMA);)this._readWhitespace(),keyList.push(this._key()),this._readWhitespace();return keyList},_key:function(){var token,tokenStream=this._tokenStream;if(tokenStream.match(Tokens.PERCENTAGE))return SyntaxUnit.fromToken(tokenStream.token());if(tokenStream.match(Tokens.IDENT)){if(token=tokenStream.token(),/from|to/i.test(token.value))return SyntaxUnit.fromToken(token);tokenStream.unget()}this._unexpectedToken(tokenStream.LT(1))},_skipCruft:function(){for(;this._tokenStream.match([Tokens.S,Tokens.CDO,Tokens.CDC]););},_readDeclarations:function(checkStart,readMargins){var tt,tokenStream=this._tokenStream;this._readWhitespace(),checkStart&&tokenStream.mustMatch(Tokens.LBRACE),this._readWhitespace();try{for(;;){if(tokenStream.match(Tokens.SEMICOLON)||readMargins&&this._margin());else{if(!this._declaration())break;if(!tokenStream.match(Tokens.SEMICOLON))break}this._readWhitespace()}tokenStream.mustMatch(Tokens.RBRACE),this._readWhitespace()}catch(ex){if(!(ex instanceof SyntaxError)||this.options.strict)throw ex;if(this.fire({type:"error",error:ex,message:ex.message,line:ex.line,col:ex.col}),tt=tokenStream.advance([Tokens.SEMICOLON,Tokens.RBRACE]),tt==Tokens.SEMICOLON)this._readDeclarations(!1,readMargins);else if(tt!=Tokens.RBRACE)throw ex}},_readWhitespace:function(){for(var tokenStream=this._tokenStream,ws="";tokenStream.match(Tokens.S);)ws+=tokenStream.token().value;return ws},_unexpectedToken:function(token){throw new SyntaxError("Unexpected token \'"+token.value+"\' at line "+token.startLine+", col "+token.startCol+".",token.startLine,token.startCol)},_verifyEnd:function(){this._tokenStream.LA(1)!=Tokens.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},_validateProperty:function(property,value){Validation.validate(property,value)},parse:function(input){this._tokenStream=new TokenStream(input,Tokens),this._stylesheet()},parseStyleSheet:function(input){return this.parse(input)},parseMediaQuery:function(input){this._tokenStream=new TokenStream(input,Tokens);var result=this._media_query();return this._verifyEnd(),result},parsePropertyValue:function(input){this._tokenStream=new TokenStream(input,Tokens),this._readWhitespace();var result=this._expr();return this._readWhitespace(),this._verifyEnd(),result},parseRule:function(input){this._tokenStream=new TokenStream(input,Tokens),this._readWhitespace();var result=this._ruleset();return this._readWhitespace(),this._verifyEnd(),result},parseSelector:function(input){this._tokenStream=new TokenStream(input,Tokens),this._readWhitespace();var result=this._selector();return this._readWhitespace(),this._verifyEnd(),result},parseStyleAttribute:function(input){input+="}",this._tokenStream=new TokenStream(input,Tokens),this._readDeclarations()}};for(prop in additions)additions.hasOwnProperty(prop)&&(proto[prop]=additions[prop]);return proto}();var Properties={"align-items":"flex-start | flex-end | center | baseline | stretch","align-content":"flex-start | flex-end | center | space-between | space-around | stretch","align-self":"auto | flex-start | flex-end | center | baseline | stretch","-webkit-align-items":"flex-start | flex-end | center | baseline | stretch","-webkit-align-content":"flex-start | flex-end | center | space-between | space-around | stretch","-webkit-align-self":"auto | flex-start | flex-end | center | baseline | stretch","alignment-adjust":"auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length>","alignment-baseline":"baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",animation:1,"animation-delay":{multi:"<time>",comma:!0},"animation-direction":{multi:"normal | reverse | alternate | alternate-reverse",comma:!0},"animation-duration":{multi:"<time>",comma:!0},"animation-fill-mode":{multi:"none | forwards | backwards | both",comma:!0},"animation-iteration-count":{multi:"<number> | infinite",comma:!0},"animation-name":{multi:"none | <ident>",comma:!0},"animation-play-state":{multi:"running | paused",comma:!0},"animation-timing-function":1,"-moz-animation-delay":{multi:"<time>",comma:!0},"-moz-animation-direction":{multi:"normal | reverse | alternate | alternate-reverse",comma:!0},"-moz-animation-duration":{multi:"<time>",comma:!0},"-moz-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-moz-animation-name":{multi:"none | <ident>",comma:!0},"-moz-animation-play-state":{multi:"running | paused",comma:!0},"-ms-animation-delay":{multi:"<time>",comma:!0},"-ms-animation-direction":{multi:"normal | reverse | alternate | alternate-reverse",comma:!0},"-ms-animation-duration":{multi:"<time>",comma:!0},"-ms-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-ms-animation-name":{multi:"none | <ident>",comma:!0},"-ms-animation-play-state":{multi:"running | paused",comma:!0},"-webkit-animation-delay":{multi:"<time>",comma:!0},"-webkit-animation-direction":{multi:"normal | reverse | alternate | alternate-reverse",comma:!0},"-webkit-animation-duration":{multi:"<time>",comma:!0},"-webkit-animation-fill-mode":{multi:"none | forwards | backwards | both",comma:!0},"-webkit-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-webkit-animation-name":{multi:"none | <ident>",comma:!0},"-webkit-animation-play-state":{multi:"running | paused",comma:!0},"-o-animation-delay":{multi:"<time>",comma:!0},"-o-animation-direction":{multi:"normal | reverse | alternate | alternate-reverse",comma:!0},"-o-animation-duration":{multi:"<time>",comma:!0},"-o-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-o-animation-name":{multi:"none | <ident>",comma:!0},"-o-animation-play-state":{multi:"running | paused",comma:!0},appearance:"icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal | none | inherit",azimuth:function(expression){var part,simple="<angle> | leftwards | rightwards | inherit",direction="left-side | far-left | left | center-left | center | center-right | right | far-right | right-side",behind=!1,valid=!1;if(ValidationTypes.isAny(expression,simple)||(ValidationTypes.isAny(expression,"behind")&&(behind=!0,valid=!0),ValidationTypes.isAny(expression,direction)&&(valid=!0,behind||ValidationTypes.isAny(expression,"behind"))),expression.hasNext())throw part=expression.next(),valid?new ValidationError("Expected end of value but found \'"+part+"\'.",part.line,part.col):new ValidationError("Expected (<\'azimuth\'>) but found \'"+part+"\'.",part.line,part.col)},"backface-visibility":"visible | hidden",background:1,"background-attachment":{multi:"<attachment>",comma:!0},"background-clip":{multi:"<box>",comma:!0},"background-color":"<color> | inherit","background-image":{multi:"<bg-image>",comma:!0},"background-origin":{multi:"<box>",comma:!0},"background-position":{multi:"<bg-position>",comma:!0},"background-repeat":{multi:"<repeat-style>"},"background-size":{multi:"<bg-size>",comma:!0},"baseline-shift":"baseline | sub | super | <percentage> | <length>",behavior:1,binding:1,bleed:"<length>","bookmark-label":"<content> | <attr> | <string>","bookmark-level":"none | <integer>","bookmark-state":"open | closed","bookmark-target":"none | <uri> | <attr>",border:"<border-width> || <border-style> || <color>","border-bottom":"<border-width> || <border-style> || <color>","border-bottom-color":"<color> | inherit","border-bottom-left-radius":"<x-one-radius>","border-bottom-right-radius":"<x-one-radius>","border-bottom-style":"<border-style>","border-bottom-width":"<border-width>","border-collapse":"collapse | separate | inherit","border-color":{multi:"<color> | inherit",max:4},"border-image":1,"border-image-outset":{multi:"<length> | <number>",max:4},"border-image-repeat":{multi:"stretch | repeat | round",max:2},"border-image-slice":function(expression){var part,valid=!1,numeric="<number> | <percentage>",fill=!1,count=0,max=4;for(ValidationTypes.isAny(expression,"fill")&&(fill=!0,valid=!0);expression.hasNext()&&max>count&&(valid=ValidationTypes.isAny(expression,numeric));)count++;if(fill?valid=!0:ValidationTypes.isAny(expression,"fill"),expression.hasNext())throw part=expression.next(),valid?new ValidationError("Expected end of value but found \'"+part+"\'.",part.line,part.col):new ValidationError("Expected ([<number> | <percentage>]{1,4} && fill?) but found \'"+part+"\'.",part.line,part.col)},"border-image-source":"<image> | none","border-image-width":{multi:"<length> | <percentage> | <number> | auto",max:4},"border-left":"<border-width> || <border-style> || <color>","border-left-color":"<color> | inherit","border-left-style":"<border-style>","border-left-width":"<border-width>","border-radius":function(expression){for(var part,valid=!1,simple="<length> | <percentage> | inherit",slash=!1,count=0,max=8;expression.hasNext()&&max>count;){if(valid=ValidationTypes.isAny(expression,simple),!valid){if(!("/"==expression.peek()&&count>0)||slash)break;slash=!0,max=count+5,expression.next()}count++}if(expression.hasNext())throw part=expression.next(),valid?new ValidationError("Expected end of value but found \'"+part+"\'.",part.line,part.col):new ValidationError("Expected (<\'border-radius\'>) but found \'"+part+"\'.",part.line,part.col)},"border-right":"<border-width> || <border-style> || <color>","border-right-color":"<color> | inherit","border-right-style":"<border-style>","border-right-width":"<border-width>","border-spacing":{multi:"<length> | inherit",max:2},"border-style":{multi:"<border-style>",max:4},"border-top":"<border-width> || <border-style> || <color>","border-top-color":"<color> | inherit","border-top-left-radius":"<x-one-radius>","border-top-right-radius":"<x-one-radius>","border-top-style":"<border-style>","border-top-width":"<border-width>","border-width":{multi:"<border-width>",max:4},bottom:"<margin-width> | inherit","-moz-box-align":"start | end | center | baseline | stretch","-moz-box-decoration-break":"slice |clone","-moz-box-direction":"normal | reverse | inherit","-moz-box-flex":"<number>","-moz-box-flex-group":"<integer>","-moz-box-lines":"single | multiple","-moz-box-ordinal-group":"<integer>","-moz-box-orient":"horizontal | vertical | inline-axis | block-axis | inherit","-moz-box-pack":"start | end | center | justify","-webkit-box-align":"start | end | center | baseline | stretch","-webkit-box-decoration-break":"slice |clone","-webkit-box-direction":"normal | reverse | inherit","-webkit-box-flex":"<number>","-webkit-box-flex-group":"<integer>","-webkit-box-lines":"single | multiple","-webkit-box-ordinal-group":"<integer>","-webkit-box-orient":"horizontal | vertical | inline-axis | block-axis | inherit","-webkit-box-pack":"start | end | center | justify","box-shadow":function(expression){var part;if(ValidationTypes.isAny(expression,"none")){if(expression.hasNext())throw part=expression.next(),new ValidationError("Expected end of value but found \'"+part+"\'.",part.line,part.col)}else Validation.multiProperty("<shadow>",expression,!0,1/0)},"box-sizing":"content-box | border-box | inherit","break-after":"auto | always | avoid | left | right | page | column | avoid-page | avoid-column","break-before":"auto | always | avoid | left | right | page | column | avoid-page | avoid-column","break-inside":"auto | avoid | avoid-page | avoid-column","caption-side":"top | bottom | inherit",clear:"none | right | left | both | inherit",clip:1,color:"<color> | inherit","color-profile":1,"column-count":"<integer> | auto","column-fill":"auto | balance","column-gap":"<length> | normal","column-rule":"<border-width> || <border-style> || <color>","column-rule-color":"<color>","column-rule-style":"<border-style>","column-rule-width":"<border-width>","column-span":"none | all","column-width":"<length> | auto",columns:1,content:1,"counter-increment":1,"counter-reset":1,crop:"<shape> | auto",cue:"cue-after | cue-before | inherit","cue-after":1,"cue-before":1,cursor:1,direction:"ltr | rtl | inherit",display:"inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box | -ms-flexbox | -ms-inline-flexbox | flex | -webkit-flex | inline-flex | -webkit-inline-flex","dominant-baseline":1,"drop-initial-after-adjust":"central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>","drop-initial-after-align":"baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical","drop-initial-before-adjust":"before-edge | text-before-edge | central | middle | hanging | mathematical | <percentage> | <length>","drop-initial-before-align":"caps-height | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical","drop-initial-size":"auto | line | <length> | <percentage>","drop-initial-value":"initial | <integer>",elevation:"<angle> | below | level | above | higher | lower | inherit","empty-cells":"show | hide | inherit",filter:1,fit:"fill | hidden | meet | slice","fit-position":1,flex:"<flex>","flex-basis":"<width>","flex-direction":"row | row-reverse | column | column-reverse","flex-flow":"<flex-direction> || <flex-wrap>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap | wrap | wrap-reverse","-webkit-flex":"<flex>","-webkit-flex-basis":"<width>","-webkit-flex-direction":"row | row-reverse | column | column-reverse","-webkit-flex-flow":"<flex-direction> || <flex-wrap>","-webkit-flex-grow":"<number>","-webkit-flex-shrink":"<number>","-webkit-flex-wrap":"nowrap | wrap | wrap-reverse","-ms-flex":"<flex>","-ms-flex-align":"start | end | center | stretch | baseline","-ms-flex-direction":"row | row-reverse | column | column-reverse | inherit","-ms-flex-order":"<number>","-ms-flex-pack":"start | end | center | justify","-ms-flex-wrap":"nowrap | wrap | wrap-reverse","float":"left | right | none | inherit","float-offset":1,font:1,"font-family":1,"font-size":"<absolute-size> | <relative-size> | <length> | <percentage> | inherit","font-size-adjust":"<number> | none | inherit","font-stretch":"normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | inherit","font-style":"normal | italic | oblique | inherit","font-variant":"normal | small-caps | inherit","font-weight":"normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit","grid-cell-stacking":"columns | rows | layer","grid-column":1,"grid-columns":1,"grid-column-align":"start | end | center | stretch","grid-column-sizing":1,"grid-column-span":"<integer>","grid-flow":"none | rows | columns","grid-layer":"<integer>","grid-row":1,"grid-rows":1,"grid-row-align":"start | end | center | stretch","grid-row-span":"<integer>","grid-row-sizing":1,"hanging-punctuation":1,height:"<margin-width> | <content-sizing> | inherit","hyphenate-after":"<integer> | auto","hyphenate-before":"<integer> | auto","hyphenate-character":"<string> | auto","hyphenate-lines":"no-limit | <integer>","hyphenate-resource":1,hyphens:"none | manual | auto",icon:1,"image-orientation":"angle | auto","image-rendering":1,"image-resolution":1,"inline-box-align":"initial | last | <integer>","justify-content":"flex-start | flex-end | center | space-between | space-around","-webkit-justify-content":"flex-start | flex-end | center | space-between | space-around",left:"<margin-width> | inherit","letter-spacing":"<length> | normal | inherit","line-height":"<number> | <length> | <percentage> | normal | inherit","line-break":"auto | loose | normal | strict","line-stacking":1,"line-stacking-ruby":"exclude-ruby | include-ruby","line-stacking-shift":"consider-shifts | disregard-shifts","line-stacking-strategy":"inline-line-height | block-line-height | max-height | grid-height","list-style":1,"list-style-image":"<uri> | none | inherit","list-style-position":"inside | outside | inherit","list-style-type":"disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none | inherit",margin:{multi:"<margin-width> | inherit",max:4},"margin-bottom":"<margin-width> | inherit","margin-left":"<margin-width> | inherit","margin-right":"<margin-width> | inherit","margin-top":"<margin-width> | inherit",mark:1,"mark-after":1,"mark-before":1,marks:1,"marquee-direction":1,"marquee-play-count":1,"marquee-speed":1,"marquee-style":1,"max-height":"<length> | <percentage> | <content-sizing> | none | inherit","max-width":"<length> | <percentage> | <content-sizing> | none | inherit","min-height":"<length> | <percentage> | <content-sizing> | contain-floats | -moz-contain-floats | -webkit-contain-floats | inherit","min-width":"<length> | <percentage> | <content-sizing> | contain-floats | -moz-contain-floats | -webkit-contain-floats | inherit","move-to":1,"nav-down":1,"nav-index":1,"nav-left":1,"nav-right":1,"nav-up":1,opacity:"<number> | inherit",order:"<integer>","-webkit-order":"<integer>",orphans:"<integer> | inherit",outline:1,"outline-color":"<color> | invert | inherit","outline-offset":1,"outline-style":"<border-style> | inherit","outline-width":"<border-width> | inherit",overflow:"visible | hidden | scroll | auto | inherit","overflow-style":1,"overflow-wrap":"normal | break-word","overflow-x":1,"overflow-y":1,padding:{multi:"<padding-width> | inherit",max:4},"padding-bottom":"<padding-width> | inherit","padding-left":"<padding-width> | inherit","padding-right":"<padding-width> | inherit","padding-top":"<padding-width> | inherit",page:1,"page-break-after":"auto | always | avoid | left | right | inherit","page-break-before":"auto | always | avoid | left | right | inherit","page-break-inside":"auto | avoid | inherit","page-policy":1,pause:1,"pause-after":1,"pause-before":1,perspective:1,"perspective-origin":1,phonemes:1,pitch:1,"pitch-range":1,"play-during":1,"pointer-events":"auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit",position:"static | relative | absolute | fixed | inherit","presentation-level":1,"punctuation-trim":1,quotes:1,"rendering-intent":1,resize:1,rest:1,"rest-after":1,"rest-before":1,richness:1,right:"<margin-width> | inherit",rotation:1,"rotation-point":1,"ruby-align":1,"ruby-overhang":1,"ruby-position":1,"ruby-span":1,size:1,speak:"normal | none | spell-out | inherit","speak-header":"once | always | inherit","speak-numeral":"digits | continuous | inherit","speak-punctuation":"code | none | inherit","speech-rate":1,src:1,stress:1,"string-set":1,"table-layout":"auto | fixed | inherit","tab-size":"<integer> | <length>",target:1,"target-name":1,"target-new":1,"target-position":1,"text-align":"left | right | center | justify | inherit","text-align-last":1,"text-decoration":1,"text-emphasis":1,"text-height":1,"text-indent":"<length> | <percentage> | inherit","text-justify":"auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida","text-outline":1,"text-overflow":1,"text-rendering":"auto | optimizeSpeed | optimizeLegibility | geometricPrecision | inherit","text-shadow":1,"text-transform":"capitalize | uppercase | lowercase | none | inherit","text-wrap":"normal | none | avoid",top:"<margin-width> | inherit","-ms-touch-action":"auto | none | pan-x | pan-y","touch-action":"auto | none | pan-x | pan-y",transform:1,"transform-origin":1,"transform-style":1,transition:1,"transition-delay":1,"transition-duration":1,"transition-property":1,"transition-timing-function":1,"unicode-bidi":"normal | embed | isolate | bidi-override | isolate-override | plaintext | inherit","user-modify":"read-only | read-write | write-only | inherit","user-select":"none | text | toggle | element | elements | all | inherit","vertical-align":"auto | use-script | baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | <percentage> | <length>",visibility:"visible | hidden | collapse | inherit","voice-balance":1,"voice-duration":1,"voice-family":1,"voice-pitch":1,"voice-pitch-range":1,"voice-rate":1,"voice-stress":1,"voice-volume":1,volume:1,"white-space":"normal | pre | nowrap | pre-wrap | pre-line | inherit | -pre-wrap | -o-pre-wrap | -moz-pre-wrap | -hp-pre-wrap","white-space-collapse":1,widows:"<integer> | inherit",width:"<length> | <percentage> | <content-sizing> | auto | inherit","word-break":"normal | keep-all | break-all","word-spacing":"<length> | normal | inherit","word-wrap":"normal | break-word","writing-mode":"horizontal-tb | vertical-rl | vertical-lr | lr-tb | rl-tb | tb-rl | bt-rl | tb-lr | bt-lr | lr-bt | rl-bt | lr | rl | tb | inherit","z-index":"<integer> | auto | inherit",zoom:"<number> | <percentage> | normal"};PropertyName.prototype=new SyntaxUnit,PropertyName.prototype.constructor=PropertyName,PropertyName.prototype.toString=function(){return(this.hack?this.hack:"")+this.text},PropertyValue.prototype=new SyntaxUnit,PropertyValue.prototype.constructor=PropertyValue,PropertyValueIterator.prototype.count=function(){return this._parts.length},PropertyValueIterator.prototype.isFirst=function(){return 0===this._i},PropertyValueIterator.prototype.hasNext=function(){return this._i<this._parts.length},PropertyValueIterator.prototype.mark=function(){this._marks.push(this._i)},PropertyValueIterator.prototype.peek=function(count){return this.hasNext()?this._parts[this._i+(count||0)]:null},PropertyValueIterator.prototype.next=function(){return this.hasNext()?this._parts[this._i++]:null},PropertyValueIterator.prototype.previous=function(){return this._i>0?this._parts[--this._i]:null},PropertyValueIterator.prototype.restore=function(){this._marks.length&&(this._i=this._marks.pop())},PropertyValuePart.prototype=new SyntaxUnit,PropertyValuePart.prototype.constructor=PropertyValuePart,PropertyValuePart.fromToken=function(token){return new PropertyValuePart(token.value,token.startLine,token.startCol)};var Pseudos={":first-letter":1,":first-line":1,":before":1,":after":1};Pseudos.ELEMENT=1,Pseudos.CLASS=2,Pseudos.isElement=function(pseudo){return 0===pseudo.indexOf("::")||Pseudos[pseudo.toLowerCase()]==Pseudos.ELEMENT},Selector.prototype=new SyntaxUnit,Selector.prototype.constructor=Selector,SelectorPart.prototype=new SyntaxUnit,SelectorPart.prototype.constructor=SelectorPart,SelectorSubPart.prototype=new SyntaxUnit,SelectorSubPart.prototype.constructor=SelectorSubPart,Specificity.prototype={constructor:Specificity,compare:function(other){var i,len,comps=["a","b","c","d"];for(i=0,len=comps.length;len>i;i++){if(this[comps[i]]<other[comps[i]])return-1;if(this[comps[i]]>other[comps[i]])return 1}return 0},valueOf:function(){return 1e3*this.a+100*this.b+10*this.c+this.d},toString:function(){return this.a+","+this.b+","+this.c+","+this.d}},Specificity.calculate=function(selector){function updateValues(part){var i,j,len,num,modifier,elementName=part.elementName?part.elementName.text:"";for(elementName&&"*"!=elementName.charAt(elementName.length-1)&&d++,i=0,len=part.modifiers.length;len>i;i++)switch(modifier=part.modifiers[i],modifier.type){case"class":case"attribute":c++;break;case"id":b++;break;case"pseudo":Pseudos.isElement(modifier.text)?d++:c++;break;case"not":for(j=0,num=modifier.args.length;num>j;j++)updateValues(modifier.args[j])}}var i,len,part,b=0,c=0,d=0;for(i=0,len=selector.parts.length;len>i;i++)part=selector.parts[i],part instanceof SelectorPart&&updateValues(part);return new Specificity(0,b,c,d)};var h=/^[0-9a-fA-F]$/,nonascii=/^[\\u0080-\\uFFFF]$/,nl=/\\n|\\r\\n|\\r|\\f/;TokenStream.prototype=mix(new TokenStreamBase,{_getToken:function(){var c,reader=this._reader,token=null,startLine=reader.getLine(),startCol=reader.getCol();for(c=reader.read();c;){switch(c){case"/":token="*"==reader.peek()?this.commentToken(c,startLine,startCol):this.charToken(c,startLine,startCol);break;case"|":case"~":case"^":case"$":case"*":token="="==reader.peek()?this.comparisonToken(c,startLine,startCol):this.charToken(c,startLine,startCol);break;case\'"\':case"\'":token=this.stringToken(c,startLine,startCol);break;case"#":token=isNameChar(reader.peek())?this.hashToken(c,startLine,startCol):this.charToken(c,startLine,startCol);break;case".":token=isDigit(reader.peek())?this.numberToken(c,startLine,startCol):this.charToken(c,startLine,startCol);break;case"-":token="-"==reader.peek()?this.htmlCommentEndToken(c,startLine,startCol):isNameStart(reader.peek())?this.identOrFunctionToken(c,startLine,startCol):this.charToken(c,startLine,startCol);break;case"!":token=this.importantToken(c,startLine,startCol);break;case"@":token=this.atRuleToken(c,startLine,startCol);break;case":":token=this.notToken(c,startLine,startCol);break;case"<":token=this.htmlCommentStartToken(c,startLine,startCol);break;case"U":case"u":if("+"==reader.peek()){token=this.unicodeRangeToken(c,startLine,startCol);break}default:token=isDigit(c)?this.numberToken(c,startLine,startCol):isWhitespace(c)?this.whitespaceToken(c,startLine,startCol):isIdentStart(c)?this.identOrFunctionToken(c,startLine,startCol):this.charToken(c,startLine,startCol)}break}return token||null!==c||(token=this.createToken(Tokens.EOF,null,startLine,startCol)),token},createToken:function(tt,value,startLine,startCol,options){var reader=this._reader;return options=options||{},{value:value,type:tt,channel:options.channel,endChar:options.endChar,hide:options.hide||!1,startLine:startLine,startCol:startCol,endLine:reader.getLine(),endCol:reader.getCol()}},atRuleToken:function(first,startLine,startCol){var ident,rule=first,reader=this._reader,tt=Tokens.CHAR;return reader.mark(),ident=this.readName(),rule=first+ident,tt=Tokens.type(rule.toLowerCase()),(tt==Tokens.CHAR||tt==Tokens.UNKNOWN)&&(rule.length>1?tt=Tokens.UNKNOWN_SYM:(tt=Tokens.CHAR,rule=first,reader.reset())),this.createToken(tt,rule,startLine,startCol)},charToken:function(c,startLine,startCol){var tt=Tokens.type(c),opts={};return-1==tt?tt=Tokens.CHAR:opts.endChar=Tokens[tt].endChar,this.createToken(tt,c,startLine,startCol,opts)},commentToken:function(first,startLine,startCol){var comment=(this._reader,this.readComment(first));return this.createToken(Tokens.COMMENT,comment,startLine,startCol)},comparisonToken:function(c,startLine,startCol){var reader=this._reader,comparison=c+reader.read(),tt=Tokens.type(comparison)||Tokens.CHAR;return this.createToken(tt,comparison,startLine,startCol)\n},hashToken:function(first,startLine,startCol){var name=(this._reader,this.readName(first));return this.createToken(Tokens.HASH,name,startLine,startCol)},htmlCommentStartToken:function(first,startLine,startCol){var reader=this._reader,text=first;return reader.mark(),text+=reader.readCount(3),"\x3c!--"==text?this.createToken(Tokens.CDO,text,startLine,startCol):(reader.reset(),this.charToken(first,startLine,startCol))},htmlCommentEndToken:function(first,startLine,startCol){var reader=this._reader,text=first;return reader.mark(),text+=reader.readCount(2),"--\x3e"==text?this.createToken(Tokens.CDC,text,startLine,startCol):(reader.reset(),this.charToken(first,startLine,startCol))},identOrFunctionToken:function(first,startLine,startCol){var reader=this._reader,ident=this.readName(first),tt=Tokens.IDENT;return"("==reader.peek()?(ident+=reader.read(),"url("==ident.toLowerCase()?(tt=Tokens.URI,ident=this.readURI(ident),"url("==ident.toLowerCase()&&(tt=Tokens.FUNCTION)):tt=Tokens.FUNCTION):":"==reader.peek()&&"progid"==ident.toLowerCase()&&(ident+=reader.readTo("("),tt=Tokens.IE_FUNCTION),this.createToken(tt,ident,startLine,startCol)},importantToken:function(first,startLine,startCol){var temp,c,reader=this._reader,important=first,tt=Tokens.CHAR;for(reader.mark(),c=reader.read();c;){if("/"==c){if("*"!=reader.peek())break;if(temp=this.readComment(c),""===temp)break}else{if(!isWhitespace(c)){if(/i/i.test(c)){temp=reader.readCount(8),/mportant/i.test(temp)&&(important+=c+temp,tt=Tokens.IMPORTANT_SYM);break}break}important+=c+this.readWhitespace()}c=reader.read()}return tt==Tokens.CHAR?(reader.reset(),this.charToken(first,startLine,startCol)):this.createToken(tt,important,startLine,startCol)},notToken:function(first,startLine,startCol){var reader=this._reader,text=first;return reader.mark(),text+=reader.readCount(4),":not("==text.toLowerCase()?this.createToken(Tokens.NOT,text,startLine,startCol):(reader.reset(),this.charToken(first,startLine,startCol))},numberToken:function(first,startLine,startCol){var ident,reader=this._reader,value=this.readNumber(first),tt=Tokens.NUMBER,c=reader.peek();return isIdentStart(c)?(ident=this.readName(reader.read()),value+=ident,tt=/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vmax$|^vmin$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(ident)?Tokens.LENGTH:/^deg|^rad$|^grad$/i.test(ident)?Tokens.ANGLE:/^ms$|^s$/i.test(ident)?Tokens.TIME:/^hz$|^khz$/i.test(ident)?Tokens.FREQ:/^dpi$|^dpcm$/i.test(ident)?Tokens.RESOLUTION:Tokens.DIMENSION):"%"==c&&(value+=reader.read(),tt=Tokens.PERCENTAGE),this.createToken(tt,value,startLine,startCol)},stringToken:function(first,startLine,startCol){for(var delim=first,string=first,reader=this._reader,prev=first,tt=Tokens.STRING,c=reader.read();c&&(string+=c,c!=delim||"\\\\"==prev);){if(isNewLine(reader.peek())&&"\\\\"!=c){tt=Tokens.INVALID;break}prev=c,c=reader.read()}return null===c&&(tt=Tokens.INVALID),this.createToken(tt,string,startLine,startCol)},unicodeRangeToken:function(first,startLine,startCol){var temp,reader=this._reader,value=first,tt=Tokens.CHAR;return"+"==reader.peek()&&(reader.mark(),value+=reader.read(),value+=this.readUnicodeRangePart(!0),2==value.length?reader.reset():(tt=Tokens.UNICODE_RANGE,-1==value.indexOf("?")&&"-"==reader.peek()&&(reader.mark(),temp=reader.read(),temp+=this.readUnicodeRangePart(!1),1==temp.length?reader.reset():value+=temp))),this.createToken(tt,value,startLine,startCol)},whitespaceToken:function(first,startLine,startCol){var value=(this._reader,first+this.readWhitespace());return this.createToken(Tokens.S,value,startLine,startCol)},readUnicodeRangePart:function(allowQuestionMark){for(var reader=this._reader,part="",c=reader.peek();isHexDigit(c)&&6>part.length;)reader.read(),part+=c,c=reader.peek();if(allowQuestionMark)for(;"?"==c&&6>part.length;)reader.read(),part+=c,c=reader.peek();return part},readWhitespace:function(){for(var reader=this._reader,whitespace="",c=reader.peek();isWhitespace(c);)reader.read(),whitespace+=c,c=reader.peek();return whitespace},readNumber:function(first){for(var reader=this._reader,number=first,hasDot="."==first,c=reader.peek();c;){if(isDigit(c))number+=reader.read();else{if("."!=c)break;if(hasDot)break;hasDot=!0,number+=reader.read()}c=reader.peek()}return number},readString:function(){for(var reader=this._reader,delim=reader.read(),string=delim,prev=delim,c=reader.peek();c&&(c=reader.read(),string+=c,c!=delim||"\\\\"==prev);){if(isNewLine(reader.peek())&&"\\\\"!=c){string="";break}prev=c,c=reader.peek()}return null===c&&(string=""),string},readURI:function(first){var reader=this._reader,uri=first,inner="",c=reader.peek();for(reader.mark();c&&isWhitespace(c);)reader.read(),c=reader.peek();for(inner="\'"==c||\'"\'==c?this.readString():this.readURL(),c=reader.peek();c&&isWhitespace(c);)reader.read(),c=reader.peek();return""===inner||")"!=c?(uri=first,reader.reset()):uri+=inner+reader.read(),uri},readURL:function(){for(var reader=this._reader,url="",c=reader.peek();/^[!#$%&\\\\*-~]$/.test(c);)url+=reader.read(),c=reader.peek();return url},readName:function(first){for(var reader=this._reader,ident=first||"",c=reader.peek();;)if("\\\\"==c)ident+=this.readEscape(reader.read()),c=reader.peek();else{if(!c||!isNameChar(c))break;ident+=reader.read(),c=reader.peek()}return ident},readEscape:function(first){var reader=this._reader,cssEscape=first||"",i=0,c=reader.peek();if(isHexDigit(c))do cssEscape+=reader.read(),c=reader.peek();while(c&&isHexDigit(c)&&6>++i);return 3==cssEscape.length&&/\\s/.test(c)||7==cssEscape.length||1==cssEscape.length?reader.read():c="",cssEscape+c},readComment:function(first){var reader=this._reader,comment=first||"",c=reader.read();if("*"==c){for(;c;){if(comment+=c,comment.length>2&&"*"==c&&"/"==reader.peek()){comment+=reader.read();break}c=reader.read()}return comment}return""}});var Tokens=[{name:"CDO"},{name:"CDC"},{name:"S",whitespace:!0},{name:"COMMENT",comment:!0,hide:!0,channel:"comment"},{name:"INCLUDES",text:"~="},{name:"DASHMATCH",text:"|="},{name:"PREFIXMATCH",text:"^="},{name:"SUFFIXMATCH",text:"$="},{name:"SUBSTRINGMATCH",text:"*="},{name:"STRING"},{name:"IDENT"},{name:"HASH"},{name:"IMPORT_SYM",text:"@import"},{name:"PAGE_SYM",text:"@page"},{name:"MEDIA_SYM",text:"@media"},{name:"FONT_FACE_SYM",text:"@font-face"},{name:"CHARSET_SYM",text:"@charset"},{name:"NAMESPACE_SYM",text:"@namespace"},{name:"VIEWPORT_SYM",text:["@viewport","@-ms-viewport"]},{name:"UNKNOWN_SYM"},{name:"KEYFRAMES_SYM",text:["@keyframes","@-webkit-keyframes","@-moz-keyframes","@-o-keyframes"]},{name:"IMPORTANT_SYM"},{name:"LENGTH"},{name:"ANGLE"},{name:"TIME"},{name:"FREQ"},{name:"DIMENSION"},{name:"PERCENTAGE"},{name:"NUMBER"},{name:"URI"},{name:"FUNCTION"},{name:"UNICODE_RANGE"},{name:"INVALID"},{name:"PLUS",text:"+"},{name:"GREATER",text:">"},{name:"COMMA",text:","},{name:"TILDE",text:"~"},{name:"NOT"},{name:"TOPLEFTCORNER_SYM",text:"@top-left-corner"},{name:"TOPLEFT_SYM",text:"@top-left"},{name:"TOPCENTER_SYM",text:"@top-center"},{name:"TOPRIGHT_SYM",text:"@top-right"},{name:"TOPRIGHTCORNER_SYM",text:"@top-right-corner"},{name:"BOTTOMLEFTCORNER_SYM",text:"@bottom-left-corner"},{name:"BOTTOMLEFT_SYM",text:"@bottom-left"},{name:"BOTTOMCENTER_SYM",text:"@bottom-center"},{name:"BOTTOMRIGHT_SYM",text:"@bottom-right"},{name:"BOTTOMRIGHTCORNER_SYM",text:"@bottom-right-corner"},{name:"LEFTTOP_SYM",text:"@left-top"},{name:"LEFTMIDDLE_SYM",text:"@left-middle"},{name:"LEFTBOTTOM_SYM",text:"@left-bottom"},{name:"RIGHTTOP_SYM",text:"@right-top"},{name:"RIGHTMIDDLE_SYM",text:"@right-middle"},{name:"RIGHTBOTTOM_SYM",text:"@right-bottom"},{name:"RESOLUTION",state:"media"},{name:"IE_FUNCTION"},{name:"CHAR"},{name:"PIPE",text:"|"},{name:"SLASH",text:"/"},{name:"MINUS",text:"-"},{name:"STAR",text:"*"},{name:"LBRACE",endChar:"}",text:"{"},{name:"RBRACE",text:"}"},{name:"LBRACKET",endChar:"]",text:"["},{name:"RBRACKET",text:"]"},{name:"EQUALS",text:"="},{name:"COLON",text:":"},{name:"SEMICOLON",text:";"},{name:"LPAREN",endChar:")",text:"("},{name:"RPAREN",text:")"},{name:"DOT",text:"."}];(function(){var nameMap=[],typeMap={};Tokens.UNKNOWN=-1,Tokens.unshift({name:"EOF"});for(var i=0,len=Tokens.length;len>i;i++)if(nameMap.push(Tokens[i].name),Tokens[Tokens[i].name]=i,Tokens[i].text)if(Tokens[i].text instanceof Array)for(var j=0;Tokens[i].text.length>j;j++)typeMap[Tokens[i].text[j]]=i;else typeMap[Tokens[i].text]=i;Tokens.name=function(tt){return nameMap[tt]},Tokens.type=function(c){return typeMap[c]||-1}})();var Validation={validate:function(property,value){var name=(""+property).toLowerCase(),expression=(value.parts,new PropertyValueIterator(value)),spec=Properties[name];if(spec)"number"!=typeof spec&&("string"==typeof spec?spec.indexOf("||")>-1?this.groupProperty(spec,expression):this.singleProperty(spec,expression,1):spec.multi?this.multiProperty(spec.multi,expression,spec.comma,spec.max||1/0):"function"==typeof spec&&spec(expression));else if(0!==name.indexOf("-"))throw new ValidationError("Unknown property \'"+property+"\'.",property.line,property.col)},singleProperty:function(types,expression,max){for(var part,result=!1,value=expression.value,count=0;expression.hasNext()&&max>count&&(result=ValidationTypes.isAny(expression,types));)count++;if(!result)throw expression.hasNext()&&!expression.isFirst()?(part=expression.peek(),new ValidationError("Expected end of value but found \'"+part+"\'.",part.line,part.col)):new ValidationError("Expected ("+types+") but found \'"+value+"\'.",value.line,value.col);if(expression.hasNext())throw part=expression.next(),new ValidationError("Expected end of value but found \'"+part+"\'.",part.line,part.col)},multiProperty:function(types,expression,comma,max){for(var part,result=!1,value=expression.value,count=0;expression.hasNext()&&!result&&max>count&&ValidationTypes.isAny(expression,types);)if(count++,expression.hasNext()){if(comma){if(","!=expression.peek())break;part=expression.next()}}else result=!0;if(!result)throw expression.hasNext()&&!expression.isFirst()?(part=expression.peek(),new ValidationError("Expected end of value but found \'"+part+"\'.",part.line,part.col)):(part=expression.previous(),comma&&","==part?new ValidationError("Expected end of value but found \'"+part+"\'.",part.line,part.col):new ValidationError("Expected ("+types+") but found \'"+value+"\'.",value.line,value.col));if(expression.hasNext())throw part=expression.next(),new ValidationError("Expected end of value but found \'"+part+"\'.",part.line,part.col)},groupProperty:function(types,expression){for(var name,part,result=!1,value=expression.value,typeCount=types.split("||").length,groups={count:0},partial=!1;expression.hasNext()&&!result&&(name=ValidationTypes.isAnyOfGroup(expression,types))&&!groups[name];)groups[name]=1,groups.count++,partial=!0,groups.count!=typeCount&&expression.hasNext()||(result=!0);if(!result)throw partial&&expression.hasNext()?(part=expression.peek(),new ValidationError("Expected end of value but found \'"+part+"\'.",part.line,part.col)):new ValidationError("Expected ("+types+") but found \'"+value+"\'.",value.line,value.col);if(expression.hasNext())throw part=expression.next(),new ValidationError("Expected end of value but found \'"+part+"\'.",part.line,part.col)}};ValidationError.prototype=Error();var ValidationTypes={isLiteral:function(part,literals){var i,len,text=(""+part.text).toLowerCase(),args=literals.split(" | "),found=!1;for(i=0,len=args.length;len>i&&!found;i++)text==args[i].toLowerCase()&&(found=!0);return found},isSimple:function(type){return!!this.simple[type]},isComplex:function(type){return!!this.complex[type]},isAny:function(expression,types){var i,len,args=types.split(" | "),found=!1;for(i=0,len=args.length;len>i&&!found&&expression.hasNext();i++)found=this.isType(expression,args[i]);return found},isAnyOfGroup:function(expression,types){var i,len,args=types.split(" || "),found=!1;for(i=0,len=args.length;len>i&&!found;i++)found=this.isType(expression,args[i]);return found?args[i-1]:!1},isType:function(expression,type){var part=expression.peek(),result=!1;return"<"!=type.charAt(0)?(result=this.isLiteral(part,type),result&&expression.next()):this.simple[type]?(result=this.simple[type](part),result&&expression.next()):result=this.complex[type](expression),result},simple:{"<absolute-size>":function(part){return ValidationTypes.isLiteral(part,"xx-small | x-small | small | medium | large | x-large | xx-large")},"<attachment>":function(part){return ValidationTypes.isLiteral(part,"scroll | fixed | local")},"<attr>":function(part){return"function"==part.type&&"attr"==part.name},"<bg-image>":function(part){return this["<image>"](part)||this["<gradient>"](part)||"none"==part},"<gradient>":function(part){return"function"==part.type&&/^(?:\\-(?:ms|moz|o|webkit)\\-)?(?:repeating\\-)?(?:radial\\-|linear\\-)?gradient/i.test(part)},"<box>":function(part){return ValidationTypes.isLiteral(part,"padding-box | border-box | content-box")},"<content>":function(part){return"function"==part.type&&"content"==part.name},"<relative-size>":function(part){return ValidationTypes.isLiteral(part,"smaller | larger")},"<ident>":function(part){return"identifier"==part.type},"<length>":function(part){return"function"==part.type&&/^(?:\\-(?:ms|moz|o|webkit)\\-)?calc/i.test(part)?!0:"length"==part.type||"number"==part.type||"integer"==part.type||"0"==part},"<color>":function(part){return"color"==part.type||"transparent"==part},"<number>":function(part){return"number"==part.type||this["<integer>"](part)},"<integer>":function(part){return"integer"==part.type},"<line>":function(part){return"integer"==part.type},"<angle>":function(part){return"angle"==part.type},"<uri>":function(part){return"uri"==part.type},"<image>":function(part){return this["<uri>"](part)},"<percentage>":function(part){return"percentage"==part.type||"0"==part},"<border-width>":function(part){return this["<length>"](part)||ValidationTypes.isLiteral(part,"thin | medium | thick")},"<border-style>":function(part){return ValidationTypes.isLiteral(part,"none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset")},"<content-sizing>":function(part){return ValidationTypes.isLiteral(part,"fill-available | -moz-available | -webkit-fill-available | max-content | -moz-max-content | -webkit-max-content | min-content | -moz-min-content | -webkit-min-content | fit-content | -moz-fit-content | -webkit-fit-content")},"<margin-width>":function(part){return this["<length>"](part)||this["<percentage>"](part)||ValidationTypes.isLiteral(part,"auto")},"<padding-width>":function(part){return this["<length>"](part)||this["<percentage>"](part)},"<shape>":function(part){return"function"==part.type&&("rect"==part.name||"inset-rect"==part.name)},"<time>":function(part){return"time"==part.type},"<flex-grow>":function(part){return this["<number>"](part)},"<flex-shrink>":function(part){return this["<number>"](part)},"<width>":function(part){return this["<margin-width>"](part)},"<flex-basis>":function(part){return this["<width>"](part)},"<flex-direction>":function(part){return ValidationTypes.isLiteral(part,"row | row-reverse | column | column-reverse")},"<flex-wrap>":function(part){return ValidationTypes.isLiteral(part,"nowrap | wrap | wrap-reverse")}},complex:{"<bg-position>":function(expression){for(var result=!1,numeric="<percentage> | <length>",xDir="left | right",yDir="top | bottom",count=0;expression.peek(count)&&","!=expression.peek(count);)count++;return 3>count?ValidationTypes.isAny(expression,xDir+" | center | "+numeric)?(result=!0,ValidationTypes.isAny(expression,yDir+" | center | "+numeric)):ValidationTypes.isAny(expression,yDir)&&(result=!0,ValidationTypes.isAny(expression,xDir+" | center")):ValidationTypes.isAny(expression,xDir)?ValidationTypes.isAny(expression,yDir)?(result=!0,ValidationTypes.isAny(expression,numeric)):ValidationTypes.isAny(expression,numeric)&&(ValidationTypes.isAny(expression,yDir)?(result=!0,ValidationTypes.isAny(expression,numeric)):ValidationTypes.isAny(expression,"center")&&(result=!0)):ValidationTypes.isAny(expression,yDir)?ValidationTypes.isAny(expression,xDir)?(result=!0,ValidationTypes.isAny(expression,numeric)):ValidationTypes.isAny(expression,numeric)&&(ValidationTypes.isAny(expression,xDir)?(result=!0,ValidationTypes.isAny(expression,numeric)):ValidationTypes.isAny(expression,"center")&&(result=!0)):ValidationTypes.isAny(expression,"center")&&ValidationTypes.isAny(expression,xDir+" | "+yDir)&&(result=!0,ValidationTypes.isAny(expression,numeric)),result},"<bg-size>":function(expression){var result=!1,numeric="<percentage> | <length> | auto";return ValidationTypes.isAny(expression,"cover | contain")?result=!0:ValidationTypes.isAny(expression,numeric)&&(result=!0,ValidationTypes.isAny(expression,numeric)),result},"<repeat-style>":function(expression){var part,result=!1,values="repeat | space | round | no-repeat";return expression.hasNext()&&(part=expression.next(),ValidationTypes.isLiteral(part,"repeat-x | repeat-y")?result=!0:ValidationTypes.isLiteral(part,values)&&(result=!0,expression.hasNext()&&ValidationTypes.isLiteral(expression.peek(),values)&&expression.next())),result},"<shadow>":function(expression){var result=!1,count=0,inset=!1,color=!1;if(expression.hasNext()){for(ValidationTypes.isAny(expression,"inset")&&(inset=!0),ValidationTypes.isAny(expression,"<color>")&&(color=!0);ValidationTypes.isAny(expression,"<length>")&&4>count;)count++;expression.hasNext()&&(color||ValidationTypes.isAny(expression,"<color>"),inset||ValidationTypes.isAny(expression,"inset")),result=count>=2&&4>=count}return result},"<x-one-radius>":function(expression){var result=!1,simple="<length> | <percentage> | inherit";return ValidationTypes.isAny(expression,simple)&&(result=!0,ValidationTypes.isAny(expression,simple)),result},"<flex>":function(expression){var part,result=!1;if(ValidationTypes.isAny(expression,"none | inherit")?result=!0:ValidationTypes.isType(expression,"<flex-grow>")?expression.peek()?ValidationTypes.isType(expression,"<flex-shrink>")?result=expression.peek()?ValidationTypes.isType(expression,"<flex-basis>"):!0:ValidationTypes.isType(expression,"<flex-basis>")&&(result=null===expression.peek()):result=!0:ValidationTypes.isType(expression,"<flex-basis>")&&(result=!0),!result)throw part=expression.peek(),new ValidationError("Expected (none | [ <flex-grow> <flex-shrink>? || <flex-basis> ]) but found \'"+expression.value.text+"\'.",part.line,part.col);return result}}};parserlib.css={Colors:Colors,Combinator:Combinator,Parser:Parser,PropertyName:PropertyName,PropertyValue:PropertyValue,PropertyValuePart:PropertyValuePart,MediaFeature:MediaFeature,MediaQuery:MediaQuery,Selector:Selector,SelectorPart:SelectorPart,SelectorSubPart:SelectorSubPart,Specificity:Specificity,TokenStream:TokenStream,Tokens:Tokens,ValidationError:ValidationError}}(),function(){for(var prop in parserlib)exports[prop]=parserlib[prop]}();var util={isArray:function(ar){return Array.isArray(ar)||"object"==typeof ar&&"[object Array]"===objectToString(ar)},isDate:function(d){return"object"==typeof d&&"[object Date]"===objectToString(d)},isRegExp:function(re){return"object"==typeof re&&"[object RegExp]"===objectToString(re)},getRegExpFlags:function(re){var flags="";return re.global&&(flags+="g"),re.ignoreCase&&(flags+="i"),re.multiline&&(flags+="m"),flags}};"object"==typeof module&&(module.exports=clone),clone.clonePrototype=function(parent){if(null===parent)return null;var c=function(){};return c.prototype=parent,new c};var CSSLint=function(){function applyEmbeddedRuleset(text,ruleset){var valueMap,embedded=text&&text.match(embeddedRuleset),rules=embedded&&embedded[1];return rules&&(valueMap={"true":2,"":1,"false":0,2:2,1:1,0:0},rules.toLowerCase().split(",").forEach(function(rule){var pair=rule.split(":"),property=pair[0]||"",value=pair[1]||"";ruleset[property.trim()]=valueMap[value.trim()]})),ruleset}var rules=[],formatters=[],embeddedRuleset=/\\/\\*csslint([^\\*]*)\\*\\//,api=new parserlib.util.EventTarget;return api.version="@VERSION@",api.addRule=function(rule){rules.push(rule),rules[rule.id]=rule},api.clearRules=function(){rules=[]},api.getRules=function(){return[].concat(rules).sort(function(a,b){return a.id>b.id?1:0})},api.getRuleset=function(){for(var ruleset={},i=0,len=rules.length;len>i;)ruleset[rules[i++].id]=1;return ruleset},api.addFormatter=function(formatter){formatters[formatter.id]=formatter},api.getFormatter=function(formatId){return formatters[formatId]},api.format=function(results,filename,formatId,options){var formatter=this.getFormatter(formatId),result=null;return formatter&&(result=formatter.startFormat(),result+=formatter.formatResults(results,filename,options||{}),result+=formatter.endFormat()),result},api.hasFormat=function(formatId){return formatters.hasOwnProperty(formatId)},api.verify=function(text,ruleset){var reporter,lines,report,i=0,parser=new parserlib.css.Parser({starHack:!0,ieFilters:!0,underscoreHack:!0,strict:!1});lines=text.replace(/\\n\\r?/g,"$split$").split("$split$"),ruleset||(ruleset=this.getRuleset()),embeddedRuleset.test(text)&&(ruleset=clone(ruleset),ruleset=applyEmbeddedRuleset(text,ruleset)),reporter=new Reporter(lines,ruleset),ruleset.errors=2;for(i in ruleset)ruleset.hasOwnProperty(i)&&ruleset[i]&&rules[i]&&rules[i].init(parser,reporter);try{parser.parse(text)}catch(ex){reporter.error("Fatal error, cannot continue: "+ex.message,ex.line,ex.col,{})}return report={messages:reporter.messages,stats:reporter.stats,ruleset:reporter.ruleset},report.messages.sort(function(a,b){return a.rollup&&!b.rollup?1:!a.rollup&&b.rollup?-1:a.line-b.line}),report},api}();Reporter.prototype={constructor:Reporter,error:function(message,line,col,rule){this.messages.push({type:"error",line:line,col:col,message:message,evidence:this.lines[line-1],rule:rule||{}})},warn:function(message,line,col,rule){this.report(message,line,col,rule)},report:function(message,line,col,rule){this.messages.push({type:2===this.ruleset[rule.id]?"error":"warning",line:line,col:col,message:message,evidence:this.lines[line-1],rule:rule})},info:function(message,line,col,rule){this.messages.push({type:"info",line:line,col:col,message:message,evidence:this.lines[line-1],rule:rule})},rollupError:function(message,rule){this.messages.push({type:"error",rollup:!0,message:message,rule:rule})},rollupWarn:function(message,rule){this.messages.push({type:"warning",rollup:!0,message:message,rule:rule})},stat:function(name,value){this.stats[name]=value}},CSSLint._Reporter=Reporter,CSSLint.Util={mix:function(receiver,supplier){var prop;for(prop in supplier)supplier.hasOwnProperty(prop)&&(receiver[prop]=supplier[prop]);return prop},indexOf:function(values,value){if(values.indexOf)return values.indexOf(value);for(var i=0,len=values.length;len>i;i++)if(values[i]===value)return i;return-1},forEach:function(values,func){if(values.forEach)return values.forEach(func);for(var i=0,len=values.length;len>i;i++)func(values[i],i,values)}},CSSLint.addRule({id:"adjoining-classes",name:"Disallow adjoining classes",desc:"Don\'t use adjoining classes.",browsers:"IE6",init:function(parser,reporter){var rule=this;parser.addListener("startrule",function(event){var selector,part,modifier,classCount,i,j,k,selectors=event.selectors;for(i=0;selectors.length>i;i++)for(selector=selectors[i],j=0;selector.parts.length>j;j++)if(part=selector.parts[j],part.type===parser.SELECTOR_PART_TYPE)for(classCount=0,k=0;part.modifiers.length>k;k++)modifier=part.modifiers[k],"class"===modifier.type&&classCount++,classCount>1&&reporter.report("Don\'t use adjoining classes.",part.line,part.col,rule)})}}),CSSLint.addRule({id:"box-model",name:"Beware of broken box size",desc:"Don\'t use width or height when using padding or border.",browsers:"All",init:function(parser,reporter){function startRule(){properties={},boxSizing=!1}function endRule(){var prop,value;if(!boxSizing){if(properties.height)for(prop in heightProperties)heightProperties.hasOwnProperty(prop)&&properties[prop]&&(value=properties[prop].value,("padding"!==prop||2!==value.parts.length||0!==value.parts[0].value)&&reporter.report("Using height with "+prop+" can sometimes make elements larger than you expect.",properties[prop].line,properties[prop].col,rule));if(properties.width)for(prop in widthProperties)widthProperties.hasOwnProperty(prop)&&properties[prop]&&(value=properties[prop].value,("padding"!==prop||2!==value.parts.length||0!==value.parts[1].value)&&reporter.report("Using width with "+prop+" can sometimes make elements larger than you expect.",properties[prop].line,properties[prop].col,rule))}}var properties,rule=this,widthProperties={border:1,"border-left":1,"border-right":1,padding:1,"padding-left":1,"padding-right":1},heightProperties={border:1,"border-bottom":1,"border-top":1,padding:1,"padding-bottom":1,"padding-top":1},boxSizing=!1;parser.addListener("startrule",startRule),parser.addListener("startfontface",startRule),parser.addListener("startpage",startRule),parser.addListener("startpagemargin",startRule),parser.addListener("startkeyframerule",startRule),parser.addListener("property",function(event){var name=event.property.text.toLowerCase();heightProperties[name]||widthProperties[name]?/^0\\S*$/.test(event.value)||"border"===name&&"none"==""+event.value||(properties[name]={line:event.property.line,col:event.property.col,value:event.value}):/^(width|height)/i.test(name)&&/^(length|percentage)/.test(event.value.parts[0].type)?properties[name]=1:"box-sizing"===name&&(boxSizing=!0)}),parser.addListener("endrule",endRule),parser.addListener("endfontface",endRule),parser.addListener("endpage",endRule),parser.addListener("endpagemargin",endRule),parser.addListener("endkeyframerule",endRule)}}),CSSLint.addRule({id:"box-sizing",name:"Disallow use of box-sizing",desc:"The box-sizing properties isn\'t supported in IE6 and IE7.",browsers:"IE6, IE7",tags:["Compatibility"],init:function(parser,reporter){var rule=this;parser.addListener("property",function(event){var name=event.property.text.toLowerCase();"box-sizing"===name&&reporter.report("The box-sizing property isn\'t supported in IE6 and IE7.",event.line,event.col,rule)})}}),CSSLint.addRule({id:"bulletproof-font-face",name:"Use the bulletproof @font-face syntax",desc:"Use the bulletproof @font-face syntax to avoid 404\'s in old IE (http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax).",browsers:"All",init:function(parser,reporter){var line,col,rule=this,fontFaceRule=!1,firstSrc=!0,ruleFailed=!1;parser.addListener("startfontface",function(){fontFaceRule=!0}),parser.addListener("property",function(event){if(fontFaceRule){var propertyName=(""+event.property).toLowerCase(),value=""+event.value;if(line=event.line,col=event.col,"src"===propertyName){var regex=/^\\s?url\\([\'"].+\\.eot\\?.*[\'"]\\)\\s*format\\([\'"]embedded-opentype[\'"]\\).*$/i;!value.match(regex)&&firstSrc?(ruleFailed=!0,firstSrc=!1):value.match(regex)&&!firstSrc&&(ruleFailed=!1)}}}),parser.addListener("endfontface",function(){fontFaceRule=!1,ruleFailed&&reporter.report("@font-face declaration doesn\'t follow the fontspring bulletproof syntax.",line,col,rule)})}}),CSSLint.addRule({id:"compatible-vendor-prefixes",name:"Require compatible vendor prefixes",desc:"Include all compatible vendor prefixes to reach a wider range of users.",browsers:"All",init:function(parser,reporter){var compatiblePrefixes,properties,prop,variations,prefixed,i,len,rule=this,inKeyFrame=!1,arrayPush=Array.prototype.push,applyTo=[];compatiblePrefixes={animation:"webkit moz","animation-delay":"webkit moz","animation-direction":"webkit moz","animation-duration":"webkit moz","animation-fill-mode":"webkit moz","animation-iteration-count":"webkit moz","animation-name":"webkit moz","animation-play-state":"webkit moz","animation-timing-function":"webkit moz",appearance:"webkit moz","border-end":"webkit moz","border-end-color":"webkit moz","border-end-style":"webkit moz","border-end-width":"webkit moz","border-image":"webkit moz o","border-radius":"webkit","border-start":"webkit moz","border-start-color":"webkit moz","border-start-style":"webkit moz","border-start-width":"webkit moz","box-align":"webkit moz ms","box-direction":"webkit moz ms","box-flex":"webkit moz ms","box-lines":"webkit ms","box-ordinal-group":"webkit moz ms","box-orient":"webkit moz ms","box-pack":"webkit moz ms","box-sizing":"webkit moz","box-shadow":"webkit moz","column-count":"webkit moz ms","column-gap":"webkit moz ms","column-rule":"webkit moz ms","column-rule-color":"webkit moz ms","column-rule-style":"webkit moz ms","column-rule-width":"webkit moz ms","column-width":"webkit moz ms",hyphens:"epub moz","line-break":"webkit ms","margin-end":"webkit moz","margin-start":"webkit moz","marquee-speed":"webkit wap","marquee-style":"webkit wap","padding-end":"webkit moz","padding-start":"webkit moz","tab-size":"moz o","text-size-adjust":"webkit ms",transform:"webkit moz ms o","transform-origin":"webkit moz ms o",transition:"webkit moz o","transition-delay":"webkit moz o","transition-duration":"webkit moz o","transition-property":"webkit moz o","transition-timing-function":"webkit moz o","user-modify":"webkit moz","user-select":"webkit moz ms","word-break":"epub ms","writing-mode":"epub ms"};for(prop in compatiblePrefixes)if(compatiblePrefixes.hasOwnProperty(prop)){for(variations=[],prefixed=compatiblePrefixes[prop].split(" "),i=0,len=prefixed.length;len>i;i++)variations.push("-"+prefixed[i]+"-"+prop);compatiblePrefixes[prop]=variations,arrayPush.apply(applyTo,variations)}parser.addListener("startrule",function(){properties=[]}),parser.addListener("startkeyframes",function(event){inKeyFrame=event.prefix||!0}),parser.addListener("endkeyframes",function(){inKeyFrame=!1}),parser.addListener("property",function(event){var name=event.property;CSSLint.Util.indexOf(applyTo,name.text)>-1&&(inKeyFrame&&"string"==typeof inKeyFrame&&0===name.text.indexOf("-"+inKeyFrame+"-")||properties.push(name))}),parser.addListener("endrule",function(){if(properties.length){var i,len,name,prop,variations,value,full,actual,item,propertiesSpecified,propertyGroups={};for(i=0,len=properties.length;len>i;i++){name=properties[i];for(prop in compatiblePrefixes)compatiblePrefixes.hasOwnProperty(prop)&&(variations=compatiblePrefixes[prop],CSSLint.Util.indexOf(variations,name.text)>-1&&(propertyGroups[prop]||(propertyGroups[prop]={full:variations.slice(0),actual:[],actualNodes:[]}),-1===CSSLint.Util.indexOf(propertyGroups[prop].actual,name.text)&&(propertyGroups[prop].actual.push(name.text),propertyGroups[prop].actualNodes.push(name))))}for(prop in propertyGroups)if(propertyGroups.hasOwnProperty(prop)&&(value=propertyGroups[prop],full=value.full,actual=value.actual,full.length>actual.length))for(i=0,len=full.length;len>i;i++)item=full[i],-1===CSSLint.Util.indexOf(actual,item)&&(propertiesSpecified=1===actual.length?actual[0]:2===actual.length?actual.join(" and "):actual.join(", "),reporter.report("The property "+item+" is compatible with "+propertiesSpecified+" and should be included as well.",value.actualNodes[0].line,value.actualNodes[0].col,rule))}})}}),CSSLint.addRule({id:"display-property-grouping",name:"Require properties appropriate for display",desc:"Certain properties shouldn\'t be used with certain display property values.",browsers:"All",init:function(parser,reporter){function reportProperty(name,display,msg){properties[name]&&("string"!=typeof propertiesToCheck[name]||properties[name].value.toLowerCase()!==propertiesToCheck[name])&&reporter.report(msg||name+" can\'t be used with display: "+display+".",properties[name].line,properties[name].col,rule)}function startRule(){properties={}}function endRule(){var display=properties.display?properties.display.value:null;if(display)switch(display){case"inline":reportProperty("height",display),reportProperty("width",display),reportProperty("margin",display),reportProperty("margin-top",display),reportProperty("margin-bottom",display),reportProperty("float",display,"display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");break;case"block":reportProperty("vertical-align",display);\nbreak;case"inline-block":reportProperty("float",display);break;default:0===display.indexOf("table-")&&(reportProperty("margin",display),reportProperty("margin-left",display),reportProperty("margin-right",display),reportProperty("margin-top",display),reportProperty("margin-bottom",display),reportProperty("float",display))}}var properties,rule=this,propertiesToCheck={display:1,"float":"none",height:1,width:1,margin:1,"margin-left":1,"margin-right":1,"margin-bottom":1,"margin-top":1,padding:1,"padding-left":1,"padding-right":1,"padding-bottom":1,"padding-top":1,"vertical-align":1};parser.addListener("startrule",startRule),parser.addListener("startfontface",startRule),parser.addListener("startkeyframerule",startRule),parser.addListener("startpagemargin",startRule),parser.addListener("startpage",startRule),parser.addListener("property",function(event){var name=event.property.text.toLowerCase();propertiesToCheck[name]&&(properties[name]={value:event.value.text,line:event.property.line,col:event.property.col})}),parser.addListener("endrule",endRule),parser.addListener("endfontface",endRule),parser.addListener("endkeyframerule",endRule),parser.addListener("endpagemargin",endRule),parser.addListener("endpage",endRule)}}),CSSLint.addRule({id:"duplicate-background-images",name:"Disallow duplicate background images",desc:"Every background-image should be unique. Use a common class for e.g. sprites.",browsers:"All",init:function(parser,reporter){var rule=this,stack={};parser.addListener("property",function(event){var i,len,name=event.property.text,value=event.value;if(name.match(/background/i))for(i=0,len=value.parts.length;len>i;i++)"uri"===value.parts[i].type&&(stack[value.parts[i].uri]===void 0?stack[value.parts[i].uri]=event:reporter.report("Background image \'"+value.parts[i].uri+"\' was used multiple times, first declared at line "+stack[value.parts[i].uri].line+", col "+stack[value.parts[i].uri].col+".",event.line,event.col,rule))})}}),CSSLint.addRule({id:"duplicate-properties",name:"Disallow duplicate properties",desc:"Duplicate properties must appear one after the other.",browsers:"All",init:function(parser,reporter){function startRule(){properties={}}var properties,lastProperty,rule=this;parser.addListener("startrule",startRule),parser.addListener("startfontface",startRule),parser.addListener("startpage",startRule),parser.addListener("startpagemargin",startRule),parser.addListener("startkeyframerule",startRule),parser.addListener("property",function(event){var property=event.property,name=property.text.toLowerCase();!properties[name]||lastProperty===name&&properties[name]!==event.value.text||reporter.report("Duplicate property \'"+event.property+"\' found.",event.line,event.col,rule),properties[name]=event.value.text,lastProperty=name})}}),CSSLint.addRule({id:"empty-rules",name:"Disallow empty rules",desc:"Rules without any properties specified should be removed.",browsers:"All",init:function(parser,reporter){var rule=this,count=0;parser.addListener("startrule",function(){count=0}),parser.addListener("property",function(){count++}),parser.addListener("endrule",function(event){var selectors=event.selectors;0===count&&reporter.report("Rule is empty.",selectors[0].line,selectors[0].col,rule)})}}),CSSLint.addRule({id:"errors",name:"Parsing Errors",desc:"This rule looks for recoverable syntax errors.",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("error",function(event){reporter.error(event.message,event.line,event.col,rule)})}}),CSSLint.addRule({id:"fallback-colors",name:"Require fallback colors",desc:"For older browsers that don\'t support RGBA, HSL, or HSLA, provide a fallback color.",browsers:"IE6,IE7,IE8",init:function(parser,reporter){function startRule(){properties={},lastProperty=null}var lastProperty,properties,rule=this,propertiesToCheck={color:1,background:1,"border-color":1,"border-top-color":1,"border-right-color":1,"border-bottom-color":1,"border-left-color":1,border:1,"border-top":1,"border-right":1,"border-bottom":1,"border-left":1,"background-color":1};parser.addListener("startrule",startRule),parser.addListener("startfontface",startRule),parser.addListener("startpage",startRule),parser.addListener("startpagemargin",startRule),parser.addListener("startkeyframerule",startRule),parser.addListener("property",function(event){var property=event.property,name=property.text.toLowerCase(),parts=event.value.parts,i=0,colorType="",len=parts.length;if(propertiesToCheck[name])for(;len>i;)"color"===parts[i].type&&("alpha"in parts[i]||"hue"in parts[i]?(/([^\\)]+)\\(/.test(parts[i])&&(colorType=RegExp.$1.toUpperCase()),lastProperty&&lastProperty.property.text.toLowerCase()===name&&"compat"===lastProperty.colorType||reporter.report("Fallback "+name+" (hex or RGB) should precede "+colorType+" "+name+".",event.line,event.col,rule)):event.colorType="compat"),i++;lastProperty=event})}}),CSSLint.addRule({id:"floats",name:"Disallow too many floats",desc:"This rule tests if the float property is used too many times",browsers:"All",init:function(parser,reporter){var rule=this,count=0;parser.addListener("property",function(event){"float"===event.property.text.toLowerCase()&&"none"!==event.value.text.toLowerCase()&&count++}),parser.addListener("endstylesheet",function(){reporter.stat("floats",count),count>=10&&reporter.rollupWarn("Too many floats ("+count+"), you\'re probably using them for layout. Consider using a grid system instead.",rule)})}}),CSSLint.addRule({id:"font-faces",name:"Don\'t use too many web fonts",desc:"Too many different web fonts in the same stylesheet.",browsers:"All",init:function(parser,reporter){var rule=this,count=0;parser.addListener("startfontface",function(){count++}),parser.addListener("endstylesheet",function(){count>5&&reporter.rollupWarn("Too many @font-face declarations ("+count+").",rule)})}}),CSSLint.addRule({id:"font-sizes",name:"Disallow too many font sizes",desc:"Checks the number of font-size declarations.",browsers:"All",init:function(parser,reporter){var rule=this,count=0;parser.addListener("property",function(event){"font-size"==""+event.property&&count++}),parser.addListener("endstylesheet",function(){reporter.stat("font-sizes",count),count>=10&&reporter.rollupWarn("Too many font-size declarations ("+count+"), abstraction needed.",rule)})}}),CSSLint.addRule({id:"gradients",name:"Require all gradient definitions",desc:"When using a vendor-prefixed gradient, make sure to use them all.",browsers:"All",init:function(parser,reporter){var gradients,rule=this;parser.addListener("startrule",function(){gradients={moz:0,webkit:0,oldWebkit:0,o:0}}),parser.addListener("property",function(event){/\\-(moz|o|webkit)(?:\\-(?:linear|radial))\\-gradient/i.test(event.value)?gradients[RegExp.$1]=1:/\\-webkit\\-gradient/i.test(event.value)&&(gradients.oldWebkit=1)}),parser.addListener("endrule",function(event){var missing=[];gradients.moz||missing.push("Firefox 3.6+"),gradients.webkit||missing.push("Webkit (Safari 5+, Chrome)"),gradients.oldWebkit||missing.push("Old Webkit (Safari 4+, Chrome)"),gradients.o||missing.push("Opera 11.1+"),missing.length&&4>missing.length&&reporter.report("Missing vendor-prefixed CSS gradients for "+missing.join(", ")+".",event.selectors[0].line,event.selectors[0].col,rule)})}}),CSSLint.addRule({id:"ids",name:"Disallow IDs in selectors",desc:"Selectors should not contain IDs.",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("startrule",function(event){var selector,part,modifier,idCount,i,j,k,selectors=event.selectors;for(i=0;selectors.length>i;i++){for(selector=selectors[i],idCount=0,j=0;selector.parts.length>j;j++)if(part=selector.parts[j],part.type===parser.SELECTOR_PART_TYPE)for(k=0;part.modifiers.length>k;k++)modifier=part.modifiers[k],"id"===modifier.type&&idCount++;1===idCount?reporter.report("Don\'t use IDs in selectors.",selector.line,selector.col,rule):idCount>1&&reporter.report(idCount+" IDs in the selector, really?",selector.line,selector.col,rule)}})}}),CSSLint.addRule({id:"import",name:"Disallow @import",desc:"Don\'t use @import, use <link> instead.",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("import",function(event){reporter.report("@import prevents parallel downloads, use <link> instead.",event.line,event.col,rule)})}}),CSSLint.addRule({id:"important",name:"Disallow !important",desc:"Be careful when using !important declaration",browsers:"All",init:function(parser,reporter){var rule=this,count=0;parser.addListener("property",function(event){event.important===!0&&(count++,reporter.report("Use of !important",event.line,event.col,rule))}),parser.addListener("endstylesheet",function(){reporter.stat("important",count),count>=10&&reporter.rollupWarn("Too many !important declarations ("+count+"), try to use less than 10 to avoid specificity issues.",rule)})}}),CSSLint.addRule({id:"known-properties",name:"Require use of known properties",desc:"Properties should be known (listed in CSS3 specification) or be a vendor-prefixed property.",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("property",function(event){event.invalid&&reporter.report(event.invalid.message,event.line,event.col,rule)})}}),CSSLint.addRule({id:"order-alphabetical",name:"Alphabetical order",desc:"Assure properties are in alphabetical order",browsers:"All",init:function(parser,reporter){var properties,rule=this,startRule=function(){properties=[]};parser.addListener("startrule",startRule),parser.addListener("startfontface",startRule),parser.addListener("startpage",startRule),parser.addListener("startpagemargin",startRule),parser.addListener("startkeyframerule",startRule),parser.addListener("property",function(event){var name=event.property.text,lowerCasePrefixLessName=name.toLowerCase().replace(/^-.*?-/,"");properties.push(lowerCasePrefixLessName)}),parser.addListener("endrule",function(event){var currentProperties=properties.join(","),expectedProperties=properties.sort().join(",");currentProperties!==expectedProperties&&reporter.report("Rule doesn\'t have all its properties in alphabetical ordered.",event.line,event.col,rule)})}}),CSSLint.addRule({id:"outline-none",name:"Disallow outline: none",desc:"Use of outline: none or outline: 0 should be limited to :focus rules.",browsers:"All",tags:["Accessibility"],init:function(parser,reporter){function startRule(event){lastRule=event.selectors?{line:event.line,col:event.col,selectors:event.selectors,propCount:0,outline:!1}:null}function endRule(){lastRule&&lastRule.outline&&(-1===(""+lastRule.selectors).toLowerCase().indexOf(":focus")?reporter.report("Outlines should only be modified using :focus.",lastRule.line,lastRule.col,rule):1===lastRule.propCount&&reporter.report("Outlines shouldn\'t be hidden unless other visual changes are made.",lastRule.line,lastRule.col,rule))}var lastRule,rule=this;parser.addListener("startrule",startRule),parser.addListener("startfontface",startRule),parser.addListener("startpage",startRule),parser.addListener("startpagemargin",startRule),parser.addListener("startkeyframerule",startRule),parser.addListener("property",function(event){var name=event.property.text.toLowerCase(),value=event.value;lastRule&&(lastRule.propCount++,"outline"!==name||"none"!=""+value&&"0"!=""+value||(lastRule.outline=!0))}),parser.addListener("endrule",endRule),parser.addListener("endfontface",endRule),parser.addListener("endpage",endRule),parser.addListener("endpagemargin",endRule),parser.addListener("endkeyframerule",endRule)}}),CSSLint.addRule({id:"overqualified-elements",name:"Disallow overqualified elements",desc:"Don\'t use classes or IDs with elements (a.foo or a#foo).",browsers:"All",init:function(parser,reporter){var rule=this,classes={};parser.addListener("startrule",function(event){var selector,part,modifier,i,j,k,selectors=event.selectors;for(i=0;selectors.length>i;i++)for(selector=selectors[i],j=0;selector.parts.length>j;j++)if(part=selector.parts[j],part.type===parser.SELECTOR_PART_TYPE)for(k=0;part.modifiers.length>k;k++)modifier=part.modifiers[k],part.elementName&&"id"===modifier.type?reporter.report("Element ("+part+") is overqualified, just use "+modifier+" without element name.",part.line,part.col,rule):"class"===modifier.type&&(classes[modifier]||(classes[modifier]=[]),classes[modifier].push({modifier:modifier,part:part}))}),parser.addListener("endstylesheet",function(){var prop;for(prop in classes)classes.hasOwnProperty(prop)&&1===classes[prop].length&&classes[prop][0].part.elementName&&reporter.report("Element ("+classes[prop][0].part+") is overqualified, just use "+classes[prop][0].modifier+" without element name.",classes[prop][0].part.line,classes[prop][0].part.col,rule)})}}),CSSLint.addRule({id:"qualified-headings",name:"Disallow qualified headings",desc:"Headings should not be qualified (namespaced).",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("startrule",function(event){var selector,part,i,j,selectors=event.selectors;for(i=0;selectors.length>i;i++)for(selector=selectors[i],j=0;selector.parts.length>j;j++)part=selector.parts[j],part.type===parser.SELECTOR_PART_TYPE&&part.elementName&&/h[1-6]/.test(""+part.elementName)&&j>0&&reporter.report("Heading ("+part.elementName+") should not be qualified.",part.line,part.col,rule)})}}),CSSLint.addRule({id:"regex-selectors",name:"Disallow selectors that look like regexs",desc:"Selectors that look like regular expressions are slow and should be avoided.",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("startrule",function(event){var selector,part,modifier,i,j,k,selectors=event.selectors;for(i=0;selectors.length>i;i++)for(selector=selectors[i],j=0;selector.parts.length>j;j++)if(part=selector.parts[j],part.type===parser.SELECTOR_PART_TYPE)for(k=0;part.modifiers.length>k;k++)modifier=part.modifiers[k],"attribute"===modifier.type&&/([\\~\\|\\^\\$\\*]=)/.test(modifier)&&reporter.report("Attribute selectors with "+RegExp.$1+" are slow!",modifier.line,modifier.col,rule)})}}),CSSLint.addRule({id:"rules-count",name:"Rules Count",desc:"Track how many rules there are.",browsers:"All",init:function(parser,reporter){var count=0;parser.addListener("startrule",function(){count++}),parser.addListener("endstylesheet",function(){reporter.stat("rule-count",count)})}}),CSSLint.addRule({id:"selector-max-approaching",name:"Warn when approaching the 4095 selector limit for IE",desc:"Will warn when selector count is >= 3800 selectors.",browsers:"IE",init:function(parser,reporter){var rule=this,count=0;parser.addListener("startrule",function(event){count+=event.selectors.length}),parser.addListener("endstylesheet",function(){count>=3800&&reporter.report("You have "+count+" selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,rule)})}}),CSSLint.addRule({id:"selector-max",name:"Error when past the 4095 selector limit for IE",desc:"Will error when selector count is > 4095.",browsers:"IE",init:function(parser,reporter){var rule=this,count=0;parser.addListener("startrule",function(event){count+=event.selectors.length}),parser.addListener("endstylesheet",function(){count>4095&&reporter.report("You have "+count+" selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,rule)})}}),CSSLint.addRule({id:"selector-newline",name:"Disallow new-line characters in selectors",desc:"New-line characters in selectors are usually a forgotten comma and not a descendant combinator.",browsers:"All",init:function(parser,reporter){function startRule(event){var i,len,selector,p,n,pLen,part,part2,type,currentLine,nextLine,selectors=event.selectors;for(i=0,len=selectors.length;len>i;i++)for(selector=selectors[i],p=0,pLen=selector.parts.length;pLen>p;p++)for(n=p+1;pLen>n;n++)part=selector.parts[p],part2=selector.parts[n],type=part.type,currentLine=part.line,nextLine=part2.line,"descendant"===type&&nextLine>currentLine&&reporter.report("newline character found in selector (forgot a comma?)",currentLine,selectors[i].parts[0].col,rule)}var rule=this;parser.addListener("startrule",startRule)}}),CSSLint.addRule({id:"shorthand",name:"Require shorthand properties",desc:"Use shorthand properties where possible.",browsers:"All",init:function(parser,reporter){function startRule(){properties={}}function endRule(event){var prop,i,len,total;for(prop in mapping)if(mapping.hasOwnProperty(prop)){for(total=0,i=0,len=mapping[prop].length;len>i;i++)total+=properties[mapping[prop][i]]?1:0;total===mapping[prop].length&&reporter.report("The properties "+mapping[prop].join(", ")+" can be replaced by "+prop+".",event.line,event.col,rule)}}var prop,i,len,properties,rule=this,propertiesToCheck={},mapping={margin:["margin-top","margin-bottom","margin-left","margin-right"],padding:["padding-top","padding-bottom","padding-left","padding-right"]};for(prop in mapping)if(mapping.hasOwnProperty(prop))for(i=0,len=mapping[prop].length;len>i;i++)propertiesToCheck[mapping[prop][i]]=prop;parser.addListener("startrule",startRule),parser.addListener("startfontface",startRule),parser.addListener("property",function(event){var name=(""+event.property).toLowerCase();propertiesToCheck[name]&&(properties[name]=1)}),parser.addListener("endrule",endRule),parser.addListener("endfontface",endRule)}}),CSSLint.addRule({id:"star-property-hack",name:"Disallow properties with a star prefix",desc:"Checks for the star property hack (targets IE6/7)",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("property",function(event){var property=event.property;"*"===property.hack&&reporter.report("Property with star prefix found.",event.property.line,event.property.col,rule)})}}),CSSLint.addRule({id:"text-indent",name:"Disallow negative text-indent",desc:"Checks for text indent less than -99px",browsers:"All",init:function(parser,reporter){function startRule(){textIndent=!1,direction="inherit"}function endRule(){textIndent&&"ltr"!==direction&&reporter.report("Negative text-indent doesn\'t work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.",textIndent.line,textIndent.col,rule)}var textIndent,direction,rule=this;parser.addListener("startrule",startRule),parser.addListener("startfontface",startRule),parser.addListener("property",function(event){var name=(""+event.property).toLowerCase(),value=event.value;"text-indent"===name&&-99>value.parts[0].value?textIndent=event.property:"direction"===name&&"ltr"==""+value&&(direction="ltr")}),parser.addListener("endrule",endRule),parser.addListener("endfontface",endRule)}}),CSSLint.addRule({id:"underscore-property-hack",name:"Disallow properties with an underscore prefix",desc:"Checks for the underscore property hack (targets IE6)",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("property",function(event){var property=event.property;"_"===property.hack&&reporter.report("Property with underscore prefix found.",event.property.line,event.property.col,rule)})}}),CSSLint.addRule({id:"unique-headings",name:"Headings should only be defined once",desc:"Headings should be defined only once.",browsers:"All",init:function(parser,reporter){var rule=this,headings={h1:0,h2:0,h3:0,h4:0,h5:0,h6:0};parser.addListener("startrule",function(event){var selector,part,pseudo,i,j,selectors=event.selectors;for(i=0;selectors.length>i;i++)if(selector=selectors[i],part=selector.parts[selector.parts.length-1],part.elementName&&/(h[1-6])/i.test(""+part.elementName)){for(j=0;part.modifiers.length>j;j++)if("pseudo"===part.modifiers[j].type){pseudo=!0;break}pseudo||(headings[RegExp.$1]++,headings[RegExp.$1]>1&&reporter.report("Heading ("+part.elementName+") has already been defined.",part.line,part.col,rule))}}),parser.addListener("endstylesheet",function(){var prop,messages=[];for(prop in headings)headings.hasOwnProperty(prop)&&headings[prop]>1&&messages.push(headings[prop]+" "+prop+"s");messages.length&&reporter.rollupWarn("You have "+messages.join(", ")+" defined in this stylesheet.",rule)})}}),CSSLint.addRule({id:"universal-selector",name:"Disallow universal selector",desc:"The universal selector (*) is known to be slow.",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("startrule",function(event){var selector,part,i,selectors=event.selectors;for(i=0;selectors.length>i;i++)selector=selectors[i],part=selector.parts[selector.parts.length-1],"*"===part.elementName&&reporter.report(rule.desc,part.line,part.col,rule)})}}),CSSLint.addRule({id:"unqualified-attributes",name:"Disallow unqualified attribute selectors",desc:"Unqualified attribute selectors are known to be slow.",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("startrule",function(event){var selector,part,modifier,i,k,selectors=event.selectors;for(i=0;selectors.length>i;i++)if(selector=selectors[i],part=selector.parts[selector.parts.length-1],part.type===parser.SELECTOR_PART_TYPE)for(k=0;part.modifiers.length>k;k++)modifier=part.modifiers[k],"attribute"!==modifier.type||part.elementName&&"*"!==part.elementName||reporter.report(rule.desc,part.line,part.col,rule)})}}),CSSLint.addRule({id:"vendor-prefix",name:"Require standard property with vendor prefix",desc:"When using a vendor-prefixed property, make sure to include the standard one.",browsers:"All",init:function(parser,reporter){function startRule(){properties={},num=1}function endRule(){var prop,i,len,needed,actual,needsStandard=[];for(prop in properties)propertiesToCheck[prop]&&needsStandard.push({actual:prop,needed:propertiesToCheck[prop]});for(i=0,len=needsStandard.length;len>i;i++)needed=needsStandard[i].needed,actual=needsStandard[i].actual,properties[needed]?properties[needed][0].pos<properties[actual][0].pos&&reporter.report("Standard property \'"+needed+"\' should come after vendor-prefixed property \'"+actual+"\'.",properties[actual][0].name.line,properties[actual][0].name.col,rule):reporter.report("Missing standard property \'"+needed+"\' to go along with \'"+actual+"\'.",properties[actual][0].name.line,properties[actual][0].name.col,rule)}var properties,num,rule=this,propertiesToCheck={"-webkit-border-radius":"border-radius","-webkit-border-top-left-radius":"border-top-left-radius","-webkit-border-top-right-radius":"border-top-right-radius","-webkit-border-bottom-left-radius":"border-bottom-left-radius","-webkit-border-bottom-right-radius":"border-bottom-right-radius","-o-border-radius":"border-radius","-o-border-top-left-radius":"border-top-left-radius","-o-border-top-right-radius":"border-top-right-radius","-o-border-bottom-left-radius":"border-bottom-left-radius","-o-border-bottom-right-radius":"border-bottom-right-radius","-moz-border-radius":"border-radius","-moz-border-radius-topleft":"border-top-left-radius","-moz-border-radius-topright":"border-top-right-radius","-moz-border-radius-bottomleft":"border-bottom-left-radius","-moz-border-radius-bottomright":"border-bottom-right-radius","-moz-column-count":"column-count","-webkit-column-count":"column-count","-moz-column-gap":"column-gap","-webkit-column-gap":"column-gap","-moz-column-rule":"column-rule","-webkit-column-rule":"column-rule","-moz-column-rule-style":"column-rule-style","-webkit-column-rule-style":"column-rule-style","-moz-column-rule-color":"column-rule-color","-webkit-column-rule-color":"column-rule-color","-moz-column-rule-width":"column-rule-width","-webkit-column-rule-width":"column-rule-width","-moz-column-width":"column-width","-webkit-column-width":"column-width","-webkit-column-span":"column-span","-webkit-columns":"columns","-moz-box-shadow":"box-shadow","-webkit-box-shadow":"box-shadow","-moz-transform":"transform","-webkit-transform":"transform","-o-transform":"transform","-ms-transform":"transform","-moz-transform-origin":"transform-origin","-webkit-transform-origin":"transform-origin","-o-transform-origin":"transform-origin","-ms-transform-origin":"transform-origin","-moz-box-sizing":"box-sizing","-webkit-box-sizing":"box-sizing"};parser.addListener("startrule",startRule),parser.addListener("startfontface",startRule),parser.addListener("startpage",startRule),parser.addListener("startpagemargin",startRule),parser.addListener("startkeyframerule",startRule),parser.addListener("property",function(event){var name=event.property.text.toLowerCase();properties[name]||(properties[name]=[]),properties[name].push({name:event.property,value:event.value,pos:num++})}),parser.addListener("endrule",endRule),parser.addListener("endfontface",endRule),parser.addListener("endpage",endRule),parser.addListener("endpagemargin",endRule),parser.addListener("endkeyframerule",endRule)}}),CSSLint.addRule({id:"zero-units",name:"Disallow units for 0 values",desc:"You don\'t need to specify units when a value is 0.",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("property",function(event){for(var parts=event.value.parts,i=0,len=parts.length;len>i;)!parts[i].units&&"percentage"!==parts[i].type||0!==parts[i].value||"time"===parts[i].type||reporter.report("Values of 0 shouldn\'t have units specified.",parts[i].line,parts[i].col,rule),i++})}}),function(){var xmlEscape=function(str){return str&&str.constructor===String?str.replace(/[\\"&><]/g,function(match){switch(match){case\'"\':return"&quot;";case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;"}}):""};CSSLint.addFormatter({id:"checkstyle-xml",name:"Checkstyle XML format",startFormat:function(){return\'<?xml version="1.0" encoding="utf-8"?><checkstyle>\'},endFormat:function(){return"</checkstyle>"},readError:function(filename,message){return\'<file name="\'+xmlEscape(filename)+\'"><error line="0" column="0" severty="error" message="\'+xmlEscape(message)+\'"></error></file>\'},formatResults:function(results,filename){var messages=results.messages,output=[],generateSource=function(rule){return rule&&"name"in rule?"net.csslint."+rule.name.replace(/\\s/g,""):""};return messages.length>0&&(output.push(\'<file name="\'+filename+\'">\'),CSSLint.Util.forEach(messages,function(message){message.rollup||output.push(\'<error line="\'+message.line+\'" column="\'+message.col+\'" severity="\'+message.type+\'"\'+\' message="\'+xmlEscape(message.message)+\'" source="\'+generateSource(message.rule)+\'"/>\')}),output.push("</file>")),output.join("")}})}(),CSSLint.addFormatter({id:"compact",name:"Compact, \'porcelain\' format",startFormat:function(){return""},endFormat:function(){return""},formatResults:function(results,filename,options){var messages=results.messages,output="";options=options||{};var capitalize=function(str){return str.charAt(0).toUpperCase()+str.slice(1)};return 0===messages.length?options.quiet?"":filename+": Lint Free!":(CSSLint.Util.forEach(messages,function(message){output+=message.rollup?filename+": "+capitalize(message.type)+" - "+message.message+"\\n":filename+": "+"line "+message.line+", col "+message.col+", "+capitalize(message.type)+" - "+message.message+" ("+message.rule.id+")\\n"}),output)}}),CSSLint.addFormatter({id:"csslint-xml",name:"CSSLint XML format",startFormat:function(){return\'<?xml version="1.0" encoding="utf-8"?><csslint>\'},endFormat:function(){return"</csslint>"},formatResults:function(results,filename){var messages=results.messages,output=[],escapeSpecialCharacters=function(str){return str&&str.constructor===String?str.replace(/\\"/g,"\'").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""};return messages.length>0&&(output.push(\'<file name="\'+filename+\'">\'),CSSLint.Util.forEach(messages,function(message){message.rollup?output.push(\'<issue severity="\'+message.type+\'" reason="\'+escapeSpecialCharacters(message.message)+\'" evidence="\'+escapeSpecialCharacters(message.evidence)+\'"/>\'):output.push(\'<issue line="\'+message.line+\'" char="\'+message.col+\'" severity="\'+message.type+\'"\'+\' reason="\'+escapeSpecialCharacters(message.message)+\'" evidence="\'+escapeSpecialCharacters(message.evidence)+\'"/>\')}),output.push("</file>")),output.join("")}}),CSSLint.addFormatter({id:"junit-xml",name:"JUNIT XML format",startFormat:function(){return\'<?xml version="1.0" encoding="utf-8"?><testsuites>\'},endFormat:function(){return"</testsuites>"},formatResults:function(results,filename){var messages=results.messages,output=[],tests={error:0,failure:0},generateSource=function(rule){return rule&&"name"in rule?"net.csslint."+rule.name.replace(/\\s/g,""):""},escapeSpecialCharacters=function(str){return str&&str.constructor===String?str.replace(/\\"/g,"\'").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""};return messages.length>0&&(messages.forEach(function(message){var type="warning"===message.type?"error":message.type;message.rollup||(output.push(\'<testcase time="0" name="\'+generateSource(message.rule)+\'">\'),output.push("<"+type+\' message="\'+escapeSpecialCharacters(message.message)+\'"><![CDATA[\'+message.line+":"+message.col+":"+escapeSpecialCharacters(message.evidence)+"]]></"+type+">"),output.push("</testcase>"),tests[type]+=1)}),output.unshift(\'<testsuite time="0" tests="\'+messages.length+\'" skipped="0" errors="\'+tests.error+\'" failures="\'+tests.failure+\'" package="net.csslint" name="\'+filename+\'">\'),output.push("</testsuite>")),output.join("")}}),CSSLint.addFormatter({id:"lint-xml",name:"Lint XML format",startFormat:function(){return\'<?xml version="1.0" encoding="utf-8"?><lint>\'},endFormat:function(){return"</lint>"},formatResults:function(results,filename){var messages=results.messages,output=[],escapeSpecialCharacters=function(str){return str&&str.constructor===String?str.replace(/\\"/g,"\'").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""};return messages.length>0&&(output.push(\'<file name="\'+filename+\'">\'),CSSLint.Util.forEach(messages,function(message){message.rollup?output.push(\'<issue severity="\'+message.type+\'" reason="\'+escapeSpecialCharacters(message.message)+\'" evidence="\'+escapeSpecialCharacters(message.evidence)+\'"/>\'):output.push(\'<issue line="\'+message.line+\'" char="\'+message.col+\'" severity="\'+message.type+\'"\'+\' reason="\'+escapeSpecialCharacters(message.message)+\'" evidence="\'+escapeSpecialCharacters(message.evidence)+\'"/>\')}),output.push("</file>")),output.join("")}}),CSSLint.addFormatter({id:"text",name:"Plain Text",startFormat:function(){return""},endFormat:function(){return""},formatResults:function(results,filename,options){var messages=results.messages,output="";if(options=options||{},0===messages.length)return options.quiet?"":"\\n\\ncsslint: No errors in "+filename+".";output="\\n\\ncsslint: There ",output+=1===messages.length?"is 1 problem":"are "+messages.length+" problems",output+=" in "+filename+".";var pos=filename.lastIndexOf("/"),shortFilename=filename;return-1===pos&&(pos=filename.lastIndexOf("\\\\")),pos>-1&&(shortFilename=filename.substring(pos+1)),CSSLint.Util.forEach(messages,function(message,i){output=output+"\\n\\n"+shortFilename,message.rollup?(output+="\\n"+(i+1)+": "+message.type,output+="\\n"+message.message):(output+="\\n"+(i+1)+": "+message.type+" at line "+message.line+", col "+message.col,output+="\\n"+message.message,output+="\\n"+message.evidence)}),output}}),module.exports.CSSLint=CSSLint}),ace.define("ace/mode/css_worker",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/worker/mirror","ace/mode/css/csslint"],function(acequire,exports){"use strict";var oop=acequire("../lib/oop"),lang=acequire("../lib/lang"),Mirror=acequire("../worker/mirror").Mirror,CSSLint=acequire("./css/csslint").CSSLint,Worker=exports.Worker=function(sender){Mirror.call(this,sender),this.setTimeout(400),this.ruleset=null,this.setDisabledRules("ids|order-alphabetical"),this.setInfoRules("adjoining-classes|qualified-headings|zero-units|gradients|import|outline-none|vendor-prefix")};oop.inherits(Worker,Mirror),function(){this.setInfoRules=function(ruleNames){"string"==typeof ruleNames&&(ruleNames=ruleNames.split("|")),this.infoRules=lang.arrayToMap(ruleNames),this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.setDisabledRules=function(ruleNames){if(ruleNames){"string"==typeof ruleNames&&(ruleNames=ruleNames.split("|"));\nvar all={};CSSLint.getRules().forEach(function(x){all[x.id]=!0}),ruleNames.forEach(function(x){delete all[x]}),this.ruleset=all}else this.ruleset=null;this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.onUpdate=function(){var value=this.doc.getValue();if(!value)return this.sender.emit("annotate",[]);var infoRules=this.infoRules,result=CSSLint.verify(value,this.ruleset);this.sender.emit("annotate",result.messages.map(function(msg){return{row:msg.line-1,column:msg.col-1,text:msg.message,type:infoRules[msg.rule.id]?"info":msg.type,rule:msg.rule.name}}))}}.call(Worker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError("reduceRight of empty array with no initial value")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != \'object\'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ",ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ",ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws="\t\\n\v\\f\\r   ᠎              \\u2028\\u2029\ufeff";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=RegExp("^"+ws+ws+"*"),trimEndRegexp=RegExp(ws+ws+"*$");String.prototype.trim=function(){return(this+"").replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can\'t convert "+o+" to object");return Object(o)}});'},function(e,t,n){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function e(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},e.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(o,i),o.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},o.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=o})),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[i.getStartRule("doc-start"),c("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+s+")(\\.)(prototype)(\\.)("+s+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void)\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),c("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:n},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),e&&0==e.jsx||l.call(this)),this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};function l(){var e=s.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r="/"==e.charAt(1)?2:1;return 1==r?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==r&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==r?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"</?"+e,next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,c("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function c(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.inherits(a,o),t.JavaScriptHighlightRules=a})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,o=e.findMatchingBracket({row:t,column:i});if(!o||o.row==t)return 0;var s=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(i=o.match(this.foldingStartMarker)){var s=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,s);var a=e.getCommentFoldRange(n,s+i[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(i=o.match(this.foldingStopMarker))){s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),r=n.search(/\S/),o=t,s=n.length,a=t+=1,l=e.getLength();++t<l;){var c=(n=e.getLine(t)).search(/\S/);if(-1!==c){if(r>c)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=o)break;if(u.isMultiLine())t=u.end.row;else if(r==c)break}a=t}}return new i(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<o;){t=e.getLine(n);var c=a.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(n>s)return new i(s,r,n,t.length)}}.call(s.prototype)})),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],(function(e,t,r){"use strict";var i=e("../lib/oop"),o=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,l=e("../worker/worker_client").WorkerClient,c=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=s,this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new u};i.inherits(h,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),o=i.tokens,s=i.state;if(o.length&&"comment"==o[o.length-1].type)return r;if("start"==e||"no_regex"==e)(a=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/))&&(r+=n);else if("doc-start"==e){if("start"==s||"no_regex"==s)return"";var a;(a=t.match(/^\s*(\/?)\*/))&&(a[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new l(["ace"],n(89),"JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/javascript"}.call(h.prototype),t.Mode=h}))},function(e,t){e.exports.id="ace/mode/javascript_worker",e.exports.src='"no use strict";!function(window){function resolveModuleId(id,paths){for(var testPath=id,tail="";testPath;){var alias=paths[testPath];if("string"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,"/")+(tail||alias.main||alias.name);if(alias===!1)return"";var i=testPath.lastIndexOf("/");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log("unable to load "+id);var path=resolveModuleId(id,window.acequire.tlns);return".js"!=path.slice(-3)&&(path+=".js"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error("Unknown command:"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}}(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||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 Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/apply_delta",["require","exports","module"],function(acequire,exports){"use strict";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||"";switch(delta.action){case"insert":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case"remove":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert="insert"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),applyDelta=acequire("./apply_delta").applyDelta,EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(textOrLines){this.$lines=[""],0===textOrLines.length?this.$lines=[""]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[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(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead."),this.insertMergedLines(position,["",""])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:"insert",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([""]),column=0):(lines=[""].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:"insert",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:"remove",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:"remove",lines:["",""]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert="insert"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal("change",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(""),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:"insert"==delta.action?"remove":"insert",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if("object"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if("[object Object]"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/\'/g,"&#39;").replace(/</g,"&#60;")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(acequire,exports){"use strict";acequire("../range").Range;var Document=acequire("../document").Document,lang=acequire("../lib/lang"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(""),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on("change",function(e){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:"insert",start:data[i],lines:data[i+1]};else var d={action:"remove",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define("ace/mode/javascript/jshint",["require","exports","module"],function(acequire,exports,module){module.exports=function outer(modules,cache,entry){function newRequire(name,jumped){if(!cache[name]){if(!modules[name]){var currentRequire="function"==typeof acequire&&acequire;if(!jumped&&currentRequire)return currentRequire(name,!0);if(previousRequire)return previousRequire(name,!0);var err=Error("Cannot find module \'"+name+"\'");throw err.code="MODULE_NOT_FOUND",err}var m=cache[name]={exports:{}};modules[name][0].call(m.exports,function(x){var id=modules[name][1][x];return newRequire(id?id:x)},m,m.exports,outer,modules,cache,entry)}return cache[name].exports}for(var previousRequire="function"==typeof acequire&&acequire,i=0;entry.length>i;i++)newRequire(entry[i]);return newRequire(entry[0])}({"/node_modules/browserify/node_modules/events/events.js":[function(_dereq_,module){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(arg){return"function"==typeof arg}function isNumber(arg){return"number"==typeof arg}function isObject(arg){return"object"==typeof arg&&null!==arg}function isUndefined(arg){return void 0===arg}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||0>n||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),"error"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if(er=arguments[1],er instanceof Error)throw er;throw TypeError(\'Uncaught, unspecified "error" event.\')}if(handler=this._events[type],isUndefined(handler))return!1;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:for(len=arguments.length,args=Array(len-1),i=1;len>i;i++)args[i-1]=arguments[i];handler.apply(this,args)}else if(isObject(handler)){for(len=arguments.length,args=Array(len-1),i=1;len>i;i++)args[i-1]=arguments[i];for(listeners=handler.slice(),len=listeners.length,i=0;len>i;i++)listeners[i].apply(this,args)}return!0},EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener),this._events[type]?isObject(this._events[type])?this._events[type].push(listener):this._events[type]=[this._events[type],listener]:this._events[type]=listener,isObject(this._events[type])&&!this._events[type].warned){var m;m=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners,m&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),"function"==typeof console.trace&&console.trace())}return this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}if(!isFunction(listener))throw TypeError("listener must be a function");var fired=!1;return g.listener=listener,this.on(type,g),this},EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject(list)){for(i=length;i--\x3e0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(0>position)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit("removeListener",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this\n}if(listeners=this._events[type],isFunction(listeners))this.removeListener(type,listeners);else for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){var ret;return ret=this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.listenerCount=function(emitter,type){var ret;return ret=emitter._events&&emitter._events[type]?isFunction(emitter._events[type])?1:emitter._events[type].length:0}},{}],"/node_modules/jshint/data/ascii-identifier-data.js":[function(_dereq_,module){for(var identifierStartTable=[],i=0;128>i;i++)identifierStartTable[i]=36===i||i>=65&&90>=i||95===i||i>=97&&122>=i;for(var identifierPartTable=[],i=0;128>i;i++)identifierPartTable[i]=identifierStartTable[i]||i>=48&&57>=i;module.exports={asciiIdentifierStartTable:identifierStartTable,asciiIdentifierPartTable:identifierPartTable}},{}],"/node_modules/jshint/lodash.js":[function(_dereq_,module,exports){(function(global){(function(){function baseFindIndex(array,predicate,fromRight){for(var length=array.length,index=fromRight?length:-1;fromRight?index--:length>++index;)if(predicate(array[index],index,array))return index;return-1}function baseIndexOf(array,value,fromIndex){if(value!==value)return indexOfNaN(array,fromIndex);for(var index=fromIndex-1,length=array.length;length>++index;)if(array[index]===value)return index;return-1}function baseIsFunction(value){return"function"==typeof value||!1}function baseToString(value){return"string"==typeof value?value:null==value?"":value+""}function indexOfNaN(array,fromIndex,fromRight){for(var length=array.length,index=fromIndex+(fromRight?0:-1);fromRight?index--:length>++index;){var other=array[index];if(other!==other)return index}return-1}function isObjectLike(value){return!!value&&"object"==typeof value}function lodash(){}function arrayCopy(source,array){var index=-1,length=source.length;for(array||(array=Array(length));length>++index;)array[index]=source[index];return array}function arrayEach(array,iteratee){for(var index=-1,length=array.length;length>++index&&iteratee(array[index],index,array)!==!1;);return array}function arrayFilter(array,predicate){for(var index=-1,length=array.length,resIndex=-1,result=[];length>++index;){var value=array[index];predicate(value,index,array)&&(result[++resIndex]=value)}return result}function arrayMap(array,iteratee){for(var index=-1,length=array.length,result=Array(length);length>++index;)result[index]=iteratee(array[index],index,array);return result}function arrayMax(array){for(var index=-1,length=array.length,result=NEGATIVE_INFINITY;length>++index;){var value=array[index];value>result&&(result=value)}return result}function arraySome(array,predicate){for(var index=-1,length=array.length;length>++index;)if(predicate(array[index],index,array))return!0;return!1}function assignWith(object,source,customizer){var props=keys(source);push.apply(props,getSymbols(source));for(var index=-1,length=props.length;length>++index;){var key=props[index],value=object[key],result=customizer(value,source[key],key,object,source);(result===result?result===value:value!==value)&&(value!==undefined||key in object)||(object[key]=result)}return object}function baseCopy(source,props,object){object||(object={});for(var index=-1,length=props.length;length>++index;){var key=props[index];object[key]=source[key]}return object}function baseCallback(func,thisArg,argCount){var type=typeof func;return"function"==type?thisArg===undefined?func:bindCallback(func,thisArg,argCount):null==func?identity:"object"==type?baseMatches(func):thisArg===undefined?property(func):baseMatchesProperty(func,thisArg)}function baseClone(value,isDeep,customizer,key,object,stackA,stackB){var result;if(customizer&&(result=object?customizer(value,key,object):customizer(value)),result!==undefined)return result;if(!isObject(value))return value;var isArr=isArray(value);if(isArr){if(result=initCloneArray(value),!isDeep)return arrayCopy(value,result)}else{var tag=objToString.call(value),isFunc=tag==funcTag;if(tag!=objectTag&&tag!=argsTag&&(!isFunc||object))return cloneableTags[tag]?initCloneByTag(value,tag,isDeep):object?value:{};if(result=initCloneObject(isFunc?{}:value),!isDeep)return baseAssign(result,value)}stackA||(stackA=[]),stackB||(stackB=[]);for(var length=stackA.length;length--;)if(stackA[length]==value)return stackB[length];return stackA.push(value),stackB.push(result),(isArr?arrayEach:baseForOwn)(value,function(subValue,key){result[key]=baseClone(subValue,isDeep,customizer,key,value,stackA,stackB)}),result}function baseFilter(collection,predicate){var result=[];return baseEach(collection,function(value,index,collection){predicate(value,index,collection)&&result.push(value)}),result}function baseForIn(object,iteratee){return baseFor(object,iteratee,keysIn)}function baseForOwn(object,iteratee){return baseFor(object,iteratee,keys)}function baseGet(object,path,pathKey){if(null!=object){pathKey!==undefined&&pathKey in toObject(object)&&(path=[pathKey]);for(var index=-1,length=path.length;null!=object&&length>++index;)var result=object=object[path[index]];return result}}function baseIsEqual(value,other,customizer,isLoose,stackA,stackB){if(value===other)return 0!==value||1/value==1/other;var valType=typeof value,othType=typeof other;return"function"!=valType&&"object"!=valType&&"function"!=othType&&"object"!=othType||null==value||null==other?value!==value&&other!==other:baseIsEqualDeep(value,other,baseIsEqual,customizer,isLoose,stackA,stackB)}function baseIsEqualDeep(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;objIsArr||(objTag=objToString.call(object),objTag==argsTag?objTag=objectTag:objTag!=objectTag&&(objIsArr=isTypedArray(object))),othIsArr||(othTag=objToString.call(other),othTag==argsTag?othTag=objectTag:othTag!=objectTag&&(othIsArr=isTypedArray(other)));var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&!objIsArr&&!objIsObj)return equalByTag(object,other,objTag);if(!isLoose){var valWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(valWrapped||othWrapped)return equalFunc(valWrapped?object.value():object,othWrapped?other.value():other,customizer,isLoose,stackA,stackB)}if(!isSameTag)return!1;stackA||(stackA=[]),stackB||(stackB=[]);for(var length=stackA.length;length--;)if(stackA[length]==object)return stackB[length]==other;stackA.push(object),stackB.push(other);var result=(objIsArr?equalArrays:equalObjects)(object,other,equalFunc,customizer,isLoose,stackA,stackB);return stackA.pop(),stackB.pop(),result}function baseIsMatch(object,props,values,strictCompareFlags,customizer){for(var index=-1,length=props.length,noCustomizer=!customizer;length>++index;)if(noCustomizer&&strictCompareFlags[index]?values[index]!==object[props[index]]:!(props[index]in object))return!1;for(index=-1;length>++index;){var key=props[index],objValue=object[key],srcValue=values[index];if(noCustomizer&&strictCompareFlags[index])var result=objValue!==undefined||key in object;else result=customizer?customizer(objValue,srcValue,key):undefined,result===undefined&&(result=baseIsEqual(srcValue,objValue,customizer,!0));if(!result)return!1}return!0}function baseMatches(source){var props=keys(source),length=props.length;if(!length)return constant(!0);if(1==length){var key=props[0],value=source[key];if(isStrictComparable(value))return function(object){return null==object?!1:object[key]===value&&(value!==undefined||key in toObject(object))}}for(var values=Array(length),strictCompareFlags=Array(length);length--;)value=source[props[length]],values[length]=value,strictCompareFlags[length]=isStrictComparable(value);return function(object){return null!=object&&baseIsMatch(toObject(object),props,values,strictCompareFlags)}}function baseMatchesProperty(path,value){var isArr=isArray(path),isCommon=isKey(path)&&isStrictComparable(value),pathKey=path+"";return path=toPath(path),function(object){if(null==object)return!1;var key=pathKey;if(object=toObject(object),!(!isArr&&isCommon||key in object)){if(object=1==path.length?object:baseGet(object,baseSlice(path,0,-1)),null==object)return!1;key=last(path),object=toObject(object)}return object[key]===value?value!==undefined||key in object:baseIsEqual(value,object[key],null,!0)}}function baseMerge(object,source,customizer,stackA,stackB){if(!isObject(object))return object;var isSrcArr=isLength(source.length)&&(isArray(source)||isTypedArray(source));if(!isSrcArr){var props=keys(source);push.apply(props,getSymbols(source))}return arrayEach(props||source,function(srcValue,key){if(props&&(key=srcValue,srcValue=source[key]),isObjectLike(srcValue))stackA||(stackA=[]),stackB||(stackB=[]),baseMergeDeep(object,source,key,baseMerge,customizer,stackA,stackB);else{var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;isCommon&&(result=srcValue),!isSrcArr&&result===undefined||!isCommon&&(result===result?result===value:value!==value)||(object[key]=result)}}),object}function baseMergeDeep(object,source,key,mergeFunc,customizer,stackA,stackB){for(var length=stackA.length,srcValue=source[key];length--;)if(stackA[length]==srcValue)return object[key]=stackB[length],undefined;var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;isCommon&&(result=srcValue,isLength(srcValue.length)&&(isArray(srcValue)||isTypedArray(srcValue))?result=isArray(value)?value:getLength(value)?arrayCopy(value):[]:isPlainObject(srcValue)||isArguments(srcValue)?result=isArguments(value)?toPlainObject(value):isPlainObject(value)?value:{}:isCommon=!1),stackA.push(srcValue),stackB.push(result),isCommon?object[key]=mergeFunc(result,srcValue,customizer,stackA,stackB):(result===result?result!==value:value===value)&&(object[key]=result)}function baseProperty(key){return function(object){return null==object?undefined:object[key]}}function basePropertyDeep(path){var pathKey=path+"";return path=toPath(path),function(object){return baseGet(object,path,pathKey)}}function baseSlice(array,start,end){var index=-1,length=array.length;start=null==start?0:+start||0,0>start&&(start=-start>length?0:length+start),end=end===undefined||end>length?length:+end||0,0>end&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);length>++index;)result[index]=array[index+start];return result}function baseSome(collection,predicate){var result;return baseEach(collection,function(value,index,collection){return result=predicate(value,index,collection),!result}),!!result}function baseValues(object,props){for(var index=-1,length=props.length,result=Array(length);length>++index;)result[index]=object[props[index]];return result}function binaryIndex(array,value,retHighest){var low=0,high=array?array.length:low;if("number"==typeof value&&value===value&&HALF_MAX_ARRAY_LENGTH>=high){for(;high>low;){var mid=low+high>>>1,computed=array[mid];(retHighest?value>=computed:value>computed)?low=mid+1:high=mid}return high}return binaryIndexBy(array,value,identity,retHighest)}function binaryIndexBy(array,value,iteratee,retHighest){value=iteratee(value);for(var low=0,high=array?array.length:0,valIsNaN=value!==value,valIsUndef=value===undefined;high>low;){var mid=floor((low+high)/2),computed=iteratee(array[mid]),isReflexive=computed===computed;if(valIsNaN)var setLow=isReflexive||retHighest;else setLow=valIsUndef?isReflexive&&(retHighest||computed!==undefined):retHighest?value>=computed:value>computed;setLow?low=mid+1:high=mid}return nativeMin(high,MAX_ARRAY_INDEX)}function bindCallback(func,thisArg,argCount){if("function"!=typeof func)return identity;if(thisArg===undefined)return func;switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)};case 5:return function(value,other,key,object,source){return func.call(thisArg,value,other,key,object,source)}}return function(){return func.apply(thisArg,arguments)}}function bufferClone(buffer){return bufferSlice.call(buffer,0)}function createAssigner(assigner){return restParam(function(object,sources){var index=-1,length=null==object?0:sources.length,customizer=length>2&&sources[length-2],guard=length>2&&sources[2],thisArg=length>1&&sources[length-1];for("function"==typeof customizer?(customizer=bindCallback(customizer,thisArg,5),length-=2):(customizer="function"==typeof thisArg?thisArg:null,length-=customizer?1:0),guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=3>length?null:customizer,length=1);length>++index;){var source=sources[index];source&&assigner(object,source,customizer)}return object})}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){var length=collection?getLength(collection):0;if(!isLength(length))return eachFunc(collection,iteratee);for(var index=fromRight?length:-1,iterable=toObject(collection);(fromRight?index--:length>++index)&&iteratee(iterable[index],index,iterable)!==!1;);return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){for(var iterable=toObject(object),props=keysFunc(object),length=props.length,index=fromRight?length:-1;fromRight?index--:length>++index;){var key=props[index];if(iteratee(iterable[key],key,iterable)===!1)break}return object}}function createFindIndex(fromRight){return function(array,predicate,thisArg){return array&&array.length?(predicate=getCallback(predicate,thisArg,3),baseFindIndex(array,predicate,fromRight)):-1}}function createForEach(arrayFunc,eachFunc){return function(collection,iteratee,thisArg){return"function"==typeof iteratee&&thisArg===undefined&&isArray(collection)?arrayFunc(collection,iteratee):eachFunc(collection,bindCallback(iteratee,thisArg,3))}}function equalArrays(array,other,equalFunc,customizer,isLoose,stackA,stackB){var index=-1,arrLength=array.length,othLength=other.length,result=!0;if(arrLength!=othLength&&!(isLoose&&othLength>arrLength))return!1;for(;result&&arrLength>++index;){var arrValue=array[index],othValue=other[index];if(result=undefined,customizer&&(result=isLoose?customizer(othValue,arrValue,index):customizer(arrValue,othValue,index)),result===undefined)if(isLoose)for(var othIndex=othLength;othIndex--&&(othValue=other[othIndex],!(result=arrValue&&arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB))););else result=arrValue&&arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB)}return!!result}function equalByTag(object,other,tag){switch(tag){case boolTag:case dateTag:return+object==+other;case errorTag:return object.name==other.name&&object.message==other.message;case numberTag:return object!=+object?other!=+other:0==object?1/object==1/other:object==+other;case regexpTag:case stringTag:return object==other+""}return!1}function equalObjects(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objProps=keys(object),objLength=objProps.length,othProps=keys(other),othLength=othProps.length;if(objLength!=othLength&&!isLoose)return!1;for(var skipCtor=isLoose,index=-1;objLength>++index;){var key=objProps[index],result=isLoose?key in other:hasOwnProperty.call(other,key);if(result){var objValue=object[key],othValue=other[key];result=undefined,customizer&&(result=isLoose?customizer(othValue,objValue,key):customizer(objValue,othValue,key)),result===undefined&&(result=objValue&&objValue===othValue||equalFunc(objValue,othValue,customizer,isLoose,stackA,stackB))}if(!result)return!1;skipCtor||(skipCtor="constructor"==key)}if(!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&"constructor"in object&&"constructor"in other&&!("function"==typeof objCtor&&objCtor instanceof objCtor&&"function"==typeof othCtor&&othCtor instanceof othCtor))return!1}return!0}function getCallback(func,thisArg,argCount){var result=lodash.callback||callback;return result=result===callback?baseCallback:result,argCount?result(func,thisArg,argCount):result}function getIndexOf(collection,target,fromIndex){var result=lodash.indexOf||indexOf;return result=result===indexOf?baseIndexOf:result,collection?result(collection,target,fromIndex):result}function initCloneArray(array){var length=array.length,result=new array.constructor(length);return length&&"string"==typeof array[0]&&hasOwnProperty.call(array,"index")&&(result.index=array.index,result.input=array.input),result}function initCloneObject(object){var Ctor=object.constructor;return"function"==typeof Ctor&&Ctor instanceof Ctor||(Ctor=Object),new Ctor}function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return bufferClone(object);case boolTag:case dateTag:return new Ctor(+object);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:var buffer=object.buffer;return new Ctor(isDeep?bufferClone(buffer):buffer,object.byteOffset,object.length);case numberTag:case stringTag:return new Ctor(object);case regexpTag:var result=new Ctor(object.source,reFlags.exec(object));result.lastIndex=object.lastIndex}return result}function isIndex(value,length){return value=+value,length=null==length?MAX_SAFE_INTEGER:length,value>-1&&0==value%1&&length>value}function isIterateeCall(value,index,object){if(!isObject(object))return!1;var type=typeof index;if("number"==type)var length=getLength(object),prereq=isLength(length)&&isIndex(index,length);else prereq="string"==type&&index in object;if(prereq){var other=object[index];return value===value?value===other:other!==other}return!1}function isKey(value,object){var type=typeof value;if("string"==type&&reIsPlainProp.test(value)||"number"==type)return!0;if(isArray(value))return!1;var result=!reIsDeepProp.test(value);return result||null!=object&&value in toObject(object)}function isLength(value){return"number"==typeof value&&value>-1&&0==value%1&&MAX_SAFE_INTEGER>=value}function isStrictComparable(value){return value===value&&(0===value?1/value>0:!isObject(value))}function shimIsPlainObject(value){var Ctor;if(lodash.support,!isObjectLike(value)||objToString.call(value)!=objectTag||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,"function"==typeof Ctor&&!(Ctor instanceof Ctor)))return!1;var result;return baseForIn(value,function(subValue,key){result=key}),result===undefined||hasOwnProperty.call(value,result)}function shimKeys(object){for(var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length,support=lodash.support,allowIndexes=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object)),index=-1,result=[];propsLength>++index;){var key=props[index];(allowIndexes&&isIndex(key,length)||hasOwnProperty.call(object,key))&&result.push(key)}return result}function toObject(value){return isObject(value)?value:Object(value)}function toPath(value){if(isArray(value))return value;var result=[];return baseToString(value).replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}),result}function indexOf(array,value,fromIndex){var length=array?array.length:0;if(!length)return-1;if("number"==typeof fromIndex)fromIndex=0>fromIndex?nativeMax(length+fromIndex,0):fromIndex;else if(fromIndex){var index=binaryIndex(array,value),other=array[index];return(value===value?value===other:other!==other)?index:-1}return baseIndexOf(array,value,fromIndex||0)}function last(array){var length=array?array.length:0;return length?array[length-1]:undefined}function slice(array,start,end){var length=array?array.length:0;return length?(end&&"number"!=typeof end&&isIterateeCall(array,start,end)&&(start=0,end=length),baseSlice(array,start,end)):[]}function unzip(array){for(var index=-1,length=(array&&array.length&&arrayMax(arrayMap(array,getLength)))>>>0,result=Array(length);length>++index;)result[index]=arrayMap(array,baseProperty(index));return result}function includes(collection,target,fromIndex,guard){var length=collection?getLength(collection):0;return isLength(length)||(collection=values(collection),length=collection.length),length?(fromIndex="number"!=typeof fromIndex||guard&&isIterateeCall(target,fromIndex,guard)?0:0>fromIndex?nativeMax(length+fromIndex,0):fromIndex||0,"string"==typeof collection||!isArray(collection)&&isString(collection)?length>fromIndex&&collection.indexOf(target,fromIndex)>-1:getIndexOf(collection,target,fromIndex)>-1):!1}function reject(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;return predicate=getCallback(predicate,thisArg,3),func(collection,function(value,index,collection){return!predicate(value,index,collection)})}function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;return thisArg&&isIterateeCall(collection,predicate,thisArg)&&(predicate=null),("function"!=typeof predicate||thisArg!==undefined)&&(predicate=getCallback(predicate,thisArg,3)),func(collection,predicate)}function restParam(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=nativeMax(start===undefined?func.length-1:+start||0,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);length>++index;)rest[index]=args[start+index];switch(start){case 0:return func.call(this,rest);case 1:return func.call(this,args[0],rest);case 2:return func.call(this,args[0],args[1],rest)}var otherArgs=Array(start+1);for(index=-1;start>++index;)otherArgs[index]=args[index];return otherArgs[start]=rest,func.apply(this,otherArgs)}}function clone(value,isDeep,customizer,thisArg){return isDeep&&"boolean"!=typeof isDeep&&isIterateeCall(value,isDeep,customizer)?isDeep=!1:"function"==typeof isDeep&&(thisArg=customizer,customizer=isDeep,isDeep=!1),customizer="function"==typeof customizer&&bindCallback(customizer,thisArg,1),baseClone(value,isDeep,customizer)}function isArguments(value){var length=isObjectLike(value)?value.length:undefined;return isLength(length)&&objToString.call(value)==argsTag}function isEmpty(value){if(null==value)return!0;var length=getLength(value);return isLength(length)&&(isArray(value)||isString(value)||isArguments(value)||isObjectLike(value)&&isFunction(value.splice))?!length:!keys(value).length}function isObject(value){var type=typeof value;return"function"==type||!!value&&"object"==type}function isNative(value){return null==value?!1:objToString.call(value)==funcTag?reIsNative.test(fnToString.call(value)):isObjectLike(value)&&reIsHostCtor.test(value)}function isNumber(value){return"number"==typeof value||isObjectLike(value)&&objToString.call(value)==numberTag}function isString(value){return"string"==typeof value||isObjectLike(value)&&objToString.call(value)==stringTag}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objToString.call(value)]}function toPlainObject(value){return baseCopy(value,keysIn(value))}function has(object,path){if(null==object)return!1;var result=hasOwnProperty.call(object,path);return result||isKey(path)||(path=toPath(path),object=1==path.length?object:baseGet(object,baseSlice(path,0,-1)),path=last(path),result=null!=object&&hasOwnProperty.call(object,path)),result}function keysIn(object){if(null==object)return[];isObject(object)||(object=Object(object));var length=object.length;length=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object))&&length||0;for(var Ctor=object.constructor,index=-1,isProto="function"==typeof Ctor&&Ctor.prototype===object,result=Array(length),skipIndexes=length>0;length>++index;)result[index]=index+"";for(var key in object)skipIndexes&&isIndex(key,length)||"constructor"==key&&(isProto||!hasOwnProperty.call(object,key))||result.push(key);return result}function values(object){return baseValues(object,keys(object))}function escapeRegExp(string){return string=baseToString(string),string&&reHasRegExpChars.test(string)?string.replace(reRegExpChars,"\\\\$&"):string}function callback(func,thisArg,guard){return guard&&isIterateeCall(func,thisArg,guard)&&(thisArg=null),baseCallback(func,thisArg)}function constant(value){return function(){return value}}function identity(value){return value}function property(path){return isKey(path)?baseProperty(path):basePropertyDeep(path)}var undefined,VERSION="3.7.0",FUNC_ERROR_TEXT="Expected a function",argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",reIsDeepProp=/\\.|\\[(?:[^[\\]]+|(["\'])(?:(?!\\1)[^\\n\\\\]|\\\\.)*?)\\1\\]/,reIsPlainProp=/^\\w*$/,rePropName=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\n\\\\]|\\\\.)*?)\\2)\\]/g,reRegExpChars=/[.*+?^${}()|[\\]\\/\\\\]/g,reHasRegExpChars=RegExp(reRegExpChars.source),reEscapeChar=/\\\\(\\\\)?/g,reFlags=/\\w*$/,reIsHostCtor=/^\\[object .+?Constructor\\]$/,typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[stringTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[mapTag]=cloneableTags[setTag]=cloneableTags[weakMapTag]=!1;var objectTypes={"function":!0,object:!0},freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports,freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module,freeGlobal=freeExports&&freeModule&&"object"==typeof global&&global&&global.Object&&global,freeSelf=objectTypes[typeof self]&&self&&self.Object&&self,freeWindow=objectTypes[typeof window]&&window&&window.Object&&window,moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports,root=freeGlobal||freeWindow!==(this&&this.window)&&freeWindow||freeSelf||this,arrayProto=Array.prototype,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp("^"+escapeRegExp(objToString).replace(/toString|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ArrayBuffer=isNative(ArrayBuffer=root.ArrayBuffer)&&ArrayBuffer,bufferSlice=isNative(bufferSlice=ArrayBuffer&&new ArrayBuffer(0).slice)&&bufferSlice,floor=Math.floor,getOwnPropertySymbols=isNative(getOwnPropertySymbols=Object.getOwnPropertySymbols)&&getOwnPropertySymbols,getPrototypeOf=isNative(getPrototypeOf=Object.getPrototypeOf)&&getPrototypeOf,push=arrayProto.push,preventExtensions=isNative(Object.preventExtensions=Object.preventExtensions)&&preventExtensions,propertyIsEnumerable=objectProto.propertyIsEnumerable,Uint8Array=isNative(Uint8Array=root.Uint8Array)&&Uint8Array,Float64Array=function(){try{var func=isNative(func=root.Float64Array)&&func,result=new func(new ArrayBuffer(10),0,1)&&func}catch(e){}return result}(),nativeAssign=function(){var object={1:0},func=preventExtensions&&isNative(func=Object.assign)&&func;try{func(preventExtensions(object),"xo")}catch(e){}return!object[1]&&func}(),nativeIsArray=isNative(nativeIsArray=Array.isArray)&&nativeIsArray,nativeKeys=isNative(nativeKeys=Object.keys)&&nativeKeys,nativeMax=Math.max,nativeMin=Math.min,NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,MAX_ARRAY_LENGTH=Math.pow(2,32)-1,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1,FLOAT64_BYTES_PER_ELEMENT=Float64Array?Float64Array.BYTES_PER_ELEMENT:0,MAX_SAFE_INTEGER=Math.pow(2,53)-1,support=lodash.support={};(function(x){var Ctor=function(){this.x=x},props=[];Ctor.prototype={valueOf:x,y:x};for(var key in new Ctor)props.push(key);support.funcDecomp=/\\bthis\\b/.test(function(){return this}),support.funcNames="string"==typeof Function.name;try{support.nonEnumArgs=!propertyIsEnumerable.call(arguments,1)}catch(e){support.nonEnumArgs=!0}})(1,0);var baseAssign=nativeAssign||function(object,source){return null==source?object:baseCopy(source,getSymbols(source),baseCopy(source,keys(source),object))},baseEach=createBaseEach(baseForOwn),baseFor=createBaseFor();bufferSlice||(bufferClone=ArrayBuffer&&Uint8Array?function(buffer){var byteLength=buffer.byteLength,floatLength=Float64Array?floor(byteLength/FLOAT64_BYTES_PER_ELEMENT):0,offset=floatLength*FLOAT64_BYTES_PER_ELEMENT,result=new ArrayBuffer(byteLength);if(floatLength){var view=new Float64Array(result,0,floatLength);view.set(new Float64Array(buffer,0,floatLength))}return byteLength!=offset&&(view=new Uint8Array(result,offset),view.set(new Uint8Array(buffer,offset))),result}:constant(null));var getLength=baseProperty("length"),getSymbols=getOwnPropertySymbols?function(object){return getOwnPropertySymbols(toObject(object))}:constant([]),findLastIndex=createFindIndex(!0),zip=restParam(unzip),forEach=createForEach(arrayEach,baseEach),isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag},isFunction=baseIsFunction(/x/)||Uint8Array&&!baseIsFunction(Uint8Array)?function(value){return objToString.call(value)==funcTag}:baseIsFunction,isPlainObject=getPrototypeOf?function(value){if(!value||objToString.call(value)!=objectTag)return!1;var valueOf=value.valueOf,objProto=isNative(valueOf)&&(objProto=getPrototypeOf(valueOf))&&getPrototypeOf(objProto);return objProto?value==objProto||getPrototypeOf(value)==objProto:shimIsPlainObject(value)}:shimIsPlainObject,assign=createAssigner(function(object,source,customizer){return customizer?assignWith(object,source,customizer):baseAssign(object,source)}),keys=nativeKeys?function(object){if(object)var Ctor=object.constructor,length=object.length;return"function"==typeof Ctor&&Ctor.prototype===object||"function"!=typeof object&&isLength(length)?shimKeys(object):isObject(object)?nativeKeys(object):[]}:shimKeys,merge=createAssigner(baseMerge);lodash.assign=assign,lodash.callback=callback,lodash.constant=constant,lodash.forEach=forEach,lodash.keys=keys,lodash.keysIn=keysIn,lodash.merge=merge,lodash.property=property,lodash.reject=reject,lodash.restParam=restParam,lodash.slice=slice,lodash.toPlainObject=toPlainObject,lodash.unzip=unzip,lodash.values=values,lodash.zip=zip,lodash.each=forEach,lodash.extend=assign,lodash.iteratee=callback,lodash.clone=clone,lodash.escapeRegExp=escapeRegExp,lodash.findLastIndex=findLastIndex,lodash.has=has,lodash.identity=identity,lodash.includes=includes,lodash.indexOf=indexOf,lodash.isArguments=isArguments,lodash.isArray=isArray,lodash.isEmpty=isEmpty,lodash.isFunction=isFunction,lodash.isNative=isNative,lodash.isNumber=isNumber,lodash.isObject=isObject,lodash.isPlainObject=isPlainObject,lodash.isString=isString,lodash.isTypedArray=isTypedArray,lodash.last=last,lodash.some=some,lodash.any=some,lodash.contains=includes,lodash.include=includes,lodash.VERSION=VERSION,freeExports&&freeModule?moduleExports?(freeModule.exports=lodash)._=lodash:freeExports._=lodash:root._=lodash\n}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],"/node_modules/jshint/src/jshint.js":[function(_dereq_,module,exports){var _=_dereq_("../lodash"),events=_dereq_("events"),vars=_dereq_("./vars.js"),messages=_dereq_("./messages.js"),Lexer=_dereq_("./lex.js").Lexer,reg=_dereq_("./reg.js"),state=_dereq_("./state.js").state,style=_dereq_("./style.js"),options=_dereq_("./options.js"),scopeManager=_dereq_("./scope-manager.js"),JSHINT=function(){"use strict";function checkOption(name,t){return name=name.trim(),/^[+-]W\\d{3}$/g.test(name)?!0:-1!==options.validNames.indexOf(name)||"jslint"===t.type||_.has(options.removed,name)?!0:(error("E001",t,name),!1)}function isString(obj){return"[object String]"===Object.prototype.toString.call(obj)}function isIdentifier(tkn,value){return tkn?tkn.identifier&&tkn.value===value?!0:!1:!1}function isReserved(token){if(!token.reserved)return!1;var meta=token.meta;if(meta&&meta.isFutureReservedWord&&state.inES5()){if(!meta.es5)return!1;if(meta.strictOnly&&!state.option.strict&&!state.isStrict())return!1;if(token.isProperty)return!1}return!0}function supplant(str,data){return str.replace(/\\{([^{}]*)\\}/g,function(a,b){var r=data[b];return"string"==typeof r||"number"==typeof r?r:a})}function combine(dest,src){Object.keys(src).forEach(function(name){_.has(JSHINT.blacklist,name)||(dest[name]=src[name])})}function processenforceall(){if(state.option.enforceall){for(var enforceopt in options.bool.enforcing)void 0!==state.option[enforceopt]||options.noenforceall[enforceopt]||(state.option[enforceopt]=!0);for(var relaxopt in options.bool.relaxing)void 0===state.option[relaxopt]&&(state.option[relaxopt]=!1)}}function assume(){processenforceall(),state.option.esversion||state.option.moz||(state.option.esversion=state.option.es3?3:state.option.esnext?6:5),state.inES5()&&combine(predefined,vars.ecmaIdentifiers[5]),state.inES6()&&combine(predefined,vars.ecmaIdentifiers[6]),state.option.module&&(state.option.strict===!0&&(state.option.strict="global"),state.inES6()||warning("W134",state.tokens.next,"module",6)),state.option.couch&&combine(predefined,vars.couch),state.option.qunit&&combine(predefined,vars.qunit),state.option.rhino&&combine(predefined,vars.rhino),state.option.shelljs&&(combine(predefined,vars.shelljs),combine(predefined,vars.node)),state.option.typed&&combine(predefined,vars.typed),state.option.phantom&&(combine(predefined,vars.phantom),state.option.strict===!0&&(state.option.strict="global")),state.option.prototypejs&&combine(predefined,vars.prototypejs),state.option.node&&(combine(predefined,vars.node),combine(predefined,vars.typed),state.option.strict===!0&&(state.option.strict="global")),state.option.devel&&combine(predefined,vars.devel),state.option.dojo&&combine(predefined,vars.dojo),state.option.browser&&(combine(predefined,vars.browser),combine(predefined,vars.typed)),state.option.browserify&&(combine(predefined,vars.browser),combine(predefined,vars.typed),combine(predefined,vars.browserify),state.option.strict===!0&&(state.option.strict="global")),state.option.nonstandard&&combine(predefined,vars.nonstandard),state.option.jasmine&&combine(predefined,vars.jasmine),state.option.jquery&&combine(predefined,vars.jquery),state.option.mootools&&combine(predefined,vars.mootools),state.option.worker&&combine(predefined,vars.worker),state.option.wsh&&combine(predefined,vars.wsh),state.option.globalstrict&&state.option.strict!==!1&&(state.option.strict="global"),state.option.yui&&combine(predefined,vars.yui),state.option.mocha&&combine(predefined,vars.mocha)}function quit(code,line,chr){var percentage=Math.floor(100*(line/state.lines.length)),message=messages.errors[code].desc;throw{name:"JSHintError",line:line,character:chr,message:message+" ("+percentage+"% scanned).",raw:message,code:code}}function removeIgnoredMessages(){var ignored=state.ignoredLines;_.isEmpty(ignored)||(JSHINT.errors=_.reject(JSHINT.errors,function(err){return ignored[err.line]}))}function warning(code,t,a,b,c,d){var ch,l,w,msg;if(/^W\\d{3}$/.test(code)){if(state.ignored[code])return;msg=messages.warnings[code]}else/E\\d{3}/.test(code)?msg=messages.errors[code]:/I\\d{3}/.test(code)&&(msg=messages.info[code]);return t=t||state.tokens.next||{},"(end)"===t.id&&(t=state.tokens.curr),l=t.line||0,ch=t.from||0,w={id:"(error)",raw:msg.desc,code:msg.code,evidence:state.lines[l-1]||"",line:l,character:ch,scope:JSHINT.scope,a:a,b:b,c:c,d:d},w.reason=supplant(msg.desc,w),JSHINT.errors.push(w),removeIgnoredMessages(),JSHINT.errors.length>=state.option.maxerr&&quit("E043",l,ch),w}function warningAt(m,l,ch,a,b,c,d){return warning(m,{line:l,from:ch},a,b,c,d)}function error(m,t,a,b,c,d){warning(m,t,a,b,c,d)}function errorAt(m,l,ch,a,b,c,d){return error(m,{line:l,from:ch},a,b,c,d)}function addInternalSrc(elem,src){var i;return i={id:"(internal)",elem:elem,value:src},JSHINT.internals.push(i),i}function doOption(){var nt=state.tokens.next,body=nt.body.match(/(-\\s+)?[^\\s,:]+(?:\\s*:\\s*(-\\s+)?[^\\s,]+)?/g)||[],predef={};if("globals"===nt.type){body.forEach(function(g,idx){g=g.split(":");var key=(g[0]||"").trim(),val=(g[1]||"").trim();if("-"===key||!key.length){if(idx>0&&idx===body.length-1)return;return error("E002",nt),void 0}"-"===key.charAt(0)?(key=key.slice(1),val=!1,JSHINT.blacklist[key]=key,delete predefined[key]):predef[key]="true"===val}),combine(predefined,predef);for(var key in predef)_.has(predef,key)&&(declared[key]=nt)}"exported"===nt.type&&body.forEach(function(e,idx){if(!e.length){if(idx>0&&idx===body.length-1)return;return error("E002",nt),void 0}state.funct["(scope)"].addExported(e)}),"members"===nt.type&&(membersOnly=membersOnly||{},body.forEach(function(m){var ch1=m.charAt(0),ch2=m.charAt(m.length-1);ch1!==ch2||\'"\'!==ch1&&"\'"!==ch1||(m=m.substr(1,m.length-2).replace(\'\\\\"\',\'"\')),membersOnly[m]=!1}));var numvals=["maxstatements","maxparams","maxdepth","maxcomplexity","maxerr","maxlen","indent"];("jshint"===nt.type||"jslint"===nt.type)&&(body.forEach(function(g){g=g.split(":");var key=(g[0]||"").trim(),val=(g[1]||"").trim();if(checkOption(key,nt))if(numvals.indexOf(key)>=0)if("false"!==val){if(val=+val,"number"!=typeof val||!isFinite(val)||0>=val||Math.floor(val)!==val)return error("E032",nt,g[1].trim()),void 0;state.option[key]=val}else state.option[key]="indent"===key?4:!1;else{if("validthis"===key)return state.funct["(global)"]?void error("E009"):"true"!==val&&"false"!==val?void error("E002",nt):(state.option.validthis="true"===val,void 0);if("quotmark"!==key)if("shadow"!==key)if("unused"!==key)if("latedef"!==key)if("ignore"!==key)if("strict"!==key){"module"===key&&(hasParsedCode(state.funct)||error("E055",state.tokens.next,"module"));var esversions={es3:3,es5:5,esnext:6};if(!_.has(esversions,key)){if("esversion"===key){switch(val){case"5":state.inES5(!0)&&warning("I003");case"3":case"6":state.option.moz=!1,state.option.esversion=+val;break;case"2015":state.option.moz=!1,state.option.esversion=6;break;default:error("E002",nt)}return hasParsedCode(state.funct)||error("E055",state.tokens.next,"esversion"),void 0}var match=/^([+-])(W\\d{3})$/g.exec(key);if(match)return state.ignored[match[2]]="-"===match[1],void 0;var tn;return"true"===val||"false"===val?("jslint"===nt.type?(tn=options.renamed[key]||key,state.option[tn]="true"===val,void 0!==options.inverted[tn]&&(state.option[tn]=!state.option[tn])):state.option[key]="true"===val,"newcap"===key&&(state.option["(explicitNewcap)"]=!0),void 0):(error("E002",nt),void 0)}switch(val){case"true":state.option.moz=!1,state.option.esversion=esversions[key];break;case"false":state.option.moz||(state.option.esversion=5);break;default:error("E002",nt)}}else switch(val){case"true":state.option.strict=!0;break;case"false":state.option.strict=!1;break;case"func":case"global":case"implied":state.option.strict=val;break;default:error("E002",nt)}else switch(val){case"line":state.ignoredLines[nt.line]=!0,removeIgnoredMessages();break;default:error("E002",nt)}else switch(val){case"true":state.option.latedef=!0;break;case"false":state.option.latedef=!1;break;case"nofunc":state.option.latedef="nofunc";break;default:error("E002",nt)}else switch(val){case"true":state.option.unused=!0;break;case"false":state.option.unused=!1;break;case"vars":case"strict":state.option.unused=val;break;default:error("E002",nt)}else switch(val){case"true":state.option.shadow=!0;break;case"outer":state.option.shadow="outer";break;case"false":case"inner":state.option.shadow="inner";break;default:error("E002",nt)}else switch(val){case"true":case"false":state.option.quotmark="true"===val;break;case"double":case"single":state.option.quotmark=val;break;default:error("E002",nt)}}}),assume())}function peek(p){var t,i=p||0,j=lookahead.length;if(j>i)return lookahead[i];for(;i>=j;)t=lookahead[j],t||(t=lookahead[j]=lex.token()),j+=1;return t||"(end)"!==state.tokens.next.id?t:state.tokens.next}function peekIgnoreEOL(){var t,i=0;do t=peek(i++);while("(endline)"===t.id);return t}function advance(id,t){switch(state.tokens.curr.id){case"(number)":"."===state.tokens.next.id&&warning("W005",state.tokens.curr);break;case"-":("-"===state.tokens.next.id||"--"===state.tokens.next.id)&&warning("W006");break;case"+":("+"===state.tokens.next.id||"++"===state.tokens.next.id)&&warning("W007")}for(id&&state.tokens.next.id!==id&&(t?"(end)"===state.tokens.next.id?error("E019",t,t.id):error("E020",state.tokens.next,id,t.id,t.line,state.tokens.next.value):("(identifier)"!==state.tokens.next.type||state.tokens.next.value!==id)&&warning("W116",state.tokens.next,id,state.tokens.next.value)),state.tokens.prev=state.tokens.curr,state.tokens.curr=state.tokens.next;;){if(state.tokens.next=lookahead.shift()||lex.token(),state.tokens.next||quit("E041",state.tokens.curr.line),"(end)"===state.tokens.next.id||"(error)"===state.tokens.next.id)return;if(state.tokens.next.check&&state.tokens.next.check(),state.tokens.next.isSpecial)"falls through"===state.tokens.next.type?state.tokens.curr.caseFallsThrough=!0:doOption();else if("(endline)"!==state.tokens.next.id)break}}function isInfix(token){return token.infix||!token.identifier&&!token.template&&!!token.led}function isEndOfExpr(){var curr=state.tokens.curr,next=state.tokens.next;return";"===next.id||"}"===next.id||":"===next.id?!0:isInfix(next)===isInfix(curr)||"yield"===curr.id&&state.inMoz()?curr.line!==startLine(next):!1}function isBeginOfExpr(prev){return!prev.left&&"unary"!==prev.arity}function expression(rbp,initial){var left,isArray=!1,isObject=!1,isLetExpr=!1;state.nameStack.push(),initial||"let"!==state.tokens.next.value||"("!==peek(0).value||(state.inMoz()||warning("W118",state.tokens.next,"let expressions"),isLetExpr=!0,state.funct["(scope)"].stack(),advance("let"),advance("("),state.tokens.prev.fud(),advance(")")),"(end)"===state.tokens.next.id&&error("E006",state.tokens.curr);var isDangerous=state.option.asi&&state.tokens.prev.line!==startLine(state.tokens.curr)&&_.contains(["]",")"],state.tokens.prev.id)&&_.contains(["[","("],state.tokens.curr.id);if(isDangerous&&warning("W014",state.tokens.curr,state.tokens.curr.id),advance(),initial&&(state.funct["(verb)"]=state.tokens.curr.value,state.tokens.curr.beginsStmt=!0),initial===!0&&state.tokens.curr.fud)left=state.tokens.curr.fud();else for(state.tokens.curr.nud?left=state.tokens.curr.nud():error("E030",state.tokens.curr,state.tokens.curr.id);(state.tokens.next.lbp>rbp||"(template)"===state.tokens.next.type)&&!isEndOfExpr();)isArray="Array"===state.tokens.curr.value,isObject="Object"===state.tokens.curr.value,left&&(left.value||left.first&&left.first.value)&&("new"!==left.value||left.first&&left.first.value&&"."===left.first.value)&&(isArray=!1,left.value!==state.tokens.curr.value&&(isObject=!1)),advance(),isArray&&"("===state.tokens.curr.id&&")"===state.tokens.next.id&&warning("W009",state.tokens.curr),isObject&&"("===state.tokens.curr.id&&")"===state.tokens.next.id&&warning("W010",state.tokens.curr),left&&state.tokens.curr.led?left=state.tokens.curr.led(left):error("E033",state.tokens.curr,state.tokens.curr.id);return isLetExpr&&state.funct["(scope)"].unstack(),state.nameStack.pop(),left}function startLine(token){return token.startLine||token.line}function nobreaknonadjacent(left,right){left=left||state.tokens.curr,right=right||state.tokens.next,state.option.laxbreak||left.line===startLine(right)||warning("W014",right,right.value)}function nolinebreak(t){t=t||state.tokens.curr,t.line!==startLine(state.tokens.next)&&warning("E022",t,t.value)}function nobreakcomma(left,right){left.line!==startLine(right)&&(state.option.laxcomma||(comma.first&&(warning("I001"),comma.first=!1),warning("W014",left,right.value)))}function comma(opts){if(opts=opts||{},opts.peek?nobreakcomma(state.tokens.prev,state.tokens.curr):(nobreakcomma(state.tokens.curr,state.tokens.next),advance(",")),state.tokens.next.identifier&&(!opts.property||!state.inES5()))switch(state.tokens.next.value){case"break":case"case":case"catch":case"continue":case"default":case"do":case"else":case"finally":case"for":case"if":case"in":case"instanceof":case"return":case"switch":case"throw":case"try":case"var":case"let":case"while":case"with":return error("E024",state.tokens.next,state.tokens.next.value),!1}if("(punctuator)"===state.tokens.next.type)switch(state.tokens.next.value){case"}":case"]":case",":if(opts.allowTrailing)return!0;case")":return error("E024",state.tokens.next,state.tokens.next.value),!1}return!0}function symbol(s,p){var x=state.syntax[s];return x&&"object"==typeof x||(state.syntax[s]=x={id:s,lbp:p,value:s}),x}function delim(s){var x=symbol(s,0);return x.delim=!0,x}function stmt(s,f){var x=delim(s);return x.identifier=x.reserved=!0,x.fud=f,x}function blockstmt(s,f){var x=stmt(s,f);return x.block=!0,x}function reserveName(x){var c=x.id.charAt(0);return(c>="a"&&"z">=c||c>="A"&&"Z">=c)&&(x.identifier=x.reserved=!0),x}function prefix(s,f){var x=symbol(s,150);return reserveName(x),x.nud="function"==typeof f?f:function(){return this.arity="unary",this.right=expression(150),("++"===this.id||"--"===this.id)&&(state.option.plusplus?warning("W016",this,this.id):!this.right||this.right.identifier&&!isReserved(this.right)||"."===this.right.id||"["===this.right.id||warning("W017",this),this.right&&this.right.isMetaProperty?error("E031",this):this.right&&this.right.identifier&&state.funct["(scope)"].block.modify(this.right.value,this)),this},x}function type(s,f){var x=delim(s);return x.type=s,x.nud=f,x}function reserve(name,func){var x=type(name,func);return x.identifier=!0,x.reserved=!0,x}function FutureReservedWord(name,meta){var x=type(name,meta&&meta.nud||function(){return this});return meta=meta||{},meta.isFutureReservedWord=!0,x.value=name,x.identifier=!0,x.reserved=!0,x.meta=meta,x}function reservevar(s,v){return reserve(s,function(){return"function"==typeof v&&v(this),this})}function infix(s,f,p,w){var x=symbol(s,p);return reserveName(x),x.infix=!0,x.led=function(left){return w||nobreaknonadjacent(state.tokens.prev,state.tokens.curr),"in"!==s&&"instanceof"!==s||"!"!==left.id||warning("W018",left,"!"),"function"==typeof f?f(left,this):(this.left=left,this.right=expression(p),this)},x}function application(s){var x=symbol(s,42);return x.led=function(left){return nobreaknonadjacent(state.tokens.prev,state.tokens.curr),this.left=left,this.right=doFunction({type:"arrow",loneArg:left}),this},x}function relation(s,f){var x=symbol(s,100);re
8
  * getSize v2.0.3
9
  * measure size of elements
10
  * MIT license